org.apache.hadoop.dfs
Class NamenodeFsck.FsckResult

java.lang.Object
  extended by org.apache.hadoop.dfs.NamenodeFsck.FsckResult
Enclosing class:
NamenodeFsck

public static class NamenodeFsck.FsckResult
extends Object

FsckResult of checking, plus overall DFS statistics.


Constructor Summary
NamenodeFsck.FsckResult()
           
 
Method Summary
 void addMissing(String id, long size)
          Add a missing block name, plus its size.
 long getCorruptFiles()
          Return the number of currupted files.
 long getExcessiveReplicas()
          Return the number of over-replicated blocks.
 ArrayList<String> getMissingIds()
          Return a list of missing block names (as list of Strings).
 long getMissingReplicas()
          Return the number of under-replicated blocks.
 long getMissingSize()
          Return total size of missing data, in bytes.
 int getReplication()
          Return the intended replication factor, against which the over/under- replicated blocks are counted.
 float getReplicationFactor()
          Return the actual replication factor.
 long getTotalBlocks()
          Return the total number of blocks in the scanned area.
 long getTotalDirs()
          Return total number of directories encountered during this scan.
 long getTotalFiles()
          Return total number of files encountered during this scan.
 long getTotalOpenFiles()
          Return total number of files opened for write encountered during this scan.
 long getTotalOpenFilesBlocks()
          Return the total number of blocks held by open files.
 long getTotalOpenFilesSize()
          Return total size of open files data, in bytes.
 long getTotalSize()
          Return total size of scanned data, in bytes.
 boolean isHealthy()
          DFS is considered healthy if there are no missing blocks.
 void setCorruptFiles(long corruptFiles)
           
 void setExcessiveReplicas(long overReplicatedBlocks)
           
 void setMissingReplicas(long underReplicatedBlocks)
           
 void setMissingSize(long missingSize)
           
 void setReplication(int replication)
           
 void setTotalBlocks(long totalBlocks)
           
 void setTotalDirs(long totalDirs)
           
 void setTotalFiles(long totalFiles)
           
 void setTotalOpenFiles(long totalOpenFiles)
          Set total number of open files encountered during this scan.
 void setTotalOpenFilesBlocks(long totalOpenFilesBlocks)
           
 void setTotalOpenFilesSize(long totalOpenFilesSize)
           
 void setTotalSize(long totalSize)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamenodeFsck.FsckResult

public NamenodeFsck.FsckResult()
Method Detail

isHealthy

public boolean isHealthy()
DFS is considered healthy if there are no missing blocks.


addMissing

public void addMissing(String id,
                       long size)
Add a missing block name, plus its size.


getMissingIds

public ArrayList<String> getMissingIds()
Return a list of missing block names (as list of Strings).


getMissingSize

public long getMissingSize()
Return total size of missing data, in bytes.


setMissingSize

public void setMissingSize(long missingSize)

getExcessiveReplicas

public long getExcessiveReplicas()
Return the number of over-replicated blocks.


setExcessiveReplicas

public void setExcessiveReplicas(long overReplicatedBlocks)

getReplicationFactor

public float getReplicationFactor()
Return the actual replication factor.


getMissingReplicas

public long getMissingReplicas()
Return the number of under-replicated blocks. Note: missing blocks are not counted here.


setMissingReplicas

public void setMissingReplicas(long underReplicatedBlocks)

getTotalDirs

public long getTotalDirs()
Return total number of directories encountered during this scan.


setTotalDirs

public void setTotalDirs(long totalDirs)

getTotalFiles

public long getTotalFiles()
Return total number of files encountered during this scan.


setTotalFiles

public void setTotalFiles(long totalFiles)

getTotalOpenFiles

public long getTotalOpenFiles()
Return total number of files opened for write encountered during this scan.


setTotalOpenFiles

public void setTotalOpenFiles(long totalOpenFiles)
Set total number of open files encountered during this scan.


getTotalSize

public long getTotalSize()
Return total size of scanned data, in bytes.


setTotalSize

public void setTotalSize(long totalSize)

getTotalOpenFilesSize

public long getTotalOpenFilesSize()
Return total size of open files data, in bytes.


setTotalOpenFilesSize

public void setTotalOpenFilesSize(long totalOpenFilesSize)

getReplication

public int getReplication()
Return the intended replication factor, against which the over/under- replicated blocks are counted. Note: this values comes from the current Configuration supplied for the tool, so it may be different from the value in DFS Configuration.


setReplication

public void setReplication(int replication)

getTotalBlocks

public long getTotalBlocks()
Return the total number of blocks in the scanned area.


setTotalBlocks

public void setTotalBlocks(long totalBlocks)

getTotalOpenFilesBlocks

public long getTotalOpenFilesBlocks()
Return the total number of blocks held by open files.


setTotalOpenFilesBlocks

public void setTotalOpenFilesBlocks(long totalOpenFilesBlocks)

toString

public String toString()
Overrides:
toString in class Object

getCorruptFiles

public long getCorruptFiles()
Return the number of currupted files.


setCorruptFiles

public void setCorruptFiles(long corruptFiles)


Copyright © 2008 The Apache Software Foundation