org.apache.hadoop.dfs
Class NamenodeFsck.FsckResult

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

public class NamenodeFsck.FsckResult
extends Object

FsckResult of checking, plus overall DFS statistics.

Author:
Andrzej Bialecki

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.
 ArrayList<String> getMissingIds()
          Return a list of missing block names (as list of Strings).
 long getMissingSize()
          Return total size of missing data, in bytes.
 long getOverReplicatedBlocks()
          Return the number of over-replicated blocks.
 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 getTotalSize()
          Return total size of scanned data, in bytes.
 long getUnderReplicatedBlocks()
          Return the number of under-replicated blocks.
 boolean isHealthy()
          DFS is considered healthy if there are no missing blocks.
 void setCorruptFiles(long corruptFiles)
           
 void setMissingSize(long missingSize)
           
 void setOverReplicatedBlocks(long overReplicatedBlocks)
           
 void setReplication(int replication)
           
 void setTotalBlocks(long totalBlocks)
           
 void setTotalDirs(long totalDirs)
           
 void setTotalFiles(long totalFiles)
           
 void setTotalSize(long totalSize)
           
 void setUnderReplicatedBlocks(long underReplicatedBlocks)
           
 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)

getOverReplicatedBlocks

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


setOverReplicatedBlocks

public void setOverReplicatedBlocks(long overReplicatedBlocks)

getReplicationFactor

public float getReplicationFactor()
Return the actual replication factor.


getUnderReplicatedBlocks

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


setUnderReplicatedBlocks

public void setUnderReplicatedBlocks(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)

getTotalSize

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


setTotalSize

public void setTotalSize(long totalSize)

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)

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 © 2006 The Apache Software Foundation