@InterfaceAudience.Private public class DataStorage extends Storage
StorageStorage.FormatConfirmable, Storage.StorageDirectory, Storage.StorageDirType, Storage.StorageState| Modifier and Type | Field and Description |
|---|---|
static String |
BLOCK_SUBDIR_PREFIX |
static String |
STORAGE_DIR_FINALIZED |
static String |
STORAGE_DIR_RBW |
static String |
STORAGE_DIR_TMP |
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, storageTypeclusterID, cTime, layoutVersion, namespaceID| Constructor and Description |
|---|
DataStorage(StorageInfo storageInfo,
String strgID) |
| Modifier and Type | Method and Description |
|---|---|
void |
createStorageID(int datanodePort)
Create an ID for this storage.
|
StorageInfo |
getBPStorage(String bpid) |
String |
getStorageID() |
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 common storage fields into the given properties object.
|
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, toString, versionSupportsFederationpublic static final String BLOCK_SUBDIR_PREFIX
public static final String STORAGE_DIR_RBW
public static final String STORAGE_DIR_FINALIZED
public static final String STORAGE_DIR_TMP
public DataStorage(StorageInfo storageInfo, String strgID)
public StorageInfo getBPStorage(String bpid)
public String getStorageID()
public void createStorageID(int datanodePort)
protected void setPropertiesFromFields(Properties props, Storage.StorageDirectory sd) throws IOException
StoragesetPropertiesFromFields in class Storageprops - the Properties object to write intoIOExceptionprotected void setFieldsFromProperties(Properties props, Storage.StorageDirectory sd) throws IOException
StoragesetFieldsFromProperties in class StorageIOExceptionpublic boolean isPreUpgradableLayout(Storage.StorageDirectory sd) throws IOException
StorageisPreUpgradableLayout in class StorageIOExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.