HDFS-6578: Merging r1604942 from trunk to branch-2.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1604943 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dd90472574
commit
fccacfb212
|
@ -210,6 +210,9 @@ Release 2.5.0 - UNRELEASED
|
|||
HDFS-6507. Improve DFSAdmin to support HA cluster better.
|
||||
(Zesheng Wu via vinayakumarb)
|
||||
|
||||
HDFS-6578. add toString method to DatanodeStorage for easier debugging.
|
||||
(Yongjun Zhang via Arpit Agarwal)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HDFS-6214. Webhdfs has poor throughput for files >2GB (daryn)
|
||||
|
|
|
@ -1752,6 +1752,7 @@ public class BlockManager {
|
|||
}
|
||||
blockLog.info("BLOCK* processReport: from storage " + storage.getStorageID()
|
||||
+ " node " + nodeID + ", blocks: " + newReport.getNumberOfBlocks()
|
||||
+ ", hasStaleStorages: " + node.hasStaleStorages()
|
||||
+ ", processing time: " + (endTime - startTime) + " msecs");
|
||||
return !node.hasStaleStorages();
|
||||
}
|
||||
|
|
|
@ -1041,6 +1041,11 @@ class NameNodeRpcServer implements NamenodeProtocols {
|
|||
boolean noStaleStorages = false;
|
||||
for(StorageBlockReport r : reports) {
|
||||
final BlockListAsLongs blocks = new BlockListAsLongs(r.getBlocks());
|
||||
//
|
||||
// BlockManager.processReport accumulates information of prior calls
|
||||
// for the same node and storage, so the value returned by the last
|
||||
// call of this loop is the final updated value for noStaleStorage.
|
||||
//
|
||||
noStaleStorages = bm.processReport(nodeReg, r.getStorage(), poolId, blocks);
|
||||
metrics.incrStorageBlockReportOps();
|
||||
}
|
||||
|
|
|
@ -81,6 +81,11 @@ public class DatanodeStorage {
|
|||
return "DS-" + UUID.randomUUID();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DatanodeStorage["+ storageID + "," + storageType + "," + state +"]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other){
|
||||
if (other == this) {
|
||||
|
|
Loading…
Reference in New Issue