コード例 #1
0
 @Override
 public String dumpDatanode() {
   StringBuilder sb = new StringBuilder(super.dumpDatanode());
   int repl = replicateBlocks.size();
   if (repl > 0) {
     sb.append(" ").append(repl).append(" blocks to be replicated;");
   }
   int inval = invalidateBlocks.size();
   if (inval > 0) {
     sb.append(" ").append(inval).append(" blocks to be invalidated;");
   }
   int recover = recoverBlocks.size();
   if (recover > 0) {
     sb.append(" ").append(recover).append(" blocks to be recovered;");
   }
   return sb.toString();
 }
コード例 #2
0
 /** The number of work items that are pending to be replicated */
 int getNumberOfBlocksToBeReplicated() {
   return PendingReplicationWithoutTargets + replicateBlocks.size();
 }