HDFS-10617. PendingReconstructionBlocks.size() should be synchronized. Contributed by Eric Badger.

This commit is contained in:
Kihwal Lee 2016-07-13 22:03:48 -05:00
parent b95f1af8a9
commit dba8eee899
1 changed files with 3 additions and 1 deletions

View File

@ -134,7 +134,9 @@ class PendingReplicationBlocks {
* The total number of blocks that are undergoing replication
*/
int size() {
return pendingReplications.size();
synchronized(pendingReplications) {
return pendingReplications.size();
}
}
/**