You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by wa...@apache.org on 2017/05/11 21:09:52 UTC
hadoop git commit: HDFS-11757. Query StreamCapabilities when creating
balancer's lock file. Contributed by SammiChen.
Repository: hadoop
Updated Branches:
refs/heads/trunk 90cb5b463 -> 83dd14aa8
HDFS-11757. Query StreamCapabilities when creating balancer's lock file. Contributed by SammiChen.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/83dd14aa
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/83dd14aa
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/83dd14aa
Branch: refs/heads/trunk
Commit: 83dd14aa84ad697ad32c51007ac31ad39feb4288
Parents: 90cb5b4
Author: Andrew Wang <wa...@apache.org>
Authored: Thu May 11 14:09:44 2017 -0700
Committer: Andrew Wang <wa...@apache.org>
Committed: Thu May 11 14:09:49 2017 -0700
----------------------------------------------------------------------
.../apache/hadoop/hdfs/server/balancer/NameNodeConnector.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/83dd14aa/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/NameNodeConnector.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/NameNodeConnector.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/NameNodeConnector.java
index 88e40ee..e1b1005 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/NameNodeConnector.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/NameNodeConnector.java
@@ -41,6 +41,7 @@ import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.FsServerDefaults;
import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.fs.StreamCapabilities.StreamCapability;
import org.apache.hadoop.hdfs.DistributedFileSystem;
import org.apache.hadoop.hdfs.NameNodeProxies;
import org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException;
@@ -250,8 +251,10 @@ public class NameNodeConnector implements Closeable {
.setFlags(EnumSet.of(CreateFlag.CREATE))
.build();
- Preconditions.checkState(!fs.getFileStatus(idPath).isErasureCoded(),
- "Id File should be a replicate file");
+ Preconditions.checkState(
+ fsout.hasCapability(StreamCapability.HFLUSH.getValue())
+ && fsout.hasCapability(StreamCapability.HSYNC.getValue()),
+ "Id lock file should support hflush and hsync");
// mark balancer idPath to be deleted during filesystem closure
fs.deleteOnExit(idPath);
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org