@InterfaceAudience.Private public class BlockPoolSliceStorage extends Storage
Storage
Storage.FormatConfirmable, Storage.StorageDirectory, Storage.StorageDirType, Storage.StorageState
LAST_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, storageType
clusterID, 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, writeProperties
getClusterID, getCTime, getLayoutVersion, getNamespaceID, setStorageInfo, toColonSeparatedString, versionSupportsFederation
public BlockPoolSliceStorage(StorageInfo storageInfo, String bpid)
protected void setPropertiesFromFields(Properties props, Storage.StorageDirectory sd) throws IOException
setPropertiesFromFields
in class Storage
props
- the Properties object to write intoIOException
protected void setFieldsFromProperties(Properties props, Storage.StorageDirectory sd) throws IOException
Storage
setFieldsFromProperties
in class Storage
IOException
public String toString()
toString
in class StorageInfo
public static File getBpRoot(String bpID, File dnCurDir)
bpID
- block pool IDdnCurDir
- data node storage root directorypublic boolean isPreUpgradableLayout(Storage.StorageDirectory sd) throws IOException
Storage
isPreUpgradableLayout
in class Storage
IOException
Copyright © 2013 Apache Software Foundation. All rights reserved.