org.apache.hadoop.hdfs.server.datanode
Class DataStorage
java.lang.Object
org.apache.hadoop.hdfs.server.common.StorageInfo
org.apache.hadoop.hdfs.server.common.Storage
org.apache.hadoop.hdfs.server.datanode.DataStorage
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable
@InterfaceAudience.Private
public class DataStorage
- extends Storage
Data storage information file.
- See Also:
Storage
Methods inherited from class org.apache.hadoop.hdfs.server.common.Storage |
addStorageDir, checkVersionUpgradable, deleteDir, dirIterator, dirIterator, getBuildVersion, getNumStorageDirs, getRegistrationID, getStorageDir, is203LayoutVersion, isLockSupported, listStorageDirectories, rename, unlockAll, writeAll |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataStorage
public DataStorage(StorageInfo storageInfo,
String strgID)
getStorageID
public String getStorageID()
setFields
protected void setFields(Properties props,
Storage.StorageDirectory sd)
throws IOException
- Description copied from class:
Storage
- Set common storage fields.
Should be overloaded if additional fields need to be set.
- Overrides:
setFields
in class Storage
- Throws:
IOException
getFields
protected void getFields(Properties props,
Storage.StorageDirectory sd)
throws IOException
- Description copied from class:
Storage
- Get common storage fields.
Should be overloaded if additional fields need to be get.
- Overrides:
getFields
in class Storage
- Throws:
IOException
isPreUpgradableLayout
public boolean isPreUpgradableLayout(Storage.StorageDirectory sd)
throws IOException
- Description copied from class:
Storage
- 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.
- Specified by:
isPreUpgradableLayout
in class Storage
- Throws:
IOException
Copyright © 2009 The Apache Software Foundation