Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 1edc16ee5 -> 561b72970


HDFS-12137. DN dataset lock should be fair. Contributed by Daryn Sharp.

(cherry picked from commit a47820d72a4c4aba857fd7325fa9ae9a95fe8faa)

Conflicts:
        
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java


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

Branch: refs/heads/branch-2.8
Commit: 561b72970f4bab0cb9edd7d1366a7ff8780a13ff
Parents: 1edc16e
Author: Kihwal Lee <kih...@apache.org>
Authored: Fri Jul 14 15:50:18 2017 -0500
Committer: Kihwal Lee <kih...@apache.org>
Committed: Fri Jul 14 15:50:18 2017 -0500

----------------------------------------------------------------------
 .../hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java  | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/561b7297/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
----------------------------------------------------------------------
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
index bdabb45..e6edf7c 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
@@ -127,6 +127,7 @@ import org.apache.hadoop.util.Time;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
+import java.util.concurrent.locks.ReentrantLock;
 
 /**************************************************
  * FSDataset manages a set of data blocks.  Each block
@@ -287,6 +288,7 @@ class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl> {
     this.smallBufferSize = DFSUtilClient.getSmallBufferSize(conf);
     this.datasetLock = new AutoCloseableLock(
         new InstrumentedLock(getClass().getName(), LOG,
+          new ReentrantLock(true),
           conf.getTimeDuration(
             DFSConfigKeys.DFS_LOCK_SUPPRESS_WARNING_INTERVAL_KEY,
             DFSConfigKeys.DFS_LOCK_SUPPRESS_WARNING_INTERVAL_DEFAULT,


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

Reply via email to