hbase git commit: HBASE-20689 Docker fails to install rubocop for precommit

2018-06-06 Thread psomogyi
Repository: hbase
Updated Branches:
  refs/heads/branch-2.0 5e1c9fcd0 -> 6f01af003


HBASE-20689 Docker fails to install rubocop for precommit

Signed-off-by: Mike Drob 
Signed-off-by: Josh Elser 


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

Branch: refs/heads/branch-2.0
Commit: 6f01af003a8c9321dec022a3648456f5cee543e0
Parents: 5e1c9fc
Author: Peter Somogyi 
Authored: Wed Jun 6 17:05:17 2018 +0200
Committer: Peter Somogyi 
Committed: Wed Jun 6 23:53:15 2018 +0200

--
 dev-support/docker/Dockerfile | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/6f01af00/dev-support/docker/Dockerfile
--
diff --git a/dev-support/docker/Dockerfile b/dev-support/docker/Dockerfile
index 0299fd3..cc1efc1 100644
--- a/dev-support/docker/Dockerfile
+++ b/dev-support/docker/Dockerfile
@@ -27,7 +27,11 @@ RUN apt-get -q update && apt-get -q install 
--no-install-recommends -y \
pylint \
python-dateutil \
rsync \
+   make \
+   gcc \
+   libc6-dev \
ruby \
+   ruby-dev \
shellcheck \
wget \
&& \



hbase git commit: HBASE-20689 Docker fails to install rubocop for precommit

2018-06-06 Thread psomogyi
Repository: hbase
Updated Branches:
  refs/heads/branch-2 00289b8ff -> 42ca97680


HBASE-20689 Docker fails to install rubocop for precommit

Signed-off-by: Mike Drob 
Signed-off-by: Josh Elser 


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

Branch: refs/heads/branch-2
Commit: 42ca97680384ad833f9e3376ae671768c20dc38c
Parents: 00289b8
Author: Peter Somogyi 
Authored: Wed Jun 6 17:05:17 2018 +0200
Committer: Peter Somogyi 
Committed: Wed Jun 6 23:51:47 2018 +0200

--
 dev-support/docker/Dockerfile | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/42ca9768/dev-support/docker/Dockerfile
--
diff --git a/dev-support/docker/Dockerfile b/dev-support/docker/Dockerfile
index 0299fd3..cc1efc1 100644
--- a/dev-support/docker/Dockerfile
+++ b/dev-support/docker/Dockerfile
@@ -27,7 +27,11 @@ RUN apt-get -q update && apt-get -q install 
--no-install-recommends -y \
pylint \
python-dateutil \
rsync \
+   make \
+   gcc \
+   libc6-dev \
ruby \
+   ruby-dev \
shellcheck \
wget \
&& \



hbase git commit: HBASE-20689 Docker fails to install rubocop for precommit

2018-06-06 Thread psomogyi
Repository: hbase
Updated Branches:
  refs/heads/master 1413522f6 -> b002b0b8b


HBASE-20689 Docker fails to install rubocop for precommit

Signed-off-by: Mike Drob 
Signed-off-by: Josh Elser 


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

Branch: refs/heads/master
Commit: b002b0b8b0d94658fab2c2904eb2d8730b13b366
Parents: 1413522
Author: Peter Somogyi 
Authored: Wed Jun 6 17:05:17 2018 +0200
Committer: Peter Somogyi 
Committed: Wed Jun 6 23:51:07 2018 +0200

--
 dev-support/docker/Dockerfile | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b002b0b8/dev-support/docker/Dockerfile
--
diff --git a/dev-support/docker/Dockerfile b/dev-support/docker/Dockerfile
index 0299fd3..cc1efc1 100644
--- a/dev-support/docker/Dockerfile
+++ b/dev-support/docker/Dockerfile
@@ -27,7 +27,11 @@ RUN apt-get -q update && apt-get -q install 
--no-install-recommends -y \
pylint \
python-dateutil \
rsync \
+   make \
+   gcc \
+   libc6-dev \
ruby \
+   ruby-dev \
shellcheck \
wget \
&& \



[1/4] hbase git commit: HBASE-20605 Excludes Azure's new filesystem from the SecureBulkLoadEndpoint perm check

2018-06-06 Thread elserj
Repository: hbase
Updated Branches:
  refs/heads/branch-1 409531209 -> c596fb6c3
  refs/heads/branch-1.2 35a19c5cf -> 96e8ab4af
  refs/heads/branch-1.3 bc2d66892 -> 685906c8f
  refs/heads/branch-1.4 8c4a66fc5 -> 7eee2f7f0


HBASE-20605 Excludes Azure's new filesystem from the SecureBulkLoadEndpoint 
perm check

Signed-off-by: Ted Yu 


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

Branch: refs/heads/branch-1
Commit: c596fb6c3f751f19165ea1259af53254cd2ba15d
Parents: 4095312
Author: Josh Elser 
Authored: Sat May 19 00:17:08 2018 -0400
Committer: Josh Elser 
Committed: Wed Jun 6 16:23:51 2018 -0400

--
 .../security/access/SecureBulkLoadEndpoint.java | 15 -
 .../access/TestSecureBulkLoadEndpoint.java  | 64 
 2 files changed, 77 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c596fb6c/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
index 68f31cc..d32c987 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
@@ -22,6 +22,7 @@ import com.google.protobuf.RpcCallback;
 import com.google.protobuf.RpcController;
 import com.google.protobuf.Service;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
@@ -119,7 +120,11 @@ public class SecureBulkLoadEndpoint extends 
SecureBulkLoadService
 
   private final static FsPermission PERM_ALL_ACCESS = 
FsPermission.valueOf("-rwxrwxrwx");
   private final static FsPermission PERM_HIDDEN = 
FsPermission.valueOf("-rwx--x--x");
-  private final static String[] FsWithoutSupportPermission = {"s3", "s3a", 
"s3n", "wasb", "wasbs", "swift"};
+
+  public static final String FS_WITHOUT_SUPPORT_PERMISSION_KEY =
+  "hbase.secure.bulkload.fs.permission.lacking";
+  public static final String FS_WITHOUT_SUPPORT_PERMISSION_DEFAULT =
+  "s3,s3a,s3n,wasb,wasbs,swift,adfs,abfs,viewfs";
 
   private SecureRandom random;
   private FileSystem fs;
@@ -143,7 +148,7 @@ public class SecureBulkLoadEndpoint extends 
SecureBulkLoadService
 conf = env.getConfiguration();
 baseStagingDir = SecureBulkLoadUtil.getBaseStagingDir(conf);
 this.userProvider = UserProvider.instantiate(conf);
-Set fsSet = new 
HashSet(Arrays.asList(FsWithoutSupportPermission));
+Set fsSet = getFileSystemSchemesWithoutPermissionSupport(conf);
 
 try {
   fs = baseStagingDir.getFileSystem(conf);
@@ -179,6 +184,12 @@ public class SecureBulkLoadEndpoint extends 
SecureBulkLoadService
 }
   }
 
+  Set getFileSystemSchemesWithoutPermissionSupport(Configuration conf) 
{
+final String value = conf.get(
+FS_WITHOUT_SUPPORT_PERMISSION_KEY, 
FS_WITHOUT_SUPPORT_PERMISSION_DEFAULT);
+return new HashSet(Arrays.asList(StringUtils.split(value, ',')));
+  }
+
   @Override
   public void stop(CoprocessorEnvironment env) throws IOException {
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/c596fb6c/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestSecureBulkLoadEndpoint.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestSecureBulkLoadEndpoint.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestSecureBulkLoadEndpoint.java
new file mode 100644
index 000..d10d966
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestSecureBulkLoadEndpoint.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 

[3/4] hbase git commit: HBASE-20605 Excludes Azure's new filesystem from the SecureBulkLoadEndpoint perm check

2018-06-06 Thread elserj
HBASE-20605 Excludes Azure's new filesystem from the SecureBulkLoadEndpoint 
perm check

Signed-off-by: Ted Yu 


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

Branch: refs/heads/branch-1.3
Commit: 685906c8f6510d1bf3727742a6844ccfd310c555
Parents: bc2d668
Author: Josh Elser 
Authored: Sat May 19 00:17:08 2018 -0400
Committer: Josh Elser 
Committed: Wed Jun 6 17:26:06 2018 -0400

--
 .../security/access/SecureBulkLoadEndpoint.java | 16 +
 .../access/TestSecureBulkLoadEndpoint.java  | 64 
 2 files changed, 80 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/685906c8/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
index 349747a..fc2baaf 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
@@ -22,6 +22,7 @@ import com.google.protobuf.RpcCallback;
 import com.google.protobuf.RpcController;
 import com.google.protobuf.Service;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
@@ -69,9 +70,12 @@ import java.math.BigInteger;
 import java.security.PrivilegedAction;
 import java.security.SecureRandom;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 /**
  * Coprocessor service for bulk loads in secure mode.
@@ -114,6 +118,11 @@ public class SecureBulkLoadEndpoint extends 
SecureBulkLoadService
   private final static FsPermission PERM_ALL_ACCESS = 
FsPermission.valueOf("-rwxrwxrwx");
   private final static FsPermission PERM_HIDDEN = 
FsPermission.valueOf("-rwx--x--x");
 
+  public static final String FS_WITHOUT_SUPPORT_PERMISSION_KEY =
+  "hbase.secure.bulkload.fs.permission.lacking";
+  public static final String FS_WITHOUT_SUPPORT_PERMISSION_DEFAULT =
+  "s3,s3a,s3n,wasb,wasbs,swift,adfs,abfs,viewfs";
+
   private SecureRandom random;
   private FileSystem fs;
   private Configuration conf;
@@ -133,6 +142,7 @@ public class SecureBulkLoadEndpoint extends 
SecureBulkLoadService
 conf = env.getConfiguration();
 baseStagingDir = SecureBulkLoadUtil.getBaseStagingDir(conf);
 this.userProvider = UserProvider.instantiate(conf);
+Set fsSet = getFileSystemSchemesWithoutPermissionSupport(conf);
 
 try {
   fs = FileSystem.get(conf);
@@ -153,6 +163,12 @@ public class SecureBulkLoadEndpoint extends 
SecureBulkLoadService
 }
   }
 
+  Set getFileSystemSchemesWithoutPermissionSupport(Configuration conf) 
{
+final String value = conf.get(
+FS_WITHOUT_SUPPORT_PERMISSION_KEY, 
FS_WITHOUT_SUPPORT_PERMISSION_DEFAULT);
+return new HashSet(Arrays.asList(StringUtils.split(value, ',')));
+  }
+
   @Override
   public void stop(CoprocessorEnvironment env) throws IOException {
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/685906c8/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestSecureBulkLoadEndpoint.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestSecureBulkLoadEndpoint.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestSecureBulkLoadEndpoint.java
new file mode 100644
index 000..d10d966
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestSecureBulkLoadEndpoint.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 

[4/4] hbase git commit: HBASE-20605 Excludes Azure's new filesystem from the SecureBulkLoadEndpoint perm check

2018-06-06 Thread elserj
HBASE-20605 Excludes Azure's new filesystem from the SecureBulkLoadEndpoint 
perm check

Signed-off-by: Ted Yu 


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

Branch: refs/heads/branch-1.2
Commit: 96e8ab4af9e0e8c49165d6f2d1bb6e82f554ef5a
Parents: 35a19c5
Author: Josh Elser 
Authored: Sat May 19 00:17:08 2018 -0400
Committer: Josh Elser 
Committed: Wed Jun 6 17:26:22 2018 -0400

--
 .../security/access/SecureBulkLoadEndpoint.java | 16 +
 .../access/TestSecureBulkLoadEndpoint.java  | 64 
 2 files changed, 80 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/96e8ab4a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
index 7496e4e..5db3fe1 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
@@ -22,6 +22,7 @@ import com.google.protobuf.RpcCallback;
 import com.google.protobuf.RpcController;
 import com.google.protobuf.Service;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
@@ -69,9 +70,12 @@ import java.math.BigInteger;
 import java.security.PrivilegedAction;
 import java.security.SecureRandom;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 /**
  * Coprocessor service for bulk loads in secure mode.
@@ -114,6 +118,11 @@ public class SecureBulkLoadEndpoint extends 
SecureBulkLoadService
   private final static FsPermission PERM_ALL_ACCESS = 
FsPermission.valueOf("-rwxrwxrwx");
   private final static FsPermission PERM_HIDDEN = 
FsPermission.valueOf("-rwx--x--x");
 
+  public static final String FS_WITHOUT_SUPPORT_PERMISSION_KEY =
+  "hbase.secure.bulkload.fs.permission.lacking";
+  public static final String FS_WITHOUT_SUPPORT_PERMISSION_DEFAULT =
+  "s3,s3a,s3n,wasb,wasbs,swift,adfs,abfs,viewfs";
+
   private SecureRandom random;
   private FileSystem fs;
   private Configuration conf;
@@ -133,6 +142,7 @@ public class SecureBulkLoadEndpoint extends 
SecureBulkLoadService
 conf = env.getConfiguration();
 baseStagingDir = SecureBulkLoadUtil.getBaseStagingDir(conf);
 this.userProvider = UserProvider.instantiate(conf);
+Set fsSet = getFileSystemSchemesWithoutPermissionSupport(conf);
 
 try {
   fs = FileSystem.get(conf);
@@ -153,6 +163,12 @@ public class SecureBulkLoadEndpoint extends 
SecureBulkLoadService
 }
   }
 
+  Set getFileSystemSchemesWithoutPermissionSupport(Configuration conf) 
{
+final String value = conf.get(
+FS_WITHOUT_SUPPORT_PERMISSION_KEY, 
FS_WITHOUT_SUPPORT_PERMISSION_DEFAULT);
+return new HashSet(Arrays.asList(StringUtils.split(value, ',')));
+  }
+
   @Override
   public void stop(CoprocessorEnvironment env) throws IOException {
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/96e8ab4a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestSecureBulkLoadEndpoint.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestSecureBulkLoadEndpoint.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestSecureBulkLoadEndpoint.java
new file mode 100644
index 000..d10d966
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestSecureBulkLoadEndpoint.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 

[2/4] hbase git commit: HBASE-20605 Excludes Azure's new filesystem from the SecureBulkLoadEndpoint perm check

2018-06-06 Thread elserj
HBASE-20605 Excludes Azure's new filesystem from the SecureBulkLoadEndpoint 
perm check

Signed-off-by: Ted Yu 


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

Branch: refs/heads/branch-1.4
Commit: 7eee2f7f059749ca60c7204d2ba6dc570ee5f6e1
Parents: 8c4a66f
Author: Josh Elser 
Authored: Sat May 19 00:17:08 2018 -0400
Committer: Josh Elser 
Committed: Wed Jun 6 16:29:22 2018 -0400

--
 .../security/access/SecureBulkLoadEndpoint.java | 15 -
 .../access/TestSecureBulkLoadEndpoint.java  | 64 
 2 files changed, 77 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/7eee2f7f/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
index 68f31cc..d32c987 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
@@ -22,6 +22,7 @@ import com.google.protobuf.RpcCallback;
 import com.google.protobuf.RpcController;
 import com.google.protobuf.Service;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
@@ -119,7 +120,11 @@ public class SecureBulkLoadEndpoint extends 
SecureBulkLoadService
 
   private final static FsPermission PERM_ALL_ACCESS = 
FsPermission.valueOf("-rwxrwxrwx");
   private final static FsPermission PERM_HIDDEN = 
FsPermission.valueOf("-rwx--x--x");
-  private final static String[] FsWithoutSupportPermission = {"s3", "s3a", 
"s3n", "wasb", "wasbs", "swift"};
+
+  public static final String FS_WITHOUT_SUPPORT_PERMISSION_KEY =
+  "hbase.secure.bulkload.fs.permission.lacking";
+  public static final String FS_WITHOUT_SUPPORT_PERMISSION_DEFAULT =
+  "s3,s3a,s3n,wasb,wasbs,swift,adfs,abfs,viewfs";
 
   private SecureRandom random;
   private FileSystem fs;
@@ -143,7 +148,7 @@ public class SecureBulkLoadEndpoint extends 
SecureBulkLoadService
 conf = env.getConfiguration();
 baseStagingDir = SecureBulkLoadUtil.getBaseStagingDir(conf);
 this.userProvider = UserProvider.instantiate(conf);
-Set fsSet = new 
HashSet(Arrays.asList(FsWithoutSupportPermission));
+Set fsSet = getFileSystemSchemesWithoutPermissionSupport(conf);
 
 try {
   fs = baseStagingDir.getFileSystem(conf);
@@ -179,6 +184,12 @@ public class SecureBulkLoadEndpoint extends 
SecureBulkLoadService
 }
   }
 
+  Set getFileSystemSchemesWithoutPermissionSupport(Configuration conf) 
{
+final String value = conf.get(
+FS_WITHOUT_SUPPORT_PERMISSION_KEY, 
FS_WITHOUT_SUPPORT_PERMISSION_DEFAULT);
+return new HashSet(Arrays.asList(StringUtils.split(value, ',')));
+  }
+
   @Override
   public void stop(CoprocessorEnvironment env) throws IOException {
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/7eee2f7f/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestSecureBulkLoadEndpoint.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestSecureBulkLoadEndpoint.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestSecureBulkLoadEndpoint.java
new file mode 100644
index 000..d10d966
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestSecureBulkLoadEndpoint.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package 

hbase git commit: HBASE-20577 Addendum Fall back to old design if FNF

2018-06-06 Thread tedyu
Repository: hbase
Updated Branches:
  refs/heads/master cfd4b7d56 -> 1413522f6


HBASE-20577 Addendum Fall back to old design if FNF

Signed-off-by: tedyu 


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

Branch: refs/heads/master
Commit: 1413522f6f99e2dbbca9a67b6ece78beb2841bc4
Parents: cfd4b7d
Author: Nihal Jain 
Authored: Mon Jun 4 23:31:07 2018 +0530
Committer: tedyu 
Committed: Wed Jun 6 13:52:59 2018 -0700

--
 .../apache/hadoop/hbase/http/log/LogLevel.java  | 23 +++-
 1 file changed, 18 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/1413522f/hbase-http/src/main/java/org/apache/hadoop/hbase/http/log/LogLevel.java
--
diff --git 
a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/log/LogLevel.java 
b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/log/LogLevel.java
index aa223f3..cb23421 100644
--- a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/log/LogLevel.java
+++ b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/log/LogLevel.java
@@ -18,6 +18,7 @@
 package org.apache.hadoop.hbase.http.log;
 
 import java.io.BufferedReader;
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.PrintWriter;
@@ -106,9 +107,15 @@ public final class LogLevel {
 return;
   }
   response.setContentType("text/html");
-  String requestedURL = "header.jsp?pageTitle=Log Level";
-  request.getRequestDispatcher(requestedURL).include(request, response);
-  PrintWriter out = response.getWriter();
+  PrintWriter out;
+  try {
+String headerPath = "header.jsp?pageTitle=Log Level";
+request.getRequestDispatcher(headerPath).include(request, response);
+out = response.getWriter();
+  } catch (FileNotFoundException e) {
+// in case file is not found fall back to old design
+out = ServletUtil.initHTML(response, "Log Level");
+  }
   out.println(FORMS);
 
   String logName = ServletUtil.getParameter(request, "log");
@@ -136,8 +143,14 @@ public final class LogLevel {
   out.println("Sorry, " + log.getClass() + " not supported.");
 }
   }
-  out.println("");
-  request.getRequestDispatcher("footer.jsp").include(request, response);
+
+  try {
+String footerPath = "footer.jsp";
+out.println("");
+request.getRequestDispatcher(footerPath).include(request, response);
+  } catch (FileNotFoundException e) {
+out.println(ServletUtil.HTML_TAIL);
+  }
   out.close();
 }
 



hbase git commit: HBASE-20683 Incorrect return value for PreUpgradeValidator

2018-06-06 Thread psomogyi
Repository: hbase
Updated Branches:
  refs/heads/branch-2.0 a56fd069e -> 5e1c9fcd0


HBASE-20683 Incorrect return value for PreUpgradeValidator

Signed-off-by: Ted Yu 
Signed-off-by: Chia-Ping Tsai 


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

Branch: refs/heads/branch-2.0
Commit: 5e1c9fcd08b35647860553c36140f3e1fa2411ee
Parents: a56fd06
Author: Peter Somogyi 
Authored: Tue Jun 5 12:21:27 2018 +0200
Committer: Peter Somogyi 
Committed: Wed Jun 6 20:04:53 2018 +0200

--
 .../apache/hadoop/hbase/tool/PreUpgradeValidator.java  | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/5e1c9fcd/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
index 138af6a..6fe5a92 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
@@ -56,12 +56,12 @@ public class PreUpgradeValidator extends AbstractHBaseTool {
   private boolean validateDBE;
 
   /**
-   * Check DataBlockEncodings for column families.
+   * Check DataBlockEncodings of column families are compatible.
*
-   * @return DataBlockEncoding compatible with HBase 2
+   * @return number of column families with incompatible DataBlockEncoding
* @throws IOException if a remote or network exception occurs
*/
-  private boolean validateDBE() throws IOException {
+  private int validateDBE() throws IOException {
 int incompatibilities = 0;
 
 LOG.info("Validating Data Block Encodings");
@@ -92,17 +92,16 @@ public class PreUpgradeValidator extends AbstractHBaseTool {
   + "upgrade until these encodings are converted to a supported one.", 
incompatibilities);
   LOG.warn("Check 
http://hbase.apache.org/book.html#upgrade2.0.prefix-tree.removed "
   + "for instructions.");
-  return false;
 } else {
   LOG.info("The used Data Block Encodings are compatible with HBase 2.0.");
-  return true;
 }
+return incompatibilities;
   }
 
   @Override
   protected void addOptions() {
 addOptNoArg("all", "Run all pre-upgrade validations");
-addOptNoArg("validateDBE", "Validate DataBlockEncoding are compatible on 
the cluster");
+addOptNoArg("validateDBE", "Validate DataBlockEncodings are compatible");
   }
 
   @Override
@@ -115,7 +114,7 @@ public class PreUpgradeValidator extends AbstractHBaseTool {
   protected int doWork() throws Exception {
 boolean validationFailed = false;
 if (validateDBE || validateAll) {
-  if (validateDBE()) {
+  if (validateDBE() > 0) {
 validationFailed = true;
   }
 }



hbase git commit: HBASE-20683 Incorrect return value for PreUpgradeValidator

2018-06-06 Thread psomogyi
Repository: hbase
Updated Branches:
  refs/heads/branch-2 323eccc65 -> 00289b8ff


HBASE-20683 Incorrect return value for PreUpgradeValidator

Signed-off-by: Ted Yu 
Signed-off-by: Chia-Ping Tsai 


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

Branch: refs/heads/branch-2
Commit: 00289b8ffae3c2904d1ac8fda9ac38f06eaa5484
Parents: 323eccc
Author: Peter Somogyi 
Authored: Tue Jun 5 12:21:27 2018 +0200
Committer: Peter Somogyi 
Committed: Wed Jun 6 20:04:22 2018 +0200

--
 .../apache/hadoop/hbase/tool/PreUpgradeValidator.java  | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/00289b8f/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
index 138af6a..6fe5a92 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
@@ -56,12 +56,12 @@ public class PreUpgradeValidator extends AbstractHBaseTool {
   private boolean validateDBE;
 
   /**
-   * Check DataBlockEncodings for column families.
+   * Check DataBlockEncodings of column families are compatible.
*
-   * @return DataBlockEncoding compatible with HBase 2
+   * @return number of column families with incompatible DataBlockEncoding
* @throws IOException if a remote or network exception occurs
*/
-  private boolean validateDBE() throws IOException {
+  private int validateDBE() throws IOException {
 int incompatibilities = 0;
 
 LOG.info("Validating Data Block Encodings");
@@ -92,17 +92,16 @@ public class PreUpgradeValidator extends AbstractHBaseTool {
   + "upgrade until these encodings are converted to a supported one.", 
incompatibilities);
   LOG.warn("Check 
http://hbase.apache.org/book.html#upgrade2.0.prefix-tree.removed "
   + "for instructions.");
-  return false;
 } else {
   LOG.info("The used Data Block Encodings are compatible with HBase 2.0.");
-  return true;
 }
+return incompatibilities;
   }
 
   @Override
   protected void addOptions() {
 addOptNoArg("all", "Run all pre-upgrade validations");
-addOptNoArg("validateDBE", "Validate DataBlockEncoding are compatible on 
the cluster");
+addOptNoArg("validateDBE", "Validate DataBlockEncodings are compatible");
   }
 
   @Override
@@ -115,7 +114,7 @@ public class PreUpgradeValidator extends AbstractHBaseTool {
   protected int doWork() throws Exception {
 boolean validationFailed = false;
 if (validateDBE || validateAll) {
-  if (validateDBE()) {
+  if (validateDBE() > 0) {
 validationFailed = true;
   }
 }



hbase git commit: HBASE-20683 Incorrect return value for PreUpgradeValidator

2018-06-06 Thread psomogyi
Repository: hbase
Updated Branches:
  refs/heads/master 7d3750bd9 -> cfd4b7d56


HBASE-20683 Incorrect return value for PreUpgradeValidator

Signed-off-by: Ted Yu 
Signed-off-by: Chia-Ping Tsai 


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

Branch: refs/heads/master
Commit: cfd4b7d5647b3108a595e75dac1a9aba89b697f9
Parents: 7d3750b
Author: Peter Somogyi 
Authored: Tue Jun 5 12:21:27 2018 +0200
Committer: Peter Somogyi 
Committed: Wed Jun 6 20:03:56 2018 +0200

--
 .../apache/hadoop/hbase/tool/PreUpgradeValidator.java  | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/cfd4b7d5/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
index 138af6a..6fe5a92 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
@@ -56,12 +56,12 @@ public class PreUpgradeValidator extends AbstractHBaseTool {
   private boolean validateDBE;
 
   /**
-   * Check DataBlockEncodings for column families.
+   * Check DataBlockEncodings of column families are compatible.
*
-   * @return DataBlockEncoding compatible with HBase 2
+   * @return number of column families with incompatible DataBlockEncoding
* @throws IOException if a remote or network exception occurs
*/
-  private boolean validateDBE() throws IOException {
+  private int validateDBE() throws IOException {
 int incompatibilities = 0;
 
 LOG.info("Validating Data Block Encodings");
@@ -92,17 +92,16 @@ public class PreUpgradeValidator extends AbstractHBaseTool {
   + "upgrade until these encodings are converted to a supported one.", 
incompatibilities);
   LOG.warn("Check 
http://hbase.apache.org/book.html#upgrade2.0.prefix-tree.removed "
   + "for instructions.");
-  return false;
 } else {
   LOG.info("The used Data Block Encodings are compatible with HBase 2.0.");
-  return true;
 }
+return incompatibilities;
   }
 
   @Override
   protected void addOptions() {
 addOptNoArg("all", "Run all pre-upgrade validations");
-addOptNoArg("validateDBE", "Validate DataBlockEncoding are compatible on 
the cluster");
+addOptNoArg("validateDBE", "Validate DataBlockEncodings are compatible");
   }
 
   @Override
@@ -115,7 +114,7 @@ public class PreUpgradeValidator extends AbstractHBaseTool {
   protected int doWork() throws Exception {
 boolean validationFailed = false;
 if (validateDBE || validateAll) {
-  if (validateDBE()) {
+  if (validateDBE() > 0) {
 validationFailed = true;
   }
 }