hbase git commit: HBASE-20286 Improving shell command compaction_state

2018-04-06 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1 b9ca1cc15 -> e84f5dff7


HBASE-20286 Improving shell command compaction_state

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/branch-1
Commit: e84f5dff7ba8b9103b51cb31aee8b7e8461fdb13
Parents: b9ca1cc
Author: Csaba Skrabak 
Authored: Fri Apr 6 15:32:37 2018 -0700
Committer: Apekshit Sharma 
Committed: Fri Apr 6 15:37:08 2018 -0700

--
 hbase-shell/src/main/ruby/shell/commands/compaction_state.rb | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/e84f5dff/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb
--
diff --git a/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb 
b/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb
index fbcdc7e..137ec4c 100644
--- a/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb
+++ b/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb
@@ -22,14 +22,16 @@ module Shell
 class CompactionState < Command
   def help
 return <<-EOF
-  Gets compaction status for a table:
+  Gets compaction status (MAJOR, MAJOR_AND_MINOR, MINOR, NONE) for a 
table:
   hbase> compaction_state 'ns1:t1'
   hbase> compaction_state 't1'
 EOF
   end
 
   def command(table_name)
-admin.getCompactionState(table_name)
+rv = admin.getCompactionState(table_name)
+formatter.row([rv])
+rv
   end
 end
   end



hbase git commit: HBASE-20286 Improving shell command compaction_state

2018-04-06 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 a8994afbf -> 17b84cfb9


HBASE-20286 Improving shell command compaction_state

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/branch-2
Commit: 17b84cfb9bf68ec9733abf83fd6719c7b639cb19
Parents: a8994af
Author: Csaba Skrabak 
Authored: Fri Apr 6 15:32:37 2018 -0700
Committer: Apekshit Sharma 
Committed: Fri Apr 6 15:34:19 2018 -0700

--
 hbase-shell/src/main/ruby/shell/commands/compaction_state.rb | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/17b84cfb/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb
--
diff --git a/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb 
b/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb
index 91bd79d..05b7521 100644
--- a/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb
+++ b/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb
@@ -22,14 +22,16 @@ module Shell
 class CompactionState < Command
   def help
 <<-EOF
-  Gets compaction status for a table:
+  Gets compaction status (MAJOR, MAJOR_AND_MINOR, MINOR, NONE) for a 
table:
   hbase> compaction_state 'ns1:t1'
   hbase> compaction_state 't1'
 EOF
   end
 
   def command(table_name)
-admin.getCompactionState(table_name)
+rv = admin.getCompactionState(table_name)
+formatter.row([rv])
+rv
   end
 end
   end



hbase git commit: HBASE-20286 Improving shell command compaction_state

2018-04-06 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master e4b8bd665 -> a422310da


HBASE-20286 Improving shell command compaction_state

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/master
Commit: a422310dadf1fe3c7bb999fe51d6a754fd979b46
Parents: e4b8bd6
Author: Csaba Skrabak 
Authored: Fri Apr 6 15:32:37 2018 -0700
Committer: Apekshit Sharma 
Committed: Fri Apr 6 15:32:37 2018 -0700

--
 hbase-shell/src/main/ruby/shell/commands/compaction_state.rb | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/a422310d/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb
--
diff --git a/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb 
b/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb
index 91bd79d..05b7521 100644
--- a/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb
+++ b/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb
@@ -22,14 +22,16 @@ module Shell
 class CompactionState < Command
   def help
 <<-EOF
-  Gets compaction status for a table:
+  Gets compaction status (MAJOR, MAJOR_AND_MINOR, MINOR, NONE) for a 
table:
   hbase> compaction_state 'ns1:t1'
   hbase> compaction_state 't1'
 EOF
   end
 
   def command(table_name)
-admin.getCompactionState(table_name)
+rv = admin.getCompactionState(table_name)
+formatter.row([rv])
+rv
   end
 end
   end



hbase git commit: HBASE-19488 Move to using Apache commons CollectionUtils

2018-04-04 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 1e0d90953 -> 039bc7357


HBASE-19488 Move to using Apache commons CollectionUtils

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/branch-2
Commit: 039bc73571d2cc89378749573dfeec74c247b0b9
Parents: 1e0d909
Author: BELUGA BEHR 
Authored: Wed Apr 4 14:12:19 2018 -0700
Committer: Apekshit Sharma 
Committed: Wed Apr 4 14:16:33 2018 -0700

--
 .../hadoop/hbase/client/RowMutations.java   |  5 +-
 .../org/apache/hadoop/hbase/util/Bytes.java |  1 +
 .../hadoop/hbase/util/CollectionUtils.java  | 80 
 .../replication/ZKReplicationPeerStorage.java   |  5 +-
 .../replication/ZKReplicationQueueStorage.java  | 24 --
 .../hadoop/hbase/regionserver/HRegion.java  |  2 +-
 .../hbase/regionserver/RSRpcServices.java   |  2 +-
 .../hadoop/hbase/regionserver/StoreScanner.java |  6 +-
 .../hbase/regionserver/wal/FSWALEntry.java  |  2 +-
 9 files changed, 30 insertions(+), 97 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/039bc735/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RowMutations.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RowMutations.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RowMutations.java
index 1eb3151..4b426cf 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RowMutations.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RowMutations.java
@@ -22,8 +22,9 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
+
+import org.apache.commons.collections.CollectionUtils;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.hbase.util.CollectionUtils;
 import org.apache.yetus.audience.InterfaceAudience;
 
 /**
@@ -47,7 +48,7 @@ public class RowMutations implements Row {
*/
   public static RowMutations of(List mutations) throws 
IOException {
 if (CollectionUtils.isEmpty(mutations)) {
-  throw new IllegalArgumentException("Can't instantiate a RowMutations by 
empty list");
+  throw new IllegalArgumentException("Cannot instantiate a RowMutations by 
empty list");
 }
 return new RowMutations(mutations.get(0).getRow(), mutations.size())
 .add(mutations);

http://git-wip-us.apache.org/repos/asf/hbase/blob/039bc735/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
--
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
index b7912fd..a315fd2 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
@@ -38,6 +38,7 @@ import java.util.Comparator;
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.commons.collections.CollectionUtils;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellComparator;
 import org.apache.hadoop.hbase.KeyValue;

http://git-wip-us.apache.org/repos/asf/hbase/blob/039bc735/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CollectionUtils.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CollectionUtils.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CollectionUtils.java
index 8bbb6f1..bfe41d8 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CollectionUtils.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CollectionUtils.java
@@ -19,10 +19,6 @@
 package org.apache.hadoop.hbase.util;
 
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
 import java.util.concurrent.ConcurrentMap;
 import java.util.function.Supplier;
 
@@ -34,82 +30,6 @@ import org.apache.yetus.audience.InterfaceAudience;
 @InterfaceAudience.Private
 public class CollectionUtils {
 
-  private static final List EMPTY_LIST = 
Collections.unmodifiableList(new ArrayList<>(0));
-
-  
-  @SuppressWarnings("unchecked")
-  public static  Collection nullSafe(Collection in) {
-if (in == null) {
-  return (Collection)EMPTY_LIST;
-}
-return in;
-  }
-
-  / size /
-
-  

hbase git commit: HBASE-19488 Move to using Apache commons CollectionUtils

2018-04-04 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master dcc840e8a -> d866e7c65


HBASE-19488 Move to using Apache commons CollectionUtils

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/master
Commit: d866e7c658e04a5b3d221137d41e3e277f9991c4
Parents: dcc840e
Author: BELUGA BEHR 
Authored: Wed Apr 4 14:12:19 2018 -0700
Committer: Apekshit Sharma 
Committed: Wed Apr 4 14:12:19 2018 -0700

--
 .../hadoop/hbase/client/RowMutations.java   |  5 +-
 .../org/apache/hadoop/hbase/util/Bytes.java |  1 +
 .../hadoop/hbase/util/CollectionUtils.java  | 80 
 .../replication/ZKReplicationPeerStorage.java   |  5 +-
 .../replication/ZKReplicationQueueStorage.java  | 24 --
 .../hadoop/hbase/regionserver/HRegion.java  |  2 +-
 .../hbase/regionserver/RSRpcServices.java   |  2 +-
 .../hadoop/hbase/regionserver/StoreScanner.java |  6 +-
 .../hbase/regionserver/wal/FSWALEntry.java  |  2 +-
 9 files changed, 30 insertions(+), 97 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/d866e7c6/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RowMutations.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RowMutations.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RowMutations.java
index 1eb3151..4b426cf 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RowMutations.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RowMutations.java
@@ -22,8 +22,9 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
+
+import org.apache.commons.collections.CollectionUtils;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.hbase.util.CollectionUtils;
 import org.apache.yetus.audience.InterfaceAudience;
 
 /**
@@ -47,7 +48,7 @@ public class RowMutations implements Row {
*/
   public static RowMutations of(List mutations) throws 
IOException {
 if (CollectionUtils.isEmpty(mutations)) {
-  throw new IllegalArgumentException("Can't instantiate a RowMutations by 
empty list");
+  throw new IllegalArgumentException("Cannot instantiate a RowMutations by 
empty list");
 }
 return new RowMutations(mutations.get(0).getRow(), mutations.size())
 .add(mutations);

http://git-wip-us.apache.org/repos/asf/hbase/blob/d866e7c6/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
--
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
index b7912fd..a315fd2 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
@@ -38,6 +38,7 @@ import java.util.Comparator;
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.commons.collections.CollectionUtils;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellComparator;
 import org.apache.hadoop.hbase.KeyValue;

http://git-wip-us.apache.org/repos/asf/hbase/blob/d866e7c6/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CollectionUtils.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CollectionUtils.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CollectionUtils.java
index 8bbb6f1..bfe41d8 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CollectionUtils.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CollectionUtils.java
@@ -19,10 +19,6 @@
 package org.apache.hadoop.hbase.util;
 
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
 import java.util.concurrent.ConcurrentMap;
 import java.util.function.Supplier;
 
@@ -34,82 +30,6 @@ import org.apache.yetus.audience.InterfaceAudience;
 @InterfaceAudience.Private
 public class CollectionUtils {
 
-  private static final List EMPTY_LIST = 
Collections.unmodifiableList(new ArrayList<>(0));
-
-  
-  @SuppressWarnings("unchecked")
-  public static  Collection nullSafe(Collection in) {
-if (in == null) {
-  return (Collection)EMPTY_LIST;
-}
-return in;
-  }
-
-  / size /
-
-  

hbase git commit: HBASE-17730 Add license header to design doc.

2018-04-04 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 a761f175a -> 1e0d90953


HBASE-17730 Add license header to design doc.


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

Branch: refs/heads/branch-2
Commit: 1e0d9095325774d8fab4982ede911356f3b9907f
Parents: a761f17
Author: Apekshit Sharma 
Authored: Wed Apr 4 13:11:53 2018 -0700
Committer: Apekshit Sharma 
Committed: Wed Apr 4 13:11:53 2018 -0700

--
 ...tion_instead_of_inheritance-HBASE-17732.adoc | 21 
 1 file changed, 21 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/1e0d9095/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
--
diff --git 
a/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
 
b/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
index a61b37b..2476f8a 100644
--- 
a/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
+++ 
b/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
@@ -1,3 +1,24 @@
+
+/**
+ *
+ * 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.
+ */
+
+
 = Coprocessor Design Improvements 
(link:https://issues.apache.org/jira/browse/HBASE-17732[HBASE-17732])
 
 Author: Apekshit Sharma



hbase git commit: HBASE-17730 Add license header to design doc.

2018-04-04 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2.0 d7cb0bd41 -> c9f3eb00a


HBASE-17730 Add license header to design doc.


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

Branch: refs/heads/branch-2.0
Commit: c9f3eb00ab93d7b97de43c0bc3601371c77d0ba2
Parents: d7cb0bd
Author: Apekshit Sharma 
Authored: Wed Apr 4 13:11:53 2018 -0700
Committer: Apekshit Sharma 
Committed: Wed Apr 4 13:12:33 2018 -0700

--
 ...tion_instead_of_inheritance-HBASE-17732.adoc | 21 
 1 file changed, 21 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c9f3eb00/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
--
diff --git 
a/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
 
b/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
index a61b37b..2476f8a 100644
--- 
a/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
+++ 
b/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
@@ -1,3 +1,24 @@
+
+/**
+ *
+ * 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.
+ */
+
+
 = Coprocessor Design Improvements 
(link:https://issues.apache.org/jira/browse/HBASE-17732[HBASE-17732])
 
 Author: Apekshit Sharma



hbase git commit: HBASE-17730 Add documentation to upgrade coprocessors for 2.0

2018-04-04 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master f574fd478 -> dcc840e8a


HBASE-17730 Add documentation to upgrade coprocessors for 2.0


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

Branch: refs/heads/master
Commit: dcc840e8a5c4d3421edcc2595d886ae8380bcb15
Parents: f574fd4
Author: Apekshit Sharma 
Authored: Tue Apr 3 16:38:44 2018 -0700
Committer: Apekshit Sharma 
Committed: Wed Apr 4 13:08:22 2018 -0700

--
 ...tion_instead_of_inheritance-HBASE-17732.adoc | 21 ++
 src/main/asciidoc/_chapters/upgrading.adoc  | 43 
 2 files changed, 64 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/dcc840e8/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
--
diff --git 
a/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
 
b/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
index a61b37b..2476f8a 100644
--- 
a/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
+++ 
b/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
@@ -1,3 +1,24 @@
+
+/**
+ *
+ * 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.
+ */
+
+
 = Coprocessor Design Improvements 
(link:https://issues.apache.org/jira/browse/HBASE-17732[HBASE-17732])
 
 Author: Apekshit Sharma

http://git-wip-us.apache.org/repos/asf/hbase/blob/dcc840e8/src/main/asciidoc/_chapters/upgrading.adoc
--
diff --git a/src/main/asciidoc/_chapters/upgrading.adoc 
b/src/main/asciidoc/_chapters/upgrading.adoc
index 38a67d4..68adb14 100644
--- a/src/main/asciidoc/_chapters/upgrading.adoc
+++ b/src/main/asciidoc/_chapters/upgrading.adoc
@@ -546,6 +546,48 @@ The Java client API for HBase has a number of changes that 
break both source and
 This would be a good place to link to an appendix on migrating applications
 
 
+[[upgrade2.0.coprocessors]]
+ Upgrading Coprocessors to 2.0
+Coprocessors have changed substantially in 2.0 ranging from top level design 
changes in class
+hierarchies to changed/removed methods, interfaces, etc.
+(Parent jira: 
link:https://issues.apache.org/jira/browse/HBASE-18169[HBASE-18169 Coprocessor 
fix
+and cleanup before 2.0.0 release]). Some of the reasons for such widespread 
changes:
+
+. Pass Interfaces instead of Implementations; e.g. TableDescriptor instead of 
HTableDescriptor and
+Region instead of HRegion 
(link:https://issues.apache.org/jira/browse/HBASE-18241[HBASE-18241]
+Change client.Table and client.Admin to not use HTableDescriptor).
+. Design refactor so implementers need to fill out less boilerplate and so we 
can do more
+compile-time checking 
(link:https://issues.apache.org/jira/browse/HBASE-17732[HBASE-17732])
+. Purge Protocol Buffers from Coprocessor API
+(link:https://issues.apache.org/jira/browse/HBASE-18859[HBASE-18859],
+link:https://issues.apache.org/jira/browse/HBASE-16769[HBASE-16769], etc)
+. Cut back on what we expose to Coprocessors removing hooks on internals that 
were too private to
+ expose (for eg. 
link:https://issues.apache.org/jira/browse/HBASE-18453[HBASE-18453]
+ CompactionRequest should not be exposed to user directly;
+ link:https://issues.apache.org/jira/browse/HBASE-18298[HBASE-18298] 
RegionServerServices Interface
+ cleanup for CP expose; etc)
+
+To use coprocessors in 2.0, they should be rebuilt against new API otherwise 
they will fail to
+load and HBase processes will die.
+
+Suggested order of changes to upgrade the coprocessors:
+
+. Directly implement observer interfaces instead 

hbase git commit: HBASE-17730 Migration to 2.0 for coprocessors. Upload AsciiDoc for coprocessor design improvements made in HBASE-17732.

2018-04-03 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 40924bb4a -> 40fbecd97


HBASE-17730 Migration to 2.0 for coprocessors. Upload AsciiDoc for coprocessor 
design improvements made in HBASE-17732.


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

Branch: refs/heads/branch-2
Commit: 40fbecd97c6e07b4d9ececb7c8d96feb9292c473
Parents: 40924bb
Author: Apekshit Sharma 
Authored: Tue Apr 3 15:45:53 2018 -0700
Committer: Apekshit Sharma 
Committed: Tue Apr 3 15:50:09 2018 -0700

--
 ...ad_of_inheritance-HBASE-17732-2017_09_27.pdf | Bin 161724 -> 0 bytes
 ...tion_instead_of_inheritance-HBASE-17732.adoc | 236 +++
 2 files changed, 236 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/40fbecd9/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732-2017_09_27.pdf
--
diff --git 
a/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732-2017_09_27.pdf
 
b/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732-2017_09_27.pdf
deleted file mode 100644
index 30a6d54..000
Binary files 
a/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732-2017_09_27.pdf
 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/hbase/blob/40fbecd9/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
--
diff --git 
a/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
 
b/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
new file mode 100644
index 000..a61b37b
--- /dev/null
+++ 
b/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
@@ -0,0 +1,236 @@
+= Coprocessor Design Improvements 
(link:https://issues.apache.org/jira/browse/HBASE-17732[HBASE-17732])
+
+Author: Apekshit Sharma
+
+== Introduction
+
+This doc explains current design of Coprocessor feature in brief, few issues I 
noticed, and
+suggestions on how to fix them & further improve overall design.
+
+*TL;DR* +
+We are moving from
+
+* Observer *is* Coprocessor
+* FooService *is* CoprocessorService
+
+To
+
+* Coprocessor *has* Observer
+* Coprocessor *has* Service
+
+See code example in <>.
+
+== Terminology
+
+hooks = functions in observers. Named because third-party use these functions 
to “hook up” custom
+logic to internal code paths.
+
+[[background]]
+== Background
+
+Coprocessors are well link:http://hbase.apache.org/book.html#cp[documented in 
the refguide].
+
+Here we give a little background information on involved classes, their 
responsibilities, and
+relationship to each other.
+
+* Main classes
+** Coprocessor (interface)
+*** All *Observer* interfaces derive from Coprocessor interface.
+ Coprocessor Interface is a _Marker _Interface. It just has start/stop 
methods and enums for
+stages in the Coprocessor Lifecycle.
+** http://hbase.apache.org/book.html#_observer_coprocessors[Observers] 
(interface)
+*** Contain hooks which third-party programs can override to inject 
functionality in various
+internal code paths. For e.g preCreateTable(...) will be called just before 
any table is created.
+*** Current set of observers: _MasterObserver, RegionObserver, 
RegionServerObserver, WALObserver,
+EndpointObserver, BulkLoadObserver._
+** CoprocessorEnvironment (interface)
+*** Encapsulates a coprocessor instance and other information like versions, 
priority, etc.
+*** Coprocessor implementations use it to get access to tables.
+*** Four main implementations: _MasterEnvironment, RegionEnvironment, 
RegionServerEnvironment,
+WALEnvironment._
+** CoprocessorHost (abstract class)
+*** Responsible for loading coprocessors
+*** Four concrete sub-classes: MasterCoprocessorHost, RegionCoprocessorHost,
+RegionServerCoprocessorHost, WALCoprocessorHost
+*** Each host is tied to corresponding environment type using template 
argument ‘E’.
+
+== Problems
+
+* CoprocessorEnvironment has `Coprocessor getInstance()`. Since Observer types 
which can be
+handled by an environment are not statically tied to it, coprocessor hosts 
(which are statically
+tied to Environment) don’t know which kind of coprocessors are relevant to 
them, i.e.
+MasterCoprocessorHost is tied to 

hbase git commit: HBASE-17730 Migration to 2.0 for coprocessors. Upload AsciiDoc for coprocessor design improvements made in HBASE-17732.

2018-04-03 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2.0 89e977dbc -> e6f567e31


HBASE-17730 Migration to 2.0 for coprocessors. Upload AsciiDoc for coprocessor 
design improvements made in HBASE-17732.


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

Branch: refs/heads/branch-2.0
Commit: e6f567e317af44f76c5d7ded3fcf5fca3b21fd29
Parents: 89e977d
Author: Apekshit Sharma 
Authored: Tue Apr 3 15:45:53 2018 -0700
Committer: Apekshit Sharma 
Committed: Tue Apr 3 15:50:26 2018 -0700

--
 ...ad_of_inheritance-HBASE-17732-2017_09_27.pdf | Bin 161724 -> 0 bytes
 ...tion_instead_of_inheritance-HBASE-17732.adoc | 236 +++
 2 files changed, 236 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/e6f567e3/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732-2017_09_27.pdf
--
diff --git 
a/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732-2017_09_27.pdf
 
b/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732-2017_09_27.pdf
deleted file mode 100644
index 30a6d54..000
Binary files 
a/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732-2017_09_27.pdf
 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/hbase/blob/e6f567e3/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
--
diff --git 
a/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
 
b/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
new file mode 100644
index 000..a61b37b
--- /dev/null
+++ 
b/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
@@ -0,0 +1,236 @@
+= Coprocessor Design Improvements 
(link:https://issues.apache.org/jira/browse/HBASE-17732[HBASE-17732])
+
+Author: Apekshit Sharma
+
+== Introduction
+
+This doc explains current design of Coprocessor feature in brief, few issues I 
noticed, and
+suggestions on how to fix them & further improve overall design.
+
+*TL;DR* +
+We are moving from
+
+* Observer *is* Coprocessor
+* FooService *is* CoprocessorService
+
+To
+
+* Coprocessor *has* Observer
+* Coprocessor *has* Service
+
+See code example in <>.
+
+== Terminology
+
+hooks = functions in observers. Named because third-party use these functions 
to “hook up” custom
+logic to internal code paths.
+
+[[background]]
+== Background
+
+Coprocessors are well link:http://hbase.apache.org/book.html#cp[documented in 
the refguide].
+
+Here we give a little background information on involved classes, their 
responsibilities, and
+relationship to each other.
+
+* Main classes
+** Coprocessor (interface)
+*** All *Observer* interfaces derive from Coprocessor interface.
+ Coprocessor Interface is a _Marker _Interface. It just has start/stop 
methods and enums for
+stages in the Coprocessor Lifecycle.
+** http://hbase.apache.org/book.html#_observer_coprocessors[Observers] 
(interface)
+*** Contain hooks which third-party programs can override to inject 
functionality in various
+internal code paths. For e.g preCreateTable(...) will be called just before 
any table is created.
+*** Current set of observers: _MasterObserver, RegionObserver, 
RegionServerObserver, WALObserver,
+EndpointObserver, BulkLoadObserver._
+** CoprocessorEnvironment (interface)
+*** Encapsulates a coprocessor instance and other information like versions, 
priority, etc.
+*** Coprocessor implementations use it to get access to tables.
+*** Four main implementations: _MasterEnvironment, RegionEnvironment, 
RegionServerEnvironment,
+WALEnvironment._
+** CoprocessorHost (abstract class)
+*** Responsible for loading coprocessors
+*** Four concrete sub-classes: MasterCoprocessorHost, RegionCoprocessorHost,
+RegionServerCoprocessorHost, WALCoprocessorHost
+*** Each host is tied to corresponding environment type using template 
argument ‘E’.
+
+== Problems
+
+* CoprocessorEnvironment has `Coprocessor getInstance()`. Since Observer types 
which can be
+handled by an environment are not statically tied to it, coprocessor hosts 
(which are statically
+tied to Environment) don’t know which kind of coprocessors are relevant to 
them, i.e.
+MasterCoprocessorHost is tied to 

hbase git commit: HBASE-17730 Migration to 2.0 for coprocessors. Upload AsciiDoc for coprocessor design improvements made in HBASE-17732.

2018-04-03 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master d9e64aa6b -> 6318e3bf5


HBASE-17730 Migration to 2.0 for coprocessors. Upload AsciiDoc for coprocessor 
design improvements made in HBASE-17732.


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

Branch: refs/heads/master
Commit: 6318e3bf5ff3108388d6d9506f40031e7c3684f5
Parents: d9e64aa
Author: Apekshit Sharma 
Authored: Tue Apr 3 15:45:53 2018 -0700
Committer: Apekshit Sharma 
Committed: Tue Apr 3 15:47:48 2018 -0700

--
 ...ad_of_inheritance-HBASE-17732-2017_09_27.pdf | Bin 161724 -> 0 bytes
 ...tion_instead_of_inheritance-HBASE-17732.adoc | 236 +++
 2 files changed, 236 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/6318e3bf/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732-2017_09_27.pdf
--
diff --git 
a/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732-2017_09_27.pdf
 
b/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732-2017_09_27.pdf
deleted file mode 100644
index 30a6d54..000
Binary files 
a/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732-2017_09_27.pdf
 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/hbase/blob/6318e3bf/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
--
diff --git 
a/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
 
b/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
new file mode 100644
index 000..a61b37b
--- /dev/null
+++ 
b/dev-support/design-docs/Coprocessor_Design_Improvements-Use_composition_instead_of_inheritance-HBASE-17732.adoc
@@ -0,0 +1,236 @@
+= Coprocessor Design Improvements 
(link:https://issues.apache.org/jira/browse/HBASE-17732[HBASE-17732])
+
+Author: Apekshit Sharma
+
+== Introduction
+
+This doc explains current design of Coprocessor feature in brief, few issues I 
noticed, and
+suggestions on how to fix them & further improve overall design.
+
+*TL;DR* +
+We are moving from
+
+* Observer *is* Coprocessor
+* FooService *is* CoprocessorService
+
+To
+
+* Coprocessor *has* Observer
+* Coprocessor *has* Service
+
+See code example in <>.
+
+== Terminology
+
+hooks = functions in observers. Named because third-party use these functions 
to “hook up” custom
+logic to internal code paths.
+
+[[background]]
+== Background
+
+Coprocessors are well link:http://hbase.apache.org/book.html#cp[documented in 
the refguide].
+
+Here we give a little background information on involved classes, their 
responsibilities, and
+relationship to each other.
+
+* Main classes
+** Coprocessor (interface)
+*** All *Observer* interfaces derive from Coprocessor interface.
+ Coprocessor Interface is a _Marker _Interface. It just has start/stop 
methods and enums for
+stages in the Coprocessor Lifecycle.
+** http://hbase.apache.org/book.html#_observer_coprocessors[Observers] 
(interface)
+*** Contain hooks which third-party programs can override to inject 
functionality in various
+internal code paths. For e.g preCreateTable(...) will be called just before 
any table is created.
+*** Current set of observers: _MasterObserver, RegionObserver, 
RegionServerObserver, WALObserver,
+EndpointObserver, BulkLoadObserver._
+** CoprocessorEnvironment (interface)
+*** Encapsulates a coprocessor instance and other information like versions, 
priority, etc.
+*** Coprocessor implementations use it to get access to tables.
+*** Four main implementations: _MasterEnvironment, RegionEnvironment, 
RegionServerEnvironment,
+WALEnvironment._
+** CoprocessorHost (abstract class)
+*** Responsible for loading coprocessors
+*** Four concrete sub-classes: MasterCoprocessorHost, RegionCoprocessorHost,
+RegionServerCoprocessorHost, WALCoprocessorHost
+*** Each host is tied to corresponding environment type using template 
argument ‘E’.
+
+== Problems
+
+* CoprocessorEnvironment has `Coprocessor getInstance()`. Since Observer types 
which can be
+handled by an environment are not statically tied to it, coprocessor hosts 
(which are statically
+tied to Environment) don’t know which kind of coprocessors are relevant to 
them, i.e.
+MasterCoprocessorHost is tied to 

hbase git commit: HBASE-17449 Add explicit document on different timeout settings

2018-03-22 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2.0 e3e7569b0 -> 9802c1771


HBASE-17449 Add explicit document on different timeout settings


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

Branch: refs/heads/branch-2.0
Commit: 9802c1771cfebb774c3eb5fae2f25d6141dc70f6
Parents: e3e7569
Author: Peter Somogyi 
Authored: Thu Feb 22 11:16:36 2018 +0100
Committer: Apekshit Sharma 
Committed: Thu Mar 22 12:45:24 2018 +0530

--
 .../hbase/TestClientOperationTimeout.java   | 196 +++
 src/main/asciidoc/_chapters/configuration.adoc  |  10 +
 2 files changed, 206 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/9802c177/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
new file mode 100644
index 000..61e63e8
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
@@ -0,0 +1,196 @@
+/**
+ * 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 org.apache.hadoop.hbase;
+
+import java.io.IOException;
+
+import java.net.SocketTimeoutException;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.client.Get;
+import org.apache.hadoop.hbase.client.Put;
+import org.apache.hadoop.hbase.client.ResultScanner;
+import org.apache.hadoop.hbase.client.RetriesExhaustedException;
+import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.hbase.client.Table;
+import org.apache.hadoop.hbase.regionserver.HRegionServer;
+import org.apache.hadoop.hbase.regionserver.RSRpcServices;
+import org.apache.hadoop.hbase.testclassification.ClientTests;
+import org.apache.hadoop.hbase.testclassification.MediumTests;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hbase.thirdparty.com.google.protobuf.RpcController;
+import org.apache.hbase.thirdparty.com.google.protobuf.ServiceException;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TestName;
+
+import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos;
+
+/**
+ * These tests verify that the RPC timeouts ('hbase.client.operation.timeout' 
and
+ * 'hbase.client.scanner.timeout.period') work correctly using a modified 
Region Server which
+ * injects delays to get, scan and mutate operations.
+ *
+ * When 'hbase.client.operation.timeout' is set and client operation is not 
completed in time the
+ * client will retry the operation 'hbase.client.retries.number' times. After 
that
+ * {@link SocketTimeoutException} will be thrown.
+ *
+ * Using 'hbase.client.scanner.timeout.period' configuration property similar 
behavior can be
+ * specified for scan related operations such as openScanner(), next(). If 
that times out
+ * {@link RetriesExhaustedException} will be thrown.
+ */
+@Category({ClientTests.class, MediumTests.class})
+public class TestClientOperationTimeout {
+
+  @ClassRule
+  public static final HBaseClassTestRule CLASS_RULE =
+  HBaseClassTestRule.forClass(TestClientOperationTimeout.class);
+
+  private static final HBaseTestingUtility TESTING_UTIL = new 
HBaseTestingUtility();
+
+  // Activate the delays after table creation to test get/scan/put
+  private static int DELAY_GET;
+  private static int DELAY_SCAN;
+  private static int DELAY_MUTATE;
+
+  private final byte[] FAMILY = Bytes.toBytes("family");
+  private final byte[] ROW = Bytes.toBytes("row");
+  private final byte[] QUALIFIER = 

hbase git commit: HBASE-17449 Add explicit document on different timeout settings

2018-03-22 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 2bc99e4b5 -> 0a94c9c25


HBASE-17449 Add explicit document on different timeout settings


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

Branch: refs/heads/branch-2
Commit: 0a94c9c250bd82355ef3132795a6a1cc77fc2014
Parents: 2bc99e4
Author: Peter Somogyi 
Authored: Thu Feb 22 11:16:36 2018 +0100
Committer: Apekshit Sharma 
Committed: Thu Mar 22 12:45:06 2018 +0530

--
 .../hbase/TestClientOperationTimeout.java   | 196 +++
 src/main/asciidoc/_chapters/configuration.adoc  |  10 +
 2 files changed, 206 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0a94c9c2/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
new file mode 100644
index 000..61e63e8
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
@@ -0,0 +1,196 @@
+/**
+ * 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 org.apache.hadoop.hbase;
+
+import java.io.IOException;
+
+import java.net.SocketTimeoutException;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.client.Get;
+import org.apache.hadoop.hbase.client.Put;
+import org.apache.hadoop.hbase.client.ResultScanner;
+import org.apache.hadoop.hbase.client.RetriesExhaustedException;
+import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.hbase.client.Table;
+import org.apache.hadoop.hbase.regionserver.HRegionServer;
+import org.apache.hadoop.hbase.regionserver.RSRpcServices;
+import org.apache.hadoop.hbase.testclassification.ClientTests;
+import org.apache.hadoop.hbase.testclassification.MediumTests;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hbase.thirdparty.com.google.protobuf.RpcController;
+import org.apache.hbase.thirdparty.com.google.protobuf.ServiceException;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TestName;
+
+import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos;
+
+/**
+ * These tests verify that the RPC timeouts ('hbase.client.operation.timeout' 
and
+ * 'hbase.client.scanner.timeout.period') work correctly using a modified 
Region Server which
+ * injects delays to get, scan and mutate operations.
+ *
+ * When 'hbase.client.operation.timeout' is set and client operation is not 
completed in time the
+ * client will retry the operation 'hbase.client.retries.number' times. After 
that
+ * {@link SocketTimeoutException} will be thrown.
+ *
+ * Using 'hbase.client.scanner.timeout.period' configuration property similar 
behavior can be
+ * specified for scan related operations such as openScanner(), next(). If 
that times out
+ * {@link RetriesExhaustedException} will be thrown.
+ */
+@Category({ClientTests.class, MediumTests.class})
+public class TestClientOperationTimeout {
+
+  @ClassRule
+  public static final HBaseClassTestRule CLASS_RULE =
+  HBaseClassTestRule.forClass(TestClientOperationTimeout.class);
+
+  private static final HBaseTestingUtility TESTING_UTIL = new 
HBaseTestingUtility();
+
+  // Activate the delays after table creation to test get/scan/put
+  private static int DELAY_GET;
+  private static int DELAY_SCAN;
+  private static int DELAY_MUTATE;
+
+  private final byte[] FAMILY = Bytes.toBytes("family");
+  private final byte[] ROW = Bytes.toBytes("row");
+  private final byte[] QUALIFIER = Bytes.toBytes("qualifier");
+  

hbase git commit: HBASE-17449 Add explicit document on different timeout settings

2018-03-22 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 9601ab227 -> 68b2f5502


HBASE-17449 Add explicit document on different timeout settings


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

Branch: refs/heads/master
Commit: 68b2f5502a4c23318afce70a0c709178e2e521f7
Parents: 9601ab2
Author: Peter Somogyi 
Authored: Thu Feb 22 11:16:36 2018 +0100
Committer: Apekshit Sharma 
Committed: Thu Mar 22 12:06:22 2018 +0530

--
 .../hbase/TestClientOperationTimeout.java   | 196 +++
 src/main/asciidoc/_chapters/configuration.adoc  |  10 +
 2 files changed, 206 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/68b2f550/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
new file mode 100644
index 000..61e63e8
--- /dev/null
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
@@ -0,0 +1,196 @@
+/**
+ * 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 org.apache.hadoop.hbase;
+
+import java.io.IOException;
+
+import java.net.SocketTimeoutException;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.client.Get;
+import org.apache.hadoop.hbase.client.Put;
+import org.apache.hadoop.hbase.client.ResultScanner;
+import org.apache.hadoop.hbase.client.RetriesExhaustedException;
+import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.hbase.client.Table;
+import org.apache.hadoop.hbase.regionserver.HRegionServer;
+import org.apache.hadoop.hbase.regionserver.RSRpcServices;
+import org.apache.hadoop.hbase.testclassification.ClientTests;
+import org.apache.hadoop.hbase.testclassification.MediumTests;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hbase.thirdparty.com.google.protobuf.RpcController;
+import org.apache.hbase.thirdparty.com.google.protobuf.ServiceException;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TestName;
+
+import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos;
+
+/**
+ * These tests verify that the RPC timeouts ('hbase.client.operation.timeout' 
and
+ * 'hbase.client.scanner.timeout.period') work correctly using a modified 
Region Server which
+ * injects delays to get, scan and mutate operations.
+ *
+ * When 'hbase.client.operation.timeout' is set and client operation is not 
completed in time the
+ * client will retry the operation 'hbase.client.retries.number' times. After 
that
+ * {@link SocketTimeoutException} will be thrown.
+ *
+ * Using 'hbase.client.scanner.timeout.period' configuration property similar 
behavior can be
+ * specified for scan related operations such as openScanner(), next(). If 
that times out
+ * {@link RetriesExhaustedException} will be thrown.
+ */
+@Category({ClientTests.class, MediumTests.class})
+public class TestClientOperationTimeout {
+
+  @ClassRule
+  public static final HBaseClassTestRule CLASS_RULE =
+  HBaseClassTestRule.forClass(TestClientOperationTimeout.class);
+
+  private static final HBaseTestingUtility TESTING_UTIL = new 
HBaseTestingUtility();
+
+  // Activate the delays after table creation to test get/scan/put
+  private static int DELAY_GET;
+  private static int DELAY_SCAN;
+  private static int DELAY_MUTATE;
+
+  private final byte[] FAMILY = Bytes.toBytes("family");
+  private final byte[] ROW = Bytes.toBytes("row");
+  private final byte[] QUALIFIER = Bytes.toBytes("qualifier");
+  

hbase git commit: HBASE-20185 Fix ACL check for MasterRpcServices#execProcedure

2018-03-14 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2.0 548d8f8e0 -> bceacf333


HBASE-20185 Fix ACL check for MasterRpcServices#execProcedure


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

Branch: refs/heads/branch-2.0
Commit: bceacf3334e4b84cafb960ea90523182683f08f2
Parents: 548d8f8
Author: Apekshit Sharma 
Authored: Tue Mar 13 17:13:56 2018 +0530
Committer: Apekshit Sharma 
Committed: Wed Mar 14 19:11:11 2018 +0530

--
 .../hadoop/hbase/master/MasterRpcServices.java  |  4 ++-
 .../hbase/master/snapshot/SnapshotManager.java  |  8 +
 .../hbase/procedure/MasterProcedureManager.java | 31 
 .../flush/MasterFlushTableProcedureManager.java | 10 +++
 .../hbase/regionserver/RSRpcServices.java   |  2 +-
 .../hbase/security/access/AccessController.java |  3 ++
 .../procedure/SimpleMasterProcedureManager.java |  6 
 7 files changed, 49 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/bceacf33/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
index 1f09f59..74e8e41 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
@@ -57,6 +57,7 @@ import org.apache.hadoop.hbase.io.hfile.HFile;
 import org.apache.hadoop.hbase.ipc.CoprocessorRpcUtils;
 import org.apache.hadoop.hbase.ipc.PriorityFunction;
 import org.apache.hadoop.hbase.ipc.QosPriority;
+import org.apache.hadoop.hbase.ipc.RpcServer;
 import org.apache.hadoop.hbase.ipc.RpcServer.BlockingServiceAndInterface;
 import org.apache.hadoop.hbase.ipc.RpcServerFactory;
 import org.apache.hadoop.hbase.ipc.RpcServerInterface;
@@ -827,8 +828,8 @@ public class MasterRpcServices extends RSRpcServices
   @Override
   public ExecProcedureResponse execProcedure(RpcController controller,
   ExecProcedureRequest request) throws ServiceException {
-rpcPreCheck("execProcedure");
 try {
+  master.checkInitialized();
   ProcedureDescription desc = request.getProcedure();
   MasterProcedureManager mpm = 
master.getMasterProcedureManagerHost().getProcedureManager(
 desc.getSignature());
@@ -837,6 +838,7 @@ public class MasterRpcServices extends RSRpcServices
   + desc.getSignature()));
   }
   LOG.info(master.getClientIdAuditPrefix() + " procedure request for: " + 
desc.getSignature());
+  mpm.checkPermissions(desc, accessChecker, 
RpcServer.getRequestUser().orElse(null));
   mpm.execProcedure(desc);
   // send back the max amount of time the client should wait for the 
procedure
   // to complete

http://git-wip-us.apache.org/repos/asf/hbase/blob/bceacf33/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
index 3870601..1abd605 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
@@ -63,6 +63,7 @@ import 
org.apache.hadoop.hbase.procedure.ZKProcedureCoordinator;
 import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
 import org.apache.hadoop.hbase.security.AccessDeniedException;
 import org.apache.hadoop.hbase.security.User;
+import org.apache.hadoop.hbase.security.access.AccessChecker;
 import org.apache.hadoop.hbase.snapshot.ClientSnapshotDescriptionUtils;
 import org.apache.hadoop.hbase.snapshot.HBaseSnapshotException;
 import org.apache.hadoop.hbase.snapshot.RestoreSnapshotException;
@@ -1150,6 +1151,13 @@ public class SnapshotManager extends 
MasterProcedureManager implements Stoppable
   }
 
   @Override
+  public void checkPermissions(ProcedureDescription desc, AccessChecker 
accessChecker, User user)
+  throws IOException {
+// Done by AccessController as part of preSnapshot coprocessor hook 
(legacy code path).
+// In future, when we AC is removed for good, that check should be moved 
here.
+  }
+
+  @Override
   public boolean isProcedureDone(ProcedureDescription desc) throws IOException 
{
 return 

hbase git commit: HBASE-20185 Fix ACL check for MasterRpcServices#execProcedure

2018-03-14 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 b06aec445 -> ad425e860


HBASE-20185 Fix ACL check for MasterRpcServices#execProcedure


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

Branch: refs/heads/branch-2
Commit: ad425e8603fe07e45f9f00890cc4f063346ddc9f
Parents: b06aec4
Author: Apekshit Sharma 
Authored: Tue Mar 13 17:13:56 2018 +0530
Committer: Apekshit Sharma 
Committed: Wed Mar 14 19:08:17 2018 +0530

--
 .../hadoop/hbase/master/MasterRpcServices.java  |  4 ++-
 .../hbase/master/snapshot/SnapshotManager.java  |  8 +
 .../hbase/procedure/MasterProcedureManager.java | 31 
 .../flush/MasterFlushTableProcedureManager.java | 10 +++
 .../hbase/regionserver/RSRpcServices.java   |  2 +-
 .../hbase/security/access/AccessController.java |  3 ++
 .../procedure/SimpleMasterProcedureManager.java |  6 
 7 files changed, 49 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/ad425e86/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
index 8f92041..70f4cd4 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
@@ -57,6 +57,7 @@ import org.apache.hadoop.hbase.io.hfile.HFile;
 import org.apache.hadoop.hbase.ipc.CoprocessorRpcUtils;
 import org.apache.hadoop.hbase.ipc.PriorityFunction;
 import org.apache.hadoop.hbase.ipc.QosPriority;
+import org.apache.hadoop.hbase.ipc.RpcServer;
 import org.apache.hadoop.hbase.ipc.RpcServer.BlockingServiceAndInterface;
 import org.apache.hadoop.hbase.ipc.RpcServerFactory;
 import org.apache.hadoop.hbase.ipc.RpcServerInterface;
@@ -831,8 +832,8 @@ public class MasterRpcServices extends RSRpcServices
   @Override
   public ExecProcedureResponse execProcedure(RpcController controller,
   ExecProcedureRequest request) throws ServiceException {
-rpcPreCheck("execProcedure");
 try {
+  master.checkInitialized();
   ProcedureDescription desc = request.getProcedure();
   MasterProcedureManager mpm = 
master.getMasterProcedureManagerHost().getProcedureManager(
 desc.getSignature());
@@ -841,6 +842,7 @@ public class MasterRpcServices extends RSRpcServices
   + desc.getSignature()));
   }
   LOG.info(master.getClientIdAuditPrefix() + " procedure request for: " + 
desc.getSignature());
+  mpm.checkPermissions(desc, accessChecker, 
RpcServer.getRequestUser().orElse(null));
   mpm.execProcedure(desc);
   // send back the max amount of time the client should wait for the 
procedure
   // to complete

http://git-wip-us.apache.org/repos/asf/hbase/blob/ad425e86/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
index 3870601..1abd605 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
@@ -63,6 +63,7 @@ import 
org.apache.hadoop.hbase.procedure.ZKProcedureCoordinator;
 import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
 import org.apache.hadoop.hbase.security.AccessDeniedException;
 import org.apache.hadoop.hbase.security.User;
+import org.apache.hadoop.hbase.security.access.AccessChecker;
 import org.apache.hadoop.hbase.snapshot.ClientSnapshotDescriptionUtils;
 import org.apache.hadoop.hbase.snapshot.HBaseSnapshotException;
 import org.apache.hadoop.hbase.snapshot.RestoreSnapshotException;
@@ -1150,6 +1151,13 @@ public class SnapshotManager extends 
MasterProcedureManager implements Stoppable
   }
 
   @Override
+  public void checkPermissions(ProcedureDescription desc, AccessChecker 
accessChecker, User user)
+  throws IOException {
+// Done by AccessController as part of preSnapshot coprocessor hook 
(legacy code path).
+// In future, when we AC is removed for good, that check should be moved 
here.
+  }
+
+  @Override
   public boolean isProcedureDone(ProcedureDescription desc) throws IOException 
{
 return 

hbase git commit: HBASE-20185 Fix ACL check for MasterRpcServices#execProcedure

2018-03-14 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 565085383 -> 84ee32c72


HBASE-20185 Fix ACL check for MasterRpcServices#execProcedure


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

Branch: refs/heads/master
Commit: 84ee32c72341c2ebbaa77fe26bcb1ed57f3d8352
Parents: 5650853
Author: Apekshit Sharma 
Authored: Tue Mar 13 17:13:56 2018 +0530
Committer: Apekshit Sharma 
Committed: Wed Mar 14 19:02:19 2018 +0530

--
 .../master/LogRollMasterProcedureManager.java   | 10 ++-
 .../hadoop/hbase/master/MasterRpcServices.java  |  4 ++-
 .../hbase/master/snapshot/SnapshotManager.java  |  8 +
 .../hbase/procedure/MasterProcedureManager.java | 31 
 .../flush/MasterFlushTableProcedureManager.java | 10 +++
 .../hbase/regionserver/RSRpcServices.java   |  2 +-
 .../hbase/security/access/AccessController.java |  3 ++
 .../procedure/SimpleMasterProcedureManager.java |  6 
 8 files changed, 58 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/84ee32c7/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/LogRollMasterProcedureManager.java
--
diff --git 
a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/LogRollMasterProcedureManager.java
 
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/LogRollMasterProcedureManager.java
index 486b991..d53b284 100644
--- 
a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/LogRollMasterProcedureManager.java
+++ 
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/LogRollMasterProcedureManager.java
@@ -38,6 +38,8 @@ import org.apache.hadoop.hbase.procedure.Procedure;
 import org.apache.hadoop.hbase.procedure.ProcedureCoordinator;
 import org.apache.hadoop.hbase.procedure.ProcedureCoordinatorRpcs;
 import org.apache.hadoop.hbase.procedure.RegionServerProcedureManager;
+import org.apache.hadoop.hbase.security.User;
+import org.apache.hadoop.hbase.security.access.AccessChecker;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -47,7 +49,7 @@ import 
org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDe
 
 /**
  * Master procedure manager for coordinated cluster-wide WAL roll operation, 
which is run during
- * backup operation, see {@link MasterProcedureManager} and and {@link 
RegionServerProcedureManager}
+ * backup operation, see {@link MasterProcedureManager} and {@link 
RegionServerProcedureManager}
  */
 @InterfaceAudience.Private
 public class LogRollMasterProcedureManager extends MasterProcedureManager {
@@ -157,6 +159,12 @@ public class LogRollMasterProcedureManager extends 
MasterProcedureManager {
 monitor.rethrowException();
   }
 
+  @Override
+  public void checkPermissions(ProcedureDescription desc, AccessChecker 
accessChecker, User user)
+  throws IOException {
+// TODO: what permissions checks are needed here?
+  }
+
   private boolean isBackupEnabled() {
 return BackupManager.isBackupEnabled(master.getConfiguration());
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/84ee32c7/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
index def4640..b63b448 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
@@ -57,6 +57,7 @@ import org.apache.hadoop.hbase.io.hfile.HFile;
 import org.apache.hadoop.hbase.ipc.CoprocessorRpcUtils;
 import org.apache.hadoop.hbase.ipc.PriorityFunction;
 import org.apache.hadoop.hbase.ipc.QosPriority;
+import org.apache.hadoop.hbase.ipc.RpcServer;
 import org.apache.hadoop.hbase.ipc.RpcServer.BlockingServiceAndInterface;
 import org.apache.hadoop.hbase.ipc.RpcServerFactory;
 import org.apache.hadoop.hbase.ipc.RpcServerInterface;
@@ -833,8 +834,8 @@ public class MasterRpcServices extends RSRpcServices
   @Override
   public ExecProcedureResponse execProcedure(RpcController controller,
   ExecProcedureRequest request) throws ServiceException {
-rpcPreCheck("execProcedure");
 try {
+  master.checkInitialized();
   ProcedureDescription desc = request.getProcedure();
   MasterProcedureManager mpm = 

[2/2] hbase git commit: HBASE-20181 Logging and minor logic improvements in BackupLogCleaner

2018-03-14 Thread appy
HBASE-20181 Logging and minor logic improvements in BackupLogCleaner

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/master
Commit: 000a84cb4afce33e6d6601f65955f2de9924cf8a
Parents: 810567f
Author: BELUGA BEHR 
Authored: Wed Mar 14 09:56:46 2018 +0530
Committer: Apekshit Sharma 
Committed: Wed Mar 14 12:30:04 2018 +0530

--
 .../hbase/backup/master/BackupLogCleaner.java   | 35 +---
 1 file changed, 16 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/000a84cb/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
--
diff --git 
a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
 
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
index bd13d6e..093ef76 100644
--- 
a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
+++ 
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
@@ -20,9 +20,11 @@ package org.apache.hadoop.hbase.backup.master;
 
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.commons.collections.MapUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.hbase.HBaseInterfaceAudience;
@@ -36,6 +38,7 @@ import org.apache.hadoop.hbase.master.HMaster;
 import org.apache.hadoop.hbase.master.MasterServices;
 import org.apache.hadoop.hbase.master.cleaner.BaseLogCleanerDelegate;
 import org.apache.yetus.audience.InterfaceAudience;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -55,8 +58,9 @@ public class BackupLogCleaner extends BaseLogCleanerDelegate {
 
   @Override
   public void init(Map params) {
-if (params != null && params.containsKey(HMaster.MASTER)) {
-  MasterServices master = (MasterServices) params.get(HMaster.MASTER);
+MasterServices master = (MasterServices) MapUtils.getObject(params,
+  HMaster.MASTER);
+if (master != null) {
   conn = master.getConnection();
   if (getConf() == null) {
 super.setConf(conn.getConfiguration());
@@ -76,14 +80,11 @@ public class BackupLogCleaner extends 
BaseLogCleanerDelegate {
 // all members of this class are null if backup is disabled,
 // so we cannot filter the files
 if (this.getConf() == null || !BackupManager.isBackupEnabled(getConf())) {
-  if (LOG.isDebugEnabled()) {
-LOG.debug("Backup is not enabled. Check your "
-+ BackupRestoreConstants.BACKUP_ENABLE_KEY + " setting");
-  }
+  LOG.debug("Backup is not enabled. Check your {} setting",
+  BackupRestoreConstants.BACKUP_ENABLE_KEY);
   return files;
 }
 
-List list = new ArrayList<>();
 try (final BackupSystemTable table = new BackupSystemTable(conn)) {
   // If we do not have recorded backup sessions
   try {
@@ -92,31 +93,28 @@ public class BackupLogCleaner extends 
BaseLogCleanerDelegate {
   return files;
 }
   } catch (TableNotFoundException tnfe) {
-LOG.warn("backup system table is not available" + tnfe.getMessage());
+LOG.warn("Backup system table is not available: {}", 
tnfe.getMessage());
 return files;
   }
 
+  List list = new ArrayList<>();
   Map walFilesDeletableMap = 
table.areWALFilesDeletable(files);
   for (Map.Entry entry: 
walFilesDeletableMap.entrySet()) {
 FileStatus file = entry.getKey();
 String wal = file.getPath().toString();
 boolean deletable = entry.getValue();
 if (deletable) {
-  if (LOG.isDebugEnabled()) {
-LOG.debug("Found log file in backup system table, deleting: " + 
wal);
-  }
+  LOG.debug("Found log file in backup system table, deleting: {}", 
wal);
   list.add(file);
 } else {
-  if (LOG.isDebugEnabled()) {
-LOG.debug("Didn't find this log in backup system table, keeping: " 
+ wal);
-  }
+  LOG.debug("Did not find this log in backup system table, keeping: 
{}", wal);
 }
   }
   return list;
 } catch (IOException e) {
   LOG.error("Failed to get backup system table table, therefore will keep 
all files", e);
   // nothing to delete
-  return new 

[1/2] hbase git commit: Revert "HBASE-20181 Logging and minor logic improvements in BackupLogCleaner" - missed author

2018-03-14 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master e83ac38d6 -> 000a84cb4


Revert "HBASE-20181 Logging and minor logic improvements in BackupLogCleaner" - 
missed author

This reverts commit 5bfc5745ab8e94d09851980dce2e243620f412ff.


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

Branch: refs/heads/master
Commit: 810567f65abde105ec55c4337c68c350e353b2bc
Parents: e83ac38
Author: Apekshit Sharma 
Authored: Wed Mar 14 12:28:50 2018 +0530
Committer: Apekshit Sharma 
Committed: Wed Mar 14 12:29:24 2018 +0530

--
 .../hbase/backup/master/BackupLogCleaner.java   | 35 +++-
 1 file changed, 19 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/810567f6/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
--
diff --git 
a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
 
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
index 093ef76..bd13d6e 100644
--- 
a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
+++ 
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
@@ -20,11 +20,9 @@ package org.apache.hadoop.hbase.backup.master;
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.commons.collections.MapUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.hbase.HBaseInterfaceAudience;
@@ -38,7 +36,6 @@ import org.apache.hadoop.hbase.master.HMaster;
 import org.apache.hadoop.hbase.master.MasterServices;
 import org.apache.hadoop.hbase.master.cleaner.BaseLogCleanerDelegate;
 import org.apache.yetus.audience.InterfaceAudience;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -58,9 +55,8 @@ public class BackupLogCleaner extends BaseLogCleanerDelegate {
 
   @Override
   public void init(Map params) {
-MasterServices master = (MasterServices) MapUtils.getObject(params,
-  HMaster.MASTER);
-if (master != null) {
+if (params != null && params.containsKey(HMaster.MASTER)) {
+  MasterServices master = (MasterServices) params.get(HMaster.MASTER);
   conn = master.getConnection();
   if (getConf() == null) {
 super.setConf(conn.getConfiguration());
@@ -80,11 +76,14 @@ public class BackupLogCleaner extends 
BaseLogCleanerDelegate {
 // all members of this class are null if backup is disabled,
 // so we cannot filter the files
 if (this.getConf() == null || !BackupManager.isBackupEnabled(getConf())) {
-  LOG.debug("Backup is not enabled. Check your {} setting",
-  BackupRestoreConstants.BACKUP_ENABLE_KEY);
+  if (LOG.isDebugEnabled()) {
+LOG.debug("Backup is not enabled. Check your "
++ BackupRestoreConstants.BACKUP_ENABLE_KEY + " setting");
+  }
   return files;
 }
 
+List list = new ArrayList<>();
 try (final BackupSystemTable table = new BackupSystemTable(conn)) {
   // If we do not have recorded backup sessions
   try {
@@ -93,28 +92,31 @@ public class BackupLogCleaner extends 
BaseLogCleanerDelegate {
   return files;
 }
   } catch (TableNotFoundException tnfe) {
-LOG.warn("Backup system table is not available: {}", 
tnfe.getMessage());
+LOG.warn("backup system table is not available" + tnfe.getMessage());
 return files;
   }
 
-  List list = new ArrayList<>();
   Map walFilesDeletableMap = 
table.areWALFilesDeletable(files);
   for (Map.Entry entry: 
walFilesDeletableMap.entrySet()) {
 FileStatus file = entry.getKey();
 String wal = file.getPath().toString();
 boolean deletable = entry.getValue();
 if (deletable) {
-  LOG.debug("Found log file in backup system table, deleting: {}", 
wal);
+  if (LOG.isDebugEnabled()) {
+LOG.debug("Found log file in backup system table, deleting: " + 
wal);
+  }
   list.add(file);
 } else {
-  LOG.debug("Did not find this log in backup system table, keeping: 
{}", wal);
+  if (LOG.isDebugEnabled()) {
+LOG.debug("Didn't find this log in backup system table, keeping: " 
+ wal);
+  }
 }
   }
   return list;
 } catch (IOException e) {
   LOG.error("Failed to get 

hbase git commit: HBASE-20181 Logging and minor logic improvements in BackupLogCleaner

2018-03-13 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master b7308ee01 -> 5bfc5745a


HBASE-20181 Logging and minor logic improvements in BackupLogCleaner


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

Branch: refs/heads/master
Commit: 5bfc5745ab8e94d09851980dce2e243620f412ff
Parents: b7308ee
Author: Apekshit Sharma 
Authored: Wed Mar 14 09:56:46 2018 +0530
Committer: Apekshit Sharma 
Committed: Wed Mar 14 09:56:46 2018 +0530

--
 .../hbase/backup/master/BackupLogCleaner.java   | 35 +---
 1 file changed, 16 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/5bfc5745/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
--
diff --git 
a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
 
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
index bd13d6e..093ef76 100644
--- 
a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
+++ 
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java
@@ -20,9 +20,11 @@ package org.apache.hadoop.hbase.backup.master;
 
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.commons.collections.MapUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.hbase.HBaseInterfaceAudience;
@@ -36,6 +38,7 @@ import org.apache.hadoop.hbase.master.HMaster;
 import org.apache.hadoop.hbase.master.MasterServices;
 import org.apache.hadoop.hbase.master.cleaner.BaseLogCleanerDelegate;
 import org.apache.yetus.audience.InterfaceAudience;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -55,8 +58,9 @@ public class BackupLogCleaner extends BaseLogCleanerDelegate {
 
   @Override
   public void init(Map params) {
-if (params != null && params.containsKey(HMaster.MASTER)) {
-  MasterServices master = (MasterServices) params.get(HMaster.MASTER);
+MasterServices master = (MasterServices) MapUtils.getObject(params,
+  HMaster.MASTER);
+if (master != null) {
   conn = master.getConnection();
   if (getConf() == null) {
 super.setConf(conn.getConfiguration());
@@ -76,14 +80,11 @@ public class BackupLogCleaner extends 
BaseLogCleanerDelegate {
 // all members of this class are null if backup is disabled,
 // so we cannot filter the files
 if (this.getConf() == null || !BackupManager.isBackupEnabled(getConf())) {
-  if (LOG.isDebugEnabled()) {
-LOG.debug("Backup is not enabled. Check your "
-+ BackupRestoreConstants.BACKUP_ENABLE_KEY + " setting");
-  }
+  LOG.debug("Backup is not enabled. Check your {} setting",
+  BackupRestoreConstants.BACKUP_ENABLE_KEY);
   return files;
 }
 
-List list = new ArrayList<>();
 try (final BackupSystemTable table = new BackupSystemTable(conn)) {
   // If we do not have recorded backup sessions
   try {
@@ -92,31 +93,28 @@ public class BackupLogCleaner extends 
BaseLogCleanerDelegate {
   return files;
 }
   } catch (TableNotFoundException tnfe) {
-LOG.warn("backup system table is not available" + tnfe.getMessage());
+LOG.warn("Backup system table is not available: {}", 
tnfe.getMessage());
 return files;
   }
 
+  List list = new ArrayList<>();
   Map walFilesDeletableMap = 
table.areWALFilesDeletable(files);
   for (Map.Entry entry: 
walFilesDeletableMap.entrySet()) {
 FileStatus file = entry.getKey();
 String wal = file.getPath().toString();
 boolean deletable = entry.getValue();
 if (deletable) {
-  if (LOG.isDebugEnabled()) {
-LOG.debug("Found log file in backup system table, deleting: " + 
wal);
-  }
+  LOG.debug("Found log file in backup system table, deleting: {}", 
wal);
   list.add(file);
 } else {
-  if (LOG.isDebugEnabled()) {
-LOG.debug("Didn't find this log in backup system table, keeping: " 
+ wal);
-  }
+  LOG.debug("Did not find this log in backup system table, keeping: 
{}", wal);
 }
   }
   return list;
 } catch (IOException e) {
   LOG.error("Failed to get backup system table table, therefore will keep 
all files", e);
   // nothing to 

hbase git commit: HBASE-19449 Minor logging change in HFileArchiver

2018-03-12 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 a58f65212 -> 4033405b3


HBASE-19449 Minor logging change in HFileArchiver

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/branch-2
Commit: 4033405b362e1b64cdd34f5eeb9157bb967a8eae
Parents: a58f652
Author: BELUGA BEHR 
Authored: Mon Mar 12 22:00:38 2018 +0530
Committer: Apekshit Sharma 
Committed: Mon Mar 12 22:12:27 2018 +0530

--
 .../main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/4033405b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java
index 85e0c8a..dea6bf8 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java
@@ -255,7 +255,7 @@ public class HFileArchiver {
 }
 
 // otherwise we attempt to archive the store files
-if (LOG.isDebugEnabled()) LOG.debug("Archiving compacted store files.");
+LOG.debug("Archiving compacted store files.");
 
 // Wrap the storefile into a File
 StoreToFile getStorePath = new StoreToFile(fs);



hbase git commit: HBASE-19449 Minor logging change in HFileArchiver

2018-03-12 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 1102e1e25 -> f30dfc69b


HBASE-19449 Minor logging change in HFileArchiver

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/master
Commit: f30dfc69bb49729609f03c23f19b0091065d7103
Parents: 1102e1e
Author: BELUGA BEHR 
Authored: Mon Mar 12 22:00:38 2018 +0530
Committer: Apekshit Sharma 
Committed: Mon Mar 12 22:01:56 2018 +0530

--
 .../main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f30dfc69/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java
index 85e0c8a..dea6bf8 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java
@@ -255,7 +255,7 @@ public class HFileArchiver {
 }
 
 // otherwise we attempt to archive the store files
-if (LOG.isDebugEnabled()) LOG.debug("Archiving compacted store files.");
+LOG.debug("Archiving compacted store files.");
 
 // Wrap the storefile into a File
 StoreToFile getStorePath = new StoreToFile(fs);



hbase git commit: HBASE-20070 addendum for missing echo. Website generation is failing.

2018-03-03 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 671d36097 -> b59c39d94


HBASE-20070 addendum for missing echo. Website generation is failing.


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

Branch: refs/heads/branch-2
Commit: b59c39d9428b8e0484767b71f0090f5ef45496b0
Parents: 671d360
Author: Sean Busbey 
Authored: Sat Mar 3 00:25:20 2018 -0600
Committer: Apekshit Sharma 
Committed: Sun Mar 4 09:04:06 2018 +0530

--
 dev-support/jenkins-scripts/generate-hbase-website.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b59c39d9/dev-support/jenkins-scripts/generate-hbase-website.sh
--
diff --git a/dev-support/jenkins-scripts/generate-hbase-website.sh 
b/dev-support/jenkins-scripts/generate-hbase-website.sh
index 0d7af75..c25c895 100644
--- a/dev-support/jenkins-scripts/generate-hbase-website.sh
+++ b/dev-support/jenkins-scripts/generate-hbase-website.sh
@@ -263,7 +263,7 @@ echo "Change set saved to patch 
${working_dir}/${CURRENT_HBASE_COMMIT}.patch"
 if [ -n "${publish}" ]; then
   echo "Publishing changes to remote repo..."
   if git push origin asf-site; then
-"changes pushed."
+echo "changes pushed."
   else
 echo "Failed to push to asf-site. Website not updated."
 exit 1



hbase git commit: HBASE-20070 addendum for missing echo. Website generation is failing.

2018-03-03 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master ff550edab -> 485af49e5


HBASE-20070 addendum for missing echo. Website generation is failing.


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

Branch: refs/heads/master
Commit: 485af49e53cb38e2af4635f2c3bc0b33e15ba0a1
Parents: ff550ed
Author: Sean Busbey 
Authored: Sat Mar 3 00:25:20 2018 -0600
Committer: Apekshit Sharma 
Committed: Sun Mar 4 09:03:19 2018 +0530

--
 dev-support/jenkins-scripts/generate-hbase-website.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/485af49e/dev-support/jenkins-scripts/generate-hbase-website.sh
--
diff --git a/dev-support/jenkins-scripts/generate-hbase-website.sh 
b/dev-support/jenkins-scripts/generate-hbase-website.sh
index 0d7af75..c25c895 100644
--- a/dev-support/jenkins-scripts/generate-hbase-website.sh
+++ b/dev-support/jenkins-scripts/generate-hbase-website.sh
@@ -263,7 +263,7 @@ echo "Change set saved to patch 
${working_dir}/${CURRENT_HBASE_COMMIT}.patch"
 if [ -n "${publish}" ]; then
   echo "Publishing changes to remote repo..."
   if git push origin asf-site; then
-"changes pushed."
+echo "changes pushed."
   else
 echo "Failed to push to asf-site. Website not updated."
 exit 1



hbase git commit: HBASE-19114 addendum. Split out o.a.h.h.zookeeper from hbase-server and hbase-client. Ruby scripts also used ZooKeeperWatcher.

2018-03-03 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 2b1b2c849 -> ff550edab


HBASE-19114 addendum. Split out o.a.h.h.zookeeper from hbase-server and 
hbase-client. Ruby scripts also used ZooKeeperWatcher.

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/master
Commit: ff550edabff1ba78b392f6e0eeb805aa3170b335
Parents: 2b1b2c8
Author: Csaba Skrabak 
Authored: Fri Mar 2 11:09:50 2018 -0800
Committer: Apekshit Sharma 
Committed: Sat Mar 3 21:06:53 2018 +0530

--
 bin/draining_servers.rb  | 6 +++---
 bin/get-active-master.rb | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/ff550eda/bin/draining_servers.rb
--
diff --git a/bin/draining_servers.rb b/bin/draining_servers.rb
index 27cc0fa..0d29c19 100644
--- a/bin/draining_servers.rb
+++ b/bin/draining_servers.rb
@@ -85,7 +85,7 @@ def addServers(_options, hostOrServers)
   config = HBaseConfiguration.create
   servers = getServerNames(hostOrServers, config)
 
-  zkw = org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.new(config, 
'draining_servers', nil)
+  zkw = org.apache.hadoop.hbase.zookeeper.ZKWatcher.new(config, 
'draining_servers', nil)
   parentZnode = zkw.znodePaths.drainingZNode
 
   begin
@@ -102,7 +102,7 @@ def removeServers(_options, hostOrServers)
   config = HBaseConfiguration.create
   servers = getServerNames(hostOrServers, config)
 
-  zkw = org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.new(config, 
'draining_servers', nil)
+  zkw = org.apache.hadoop.hbase.zookeeper.ZKWatcher.new(config, 
'draining_servers', nil)
   parentZnode = zkw.znodePaths.drainingZNode
 
   begin
@@ -119,7 +119,7 @@ end
 def listServers(_options)
   config = HBaseConfiguration.create
 
-  zkw = org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.new(config, 
'draining_servers', nil)
+  zkw = org.apache.hadoop.hbase.zookeeper.ZKWatcher.new(config, 
'draining_servers', nil)
   parentZnode = zkw.znodePaths.drainingZNode
 
   servers = ZKUtil.listChildrenNoWatch(zkw, parentZnode)

http://git-wip-us.apache.org/repos/asf/hbase/blob/ff550eda/bin/get-active-master.rb
--
diff --git a/bin/get-active-master.rb b/bin/get-active-master.rb
index 0cd3d02..d8c96fe 100644
--- a/bin/get-active-master.rb
+++ b/bin/get-active-master.rb
@@ -20,7 +20,7 @@
 include Java
 java_import org.apache.hadoop.hbase.HBaseConfiguration
 java_import org.apache.hadoop.hbase.ServerName
-java_import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher
+java_import org.apache.hadoop.hbase.zookeeper.ZKWatcher
 java_import org.apache.hadoop.hbase.zookeeper.MasterAddressTracker
 
 # disable debug/info logging on this script for clarity
@@ -30,7 +30,7 @@ 
org.apache.log4j.Logger.getLogger('org.apache.zookeeper').setLevel(log_level)
 
 config = HBaseConfiguration.create
 
-zk = ZooKeeperWatcher.new(config, 'get-active-master', nil)
+zk = ZKWatcher.new(config, 'get-active-master', nil)
 begin
   puts MasterAddressTracker.getMasterAddress(zk).getHostname
 ensure



hbase git commit: HBASE-19114 addendum. Split out o.a.h.h.zookeeper from hbase-server and hbase-client. Ruby scripts also used ZooKeeperWatcher.

2018-03-03 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 17de43233 -> 671d36097


HBASE-19114 addendum. Split out o.a.h.h.zookeeper from hbase-server and 
hbase-client. Ruby scripts also used ZooKeeperWatcher.

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/branch-2
Commit: 671d36097f91afb51c6183c6414c4df6bc319d82
Parents: 17de432
Author: Csaba Skrabak 
Authored: Fri Mar 2 11:09:50 2018 -0800
Committer: Apekshit Sharma 
Committed: Sat Mar 3 21:06:21 2018 +0530

--
 bin/draining_servers.rb  | 6 +++---
 bin/get-active-master.rb | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/671d3609/bin/draining_servers.rb
--
diff --git a/bin/draining_servers.rb b/bin/draining_servers.rb
index 27cc0fa..0d29c19 100644
--- a/bin/draining_servers.rb
+++ b/bin/draining_servers.rb
@@ -85,7 +85,7 @@ def addServers(_options, hostOrServers)
   config = HBaseConfiguration.create
   servers = getServerNames(hostOrServers, config)
 
-  zkw = org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.new(config, 
'draining_servers', nil)
+  zkw = org.apache.hadoop.hbase.zookeeper.ZKWatcher.new(config, 
'draining_servers', nil)
   parentZnode = zkw.znodePaths.drainingZNode
 
   begin
@@ -102,7 +102,7 @@ def removeServers(_options, hostOrServers)
   config = HBaseConfiguration.create
   servers = getServerNames(hostOrServers, config)
 
-  zkw = org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.new(config, 
'draining_servers', nil)
+  zkw = org.apache.hadoop.hbase.zookeeper.ZKWatcher.new(config, 
'draining_servers', nil)
   parentZnode = zkw.znodePaths.drainingZNode
 
   begin
@@ -119,7 +119,7 @@ end
 def listServers(_options)
   config = HBaseConfiguration.create
 
-  zkw = org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.new(config, 
'draining_servers', nil)
+  zkw = org.apache.hadoop.hbase.zookeeper.ZKWatcher.new(config, 
'draining_servers', nil)
   parentZnode = zkw.znodePaths.drainingZNode
 
   servers = ZKUtil.listChildrenNoWatch(zkw, parentZnode)

http://git-wip-us.apache.org/repos/asf/hbase/blob/671d3609/bin/get-active-master.rb
--
diff --git a/bin/get-active-master.rb b/bin/get-active-master.rb
index 0cd3d02..d8c96fe 100644
--- a/bin/get-active-master.rb
+++ b/bin/get-active-master.rb
@@ -20,7 +20,7 @@
 include Java
 java_import org.apache.hadoop.hbase.HBaseConfiguration
 java_import org.apache.hadoop.hbase.ServerName
-java_import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher
+java_import org.apache.hadoop.hbase.zookeeper.ZKWatcher
 java_import org.apache.hadoop.hbase.zookeeper.MasterAddressTracker
 
 # disable debug/info logging on this script for clarity
@@ -30,7 +30,7 @@ 
org.apache.log4j.Logger.getLogger('org.apache.zookeeper').setLevel(log_level)
 
 config = HBaseConfiguration.create
 
-zk = ZooKeeperWatcher.new(config, 'get-active-master', nil)
+zk = ZKWatcher.new(config, 'get-active-master', nil)
 begin
   puts MasterAddressTracker.getMasterAddress(zk).getHostname
 ensure



hbase git commit: HBASE-19400 Add missing security checks in MasterRpcServices

2018-02-28 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1 cdbf001d2 -> c4401b607


HBASE-19400 Add missing security checks in MasterRpcServices

- Added ADMIN permission check for following rpc calls:
  normalize, setNormalizerRunning, runCatalogScan, enableCatalogJanitor, 
runCleanerChore,
  setCleanerChoreRunning, execMasterService, execProcedure, execProcedureWithRet
- Moved authorizationEnabled check to start of AccessChecker's functions. 
Currently, and IDK why,
  we call authManager.authorize() first and then discard its result if 
authorizationEnabled is false. Weird.



HBASE-19401 Add missing security checks in RSRpcServices


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

Branch: refs/heads/branch-1
Commit: c4401b607355ae5f6b5e9dee539085054f624910
Parents: cdbf001
Author: Apekshit Sharma 
Authored: Tue Feb 13 12:33:43 2018 -0800
Committer: Apekshit Sharma 
Committed: Wed Feb 28 11:52:16 2018 -0800

--
 .../hbase/rsgroup/RSGroupAdminEndpoint.java |   4 +-
 .../hadoop/hbase/master/MasterRpcServices.java  | 108 +++
 .../hbase/regionserver/HRegionServer.java   |   2 +-
 .../hbase/regionserver/RSRpcServices.java   |  47 ++-
 .../hbase/security/access/AccessChecker.java|  79 +++--
 .../hbase/security/access/AccessController.java |   5 +-
 .../security/access/TestAccessController.java   |  13 +-
 .../access/TestAdminOnlyOperations.java | 311 +++
 8 files changed, 458 insertions(+), 111 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c4401b60/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
--
diff --git 
a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
 
b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
index fb9c6a6..26111c2 100644
--- 
a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
+++ 
b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
@@ -123,9 +123,7 @@ public class RSGroupAdminEndpoint extends 
RSGroupAdminService
 
   @Override
   public void stop(CoprocessorEnvironment env) {
-if (accessChecker.getAuthManager() != null) {
-  TableAuthManager.release(accessChecker.getAuthManager());
-}
+accessChecker.stop();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/c4401b60/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
index 08a2033..0ccdc27 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
@@ -192,6 +192,7 @@ import org.apache.hadoop.hbase.regionserver.RSRpcServices;
 import org.apache.hadoop.hbase.security.User;
 import org.apache.hadoop.hbase.security.access.AccessChecker;
 import org.apache.hadoop.hbase.security.access.AccessController;
+import org.apache.hadoop.hbase.security.access.Permission;
 import org.apache.hadoop.hbase.security.visibility.VisibilityController;
 import org.apache.hadoop.hbase.snapshot.ClientSnapshotDescriptionUtils;
 import org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils;
@@ -249,6 +250,24 @@ public class MasterRpcServices extends RSRpcServices
 return new MasterAnnotationReadingPriorityFunction(this);
   }
 
+  /**
+   * Checks for the following pre-checks in order:
+   * 
+   *   Master is initialized
+   *   Rpc caller has admin permissions
+   * 
+   * @param requestName name of rpc request. Used in reporting failures to 
provide context.
+   * @throws ServiceException If any of the above listed pre-check fails.
+   */
+  private void rpcPreCheck(String requestName) throws ServiceException {
+try {
+  master.checkInitialized();
+  requirePermission(requestName, Permission.Action.ADMIN);
+} catch (IOException ioe) {
+  throw new ServiceException(ioe);
+}
+  }
+
   enum BalanceSwitchMode {
 SYNC,
 ASYNC
@@ -293,25 +312,6 @@ public class MasterRpcServices extends RSRpcServices
   }
 
   /**
-   * Sets normalizer on/off flag in ZK.
-   */
-  public boolean normalizerSwitch(boolean on) {
-boolean oldValue = master.getRegionNormalizerTracker().isNormalizerOn();
-boolean newValue = 

hbase git commit: HBASE-19614 Use ArrayDeque as Queue instead of LinkedList in CompoundBloomFilterWriter

2018-02-27 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 0fa5d69fc -> f01c90bc0


HBASE-19614 Use ArrayDeque as Queue instead of LinkedList in 
CompoundBloomFilterWriter

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/master
Commit: f01c90bc0e3b44fbc2c500a631cd49202d2cb975
Parents: 0fa5d69
Author: BELUGA BEHR 
Authored: Tue Feb 27 11:49:30 2018 -0800
Committer: Apekshit Sharma 
Committed: Tue Feb 27 11:50:52 2018 -0800

--
 .../apache/hadoop/hbase/io/hfile/CompoundBloomFilterWriter.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f01c90bc/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CompoundBloomFilterWriter.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CompoundBloomFilterWriter.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CompoundBloomFilterWriter.java
index 0b58b21..d63a824 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CompoundBloomFilterWriter.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CompoundBloomFilterWriter.java
@@ -20,7 +20,7 @@ package org.apache.hadoop.hbase.io.hfile;
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
-import java.util.LinkedList;
+import java.util.ArrayDeque;
 import java.util.Queue;
 
 import org.apache.hadoop.hbase.Cell;
@@ -71,7 +71,7 @@ public class CompoundBloomFilterWriter extends 
CompoundBloomFilterBase
 BloomFilterChunk chunk;
   }
 
-  private Queue readyChunks = new LinkedList<>();
+  private Queue readyChunks = new ArrayDeque<>();
 
   /** The first key in the current Bloom filter chunk. */
   private byte[] firstKeyInChunk = null;



[1/2] hbase git commit: HBASE-19400 Add missing security checks in MasterRpcServices

2018-02-22 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 f3753e394 -> 991e163cc


HBASE-19400 Add missing security checks in MasterRpcServices

- Added ADMIN permission check for following rpc calls:
  normalize, setNormalizerRunning, runCatalogScan, enableCatalogJanitor, 
runCleanerChore,
  setCleanerChoreRunning, execMasterService, execProcedure, execProcedureWithRet
- Moved authorizationEnabled check to start of AccessChecker's functions. 
Currently, and IDK why,
  we call authManager.authorize() first and then discard its result if 
authorizationEnabled is false. Weird.


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

Branch: refs/heads/branch-2
Commit: 161f9de8e5e32c5fe3ea1dfb1c67802629ad1b23
Parents: f3753e3
Author: Apekshit Sharma 
Authored: Tue Feb 13 12:33:43 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Feb 22 16:23:43 2018 -0800

--
 .../hbase/rsgroup/RSGroupAdminEndpoint.java |   3 +-
 .../hadoop/hbase/master/MasterRpcServices.java  | 120 -
 .../hbase/regionserver/HRegionServer.java   |   2 +-
 .../hbase/regionserver/RSRpcServices.java   |  25 +-
 .../hbase/security/access/AccessChecker.java| 102 
 .../hbase/security/access/AccessController.java |   3 +-
 .../security/access/TestAccessController.java   |  13 +-
 .../access/TestAdminOnlyOperations.java | 244 +++
 8 files changed, 388 insertions(+), 124 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/161f9de8/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
--
diff --git 
a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
 
b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
index fd632b1..ce74bb4 100644
--- 
a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
+++ 
b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
@@ -81,7 +81,6 @@ import org.apache.hadoop.hbase.security.User;
 import org.apache.hadoop.hbase.security.UserProvider;
 import org.apache.hadoop.hbase.security.access.AccessChecker;
 import org.apache.hadoop.hbase.security.access.Permission.Action;
-import org.apache.hadoop.hbase.security.access.TableAuthManager;
 import org.apache.hadoop.hbase.zookeeper.ZKWatcher;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.slf4j.Logger;
@@ -128,7 +127,7 @@ public class RSGroupAdminEndpoint implements 
MasterCoprocessor, MasterObserver {
 
   @Override
   public void stop(CoprocessorEnvironment env) {
-TableAuthManager.release(accessChecker.getAuthManager());
+accessChecker.stop();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/161f9de8/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
index 907ca9b..20ca62d 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
@@ -85,6 +85,7 @@ import 
org.apache.hadoop.hbase.replication.ReplicationPeerDescription;
 import org.apache.hadoop.hbase.security.User;
 import org.apache.hadoop.hbase.security.access.AccessChecker;
 import org.apache.hadoop.hbase.security.access.AccessController;
+import org.apache.hadoop.hbase.security.access.Permission;
 import org.apache.hadoop.hbase.security.visibility.VisibilityController;
 import org.apache.hadoop.hbase.snapshot.ClientSnapshotDescriptionUtils;
 import org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils;
@@ -345,6 +346,24 @@ public class MasterRpcServices extends RSRpcServices
 return new MasterAnnotationReadingPriorityFunction(this);
   }
 
+  /**
+   * Checks for the following pre-checks in order:
+   * 
+   *   Master is initialized
+   *   Rpc caller has admin permissions
+   * 
+   * @param requestName name of rpc request. Used in reporting failures to 
provide context.
+   * @throws ServiceException If any of the above listed pre-check fails.
+   */
+  private void rpcPreCheck(String requestName) throws ServiceException {
+try {
+  master.checkInitialized();
+  requirePermission(requestName, Permission.Action.ADMIN);
+} catch (IOException ioe) {
+  throw new 

[2/2] hbase git commit: HBASE-19401 Add missing security checks in RSRpcServices

2018-02-22 Thread appy
HBASE-19401 Add missing security checks in RSRpcServices


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

Branch: refs/heads/branch-2
Commit: 991e163cc271c691b5d0d9a871cb2ba75b7ba337
Parents: 161f9de
Author: Apekshit Sharma 
Authored: Tue Feb 13 12:33:43 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Feb 22 16:23:47 2018 -0800

--
 .../hbase/regionserver/RSRpcServices.java   | 22 +++-
 .../access/TestAdminOnlyOperations.java | 56 ++--
 2 files changed, 60 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/991e163c/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
index 3efe0c6..33ee548 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
@@ -498,6 +498,24 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
   }
 
   /**
+   * Checks for the following pre-checks in order:
+   * 
+   *   RegionServer is running
+   *   If authorization is enabled, then RPC caller has ADMIN 
permissions
+   * 
+   * @param requestName name of rpc request. Used in reporting failures to 
provide context.
+   * @throws ServiceException If any of the above listed pre-check fails.
+   */
+  private void rpcPreCheck(String requestName) throws ServiceException {
+try {
+  checkOpen();
+  requirePermission(requestName, Permission.Action.ADMIN);
+} catch (IOException ioe) {
+  throw new ServiceException(ioe);
+}
+  }
+
+  /**
* Starts the nonce operation for a mutation, if needed.
* @param mutation Mutation.
* @param nonceGroup Nonce group from the request.
@@ -1438,9 +1456,8 @@ public class RSRpcServices implements 
HBaseRPCErrorHandler,
 
   /**
* Called to verify that this server is up and running.
-   *
-   * @throws IOException
*/
+  // TODO : Rename this and HMaster#checkInitialized to isRunning() (or a 
better name).
   protected void checkOpen() throws IOException {
 if (regionServer.isAborted()) {
   throw new RegionServerAbortedException("Server " + 
regionServer.serverName + " aborting");
@@ -3432,6 +3449,7 @@ public class RSRpcServices implements 
HBaseRPCErrorHandler,
   @Override
   public CoprocessorServiceResponse execRegionServerService(RpcController 
controller,
   CoprocessorServiceRequest request) throws ServiceException {
+rpcPreCheck("execRegionServerService");
 return regionServer.execRegionServerService(controller, request);
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/991e163c/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAdminOnlyOperations.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAdminOnlyOperations.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAdminOnlyOperations.java
index d4b0650..42d2f36 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAdminOnlyOperations.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAdminOnlyOperations.java
@@ -1,3 +1,4 @@
+
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -31,12 +32,14 @@ import java.util.HashMap;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HBaseClassTestRule;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
+import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Admin;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.ConnectionFactory;
 import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
 import org.apache.hadoop.hbase.coprocessor.MasterCoprocessor;
+import org.apache.hadoop.hbase.coprocessor.RegionServerCoprocessor;
 import org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos;
 import org.apache.hadoop.hbase.ipc.protobuf.generated.TestRpcServiceProtos;
 import org.apache.hadoop.hbase.security.AccessDeniedException;
@@ -88,7 +91,7 @@ public class TestAdminOnlyOperations {
   private static User USER_GROUP_ADMIN;
 
   // Dummy 

hbase git commit: HBASE-19401 Add missing security checks in RSRpcServices

2018-02-22 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master d68f697f3 -> 51f7b75f1


HBASE-19401 Add missing security checks in RSRpcServices


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

Branch: refs/heads/master
Commit: 51f7b75f1ff368b985fc1932c2be0d7fb004538e
Parents: d68f697
Author: Apekshit Sharma 
Authored: Tue Feb 13 12:33:43 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Feb 22 16:09:53 2018 -0800

--
 .../hbase/regionserver/RSRpcServices.java   | 22 +++-
 .../access/TestAdminOnlyOperations.java | 56 ++--
 2 files changed, 60 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/51f7b75f/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
index 05bbb47..88ce346 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
@@ -499,6 +499,24 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
   }
 
   /**
+   * Checks for the following pre-checks in order:
+   * 
+   *   RegionServer is running
+   *   If authorization is enabled, then RPC caller has ADMIN 
permissions
+   * 
+   * @param requestName name of rpc request. Used in reporting failures to 
provide context.
+   * @throws ServiceException If any of the above listed pre-check fails.
+   */
+  private void rpcPreCheck(String requestName) throws ServiceException {
+try {
+  checkOpen();
+  requirePermission(requestName, Permission.Action.ADMIN);
+} catch (IOException ioe) {
+  throw new ServiceException(ioe);
+}
+  }
+
+  /**
* Starts the nonce operation for a mutation, if needed.
* @param mutation Mutation.
* @param nonceGroup Nonce group from the request.
@@ -1439,9 +1457,8 @@ public class RSRpcServices implements 
HBaseRPCErrorHandler,
 
   /**
* Called to verify that this server is up and running.
-   *
-   * @throws IOException
*/
+  // TODO : Rename this and HMaster#checkInitialized to isRunning() (or a 
better name).
   protected void checkOpen() throws IOException {
 if (regionServer.isAborted()) {
   throw new RegionServerAbortedException("Server " + 
regionServer.serverName + " aborting");
@@ -3433,6 +3450,7 @@ public class RSRpcServices implements 
HBaseRPCErrorHandler,
   @Override
   public CoprocessorServiceResponse execRegionServerService(RpcController 
controller,
   CoprocessorServiceRequest request) throws ServiceException {
+rpcPreCheck("execRegionServerService");
 return regionServer.execRegionServerService(controller, request);
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/51f7b75f/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAdminOnlyOperations.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAdminOnlyOperations.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAdminOnlyOperations.java
index d4b0650..42d2f36 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAdminOnlyOperations.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAdminOnlyOperations.java
@@ -1,3 +1,4 @@
+
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -31,12 +32,14 @@ import java.util.HashMap;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HBaseClassTestRule;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
+import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Admin;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.ConnectionFactory;
 import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
 import org.apache.hadoop.hbase.coprocessor.MasterCoprocessor;
+import org.apache.hadoop.hbase.coprocessor.RegionServerCoprocessor;
 import org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos;
 import org.apache.hadoop.hbase.ipc.protobuf.generated.TestRpcServiceProtos;
 import org.apache.hadoop.hbase.security.AccessDeniedException;
@@ -88,7 +91,7 @@ public class 

hbase git commit: HBASE-19400 Add missing security checks in MasterRpcServices

2018-02-20 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 148356a7b -> 6b8439366


HBASE-19400 Add missing security checks in MasterRpcServices

- Added ADMIN permission check for following rpc calls:
  normalize, setNormalizerRunning, runCatalogScan, enableCatalogJanitor, 
runCleanerChore,
  setCleanerChoreRunning, execMasterService, execProcedure, execProcedureWithRet
- Moved authorizationEnabled check to start of AccessChecker's functions. 
Currently, and IDK why,
  we call authManager.authorize() first and then discard its result if 
authorizationEnabled is false. Weird.


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

Branch: refs/heads/master
Commit: 6b8439366134b6749895b6019bc068d169865b48
Parents: 148356a
Author: Apekshit Sharma 
Authored: Tue Feb 13 12:33:43 2018 -0800
Committer: Apekshit Sharma 
Committed: Tue Feb 20 13:37:20 2018 -0700

--
 .../hbase/rsgroup/RSGroupAdminEndpoint.java |   3 +-
 .../hadoop/hbase/master/MasterRpcServices.java  | 120 -
 .../hbase/regionserver/HRegionServer.java   |   2 +-
 .../hbase/regionserver/RSRpcServices.java   |  25 +-
 .../hbase/security/access/AccessChecker.java| 102 
 .../hbase/security/access/AccessController.java |   5 +-
 .../security/access/TestAccessController.java   |  13 +-
 .../access/TestAdminOnlyOperations.java | 244 +++
 8 files changed, 389 insertions(+), 125 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/6b843936/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
--
diff --git 
a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
 
b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
index 435d138..7fec32d 100644
--- 
a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
+++ 
b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminEndpoint.java
@@ -79,7 +79,6 @@ import org.apache.hadoop.hbase.security.User;
 import org.apache.hadoop.hbase.security.UserProvider;
 import org.apache.hadoop.hbase.security.access.AccessChecker;
 import org.apache.hadoop.hbase.security.access.Permission.Action;
-import org.apache.hadoop.hbase.security.access.TableAuthManager;
 import org.apache.hadoop.hbase.zookeeper.ZKWatcher;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.slf4j.Logger;
@@ -127,7 +126,7 @@ public class RSGroupAdminEndpoint implements 
MasterCoprocessor, MasterObserver {
 
   @Override
   public void stop(CoprocessorEnvironment env) {
-TableAuthManager.release(accessChecker.getAuthManager());
+accessChecker.stop();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/6b843936/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
index 377a9c6..b4f0faf 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
@@ -86,6 +86,7 @@ import 
org.apache.hadoop.hbase.replication.ReplicationPeerDescription;
 import org.apache.hadoop.hbase.security.User;
 import org.apache.hadoop.hbase.security.access.AccessChecker;
 import org.apache.hadoop.hbase.security.access.AccessController;
+import org.apache.hadoop.hbase.security.access.Permission;
 import org.apache.hadoop.hbase.security.visibility.VisibilityController;
 import org.apache.hadoop.hbase.snapshot.ClientSnapshotDescriptionUtils;
 import org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils;
@@ -349,6 +350,24 @@ public class MasterRpcServices extends RSRpcServices
 return new MasterAnnotationReadingPriorityFunction(this);
   }
 
+  /**
+   * Checks for the following pre-checks in order:
+   * 
+   *   Master is initialized
+   *   Rpc caller has admin permissions
+   * 
+   * @param requestName name of rpc request. Used in reporting failures to 
provide context.
+   * @throws ServiceException If any of the above listed pre-check fails.
+   */
+  private void rpcPreCheck(String requestName) throws ServiceException {
+try {
+  master.checkInitialized();
+  requirePermission(requestName, Permission.Action.ADMIN);
+} catch (IOException ioe) {
+  throw new 

hbase git commit: HBASE-19970 (addendum for 1.x only) Remove unused functions from TableAuthManager.

2018-02-12 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1 e6ce789b6 -> 0f79c497c


HBASE-19970 (addendum for 1.x only) Remove unused functions from 
TableAuthManager.


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

Branch: refs/heads/branch-1
Commit: 0f79c497c52fbe78a1f344675579b6eb26d23b70
Parents: e6ce789
Author: Apekshit Sharma 
Authored: Mon Feb 12 16:30:48 2018 -0800
Committer: Apekshit Sharma 
Committed: Mon Feb 12 16:31:09 2018 -0800

--
 .../hadoop/hbase/security/access/TestZKPermissionWatcher.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0f79c497/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestZKPermissionWatcher.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestZKPermissionWatcher.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestZKPermissionWatcher.java
index a80f184..0961cab 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestZKPermissionWatcher.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestZKPermissionWatcher.java
@@ -47,8 +47,8 @@ import org.junit.experimental.categories.Category;
  * Test the reading and writing of access permissions to and from zookeeper.
  */
 @Category(LargeTests.class)
-public class TestZKPermissionsWatcher {
-  private static final Log LOG = 
LogFactory.getLog(TestZKPermissionsWatcher.class);
+public class TestZKPermissionWatcher {
+  private static final Log LOG = 
LogFactory.getLog(TestZKPermissionWatcher.class);
   private static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
   private static TableAuthManager AUTH_A;
   private static TableAuthManager AUTH_B;
@@ -90,7 +90,7 @@ public class TestZKPermissionsWatcher {
   }
 
   private void setTableACL(
-  User user, TableAuthManager srcAuthManager, TableAuthManager 
destAuthManager,
+  User user, TableAuthManager srcAuthManager, final TableAuthManager 
destAuthManager,
   TablePermission.Action... actions) throws Exception{
 // update ACL: george RW
 ListMultimap perms = ArrayListMultimap.create();



hbase git commit: HBASE-19970 Remove unused functions from TableAuthManager.

2018-02-12 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1 fe5848038 -> e6ce789b6


HBASE-19970 Remove unused functions from TableAuthManager.

Functions deleted: setTableUserPermissions, setTableGroupPermissions, 
setNamespaceUserPermissions,
setNamespaceGroupPermissions, writeTableToZooKeeper, writeNamespaceToZooKeeper


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

Branch: refs/heads/branch-1
Commit: e6ce789b6fa44592c3a566703c78de0687154a84
Parents: fe58480
Author: Apekshit Sharma 
Authored: Mon Feb 12 16:16:38 2018 -0800
Committer: Apekshit Sharma 
Committed: Mon Feb 12 16:20:36 2018 -0800

--
 .../security/access/AccessControlLists.java |   9 +-
 .../hbase/security/access/AccessController.java |   4 +-
 .../hbase/security/access/TableAuthManager.java |  75 
 .../security/access/TestTablePermissions.java   |   2 +-
 .../access/TestZKPermissionWatcher.java | 179 +++
 .../access/TestZKPermissionsWatcher.java| 178 --
 6 files changed, 188 insertions(+), 259 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/e6ce789b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
index 57c0f7b..f508110 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
@@ -73,6 +73,10 @@ import org.apache.hadoop.io.Text;
 import com.google.common.collect.ArrayListMultimap;
 import com.google.common.collect.ListMultimap;
 import com.google.common.collect.Lists;
+import org.apache.hadoop.io.Writable;
+import org.apache.hadoop.io.WritableFactories;
+import org.apache.hadoop.io.WritableUtils;
+import org.apache.jasper.tagplugins.jstl.core.Remove;
 
 /**
  * Maintains lists of permission grants to users and groups to allow for
@@ -667,8 +671,7 @@ public class AccessControlLists {
*
* Writes a set of permission [user: table permission]
*/
-  public static byte[] writePermissionsAsBytes(ListMultimap perms,
-  Configuration conf) {
+  public static byte[] writePermissionsAsBytes(ListMultimap perms) {
 return 
ProtobufUtil.prependPBMagic(ProtobufUtil.toUserTablePermissions(perms).toByteArray());
   }
 
@@ -755,7 +758,7 @@ public class AccessControlLists {
  // Deserialize the table permissions from the KV
  // TODO: This can be improved. Don't build UsersAndPermissions just 
to unpack it again,
  // use the builder
- AccessControlProtos.UsersAndPermissions.Builder builder = 
+ AccessControlProtos.UsersAndPermissions.Builder builder =
AccessControlProtos.UsersAndPermissions.newBuilder();
  ProtobufUtil.mergeFrom(builder, tag.getBuffer(), tag.getTagOffset(), 
tag.getTagLength());
  ListMultimap kvPerms =

http://git-wip-us.apache.org/repos/asf/hbase/blob/e6ce789b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
index fd0a704..c889a3e 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
@@ -243,7 +243,7 @@ public class AccessController extends 
BaseMasterAndRegionObserver
   tables.entrySet()) {
   byte[] entry = t.getKey();
   ListMultimap perms = t.getValue();
-  byte[] serialized = AccessControlLists.writePermissionsAsBytes(perms, 
conf);
+  byte[] serialized = AccessControlLists.writePermissionsAsBytes(perms);
   getAuthManager().getZKPermissionWatcher().writeToZookeeper(entry, 
serialized);
 }
 initialized = true;
@@ -275,7 +275,7 @@ public class AccessController extends 
BaseMasterAndRegionObserver
 try (Table t = regionEnv.getTable(AccessControlLists.ACL_TABLE_NAME)) {
   ListMultimap perms =
   

hbase git commit: HBASE-19970 Remove unused functions from TableAuthManager.

2018-02-12 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 e94f08277 -> b19531f04


HBASE-19970 Remove unused functions from TableAuthManager.

Functions deleted: setTableUserPermissions, setTableGroupPermissions, 
setNamespaceUserPermissions,
setNamespaceGroupPermissions, writeTableToZooKeeper, writeNamespaceToZooKeeper


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

Branch: refs/heads/branch-2
Commit: b19531f04b2fd7178d8152068b8782e829b697ac
Parents: e94f082
Author: Apekshit Sharma 
Authored: Fri Feb 9 18:32:20 2018 -0800
Committer: Apekshit Sharma 
Committed: Mon Feb 12 16:02:48 2018 -0800

--
 .../security/access/AccessControlLists.java |  3 +-
 .../hbase/security/access/AccessController.java |  4 +-
 .../hbase/security/access/TableAuthManager.java | 75 
 .../security/access/TestTablePermissions.java   |  2 +-
 .../access/TestZKPermissionWatcher.java | 55 +++---
 5 files changed, 32 insertions(+), 107 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b19531f0/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
index b0f33bd..663d0c5 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
@@ -644,8 +644,7 @@ public class AccessControlLists {
*
* Writes a set of permission [user: table permission]
*/
-  public static byte[] writePermissionsAsBytes(ListMultimap perms,
-  Configuration conf) {
+  public static byte[] writePermissionsAsBytes(ListMultimap perms) {
 return 
ProtobufUtil.prependPBMagic(AccessControlUtil.toUserTablePermissions(perms).toByteArray());
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b19531f0/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
index 3a4bf82..578cc4d 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
@@ -246,7 +246,7 @@ public class AccessController implements MasterCoprocessor, 
RegionCoprocessor,
   tables.entrySet()) {
   byte[] entry = t.getKey();
   ListMultimap perms = t.getValue();
-  byte[] serialized = AccessControlLists.writePermissionsAsBytes(perms, 
conf);
+  byte[] serialized = AccessControlLists.writePermissionsAsBytes(perms);
   getAuthManager().getZKPermissionWatcher().writeToZookeeper(entry, 
serialized);
 }
 initialized = true;
@@ -283,7 +283,7 @@ public class AccessController implements MasterCoprocessor, 
RegionCoprocessor,
 currentEntry = entry;
 ListMultimap perms =
 AccessControlLists.getPermissions(conf, entry, t);
-byte[] serialized = AccessControlLists.writePermissionsAsBytes(perms, 
conf);
+byte[] serialized = AccessControlLists.writePermissionsAsBytes(perms);
 zkw.writeToZookeeper(entry, serialized);
   }
 } catch(IOException ex) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b19531f0/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/TableAuthManager.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/TableAuthManager.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/TableAuthManager.java
index 76feff4..fdfd5c8 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/TableAuthManager.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/TableAuthManager.java
@@ -656,81 +656,6 @@ public class TableAuthManager implements Closeable {
 tableCache.remove(table);
   }
 
-  /**
-   * Overwrites the existing permission set for a given user for a table, and
-   * triggers an update for zookeeper 

hbase git commit: HBASE-19970 Remove unused functions from TableAuthManager.

2018-02-12 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master c2ee82c90 -> 7cc239fb5


HBASE-19970 Remove unused functions from TableAuthManager.

Functions deleted: setTableUserPermissions, setTableGroupPermissions, 
setNamespaceUserPermissions,
setNamespaceGroupPermissions, writeTableToZooKeeper, writeNamespaceToZooKeeper


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

Branch: refs/heads/master
Commit: 7cc239fb5ac0ce3f22d93d1dbf7e80609427710a
Parents: c2ee82c
Author: Apekshit Sharma 
Authored: Fri Feb 9 18:32:20 2018 -0800
Committer: Apekshit Sharma 
Committed: Mon Feb 12 16:01:29 2018 -0800

--
 .../security/access/AccessControlLists.java |  3 +-
 .../hbase/security/access/AccessController.java |  6 +-
 .../hbase/security/access/TableAuthManager.java | 75 
 .../security/access/TestTablePermissions.java   |  2 +-
 .../access/TestZKPermissionWatcher.java | 55 +++---
 5 files changed, 33 insertions(+), 108 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/7cc239fb/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
index b0f33bd..663d0c5 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
@@ -644,8 +644,7 @@ public class AccessControlLists {
*
* Writes a set of permission [user: table permission]
*/
-  public static byte[] writePermissionsAsBytes(ListMultimap perms,
-  Configuration conf) {
+  public static byte[] writePermissionsAsBytes(ListMultimap perms) {
 return 
ProtobufUtil.prependPBMagic(AccessControlUtil.toUserTablePermissions(perms).toByteArray());
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/7cc239fb/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
index 1fbf01d..3ac92b8 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
@@ -247,7 +247,7 @@ public class AccessController implements MasterCoprocessor, 
RegionCoprocessor,
   tables.entrySet()) {
   byte[] entry = t.getKey();
   ListMultimap perms = t.getValue();
-  byte[] serialized = AccessControlLists.writePermissionsAsBytes(perms, 
conf);
+  byte[] serialized = AccessControlLists.writePermissionsAsBytes(perms);
   getAuthManager().getZKPermissionWatcher().writeToZookeeper(entry, 
serialized);
 }
 initialized = true;
@@ -284,7 +284,7 @@ public class AccessController implements MasterCoprocessor, 
RegionCoprocessor,
 currentEntry = entry;
 ListMultimap perms =
 AccessControlLists.getPermissions(conf, entry, t);
-byte[] serialized = AccessControlLists.writePermissionsAsBytes(perms, 
conf);
+byte[] serialized = AccessControlLists.writePermissionsAsBytes(perms);
 zkw.writeToZookeeper(entry, serialized);
   }
 } catch(IOException ex) {
@@ -2456,7 +2456,7 @@ public class AccessController implements 
MasterCoprocessor, RegionCoprocessor,
   throws IOException {
 requirePermission(ctx, "replicateLogEntries", Action.WRITE);
   }
-  
+
   @Override
   public void  
preClearCompactionQueues(ObserverContext 
ctx)
   throws IOException {

http://git-wip-us.apache.org/repos/asf/hbase/blob/7cc239fb/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/TableAuthManager.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/TableAuthManager.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/TableAuthManager.java
index 76feff4..fdfd5c8 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/TableAuthManager.java
+++ 

hbase git commit: HBASE-19886 Display maintenance mode in shell, web UI

2018-02-06 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1.4 a8505993c -> 1eef181a5


HBASE-19886 Display maintenance mode in shell, web UI


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

Branch: refs/heads/branch-1.4
Commit: 1eef181a577dfd120708a8f859cc21546ec8516b
Parents: a850599
Author: Balazs Meszaros 
Authored: Mon Jan 29 16:43:20 2018 +0100
Committer: Apekshit Sharma 
Committed: Tue Feb 6 14:54:46 2018 -0800

--
 .../hbase/tmpl/master/MasterStatusTmpl.jamon|  6 
 hbase-shell/src/main/ruby/hbase/admin.rb|  7 
 hbase-shell/src/main/ruby/shell.rb  |  1 +
 .../shell/commands/is_in_maintenance_mode.rb| 38 
 4 files changed, 52 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/1eef181a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
--
diff --git 
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
 
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
index 7467baa..408471a 100644
--- 
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
+++ 
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
@@ -162,6 +162,12 @@ AssignmentManager assignmentManager = 
master.getAssignmentManager();
   re-enabled from the hbase shell by running the command 
'catalogjanitor_switch true'
   
 
+<%if master.isInMaintenanceMode() %>
+  
+  Your Master is in maintenance mode. This may be because of HBCK 
aborting while
+  running in repair mode. Please re-run HBCK in repair mode.
+  
+
 <%if !master.isBalancerOn() %>
   
 The Load Balancer is not enabled which will eventually cause 
performance degradation

http://git-wip-us.apache.org/repos/asf/hbase/blob/1eef181a/hbase-shell/src/main/ruby/hbase/admin.rb
--
diff --git a/hbase-shell/src/main/ruby/hbase/admin.rb 
b/hbase-shell/src/main/ruby/hbase/admin.rb
index 60ae155..41460ce 100644
--- a/hbase-shell/src/main/ruby/hbase/admin.rb
+++ b/hbase-shell/src/main/ruby/hbase/admin.rb
@@ -191,6 +191,13 @@ module Hbase
 end
 
 
#--
+# Query the current state of master in maintenance mode.
+# Returns the state of maintenance mode (true is on).
+def in_maintenance_mode?
+  @admin.isMasterInMaintenanceMode
+end
+
+
#--
 # Request a scan of the catalog table (for garbage collection)
 # Returns an int signifying the number of entries cleaned
 def catalogjanitor_run()

http://git-wip-us.apache.org/repos/asf/hbase/blob/1eef181a/hbase-shell/src/main/ruby/shell.rb
--
diff --git a/hbase-shell/src/main/ruby/shell.rb 
b/hbase-shell/src/main/ruby/shell.rb
index 7444c3b..2c748e2 100644
--- a/hbase-shell/src/main/ruby/shell.rb
+++ b/hbase-shell/src/main/ruby/shell.rb
@@ -327,6 +327,7 @@ Shell.load_command_group(
 normalize
 normalizer_switch
 normalizer_enabled
+is_in_maintenance_mode
 close_region
 compact
 flush

http://git-wip-us.apache.org/repos/asf/hbase/blob/1eef181a/hbase-shell/src/main/ruby/shell/commands/is_in_maintenance_mode.rb
--
diff --git a/hbase-shell/src/main/ruby/shell/commands/is_in_maintenance_mode.rb 
b/hbase-shell/src/main/ruby/shell/commands/is_in_maintenance_mode.rb
new file mode 100644
index 000..8ed244c
--- /dev/null
+++ b/hbase-shell/src/main/ruby/shell/commands/is_in_maintenance_mode.rb
@@ -0,0 +1,38 @@
+#
+#
+# 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" 

hbase git commit: HBASE-19886 Display maintenance mode in shell, web UI

2018-02-06 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 f155da379 -> 4d24b1982


HBASE-19886 Display maintenance mode in shell, web UI


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

Branch: refs/heads/branch-2
Commit: 4d24b19822cc3be1c60a8d0090f4573bb5040d02
Parents: f155da3
Author: Balazs Meszaros 
Authored: Mon Jan 29 16:43:20 2018 +0100
Committer: Apekshit Sharma 
Committed: Tue Feb 6 14:53:48 2018 -0800

--
 .../hbase/tmpl/master/MasterStatusTmpl.jamon|  6 
 hbase-shell/src/main/ruby/hbase/admin.rb|  7 
 hbase-shell/src/main/ruby/shell.rb  |  1 +
 .../shell/commands/is_in_maintenance_mode.rb| 38 
 4 files changed, 52 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/4d24b198/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
--
diff --git 
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
 
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
index 3253a57..12e0a69b 100644
--- 
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
+++ 
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
@@ -185,6 +185,12 @@ AssignmentManager assignmentManager = 
master.getAssignmentManager();
   re-enabled from the hbase shell by running the command 
'catalogjanitor_switch true'
   
 
+<%if master.isInMaintenanceMode() %>
+  
+  Your Master is in maintenance mode. This may be because of HBCK 
aborting while
+  running in repair mode. Please re-run HBCK in repair mode.
+  
+
 <%if !master.isBalancerOn() %>
   
 The Load Balancer is not enabled which will eventually cause 
performance degradation

http://git-wip-us.apache.org/repos/asf/hbase/blob/4d24b198/hbase-shell/src/main/ruby/hbase/admin.rb
--
diff --git a/hbase-shell/src/main/ruby/hbase/admin.rb 
b/hbase-shell/src/main/ruby/hbase/admin.rb
index 13b6578..0102118 100644
--- a/hbase-shell/src/main/ruby/hbase/admin.rb
+++ b/hbase-shell/src/main/ruby/hbase/admin.rb
@@ -224,6 +224,13 @@ module Hbase
 end
 
 
#--
+# Query the current state of master in maintenance mode.
+# Returns the state of maintenance mode (true is on).
+def in_maintenance_mode?
+  @admin.isMasterInMaintenanceMode
+end
+
+
#--
 # Request a scan of the catalog table (for garbage collection)
 # Returns an int signifying the number of entries cleaned
 def catalogjanitor_run

http://git-wip-us.apache.org/repos/asf/hbase/blob/4d24b198/hbase-shell/src/main/ruby/shell.rb
--
diff --git a/hbase-shell/src/main/ruby/shell.rb 
b/hbase-shell/src/main/ruby/shell.rb
index 4a74646..507c0a9 100644
--- a/hbase-shell/src/main/ruby/shell.rb
+++ b/hbase-shell/src/main/ruby/shell.rb
@@ -336,6 +336,7 @@ Shell.load_command_group(
 normalize
 normalizer_switch
 normalizer_enabled
+is_in_maintenance_mode
 close_region
 compact
 flush

http://git-wip-us.apache.org/repos/asf/hbase/blob/4d24b198/hbase-shell/src/main/ruby/shell/commands/is_in_maintenance_mode.rb
--
diff --git a/hbase-shell/src/main/ruby/shell/commands/is_in_maintenance_mode.rb 
b/hbase-shell/src/main/ruby/shell/commands/is_in_maintenance_mode.rb
new file mode 100644
index 000..8ed244c
--- /dev/null
+++ b/hbase-shell/src/main/ruby/shell/commands/is_in_maintenance_mode.rb
@@ -0,0 +1,38 @@
+#
+#
+# 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,

hbase git commit: HBASE-19886 Display maintenance mode in shell, web UI

2018-02-06 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master b5ccfecc9 -> 380083e7d


HBASE-19886 Display maintenance mode in shell, web UI


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

Branch: refs/heads/master
Commit: 380083e7d3d9864cacd41a4297914d6789618d78
Parents: b5ccfec
Author: Balazs Meszaros 
Authored: Mon Jan 29 16:43:20 2018 +0100
Committer: Apekshit Sharma 
Committed: Tue Feb 6 14:53:32 2018 -0800

--
 .../hbase/tmpl/master/MasterStatusTmpl.jamon|  6 
 hbase-shell/src/main/ruby/hbase/admin.rb|  7 
 hbase-shell/src/main/ruby/shell.rb  |  1 +
 .../shell/commands/is_in_maintenance_mode.rb| 38 
 4 files changed, 52 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/380083e7/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
--
diff --git 
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
 
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
index 3253a57..12e0a69b 100644
--- 
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
+++ 
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
@@ -185,6 +185,12 @@ AssignmentManager assignmentManager = 
master.getAssignmentManager();
   re-enabled from the hbase shell by running the command 
'catalogjanitor_switch true'
   
 
+<%if master.isInMaintenanceMode() %>
+  
+  Your Master is in maintenance mode. This may be because of HBCK 
aborting while
+  running in repair mode. Please re-run HBCK in repair mode.
+  
+
 <%if !master.isBalancerOn() %>
   
 The Load Balancer is not enabled which will eventually cause 
performance degradation

http://git-wip-us.apache.org/repos/asf/hbase/blob/380083e7/hbase-shell/src/main/ruby/hbase/admin.rb
--
diff --git a/hbase-shell/src/main/ruby/hbase/admin.rb 
b/hbase-shell/src/main/ruby/hbase/admin.rb
index 13b6578..0102118 100644
--- a/hbase-shell/src/main/ruby/hbase/admin.rb
+++ b/hbase-shell/src/main/ruby/hbase/admin.rb
@@ -224,6 +224,13 @@ module Hbase
 end
 
 
#--
+# Query the current state of master in maintenance mode.
+# Returns the state of maintenance mode (true is on).
+def in_maintenance_mode?
+  @admin.isMasterInMaintenanceMode
+end
+
+
#--
 # Request a scan of the catalog table (for garbage collection)
 # Returns an int signifying the number of entries cleaned
 def catalogjanitor_run

http://git-wip-us.apache.org/repos/asf/hbase/blob/380083e7/hbase-shell/src/main/ruby/shell.rb
--
diff --git a/hbase-shell/src/main/ruby/shell.rb 
b/hbase-shell/src/main/ruby/shell.rb
index 4a74646..507c0a9 100644
--- a/hbase-shell/src/main/ruby/shell.rb
+++ b/hbase-shell/src/main/ruby/shell.rb
@@ -336,6 +336,7 @@ Shell.load_command_group(
 normalize
 normalizer_switch
 normalizer_enabled
+is_in_maintenance_mode
 close_region
 compact
 flush

http://git-wip-us.apache.org/repos/asf/hbase/blob/380083e7/hbase-shell/src/main/ruby/shell/commands/is_in_maintenance_mode.rb
--
diff --git a/hbase-shell/src/main/ruby/shell/commands/is_in_maintenance_mode.rb 
b/hbase-shell/src/main/ruby/shell/commands/is_in_maintenance_mode.rb
new file mode 100644
index 000..8ed244c
--- /dev/null
+++ b/hbase-shell/src/main/ruby/shell/commands/is_in_maintenance_mode.rb
@@ -0,0 +1,38 @@
+#
+#
+# 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,
+# 

hbase git commit: HBASE-19915 (addendum): Fixed a typo because of which only daughterA was getting stored with a CLOSED state and not daughterB

2018-02-05 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 e69c1fd7a -> 5905415f9


HBASE-19915 (addendum): Fixed a typo because of which only daughterA was 
getting stored with a CLOSED state and not daughterB


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

Branch: refs/heads/branch-2
Commit: 5905415f9c909f7693ec37f08cadc3071e132dc9
Parents: e69c1fd
Author: Umesh Agashe 
Authored: Mon Feb 5 14:53:29 2018 -0800
Committer: Apekshit Sharma 
Committed: Mon Feb 5 15:41:28 2018 -0800

--
 .../src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/5905415f/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
index 5dc0565..dad9aef 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
@@ -1759,7 +1759,7 @@ public class MetaTableAccessor {
   // master tries to assign these offline regions. This is followed by 
re-assignments of the
   // daughter regions from resumed {@link SplitTableRegionProcedure}
   addRegionStateToPut(putA, RegionState.State.CLOSED);
-  addRegionStateToPut(putA, RegionState.State.CLOSED);
+  addRegionStateToPut(putB, RegionState.State.CLOSED);
 
   addSequenceNum(putA, 1, -1, splitA.getReplicaId()); //new regions, 
openSeqNum = 1 is fine.
   addSequenceNum(putB, 1, -1, splitB.getReplicaId());



hbase git commit: HBASE-19915 (addendum): Fixed a typo because of which only daughterA was getting stored with a CLOSED state and not daughterB

2018-02-05 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 8de820786 -> 6d04aa179


HBASE-19915 (addendum): Fixed a typo because of which only daughterA was 
getting stored with a CLOSED state and not daughterB


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

Branch: refs/heads/master
Commit: 6d04aa179485f331deff328f511f9b494bdb4d43
Parents: 8de8207
Author: Umesh Agashe 
Authored: Mon Feb 5 14:53:29 2018 -0800
Committer: Apekshit Sharma 
Committed: Mon Feb 5 15:41:03 2018 -0800

--
 .../src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/6d04aa17/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
index 5dc0565..dad9aef 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
@@ -1759,7 +1759,7 @@ public class MetaTableAccessor {
   // master tries to assign these offline regions. This is followed by 
re-assignments of the
   // daughter regions from resumed {@link SplitTableRegionProcedure}
   addRegionStateToPut(putA, RegionState.State.CLOSED);
-  addRegionStateToPut(putA, RegionState.State.CLOSED);
+  addRegionStateToPut(putB, RegionState.State.CLOSED);
 
   addSequenceNum(putA, 1, -1, splitA.getReplicaId()); //new regions, 
openSeqNum = 1 is fine.
   addSequenceNum(putB, 1, -1, splitB.getReplicaId());



hbase git commit: HBASE-19866 Add cateogry based timeout using Timeout Rule to TestRegionServerReportForDuty.

2018-01-26 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 f8295a810 -> c16dae13f


HBASE-19866 Add cateogry based timeout using Timeout Rule to 
TestRegionServerReportForDuty.


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

Branch: refs/heads/branch-2
Commit: c16dae13f2eca924e5c504b54cb307fb81acf9c0
Parents: f8295a8
Author: Apekshit Sharma 
Authored: Fri Jan 26 00:30:56 2018 -0800
Committer: Apekshit Sharma 
Committed: Fri Jan 26 00:44:04 2018 -0800

--
 .../hbase/regionserver/TestRegionServerReportForDuty.java| 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c16dae13/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerReportForDuty.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerReportForDuty.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerReportForDuty.java
index b72f486..de97c07 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerReportForDuty.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerReportForDuty.java
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertTrue;
 import java.io.IOException;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.CategoryBasedTimeout;
 import org.apache.hadoop.hbase.CoordinatedStateManager;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HConstants;
@@ -37,8 +38,10 @@ import 
org.apache.hadoop.hbase.util.JVMClusterUtil.RegionServerThread;
 import org.apache.zookeeper.KeeperException;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.rules.TestRule;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -46,6 +49,9 @@ import org.slf4j.LoggerFactory;
 public class TestRegionServerReportForDuty {
 
   private static final Logger LOG = 
LoggerFactory.getLogger(TestRegionServerReportForDuty.class);
+  @Rule
+  public final TestRule timeout = 
CategoryBasedTimeout.builder().withTimeout(this.getClass())
+.withLookingForStuckThread(true).build();
 
   private static final long SLEEP_INTERVAL = 500;
 
@@ -77,7 +83,7 @@ public class TestRegionServerReportForDuty {
* Tests region sever reportForDuty with backup master becomes primary 
master after
* the first master goes away.
*/
-  @Test (timeout=18)
+  @Test
   public void testReportForDutyWithMasterChange() throws Exception {
 
 // Start a master and wait for it to become the active/primary master.



hbase git commit: HBASE-19866 Add cateogry based timeout using Timeout Rule to TestRegionServerReportForDuty.

2018-01-26 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 1beb687f4 -> 01c34243f


HBASE-19866 Add cateogry based timeout using Timeout Rule to 
TestRegionServerReportForDuty.


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

Branch: refs/heads/master
Commit: 01c34243fe3ba971fff0fd154f444118597533f1
Parents: 1beb687
Author: Apekshit Sharma 
Authored: Fri Jan 26 00:30:56 2018 -0800
Committer: Apekshit Sharma 
Committed: Fri Jan 26 00:30:56 2018 -0800

--
 .../hbase/regionserver/TestRegionServerReportForDuty.java| 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/01c34243/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerReportForDuty.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerReportForDuty.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerReportForDuty.java
index b72f486..de97c07 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerReportForDuty.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerReportForDuty.java
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertTrue;
 import java.io.IOException;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.CategoryBasedTimeout;
 import org.apache.hadoop.hbase.CoordinatedStateManager;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HConstants;
@@ -37,8 +38,10 @@ import 
org.apache.hadoop.hbase.util.JVMClusterUtil.RegionServerThread;
 import org.apache.zookeeper.KeeperException;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.rules.TestRule;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -46,6 +49,9 @@ import org.slf4j.LoggerFactory;
 public class TestRegionServerReportForDuty {
 
   private static final Logger LOG = 
LoggerFactory.getLogger(TestRegionServerReportForDuty.class);
+  @Rule
+  public final TestRule timeout = 
CategoryBasedTimeout.builder().withTimeout(this.getClass())
+.withLookingForStuckThread(true).build();
 
   private static final long SLEEP_INTERVAL = 500;
 
@@ -77,7 +83,7 @@ public class TestRegionServerReportForDuty {
* Tests region sever reportForDuty with backup master becomes primary 
master after
* the first master goes away.
*/
-  @Test (timeout=18)
+  @Test
   public void testReportForDutyWithMasterChange() throws Exception {
 
 // Start a master and wait for it to become the active/primary master.



hbase git commit: HBASE-19862 addendum: Checkstyle fixes, remove unused imports and variables. Add @Rule for timeout.

2018-01-26 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 dbe5cbf5a -> f8295a810


HBASE-19862 addendum: Checkstyle fixes, remove unused imports and variables. 
Add @Rule for timeout.


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

Branch: refs/heads/branch-2
Commit: f8295a810d2dea8ed9858d184043c6067540e18a
Parents: dbe5cbf
Author: Apekshit Sharma 
Authored: Fri Jan 26 00:21:39 2018 -0800
Committer: Apekshit Sharma 
Committed: Fri Jan 26 00:25:11 2018 -0800

--
 .../security/token/TestTokenAuthentication.java | 90 ++--
 1 file changed, 45 insertions(+), 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f8295a81/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
index 4b2332e..67887e6 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
@@ -32,23 +32,20 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
-import java.util.concurrent.ConcurrentMap;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.hbase.CategoryBasedTimeout;
 import org.apache.hadoop.hbase.ChoreService;
 import org.apache.hadoop.hbase.ClusterId;
 import org.apache.hadoop.hbase.CoordinatedStateManager;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.RawCellBuilder;
 import org.apache.hadoop.hbase.Server;
 import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.client.ClusterConnection;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.ConnectionFactory;
 import org.apache.hadoop.hbase.coprocessor.HasRegionServerServices;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessor;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.ipc.FifoRpcScheduler;
 import org.apache.hadoop.hbase.ipc.NettyRpcServer;
@@ -59,10 +56,7 @@ import org.apache.hadoop.hbase.ipc.RpcServerInterface;
 import org.apache.hadoop.hbase.ipc.ServerRpcController;
 import org.apache.hadoop.hbase.ipc.SimpleRpcServer;
 import org.apache.hadoop.hbase.log.HBaseMarkers;
-import org.apache.hadoop.hbase.metrics.MetricRegistry;
 import org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos;
-import org.apache.hadoop.hbase.regionserver.HRegion;
-import org.apache.hadoop.hbase.regionserver.OnlineRegions;
 import org.apache.hadoop.hbase.regionserver.RegionServerServices;
 import org.apache.hadoop.hbase.security.SecurityInfo;
 import org.apache.hadoop.hbase.security.User;
@@ -85,8 +79,10 @@ import org.apache.hadoop.security.token.Token;
 import org.apache.hadoop.security.token.TokenIdentifier;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.rules.TestRule;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameter;
@@ -120,9 +116,10 @@ public class TestTokenAuthentication {
 System.setProperty("java.security.krb5.realm", "hbase");
 System.setProperty("java.security.krb5.kdc", "blah");
   }
-  private static final Logger LOG = 
LoggerFactory.getLogger(TestTokenAuthentication.class);
 
-  public interface AuthenticationServiceSecurityInfo {}
+  @Rule
+  public final TestRule timeout = 
CategoryBasedTimeout.builder().withTimeout(this.getClass())
+.withLookingForStuckThread(true).build();
 
   /**
* Basic server process for RPC authentication testing
@@ -141,8 +138,7 @@ public class TestTokenAuthentication {
 private boolean stopped = false;
 private long startcode;
 
-public TokenServer(Configuration conf, HBaseTestingUtility TEST_UTIL)
-throws IOException {
+public TokenServer(Configuration conf, HBaseTestingUtility TEST_UTIL) 
throws IOException {
   this.conf = conf;
   this.TEST_UTIL = TEST_UTIL;
   this.startcode = EnvironmentEdgeManager.currentTime();
@@ -163,42 +159,46 @@ public class TestTokenAuthentication {
   final BlockingService 

hbase git commit: HBASE-19862 addendum: Checkstyle fixes, remove unused imports and variables. Add @Rule for timeout.

2018-01-26 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 61358985b -> 1beb687f4


HBASE-19862 addendum: Checkstyle fixes, remove unused imports and variables. 
Add @Rule for timeout.


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

Branch: refs/heads/master
Commit: 1beb687f4e489dff352a746d4544ff1a0a1ed829
Parents: 6135898
Author: Apekshit Sharma 
Authored: Fri Jan 26 00:21:39 2018 -0800
Committer: Apekshit Sharma 
Committed: Fri Jan 26 00:24:35 2018 -0800

--
 .../security/token/TestTokenAuthentication.java | 90 ++--
 1 file changed, 45 insertions(+), 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/1beb687f/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
index 4b2332e..67887e6 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
@@ -32,23 +32,20 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
-import java.util.concurrent.ConcurrentMap;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.hbase.CategoryBasedTimeout;
 import org.apache.hadoop.hbase.ChoreService;
 import org.apache.hadoop.hbase.ClusterId;
 import org.apache.hadoop.hbase.CoordinatedStateManager;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.RawCellBuilder;
 import org.apache.hadoop.hbase.Server;
 import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.client.ClusterConnection;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.ConnectionFactory;
 import org.apache.hadoop.hbase.coprocessor.HasRegionServerServices;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessor;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.ipc.FifoRpcScheduler;
 import org.apache.hadoop.hbase.ipc.NettyRpcServer;
@@ -59,10 +56,7 @@ import org.apache.hadoop.hbase.ipc.RpcServerInterface;
 import org.apache.hadoop.hbase.ipc.ServerRpcController;
 import org.apache.hadoop.hbase.ipc.SimpleRpcServer;
 import org.apache.hadoop.hbase.log.HBaseMarkers;
-import org.apache.hadoop.hbase.metrics.MetricRegistry;
 import org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos;
-import org.apache.hadoop.hbase.regionserver.HRegion;
-import org.apache.hadoop.hbase.regionserver.OnlineRegions;
 import org.apache.hadoop.hbase.regionserver.RegionServerServices;
 import org.apache.hadoop.hbase.security.SecurityInfo;
 import org.apache.hadoop.hbase.security.User;
@@ -85,8 +79,10 @@ import org.apache.hadoop.security.token.Token;
 import org.apache.hadoop.security.token.TokenIdentifier;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.rules.TestRule;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameter;
@@ -120,9 +116,10 @@ public class TestTokenAuthentication {
 System.setProperty("java.security.krb5.realm", "hbase");
 System.setProperty("java.security.krb5.kdc", "blah");
   }
-  private static final Logger LOG = 
LoggerFactory.getLogger(TestTokenAuthentication.class);
 
-  public interface AuthenticationServiceSecurityInfo {}
+  @Rule
+  public final TestRule timeout = 
CategoryBasedTimeout.builder().withTimeout(this.getClass())
+.withLookingForStuckThread(true).build();
 
   /**
* Basic server process for RPC authentication testing
@@ -141,8 +138,7 @@ public class TestTokenAuthentication {
 private boolean stopped = false;
 private long startcode;
 
-public TokenServer(Configuration conf, HBaseTestingUtility TEST_UTIL)
-throws IOException {
+public TokenServer(Configuration conf, HBaseTestingUtility TEST_UTIL) 
throws IOException {
   this.conf = conf;
   this.TEST_UTIL = TEST_UTIL;
   this.startcode = EnvironmentEdgeManager.currentTime();
@@ -163,42 +159,46 @@ public class TestTokenAuthentication {
   final BlockingService 

hbase git commit: HBASE-19862 Fix TestTokenAuthentication - mock RegionCoprocessorEnvironment should be of type HasRegionServerServices also.

2018-01-25 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 72f4e98ed -> dbe5cbf5a


HBASE-19862 Fix TestTokenAuthentication - mock RegionCoprocessorEnvironment 
should be of type HasRegionServerServices also.


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

Branch: refs/heads/branch-2
Commit: dbe5cbf5aefdb7a9d79fdddc613c5f4315b4673c
Parents: 72f4e98
Author: Apekshit Sharma 
Authored: Thu Jan 25 14:01:42 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 25 23:55:12 2018 -0800

--
 .../security/token/TestTokenAuthentication.java | 150 ++-
 1 file changed, 46 insertions(+), 104 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/dbe5cbf5/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
index 781e286..4b2332e 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
@@ -22,6 +22,8 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
 
 import java.io.IOException;
 import java.io.InterruptedIOException;
@@ -45,6 +47,7 @@ import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.client.ClusterConnection;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.ConnectionFactory;
+import org.apache.hadoop.hbase.coprocessor.HasRegionServerServices;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessor;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.ipc.FifoRpcScheduler;
@@ -88,6 +91,7 @@ import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameter;
 import org.junit.runners.Parameterized.Parameters;
+import org.mockito.Mockito;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -160,41 +164,37 @@ public class TestTokenAuthentication {
 
AuthenticationProtos.AuthenticationService.newReflectiveBlockingService(this);
   final org.apache.hbase.thirdparty.com.google.protobuf.BlockingService 
proxy =
   new 
org.apache.hbase.thirdparty.com.google.protobuf.BlockingService() {
-@Override
-public Message callBlockingMethod(MethodDescriptor md,
-org.apache.hbase.thirdparty.com.google.protobuf.RpcController 
controller,
-Message param)
+@Override public Message callBlockingMethod(MethodDescriptor md,
+org.apache.hbase.thirdparty.com.google.protobuf.RpcController 
controller,
+Message param)
 throws 
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException {
-  com.google.protobuf.Descriptors.MethodDescriptor methodDescriptor =
-  service.getDescriptorForType().findMethodByName(md.getName());
-  com.google.protobuf.Message request = 
service.getRequestPrototype(methodDescriptor);
-  // TODO: Convert rpcController
-  com.google.protobuf.Message response = null;
-  try {
-response = service.callBlockingMethod(methodDescriptor, null, 
request);
-  } catch (ServiceException e) {
-throw new 
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException(e);
-  }
-  return null;// Convert 'response'.
-}
-
-@Override
-public ServiceDescriptor getDescriptorForType() {
-  return null;
-}
-
-@Override
-public Message getRequestPrototype(MethodDescriptor arg0) {
-  // TODO Auto-generated method stub
-  return null;
-}
-
-@Override
-public Message getResponsePrototype(MethodDescriptor arg0) {
-  // TODO Auto-generated method stub
-  return null;
-}
-  };
+  com.google.protobuf.Descriptors.MethodDescriptor 
methodDescriptor =
+  
service.getDescriptorForType().findMethodByName(md.getName());
+  com.google.protobuf.Message request = 

hbase git commit: HBASE-19862 Fix TestTokenAuthentication - mock RegionCoprocessorEnvironment should be of type HasRegionServerServices also.

2018-01-25 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master aeffca497 -> 61358985b


HBASE-19862 Fix TestTokenAuthentication - mock RegionCoprocessorEnvironment 
should be of type HasRegionServerServices also.


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

Branch: refs/heads/master
Commit: 61358985b15164cbcdc6e58005208c0906c3830a
Parents: aeffca4
Author: Apekshit Sharma 
Authored: Thu Jan 25 14:01:42 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 25 23:15:45 2018 -0800

--
 .../security/token/TestTokenAuthentication.java | 150 ++-
 1 file changed, 46 insertions(+), 104 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/61358985/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
index 781e286..4b2332e 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
@@ -22,6 +22,8 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
 
 import java.io.IOException;
 import java.io.InterruptedIOException;
@@ -45,6 +47,7 @@ import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.client.ClusterConnection;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.ConnectionFactory;
+import org.apache.hadoop.hbase.coprocessor.HasRegionServerServices;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessor;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.ipc.FifoRpcScheduler;
@@ -88,6 +91,7 @@ import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameter;
 import org.junit.runners.Parameterized.Parameters;
+import org.mockito.Mockito;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -160,41 +164,37 @@ public class TestTokenAuthentication {
 
AuthenticationProtos.AuthenticationService.newReflectiveBlockingService(this);
   final org.apache.hbase.thirdparty.com.google.protobuf.BlockingService 
proxy =
   new 
org.apache.hbase.thirdparty.com.google.protobuf.BlockingService() {
-@Override
-public Message callBlockingMethod(MethodDescriptor md,
-org.apache.hbase.thirdparty.com.google.protobuf.RpcController 
controller,
-Message param)
+@Override public Message callBlockingMethod(MethodDescriptor md,
+org.apache.hbase.thirdparty.com.google.protobuf.RpcController 
controller,
+Message param)
 throws 
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException {
-  com.google.protobuf.Descriptors.MethodDescriptor methodDescriptor =
-  service.getDescriptorForType().findMethodByName(md.getName());
-  com.google.protobuf.Message request = 
service.getRequestPrototype(methodDescriptor);
-  // TODO: Convert rpcController
-  com.google.protobuf.Message response = null;
-  try {
-response = service.callBlockingMethod(methodDescriptor, null, 
request);
-  } catch (ServiceException e) {
-throw new 
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException(e);
-  }
-  return null;// Convert 'response'.
-}
-
-@Override
-public ServiceDescriptor getDescriptorForType() {
-  return null;
-}
-
-@Override
-public Message getRequestPrototype(MethodDescriptor arg0) {
-  // TODO Auto-generated method stub
-  return null;
-}
-
-@Override
-public Message getResponsePrototype(MethodDescriptor arg0) {
-  // TODO Auto-generated method stub
-  return null;
-}
-  };
+  com.google.protobuf.Descriptors.MethodDescriptor 
methodDescriptor =
+  
service.getDescriptorForType().findMethodByName(md.getName());
+  com.google.protobuf.Message request = 

hbase git commit: HBASE-19860 Run branch-2 nightly job more frequently to help with flaky tests debugging

2018-01-24 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 c9950b5a7 -> 130da9d18


HBASE-19860 Run branch-2 nightly job more frequently to help with flaky tests 
debugging


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

Branch: refs/heads/branch-2
Commit: 130da9d18bd4e5832e1a5747595314b837d0c5ab
Parents: c9950b5
Author: Apekshit Sharma 
Authored: Wed Jan 24 20:00:30 2018 -0800
Committer: Apekshit Sharma 
Committed: Wed Jan 24 20:00:30 2018 -0800

--
 dev-support/Jenkinsfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/130da9d1/dev-support/Jenkinsfile
--
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index 14092d5..3d0d06f 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -21,7 +21,7 @@ pipeline {
 }
   }
   triggers {
-cron('@daily')
+cron('H */6 * * *')  // Run every 6 hours.
   }
   options {
 buildDiscarder(logRotator(numToKeepStr: '30'))



hbase git commit: HBASE-19780 Fix build in branch-2 - change execution phase of checkstyle plugin back to default 'verify'

2018-01-23 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 8977aae43 -> b0b2d12d9


HBASE-19780 Fix build in branch-2 - change execution phase of checkstyle plugin 
back to default 'verify'


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

Branch: refs/heads/branch-2
Commit: b0b2d12d9d434795a19167303dd3310ecd4b32a7
Parents: 8977aae
Author: Apekshit Sharma 
Authored: Fri Jan 12 15:06:08 2018 -0800
Committer: Apekshit Sharma 
Committed: Tue Jan 23 15:28:37 2018 -0800

--
 hbase-annotations/pom.xml | 15 ++-
 hbase-archetypes/pom.xml  | 15 ++-
 hbase-build-support/hbase-error-prone/pom.xml | 15 ++-
 hbase-external-blockcache/pom.xml | 15 ++-
 hbase-metrics-api/pom.xml | 15 ++-
 hbase-metrics/pom.xml | 15 ++-
 hbase-protocol-shaded/pom.xml | 51 +-
 pom.xml   | 26 ++-
 8 files changed, 43 insertions(+), 124 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b0b2d12d/hbase-annotations/pom.xml
--
diff --git a/hbase-annotations/pom.xml b/hbase-annotations/pom.xml
index 6ad3c12..8e73769 100644
--- a/hbase-annotations/pom.xml
+++ b/hbase-annotations/pom.xml
@@ -36,18 +36,9 @@
   
 org.apache.maven.plugins
 maven-checkstyle-plugin
-
-  
-checkstyle
-validate
-
-  check
-
-
-  true
-
-  
-
+
+  true
+
   
 
   

http://git-wip-us.apache.org/repos/asf/hbase/blob/b0b2d12d/hbase-archetypes/pom.xml
--
diff --git a/hbase-archetypes/pom.xml b/hbase-archetypes/pom.xml
index bc96c27..8f755f0 100644
--- a/hbase-archetypes/pom.xml
+++ b/hbase-archetypes/pom.xml
@@ -81,18 +81,9 @@
   
 org.apache.maven.plugins
 maven-checkstyle-plugin
-
-  
-checkstyle
-validate
-
-  check
-
-
-  true
-
-  
-
+
+  true
+
   
 
   

http://git-wip-us.apache.org/repos/asf/hbase/blob/b0b2d12d/hbase-build-support/hbase-error-prone/pom.xml
--
diff --git a/hbase-build-support/hbase-error-prone/pom.xml 
b/hbase-build-support/hbase-error-prone/pom.xml
index 00dad96..b9e5e1e 100644
--- a/hbase-build-support/hbase-error-prone/pom.xml
+++ b/hbase-build-support/hbase-error-prone/pom.xml
@@ -71,18 +71,9 @@
   
 org.apache.maven.plugins
 maven-checkstyle-plugin
-
-  
-checkstyle
-validate
-
-  check
-
-
-  true
-
-  
-
+
+  true
+
   
 
   

http://git-wip-us.apache.org/repos/asf/hbase/blob/b0b2d12d/hbase-external-blockcache/pom.xml
--
diff --git a/hbase-external-blockcache/pom.xml 
b/hbase-external-blockcache/pom.xml
index e9d4e60..4de7f34 100644
--- a/hbase-external-blockcache/pom.xml
+++ b/hbase-external-blockcache/pom.xml
@@ -98,18 +98,9 @@
   
 org.apache.maven.plugins
 maven-checkstyle-plugin
-
-  
-checkstyle
-validate
-
-  check
-
-
-  true
-
-  
-
+
+  true
+
   
 
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b0b2d12d/hbase-metrics-api/pom.xml
--
diff --git a/hbase-metrics-api/pom.xml b/hbase-metrics-api/pom.xml
index 0327204..3389f7e 100644
--- a/hbase-metrics-api/pom.xml
+++ b/hbase-metrics-api/pom.xml
@@ -71,18 +71,9 @@
   
 org.apache.maven.plugins
 maven-checkstyle-plugin
-
-  
-checkstyle
-validate
-
-  check
-
-
-  true
-
-  
-
+
+  true
+
   
 
   

http://git-wip-us.apache.org/repos/asf/hbase/blob/b0b2d12d/hbase-metrics/pom.xml
--
diff --git 

hbase git commit: HBASE-19780 Remove execution phase and goal of checkstyle plugin.

2018-01-23 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master d589b7238 -> 0b6422658


HBASE-19780 Remove execution phase and goal of checkstyle plugin.

We don't do checkstyle as part of default "mvn install" since it takes 
significant
amount of time (~90sec) and slows builds and development. We only need it for 
pre-commits.


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

Branch: refs/heads/master
Commit: 0b6422658c6adff8e38d785b3cec4d2cf3b3bc93
Parents: d589b72
Author: Apekshit Sharma 
Authored: Fri Jan 12 15:06:08 2018 -0800
Committer: Apekshit Sharma 
Committed: Tue Jan 23 15:08:04 2018 -0800

--
 hbase-annotations/pom.xml | 15 ++-
 hbase-archetypes/pom.xml  | 15 ++-
 hbase-build-support/hbase-error-prone/pom.xml | 15 ++-
 hbase-external-blockcache/pom.xml | 15 ++-
 hbase-hadoop-compat/pom.xml   | 15 ++-
 hbase-metrics-api/pom.xml | 15 ++-
 hbase-metrics/pom.xml | 15 ++-
 hbase-protocol-shaded/pom.xml | 51 +-
 hbase-protocol/pom.xml| 15 ++-
 hbase-replication/pom.xml | 15 ++-
 hbase-rsgroup/pom.xml | 15 ++-
 hbase-spark-it/pom.xml| 15 ++-
 hbase-spark/pom.xml   | 15 ++-
 hbase-thrift/pom.xml  | 15 ++-
 pom.xml   | 26 ++-
 15 files changed, 64 insertions(+), 208 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0b642265/hbase-annotations/pom.xml
--
diff --git a/hbase-annotations/pom.xml b/hbase-annotations/pom.xml
index 86eb313..94c506b 100644
--- a/hbase-annotations/pom.xml
+++ b/hbase-annotations/pom.xml
@@ -36,18 +36,9 @@
   
 org.apache.maven.plugins
 maven-checkstyle-plugin
-
-  
-checkstyle
-validate
-
-  check
-
-
-  true
-
-  
-
+
+  true
+
   
 
   

http://git-wip-us.apache.org/repos/asf/hbase/blob/0b642265/hbase-archetypes/pom.xml
--
diff --git a/hbase-archetypes/pom.xml b/hbase-archetypes/pom.xml
index 58ac89a..f33a216 100644
--- a/hbase-archetypes/pom.xml
+++ b/hbase-archetypes/pom.xml
@@ -81,18 +81,9 @@
   
 org.apache.maven.plugins
 maven-checkstyle-plugin
-
-  
-checkstyle
-validate
-
-  check
-
-
-  true
-
-  
-
+
+  true
+
   
 
   

http://git-wip-us.apache.org/repos/asf/hbase/blob/0b642265/hbase-build-support/hbase-error-prone/pom.xml
--
diff --git a/hbase-build-support/hbase-error-prone/pom.xml 
b/hbase-build-support/hbase-error-prone/pom.xml
index b90d733..343bb3e 100644
--- a/hbase-build-support/hbase-error-prone/pom.xml
+++ b/hbase-build-support/hbase-error-prone/pom.xml
@@ -71,18 +71,9 @@
   
 org.apache.maven.plugins
 maven-checkstyle-plugin
-
-  
-checkstyle
-validate
-
-  check
-
-
-  true
-
-  
-
+
+  true
+
   
 
   

http://git-wip-us.apache.org/repos/asf/hbase/blob/0b642265/hbase-external-blockcache/pom.xml
--
diff --git a/hbase-external-blockcache/pom.xml 
b/hbase-external-blockcache/pom.xml
index 8b048c5..ce79e1a 100644
--- a/hbase-external-blockcache/pom.xml
+++ b/hbase-external-blockcache/pom.xml
@@ -98,18 +98,9 @@
   
 org.apache.maven.plugins
 maven-checkstyle-plugin
-
-  
-checkstyle
-validate
-
-  check
-
-
-  true
-
-  
-
+
+  true
+
   
 
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/0b642265/hbase-hadoop-compat/pom.xml
--
diff --git a/hbase-hadoop-compat/pom.xml b/hbase-hadoop-compat/pom.xml
index 512a466..da06e77 100644
--- 

[hbase] Git Push Summary

2018-01-22 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/Master [deleted] 298dc0c62


hbase git commit: HBASE-19823 Make RawCellBuilderFactory LimitedPrivate.UNITTEST

2018-01-19 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 0f9a837bd -> cdfd12c10


HBASE-19823 Make RawCellBuilderFactory LimitedPrivate.UNITTEST


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

Branch: refs/heads/branch-2
Commit: cdfd12c1014d9d5a3c9b402f998d896f9970fde9
Parents: 0f9a837
Author: Apekshit Sharma 
Authored: Thu Jan 18 11:34:21 2018 -0800
Committer: Apekshit Sharma 
Committed: Fri Jan 19 14:53:27 2018 -0800

--
 .../java/org/apache/hadoop/hbase/HBaseInterfaceAudience.java| 1 +
 .../src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java   | 3 ++-
 .../java/org/apache/hadoop/hbase/RawCellBuilderFactory.java | 5 +++--
 3 files changed, 6 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/cdfd12c1/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseInterfaceAudience.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseInterfaceAudience.java
 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseInterfaceAudience.java
index 3a51bd5..4e03457 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseInterfaceAudience.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseInterfaceAudience.java
@@ -36,6 +36,7 @@ public final class HBaseInterfaceAudience {
   public static final String REPLICATION = "Replication";
   public static final String PHOENIX = "Phoenix";
   public static final String SPARK = "Spark";
+  public static final String UNITTEST = "Unittest";
 
   /**
* Denotes class names that appear in user facing configuration files.

http://git-wip-us.apache.org/repos/asf/hbase/blob/cdfd12c1/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
index 9e89307..f779729 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
@@ -23,7 +23,8 @@ import org.apache.yetus.audience.InterfaceAudience;
 
 /**
  * Allows creating a cell with {@link Tag}
- * An instance of this type can be acquired using 
RegionCoprocessorEnvironment#getCellBuilder.
+ * An instance of this type can be acquired by using 
RegionCoprocessorEnvironment#getCellBuilder
+ * (for prod code) and {@link RawCellBuilderFactory} (for unit tests).
  */
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
 public interface RawCellBuilder extends CellBuilder {

http://git-wip-us.apache.org/repos/asf/hbase/blob/cdfd12c1/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
index 0f61ee8..f7ff952 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
@@ -23,10 +23,11 @@ import org.apache.yetus.audience.InterfaceAudience;
 /**
  * Factory for creating cells for CPs. It does deep_copy {@link 
CellBuilderType#DEEP_COPY} while
  * creating cells.
- * This is private because coprocessors should get an instance of type {@link 
RawCellBuilder}
+ * This class is limited private only for use in unit-tests.
+ * For non-test uses in coprocessors, get an instance of type {@link 
RawCellBuilder}
  * using RegionCoprocessorEnvironment#getCellBuilder.
  */
-@InterfaceAudience.Private
+@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.UNITTEST)
 public final class RawCellBuilderFactory {
 
   /**



hbase git commit: HBASE-19823 Make RawCellBuilderFactory LimitedPrivate.UNITTEST

2018-01-19 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 579586c69 -> 4bfdcaa3f


HBASE-19823 Make RawCellBuilderFactory LimitedPrivate.UNITTEST


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

Branch: refs/heads/master
Commit: 4bfdcaa3f30dd5e898e54a7b37a7231715cd03cc
Parents: 579586c
Author: Apekshit Sharma 
Authored: Thu Jan 18 11:34:21 2018 -0800
Committer: Apekshit Sharma 
Committed: Fri Jan 19 14:53:01 2018 -0800

--
 .../java/org/apache/hadoop/hbase/HBaseInterfaceAudience.java| 1 +
 .../src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java   | 3 ++-
 .../java/org/apache/hadoop/hbase/RawCellBuilderFactory.java | 5 +++--
 3 files changed, 6 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/4bfdcaa3/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseInterfaceAudience.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseInterfaceAudience.java
 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseInterfaceAudience.java
index 3a51bd5..4e03457 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseInterfaceAudience.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseInterfaceAudience.java
@@ -36,6 +36,7 @@ public final class HBaseInterfaceAudience {
   public static final String REPLICATION = "Replication";
   public static final String PHOENIX = "Phoenix";
   public static final String SPARK = "Spark";
+  public static final String UNITTEST = "Unittest";
 
   /**
* Denotes class names that appear in user facing configuration files.

http://git-wip-us.apache.org/repos/asf/hbase/blob/4bfdcaa3/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
index 9e89307..f779729 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
@@ -23,7 +23,8 @@ import org.apache.yetus.audience.InterfaceAudience;
 
 /**
  * Allows creating a cell with {@link Tag}
- * An instance of this type can be acquired using 
RegionCoprocessorEnvironment#getCellBuilder.
+ * An instance of this type can be acquired by using 
RegionCoprocessorEnvironment#getCellBuilder
+ * (for prod code) and {@link RawCellBuilderFactory} (for unit tests).
  */
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
 public interface RawCellBuilder extends CellBuilder {

http://git-wip-us.apache.org/repos/asf/hbase/blob/4bfdcaa3/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
index 0f61ee8..f7ff952 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
@@ -23,10 +23,11 @@ import org.apache.yetus.audience.InterfaceAudience;
 /**
  * Factory for creating cells for CPs. It does deep_copy {@link 
CellBuilderType#DEEP_COPY} while
  * creating cells.
- * This is private because coprocessors should get an instance of type {@link 
RawCellBuilder}
+ * This class is limited private only for use in unit-tests.
+ * For non-test uses in coprocessors, get an instance of type {@link 
RawCellBuilder}
  * using RegionCoprocessorEnvironment#getCellBuilder.
  */
-@InterfaceAudience.Private
+@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.UNITTEST)
 public final class RawCellBuilderFactory {
 
   /**



hbase git commit: HBASE-19825 Fix hadoop3 compat test failures, need commons-beanutils from hadoop 3

2018-01-18 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 5aa802e2c -> 3f1203d6d


HBASE-19825 Fix hadoop3 compat test failures, need commons-beanutils from 
hadoop 3


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

Branch: refs/heads/branch-2
Commit: 3f1203d6d64bd4846d39d49595e3e58ca8136eb6
Parents: 5aa802e
Author: Umesh Agashe 
Authored: Thu Jan 18 16:09:32 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 18 18:29:28 2018 -0800

--
 pom.xml | 4 
 1 file changed, 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/3f1203d6/pom.xml
--
diff --git a/pom.xml b/pom.xml
index bf8d06e..a06cad7 100755
--- a/pom.xml
+++ b/pom.xml
@@ -2772,10 +2772,6 @@
htrace-core
  
  
-   commons-beanutils
-   commons-beanutils
- 
- 
javax.servlet.jsp
jsp-api
  



hbase git commit: HBASE-19825 Fix hadoop3 compat test failures, need commons-beanutils from hadoop 3

2018-01-18 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 2018ffc94 -> 9ba961a5e


HBASE-19825 Fix hadoop3 compat test failures, need commons-beanutils from 
hadoop 3


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

Branch: refs/heads/master
Commit: 9ba961a5eff2561524eea51eed7c2440109baf89
Parents: 2018ffc
Author: Umesh Agashe 
Authored: Thu Jan 18 16:09:32 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 18 18:28:54 2018 -0800

--
 pom.xml | 4 
 1 file changed, 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/9ba961a5/pom.xml
--
diff --git a/pom.xml b/pom.xml
index bbfb122..cb1d0bf 100755
--- a/pom.xml
+++ b/pom.xml
@@ -2889,10 +2889,6 @@
htrace-core
  
  
-   commons-beanutils
-   commons-beanutils
- 
- 
javax.servlet.jsp
jsp-api
  



hbase git commit: HBASE-19820 Restore public constructor of MiniHBaseCluster (API compat).

2018-01-18 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 251826e13 -> 25621c6ea


HBASE-19820 Restore public constructor of MiniHBaseCluster (API compat).


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

Branch: refs/heads/branch-2
Commit: 25621c6ea25c5e77a46ad87e9d8fe7c8471b8a5b
Parents: 251826e
Author: Apekshit Sharma 
Authored: Wed Jan 17 18:45:58 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 18 09:07:30 2018 -0800

--
 .../org/apache/hadoop/hbase/MiniHBaseCluster.java| 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/25621c6e/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
index e7f8496..3a40477 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
@@ -78,7 +78,20 @@ public class MiniHBaseCluster extends HBaseCluster {
*/
   public MiniHBaseCluster(Configuration conf, int numMasters, int 
numRegionServers)
   throws IOException, InterruptedException {
-this(conf, numMasters, numRegionServers, null, null, null);
+this(conf, numMasters, numRegionServers, null, null);
+  }
+
+  /**
+   * Start a MiniHBaseCluster.
+   * @param conf Configuration to be used for cluster
+   * @param numMasters initial number of masters to start.
+   * @param numRegionServers initial number of region servers to start.
+   */
+  public MiniHBaseCluster(Configuration conf, int numMasters, int 
numRegionServers,
+ Class masterClass,
+ Class 
regionserverClass)
+  throws IOException, InterruptedException {
+this(conf, numMasters, numRegionServers, null, masterClass, 
regionserverClass);
   }
 
   /**



hbase git commit: HBASE-19820 Restore public constructor of MiniHBaseCluster (API compat).

2018-01-18 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 7573e07cc -> 09ffbb5b6


HBASE-19820 Restore public constructor of MiniHBaseCluster (API compat).


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

Branch: refs/heads/master
Commit: 09ffbb5b68caa395407241eb891d567c98aa49b7
Parents: 7573e07
Author: Apekshit Sharma 
Authored: Wed Jan 17 18:45:58 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 18 09:05:30 2018 -0800

--
 .../org/apache/hadoop/hbase/MiniHBaseCluster.java| 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/09ffbb5b/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
index e7f8496..3a40477 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
@@ -78,7 +78,20 @@ public class MiniHBaseCluster extends HBaseCluster {
*/
   public MiniHBaseCluster(Configuration conf, int numMasters, int 
numRegionServers)
   throws IOException, InterruptedException {
-this(conf, numMasters, numRegionServers, null, null, null);
+this(conf, numMasters, numRegionServers, null, null);
+  }
+
+  /**
+   * Start a MiniHBaseCluster.
+   * @param conf Configuration to be used for cluster
+   * @param numMasters initial number of masters to start.
+   * @param numRegionServers initial number of region servers to start.
+   */
+  public MiniHBaseCluster(Configuration conf, int numMasters, int 
numRegionServers,
+ Class masterClass,
+ Class 
regionserverClass)
+  throws IOException, InterruptedException {
+this(conf, numMasters, numRegionServers, null, masterClass, 
regionserverClass);
   }
 
   /**



hbase git commit: HBASE-19789 Not exclude flaky tests from nightly builds.

2018-01-16 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 af41979bb -> 1a97b33e1


HBASE-19789 Not exclude flaky tests from nightly builds.


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

Branch: refs/heads/branch-1.2
Commit: 1a97b33e1cde9b534157a555c8799ee6911a8246
Parents: af41979
Author: Apekshit Sharma 
Authored: Fri Jan 12 16:22:06 2018 -0800
Committer: Apekshit Sharma 
Committed: Tue Jan 16 10:11:55 2018 -0800

--
 dev-support/Jenkinsfile| 7 +--
 dev-support/hbase_nightly_yetus.sh | 7 +--
 2 files changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/1a97b33e/dev-support/Jenkinsfile
--
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index b01a96b..b0d6724 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -44,8 +44,11 @@ pipeline {
 // These tests currently have known failures. Once they burn down to 0, 
remove from here so that new problems will cause a failure.
 TESTS_FILTER = 
'cc,checkstyle,javac,javadoc,pylint,shellcheck,whitespace,perlcritic,ruby-lint,rubocop,mvnsite,xml'
 BRANCH_SPECIFIC_DOCKERFILE = "${env.BASEDIR}/dev-support/docker/Dockerfile"
-// Only used for master branch.
-EXCLUDE_TESTS_URL = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests/lastSuccessfulBuild/artifact/excludes/'
+// Flaky urls for different branches. Replace '-' and '.' in branch name 
by '_' because those
+// characters are not allowed in bash variable name.
+// Not excluding flakies from the nightly build for now.
+// EXCLUDE_TESTS_URL_master = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests/lastSuccessfulBuild/artifact/excludes/'
+// EXCLUDE_TESTS_URL_branch_2 = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests-branch2.0/lastSuccessfulBuild/artifact/excludes/'
   }
   parameters {
 booleanParam(name: 'USE_YETUS_PRERELEASE', defaultValue: false, 
description: '''Check to use the current HEAD of apache/yetus rather than our 
configured release.

http://git-wip-us.apache.org/repos/asf/hbase/blob/1a97b33e/dev-support/hbase_nightly_yetus.sh
--
diff --git a/dev-support/hbase_nightly_yetus.sh 
b/dev-support/hbase_nightly_yetus.sh
index e1175d2..4e67354 100755
--- a/dev-support/hbase_nightly_yetus.sh
+++ b/dev-support/hbase_nightly_yetus.sh
@@ -69,10 +69,13 @@ YETUS_ARGS=("--branch=${BRANCH_NAME}" "${YETUS_ARGS[@]}")
 YETUS_ARGS=("--tests-filter=${TESTS_FILTER}" "${YETUS_ARGS[@]}")
 
 # Currently, flaky list is calculated only for master branch.
-if [[ -n "${EXCLUDE_TESTS_URL}" && "${BRANCH_NAME}" == "master" ]]; then
+UNDERSCORED_BRANCH_NAME=$(echo ${BRANCH_NAME} | tr '.-' '_')
+EXCLUDE_TESTS_URL=$(eval echo "\$EXCLUDE_TESTS_URL_${UNDERSCORED_BRANCH_NAME}")
+INCLUDE_TESTS_URL=$(eval echo "\$INCLUDE_TESTS_URL_${UNDERSCORED_BRANCH_NAME}")
+if [[ -n "${EXCLUDE_TESTS_URL}" ]]; then
   YETUS_ARGS=("--exclude-tests-url=${EXCLUDE_TESTS_URL}" "${YETUS_ARGS[@]}")
 fi
-if [[ -n "${INCLUDE_TESTS_URL}" && "${BRANCH_NAME}" == "master" ]]; then
+if [[ -n "${INCLUDE_TESTS_URL}" ]]; then
   YETUS_ARGS=("--include-tests-url=${INCLUDE_TESTS_URL}" "${YETUS_ARGS[@]}")
 fi
 



hbase git commit: HBASE-19789 Not exclude flaky tests from nightly builds.

2018-01-16 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1.3 b6f4f511a -> 28f811420


HBASE-19789 Not exclude flaky tests from nightly builds.


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

Branch: refs/heads/branch-1.3
Commit: 28f811420368450ba12be77c2836d529938b2d75
Parents: b6f4f51
Author: Apekshit Sharma 
Authored: Fri Jan 12 16:22:06 2018 -0800
Committer: Apekshit Sharma 
Committed: Tue Jan 16 10:11:32 2018 -0800

--
 dev-support/Jenkinsfile| 7 +--
 dev-support/hbase_nightly_yetus.sh | 7 +--
 2 files changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/28f81142/dev-support/Jenkinsfile
--
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index b01a96b..b0d6724 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -44,8 +44,11 @@ pipeline {
 // These tests currently have known failures. Once they burn down to 0, 
remove from here so that new problems will cause a failure.
 TESTS_FILTER = 
'cc,checkstyle,javac,javadoc,pylint,shellcheck,whitespace,perlcritic,ruby-lint,rubocop,mvnsite,xml'
 BRANCH_SPECIFIC_DOCKERFILE = "${env.BASEDIR}/dev-support/docker/Dockerfile"
-// Only used for master branch.
-EXCLUDE_TESTS_URL = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests/lastSuccessfulBuild/artifact/excludes/'
+// Flaky urls for different branches. Replace '-' and '.' in branch name 
by '_' because those
+// characters are not allowed in bash variable name.
+// Not excluding flakies from the nightly build for now.
+// EXCLUDE_TESTS_URL_master = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests/lastSuccessfulBuild/artifact/excludes/'
+// EXCLUDE_TESTS_URL_branch_2 = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests-branch2.0/lastSuccessfulBuild/artifact/excludes/'
   }
   parameters {
 booleanParam(name: 'USE_YETUS_PRERELEASE', defaultValue: false, 
description: '''Check to use the current HEAD of apache/yetus rather than our 
configured release.

http://git-wip-us.apache.org/repos/asf/hbase/blob/28f81142/dev-support/hbase_nightly_yetus.sh
--
diff --git a/dev-support/hbase_nightly_yetus.sh 
b/dev-support/hbase_nightly_yetus.sh
index e1175d2..4e67354 100755
--- a/dev-support/hbase_nightly_yetus.sh
+++ b/dev-support/hbase_nightly_yetus.sh
@@ -69,10 +69,13 @@ YETUS_ARGS=("--branch=${BRANCH_NAME}" "${YETUS_ARGS[@]}")
 YETUS_ARGS=("--tests-filter=${TESTS_FILTER}" "${YETUS_ARGS[@]}")
 
 # Currently, flaky list is calculated only for master branch.
-if [[ -n "${EXCLUDE_TESTS_URL}" && "${BRANCH_NAME}" == "master" ]]; then
+UNDERSCORED_BRANCH_NAME=$(echo ${BRANCH_NAME} | tr '.-' '_')
+EXCLUDE_TESTS_URL=$(eval echo "\$EXCLUDE_TESTS_URL_${UNDERSCORED_BRANCH_NAME}")
+INCLUDE_TESTS_URL=$(eval echo "\$INCLUDE_TESTS_URL_${UNDERSCORED_BRANCH_NAME}")
+if [[ -n "${EXCLUDE_TESTS_URL}" ]]; then
   YETUS_ARGS=("--exclude-tests-url=${EXCLUDE_TESTS_URL}" "${YETUS_ARGS[@]}")
 fi
-if [[ -n "${INCLUDE_TESTS_URL}" && "${BRANCH_NAME}" == "master" ]]; then
+if [[ -n "${INCLUDE_TESTS_URL}" ]]; then
   YETUS_ARGS=("--include-tests-url=${INCLUDE_TESTS_URL}" "${YETUS_ARGS[@]}")
 fi
 



hbase git commit: HBASE-19789 Not exclude flaky tests from nightly builds.

2018-01-16 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1.4 feb361cd7 -> 882cc0796


HBASE-19789 Not exclude flaky tests from nightly builds.


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

Branch: refs/heads/branch-1.4
Commit: 882cc079627be69410d296830342123652408f26
Parents: feb361c
Author: Apekshit Sharma 
Authored: Fri Jan 12 16:22:06 2018 -0800
Committer: Apekshit Sharma 
Committed: Tue Jan 16 10:11:08 2018 -0800

--
 dev-support/Jenkinsfile| 7 +--
 dev-support/hbase_nightly_yetus.sh | 7 +--
 2 files changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/882cc079/dev-support/Jenkinsfile
--
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index b01a96b..b0d6724 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -44,8 +44,11 @@ pipeline {
 // These tests currently have known failures. Once they burn down to 0, 
remove from here so that new problems will cause a failure.
 TESTS_FILTER = 
'cc,checkstyle,javac,javadoc,pylint,shellcheck,whitespace,perlcritic,ruby-lint,rubocop,mvnsite,xml'
 BRANCH_SPECIFIC_DOCKERFILE = "${env.BASEDIR}/dev-support/docker/Dockerfile"
-// Only used for master branch.
-EXCLUDE_TESTS_URL = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests/lastSuccessfulBuild/artifact/excludes/'
+// Flaky urls for different branches. Replace '-' and '.' in branch name 
by '_' because those
+// characters are not allowed in bash variable name.
+// Not excluding flakies from the nightly build for now.
+// EXCLUDE_TESTS_URL_master = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests/lastSuccessfulBuild/artifact/excludes/'
+// EXCLUDE_TESTS_URL_branch_2 = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests-branch2.0/lastSuccessfulBuild/artifact/excludes/'
   }
   parameters {
 booleanParam(name: 'USE_YETUS_PRERELEASE', defaultValue: false, 
description: '''Check to use the current HEAD of apache/yetus rather than our 
configured release.

http://git-wip-us.apache.org/repos/asf/hbase/blob/882cc079/dev-support/hbase_nightly_yetus.sh
--
diff --git a/dev-support/hbase_nightly_yetus.sh 
b/dev-support/hbase_nightly_yetus.sh
index e1175d2..4e67354 100755
--- a/dev-support/hbase_nightly_yetus.sh
+++ b/dev-support/hbase_nightly_yetus.sh
@@ -69,10 +69,13 @@ YETUS_ARGS=("--branch=${BRANCH_NAME}" "${YETUS_ARGS[@]}")
 YETUS_ARGS=("--tests-filter=${TESTS_FILTER}" "${YETUS_ARGS[@]}")
 
 # Currently, flaky list is calculated only for master branch.
-if [[ -n "${EXCLUDE_TESTS_URL}" && "${BRANCH_NAME}" == "master" ]]; then
+UNDERSCORED_BRANCH_NAME=$(echo ${BRANCH_NAME} | tr '.-' '_')
+EXCLUDE_TESTS_URL=$(eval echo "\$EXCLUDE_TESTS_URL_${UNDERSCORED_BRANCH_NAME}")
+INCLUDE_TESTS_URL=$(eval echo "\$INCLUDE_TESTS_URL_${UNDERSCORED_BRANCH_NAME}")
+if [[ -n "${EXCLUDE_TESTS_URL}" ]]; then
   YETUS_ARGS=("--exclude-tests-url=${EXCLUDE_TESTS_URL}" "${YETUS_ARGS[@]}")
 fi
-if [[ -n "${INCLUDE_TESTS_URL}" && "${BRANCH_NAME}" == "master" ]]; then
+if [[ -n "${INCLUDE_TESTS_URL}" ]]; then
   YETUS_ARGS=("--include-tests-url=${INCLUDE_TESTS_URL}" "${YETUS_ARGS[@]}")
 fi
 



hbase git commit: HBASE-19789 Not exclude flaky tests from nightly builds.

2018-01-16 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1 48025cc84 -> 2e6bec6f2


HBASE-19789 Not exclude flaky tests from nightly builds.


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

Branch: refs/heads/branch-1
Commit: 2e6bec6f2fb0d89345dc9aa4a62b45e8821cfc20
Parents: 48025cc
Author: Apekshit Sharma 
Authored: Fri Jan 12 16:22:06 2018 -0800
Committer: Apekshit Sharma 
Committed: Tue Jan 16 10:10:48 2018 -0800

--
 dev-support/Jenkinsfile| 7 +--
 dev-support/hbase_nightly_yetus.sh | 7 +--
 2 files changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/2e6bec6f/dev-support/Jenkinsfile
--
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index c694d1b..dd98734 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -44,8 +44,11 @@ pipeline {
 // These tests currently have known failures. Once they burn down to 0, 
remove from here so that new problems will cause a failure.
 TESTS_FILTER = 
'cc,checkstyle,javac,javadoc,pylint,shellcheck,whitespace,perlcritic,ruby-lint,rubocop,mvnsite,xml'
 BRANCH_SPECIFIC_DOCKERFILE = "${env.BASEDIR}/dev-support/docker/Dockerfile"
-// Only used for master branch.
-EXCLUDE_TESTS_URL = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests/lastSuccessfulBuild/artifact/excludes/'
+// Flaky urls for different branches. Replace '-' and '.' in branch name 
by '_' because those
+// characters are not allowed in bash variable name.
+// Not excluding flakies from the nightly build for now.
+// EXCLUDE_TESTS_URL_master = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests/lastSuccessfulBuild/artifact/excludes/'
+// EXCLUDE_TESTS_URL_branch_2 = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests-branch2.0/lastSuccessfulBuild/artifact/excludes/'
   }
   parameters {
 booleanParam(name: 'USE_YETUS_PRERELEASE', defaultValue: false, 
description: '''Check to use the current HEAD of apache/yetus rather than our 
configured release.

http://git-wip-us.apache.org/repos/asf/hbase/blob/2e6bec6f/dev-support/hbase_nightly_yetus.sh
--
diff --git a/dev-support/hbase_nightly_yetus.sh 
b/dev-support/hbase_nightly_yetus.sh
index e1175d2..4e67354 100755
--- a/dev-support/hbase_nightly_yetus.sh
+++ b/dev-support/hbase_nightly_yetus.sh
@@ -69,10 +69,13 @@ YETUS_ARGS=("--branch=${BRANCH_NAME}" "${YETUS_ARGS[@]}")
 YETUS_ARGS=("--tests-filter=${TESTS_FILTER}" "${YETUS_ARGS[@]}")
 
 # Currently, flaky list is calculated only for master branch.
-if [[ -n "${EXCLUDE_TESTS_URL}" && "${BRANCH_NAME}" == "master" ]]; then
+UNDERSCORED_BRANCH_NAME=$(echo ${BRANCH_NAME} | tr '.-' '_')
+EXCLUDE_TESTS_URL=$(eval echo "\$EXCLUDE_TESTS_URL_${UNDERSCORED_BRANCH_NAME}")
+INCLUDE_TESTS_URL=$(eval echo "\$INCLUDE_TESTS_URL_${UNDERSCORED_BRANCH_NAME}")
+if [[ -n "${EXCLUDE_TESTS_URL}" ]]; then
   YETUS_ARGS=("--exclude-tests-url=${EXCLUDE_TESTS_URL}" "${YETUS_ARGS[@]}")
 fi
-if [[ -n "${INCLUDE_TESTS_URL}" && "${BRANCH_NAME}" == "master" ]]; then
+if [[ -n "${INCLUDE_TESTS_URL}" ]]; then
   YETUS_ARGS=("--include-tests-url=${INCLUDE_TESTS_URL}" "${YETUS_ARGS[@]}")
 fi
 



hbase git commit: HBASE-19789 Not exclude flaky tests from nightly builds.

2018-01-16 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 f23fd7208 -> e60d302b9


HBASE-19789 Not exclude flaky tests from nightly builds.


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

Branch: refs/heads/branch-2
Commit: e60d302b90fc892baf69995c3747a859a3c0fbf4
Parents: f23fd72
Author: Apekshit Sharma 
Authored: Fri Jan 12 16:22:06 2018 -0800
Committer: Apekshit Sharma 
Committed: Tue Jan 16 10:09:50 2018 -0800

--
 dev-support/Jenkinsfile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/e60d302b/dev-support/Jenkinsfile
--
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index e5d33e0..14092d5 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -46,8 +46,9 @@ pipeline {
 BRANCH_SPECIFIC_DOCKERFILE = "${env.BASEDIR}/dev-support/docker/Dockerfile"
 // Flaky urls for different branches. Replace '-' and '.' in branch name 
by '_' because those
 // characters are not allowed in bash variable name.
-EXCLUDE_TESTS_URL_master = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests/lastSuccessfulBuild/artifact/excludes/'
-EXCLUDE_TESTS_URL_branch_2 = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests-branch2.0/lastSuccessfulBuild/artifact/excludes/'
+// Not excluding flakies from the nightly build for now.
+// EXCLUDE_TESTS_URL_master = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests/lastSuccessfulBuild/artifact/excludes/'
+// EXCLUDE_TESTS_URL_branch_2 = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests-branch2.0/lastSuccessfulBuild/artifact/excludes/'
   }
   parameters {
 booleanParam(name: 'USE_YETUS_PRERELEASE', defaultValue: false, 
description: '''Check to use the current HEAD of apache/yetus rather than our 
configured release.



hbase git commit: HBASE-19789 Not exclude flaky tests from nightly builds.

2018-01-16 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master d155a4e33 -> 9917244be


HBASE-19789 Not exclude flaky tests from nightly builds.


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

Branch: refs/heads/master
Commit: 9917244be2c7de7dccf870240f08a90baf341bbb
Parents: d155a4e
Author: Apekshit Sharma 
Authored: Fri Jan 12 16:22:06 2018 -0800
Committer: Apekshit Sharma 
Committed: Tue Jan 16 10:07:48 2018 -0800

--
 dev-support/Jenkinsfile| 7 +--
 dev-support/hbase_nightly_yetus.sh | 7 +--
 2 files changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/9917244b/dev-support/Jenkinsfile
--
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index dcef649..14092d5 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -44,8 +44,11 @@ pipeline {
 // These tests currently have known failures. Once they burn down to 0, 
remove from here so that new problems will cause a failure.
 TESTS_FILTER = 
'cc,checkstyle,javac,javadoc,pylint,shellcheck,whitespace,perlcritic,ruby-lint,rubocop,mvnsite'
 BRANCH_SPECIFIC_DOCKERFILE = "${env.BASEDIR}/dev-support/docker/Dockerfile"
-// Only used for master branch.
-EXCLUDE_TESTS_URL = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests/lastSuccessfulBuild/artifact/excludes/'
+// Flaky urls for different branches. Replace '-' and '.' in branch name 
by '_' because those
+// characters are not allowed in bash variable name.
+// Not excluding flakies from the nightly build for now.
+// EXCLUDE_TESTS_URL_master = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests/lastSuccessfulBuild/artifact/excludes/'
+// EXCLUDE_TESTS_URL_branch_2 = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests-branch2.0/lastSuccessfulBuild/artifact/excludes/'
   }
   parameters {
 booleanParam(name: 'USE_YETUS_PRERELEASE', defaultValue: false, 
description: '''Check to use the current HEAD of apache/yetus rather than our 
configured release.

http://git-wip-us.apache.org/repos/asf/hbase/blob/9917244b/dev-support/hbase_nightly_yetus.sh
--
diff --git a/dev-support/hbase_nightly_yetus.sh 
b/dev-support/hbase_nightly_yetus.sh
index e1175d2..4e67354 100755
--- a/dev-support/hbase_nightly_yetus.sh
+++ b/dev-support/hbase_nightly_yetus.sh
@@ -69,10 +69,13 @@ YETUS_ARGS=("--branch=${BRANCH_NAME}" "${YETUS_ARGS[@]}")
 YETUS_ARGS=("--tests-filter=${TESTS_FILTER}" "${YETUS_ARGS[@]}")
 
 # Currently, flaky list is calculated only for master branch.
-if [[ -n "${EXCLUDE_TESTS_URL}" && "${BRANCH_NAME}" == "master" ]]; then
+UNDERSCORED_BRANCH_NAME=$(echo ${BRANCH_NAME} | tr '.-' '_')
+EXCLUDE_TESTS_URL=$(eval echo "\$EXCLUDE_TESTS_URL_${UNDERSCORED_BRANCH_NAME}")
+INCLUDE_TESTS_URL=$(eval echo "\$INCLUDE_TESTS_URL_${UNDERSCORED_BRANCH_NAME}")
+if [[ -n "${EXCLUDE_TESTS_URL}" ]]; then
   YETUS_ARGS=("--exclude-tests-url=${EXCLUDE_TESTS_URL}" "${YETUS_ARGS[@]}")
 fi
-if [[ -n "${INCLUDE_TESTS_URL}" && "${BRANCH_NAME}" == "master" ]]; then
+if [[ -n "${INCLUDE_TESTS_URL}" ]]; then
   YETUS_ARGS=("--include-tests-url=${INCLUDE_TESTS_URL}" "${YETUS_ARGS[@]}")
 fi
 



hbase git commit: HBASE-19789 Exclude flaky tests from nightly branch-2 runs

2018-01-12 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 026f535a7 -> f91589d30


HBASE-19789 Exclude flaky tests from nightly branch-2 runs


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

Branch: refs/heads/branch-2
Commit: f91589d3056f69a0eeac5bfd2736c271ec76ba95
Parents: 026f535
Author: Apekshit Sharma 
Authored: Fri Jan 12 16:22:06 2018 -0800
Committer: Apekshit Sharma 
Committed: Fri Jan 12 16:24:45 2018 -0800

--
 dev-support/Jenkinsfile| 6 --
 dev-support/hbase_nightly_yetus.sh | 7 +--
 2 files changed, 9 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f91589d3/dev-support/Jenkinsfile
--
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index dcef649..e5d33e0 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -44,8 +44,10 @@ pipeline {
 // These tests currently have known failures. Once they burn down to 0, 
remove from here so that new problems will cause a failure.
 TESTS_FILTER = 
'cc,checkstyle,javac,javadoc,pylint,shellcheck,whitespace,perlcritic,ruby-lint,rubocop,mvnsite'
 BRANCH_SPECIFIC_DOCKERFILE = "${env.BASEDIR}/dev-support/docker/Dockerfile"
-// Only used for master branch.
-EXCLUDE_TESTS_URL = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests/lastSuccessfulBuild/artifact/excludes/'
+// Flaky urls for different branches. Replace '-' and '.' in branch name 
by '_' because those
+// characters are not allowed in bash variable name.
+EXCLUDE_TESTS_URL_master = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests/lastSuccessfulBuild/artifact/excludes/'
+EXCLUDE_TESTS_URL_branch_2 = 
'https://builds.apache.org/job/HBase-Find-Flaky-Tests-branch2.0/lastSuccessfulBuild/artifact/excludes/'
   }
   parameters {
 booleanParam(name: 'USE_YETUS_PRERELEASE', defaultValue: false, 
description: '''Check to use the current HEAD of apache/yetus rather than our 
configured release.

http://git-wip-us.apache.org/repos/asf/hbase/blob/f91589d3/dev-support/hbase_nightly_yetus.sh
--
diff --git a/dev-support/hbase_nightly_yetus.sh 
b/dev-support/hbase_nightly_yetus.sh
index e1175d2..4e67354 100755
--- a/dev-support/hbase_nightly_yetus.sh
+++ b/dev-support/hbase_nightly_yetus.sh
@@ -69,10 +69,13 @@ YETUS_ARGS=("--branch=${BRANCH_NAME}" "${YETUS_ARGS[@]}")
 YETUS_ARGS=("--tests-filter=${TESTS_FILTER}" "${YETUS_ARGS[@]}")
 
 # Currently, flaky list is calculated only for master branch.
-if [[ -n "${EXCLUDE_TESTS_URL}" && "${BRANCH_NAME}" == "master" ]]; then
+UNDERSCORED_BRANCH_NAME=$(echo ${BRANCH_NAME} | tr '.-' '_')
+EXCLUDE_TESTS_URL=$(eval echo "\$EXCLUDE_TESTS_URL_${UNDERSCORED_BRANCH_NAME}")
+INCLUDE_TESTS_URL=$(eval echo "\$INCLUDE_TESTS_URL_${UNDERSCORED_BRANCH_NAME}")
+if [[ -n "${EXCLUDE_TESTS_URL}" ]]; then
   YETUS_ARGS=("--exclude-tests-url=${EXCLUDE_TESTS_URL}" "${YETUS_ARGS[@]}")
 fi
-if [[ -n "${INCLUDE_TESTS_URL}" && "${BRANCH_NAME}" == "master" ]]; then
+if [[ -n "${INCLUDE_TESTS_URL}" ]]; then
   YETUS_ARGS=("--include-tests-url=${INCLUDE_TESTS_URL}" "${YETUS_ARGS[@]}")
 fi
 



hbase git commit: HBASE-19773 Documenting how to get instance of type RawCellBuilder

2018-01-11 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 0dacdde0f -> 25e4bf8f3


HBASE-19773 Documenting how to get instance of type RawCellBuilder


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

Branch: refs/heads/branch-2
Commit: 25e4bf8f37ccf6afe879d4a7d05244d998b68b6e
Parents: 0dacdde
Author: Apekshit Sharma 
Authored: Thu Jan 11 13:12:17 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 11 13:17:30 2018 -0800

--
 .../src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java  | 1 +
 .../main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java   | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/25e4bf8f/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
index 53920f6..9e89307 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
@@ -23,6 +23,7 @@ import org.apache.yetus.audience.InterfaceAudience;
 
 /**
  * Allows creating a cell with {@link Tag}
+ * An instance of this type can be acquired using 
RegionCoprocessorEnvironment#getCellBuilder.
  */
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
 public interface RawCellBuilder extends CellBuilder {

http://git-wip-us.apache.org/repos/asf/hbase/blob/25e4bf8f/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
index 8d0c1ab..0f61ee8 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
@@ -23,6 +23,8 @@ import org.apache.yetus.audience.InterfaceAudience;
 /**
  * Factory for creating cells for CPs. It does deep_copy {@link 
CellBuilderType#DEEP_COPY} while
  * creating cells.
+ * This is private because coprocessors should get an instance of type {@link 
RawCellBuilder}
+ * using RegionCoprocessorEnvironment#getCellBuilder.
  */
 @InterfaceAudience.Private
 public final class RawCellBuilderFactory {



hbase git commit: HBASE-19773 Documenting how to get instance of type RawCellBuilder

2018-01-11 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master e0eea94c9 -> 09ae5abbe


HBASE-19773 Documenting how to get instance of type RawCellBuilder


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

Branch: refs/heads/master
Commit: 09ae5abbe78e721a207a64733f2925fa6ce820f0
Parents: e0eea94
Author: Apekshit Sharma 
Authored: Thu Jan 11 13:12:17 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 11 13:17:03 2018 -0800

--
 .../src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java  | 1 +
 .../main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java   | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/09ae5abb/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
index 53920f6..9e89307 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
@@ -23,6 +23,7 @@ import org.apache.yetus.audience.InterfaceAudience;
 
 /**
  * Allows creating a cell with {@link Tag}
+ * An instance of this type can be acquired using 
RegionCoprocessorEnvironment#getCellBuilder.
  */
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
 public interface RawCellBuilder extends CellBuilder {

http://git-wip-us.apache.org/repos/asf/hbase/blob/09ae5abb/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
--
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
index 8d0c1ab..0f61ee8 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
@@ -23,6 +23,8 @@ import org.apache.yetus.audience.InterfaceAudience;
 /**
  * Factory for creating cells for CPs. It does deep_copy {@link 
CellBuilderType#DEEP_COPY} while
  * creating cells.
+ * This is private because coprocessors should get an instance of type {@link 
RawCellBuilder}
+ * using RegionCoprocessorEnvironment#getCellBuilder.
  */
 @InterfaceAudience.Private
 public final class RawCellBuilderFactory {



hbase git commit: HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing scanner timeout.

2018-01-11 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1.3 16ad5fdcc -> bccc706d6


HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing 
scanner timeout.

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/branch-1.3
Commit: bccc706d63905a65f90a2f71f8e2ea6be6f0efa0
Parents: 16ad5fd
Author: Chia-Ping Tsai 
Authored: Thu Jan 11 10:27:18 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 11 10:40:39 2018 -0800

--
 .../org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/bccc706d/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
index cc509a4..335872f 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
@@ -183,7 +183,7 @@ public class TestFSErrorsExposed {
 try {
   // Make it fail faster.
   util.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 
1);
-
+  
util.getConfiguration().setInt(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, 
9);
   util.startMiniCluster(1);
   TableName tableName = TableName.valueOf("table");
   byte[] fam = Bytes.toBytes("fam");



hbase git commit: HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing scanner timeout.

2018-01-11 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 eb77f0603 -> af41979bb


HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing 
scanner timeout.

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/branch-1.2
Commit: af41979bb4bbfa223cf06ea614bf926855891ad5
Parents: eb77f06
Author: Chia-Ping Tsai 
Authored: Thu Jan 11 10:27:18 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 11 10:41:14 2018 -0800

--
 .../org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/af41979b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
index cc509a4..335872f 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
@@ -183,7 +183,7 @@ public class TestFSErrorsExposed {
 try {
   // Make it fail faster.
   util.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 
1);
-
+  
util.getConfiguration().setInt(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, 
9);
   util.startMiniCluster(1);
   TableName tableName = TableName.valueOf("table");
   byte[] fam = Bytes.toBytes("fam");



hbase git commit: HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing scanner timeout.

2018-01-11 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1.4 412148518 -> bf1049926


HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing 
scanner timeout.

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/branch-1.4
Commit: bf1049926a7528251c766f46e39c11631dc8860e
Parents: 4121485
Author: Chia-Ping Tsai 
Authored: Thu Jan 11 10:27:18 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 11 10:40:17 2018 -0800

--
 .../org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/bf104992/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
index e4a91c3..0ee5f6b 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
@@ -183,7 +183,7 @@ public class TestFSErrorsExposed {
 try {
   // Make it fail faster.
   util.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 
1);
-
+  
util.getConfiguration().setInt(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, 
9);
   util.startMiniCluster(1);
   TableName tableName = TableName.valueOf("table");
   byte[] fam = Bytes.toBytes("fam");



hbase git commit: HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing scanner timeout.

2018-01-11 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1 6f1dd258b -> 0ef6530aa


HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing 
scanner timeout.

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/branch-1
Commit: 0ef6530aa13b55cb058dd63aa740f82018a043a3
Parents: 6f1dd25
Author: Chia-Ping Tsai 
Authored: Thu Jan 11 10:27:18 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 11 10:39:42 2018 -0800

--
 .../org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0ef6530a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
index e4a91c3..0ee5f6b 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
@@ -183,7 +183,7 @@ public class TestFSErrorsExposed {
 try {
   // Make it fail faster.
   util.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 
1);
-
+  
util.getConfiguration().setInt(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, 
9);
   util.startMiniCluster(1);
   TableName tableName = TableName.valueOf("table");
   byte[] fam = Bytes.toBytes("fam");



[2/2] hbase git commit: HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing scanner timeout.

2018-01-11 Thread appy
HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing 
scanner timeout.

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/branch-2
Commit: 5d4140e09d8ecf16a6e7d845129759c30e62f9af
Parents: 31fe5db
Author: Chia-Ping Tsai 
Authored: Thu Jan 11 10:27:18 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 11 10:35:36 2018 -0800

--
 .../org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java   | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/5d4140e0/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
index bd66bde..bbf06fd 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
@@ -188,6 +188,7 @@ public class TestFSErrorsExposed {
 try {
   // Make it fail faster.
   util.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 
1);
+  
util.getConfiguration().setInt(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, 
9);
   util.getConfiguration().setInt("hbase.lease.recovery.timeout", 1);
   util.getConfiguration().setInt("hbase.lease.recovery.dfs.timeout", 1000);
   util.startMiniCluster(1);



[1/2] hbase git commit: Revert due to missing author. "HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing scanner timeout."

2018-01-11 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 bf3c20778 -> 5d4140e09


Revert due to missing author. "HBASE-19685 Fix 
TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing scanner 
timeout."

This reverts commit 0b9dc14dbca98565d29bcd2be5100e29ebcf0e65.


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

Branch: refs/heads/branch-2
Commit: 31fe5dbf6b3a261f2c902d0fd6b82bf6c7ecf954
Parents: bf3c207
Author: Apekshit Sharma 
Authored: Thu Jan 11 10:33:15 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 11 10:35:32 2018 -0800

--
 .../org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java   | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/31fe5dbf/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
index bbf06fd..bd66bde 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
@@ -188,7 +188,6 @@ public class TestFSErrorsExposed {
 try {
   // Make it fail faster.
   util.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 
1);
-  
util.getConfiguration().setInt(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, 
9);
   util.getConfiguration().setInt("hbase.lease.recovery.timeout", 1);
   util.getConfiguration().setInt("hbase.lease.recovery.dfs.timeout", 1000);
   util.startMiniCluster(1);



[2/2] hbase git commit: HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing scanner timeout.

2018-01-11 Thread appy
HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing 
scanner timeout.

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/master
Commit: c88e0826c0f700fd3cd70385a7b25b33521f
Parents: 15bb49d
Author: Chia-Ping Tsai 
Authored: Thu Jan 11 10:27:18 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 11 10:34:54 2018 -0800

--
 .../org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java   | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c88e/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
index bd66bde..bbf06fd 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
@@ -188,6 +188,7 @@ public class TestFSErrorsExposed {
 try {
   // Make it fail faster.
   util.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 
1);
+  
util.getConfiguration().setInt(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, 
9);
   util.getConfiguration().setInt("hbase.lease.recovery.timeout", 1);
   util.getConfiguration().setInt("hbase.lease.recovery.dfs.timeout", 1000);
   util.startMiniCluster(1);



[1/2] hbase git commit: Revert due to missing author. "HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing scanner timeout."

2018-01-11 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 0b9dc14db -> c88e0


Revert due to missing author. "HBASE-19685 Fix 
TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing scanner 
timeout."

This reverts commit 0b9dc14dbca98565d29bcd2be5100e29ebcf0e65.


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

Branch: refs/heads/master
Commit: 15bb49d803d873c07ebdd6bf77908481f008d07a
Parents: 0b9dc14
Author: Apekshit Sharma 
Authored: Thu Jan 11 10:33:15 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 11 10:34:42 2018 -0800

--
 .../org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java   | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/15bb49d8/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
index bbf06fd..bd66bde 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
@@ -188,7 +188,6 @@ public class TestFSErrorsExposed {
 try {
   // Make it fail faster.
   util.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 
1);
-  
util.getConfiguration().setInt(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, 
9);
   util.getConfiguration().setInt("hbase.lease.recovery.timeout", 1);
   util.getConfiguration().setInt("hbase.lease.recovery.dfs.timeout", 1000);
   util.startMiniCluster(1);



hbase git commit: HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing scanner timeout.

2018-01-11 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 814d08a2d -> bf3c20778


HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing 
scanner timeout.


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

Branch: refs/heads/branch-2
Commit: bf3c207785150582d371dd605aa06e3df313c1b5
Parents: 814d08a
Author: Apekshit Sharma 
Authored: Thu Jan 11 10:27:18 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 11 10:32:26 2018 -0800

--
 .../org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java   | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/bf3c2077/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
index bd66bde..bbf06fd 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
@@ -188,6 +188,7 @@ public class TestFSErrorsExposed {
 try {
   // Make it fail faster.
   util.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 
1);
+  
util.getConfiguration().setInt(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, 
9);
   util.getConfiguration().setInt("hbase.lease.recovery.timeout", 1);
   util.getConfiguration().setInt("hbase.lease.recovery.dfs.timeout", 1000);
   util.startMiniCluster(1);



hbase git commit: HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing scanner timeout.

2018-01-11 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 71a1192d6 -> 0b9dc14db


HBASE-19685 Fix TestFSErrorsExposed#testFullSystemBubblesFSErrors by increasing 
scanner timeout.


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

Branch: refs/heads/master
Commit: 0b9dc14dbca98565d29bcd2be5100e29ebcf0e65
Parents: 71a1192
Author: Apekshit Sharma 
Authored: Thu Jan 11 10:27:18 2018 -0800
Committer: Apekshit Sharma 
Committed: Thu Jan 11 10:31:45 2018 -0800

--
 .../org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java   | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/0b9dc14d/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
index bd66bde..bbf06fd 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFSErrorsExposed.java
@@ -188,6 +188,7 @@ public class TestFSErrorsExposed {
 try {
   // Make it fail faster.
   util.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 
1);
+  
util.getConfiguration().setInt(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, 
9);
   util.getConfiguration().setInt("hbase.lease.recovery.timeout", 1);
   util.getConfiguration().setInt("hbase.lease.recovery.dfs.timeout", 1000);
   util.startMiniCluster(1);



hbase git commit: HBASE-19424 Fix NPE in "/metrics" servlet.

2018-01-08 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 85c3e5c2e -> eb77f0603


HBASE-19424 Fix NPE in "/metrics" servlet.

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/branch-1.2
Commit: eb77f0603c18abf7fb2026e52bed22a8fa46ce1e
Parents: 85c3e5c
Author: Toshihiro Suzuki 
Authored: Mon Jan 8 15:07:47 2018 -0800
Committer: Apekshit Sharma 
Committed: Mon Jan 8 15:17:59 2018 -0800

--
 .../src/main/java/org/apache/hadoop/hbase/http/HttpServer.java| 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/eb77f060/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
index 0be4072..532d700 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
@@ -572,6 +572,9 @@ public class HttpServer implements FilterContainer {
 ctx.setContextPath("/");
 ctx.setWar(appDir + "/" + name);
 ctx.getServletContext().setAttribute(CONF_CONTEXT_ATTRIBUTE, conf);
+// for org.apache.hadoop.metrics.MetricsServlet
+ctx.getServletContext().setAttribute(
+  org.apache.hadoop.http.HttpServer2.CONF_CONTEXT_ATTRIBUTE, conf);
 ctx.getServletContext().setAttribute(ADMINS_ACL, adminsAcl);
 addNoCacheFilter(ctx);
 return ctx;



hbase git commit: HBASE-19424 Fix NPE in "/metrics" servlet.

2018-01-08 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1.4 e81b88678 -> 997a1585a


HBASE-19424 Fix NPE in "/metrics" servlet.

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/branch-1.4
Commit: 997a1585a414bce1ffbf4576e1ea42a9a58a3a96
Parents: e81b886
Author: Toshihiro Suzuki 
Authored: Mon Jan 8 15:07:47 2018 -0800
Committer: Apekshit Sharma 
Committed: Mon Jan 8 15:17:28 2018 -0800

--
 .../src/main/java/org/apache/hadoop/hbase/http/HttpServer.java| 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/997a1585/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
index a8ed8a4..aa4dbc7 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
@@ -605,6 +605,9 @@ public class HttpServer implements FilterContainer {
 ctx.setContextPath("/");
 ctx.setWar(appDir + "/" + name);
 ctx.getServletContext().setAttribute(CONF_CONTEXT_ATTRIBUTE, conf);
+// for org.apache.hadoop.metrics.MetricsServlet
+ctx.getServletContext().setAttribute(
+  org.apache.hadoop.http.HttpServer2.CONF_CONTEXT_ATTRIBUTE, conf);
 ctx.getServletContext().setAttribute(ADMINS_ACL, adminsAcl);
 addNoCacheFilter(ctx);
 return ctx;



hbase git commit: HBASE-19424 Fix NPE in "/metrics" servlet.

2018-01-08 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1.3 21dd7ac32 -> 16ad5fdcc


HBASE-19424 Fix NPE in "/metrics" servlet.

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/branch-1.3
Commit: 16ad5fdcc779caaaeb544a90a7ffbc7754a84304
Parents: 21dd7ac
Author: Toshihiro Suzuki 
Authored: Mon Jan 8 15:07:47 2018 -0800
Committer: Apekshit Sharma 
Committed: Mon Jan 8 15:17:48 2018 -0800

--
 .../src/main/java/org/apache/hadoop/hbase/http/HttpServer.java| 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/16ad5fdc/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
index 0be4072..532d700 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
@@ -572,6 +572,9 @@ public class HttpServer implements FilterContainer {
 ctx.setContextPath("/");
 ctx.setWar(appDir + "/" + name);
 ctx.getServletContext().setAttribute(CONF_CONTEXT_ATTRIBUTE, conf);
+// for org.apache.hadoop.metrics.MetricsServlet
+ctx.getServletContext().setAttribute(
+  org.apache.hadoop.http.HttpServer2.CONF_CONTEXT_ATTRIBUTE, conf);
 ctx.getServletContext().setAttribute(ADMINS_ACL, adminsAcl);
 addNoCacheFilter(ctx);
 return ctx;



hbase git commit: HBASE-19424 Fix NPE in "/metrics" servlet.

2018-01-08 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 4c31374a9 -> ed0058b6a


HBASE-19424 Fix NPE in "/metrics" servlet.

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/branch-2
Commit: ed0058b6a1c8f3ceaebda00966a128383b3602c9
Parents: 4c31374
Author: Toshihiro Suzuki 
Authored: Mon Jan 8 15:10:42 2018 -0800
Committer: Apekshit Sharma 
Committed: Mon Jan 8 15:10:53 2018 -0800

--
 .../src/main/java/org/apache/hadoop/hbase/http/HttpServer.java| 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/ed0058b6/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
--
diff --git 
a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java 
b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
index 1041ed5..af72ab8 100644
--- a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
+++ b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
@@ -591,6 +591,9 @@ public class HttpServer implements FilterContainer {
 ctx.setContextPath("/");
 ctx.setWar(appDir + "/" + name);
 ctx.getServletContext().setAttribute(CONF_CONTEXT_ATTRIBUTE, conf);
+// for org.apache.hadoop.metrics.MetricsServlet
+ctx.getServletContext().setAttribute(
+  org.apache.hadoop.http.HttpServer2.CONF_CONTEXT_ATTRIBUTE, conf);
 ctx.getServletContext().setAttribute(ADMINS_ACL, adminsAcl);
 addNoCacheFilter(ctx);
 return ctx;



hbase git commit: HBASE-19424 Fix NPE in "/metrics" servlet.

2018-01-08 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 2509a150c -> f29260cc4


HBASE-19424 Fix NPE in "/metrics" servlet.

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/master
Commit: f29260cc4d27e86ea0948e9b9ddfed18a73ff7e0
Parents: 2509a15
Author: Toshihiro Suzuki 
Authored: Mon Jan 8 15:10:42 2018 -0800
Committer: Apekshit Sharma 
Committed: Mon Jan 8 15:16:56 2018 -0800

--
 .../src/main/java/org/apache/hadoop/hbase/http/HttpServer.java| 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f29260cc/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
--
diff --git 
a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java 
b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
index 1041ed5..af72ab8 100644
--- a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
+++ b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
@@ -591,6 +591,9 @@ public class HttpServer implements FilterContainer {
 ctx.setContextPath("/");
 ctx.setWar(appDir + "/" + name);
 ctx.getServletContext().setAttribute(CONF_CONTEXT_ATTRIBUTE, conf);
+// for org.apache.hadoop.metrics.MetricsServlet
+ctx.getServletContext().setAttribute(
+  org.apache.hadoop.http.HttpServer2.CONF_CONTEXT_ATTRIBUTE, conf);
 ctx.getServletContext().setAttribute(ADMINS_ACL, adminsAcl);
 addNoCacheFilter(ctx);
 return ctx;



hbase git commit: HBASE-19424 Fix NPE in "/metrics" servlet.

2018-01-08 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1 fa07c211a -> e6453ab84


HBASE-19424 Fix NPE in "/metrics" servlet.

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/branch-1
Commit: e6453ab84baa744dedc0a81cabbd1e9770d41c97
Parents: fa07c21
Author: Toshihiro Suzuki 
Authored: Mon Jan 8 15:07:47 2018 -0800
Committer: Apekshit Sharma 
Committed: Mon Jan 8 15:09:27 2018 -0800

--
 .../src/main/java/org/apache/hadoop/hbase/http/HttpServer.java| 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/e6453ab8/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
index a8ed8a4..aa4dbc7 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
@@ -605,6 +605,9 @@ public class HttpServer implements FilterContainer {
 ctx.setContextPath("/");
 ctx.setWar(appDir + "/" + name);
 ctx.getServletContext().setAttribute(CONF_CONTEXT_ATTRIBUTE, conf);
+// for org.apache.hadoop.metrics.MetricsServlet
+ctx.getServletContext().setAttribute(
+  org.apache.hadoop.http.HttpServer2.CONF_CONTEXT_ATTRIBUTE, conf);
 ctx.getServletContext().setAttribute(ADMINS_ACL, adminsAcl);
 addNoCacheFilter(ctx);
 return ctx;



hbase git commit: HBASE-17436 Add column to master web UI for displaying region states when listing regions of a table.

2018-01-05 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 5ce935112 -> 9cd0e1a49


HBASE-17436 Add column to master web UI for displaying region states when 
listing regions of a table.

Signed-off-by: Apekshit Sharma 


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

Branch: refs/heads/master
Commit: 9cd0e1a490e118189289746686ec3aecef987b2a
Parents: 5ce9351
Author: Janos Gub 
Authored: Fri Jan 5 14:30:10 2018 -0800
Committer: Apekshit Sharma 
Committed: Fri Jan 5 14:32:27 2018 -0800

--
 .../main/resources/hbase-webapps/master/table.jsp | 18 ++
 1 file changed, 18 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/9cd0e1a4/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
--
diff --git a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp 
b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
index 319c7bf..9252552 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -27,6 +27,7 @@
   import="java.util.LinkedHashMap"
   import="java.util.List"
   import="java.util.Map"
+  import="java.util.HashMap"
   import="java.util.TreeMap"
   import="org.apache.commons.lang3.StringEscapeUtils"
   import="org.apache.hadoop.conf.Configuration"
@@ -46,6 +47,8 @@
   import="org.apache.hadoop.hbase.client.RegionReplicaUtil"
   import="org.apache.hadoop.hbase.client.Table"
   import="org.apache.hadoop.hbase.master.HMaster"
+  import="org.apache.hadoop.hbase.master.assignment.RegionStates"
+  import="org.apache.hadoop.hbase.master.RegionState"
   import="org.apache.hadoop.hbase.quotas.QuotaTableUtil"
   import="org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot"
   import="org.apache.hadoop.hbase.util.Bytes"
@@ -247,6 +250,14 @@ if ( fqtn != null ) {
 
 <%} else {
   Admin admin = master.getConnection().getAdmin();
+  RegionStates states = master.getAssignmentManager().getRegionStates();
+  Map regionStates = 
states.getRegionByStateOfTable(table.getName());
+  Map stateMap = new HashMap<>();
+  for (RegionState.State regionState : regionStates.keySet()) {
+for (RegionInfo regionInfo : regionStates.get(regionState)) {
+stateMap.put(regionInfo.getEncodedName(), regionState);
+}
+  }
   RegionLocator r = 
master.getClusterConnection().getRegionLocator(table.getName());
   try { %>
 Table Attributes
@@ -452,6 +463,7 @@ ShowDetailName/End Key
   <%= 
escapeXml(showWhole?Bytes.toStringBinary(regionInfo.getEndKey()):"-")%>
+  <%= state%>
   <%
   if (withReplica) {
   %>



hbase git commit: HBASE-19473 Miscellaneous changes to ClientScanner

2018-01-03 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 4c0fba6a8 -> 72631a08c


HBASE-19473 Miscellaneous changes to ClientScanner

- Remove superfluous logging code guard
- Simplify some of the code
- Use ArrayDeque instead of LinkedList for queue implementation


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

Branch: refs/heads/branch-2
Commit: 72631a08c1d8ccc116225bf413989adac830edf8
Parents: 4c0fba6
Author: BELUGA BEHR 
Authored: Wed Jan 3 19:59:45 2018 -0800
Committer: Apekshit Sharma 
Committed: Wed Jan 3 20:26:18 2018 -0800

--
 .../hadoop/hbase/client/ClientScanner.java  | 99 ++--
 1 file changed, 49 insertions(+), 50 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/72631a08/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java
index 42597ff..0c6dc16 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java
@@ -25,29 +25,30 @@ import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesti
 
 import java.io.IOException;
 import java.io.InterruptedIOException;
-import java.util.LinkedList;
+import java.util.ArrayDeque;
 import java.util.Queue;
 import java.util.concurrent.ExecutorService;
 
 import org.apache.commons.lang3.mutable.MutableBoolean;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.client.ScannerCallable.MoreResults;
 import org.apache.hadoop.hbase.DoNotRetryIOException;
+import org.apache.hadoop.hbase.exceptions.OutOfOrderScannerNextException;
+import org.apache.hadoop.hbase.exceptions.ScannerResetException;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HRegionInfo;
+import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
 import org.apache.hadoop.hbase.NotServingRegionException;
+import org.apache.hadoop.hbase.regionserver.RegionServerStoppedException;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.UnknownScannerException;
+import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.hadoop.hbase.client.ScannerCallable.MoreResults;
-import org.apache.hadoop.hbase.exceptions.OutOfOrderScannerNextException;
-import org.apache.hadoop.hbase.exceptions.ScannerResetException;
-import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
-import org.apache.hadoop.hbase.regionserver.RegionServerStoppedException;
+
 import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
-import org.apache.hadoop.hbase.util.Bytes;
 
 /**
  * Implements the scanner interface for the HBase client. If there are 
multiple regions in a table,
@@ -294,25 +295,30 @@ public abstract class ClientScanner extends 
AbstractClientScanner {
   }
 
   protected void initSyncCache() {
-cache = new LinkedList<>();
+cache = new ArrayDeque<>();
   }
 
   protected Result nextWithSyncCache() throws IOException {
-// If the scanner is closed and there's nothing left in the cache, next is 
a no-op.
-if (cache.isEmpty() && this.closed) {
-  return null;
+Result result = cache.poll();
+if (result != null) {
+  return result;
 }
-if (cache.isEmpty()) {
-  loadCache();
+// If there is nothing left in the cache and the scanner is closed,
+// return a no-op
+if (this.closed) {
+  return null;
 }
 
-if (cache.size() > 0) {
-  return cache.poll();
-}
+loadCache();
+
+// try again to load from cache
+result = cache.poll();
 
 // if we exhausted this scanner before calling close, write out the scan 
metrics
-writeScanMetrics();
-return null;
+if (result == null) {
+  writeScanMetrics();
+}
+return result;
   }
 
   @VisibleForTesting
@@ -410,11 +416,9 @@ public abstract class ClientScanner extends 
AbstractClientScanner {
 long remainingResultSize = maxScannerResultSize;
 int countdown = this.caching;
 // This is possible if we just stopped at the boundary of a region in the 
previous call.
-if (callable == null) {
-  if (!moveToNextRegion()) {
-closed = true;
-return;
-  }
+if (callable == null && !moveToNextRegion()) {
+   

hbase git commit: HBASE-19473 Miscellaneous changes to ClientScanner

2018-01-03 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 4ba741674 -> 2bd259b44


HBASE-19473 Miscellaneous changes to ClientScanner

- Remove superfluous logging code guard
- Simplify some of the code
- Use ArrayDeque instead of LinkedList for queue implementation


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

Branch: refs/heads/master
Commit: 2bd259b445971131526a5e6580363c92dc597b10
Parents: 4ba7416
Author: BELUGA BEHR 
Authored: Wed Jan 3 19:59:45 2018 -0800
Committer: Apekshit Sharma 
Committed: Wed Jan 3 20:25:21 2018 -0800

--
 .../hadoop/hbase/client/ClientScanner.java  | 99 ++--
 1 file changed, 49 insertions(+), 50 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/2bd259b4/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java
index 42597ff..0c6dc16 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java
@@ -25,29 +25,30 @@ import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesti
 
 import java.io.IOException;
 import java.io.InterruptedIOException;
-import java.util.LinkedList;
+import java.util.ArrayDeque;
 import java.util.Queue;
 import java.util.concurrent.ExecutorService;
 
 import org.apache.commons.lang3.mutable.MutableBoolean;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.client.ScannerCallable.MoreResults;
 import org.apache.hadoop.hbase.DoNotRetryIOException;
+import org.apache.hadoop.hbase.exceptions.OutOfOrderScannerNextException;
+import org.apache.hadoop.hbase.exceptions.ScannerResetException;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HRegionInfo;
+import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
 import org.apache.hadoop.hbase.NotServingRegionException;
+import org.apache.hadoop.hbase.regionserver.RegionServerStoppedException;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.UnknownScannerException;
+import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.hadoop.hbase.client.ScannerCallable.MoreResults;
-import org.apache.hadoop.hbase.exceptions.OutOfOrderScannerNextException;
-import org.apache.hadoop.hbase.exceptions.ScannerResetException;
-import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
-import org.apache.hadoop.hbase.regionserver.RegionServerStoppedException;
+
 import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
-import org.apache.hadoop.hbase.util.Bytes;
 
 /**
  * Implements the scanner interface for the HBase client. If there are 
multiple regions in a table,
@@ -294,25 +295,30 @@ public abstract class ClientScanner extends 
AbstractClientScanner {
   }
 
   protected void initSyncCache() {
-cache = new LinkedList<>();
+cache = new ArrayDeque<>();
   }
 
   protected Result nextWithSyncCache() throws IOException {
-// If the scanner is closed and there's nothing left in the cache, next is 
a no-op.
-if (cache.isEmpty() && this.closed) {
-  return null;
+Result result = cache.poll();
+if (result != null) {
+  return result;
 }
-if (cache.isEmpty()) {
-  loadCache();
+// If there is nothing left in the cache and the scanner is closed,
+// return a no-op
+if (this.closed) {
+  return null;
 }
 
-if (cache.size() > 0) {
-  return cache.poll();
-}
+loadCache();
+
+// try again to load from cache
+result = cache.poll();
 
 // if we exhausted this scanner before calling close, write out the scan 
metrics
-writeScanMetrics();
-return null;
+if (result == null) {
+  writeScanMetrics();
+}
+return result;
   }
 
   @VisibleForTesting
@@ -410,11 +416,9 @@ public abstract class ClientScanner extends 
AbstractClientScanner {
 long remainingResultSize = maxScannerResultSize;
 int countdown = this.caching;
 // This is possible if we just stopped at the boundary of a region in the 
previous call.
-if (callable == null) {
-  if (!moveToNextRegion()) {
-closed = true;
-return;
-  }
+if (callable == null && !moveToNextRegion()) {
+  

hbase git commit: HBASE-19613 Miscellaneous changes to WALSplitter.

2018-01-03 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 16e842285 -> 59558f020


HBASE-19613 Miscellaneous changes to WALSplitter.

* Use ArrayList instead LinkedList
* Use Apache Commons where appropriate
* Parameterize and improve logging


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

Branch: refs/heads/branch-2
Commit: 59558f020f69af03dbae895c3367d04187555be8
Parents: 16e8422
Author: BELUGA BEHR 
Authored: Wed Jan 3 18:29:09 2018 -0800
Committer: Apekshit Sharma 
Committed: Wed Jan 3 18:39:14 2018 -0800

--
 .../apache/hadoop/hbase/wal/WALSplitter.java| 136 +--
 1 file changed, 63 insertions(+), 73 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/59558f02/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java
index 817e925..4af782d 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java
@@ -29,8 +29,8 @@ import java.io.IOException;
 import java.io.InterruptedIOException;
 import java.text.ParseException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.NavigableSet;
@@ -52,6 +52,9 @@ import java.util.concurrent.atomic.AtomicReference;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections.MapUtils;
+import org.apache.commons.lang3.ArrayUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileAlreadyExistsException;
 import org.apache.hadoop.fs.FileStatus;
@@ -98,7 +101,6 @@ import org.apache.hadoop.ipc.RemoteException;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
 /**
  * This class is responsible for splitting up a bunch of regionserver commit 
log
  * files that are no longer being written to, into new files, one per region, 
for
@@ -188,7 +190,7 @@ public class WALSplitter {
 final FileStatus[] logfiles = SplitLogManager.getFileList(conf,
 Collections.singletonList(logDir), null);
 List splits = new ArrayList<>();
-if (logfiles != null && logfiles.length > 0) {
+if (ArrayUtils.isNotEmpty(logfiles)) {
   for (FileStatus logfile: logfiles) {
 WALSplitter s = new WALSplitter(factory, conf, rootDir, fs, null, 
null);
 if (s.splitLogFile(logfile, null)) {
@@ -230,7 +232,7 @@ public class WALSplitter {
 this.fileBeingSplit = logfile;
 try {
   long logLength = logfile.getLen();
-  LOG.info("Splitting WAL=" + logPath + ", length=" + logLength);
+  LOG.info("Splitting WAL={}, length={}", logPath, logLength);
   status.setStatus("Opening log file");
   if (reporter != null && !reporter.progress()) {
 progress_failed = true;
@@ -238,7 +240,7 @@ public class WALSplitter {
   }
   logFileReader = getReader(logfile, skipErrors, reporter);
   if (logFileReader == null) {
-LOG.warn("Nothing to split in WAL=" + logPath);
+LOG.warn("Nothing to split in WAL={}", logPath);
 return true;
   }
   int numOpenedFilesBeforeReporting = 
conf.getInt("hbase.splitlog.report.openedfiles", 3);
@@ -302,7 +304,7 @@ public class WALSplitter {
   iie.initCause(ie);
   throw iie;
 } catch (CorruptedLogFileException e) {
-  LOG.warn("Could not parse, corrupted WAL=" + logPath, e);
+  LOG.warn("Could not parse, corrupted WAL={}", logPath, e);
   if (splitLogWorkerCoordination != null) {
 // Some tests pass in a csm of null.
 splitLogWorkerCoordination.markCorrupted(rootDir, 
logfile.getPath().getName(), fs);
@@ -315,14 +317,13 @@ public class WALSplitter {
   e = e instanceof RemoteException ? ((RemoteException) 
e).unwrapRemoteException() : e;
   throw e;
 } finally {
-  LOG.debug("Finishing writing output logs and closing down.");
+  LOG.debug("Finishing writing output logs and closing down");
   try {
 if (null != logFileReader) {
   logFileReader.close();
 }
   } catch (IOException exception) {
-LOG.warn("Could not close WAL reader: " + exception.getMessage());
-LOG.debug("exception details", exception);

hbase git commit: HBASE-19613 Miscellaneous changes to WALSplitter.

2018-01-03 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 6e136f26b -> 301062566


HBASE-19613 Miscellaneous changes to WALSplitter.

* Use ArrayList instead LinkedList
* Use Apache Commons where appropriate
* Parameterize and improve logging


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

Branch: refs/heads/master
Commit: 301062566ac6e32d5bc3c6dbfd819b5e62742e8c
Parents: 6e136f2
Author: BELUGA BEHR 
Authored: Wed Jan 3 18:29:09 2018 -0800
Committer: Apekshit Sharma 
Committed: Wed Jan 3 18:30:10 2018 -0800

--
 .../apache/hadoop/hbase/wal/WALSplitter.java| 163 +--
 1 file changed, 75 insertions(+), 88 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/30106256/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java
index 328390e..2aad203 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java
@@ -24,9 +24,9 @@ import java.io.IOException;
 import java.io.InterruptedIOException;
 import java.text.ParseException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.NavigableSet;
@@ -48,6 +48,9 @@ import java.util.concurrent.atomic.AtomicReference;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections.MapUtils;
+import org.apache.commons.lang3.ArrayUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileAlreadyExistsException;
 import org.apache.hadoop.fs.FileStatus;
@@ -86,14 +89,14 @@ import org.apache.hadoop.hbase.wal.WALProvider.Writer;
 import org.apache.hadoop.hbase.zookeeper.ZKSplitLog;
 import org.apache.hadoop.io.MultipleIOException;
 import org.apache.hadoop.ipc.RemoteException;
-import org.apache.yetus.audience.InterfaceAudience;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
 import org.apache.hbase.thirdparty.com.google.common.base.Preconditions;
 import org.apache.hbase.thirdparty.com.google.common.collect.Lists;
 import org.apache.hbase.thirdparty.com.google.protobuf.TextFormat;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.WALEntry;
 import 
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.MutationType;
 import 
org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.RegionStoreSequenceIds;
@@ -203,7 +206,7 @@ public class WALSplitter {
 final FileStatus[] logfiles = SplitLogManager.getFileList(conf,
 Collections.singletonList(logDir), null);
 List splits = new ArrayList<>();
-if (logfiles != null && logfiles.length > 0) {
+if (ArrayUtils.isNotEmpty(logfiles)) {
   for (FileStatus logfile: logfiles) {
 WALSplitter s = new WALSplitter(factory, conf, rootDir, fs, null, 
null);
 if (s.splitLogFile(logfile, null)) {
@@ -245,7 +248,7 @@ public class WALSplitter {
 this.fileBeingSplit = logfile;
 try {
   long logLength = logfile.getLen();
-  LOG.info("Splitting WAL=" + logPath + ", length=" + logLength);
+  LOG.info("Splitting WAL={}, length={}", logPath, logLength);
   status.setStatus("Opening log file");
   if (reporter != null && !reporter.progress()) {
 progress_failed = true;
@@ -253,7 +256,7 @@ public class WALSplitter {
   }
   logFileReader = getReader(logfile, skipErrors, reporter);
   if (logFileReader == null) {
-LOG.warn("Nothing to split in WAL=" + logPath);
+LOG.warn("Nothing to split in WAL={}", logPath);
 return true;
   }
   int numOpenedFilesBeforeReporting = 
conf.getInt("hbase.splitlog.report.openedfiles", 3);
@@ -317,7 +320,7 @@ public class WALSplitter {
   iie.initCause(ie);
   throw iie;
 } catch (CorruptedLogFileException e) {
-  LOG.warn("Could not parse, corrupted WAL=" + logPath, e);
+  LOG.warn("Could not parse, corrupted WAL={}", logPath, e);
   if (splitLogWorkerCoordination != null) {
 // 

hbase git commit: HBASE-19675 Miscellaneous HStore Class Improvements.

2018-01-02 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 8efc4ec6f -> 76580fa99


HBASE-19675 Miscellaneous HStore Class Improvements.

* Use HashSet instead of List for a variable which is only used for lookups
* Remove logging code guards in favor of slf4j parameters
* Use CollectionsUtils.isEmpty() consistently
* Small check-style fixes


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

Branch: refs/heads/branch-2
Commit: 76580fa9912814d9aac5a350f8407f77669ff16e
Parents: 8efc4ec
Author: BELUGA BEHR 
Authored: Tue Jan 2 15:08:08 2018 -0800
Committer: Apekshit Sharma 
Committed: Tue Jan 2 15:21:15 2018 -0800

--
 .../hadoop/hbase/regionserver/HStore.java   | 147 +--
 1 file changed, 70 insertions(+), 77 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/76580fa9/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
index 8daaa78..2ccc8a0 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
@@ -49,6 +49,8 @@ import java.util.function.ToLongFunction;
 import java.util.stream.Collectors;
 import java.util.stream.LongStream;
 
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections4.IterableUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -256,8 +258,7 @@ public class HStore implements Store, HeapSize, 
StoreConfigInformation, Propagat
 // used by ScanQueryMatcher
 long timeToPurgeDeletes =
 Math.max(conf.getLong("hbase.hstore.time.to.purge.deletes", 0), 0);
-LOG.trace("Time to purge deletes set to " + timeToPurgeDeletes +
-"ms in store " + this);
+LOG.trace("Time to purge deletes set to {}ms in store {}", 
timeToPurgeDeletes, this);
 // Get TTL
 long ttl = determineTTLFromFamily(family);
 // Why not just pass a HColumnDescriptor in here altogether?  Even if have
@@ -289,7 +290,7 @@ public class HStore implements Store, HeapSize, 
StoreConfigInformation, Propagat
 this.memstore = ReflectionUtils.newInstance(clz, new Object[] { conf, 
this.comparator, this,
 this.getHRegion().getRegionServicesForStores(), inMemoryCompaction 
});
 }
-LOG.info("Memstore class name is " + className);
+LOG.info("Memstore class name is {}", className);
 this.offPeakHours = OffPeakHours.getInstance(conf);
 
 // Setting up cache configuration for this family
@@ -302,8 +303,8 @@ public class HStore implements Store, HeapSize, 
StoreConfigInformation, Propagat
 this.compactionCheckMultiplier = conf.getInt(
 COMPACTCHECKER_INTERVAL_MULTIPLIER_KEY, 
DEFAULT_COMPACTCHECKER_INTERVAL_MULTIPLIER);
 if (this.compactionCheckMultiplier <= 0) {
-  LOG.error("Compaction check period multiplier must be positive, setting 
default: "
-  + DEFAULT_COMPACTCHECKER_INTERVAL_MULTIPLIER);
+  LOG.error("Compaction check period multiplier must be positive, setting 
default: {}",
+  DEFAULT_COMPACTCHECKER_INTERVAL_MULTIPLIER);
   this.compactionCheckMultiplier = 
DEFAULT_COMPACTCHECKER_INTERVAL_MULTIPLIER;
 }
 
@@ -317,7 +318,7 @@ public class HStore implements Store, HeapSize, 
StoreConfigInformation, Propagat
 
 // Initialize checksum type from name. The names are CRC32, CRC32C, etc.
 this.checksumType = getChecksumType(conf);
-// initilize bytes per checksum
+// Initialize bytes per checksum
 this.bytesPerChecksum = getBytesPerChecksum(conf);
 flushRetriesNumber = conf.getInt(
 "hbase.hstore.flush.retries.number", DEFAULT_FLUSH_RETRIES_NUMBER);
@@ -519,8 +520,8 @@ public class HStore implements Store, HeapSize, 
StoreConfigInformation, Propagat
   }
 
   private List openStoreFiles(Collection files) 
throws IOException {
-if (files == null || files.isEmpty()) {
-  return new ArrayList<>();
+if (CollectionUtils.isEmpty(files)) {
+  return Collections.emptyList();
 }
 // initialize the thread pool for opening store files in parallel..
 ThreadPoolExecutor storeFileOpenerThreadPool =
@@ -545,9 +546,7 @@ public class HStore implements Store, HeapSize, 
StoreConfigInformation, Propagat
 long length = storeFile.getReader().length();
 

hbase git commit: HBASE-19675 Miscellaneous HStore Class Improvements.

2018-01-02 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 741466a88 -> a47afc84c


HBASE-19675 Miscellaneous HStore Class Improvements.

* Use HashSet instead of List for a variable which is only used for lookups
* Remove logging code guards in favor of slf4j parameters
* Use CollectionsUtils.isEmpty() consistently
* Small check-style fixes


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

Branch: refs/heads/master
Commit: a47afc84cd17e1c01a20760cb3b007ca9afa5d35
Parents: 741466a
Author: BELUGA BEHR 
Authored: Tue Jan 2 15:08:08 2018 -0800
Committer: Apekshit Sharma 
Committed: Tue Jan 2 15:16:53 2018 -0800

--
 .../hadoop/hbase/regionserver/HStore.java   | 147 +--
 1 file changed, 70 insertions(+), 77 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/a47afc84/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
index 8daaa78..2ccc8a0 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
@@ -49,6 +49,8 @@ import java.util.function.ToLongFunction;
 import java.util.stream.Collectors;
 import java.util.stream.LongStream;
 
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections4.IterableUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -256,8 +258,7 @@ public class HStore implements Store, HeapSize, 
StoreConfigInformation, Propagat
 // used by ScanQueryMatcher
 long timeToPurgeDeletes =
 Math.max(conf.getLong("hbase.hstore.time.to.purge.deletes", 0), 0);
-LOG.trace("Time to purge deletes set to " + timeToPurgeDeletes +
-"ms in store " + this);
+LOG.trace("Time to purge deletes set to {}ms in store {}", 
timeToPurgeDeletes, this);
 // Get TTL
 long ttl = determineTTLFromFamily(family);
 // Why not just pass a HColumnDescriptor in here altogether?  Even if have
@@ -289,7 +290,7 @@ public class HStore implements Store, HeapSize, 
StoreConfigInformation, Propagat
 this.memstore = ReflectionUtils.newInstance(clz, new Object[] { conf, 
this.comparator, this,
 this.getHRegion().getRegionServicesForStores(), inMemoryCompaction 
});
 }
-LOG.info("Memstore class name is " + className);
+LOG.info("Memstore class name is {}", className);
 this.offPeakHours = OffPeakHours.getInstance(conf);
 
 // Setting up cache configuration for this family
@@ -302,8 +303,8 @@ public class HStore implements Store, HeapSize, 
StoreConfigInformation, Propagat
 this.compactionCheckMultiplier = conf.getInt(
 COMPACTCHECKER_INTERVAL_MULTIPLIER_KEY, 
DEFAULT_COMPACTCHECKER_INTERVAL_MULTIPLIER);
 if (this.compactionCheckMultiplier <= 0) {
-  LOG.error("Compaction check period multiplier must be positive, setting 
default: "
-  + DEFAULT_COMPACTCHECKER_INTERVAL_MULTIPLIER);
+  LOG.error("Compaction check period multiplier must be positive, setting 
default: {}",
+  DEFAULT_COMPACTCHECKER_INTERVAL_MULTIPLIER);
   this.compactionCheckMultiplier = 
DEFAULT_COMPACTCHECKER_INTERVAL_MULTIPLIER;
 }
 
@@ -317,7 +318,7 @@ public class HStore implements Store, HeapSize, 
StoreConfigInformation, Propagat
 
 // Initialize checksum type from name. The names are CRC32, CRC32C, etc.
 this.checksumType = getChecksumType(conf);
-// initilize bytes per checksum
+// Initialize bytes per checksum
 this.bytesPerChecksum = getBytesPerChecksum(conf);
 flushRetriesNumber = conf.getInt(
 "hbase.hstore.flush.retries.number", DEFAULT_FLUSH_RETRIES_NUMBER);
@@ -519,8 +520,8 @@ public class HStore implements Store, HeapSize, 
StoreConfigInformation, Propagat
   }
 
   private List openStoreFiles(Collection files) 
throws IOException {
-if (files == null || files.isEmpty()) {
-  return new ArrayList<>();
+if (CollectionUtils.isEmpty(files)) {
+  return Collections.emptyList();
 }
 // initialize the thread pool for opening store files in parallel..
 ThreadPoolExecutor storeFileOpenerThreadPool =
@@ -545,9 +546,7 @@ public class HStore implements Store, HeapSize, 
StoreConfigInformation, Propagat
 long length = storeFile.getReader().length();
 

hbase git commit: HBASE-19683 Remove Superfluous Methods From String Class (BELUGA BEHR).

2018-01-02 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 69e161cf6 -> b6bff5f8e


HBASE-19683 Remove Superfluous Methods From String Class (BELUGA BEHR).

* Remove isEmpty method
* Remove repeat
Use the Apache Commons implementations instead.


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

Branch: refs/heads/branch-2
Commit: b6bff5f8e2e348331d7342e768ef46d201fec1b6
Parents: 69e161c
Author: BELUGA BEHR 
Authored: Tue Jan 2 11:12:38 2018 -0800
Committer: Apekshit Sharma 
Committed: Tue Jan 2 11:34:52 2018 -0800

--
 .../replication/ReplicationPeerConfigUtil.java  |  3 +--
 .../apache/hadoop/hbase/quotas/QuotaFilter.java |  8 +++
 .../hadoop/hbase/quotas/QuotaTableUtil.java | 12 +-
 .../apache/hadoop/hbase/KeyValueTestUtil.java   |  9 +++
 .../org/apache/hadoop/hbase/util/Strings.java   | 25 ++--
 5 files changed, 18 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/b6bff5f8/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java
index 9270fc2..022bf64 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java
@@ -39,7 +39,6 @@ import 
org.apache.hadoop.hbase.replication.ReplicationPeerConfig;
 import org.apache.hadoop.hbase.replication.ReplicationPeerConfigBuilder;
 import org.apache.hadoop.hbase.replication.ReplicationPeerDescription;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.hbase.util.Strings;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.yetus.audience.InterfaceStability;
 import org.slf4j.Logger;
@@ -164,7 +163,7 @@ public final class ReplicationPeerConfigUtil {
 for (int i = 0, n = tableCFs.length; i < n; i++) {
   ReplicationProtos.TableCF tableCF = tableCFs[i];
   String namespace = tableCF.getTableName().getNamespace().toStringUtf8();
-  if (!Strings.isEmpty(namespace)) {
+  if (StringUtils.isNotEmpty(namespace)) {
 sb.append(namespace).append(".").
 append(tableCF.getTableName().getQualifier().toStringUtf8())
 .append(":");

http://git-wip-us.apache.org/repos/asf/hbase/blob/b6bff5f8/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaFilter.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaFilter.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaFilter.java
index f4bdf27..30cdaf1 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaFilter.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaFilter.java
@@ -20,8 +20,8 @@ package org.apache.hadoop.hbase.quotas;
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.commons.lang3.StringUtils;
 import org.apache.yetus.audience.InterfaceAudience;
-import org.apache.hadoop.hbase.util.Strings;
 
 /**
  * Filter to use to filter the QuotaRetriever results.
@@ -44,7 +44,7 @@ public class QuotaFilter {
*/
   public QuotaFilter setUserFilter(final String regex) {
 this.userRegex = regex;
-hasFilters |= !Strings.isEmpty(regex);
+hasFilters |= StringUtils.isNotEmpty(regex);
 return this;
   }
 
@@ -55,7 +55,7 @@ public class QuotaFilter {
*/
   public QuotaFilter setTableFilter(final String regex) {
 this.tableRegex = regex;
-hasFilters |= !Strings.isEmpty(regex);
+hasFilters |= StringUtils.isNotEmpty(regex);
 return this;
   }
 
@@ -66,7 +66,7 @@ public class QuotaFilter {
*/
   public QuotaFilter setNamespaceFilter(final String regex) {
 this.namespaceRegex = regex;
-hasFilters |= !Strings.isEmpty(regex);
+hasFilters |= StringUtils.isNotEmpty(regex);
 return this;
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b6bff5f8/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaTableUtil.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaTableUtil.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaTableUtil.java
index 

hbase git commit: HBASE-19683 Remove Superfluous Methods From String Class (BELUGA BEHR).

2018-01-02 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 9c2a35542 -> 4e9f4abb1


HBASE-19683 Remove Superfluous Methods From String Class (BELUGA BEHR).

* Remove isEmpty method
* Remove repeat
Use the Apache Commons implementations instead.


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

Branch: refs/heads/master
Commit: 4e9f4abb144a92740c212b4c30628d57e5141cf1
Parents: 9c2a355
Author: BELUGA BEHR 
Authored: Tue Jan 2 11:12:38 2018 -0800
Committer: Apekshit Sharma 
Committed: Tue Jan 2 11:12:38 2018 -0800

--
 .../replication/ReplicationPeerConfigUtil.java  |  3 +--
 .../apache/hadoop/hbase/quotas/QuotaFilter.java |  8 +++
 .../hadoop/hbase/quotas/QuotaTableUtil.java | 12 +-
 .../apache/hadoop/hbase/KeyValueTestUtil.java   |  9 +++
 .../org/apache/hadoop/hbase/util/Strings.java   | 25 ++--
 5 files changed, 18 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/4e9f4abb/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java
index 9270fc2..022bf64 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java
@@ -39,7 +39,6 @@ import 
org.apache.hadoop.hbase.replication.ReplicationPeerConfig;
 import org.apache.hadoop.hbase.replication.ReplicationPeerConfigBuilder;
 import org.apache.hadoop.hbase.replication.ReplicationPeerDescription;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.hbase.util.Strings;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.yetus.audience.InterfaceStability;
 import org.slf4j.Logger;
@@ -164,7 +163,7 @@ public final class ReplicationPeerConfigUtil {
 for (int i = 0, n = tableCFs.length; i < n; i++) {
   ReplicationProtos.TableCF tableCF = tableCFs[i];
   String namespace = tableCF.getTableName().getNamespace().toStringUtf8();
-  if (!Strings.isEmpty(namespace)) {
+  if (StringUtils.isNotEmpty(namespace)) {
 sb.append(namespace).append(".").
 append(tableCF.getTableName().getQualifier().toStringUtf8())
 .append(":");

http://git-wip-us.apache.org/repos/asf/hbase/blob/4e9f4abb/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaFilter.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaFilter.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaFilter.java
index f4bdf27..30cdaf1 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaFilter.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaFilter.java
@@ -20,8 +20,8 @@ package org.apache.hadoop.hbase.quotas;
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.commons.lang3.StringUtils;
 import org.apache.yetus.audience.InterfaceAudience;
-import org.apache.hadoop.hbase.util.Strings;
 
 /**
  * Filter to use to filter the QuotaRetriever results.
@@ -44,7 +44,7 @@ public class QuotaFilter {
*/
   public QuotaFilter setUserFilter(final String regex) {
 this.userRegex = regex;
-hasFilters |= !Strings.isEmpty(regex);
+hasFilters |= StringUtils.isNotEmpty(regex);
 return this;
   }
 
@@ -55,7 +55,7 @@ public class QuotaFilter {
*/
   public QuotaFilter setTableFilter(final String regex) {
 this.tableRegex = regex;
-hasFilters |= !Strings.isEmpty(regex);
+hasFilters |= StringUtils.isNotEmpty(regex);
 return this;
   }
 
@@ -66,7 +66,7 @@ public class QuotaFilter {
*/
   public QuotaFilter setNamespaceFilter(final String regex) {
 this.namespaceRegex = regex;
-hasFilters |= !Strings.isEmpty(regex);
+hasFilters |= StringUtils.isNotEmpty(regex);
 return this;
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/4e9f4abb/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaTableUtil.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaTableUtil.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaTableUtil.java
index ded6303..5c28407 

hbase git commit: HBASE-19589 New regions should always be added with state CLOSED (followup of HBASE-19530)

2017-12-21 Thread appy
sor {
 .build());
   }
 
-  private static String mutationsToString(List mutations) 
throws IOException {
-StringBuilder sb = new StringBuilder();
-String prefix = "";
+  private static void debugLogMutations(List mutations) 
throws IOException {
+if (!METALOG.isDebugEnabled()) {
+  return;
+}
+// Logging each mutation in separate line makes it easier to see diff 
between them visually
+// because of common starting indentation.
 for (Mutation mutation : mutations) {
-  sb.append(prefix).append(mutationToString(mutation));
-  prefix = ", ";
+  debugLogMutation(mutation);
 }
-return sb.toString();
   }
 
-  private static String mutationToString(Mutation p) throws IOException {
-return p.getClass().getSimpleName() + p.toJSON();
+  private static void debugLogMutation(Mutation p) throws IOException {
+METALOG.debug("{} {}", p.getClass().getSimpleName(), p.toJSON());
   }
 
   public static Put addSequenceNum(final Put p, long openSeqNum, long time,
@@ -2328,57 +2229,45 @@ public class MetaTableAccessor {
 return map;
   }
 
+  private static String getSerialReplicationColumnValue(Connection connection,
+  byte[] encodedRegionName, byte[] columnQualifier) throws IOException {
+Get get = new Get(encodedRegionName);
+get.addColumn(HConstants.REPLICATION_META_FAMILY, columnQualifier);
+Result result = get(getMetaHTable(connection), get);
+if (!result.isEmpty()) {
+  Cell c = result.rawCells()[0];
+  return Bytes.toString(c.getValueArray(), c.getValueOffset(), 
c.getValueLength());
+}
+return null;
+  }
+
   /**
* Get daughter region(s) for a region, only used in serial replication.
* @param connection connection we're using
* @param encodedName region's encoded name
-   * @throws IOException
*/
   public static String getSerialReplicationDaughterRegion(Connection 
connection, byte[] encodedName)
   throws IOException {
-Get get = new Get(encodedName);
-get.addColumn(HConstants.REPLICATION_META_FAMILY, daughterNameCq);
-Result result = get(getMetaHTable(connection), get);
-if (!result.isEmpty()) {
-  Cell c = result.rawCells()[0];
-  return Bytes.toString(c.getValueArray(), c.getValueOffset(), 
c.getValueLength());
-}
-return null;
+return getSerialReplicationColumnValue(connection, encodedName, 
daughterNameCq);
   }
 
   /**
* Get parent region(s) for a region, only used in serial replication.
* @param connection connection we're using
* @param encodedName region's encoded name
-   * @throws IOException
*/
   public static String getSerialReplicationParentRegion(Connection connection, 
byte[] encodedName)
   throws IOException {
-Get get = new Get(encodedName);
-get.addColumn(HConstants.REPLICATION_META_FAMILY, parentNameCq);
-Result result = get(getMetaHTable(connection), get);
-if (!result.isEmpty()) {
-  Cell c = result.rawCells()[0];
-  return Bytes.toString(c.getValueArray(), c.getValueOffset(), 
c.getValueLength());
-}
-return null;
+return getSerialReplicationColumnValue(connection, encodedName, 
parentNameCq);
   }
 
   /**
* Get the table name for a region, only used in serial replication.
* @param connection connection we're using
* @param encodedName region's encoded name
-   * @throws IOException
*/
   public static String getSerialReplicationTableName(Connection connection, 
byte[] encodedName)
   throws IOException {
-Get get = new Get(encodedName);
-get.addColumn(HConstants.REPLICATION_META_FAMILY, tableNameCq);
-Result result = get(getMetaHTable(connection), get);
-if (!result.isEmpty()) {
-  Cell c = result.rawCells()[0];
-  return Bytes.toString(c.getValueArray(), c.getValueOffset(), 
c.getValueLength());
-}
-return null;
+return getSerialReplicationColumnValue(connection, encodedName, 
tableNameCq);
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/11ea19a1/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CloneSnapshotProcedure.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CloneSnapshotProcedure.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CloneSnapshotProcedure.java
index a17108f..53533ea 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CloneSnapshotProcedure.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CloneSnapshotProcedure.java
@@ -461,6 +461,8 @@ public class CloneSnapshotProcedure
   private void addRegionsToMeta(final MasterProcedureEnv env) throws 
IOException {
 newRegions = CreateTableProcedure.addTableToMeta(env, tableDescriptor, 
newRegions);
 
+// TODO: parentsToChildrenPairMap is always empty, which makes 
updateMetaParentReg

hbase git commit: HBASE-19589 New regions should always be added with state CLOSED (followup of HBASE-19530)

2017-12-21 Thread appy
sor {
 .build());
   }
 
-  private static String mutationsToString(List mutations) 
throws IOException {
-StringBuilder sb = new StringBuilder();
-String prefix = "";
+  private static void debugLogMutations(List mutations) 
throws IOException {
+if (!METALOG.isDebugEnabled()) {
+  return;
+}
+// Logging each mutation in separate line makes it easier to see diff 
between them visually
+// because of common starting indentation.
 for (Mutation mutation : mutations) {
-  sb.append(prefix).append(mutationToString(mutation));
-  prefix = ", ";
+  debugLogMutation(mutation);
 }
-return sb.toString();
   }
 
-  private static String mutationToString(Mutation p) throws IOException {
-return p.getClass().getSimpleName() + p.toJSON();
+  private static void debugLogMutation(Mutation p) throws IOException {
+METALOG.debug("{} {}", p.getClass().getSimpleName(), p.toJSON());
   }
 
   public static Put addSequenceNum(final Put p, long openSeqNum, long time,
@@ -2328,57 +2229,45 @@ public class MetaTableAccessor {
 return map;
   }
 
+  private static String getSerialReplicationColumnValue(Connection connection,
+  byte[] encodedRegionName, byte[] columnQualifier) throws IOException {
+Get get = new Get(encodedRegionName);
+get.addColumn(HConstants.REPLICATION_META_FAMILY, columnQualifier);
+Result result = get(getMetaHTable(connection), get);
+if (!result.isEmpty()) {
+  Cell c = result.rawCells()[0];
+  return Bytes.toString(c.getValueArray(), c.getValueOffset(), 
c.getValueLength());
+}
+return null;
+  }
+
   /**
* Get daughter region(s) for a region, only used in serial replication.
* @param connection connection we're using
* @param encodedName region's encoded name
-   * @throws IOException
*/
   public static String getSerialReplicationDaughterRegion(Connection 
connection, byte[] encodedName)
   throws IOException {
-Get get = new Get(encodedName);
-get.addColumn(HConstants.REPLICATION_META_FAMILY, daughterNameCq);
-Result result = get(getMetaHTable(connection), get);
-if (!result.isEmpty()) {
-  Cell c = result.rawCells()[0];
-  return Bytes.toString(c.getValueArray(), c.getValueOffset(), 
c.getValueLength());
-}
-return null;
+return getSerialReplicationColumnValue(connection, encodedName, 
daughterNameCq);
   }
 
   /**
* Get parent region(s) for a region, only used in serial replication.
* @param connection connection we're using
* @param encodedName region's encoded name
-   * @throws IOException
*/
   public static String getSerialReplicationParentRegion(Connection connection, 
byte[] encodedName)
   throws IOException {
-Get get = new Get(encodedName);
-get.addColumn(HConstants.REPLICATION_META_FAMILY, parentNameCq);
-Result result = get(getMetaHTable(connection), get);
-if (!result.isEmpty()) {
-  Cell c = result.rawCells()[0];
-  return Bytes.toString(c.getValueArray(), c.getValueOffset(), 
c.getValueLength());
-}
-return null;
+return getSerialReplicationColumnValue(connection, encodedName, 
parentNameCq);
   }
 
   /**
* Get the table name for a region, only used in serial replication.
* @param connection connection we're using
* @param encodedName region's encoded name
-   * @throws IOException
*/
   public static String getSerialReplicationTableName(Connection connection, 
byte[] encodedName)
   throws IOException {
-Get get = new Get(encodedName);
-get.addColumn(HConstants.REPLICATION_META_FAMILY, tableNameCq);
-Result result = get(getMetaHTable(connection), get);
-if (!result.isEmpty()) {
-  Cell c = result.rawCells()[0];
-  return Bytes.toString(c.getValueArray(), c.getValueOffset(), 
c.getValueLength());
-}
-return null;
+return getSerialReplicationColumnValue(connection, encodedName, 
tableNameCq);
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/8ec0aa0d/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CloneSnapshotProcedure.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CloneSnapshotProcedure.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CloneSnapshotProcedure.java
index a17108f..53533ea 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CloneSnapshotProcedure.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CloneSnapshotProcedure.java
@@ -461,6 +461,8 @@ public class CloneSnapshotProcedure
   private void addRegionsToMeta(final MasterProcedureEnv env) throws 
IOException {
 newRegions = CreateTableProcedure.addTableToMeta(env, tableDescriptor, 
newRegions);
 
+// TODO: parentsToChildrenPairMap is always empty, which makes 
updateMetaParentRegions()

hbase git commit: HBASE-10092 Addendum. Move to slf4j. Few changes in bin/ scripts.

2017-12-21 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master a4272a9f0 -> 5f02bf5b7


HBASE-10092 Addendum. Move to slf4j. Few changes in bin/ scripts.


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

Branch: refs/heads/master
Commit: 5f02bf5b7b471e093a546ea494b39216570105e7
Parents: a4272a9
Author: Apekshit Sharma 
Authored: Thu Dec 21 19:20:29 2017 -0800
Committer: Apekshit Sharma 
Committed: Thu Dec 21 19:22:00 2017 -0800

--
 bin/draining_servers.rb | 22 ++
 bin/replication/copy_tables_desc.rb |  4 ++--
 2 files changed, 4 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/5f02bf5b/bin/draining_servers.rb
--
diff --git a/bin/draining_servers.rb b/bin/draining_servers.rb
index 588bac4..27cc0fa 100644
--- a/bin/draining_servers.rb
+++ b/bin/draining_servers.rb
@@ -27,8 +27,7 @@ java_import org.apache.hadoop.hbase.HBaseConfiguration
 java_import org.apache.hadoop.hbase.client.ConnectionFactory
 java_import org.apache.hadoop.hbase.client.HBaseAdmin
 java_import org.apache.hadoop.hbase.zookeeper.ZKUtil
-java_import org.apache.commons.logging.Log
-java_import org.apache.commons.logging.LogFactory
+java_import org.slf4j.LoggerFactory
 
 # Name of this script
 NAME = 'draining_servers'.freeze
@@ -43,10 +42,6 @@ optparse = OptionParser.new do |opts|
 puts opts
 exit
   end
-  options[:debug] = false
-  opts.on('-d', '--debug', 'Display extra debug logging') do
-options[:debug] = true
-  end
 end
 optparse.parse!
 
@@ -133,21 +128,8 @@ end
 
 hostOrServers = ARGV[1..ARGV.size]
 
-# Create a logger and disable the DEBUG-level annoying client logging
-def configureLogging(options)
-  apacheLogger = LogFactory.getLog(NAME)
-  # Configure log4j to not spew so much
-  unless options[:debug]
-logger = org.apache.log4j.Logger.getLogger('org.apache.hadoop.hbase')
-logger.setLevel(org.apache.log4j.Level::WARN)
-logger = org.apache.log4j.Logger.getLogger('org.apache.zookeeper')
-logger.setLevel(org.apache.log4j.Level::WARN)
-  end
-  apacheLogger
-end
-
 # Create a logger and save it to ruby global
-$LOG = configureLogging(options)
+$LOG = LoggerFactory.getLogger(NAME)
 case ARGV[0]
 when 'add'
   if ARGV.length < 2

http://git-wip-us.apache.org/repos/asf/hbase/blob/5f02bf5b/bin/replication/copy_tables_desc.rb
--
diff --git a/bin/replication/copy_tables_desc.rb 
b/bin/replication/copy_tables_desc.rb
index c494765..44a24f9 100644
--- a/bin/replication/copy_tables_desc.rb
+++ b/bin/replication/copy_tables_desc.rb
@@ -24,7 +24,6 @@
 #
 
 include Java
-java_import org.apache.commons.logging.LogFactory
 java_import org.apache.hadoop.conf.Configuration
 java_import org.apache.hadoop.hbase.HBaseConfiguration
 java_import org.apache.hadoop.hbase.HConstants
@@ -32,6 +31,7 @@ java_import org.apache.hadoop.hbase.HTableDescriptor
 java_import org.apache.hadoop.hbase.TableName
 java_import org.apache.hadoop.hbase.client.ConnectionFactory
 java_import org.apache.hadoop.hbase.client.HBaseAdmin
+java_import org.slf4j.LoggerFactory
 
 # Name of this script
 NAME = 'copy_tables_desc'.freeze
@@ -64,7 +64,7 @@ end
 
 usage if ARGV.size < 2 || ARGV.size > 3
 
-LOG = LogFactory.getLog(NAME)
+LOG = LoggerFactory.getLogger(NAME)
 
 parts1 = ARGV[0].split(':')
 



hbase git commit: HBASE-10092 Addendum. Move to slf4j. Few changes in bin/ scripts.

2017-12-21 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 b263eb564 -> 313a65a13


HBASE-10092 Addendum. Move to slf4j. Few changes in bin/ scripts.


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

Branch: refs/heads/branch-2
Commit: 313a65a13cd6bc3fde0ac95f9d2355174c963f08
Parents: b263eb5
Author: Apekshit Sharma 
Authored: Thu Dec 21 19:20:29 2017 -0800
Committer: Apekshit Sharma 
Committed: Thu Dec 21 19:26:19 2017 -0800

--
 bin/draining_servers.rb | 22 ++
 bin/replication/copy_tables_desc.rb |  4 ++--
 2 files changed, 4 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/313a65a1/bin/draining_servers.rb
--
diff --git a/bin/draining_servers.rb b/bin/draining_servers.rb
index 588bac4..27cc0fa 100644
--- a/bin/draining_servers.rb
+++ b/bin/draining_servers.rb
@@ -27,8 +27,7 @@ java_import org.apache.hadoop.hbase.HBaseConfiguration
 java_import org.apache.hadoop.hbase.client.ConnectionFactory
 java_import org.apache.hadoop.hbase.client.HBaseAdmin
 java_import org.apache.hadoop.hbase.zookeeper.ZKUtil
-java_import org.apache.commons.logging.Log
-java_import org.apache.commons.logging.LogFactory
+java_import org.slf4j.LoggerFactory
 
 # Name of this script
 NAME = 'draining_servers'.freeze
@@ -43,10 +42,6 @@ optparse = OptionParser.new do |opts|
 puts opts
 exit
   end
-  options[:debug] = false
-  opts.on('-d', '--debug', 'Display extra debug logging') do
-options[:debug] = true
-  end
 end
 optparse.parse!
 
@@ -133,21 +128,8 @@ end
 
 hostOrServers = ARGV[1..ARGV.size]
 
-# Create a logger and disable the DEBUG-level annoying client logging
-def configureLogging(options)
-  apacheLogger = LogFactory.getLog(NAME)
-  # Configure log4j to not spew so much
-  unless options[:debug]
-logger = org.apache.log4j.Logger.getLogger('org.apache.hadoop.hbase')
-logger.setLevel(org.apache.log4j.Level::WARN)
-logger = org.apache.log4j.Logger.getLogger('org.apache.zookeeper')
-logger.setLevel(org.apache.log4j.Level::WARN)
-  end
-  apacheLogger
-end
-
 # Create a logger and save it to ruby global
-$LOG = configureLogging(options)
+$LOG = LoggerFactory.getLogger(NAME)
 case ARGV[0]
 when 'add'
   if ARGV.length < 2

http://git-wip-us.apache.org/repos/asf/hbase/blob/313a65a1/bin/replication/copy_tables_desc.rb
--
diff --git a/bin/replication/copy_tables_desc.rb 
b/bin/replication/copy_tables_desc.rb
index c494765..44a24f9 100644
--- a/bin/replication/copy_tables_desc.rb
+++ b/bin/replication/copy_tables_desc.rb
@@ -24,7 +24,6 @@
 #
 
 include Java
-java_import org.apache.commons.logging.LogFactory
 java_import org.apache.hadoop.conf.Configuration
 java_import org.apache.hadoop.hbase.HBaseConfiguration
 java_import org.apache.hadoop.hbase.HConstants
@@ -32,6 +31,7 @@ java_import org.apache.hadoop.hbase.HTableDescriptor
 java_import org.apache.hadoop.hbase.TableName
 java_import org.apache.hadoop.hbase.client.ConnectionFactory
 java_import org.apache.hadoop.hbase.client.HBaseAdmin
+java_import org.slf4j.LoggerFactory
 
 # Name of this script
 NAME = 'copy_tables_desc'.freeze
@@ -64,7 +64,7 @@ end
 
 usage if ARGV.size < 2 || ARGV.size > 3
 
-LOG = LogFactory.getLog(NAME)
+LOG = LoggerFactory.getLogger(NAME)
 
 parts1 = ARGV[0].split(':')
 



[hbase] Git Push Summary

2017-12-21 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/HBASE-19571 [deleted] 1d453e7ab


[hbase] Git Push Summary

2017-12-21 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/HBASE-19491 [deleted] 20b4aa971


hbase git commit: HBASE-19570 Add hadoop3 tests to Nightly master/branch-2 runs.

2017-12-21 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1.1 28cc1fbd6 -> 30a565bd7


HBASE-19570 Add hadoop3 tests to Nightly master/branch-2 runs.

Jenkins fails the whole build immediately if any stage fails. Hadoop2 tests run 
before Hadoop3 tests.
So Hadoop3 tests will run only if hadoop2 tests pass.


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

Branch: refs/heads/branch-1.1
Commit: 30a565bd7be9e10dfc8169f1ca06a99538cd13ff
Parents: 28cc1fb
Author: Apekshit Sharma 
Authored: Thu Dec 21 11:20:40 2017 -0800
Committer: Apekshit Sharma 
Committed: Thu Dec 21 17:46:45 2017 -0800

--
 dev-support/Jenkinsfile| 73 ++---
 dev-support/hbase-personality.sh   |  8 
 dev-support/hbase_nightly_yetus.sh |  5 +++
 3 files changed, 80 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/30a565bd/dev-support/Jenkinsfile
--
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index 3070a4d..40abbc7 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -35,7 +35,7 @@ pipeline {
 BASEDIR = "${env.WORKSPACE}/component"
 YETUS_RELEASE = '0.6.0'
 PROJECT = 'hbase'
-PROJET_PERSONALITY = 
'https://raw.githubusercontent.com/apache/hbase/master/dev-support/hbase-personality.sh'
+PROJECT_PERSONALITY = 
'https://raw.githubusercontent.com/apache/hbase/master/dev-support/hbase-personality.sh'
 // This section of the docs tells folks not to use the javadoc tag. older 
branches have our old version of the check for said tag.
 AUTHOR_IGNORE_LIST = 
'src/main/asciidoc/_chapters/developer.adoc,dev-support/test-patch.sh'
 WHITESPACE_IGNORE_LIST = '.*/generated/.*'
@@ -102,7 +102,7 @@ fi
 dir ("${env.TOOLS}") {
   sh """#!/usr/bin/env bash
 echo "Downloading Project personality."
-curl -L  -o personality.sh "${env.PROJET_PERSONALITY}"
+curl -L  -o personality.sh "${env.PROJECT_PERSONALITY}"
   """
 }
 stash name: 'yetus', includes: 
"yetus-*/*,yetus-*/**/*,tools/personality.sh"
@@ -203,15 +203,15 @@ curl -L  -o personality.sh "${env.PROJET_PERSONALITY}"
 }
   }
 }
-stage ('yetus jdk8 checks') {
+stage ('yetus jdk8 hadoop2 checks') {
   when {
 not {
   branch 'branch-1.1*'
 }
   }
   environment {
-TESTS = 'mvninstall,compile,javac,unit,findbugs,htmlout'
-OUTPUT_DIR_RELATIVE = "output-jdk8"
+TESTS = 'mvninstall,compile,javac,unit,htmlout'
+OUTPUT_DIR_RELATIVE = "output-jdk8-hadoop2"
 OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE}"
 // This isn't strictly needed on branches that only support jdk8, but 
doesn't hurt
 // and is needed on branches that do both jdk7 and jdk8
@@ -253,7 +253,68 @@ curl -L  -o personality.sh "${env.PROJET_PERSONALITY}"
 // Has to be relative to WORKSPACE.
 reportDir: "${env.OUTPUT_DIR_RELATIVE}",
 reportFiles  : 'console-report.html',
-reportName   : 'JDK8 Nightly Build Report'
+reportName   : 'JDK8 Nightly Build Report (Hadoop2)'
+  ]
+}
+  }
+}
+stage ('yetus jdk8 hadoop3 checks') {
+  when {
+not {
+  branch 'branch-1*'
+}
+  }
+  environment {
+// Failure in any stage fails the build and consecutive stages are not 
built.
+// Findbugs is part of this last yetus stage to prevent findbugs 
precluding hadoop3
+// tests.
+TESTS = 'mvninstall,compile,javac,unit,findbugs,htmlout'
+OUTPUT_DIR_RELATIVE = "output-jdk8-hadoop3"
+OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE}"
+// This isn't strictly needed on branches that only support jdk8, but 
doesn't hurt
+// and is needed on branches that do both jdk7 and jdk8
+SET_JAVA_HOME = '/usr/lib/jvm/java-8-openjdk-amd64'
+// Activates hadoop 3.0 profile in maven runs.
+HADOOP_PROFILE = '3.0'
+  }
+  steps {
+unstash 'yetus'
+sh '''#!/usr/bin/env bash
+  rm -rf "${OUTPUT_DIR}" && mkdir "${OUTPUT_DIR}"
+  rm -rf "${OUTPUT_DIR}/machine" && mkdir "${OUTPUT_DIR}/machine"
+  "${BASEDIR}/dev-support/gather_machine_environment.sh" 
"${OUTPUT_DIR_RELATIVE}/machine"
+'''
+sh "${env.BASEDIR}/dev-support/hbase_nightly_yetus.sh"
+  }
+  post {
+always {
+  // Not sure how two junit test reports will work. Disabling 

hbase git commit: HBASE-19570 Add hadoop3 tests to Nightly master/branch-2 runs.

2017-12-21 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 5f7d8e0e1 -> 65da4ed28


HBASE-19570 Add hadoop3 tests to Nightly master/branch-2 runs.

Jenkins fails the whole build immediately if any stage fails. Hadoop2 tests run 
before Hadoop3 tests.
So Hadoop3 tests will run only if hadoop2 tests pass.


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

Branch: refs/heads/branch-1.2
Commit: 65da4ed28e92864f2332f0a7092c75490e239b03
Parents: 5f7d8e0
Author: Apekshit Sharma 
Authored: Thu Dec 21 11:20:40 2017 -0800
Committer: Apekshit Sharma 
Committed: Thu Dec 21 17:46:30 2017 -0800

--
 dev-support/Jenkinsfile| 73 ++---
 dev-support/hbase-personality.sh   |  8 
 dev-support/hbase_nightly_yetus.sh |  5 +++
 3 files changed, 80 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/65da4ed2/dev-support/Jenkinsfile
--
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index f06923b..b01a96b 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -35,7 +35,7 @@ pipeline {
 BASEDIR = "${env.WORKSPACE}/component"
 YETUS_RELEASE = '0.6.0'
 PROJECT = 'hbase'
-PROJET_PERSONALITY = 
'https://raw.githubusercontent.com/apache/hbase/master/dev-support/hbase-personality.sh'
+PROJECT_PERSONALITY = 
'https://raw.githubusercontent.com/apache/hbase/master/dev-support/hbase-personality.sh'
 // This section of the docs tells folks not to use the javadoc tag. older 
branches have our old version of the check for said tag.
 AUTHOR_IGNORE_LIST = 
'src/main/asciidoc/_chapters/developer.adoc,dev-support/test-patch.sh'
 WHITESPACE_IGNORE_LIST = '.*/generated/.*'
@@ -102,7 +102,7 @@ fi
 dir ("${env.TOOLS}") {
   sh """#!/usr/bin/env bash
 echo "Downloading Project personality."
-curl -L  -o personality.sh "${env.PROJET_PERSONALITY}"
+curl -L  -o personality.sh "${env.PROJECT_PERSONALITY}"
   """
 }
 stash name: 'yetus', includes: 
"yetus-*/*,yetus-*/**/*,tools/personality.sh"
@@ -203,15 +203,15 @@ curl -L  -o personality.sh "${env.PROJET_PERSONALITY}"
 }
   }
 }
-stage ('yetus jdk8 checks') {
+stage ('yetus jdk8 hadoop2 checks') {
   when {
 not {
   branch 'branch-1.1*'
 }
   }
   environment {
-TESTS = 'mvninstall,compile,javac,unit,findbugs,htmlout'
-OUTPUT_DIR_RELATIVE = "output-jdk8"
+TESTS = 'mvninstall,compile,javac,unit,htmlout'
+OUTPUT_DIR_RELATIVE = "output-jdk8-hadoop2"
 OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE}"
 // This isn't strictly needed on branches that only support jdk8, but 
doesn't hurt
 // and is needed on branches that do both jdk7 and jdk8
@@ -253,7 +253,68 @@ curl -L  -o personality.sh "${env.PROJET_PERSONALITY}"
 // Has to be relative to WORKSPACE.
 reportDir: "${env.OUTPUT_DIR_RELATIVE}",
 reportFiles  : 'console-report.html',
-reportName   : 'JDK8 Nightly Build Report'
+reportName   : 'JDK8 Nightly Build Report (Hadoop2)'
+  ]
+}
+  }
+}
+stage ('yetus jdk8 hadoop3 checks') {
+  when {
+not {
+  branch 'branch-1*'
+}
+  }
+  environment {
+// Failure in any stage fails the build and consecutive stages are not 
built.
+// Findbugs is part of this last yetus stage to prevent findbugs 
precluding hadoop3
+// tests.
+TESTS = 'mvninstall,compile,javac,unit,findbugs,htmlout'
+OUTPUT_DIR_RELATIVE = "output-jdk8-hadoop3"
+OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE}"
+// This isn't strictly needed on branches that only support jdk8, but 
doesn't hurt
+// and is needed on branches that do both jdk7 and jdk8
+SET_JAVA_HOME = '/usr/lib/jvm/java-8-openjdk-amd64'
+// Activates hadoop 3.0 profile in maven runs.
+HADOOP_PROFILE = '3.0'
+  }
+  steps {
+unstash 'yetus'
+sh '''#!/usr/bin/env bash
+  rm -rf "${OUTPUT_DIR}" && mkdir "${OUTPUT_DIR}"
+  rm -rf "${OUTPUT_DIR}/machine" && mkdir "${OUTPUT_DIR}/machine"
+  "${BASEDIR}/dev-support/gather_machine_environment.sh" 
"${OUTPUT_DIR_RELATIVE}/machine"
+'''
+sh "${env.BASEDIR}/dev-support/hbase_nightly_yetus.sh"
+  }
+  post {
+always {
+  // Not sure how two junit test reports will work. Disabling 

hbase git commit: HBASE-19570 Add hadoop3 tests to Nightly master/branch-2 runs.

2017-12-21 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-1.3 ef4b4edfb -> 1779417bc


HBASE-19570 Add hadoop3 tests to Nightly master/branch-2 runs.

Jenkins fails the whole build immediately if any stage fails. Hadoop2 tests run 
before Hadoop3 tests.
So Hadoop3 tests will run only if hadoop2 tests pass.


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

Branch: refs/heads/branch-1.3
Commit: 1779417bc20205b0e70757384fd2280b6cb05f66
Parents: ef4b4ed
Author: Apekshit Sharma 
Authored: Thu Dec 21 11:20:40 2017 -0800
Committer: Apekshit Sharma 
Committed: Thu Dec 21 17:46:09 2017 -0800

--
 dev-support/Jenkinsfile| 73 ++---
 dev-support/hbase-personality.sh   |  8 
 dev-support/hbase_nightly_yetus.sh |  5 +++
 3 files changed, 80 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/1779417b/dev-support/Jenkinsfile
--
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index f06923b..b01a96b 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -35,7 +35,7 @@ pipeline {
 BASEDIR = "${env.WORKSPACE}/component"
 YETUS_RELEASE = '0.6.0'
 PROJECT = 'hbase'
-PROJET_PERSONALITY = 
'https://raw.githubusercontent.com/apache/hbase/master/dev-support/hbase-personality.sh'
+PROJECT_PERSONALITY = 
'https://raw.githubusercontent.com/apache/hbase/master/dev-support/hbase-personality.sh'
 // This section of the docs tells folks not to use the javadoc tag. older 
branches have our old version of the check for said tag.
 AUTHOR_IGNORE_LIST = 
'src/main/asciidoc/_chapters/developer.adoc,dev-support/test-patch.sh'
 WHITESPACE_IGNORE_LIST = '.*/generated/.*'
@@ -102,7 +102,7 @@ fi
 dir ("${env.TOOLS}") {
   sh """#!/usr/bin/env bash
 echo "Downloading Project personality."
-curl -L  -o personality.sh "${env.PROJET_PERSONALITY}"
+curl -L  -o personality.sh "${env.PROJECT_PERSONALITY}"
   """
 }
 stash name: 'yetus', includes: 
"yetus-*/*,yetus-*/**/*,tools/personality.sh"
@@ -203,15 +203,15 @@ curl -L  -o personality.sh "${env.PROJET_PERSONALITY}"
 }
   }
 }
-stage ('yetus jdk8 checks') {
+stage ('yetus jdk8 hadoop2 checks') {
   when {
 not {
   branch 'branch-1.1*'
 }
   }
   environment {
-TESTS = 'mvninstall,compile,javac,unit,findbugs,htmlout'
-OUTPUT_DIR_RELATIVE = "output-jdk8"
+TESTS = 'mvninstall,compile,javac,unit,htmlout'
+OUTPUT_DIR_RELATIVE = "output-jdk8-hadoop2"
 OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE}"
 // This isn't strictly needed on branches that only support jdk8, but 
doesn't hurt
 // and is needed on branches that do both jdk7 and jdk8
@@ -253,7 +253,68 @@ curl -L  -o personality.sh "${env.PROJET_PERSONALITY}"
 // Has to be relative to WORKSPACE.
 reportDir: "${env.OUTPUT_DIR_RELATIVE}",
 reportFiles  : 'console-report.html',
-reportName   : 'JDK8 Nightly Build Report'
+reportName   : 'JDK8 Nightly Build Report (Hadoop2)'
+  ]
+}
+  }
+}
+stage ('yetus jdk8 hadoop3 checks') {
+  when {
+not {
+  branch 'branch-1*'
+}
+  }
+  environment {
+// Failure in any stage fails the build and consecutive stages are not 
built.
+// Findbugs is part of this last yetus stage to prevent findbugs 
precluding hadoop3
+// tests.
+TESTS = 'mvninstall,compile,javac,unit,findbugs,htmlout'
+OUTPUT_DIR_RELATIVE = "output-jdk8-hadoop3"
+OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE}"
+// This isn't strictly needed on branches that only support jdk8, but 
doesn't hurt
+// and is needed on branches that do both jdk7 and jdk8
+SET_JAVA_HOME = '/usr/lib/jvm/java-8-openjdk-amd64'
+// Activates hadoop 3.0 profile in maven runs.
+HADOOP_PROFILE = '3.0'
+  }
+  steps {
+unstash 'yetus'
+sh '''#!/usr/bin/env bash
+  rm -rf "${OUTPUT_DIR}" && mkdir "${OUTPUT_DIR}"
+  rm -rf "${OUTPUT_DIR}/machine" && mkdir "${OUTPUT_DIR}/machine"
+  "${BASEDIR}/dev-support/gather_machine_environment.sh" 
"${OUTPUT_DIR_RELATIVE}/machine"
+'''
+sh "${env.BASEDIR}/dev-support/hbase_nightly_yetus.sh"
+  }
+  post {
+always {
+  // Not sure how two junit test reports will work. Disabling 

  1   2   3   4   5   6   7   >