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 ey...@apache.org on 2019/10/04 17:16:33 UTC
[hadoop] branch branch-3.2 updated: HDFS-14890. Fixed namenode and
journalnode startup on Windows. Contributed by Siddharth Wagle
This is an automated email from the ASF dual-hosted git repository.
eyang pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new 8bb2b00 HDFS-14890. Fixed namenode and journalnode startup on Windows. Contributed by Siddharth Wagle
8bb2b00 is described below
commit 8bb2b00d38978859b22b892034eb3f559b820942
Author: Eric Yang <ey...@apache.org>
AuthorDate: Fri Oct 4 13:13:10 2019 -0400
HDFS-14890. Fixed namenode and journalnode startup on Windows.
Contributed by Siddharth Wagle
(cherry picked from commit aa24add8f0e9812d1f787efb3c40155b0fdeed9c)
---
.../java/org/apache/hadoop/hdfs/server/common/Storage.java | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java
index 2ba943a..e7da44e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java
@@ -447,9 +447,14 @@ public abstract class Storage extends StorageInfo {
throw new IOException("Cannot create directory " + curDir);
}
if (permission != null) {
- Set<PosixFilePermission> permissions =
- PosixFilePermissions.fromString(permission.toString());
- Files.setPosixFilePermissions(curDir.toPath(), permissions);
+ try {
+ Set<PosixFilePermission> permissions =
+ PosixFilePermissions.fromString(permission.toString());
+ Files.setPosixFilePermissions(curDir.toPath(), permissions);
+ } catch (UnsupportedOperationException uoe) {
+ // Default to FileUtil for non posix file systems
+ FileUtil.setPermission(curDir, permission);
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org