org.apache.hadoop.hdfs.server.namenode
Class FSImageFormat.Loader

java.lang.Object
  extended by org.apache.hadoop.hdfs.server.namenode.FSImageFormat.Loader
Enclosing class:
org.apache.hadoop.hdfs.server.namenode.FSImageFormat

public static class FSImageFormat.Loader
extends Object

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
 org.apache.hadoop.io.MD5Hash getLoadedImageMd5()
          Return the MD5 checksum of the image that has been loaded.
 long getLoadedImageTxId()
           
 org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot getSnapshot(DataInput in)
           
 void load(File curFile)
           
 org.apache.hadoop.hdfs.server.namenode.INodeDirectoryAttributes loadINodeDirectoryAttributes(DataInput in)
           
 org.apache.hadoop.hdfs.server.namenode.INodeFileAttributes loadINodeFileAttributes(DataInput in)
          Load INodeFileAttributes.
 org.apache.hadoop.hdfs.server.namenode.INode loadINodeWithLocalName(boolean isSnapshotINode, DataInput in, boolean updateINodeMap)
           
 org.apache.hadoop.hdfs.server.namenode.INode loadINodeWithLocalName(boolean isSnapshotINode, DataInput in, boolean updateINodeMap, StartupProgress.Counter counter)
           
 void updateBlocksMap(org.apache.hadoop.hdfs.server.namenode.INodeFile file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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

public void load(File curFile)
          throws IOException
Throws:
IOException

updateBlocksMap

public void updateBlocksMap(org.apache.hadoop.hdfs.server.namenode.INodeFile file)

loadINodeWithLocalName

public org.apache.hadoop.hdfs.server.namenode.INode loadINodeWithLocalName(boolean isSnapshotINode,
                                                                           DataInput in,
                                                                           boolean updateINodeMap)
                                                                    throws IOException
Throws:
IOException

loadINodeWithLocalName

public org.apache.hadoop.hdfs.server.namenode.INode loadINodeWithLocalName(boolean isSnapshotINode,
                                                                           DataInput in,
                                                                           boolean updateINodeMap,
                                                                           StartupProgress.Counter counter)
                                                                    throws IOException
Throws:
IOException

loadINodeFileAttributes

public org.apache.hadoop.hdfs.server.namenode.INodeFileAttributes loadINodeFileAttributes(DataInput in)
                                                                                   throws IOException
Load INodeFileAttributes.

Throws:
IOException

loadINodeDirectoryAttributes

public org.apache.hadoop.hdfs.server.namenode.INodeDirectoryAttributes loadINodeDirectoryAttributes(DataInput in)
                                                                                             throws IOException
Throws:
IOException

getSnapshot

public org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot getSnapshot(DataInput in)
                                                                     throws IOException
Throws:
IOException


Copyright © 2014 Apache Software Foundation. All Rights Reserved.