HDFS-10617. PendingReconstructionBlocks.size() should be synchronized. Contributed by Eric Badger.
This commit is contained in:
parent
b95f1af8a9
commit
dba8eee899
@ -134,7 +134,9 @@ public void clear() {
|
|||||||
* The total number of blocks that are undergoing replication
|
* The total number of blocks that are undergoing replication
|
||||||
*/
|
*/
|
||||||
int size() {
|
int size() {
|
||||||
return pendingReplications.size();
|
synchronized(pendingReplications) {
|
||||||
|
return pendingReplications.size();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user