@Override
  public DiskStoreFactory setDiskDirsAndSizes(File[] diskDirs, int[] diskDirSizes) {
    if (diskDirSizes.length != diskDirs.length) {
      throw new IllegalArgumentException(
          String.format(
              "Number of diskSizes is %s which is not equal to number of disk Dirs which is %s",
              diskDirSizes.length, diskDirs.length));
    }
    verifyNonNegativeDirSize(diskDirSizes);
    checkIfDirectoriesExist(diskDirs);

    attrs.diskDirs = new File[diskDirs.length];
    System.arraycopy(diskDirs, 0, attrs.diskDirs, 0, diskDirs.length);
    attrs.diskDirSizes = new int[diskDirSizes.length];
    System.arraycopy(diskDirSizes, 0, attrs.diskDirSizes, 0, diskDirSizes.length);
    return this;
  }
Protected for testing purposes. If during the initial recovery for the disk store, an uncaught
exception is thrown, the disk store will not be in a valid state. In this case, we want to
ensure the resources of the disk store are cleaned up.
geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreFactoryImpl.java