hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kih...@apache.org
Subject hadoop git commit: HDFS-10617. PendingReconstructionBlocks.size() should be synchronized. Contributed by Eric Badger.
Date Thu, 14 Jul 2016 03:04:09 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 b95f1af8a -> dba8eee89


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


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/dba8eee8
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/dba8eee8
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/dba8eee8

Branch: refs/heads/branch-2
Commit: dba8eee8997f5f3665069cd4f1712c9a207391d8
Parents: b95f1af
Author: Kihwal Lee <kihwal@apache.org>
Authored: Wed Jul 13 22:03:48 2016 -0500
Committer: Kihwal Lee <kihwal@apache.org>
Committed: Wed Jul 13 22:03:48 2016 -0500

----------------------------------------------------------------------
 .../hdfs/server/blockmanagement/PendingReplicationBlocks.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/dba8eee8/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReplicationBlocks.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReplicationBlocks.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReplicationBlocks.java
index 88eaaca..1c73edf 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReplicationBlocks.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReplicationBlocks.java
@@ -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();
+    }
   } 
 
   /**


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message