@InterfaceAudience.Private public class BlockPoolSliceStorage extends Storage
StorageStorage.FormatConfirmable, Storage.StorageDirectory, Storage.StorageDirType, Storage.StorageStateLAST_PRE_UPGRADE_LAYOUT_VERSION, LAST_UPGRADABLE_HADOOP_VERSION, LAST_UPGRADABLE_LAYOUT_VERSION, LAYOUT_VERSIONS_203, LOG, STORAGE_1_BBW, STORAGE_DIR_CURRENT, STORAGE_DIR_PREVIOUS, STORAGE_FILE_LOCK, STORAGE_FILE_VERSION, STORAGE_PREVIOUS_CKPT, STORAGE_TMP_FINALIZED, STORAGE_TMP_LAST_CKPT, STORAGE_TMP_PREVIOUS, STORAGE_TMP_REMOVED, storageDirs, storageTypeclusterID, cTime, layoutVersion, namespaceID| Constructor and Description |
|---|
BlockPoolSliceStorage(StorageInfo storageInfo,
String bpid) |
| Modifier and Type | Method and Description |
|---|---|
static File |
getBpRoot(String bpID,
File dnCurDir)
Get a block pool storage root based on data node storage root
|
boolean |
isPreUpgradableLayout(Storage.StorageDirectory sd)
Return true if the layout of the given storage directory is from a version
of Hadoop prior to the introduction of the "current" and "previous"
directories which allow upgrade and rollback.
|
protected void |
setFieldsFromProperties(Properties props,
Storage.StorageDirectory sd)
Get common storage fields.
|
protected void |
setPropertiesFromFields(Properties props,
Storage.StorageDirectory sd)
Set layoutVersion, namespaceID and blockpoolID into block pool storage
VERSION file
|
String |
toString() |
addStorageDir, checkVersionUpgradable, confirmFormat, deleteDir, dirIterable, dirIterator, dirIterator, getBuildVersion, getFiles, getNumStorageDirs, getRegistrationID, getSingularStorageDir, getStorageDir, is203LayoutVersion, listStorageDirectories, readPreviousVersionProperties, readProperties, readPropertiesFile, rename, setClusterId, setcTime, setLayoutVersion, setNamespaceID, setStorageType, unlockAll, writeAll, writeProperties, writePropertiesgetClusterID, getCTime, getLayoutVersion, getNamespaceID, setStorageInfo, toColonSeparatedString, versionSupportsFederationpublic BlockPoolSliceStorage(StorageInfo storageInfo, String bpid)
protected void setPropertiesFromFields(Properties props, Storage.StorageDirectory sd) throws IOException
setPropertiesFromFields in class Storageprops - the Properties object to write intoIOExceptionprotected void setFieldsFromProperties(Properties props, Storage.StorageDirectory sd) throws IOException
StoragesetFieldsFromProperties in class StorageIOExceptionpublic String toString()
toString in class StorageInfopublic static File getBpRoot(String bpID, File dnCurDir)
bpID - block pool IDdnCurDir - data node storage root directorypublic boolean isPreUpgradableLayout(Storage.StorageDirectory sd) throws IOException
StorageisPreUpgradableLayout in class StorageIOExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.