Class FSImageFormat.Loader
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.FSImageFormat.Loader
- Enclosing class:
- FSImageFormat
A one-shot class responsible for loading an image. The load() function
should be called once, after which the getter methods may be used to retrieve
information about the image that was loaded, if loading was successful.
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.io.MD5HashReturn the MD5 checksum of the image that has been loaded.longgetSnapshot(DataInput in) voidLoadINodeFileAttributes.loadINodeWithLocalName(boolean isSnapshotINode, DataInput in, boolean updateINodeMap) loadINodeWithLocalName(boolean isSnapshotINode, DataInput in, boolean updateINodeMap, StartupProgress.Counter counter) voidupdateBlocksMap(INodeFile file)
-
Method Details
-
getLoadedImageMd5
public org.apache.hadoop.io.MD5Hash getLoadedImageMd5()Return the MD5 checksum of the image that has been loaded.- Throws:
IllegalStateException- if load() has not yet been called.
-
getLoadedImageTxId
public long getLoadedImageTxId() -
load
- Throws:
IOException
-
updateBlocksMap
-
getFSDirectoryInLoading
- Returns:
- The FSDirectory of the namesystem where the fsimage is loaded
-
loadINodeWithLocalName
public INode loadINodeWithLocalName(boolean isSnapshotINode, DataInput in, boolean updateINodeMap) throws IOException - Throws:
IOException
-
loadINodeWithLocalName
public INode loadINodeWithLocalName(boolean isSnapshotINode, DataInput in, boolean updateINodeMap, StartupProgress.Counter counter) throws IOException - Throws:
IOException
-
loadINodeFileAttributes
LoadINodeFileAttributes.- Throws:
IOException
-
loadINodeDirectoryAttributes
- Throws:
IOException
-
getSnapshot
- Throws:
IOException
-