hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sj...@apache.org
Subject [24/50] hadoop git commit: HDFS-10617. PendingReconstructionBlocks.size() should be synchronized. Contributed by Eric Badger.
Date Sat, 16 Jul 2016 03:21:45 GMT
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/2bbc3ea1
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/2bbc3ea1
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/2bbc3ea1

Branch: refs/heads/YARN-5355
Commit: 2bbc3ea1b54c25c28eb04caa48dece5cfc19d613
Parents: 728bf7f
Author: Kihwal Lee <kihwal@apache.org>
Authored: Wed Jul 13 21:59:35 2016 -0500
Committer: Kihwal Lee <kihwal@apache.org>
Committed: Wed Jul 13 21:59:35 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/hadoop/blob/2bbc3ea1/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReconstructionBlocks.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReconstructionBlocks.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReconstructionBlocks.java
index 956e94f..6628c43 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReconstructionBlocks.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReconstructionBlocks.java
@@ -134,7 +134,9 @@ class PendingReconstructionBlocks {
    * The total number of blocks that are undergoing reconstruction.
    */
   int size() {
-    return pendingReconstructions.size();
+    synchronized (pendingReconstructions) {
+      return pendingReconstructions.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