Search in sources :

Example 1 with BlockPoolSliceStorage

use of org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage in project hadoop by apache.

the class UpgradeUtilities method createBlockPoolVersionFile.

public static void createBlockPoolVersionFile(File bpDir, StorageInfo version, String bpid) throws IOException {
    // Create block pool version files
    if (DataNodeLayoutVersion.supports(LayoutVersion.Feature.FEDERATION, version.layoutVersion)) {
        File bpCurDir = new File(bpDir, Storage.STORAGE_DIR_CURRENT);
        BlockPoolSliceStorage bpStorage = new BlockPoolSliceStorage(version, bpid);
        File versionFile = new File(bpCurDir, "VERSION");
        StorageDirectory sd = new StorageDirectory(bpDir);
        bpStorage.writeProperties(versionFile, sd);
    }
}
Also used : BlockPoolSliceStorage(org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage) StorageDirectory(org.apache.hadoop.hdfs.server.common.Storage.StorageDirectory) File(java.io.File)

Aggregations

File (java.io.File)1 StorageDirectory (org.apache.hadoop.hdfs.server.common.Storage.StorageDirectory)1 BlockPoolSliceStorage (org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage)1