accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmil...@apache.org
Subject accumulo git commit: ACCUMULO-2806: changed permissions of /accumulo to 700
Date Mon, 20 Mar 2017 16:56:22 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.8 dba444757 -> f02b731a2


ACCUMULO-2806: changed permissions of /accumulo to 700


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

Branch: refs/heads/1.8
Commit: f02b731a2b948266001cddb0c2ad5f1f5d25152f
Parents: dba4447
Author: Mike Miller <mmiller@apache.org>
Authored: Fri Feb 24 15:32:36 2017 -0500
Committer: Mike Miller <mmiller@apache.org>
Committed: Mon Mar 20 12:52:52 2017 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/accumulo/server/fs/VolumeManager.java  | 4 ++++
 .../java/org/apache/accumulo/server/fs/VolumeManagerImpl.java   | 5 +++++
 .../main/java/org/apache/accumulo/server/init/Initialize.java   | 3 ++-
 3 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/f02b731a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManager.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManager.java b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManager.java
index e761e4f..69f883f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManager.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManager.java
@@ -29,6 +29,7 @@ import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.Path;
 
 import com.google.common.base.Optional;
+import org.apache.hadoop.fs.permission.FsPermission;
 
 /**
  * A wrapper around multiple hadoop FileSystem objects, which are assumed to be different
volumes. This also concentrates a bunch of meta-operations like
@@ -126,6 +127,9 @@ public interface VolumeManager {
   boolean mkdirs(Path directory) throws IOException;
 
   // forward to the appropriate FileSystem object
+  boolean mkdirs(Path path, FsPermission permission) throws IOException;
+
+  // forward to the appropriate FileSystem object
   FSDataInputStream open(Path path) throws IOException;
 
   // forward to the appropriate FileSystem object, throws an exception if the paths are in
different volumes

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f02b731a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
index 116cb0c..4758421 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
@@ -274,6 +274,11 @@ public class VolumeManagerImpl implements VolumeManager {
   }
 
   @Override
+  public boolean mkdirs(Path path, FsPermission permission) throws IOException {
+    return getVolumeByPath(path).getFileSystem().mkdirs(path, permission);
+  }
+
+  @Override
   public FSDataInputStream open(Path path) throws IOException {
     return getVolumeByPath(path).getFileSystem().open(path);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f02b731a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
index 6531787..12c4a6e 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
@@ -103,6 +103,7 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.fs.permission.FsPermission;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.zookeeper.KeeperException;
@@ -402,7 +403,7 @@ public class Initialize implements KeywordExecutable {
 
   private static void initDirs(VolumeManager fs, UUID uuid, String[] baseDirs, boolean print)
throws IOException {
     for (String baseDir : baseDirs) {
-      fs.mkdirs(new Path(new Path(baseDir, ServerConstants.VERSION_DIR), "" + ServerConstants.DATA_VERSION));
+      fs.mkdirs(new Path(new Path(baseDir, ServerConstants.VERSION_DIR), "" + ServerConstants.DATA_VERSION),
new FsPermission("700"));
 
       // create an instance id
       Path iidLocation = new Path(baseDir, ServerConstants.INSTANCE_ID_DIR);


Mime
View raw message