HDFS-8969. Clean up findbugs warnings for HDFS-8823 and HDFS-8932. Contributed by Anu Engineer.

This commit is contained in:
Haohui Mai 2015-08-27 13:03:16 -07:00
parent 7a668981f5
commit 1b01d163a2
3 changed files with 5 additions and 4 deletions

View File

@ -896,6 +896,9 @@ Release 2.8.0 - UNRELEASED
HDFS-8961. Investigate lock issue in o.a.h.hdfs.shortcircuit.
DfsClientShmManager.EndpointShmManager. (Mingliang Liu via wheat9)
HDFS-8969. Clean up findbugs warnings for HDFS-8823 and HDFS-8932.
(Anu Engineer via wheat9)
Release 2.7.2 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -1651,7 +1651,7 @@ private JournalManager createJournal(URI uri) {
* Return total number of syncs happened on this edit log.
* @return long - count
*/
public long getTotalSyncCount() {
public synchronized long getTotalSyncCount() {
if (editLogStream != null) {
return editLogStream.getNumSync();
} else {

View File

@ -252,9 +252,7 @@ public void blockIdCK(String blockId) {
NumberReplicas numberReplicas= bm.countNodes(blockInfo);
out.println("Block Id: " + blockId);
out.println("Block belongs to: "+iNode.getFullPathName());
if (blockInfo != null) {
out.println("No. of Expected Replica: " + blockInfo.getReplication());
}
out.println("No. of Expected Replica: " + blockInfo.getReplication());
out.println("No. of live Replica: " + numberReplicas.liveReplicas());
out.println("No. of excess Replica: " + numberReplicas.excessReplicas());
out.println("No. of stale Replica: " +