[hbase] branch branch-2.2 updated: HBASE-24305 Prepare deprecations in ServerName (#1666) (#3129)

2021-04-08 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
 new fe24bdb  HBASE-24305 Prepare deprecations in ServerName (#1666) (#3129)
fe24bdb is described below

commit fe24bdbb10d82db4f56208298fe27d65eb28a26b
Author: Jan Hentschel 
AuthorDate: Thu Apr 8 18:21:33 2021 +0200

HBASE-24305 Prepare deprecations in ServerName (#1666) (#3129)

Signed-off-by: Duo Zhang 
Signed-off-by: stack 
---
 .../org/apache/hadoop/hbase/client/HBaseAdmin.java |   2 +-
 .../hadoop/hbase/client/TestClientNoCluster.java   |   2 +-
 .../java/org/apache/hadoop/hbase/ServerName.java   | 129 +++--
 .../org/apache/hadoop/hbase/TestServerName.java|  19 ++-
 .../hbase/favored/FavoredNodeAssignmentHelper.java |   8 +-
 .../hadoop/hbase/favored/FavoredNodesManager.java  |   8 +-
 .../hbase/favored/StartcodeAgnosticServerName.java |   2 +-
 .../hbase/master/AssignmentVerificationReport.java |   2 +-
 .../hbase/master/RegionPlacementMaintainer.java|   2 +-
 .../hbase/master/balancer/BaseLoadBalancer.java|  27 ++---
 .../master/balancer/FavoredStochasticBalancer.java |   8 +-
 .../org/apache/hadoop/hbase/util/HBaseFsck.java|   2 +-
 .../org/apache/hadoop/hbase/MetaMockingUtil.java   |   2 +-
 .../apache/hadoop/hbase/TestMetaTableAccessor.java |   2 +-
 .../hbase/TestMetaTableAccessorNoCluster.java  |   2 +-
 .../hbase/client/TestConnectionImplementation.java |   4 +-
 .../hbase/client/TestShortCircuitConnection.java   |   2 +-
 .../favored/TestFavoredNodeAssignmentHelper.java   |   2 +-
 .../hadoop/hbase/master/TestRegionPlacement.java   |   2 +-
 .../master/balancer/TestBaseLoadBalancer.java  |  14 +--
 .../TestFavoredStochasticBalancerPickers.java  |   3 +-
 .../procedure/MasterProcedureTestingUtility.java   |   2 +-
 .../hbase/regionserver/TestRegionServerAbort.java  |   2 +-
 23 files changed, 129 insertions(+), 119 deletions(-)

diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
index c06cf96..69a6781 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
@@ -3811,7 +3811,7 @@ public class HBaseAdmin implements Admin {
 if (location == null) continue;
 ServerName serverName = location.getServerName();
 // Make sure that regions are assigned to server
-if (serverName != null && serverName.getHostAndPort() != null) {
+if (serverName != null && serverName.getAddress() != null) {
   actualRegCount.incrementAndGet();
 }
   }
diff --git 
a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java
 
b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java
index 19f98f1..9123cd8 100644
--- 
a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java
+++ 
b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java
@@ -610,7 +610,7 @@ public class TestClientNoCluster extends Configured 
implements Tool {
   static CellProtos.Cell getServer(final ByteString row, final ServerName sn) {
 CellProtos.Cell.Builder cellBuilder = getBaseCellBuilder(row);
 cellBuilder.setQualifier(SERVER_QUALIFIER_BYTESTRING);
-cellBuilder.setValue(ByteString.copyFromUtf8(sn.getHostAndPort()));
+cellBuilder.setValue(ByteString.copyFromUtf8(sn.getAddress().toString()));
 return cellBuilder.build();
   }
 
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java
index 34ac1e5..d15d86b 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * 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
@@ -23,16 +22,13 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Locale;
 import java.util.regex.Pattern;
-
 import org.apache.hadoop.hbase.net.Address;
 import org.apache.hadoop.hbase.util.Addressing;
 import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.hbase.thirdparty.com.google.common.collect.Interner;
 import org.apache.hbase.thirdparty.com.google.common.collect.Interners;
 import org.apache.hbase.thirdparty.com.google.common.net.InetAddresses;
-import org.apache.yetus.audience.InterfaceAudience;
-
-
 
 /**
  * Name of a particular incarnation of

[hbase] branch branch-2.3 updated: HBASE-24305 Prepare deprecations in ServerName (#1666) (#3128)

2021-04-08 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.3 by this push:
 new a30d873  HBASE-24305 Prepare deprecations in ServerName (#1666) (#3128)
a30d873 is described below

commit a30d87369207785f078589e2a59a9250813b9aa3
Author: Jan Hentschel 
AuthorDate: Thu Apr 8 15:06:02 2021 +0200

HBASE-24305 Prepare deprecations in ServerName (#1666) (#3128)

Signed-off-by: Duo Zhang 
Signed-off-by: stack 
---
 .../org/apache/hadoop/hbase/client/HBaseAdmin.java |   2 +-
 .../hadoop/hbase/client/TestClientNoCluster.java   |   2 +-
 .../java/org/apache/hadoop/hbase/ServerName.java   | 129 +++--
 .../org/apache/hadoop/hbase/TestServerName.java|  19 ++-
 .../hbase/favored/FavoredNodeAssignmentHelper.java |   8 +-
 .../hadoop/hbase/favored/FavoredNodesManager.java  |   8 +-
 .../hbase/favored/StartcodeAgnosticServerName.java |   2 +-
 .../hbase/master/AssignmentVerificationReport.java |   2 +-
 .../hbase/master/RegionPlacementMaintainer.java|   2 +-
 .../hbase/master/balancer/BaseLoadBalancer.java|  27 ++---
 .../master/balancer/FavoredStochasticBalancer.java |   8 +-
 .../org/apache/hadoop/hbase/util/HBaseFsck.java|   2 +-
 .../org/apache/hadoop/hbase/MetaMockingUtil.java   |   2 +-
 .../apache/hadoop/hbase/TestMetaTableAccessor.java |   2 +-
 .../hbase/TestMetaTableAccessorNoCluster.java  |   2 +-
 .../hbase/client/TestConnectionImplementation.java |   4 +-
 .../hbase/client/TestShortCircuitConnection.java   |   2 +-
 .../favored/TestFavoredNodeAssignmentHelper.java   |   2 +-
 .../hadoop/hbase/master/TestRegionPlacement.java   |   2 +-
 .../master/balancer/TestBaseLoadBalancer.java  |  14 +--
 .../TestFavoredStochasticBalancerPickers.java  |   3 +-
 .../procedure/MasterProcedureTestingUtility.java   |   2 +-
 .../hbase/regionserver/TestRegionServerAbort.java  |   2 +-
 23 files changed, 129 insertions(+), 119 deletions(-)

diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
index ef6589a..8a74ca9 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
@@ -3692,7 +3692,7 @@ public class HBaseAdmin implements Admin {
 if (location == null) continue;
 ServerName serverName = location.getServerName();
 // Make sure that regions are assigned to server
-if (serverName != null && serverName.getHostAndPort() != null) {
+if (serverName != null && serverName.getAddress() != null) {
   actualRegCount.incrementAndGet();
 }
   }
diff --git 
a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java
 
b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java
index 8a24c2e..9ff28a5 100644
--- 
a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java
+++ 
b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java
@@ -611,7 +611,7 @@ public class TestClientNoCluster extends Configured 
implements Tool {
   static CellProtos.Cell getServer(final ByteString row, final ServerName sn) {
 CellProtos.Cell.Builder cellBuilder = getBaseCellBuilder(row);
 cellBuilder.setQualifier(SERVER_QUALIFIER_BYTESTRING);
-cellBuilder.setValue(ByteString.copyFromUtf8(sn.getHostAndPort()));
+cellBuilder.setValue(ByteString.copyFromUtf8(sn.getAddress().toString()));
 return cellBuilder.build();
   }
 
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java
index 34ac1e5..d15d86b 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * 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
@@ -23,16 +22,13 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Locale;
 import java.util.regex.Pattern;
-
 import org.apache.hadoop.hbase.net.Address;
 import org.apache.hadoop.hbase.util.Addressing;
 import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.hbase.thirdparty.com.google.common.collect.Interner;
 import org.apache.hbase.thirdparty.com.google.common.collect.Interners;
 import org.apache.hbase.thirdparty.com.google.common.net.InetAddresses;
-import org.apache.yetus.audience.InterfaceAudience;
-
-
 
 /**
  * Name of a particular incarnation of

[hbase] branch branch-2.4 updated: HBASE-24305 Prepare deprecations in ServerName (#1666) (#3125)

2021-04-06 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.4
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.4 by this push:
 new 41b4e6e  HBASE-24305 Prepare deprecations in ServerName (#1666) (#3125)
41b4e6e is described below

commit 41b4e6e5c4814453286255af300812a472213547
Author: Jan Hentschel 
AuthorDate: Tue Apr 6 19:10:52 2021 +0200

HBASE-24305 Prepare deprecations in ServerName (#1666) (#3125)

Signed-off-by: Duo Zhang 
Signed-off-by: stack 
---
 .../org/apache/hadoop/hbase/client/HBaseAdmin.java |   2 +-
 .../hadoop/hbase/client/TestClientNoCluster.java   |   2 +-
 .../java/org/apache/hadoop/hbase/ServerName.java   | 129 +++--
 .../org/apache/hadoop/hbase/TestServerName.java|  19 ++-
 .../hbase/favored/FavoredNodeAssignmentHelper.java |   8 +-
 .../hadoop/hbase/favored/FavoredNodesManager.java  |   8 +-
 .../hbase/favored/StartcodeAgnosticServerName.java |   2 +-
 .../hbase/master/AssignmentVerificationReport.java |   2 +-
 .../hbase/master/RegionPlacementMaintainer.java|   2 +-
 .../hbase/master/balancer/BaseLoadBalancer.java|  27 ++---
 .../master/balancer/FavoredStochasticBalancer.java |   8 +-
 .../org/apache/hadoop/hbase/util/HBaseFsck.java|   2 +-
 .../org/apache/hadoop/hbase/MetaMockingUtil.java   |   2 +-
 .../apache/hadoop/hbase/TestMetaTableAccessor.java |   2 +-
 .../hbase/TestMetaTableAccessorNoCluster.java  |   2 +-
 .../hbase/client/TestConnectionImplementation.java |   4 +-
 .../hbase/client/TestShortCircuitConnection.java   |   2 +-
 .../favored/TestFavoredNodeAssignmentHelper.java   |   2 +-
 .../hadoop/hbase/master/TestRegionPlacement.java   |   2 +-
 .../master/balancer/TestBaseLoadBalancer.java  |  14 +--
 .../TestFavoredStochasticBalancerPickers.java  |   3 +-
 .../procedure/MasterProcedureTestingUtility.java   |   2 +-
 .../hbase/regionserver/TestRegionServerAbort.java  |   2 +-
 23 files changed, 129 insertions(+), 119 deletions(-)

diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
index 532481e..488a4da 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
@@ -3696,7 +3696,7 @@ public class HBaseAdmin implements Admin {
 if (location == null) continue;
 ServerName serverName = location.getServerName();
 // Make sure that regions are assigned to server
-if (serverName != null && serverName.getHostAndPort() != null) {
+if (serverName != null && serverName.getAddress() != null) {
   actualRegCount.incrementAndGet();
 }
   }
diff --git 
a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java
 
b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java
index 14ed766..490073b 100644
--- 
a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java
+++ 
b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java
@@ -612,7 +612,7 @@ public class TestClientNoCluster extends Configured 
implements Tool {
   static CellProtos.Cell getServer(final ByteString row, final ServerName sn) {
 CellProtos.Cell.Builder cellBuilder = getBaseCellBuilder(row);
 cellBuilder.setQualifier(SERVER_QUALIFIER_BYTESTRING);
-cellBuilder.setValue(ByteString.copyFromUtf8(sn.getHostAndPort()));
+cellBuilder.setValue(ByteString.copyFromUtf8(sn.getAddress().toString()));
 return cellBuilder.build();
   }
 
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java
index 34ac1e5..d15d86b 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * 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
@@ -23,16 +22,13 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Locale;
 import java.util.regex.Pattern;
-
 import org.apache.hadoop.hbase.net.Address;
 import org.apache.hadoop.hbase.util.Addressing;
 import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.hbase.thirdparty.com.google.common.collect.Interner;
 import org.apache.hbase.thirdparty.com.google.common.collect.Interners;
 import org.apache.hbase.thirdparty.com.google.common.net.InetAddresses;
-import org.apache.yetus.audience.InterfaceAudience;
-
-
 
 /**
  * Name of a particular incarnation of

[hbase] branch branch-2 updated: HBASE-24305 Prepare deprecations in ServerName (#1666) (#3121)

2021-04-05 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new 18882d6  HBASE-24305 Prepare deprecations in ServerName (#1666) (#3121)
18882d6 is described below

commit 18882d6f9a5830f21099a9a7cdfe57aa594a688b
Author: Jan Hentschel 
AuthorDate: Mon Apr 5 22:10:04 2021 +0200

HBASE-24305 Prepare deprecations in ServerName (#1666) (#3121)

Signed-off-by: Duo Zhang 
Signed-off-by: stack 
---
 .../org/apache/hadoop/hbase/client/HBaseAdmin.java |   2 +-
 .../hadoop/hbase/client/TestClientNoCluster.java   |   2 +-
 .../java/org/apache/hadoop/hbase/ServerName.java   | 129 +++--
 .../org/apache/hadoop/hbase/TestServerName.java|  19 ++-
 .../hbase/favored/FavoredNodeAssignmentHelper.java |   8 +-
 .../hadoop/hbase/favored/FavoredNodesManager.java  |   8 +-
 .../hbase/favored/StartcodeAgnosticServerName.java |   2 +-
 .../hbase/master/AssignmentVerificationReport.java |   2 +-
 .../hbase/master/RegionPlacementMaintainer.java|   2 +-
 .../hbase/master/balancer/BaseLoadBalancer.java|  27 ++---
 .../master/balancer/FavoredStochasticBalancer.java |   8 +-
 .../org/apache/hadoop/hbase/util/HBaseFsck.java|   2 +-
 .../org/apache/hadoop/hbase/MetaMockingUtil.java   |   2 +-
 .../apache/hadoop/hbase/TestMetaTableAccessor.java |   2 +-
 .../hbase/TestMetaTableAccessorNoCluster.java  |   2 +-
 .../hbase/client/TestConnectionImplementation.java |   4 +-
 .../hbase/client/TestShortCircuitConnection.java   |   2 +-
 .../favored/TestFavoredNodeAssignmentHelper.java   |   2 +-
 .../hadoop/hbase/master/TestRegionPlacement.java   |   2 +-
 .../master/balancer/TestBaseLoadBalancer.java  |  14 +--
 .../TestFavoredStochasticBalancerPickers.java  |   3 +-
 .../procedure/MasterProcedureTestingUtility.java   |   2 +-
 .../hbase/regionserver/TestRegionServerAbort.java  |   2 +-
 23 files changed, 129 insertions(+), 119 deletions(-)

diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
index 532481e..488a4da 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
@@ -3696,7 +3696,7 @@ public class HBaseAdmin implements Admin {
 if (location == null) continue;
 ServerName serverName = location.getServerName();
 // Make sure that regions are assigned to server
-if (serverName != null && serverName.getHostAndPort() != null) {
+if (serverName != null && serverName.getAddress() != null) {
   actualRegCount.incrementAndGet();
 }
   }
diff --git 
a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java
 
b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java
index 2a4bcf6..d79164c 100644
--- 
a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java
+++ 
b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java
@@ -657,7 +657,7 @@ public class TestClientNoCluster extends Configured 
implements Tool {
   static CellProtos.Cell getServer(final ByteString row, final ServerName sn) {
 CellProtos.Cell.Builder cellBuilder = getBaseCellBuilder(row);
 cellBuilder.setQualifier(SERVER_QUALIFIER_BYTESTRING);
-cellBuilder.setValue(ByteString.copyFromUtf8(sn.getHostAndPort()));
+cellBuilder.setValue(ByteString.copyFromUtf8(sn.getAddress().toString()));
 return cellBuilder.build();
   }
 
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java
index 34ac1e5..d15d86b 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * 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
@@ -23,16 +22,13 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Locale;
 import java.util.regex.Pattern;
-
 import org.apache.hadoop.hbase.net.Address;
 import org.apache.hadoop.hbase.util.Addressing;
 import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.hbase.thirdparty.com.google.common.collect.Interner;
 import org.apache.hbase.thirdparty.com.google.common.collect.Interners;
 import org.apache.hbase.thirdparty.com.google.common.net.InetAddresses;
-import org.apache.yetus.audience.InterfaceAudience;
-
-
 
 /**
  * Name of a particular incarnation of

[hbase] branch master updated: HBASE-25273 fix typo in StripeStoreFileManager java doc (#2653)

2020-11-14 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new f68f3dd  HBASE-25273 fix typo in StripeStoreFileManager java doc 
(#2653)
f68f3dd is described below

commit f68f3dd7992a9583f5111407317dd3d0f7fc5daa
Author: Hossein Zolfi 
AuthorDate: Sat Nov 14 21:17:57 2020 +0330

HBASE-25273 fix typo in StripeStoreFileManager java doc (#2653)

Co-authored-by: Hossein Zolfi 
Signed-off-by: Jan Hentschel 
---
 .../apache/hadoop/hbase/regionserver/StripeStoreFileManager.java   | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFileManager.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFileManager.java
index 84c623c..beed41f 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFileManager.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFileManager.java
@@ -48,7 +48,7 @@ import 
org.apache.hbase.thirdparty.com.google.common.collect.ImmutableCollection
 import org.apache.hbase.thirdparty.com.google.common.collect.ImmutableList;
 
 /**
- * Stripe implementation of StoreFileManager.
+ * Stripe implementation of {@link StoreFileManager}.
  * Not thread safe - relies on external locking (in HStore). Collections that 
this class
  * returns are immutable or unique to the call, so they should be safe.
  * Stripe store splits the key space of the region into non-overlapping 
stripes, as well as
@@ -56,9 +56,10 @@ import 
org.apache.hbase.thirdparty.com.google.common.collect.ImmutableList;
  * When L0 is compacted, it's split into the files corresponding to existing 
stripe boundaries,
  * that can thus be added to stripes.
  * When scan or get happens, it only has to read the files from the 
corresponding stripes.
- * See StripeCompationPolicy on how the stripes are determined; this class 
doesn't care.
+ * See {@link StripeCompactionPolicy} on how the stripes are determined; this 
class doesn't care.
  *
- * This class should work together with StripeCompactionPolicy and 
StripeCompactor.
+ * This class should work together with {@link StripeCompactionPolicy} and
+ * {@link org.apache.hadoop.hbase.regionserver.compactions.StripeCompactor}.
  * With regard to how they work, we make at least the following (reasonable) 
assumptions:
  *  - Compaction produces one file per new stripe (if any); that is easy to 
change.
  *  - Compaction has one contiguous set of stripes both in and out, except if 
L0 is involved.



[hbase] branch master updated (1b58af1 -> 2cd5f91)

2020-10-21 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from 1b58af1  HBASE-25198 Remove deprecated RpcSchedulerFactory#create 
(#2561)
 add 2cd5f91  HBASE-25197 Remove SingletonCoprocessorService interface 
(#2560)

No new revisions were added by this update.

Summary of changes:
 .../coprocessor/SingletonCoprocessorService.java   | 37 --
 1 file changed, 37 deletions(-)
 delete mode 100644 
hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/SingletonCoprocessorService.java



[hbase] branch master updated: HBASE-25196 Add deprecation documentation to HConstants (#2559)

2020-10-21 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new 6c8f5f3  HBASE-25196 Add deprecation documentation to HConstants 
(#2559)
6c8f5f3 is described below

commit 6c8f5f30d5e5402f99834fd8a3b75736fef27cd4
Author: Jan Hentschel 
AuthorDate: Wed Oct 21 09:18:35 2020 +0200

HBASE-25196 Add deprecation documentation to HConstants (#2559)

Add the documentation when
HConstants#REPLICATION_DROP_ON_DELETED_TABLE_KEY was deprecated and when
it is expected to be removed.

Signed-off-by: Duo Zhang 
---
 hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
index 41bf487..e1d3de9 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
@@ -1358,7 +1358,9 @@ public final class HConstants {
 
   /**
* Drop edits for tables that been deleted from the replication source and 
target
-   * @deprecated moved it into HBaseInterClusterReplicationEndpoint
+   * @deprecated since 3.0.0. Will be removed in 4.0.0.
+   * Moved it into HBaseInterClusterReplicationEndpoint.
+   * @see https://issues.apache.org/jira/browse/HBASE-24359;>HBASE-24359
*/
   @Deprecated
   public static final String REPLICATION_DROP_ON_DELETED_TABLE_KEY =



[hbase] branch master updated: HBASE-25175 Remove the constructors of HBaseConfiguration (#2530)

2020-10-11 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new 3d1aaa6  HBASE-25175 Remove the constructors of HBaseConfiguration 
(#2530)
3d1aaa6 is described below

commit 3d1aaa66324c46b432e546b4dfa5bdf5191224ed
Author: niuyulin 
AuthorDate: Sun Oct 11 10:11:32 2020 -0500

HBASE-25175 Remove the constructors of HBaseConfiguration (#2530)

Co-authored-by: niuyulin 

Signed-off-by: Jan Hentschel 
---
 .../apache/hadoop/hbase/HBaseConfiguration.java| 30 --
 1 file changed, 30 deletions(-)

diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java
index 67de5fb..70467f0 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java
@@ -36,36 +36,6 @@ import org.slf4j.LoggerFactory;
 public class HBaseConfiguration extends Configuration {
   private static final Logger LOG = 
LoggerFactory.getLogger(HBaseConfiguration.class);
 
-  /**
-   * Instantiating HBaseConfiguration() is deprecated. Please use
-   * HBaseConfiguration#create() to construct a plain Configuration
-   * @deprecated since 0.90.0. Please use {@link #create()} instead.
-   * @see #create()
-   * @see https://issues.apache.org/jira/browse/HBASE-2036;>HBASE-2036
-   */
-  @Deprecated
-  public HBaseConfiguration() {
-//TODO:replace with private constructor, HBaseConfiguration should not 
extend Configuration
-super();
-addHbaseResources(this);
-LOG.warn("instantiating HBaseConfiguration() is deprecated. Please use"
-+ " HBaseConfiguration#create() to construct a plain Configuration");
-  }
-
-  /**
-   * Instantiating HBaseConfiguration() is deprecated. Please use
-   * HBaseConfiguration#create(conf) to construct a plain Configuration
-   * @deprecated since 0.90.0. Please use {@link #create(Configuration)} 
instead.
-   * @see #create(Configuration)
-   * @see https://issues.apache.org/jira/browse/HBASE-2036;>HBASE-2036
-   */
-  @Deprecated
-  public HBaseConfiguration(final Configuration c) {
-//TODO:replace with private constructor
-this();
-merge(this, c);
-  }
-
   private static void checkDefaultsVersion(Configuration conf) {
 if (conf.getBoolean("hbase.defaults.for.version.skip", Boolean.FALSE)) 
return;
 String defaultsVersion = conf.get("hbase.defaults.for.version");



[hbase] branch master updated (36e8b0b -> 8a6299b)

2020-09-21 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from 36e8b0b  HBASE-25075 Fix typo in ReplicationProtobufUtil (#2431)
 add 8a6299b  HBASE-25076 fix typo in MasterRegion java doc (#2432)

No new revisions were added by this update.

Summary of changes:
 .../main/java/org/apache/hadoop/hbase/master/region/MasterRegion.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



[hbase] branch master updated: HBASE-25075 Fix typo in ReplicationProtobufUtil (#2431)

2020-09-21 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new 36e8b0b  HBASE-25075 Fix typo in ReplicationProtobufUtil (#2431)
36e8b0b is described below

commit 36e8b0beec29a9ed01b92ea89c77b89bbeea94a7
Author: niuyulin 
AuthorDate: Tue Sep 22 00:44:47 2020 +0800

HBASE-25075 Fix typo in ReplicationProtobufUtil (#2431)

Co-authored-by: niuyulin 

Signed-off-by: Jan Hentschel 
Signed-off-by: Guanghao Zhang 
Signed-off-by: Duo Zhang 
---
 .../hadoop/hbase/client/AsyncRegionReplicaReplayRetryingCaller.java | 4 ++--
 .../{ReplicationProtbufUtil.java => ReplicationProtobufUtil.java}   | 2 +-
 .../regionserver/HBaseInterClusterReplicationEndpoint.java  | 4 ++--
 .../replication/regionserver/ReplaySyncReplicationWALCallable.java  | 4 ++--
 .../org/apache/hadoop/hbase/protobuf/TestReplicationProtobuf.java   | 2 +-
 .../apache/hadoop/hbase/replication/SyncReplicationTestBase.java| 6 +++---
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/AsyncRegionReplicaReplayRetryingCaller.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/AsyncRegionReplicaReplayRetryingCaller.java
index 91d9502..0146c8b 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/AsyncRegionReplicaReplayRetryingCaller.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/AsyncRegionReplicaReplayRetryingCaller.java
@@ -24,7 +24,7 @@ import java.util.List;
 import org.apache.hadoop.hbase.CellScanner;
 import org.apache.hadoop.hbase.HRegionLocation;
 import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.protobuf.ReplicationProtbufUtil;
+import org.apache.hadoop.hbase.protobuf.ReplicationProtobufUtil;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.hadoop.hbase.wal.WAL.Entry;
@@ -104,7 +104,7 @@ public class AsyncRegionReplicaReplayRetryingCaller extends 
AsyncRpcRetryingCall
 err -> conn.getLocator().updateCachedLocationOnError(loc, err));
   return;
 }
-Pair p = ReplicationProtbufUtil
+Pair p = ReplicationProtobufUtil
   .buildReplicateWALEntryRequest(entries, encodedRegionName, null, null, 
null);
 resetCallTimeout();
 controller.setCellScanner(p.getSecond());
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtobufUtil.java
similarity index 99%
rename from 
hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java
rename to 
hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtobufUtil.java
index 4e2e577..e47c929 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtobufUtil.java
@@ -42,7 +42,7 @@ import 
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.WALEntry;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos;
 
 @InterfaceAudience.Private
-public class ReplicationProtbufUtil {
+public class ReplicationProtobufUtil {
 
   /**
* A helper to replicate a list of WAL entries using region server admin
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java
index 816345f..4e0669c 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java
@@ -56,7 +56,7 @@ import 
org.apache.hadoop.hbase.client.ClusterConnectionFactory;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.ConnectionFactory;
 import org.apache.hadoop.hbase.ipc.RpcServer;
-import org.apache.hadoop.hbase.protobuf.ReplicationProtbufUtil;
+import org.apache.hadoop.hbase.protobuf.ReplicationProtobufUtil;
 import org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException;
 import org.apache.hadoop.hbase.regionserver.wal.WALUtil;
 import org.apache.hadoop.hbase.replication.HBaseReplicationEndpoint;
@@ -632,7 +632,7 @@ public class HBaseInterClusterReplicationEndpoint extends 
HBaseReplicationEndpoi
   sinkPeer = replicationSinkMgr.getReplicationSink();
   AsyncRegionServerAdmin rsAdmin = sinkPeer.getRegionServer();
   try {
-ReplicationProtbufUtil.replicateWALEntry(rsAdmin,
+ReplicationProtobufUtil.replicateWALEntry(r

[hbase] branch branch-2 updated: HBASE-25072 Remove the unnecessary System.out.println in MasterRegistry (#2429)

2020-09-20 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new 5e910fa  HBASE-25072 Remove the unnecessary System.out.println in 
MasterRegistry (#2429)
5e910fa is described below

commit 5e910fa0d6b29d5894881fef9d050cdfb92cfdfd
Author: niuyulin 
AuthorDate: Mon Sep 21 02:08:43 2020 +0800

HBASE-25072 Remove the unnecessary System.out.println in MasterRegistry 
(#2429)

Co-authored-by: niuyulin 
Signed-off-by: Jan Hentschel 
Signed-off-by: Duo Zhang 
Signed-off-by: Viraj Jasani 
---
 .../src/main/java/org/apache/hadoop/hbase/client/MasterRegistry.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MasterRegistry.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MasterRegistry.java
index 2a7ae16..0658268 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MasterRegistry.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MasterRegistry.java
@@ -325,7 +325,6 @@ public class MasterRegistry implements ConnectionRegistry {
   }
 
   CompletableFuture> getMasters() {
-System.out.println("getMasters()");
 return this
 . call((c, s, d) -> s.getMasters(
 c, GetMastersRequest.getDefaultInstance(), d), r -> 
r.getMasterServersCount() != 0,
@@ -346,4 +345,4 @@ public class MasterRegistry implements ConnectionRegistry {
   rpcClient.close();
 }
   }
-}
\ No newline at end of file
+}



[hbase] branch master updated: HBASE-25072 Remove the unnecessary System.out.println in MasterRegistry (#2429)

2020-09-20 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new b5adfe1  HBASE-25072 Remove the unnecessary System.out.println in 
MasterRegistry (#2429)
b5adfe1 is described below

commit b5adfe10314057e4a25a76b6c5bd0f1c4832682d
Author: niuyulin 
AuthorDate: Mon Sep 21 02:08:43 2020 +0800

HBASE-25072 Remove the unnecessary System.out.println in MasterRegistry 
(#2429)

Co-authored-by: niuyulin 
Signed-off-by: Jan Hentschel 
Signed-off-by: Duo Zhang 
Signed-off-by: Viraj Jasani 
---
 .../src/main/java/org/apache/hadoop/hbase/client/MasterRegistry.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MasterRegistry.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MasterRegistry.java
index 2a7ae16..0658268 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MasterRegistry.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MasterRegistry.java
@@ -325,7 +325,6 @@ public class MasterRegistry implements ConnectionRegistry {
   }
 
   CompletableFuture> getMasters() {
-System.out.println("getMasters()");
 return this
 . call((c, s, d) -> s.getMasters(
 c, GetMastersRequest.getDefaultInstance(), d), r -> 
r.getMasterServersCount() != 0,
@@ -346,4 +345,4 @@ public class MasterRegistry implements ConnectionRegistry {
   rpcClient.close();
 }
   }
-}
\ No newline at end of file
+}



[hbase] branch master updated: HBASE-24305 Removed deprecations in ServerName (#1666)

2020-05-08 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new 03e5a14  HBASE-24305 Removed deprecations in ServerName (#1666)
03e5a14 is described below

commit 03e5a1402d4c119655beedeb96ccf80856e38666
Author: Jan Hentschel 
AuthorDate: Fri May 8 09:41:55 2020 +0200

HBASE-24305 Removed deprecations in ServerName (#1666)

Signed-off-by: Duo Zhang 
Signed-off-by: stack 
---
 .../hadoop/hbase/backup/util/BackupUtils.java  |   4 +-
 .../hbase/favored/FavoredNodeAssignmentHelper.java |   8 +-
 .../hbase/favored/StartcodeAgnosticServerName.java |   2 +-
 .../hbase/master/AssignmentVerificationReport.java |   2 +-
 .../java/org/apache/hadoop/hbase/ServerName.java   | 213 +++--
 .../org/apache/hadoop/hbase/TestServerName.java|  29 +--
 .../apache/hadoop/hbase/rest/RegionsResource.java  |   2 +-
 .../hadoop/hbase/favored/FavoredNodesManager.java  |   8 +-
 .../hbase/master/balancer/BaseLoadBalancer.java|  27 +--
 .../master/balancer/FavoredStochasticBalancer.java |   8 +-
 .../org/apache/hadoop/hbase/util/HBaseFsck.java|   2 +-
 .../org/apache/hadoop/hbase/MetaMockingUtil.java   |   2 +-
 .../apache/hadoop/hbase/TestMetaTableAccessor.java |   2 +-
 .../favored/TestFavoredNodeAssignmentHelper.java   |   2 +-
 .../hadoop/hbase/master/TestRegionPlacement.java   |   2 +-
 .../master/balancer/TestBaseLoadBalancer.java  |  14 +-
 .../TestFavoredStochasticBalancerPickers.java  |   3 +-
 .../procedure/MasterProcedureTestingUtility.java   |   2 +-
 .../hbase/regionserver/TestRegionServerAbort.java  |   2 +-
 19 files changed, 117 insertions(+), 217 deletions(-)

diff --git 
a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java
 
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java
index ff1a109..f45c94a 100644
--- 
a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java
+++ 
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java
@@ -367,9 +367,9 @@ public final class BackupUtils {
   String n = p.getName();
   int idx = n.lastIndexOf(LOGNAME_SEPARATOR);
   String s = URLDecoder.decode(n.substring(0, idx), "UTF8");
-  return ServerName.parseHostname(s) + ":" + ServerName.parsePort(s);
+  return ServerName.valueOf(s).getAddress().toString();
 } catch (Exception e) {
-  LOG.warn("Skip log file (can't parse): " + p);
+  LOG.warn("Skip log file (can't parse): {}", p);
   return null;
 }
   }
diff --git 
a/hbase-balancer/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodeAssignmentHelper.java
 
b/hbase-balancer/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodeAssignmentHelper.java
index 4b73522..2e81c31 100644
--- 
a/hbase-balancer/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodeAssignmentHelper.java
+++ 
b/hbase-balancer/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodeAssignmentHelper.java
@@ -600,7 +600,7 @@ public class FavoredNodeAssignmentHelper {
 }
 
 if (randomServer != null) {
-  return ServerName.valueOf(randomServer.getHostAndPort(), 
randomServer.getStartcode());
+  return ServerName.valueOf(randomServer.getAddress(), 
randomServer.getStartcode());
 } else {
   return null;
 }
@@ -628,7 +628,7 @@ public class FavoredNodeAssignmentHelper {
 StringBuilder strBuf = new StringBuilder();
 int i = 0;
 for (ServerName node : nodes) {
-  strBuf.append(node.getHostAndPort());
+  strBuf.append(node.getAddress());
   if (++i != nodes.size()) strBuf.append(";");
 }
 return strBuf.toString();
@@ -772,7 +772,7 @@ public class FavoredNodeAssignmentHelper {
 
 List favoredNodesForRegion = new 
ArrayList<>(FAVORED_NODES_NUM);
 ServerName primary = servers.get(random.nextInt(servers.size()));
-favoredNodesForRegion.add(ServerName.valueOf(primary.getHostAndPort(), 
ServerName.NON_STARTCODE));
+favoredNodesForRegion.add(ServerName.valueOf(primary.getAddress(), 
ServerName.NON_STARTCODE));
 
 Map primaryRSMap = new HashMap<>(1);
 primaryRSMap.put(hri, primary);
@@ -781,7 +781,7 @@ public class FavoredNodeAssignmentHelper {
 ServerName[] secondaryAndTertiaryNodes = 
secondaryAndTertiaryRSMap.get(hri);
 if (secondaryAndTertiaryNodes != null && secondaryAndTertiaryNodes.length 
== 2) {
   for (ServerName sn : secondaryAndTertiaryNodes) {
-favoredNodesForRegion.add(ServerName.valueOf(sn.getHostAndPort(), 
ServerName.NON_STARTCODE));
+favoredNodesForRegion.add(ServerName.valueOf(sn.getAddress(), 
ServerName.NON_STARTCODE));
   }
   return favoredNodesForRegion;
 } else {
diff --git 
a/hbase-balancer/src/main/java/org/apache/hadoop/hbas

[hbase] branch master updated: HBASE-24334 Removed duplicated dependency declaration of metrics-api (#1665)

2020-05-06 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new 4ac1719  HBASE-24334 Removed duplicated dependency declaration of 
metrics-api (#1665)
4ac1719 is described below

commit 4ac1719521ff8ad87938292c59d20d13fbf2bce9
Author: Jan Hentschel 
AuthorDate: Wed May 6 14:22:12 2020 +0200

HBASE-24334 Removed duplicated dependency declaration of metrics-api (#1665)

Signed-off-by: Viraj Jasani 
---
 hbase-hadoop-compat/pom.xml | 4 
 1 file changed, 4 deletions(-)

diff --git a/hbase-hadoop-compat/pom.xml b/hbase-hadoop-compat/pom.xml
index e68e9fc..9239496 100644
--- a/hbase-hadoop-compat/pom.xml
+++ b/hbase-hadoop-compat/pom.xml
@@ -111,10 +111,6 @@
 slf4j-api
   
   
-org.apache.hbase
-hbase-metrics-api
-  
-  
   



[hbase] branch master updated: HBASE-24317 Removed deprecated setCacheDataInL1 in HColumnDescriptor (#1641)

2020-05-05 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new fdbf458  HBASE-24317 Removed deprecated setCacheDataInL1 in 
HColumnDescriptor (#1641)
fdbf458 is described below

commit fdbf45886df4d9ed1cbb772090f7bcb4615311fe
Author: Jan Hentschel 
AuthorDate: Tue May 5 09:18:51 2020 +0200

HBASE-24317 Removed deprecated setCacheDataInL1 in HColumnDescriptor (#1641)

Signed-off-by: stack 
Signed-off-by: Duo Zhang 
Signed-off-by: Viraj Jasani 
---
 .../java/org/apache/hadoop/hbase/HColumnDescriptor.java | 13 -
 1 file changed, 13 deletions(-)

diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java
index 58b5d01..4b94929 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java
@@ -521,19 +521,6 @@ public class HColumnDescriptor implements 
ColumnFamilyDescriptor, Comparable

[hbase] branch branch-1 updated: HBASE-24301 Updated Apache POM to version 23

2020-05-02 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1 by this push:
 new 9da034e  HBASE-24301 Updated Apache POM to version 23
9da034e is described below

commit 9da034e24fd910119285ae3cc89057fb5e67797d
Author: Jan Hentschel 
AuthorDate: Sat May 2 14:35:16 2020 +0200

HBASE-24301 Updated Apache POM to version 23

Signed-off-by: stack 
Signed-off-by: Duo Zhang 
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 46c02e9..a6518ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
   
 org.apache
 apache
-22
+23
 
 
   



[hbase] branch branch-2.2 updated: HBASE-24301 Updated Apache POM to version 23

2020-05-02 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
 new fdc20f9  HBASE-24301 Updated Apache POM to version 23
fdc20f9 is described below

commit fdc20f99d937ab937f404fed74eac397da196510
Author: Jan Hentschel 
AuthorDate: Sat May 2 14:35:16 2020 +0200

HBASE-24301 Updated Apache POM to version 23

Signed-off-by: stack 
Signed-off-by: Duo Zhang 
---
 pom.xml | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 818de3d..d44a7ce 100755
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
   
 org.apache
 apache
-21
+23
 
 
   
@@ -779,7 +779,6 @@
   
   org.apache.rat
   apache-rat-plugin
-  ${apache.rat.version}
   
 
   **/*.versionsBackup
@@ -1431,7 +1430,6 @@
 1.0.0
 4.0.0
 
-0.12
 1.5.5
 1.5.0-alpha.15
 3.0.0



[hbase] branch branch-2.3 updated: HBASE-24301 Updated Apache POM to version 23

2020-05-02 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.3 by this push:
 new d8738ae  HBASE-24301 Updated Apache POM to version 23
d8738ae is described below

commit d8738ae0541257fbeaa8d29f5b7d1c28a5b287a1
Author: Jan Hentschel 
AuthorDate: Sat May 2 14:35:16 2020 +0200

HBASE-24301 Updated Apache POM to version 23

Signed-off-by: stack 
Signed-off-by: Duo Zhang 
---
 pom.xml | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index c77c8f2..2a220a7 100755
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
   
 org.apache
 apache
-22
+23
 
 
   
@@ -699,7 +699,6 @@
   
   org.apache.rat
   apache-rat-plugin
-  ${apache.rat.version}
   
 
   **/*.versionsBackup
@@ -1366,7 +1365,6 @@
 1.0.0
 4.2.0
 
-0.13
 1.5.8
 1.5.0-rc.2
 3.0.0



[hbase] branch branch-2 updated: HBASE-24301 Updated Apache POM to version 23

2020-05-02 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new 13c4030  HBASE-24301 Updated Apache POM to version 23
13c4030 is described below

commit 13c4030cfc65f53d555aa9dfc860e617baff7418
Author: Jan Hentschel 
AuthorDate: Sat May 2 14:35:16 2020 +0200

HBASE-24301 Updated Apache POM to version 23

Signed-off-by: stack 
Signed-off-by: Duo Zhang 
---
 pom.xml | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 5756b5f..bb22392 100755
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
   
 org.apache
 apache
-22
+23
 
 
   
@@ -699,7 +699,6 @@
   
   org.apache.rat
   apache-rat-plugin
-  ${apache.rat.version}
   
 
   **/*.versionsBackup
@@ -1366,7 +1365,6 @@
 1.0.0
 4.2.0
 
-0.13
 1.5.8
 1.5.0-rc.2
 3.0.0



[hbase] branch master updated (b4a0508 -> 4f9eecb)

2020-05-02 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from b4a0508  HBASE-24300 TestRemoteBackup is broken (#1621)
 add 4f9eecb  HBASE-24301 Updated Apache POM to version 23

No new revisions were added by this update.

Summary of changes:
 pom.xml | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)



[hbase] branch branch-2.3 updated: HBASE-23998. Update license for jetty-client. (#1297) (#1498)

2020-04-12 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.3 by this push:
 new 5dfd0d8  HBASE-23998. Update license for jetty-client. (#1297) (#1498)
5dfd0d8 is described below

commit 5dfd0d8e0403ee3061fc316dc4d99e936063c1a4
Author: Jan Hentschel 
AuthorDate: Sun Apr 12 12:05:03 2020 +0200

HBASE-23998. Update license for jetty-client. (#1297) (#1498)

Signed-off-by: stack 
Signed-off-by: Jan Hentschel 
Signed-off-by: Duo Zhang 

Co-authored-by: Wei-Chiu Chuang 
---
 .../src/main/resources/supplemental-models.xml | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/hbase-resource-bundle/src/main/resources/supplemental-models.xml 
b/hbase-resource-bundle/src/main/resources/supplemental-models.xml
index d3cc9e6..2813219 100644
--- a/hbase-resource-bundle/src/main/resources/supplemental-models.xml
+++ b/hbase-resource-bundle/src/main/resources/supplemental-models.xml
@@ -1375,6 +1375,20 @@ under the License.
   
   
 
+  org.eclipse.jetty
+  jetty-client
+
+  
+
+  Apache License, Version 2.0
+  http://www.apache.org/licenses/LICENSE-2.0.txt
+  repo
+
+  
+
+  
+  
+
   org.eclipse.jetty.websocket
   javax-websocket-client-impl
 



[hbase] branch branch-2 updated: HBASE-23998. Update license for jetty-client. (#1297) (#1497)

2020-04-12 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new 8a117c9  HBASE-23998. Update license for jetty-client. (#1297) (#1497)
8a117c9 is described below

commit 8a117c9b8edf605eece5f98ffbdfbb2d5ac470df
Author: Jan Hentschel 
AuthorDate: Sun Apr 12 11:58:42 2020 +0200

HBASE-23998. Update license for jetty-client. (#1297) (#1497)

Signed-off-by: stack 
Signed-off-by: Jan Hentschel 
Signed-off-by: Duo Zhang 

Co-authored-by: Wei-Chiu Chuang 
---
 .../src/main/resources/supplemental-models.xml | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/hbase-resource-bundle/src/main/resources/supplemental-models.xml 
b/hbase-resource-bundle/src/main/resources/supplemental-models.xml
index d3cc9e6..2813219 100644
--- a/hbase-resource-bundle/src/main/resources/supplemental-models.xml
+++ b/hbase-resource-bundle/src/main/resources/supplemental-models.xml
@@ -1375,6 +1375,20 @@ under the License.
   
   
 
+  org.eclipse.jetty
+  jetty-client
+
+  
+
+  Apache License, Version 2.0
+  http://www.apache.org/licenses/LICENSE-2.0.txt
+  repo
+
+  
+
+  
+  
+
   org.eclipse.jetty.websocket
   javax-websocket-client-impl
 



[hbase] branch master updated: HBASE-23998 Addendum Add sign-offs

2020-04-12 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new a9210ef  HBASE-23998 Addendum Add sign-offs
a9210ef is described below

commit a9210ef5fea2c3561f17a365a2dc5223912703fd
Author: Wei-Chiu Chuang 
AuthorDate: Sun Apr 12 01:45:24 2020 -0700

HBASE-23998 Addendum Add sign-offs

Signed-off-by: stack 
Signed-off-by: Jan Hentschel 
Signed-off-by: Duo Zhang 



[hbase] branch revert-1297-HBASE-23998 created (now 6554e36)

2020-04-12 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch revert-1297-HBASE-23998
in repository https://gitbox.apache.org/repos/asf/hbase.git.


  at 6554e36  Revert "HBASE-23998. Update license for jetty-client. (#1297)"

This branch includes the following new commits:

 new 6554e36  Revert "HBASE-23998. Update license for jetty-client. (#1297)"

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[hbase] 01/01: Revert "HBASE-23998. Update license for jetty-client. (#1297)"

2020-04-12 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch revert-1297-HBASE-23998
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 6554e36edaa148fff9001870457744c31fa2c432
Author: Jan Hentschel 
AuthorDate: Sun Apr 12 10:52:27 2020 +0200

Revert "HBASE-23998. Update license for jetty-client. (#1297)"

This reverts commit b3461665e6c78b1cde95ff67a93a8f3a4217d3ab.
---
 .../src/main/resources/supplemental-models.xml | 14 --
 1 file changed, 14 deletions(-)

diff --git a/hbase-resource-bundle/src/main/resources/supplemental-models.xml 
b/hbase-resource-bundle/src/main/resources/supplemental-models.xml
index d3a2e38..3181fa5 100644
--- a/hbase-resource-bundle/src/main/resources/supplemental-models.xml
+++ b/hbase-resource-bundle/src/main/resources/supplemental-models.xml
@@ -630,20 +630,6 @@ under the License.
   
   
 
-  org.eclipse.jetty
-  jetty-client
-
-  
-
-  Apache License, Version 2.0
-  http://www.apache.org/licenses/LICENSE-2.0.txt
-  repo
-
-  
-
-  
-  
-
   org.eclipse.jetty.websocket
   javax-websocket-client-impl
 



[hbase] branch revert-1297-HBASE-23998 created (now 46b0685)

2020-04-12 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch revert-1297-HBASE-23998
in repository https://gitbox.apache.org/repos/asf/hbase.git.


  at 46b0685  Revert "HBASE-23998. Update license for jetty-client. (#1297)"

This branch includes the following new commits:

 new 46b0685  Revert "HBASE-23998. Update license for jetty-client. (#1297)"

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[hbase] 01/01: Revert "HBASE-23998. Update license for jetty-client. (#1297)"

2020-04-12 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch revert-1297-HBASE-23998
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 46b0685bb9829a47b0c04b6619525244516a1118
Author: Jan Hentschel 
AuthorDate: Sun Apr 12 10:45:31 2020 +0200

Revert "HBASE-23998. Update license for jetty-client. (#1297)"

This reverts commit b3461665e6c78b1cde95ff67a93a8f3a4217d3ab.
---
 .../src/main/resources/supplemental-models.xml | 14 --
 1 file changed, 14 deletions(-)

diff --git a/hbase-resource-bundle/src/main/resources/supplemental-models.xml 
b/hbase-resource-bundle/src/main/resources/supplemental-models.xml
index d3a2e38..3181fa5 100644
--- a/hbase-resource-bundle/src/main/resources/supplemental-models.xml
+++ b/hbase-resource-bundle/src/main/resources/supplemental-models.xml
@@ -630,20 +630,6 @@ under the License.
   
   
 
-  org.eclipse.jetty
-  jetty-client
-
-  
-
-  Apache License, Version 2.0
-  http://www.apache.org/licenses/LICENSE-2.0.txt
-  repo
-
-  
-
-  
-  
-
   org.eclipse.jetty.websocket
   javax-websocket-client-impl
 



[hbase] branch master updated (14342b6 -> b346166)

2020-04-12 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from 14342b6  HBASE-24126 Up the container nproc uplimit from 1 to 
12500 (#1450)
 add b346166  HBASE-23998. Update license for jetty-client. (#1297)

No new revisions were added by this update.

Summary of changes:
 .../src/main/resources/supplemental-models.xml | 14 ++
 1 file changed, 14 insertions(+)



[hbase-connectors] branch master updated: HBASE-24110 Updated Apache POM to version 23

2020-04-04 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase-connectors.git


The following commit(s) were added to refs/heads/master by this push:
 new 5976b15  HBASE-24110 Updated Apache POM to version 23
5976b15 is described below

commit 5976b1525b5e4f7664487f428ad97494cdcc859b
Author: Jan Hentschel 
AuthorDate: Sat Apr 4 22:46:10 2020 +0200

HBASE-24110 Updated Apache POM to version 23

Signed-off-by: Peter Somogyi 
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 1b5f8b7..d6061ea 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,7 +36,7 @@
   
 org.apache
 apache
-22
+23
 
 
   



[hbase] branch master updated: HBASE-23843 Removed deprecated Scan(byte[]) from Scan

2020-04-02 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new 4ddf55d  HBASE-23843 Removed deprecated Scan(byte[]) from Scan
4ddf55d is described below

commit 4ddf55d20a876e4b7e52a423fcbb0482da9051c7
Author: Jan Hentschel 
AuthorDate: Thu Apr 2 11:44:34 2020 +0200

HBASE-23843 Removed deprecated Scan(byte[]) from Scan

Signed-off-by: Viraj Jasani 
Signed-off-by: Duo Zhang 
---
 .../java/org/apache/hadoop/hbase/client/Scan.java  | 15 ---
 .../apache/hadoop/hbase/client/TestOperation.java  |  2 +-
 .../client/example/MultiThreadedClientExample.java |  2 +-
 .../hadoop/hbase/mapred/TableRecordReaderImpl.java |  2 +-
 .../hadoop/hbase/rest/ScannerResultGenerator.java  |  2 +-
 .../hadoop/hbase/rest/PerformanceEvaluation.java   |  4 +-
 .../hadoop/hbase/rest/TestScannersWithFilters.java |  4 +-
 .../apache/hadoop/hbase/HBaseTestingUtility.java   |  2 +-
 .../org/apache/hadoop/hbase/TestSerialization.java |  2 +-
 .../org/apache/hadoop/hbase/TimestampTestBase.java |  2 +-
 .../hadoop/hbase/client/FromClientSideBase.java| 18 
 .../hadoop/hbase/client/TestFromClientSide.java| 52 +++---
 .../hadoop/hbase/client/TestFromClientSide4.java   | 12 ++---
 .../hadoop/hbase/client/TestFromClientSide5.java   | 22 -
 .../TestGetScanColumnsWithNewVersionBehavior.java  |  2 +-
 .../hbase/client/TestScannersFromClientSide.java   |  2 +-
 .../org/apache/hadoop/hbase/filter/TestFilter.java |  8 ++--
 .../io/encoding/TestLoadAndSwitchEncodeOnDisk.java |  2 +-
 .../hbase/regionserver/TestAtomicOperation.java|  2 +-
 .../hadoop/hbase/regionserver/TestHRegion.java | 28 ++--
 .../hadoop/hbase/regionserver/TestKeepDeletes.java |  4 +-
 .../hadoop/hbase/regionserver/TestScanner.java |  2 +-
 .../apache/hadoop/hbase/regionserver/TestTags.java |  8 ++--
 hbase-shell/src/main/ruby/hbase/table.rb   |  2 +-
 .../hbase/thrift/ThriftHBaseServiceHandler.java|  8 ++--
 25 files changed, 97 insertions(+), 112 deletions(-)

diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java
index 9ca6cd6..36171dd 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java
@@ -180,21 +180,6 @@ public class Scan extends Query {
   public Scan() {}
 
   /**
-   * Create a Scan operation starting at the specified row.
-   * 
-   * If the specified row does not exist, the Scanner will start from the next 
closest row after the
-   * specified row.
-   * @param startRow row to start scanner at or after
-   * @deprecated since 2.0.0 and will be removed in 3.0.0. Use
-   *   {@code new Scan().withStartRow(startRow)} instead.
-   * @see https://issues.apache.org/jira/browse/HBASE-17320;>HBASE-17320
-   */
-  @Deprecated
-  public Scan(byte[] startRow) {
-withStartRow(startRow);
-  }
-
-  /**
* Creates a new instance of this class while copying all values.
*
* @param scan  The scan instance to copy from.
diff --git 
a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestOperation.java 
b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestOperation.java
index dbaace9..600c444 100644
--- 
a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestOperation.java
+++ 
b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestOperation.java
@@ -289,7 +289,7 @@ public class TestOperation {
   @Test
   public void testOperationJSON() throws IOException {
 // produce a Scan Operation
-Scan scan = new Scan(ROW);
+Scan scan = new Scan().withStartRow(ROW);
 scan.addColumn(FAMILY, QUALIFIER);
 // get its JSON representation, and parse it
 String json = scan.toJSON();
diff --git 
a/hbase-examples/src/main/java/org/apache/hadoop/hbase/client/example/MultiThreadedClientExample.java
 
b/hbase-examples/src/main/java/org/apache/hadoop/hbase/client/example/MultiThreadedClientExample.java
index bacb460..6e9f44b 100644
--- 
a/hbase-examples/src/main/java/org/apache/hadoop/hbase/client/example/MultiThreadedClientExample.java
+++ 
b/hbase-examples/src/main/java/org/apache/hadoop/hbase/client/example/MultiThreadedClientExample.java
@@ -297,7 +297,7 @@ public class MultiThreadedClientExample extends Configured 
implements Tool {
   int toRead = 100;
   try (Table t = connection.getTable(tableName)) {
 byte[] rk = Bytes.toBytes(ThreadLocalRandom.current().nextLong());
-Scan s = new Scan(rk);
+Scan s = new Scan().withStartRow(rk);
 
 // This filter will keep the values from being sent accross the wire.
 // This is good for counting or other scans that are checking for
diff --git 
a/hbase-mapreduce/src/main/java/

[hbase] branch master updated (834f89d -> fb17ecd)

2020-04-01 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from 834f89d  HBASE-23678 : Builder API for version management - 
setVersionsWithTim… (#1381)
 add fb17ecd  HBASE-23842 Removed deprecated Scan(byte[], byte[]) from Scan

No new revisions were added by this update.

Summary of changes:
 .../java/org/apache/hadoop/hbase/client/Scan.java  |  14 -
 .../coprocessor/TestRowProcessorEndpoint.java  |  10 +-
 .../hadoop/hbase/mapred/TableRecordReaderImpl.java |   4 +-
 .../TestMultiTableSnapshotInputFormatImpl.java |   8 +-
 .../mapreduce/TestTableSnapshotInputFormat.java|   6 +-
 .../hadoop/hbase/rest/ScannerResultGenerator.java  |   2 +-
 .../hadoop/hbase/rest/PerformanceEvaluation.java   |   3 +-
 .../hadoop/hbase/rest/TestScannersWithFilters.java |  17 +-
 .../org/apache/hadoop/hbase/TestSerialization.java |   2 +-
 .../hadoop/hbase/client/FromClientSideBase.java|   8 +-
 .../hadoop/hbase/client/TestFromClientSide.java|   8 +-
 .../hadoop/hbase/client/TestFromClientSide5.java   |  13 +-
 .../hbase/client/TestMultipleTimestamps.java   |   2 +-
 .../hbase/client/TestTableSnapshotScanner.java |   7 +-
 .../hadoop/hbase/client/TestTimestampsFilter.java  |   2 +-
 .../org/apache/hadoop/hbase/filter/TestFilter.java | 291 +++--
 .../hfile/TestScannerSelectionUsingKeyRange.java   |   2 +-
 .../hadoop/hbase/regionserver/TestHRegion.java |  13 +-
 .../hadoop/hbase/regionserver/TestHStoreFile.java  |   6 +-
 .../TestRegionServerReadRequestMetrics.java|   4 +-
 .../hbase/regionserver/TestScanWithBloomError.java |   2 +-
 .../hadoop/hbase/regionserver/TestScanner.java |   5 +-
 .../hadoop/hbase/util/BaseTestHBaseFsck.java   |   2 +-
 hbase-shell/src/main/ruby/hbase/table.rb   |   2 +-
 .../hbase/thrift/ThriftHBaseServiceHandler.java|   4 +-
 25 files changed, 220 insertions(+), 217 deletions(-)



[hbase] branch master updated: HBASE-23846 Removed deprecated setMaxVersions(int) from Scan

2020-03-31 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new fded2b9  HBASE-23846 Removed deprecated setMaxVersions(int) from Scan
fded2b9 is described below

commit fded2b9ddc28d03f270b6aed36165463e3665e3c
Author: Jan Hentschel 
AuthorDate: Tue Mar 31 10:18:27 2020 +0200

HBASE-23846 Removed deprecated setMaxVersions(int) from Scan

Signed-off-by: Duo Zhang 
Signed-off-by: Viraj Jasani 
---
 .../hbase/backup/impl/BackupSystemTable.java   | 10 +++---
 .../java/org/apache/hadoop/hbase/client/Scan.java  | 22 +++-
 .../hadoop/hbase/shaded/protobuf/ProtobufUtil.java |  2 +-
 .../hbase/mapreduce/IntegrationTestBulkLoad.java   |  2 +-
 .../hadoop/hbase/mttr/IntegrationTestMTTR.java |  2 +-
 .../apache/hadoop/hbase/mapreduce/CellCounter.java |  2 +-
 .../apache/hadoop/hbase/mapreduce/ExportUtils.java |  2 +-
 .../apache/hadoop/hbase/mapreduce/HashTable.java   |  2 +-
 .../hadoop/hbase/mapreduce/TableInputFormat.java   |  2 +-
 .../mapreduce/replication/VerifyReplication.java   |  4 +--
 .../hadoop/hbase/mob/mapreduce/MobRefReporter.java |  2 +-
 .../hadoop/hbase/ScanPerformanceEvaluation.java|  2 +-
 .../hbase/mapreduce/TestTimeRangeMapRed.java   |  2 +-
 .../hadoop/hbase/rest/ScannerResultGenerator.java  |  2 +-
 .../apache/hadoop/hbase/rest/TableResource.java|  2 +-
 .../org/apache/hadoop/hbase/TestSerialization.java |  2 +-
 .../hadoop/hbase/client/FromClientSideBase.java| 10 +++---
 .../hadoop/hbase/client/TestFromClientSide.java| 40 +++---
 .../hadoop/hbase/client/TestFromClientSide4.java   | 12 +++
 .../hadoop/hbase/client/TestFromClientSide5.java   | 24 ++---
 .../hbase/client/TestMultipleTimestamps.java   |  4 +--
 .../coprocessor/TestOpenTableInCoprocessor.java|  2 +-
 .../hbase/filter/TestDependentColumnFilter.java|  8 ++---
 .../hbase/mob/TestDefaultMobStoreFlusher.java  |  2 +-
 .../hadoop/hbase/mob/TestMobDataBlockEncoding.java |  2 +-
 .../hadoop/hbase/mob/TestMobStoreScanner.java  |  2 +-
 .../hbase/regionserver/TestBlocksScanned.java  |  2 +-
 .../hadoop/hbase/regionserver/TestHRegion.java | 22 ++--
 .../hadoop/hbase/regionserver/TestKeepDeletes.java |  2 +-
 .../regionserver/TestScannerWithBulkload.java  |  2 +-
 .../hbase/regionserver/TestSeekOptimizations.java  |  2 +-
 .../hadoop/hbase/regionserver/TestWideScanner.java |  2 +-
 .../security/visibility/TestVisibilityLabels.java  |  2 +-
 .../hadoop/hbase/thrift2/ThriftUtilities.java  |  2 +-
 .../hadoop/hbase/thrift2/TestThriftConnection.java |  2 +-
 35 files changed, 96 insertions(+), 110 deletions(-)

diff --git 
a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java
 
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java
index bfbb8fd..1f35d03 100644
--- 
a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java
+++ 
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java
@@ -1189,7 +1189,7 @@ public final class BackupSystemTable implements Closeable 
{
 List list = new ArrayList<>();
 try (Table table = connection.getTable(tableName)) {
   Scan scan = createScanForBackupSetList();
-  scan.setMaxVersions(1);
+  scan.readVersions(1);
   try (ResultScanner scanner = table.getScanner(scan)) {
 Result res;
 while ((res = scanner.next()) != null) {
@@ -1504,7 +1504,7 @@ public final class BackupSystemTable implements Closeable 
{
 scan.withStartRow(startRow);
 scan.setStopRow(stopRow);
 scan.addFamily(BackupSystemTable.SESSIONS_FAMILY);
-scan.setMaxVersions(1);
+scan.readVersions(1);
 return scan;
   }
 
@@ -1585,7 +1585,7 @@ public final class BackupSystemTable implements Closeable 
{
 scan.withStartRow(startRow);
 scan.setStopRow(stopRow);
 scan.addFamily(BackupSystemTable.META_FAMILY);
-scan.setMaxVersions(1);
+scan.readVersions(1);
 
 return scan;
   }
@@ -1859,7 +1859,7 @@ public final class BackupSystemTable implements Closeable 
{
 scan.withStartRow(startRow);
 scan.withStopRow(stopRow);
 scan.addFamily(BackupSystemTable.META_FAMILY);
-scan.setMaxVersions(1);
+scan.readVersions(1);
 return scan;
   }
 
@@ -1894,7 +1894,7 @@ public final class BackupSystemTable implements Closeable 
{
 scan.withStartRow(startRow);
 scan.setStopRow(stopRow);
 scan.addFamily(BackupSystemTable.META_FAMILY);
-scan.setMaxVersions(1);
+scan.readVersions(1);
 return scan;
   }
 
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java
index 6b142c9..6288ccf 100644
--- a/hbase-client/src/main/ja

[hbase] branch master updated: HBASE-23983 Fixed Spotbugs complaint in RegionStates related to ignored return value

2020-03-24 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new aa966e3  HBASE-23983 Fixed Spotbugs complaint in RegionStates related 
to ignored return value
aa966e3 is described below

commit aa966e354aa02f5572fc06427dfa0617b4e0123b
Author: Jan Hentschel 
AuthorDate: Wed Mar 25 00:02:54 2020 +0100

HBASE-23983 Fixed Spotbugs complaint in RegionStates related to ignored 
return value

Signed-off-by: Duo Zhang 
---
 .../org/apache/hadoop/hbase/master/assignment/RegionStates.java | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java
index 7c0f6f8..3bb3c4c 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java
@@ -129,7 +129,11 @@ public class RegionStates {
 synchronized (regionsMapLock) {
   RegionStateNode node = 
regionsMap.computeIfAbsent(regionInfo.getRegionName(),
 key -> new RegionStateNode(regionInfo, regionInTransition));
-  encodedRegionsMap.putIfAbsent(regionInfo.getEncodedName(), node);
+
+  if (encodedRegionsMap.get(regionInfo.getEncodedName()) != node) {
+encodedRegionsMap.put(regionInfo.getEncodedName(), node);
+  }
+
   return node;
 }
   }



[hbase] branch branch-1 updated: HBASE-23943 Updated Rubocop configuration to current version

2020-03-18 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1 by this push:
 new bc2c768  HBASE-23943 Updated Rubocop configuration to current version
bc2c768 is described below

commit bc2c768a52212b66b449f18593e50086d4bf06b7
Author: Jan Hentschel 
AuthorDate: Wed Mar 18 12:26:09 2020 +0100

HBASE-23943 Updated Rubocop configuration to current version

Signed-off-by: Nick Dimiduk 
Signed-off-by: Viraj Jasani 
---
 .rubocop.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.rubocop.yml b/.rubocop.yml
index 9799541..f877a05 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,10 +1,10 @@
 Naming/HeredocDelimiterNaming:
   Enabled: false
 
-Layout/IndentHeredoc:
+Layout/HeredocIndentation:
   Enabled: false
 
-Metrics/LineLength:
+Layout/LineLength:
   Max: 100
 
 Metrics/MethodLength:



[hbase] branch branch-2 updated: HBASE-23943 Updated Rubocop configuration to current version

2020-03-18 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new 58a0ef0  HBASE-23943 Updated Rubocop configuration to current version
58a0ef0 is described below

commit 58a0ef0cfe5607bac8bc170ce7468b57eacf58d0
Author: Jan Hentschel 
AuthorDate: Wed Mar 18 11:48:36 2020 +0100

HBASE-23943 Updated Rubocop configuration to current version

Signed-off-by: Nick Dimiduk 
Signed-off-by: Viraj Jasani 
---
 .rubocop.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.rubocop.yml b/.rubocop.yml
index 9799541..f877a05 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,10 +1,10 @@
 Naming/HeredocDelimiterNaming:
   Enabled: false
 
-Layout/IndentHeredoc:
+Layout/HeredocIndentation:
   Enabled: false
 
-Metrics/LineLength:
+Layout/LineLength:
   Max: 100
 
 Metrics/MethodLength:



[hbase] branch master updated: HBASE-23943 Updated Rubocop configuration to current version

2020-03-18 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new d7e70bb  HBASE-23943 Updated Rubocop configuration to current version
d7e70bb is described below

commit d7e70bb497ccac53905d69bcbcfd67107f73badf
Author: Jan Hentschel 
AuthorDate: Wed Mar 18 11:09:36 2020 +0100

HBASE-23943 Updated Rubocop configuration to current version

Signed-off-by: Nick Dimiduk 
Signed-off-by: Viraj Jasani 
---
 .rubocop.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.rubocop.yml b/.rubocop.yml
index 9799541..f877a05 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,10 +1,10 @@
 Naming/HeredocDelimiterNaming:
   Enabled: false
 
-Layout/IndentHeredoc:
+Layout/HeredocIndentation:
   Enabled: false
 
-Metrics/LineLength:
+Layout/LineLength:
   Max: 100
 
 Metrics/MethodLength:



[hbase] branch master updated (3e21dc7 -> 9f223c2)

2020-02-25 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from 3e21dc7  HBASE-23874 Move Jira-attached file precommit definition from 
script in Jenkins config to dev-support (#1191) (ADDENDUM)
 add 9f223c2  HBASE-23781 Removed deprecated createTableDescriptor(String) 
from HBaseTestingUtility

No new revisions were added by this update.

Summary of changes:
 .../hadoop/hbase/IntegrationTestMobCompaction.java |  2 +-
 .../apache/hadoop/hbase/HBaseTestingUtility.java   | 15 -
 .../hadoop/hbase/client/TestFromClientSide.java|  4 +++-
 .../hbase/client/TestReplicaWithCluster.java   | 25 --
 .../hadoop/hbase/client/TestReplicasClient.java|  6 +-
 .../hadoop/hbase/mob/TestMobCompactionBase.java|  2 +-
 .../apache/hadoop/hbase/mob/TestMobFileCache.java  |  6 +-
 .../hadoop/hbase/mob/TestMobFileCleanerChore.java  |  2 +-
 .../hadoop/hbase/mob/TestMobStoreCompaction.java   |  5 -
 .../hadoop/hbase/regionserver/TestCompaction.java  |  5 -
 .../hbase/regionserver/TestMajorCompaction.java|  7 +-
 .../hbase/regionserver/TestMinorCompaction.java|  6 +-
 .../regionserver/TestRegionReplicaFailover.java|  9 ++--
 .../hadoop/hbase/regionserver/TestScanner.java |  4 +++-
 .../TestSplitTransactionOnCluster.java |  5 -
 .../TestRegionReplicaReplicationEndpoint.java  | 23 ++--
 ...stRegionReplicaReplicationEndpointNoMaster.java |  5 -
 17 files changed, 89 insertions(+), 42 deletions(-)



[hbase] branch master updated (ae781e5 -> 68f4fd1)

2020-02-16 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from ae781e5  HBASE-23837 Removed deprecated isLegalFamilyName(byte[]) from 
HColumnDescriptor
 add 68f4fd1  HBASE-23844 Removed deprecated Scan(byte[], Filter) from Scan

No new revisions were added by this update.

Summary of changes:
 .../src/main/java/org/apache/hadoop/hbase/client/Scan.java| 11 ---
 1 file changed, 11 deletions(-)



[hbase] branch master updated (0e96638 -> ae781e5)

2020-02-15 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from 0e96638  HBASE-23838 Adding debug logging to a few ExportSnapshot 
tests ADDENDUM to fix failing TestExportSnapshot
 add ae781e5  HBASE-23837 Removed deprecated isLegalFamilyName(byte[]) from 
HColumnDescriptor

No new revisions were added by this update.

Summary of changes:
 .../java/org/apache/hadoop/hbase/HColumnDescriptor.java | 17 -
 .../main/java/org/apache/hadoop/hbase/util/FSUtils.java |  3 ++-
 2 files changed, 2 insertions(+), 18 deletions(-)



[hbase] branch master updated: HBASE-23775 Removed deprecated method createLocalHTU(Configuration) from HBaseTestingUtility

2020-02-07 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new 93c5e76  HBASE-23775 Removed deprecated method 
createLocalHTU(Configuration) from HBaseTestingUtility
93c5e76 is described below

commit 93c5e7691f02e4b46b4b7d4a582b32e9b9ce9792
Author: Jan Hentschel 
AuthorDate: Fri Feb 7 09:51:04 2020 +0100

HBASE-23775 Removed deprecated method createLocalHTU(Configuration) from 
HBaseTestingUtility

Signed-off-by: Sean Busbey 
---
 .../java/org/apache/hadoop/hbase/HBaseTestingUtility.java| 12 
 .../hadoop/hbase/regionserver/TestCompactingMemStore.java|  2 +-
 .../hadoop/hbase/regionserver/TestDefaultMemStore.java   |  4 ++--
 .../hbase/regionserver/TestMemStoreSegmentsIterator.java |  2 +-
 4 files changed, 4 insertions(+), 16 deletions(-)

diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index 575e65d..e40dfa0 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -343,18 +343,6 @@ public class HBaseTestingUtility extends 
HBaseZKTestingUtility {
   }
 
   /**
-   * @deprecated since 2.0.0 and will be removed in 3.0.0. Use
-   *   {@link #HBaseTestingUtility(Configuration)} instead.
-   * @return a normal HBaseTestingUtility
-   * @see #HBaseTestingUtility(Configuration)
-   * @see https://issues.apache.org/jira/browse/HBASE-19841;>HBASE-19841
-   */
-  @Deprecated
-  public static HBaseTestingUtility createLocalHTU(Configuration c) {
-return new HBaseTestingUtility(c);
-  }
-
-  /**
* Close both the region {@code r} and it's underlying WAL. For use in tests.
*/
   public static void closeRegionAndWAL(final Region r) throws IOException {
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactingMemStore.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactingMemStore.java
index e5a2a8a..80e312b 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactingMemStore.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactingMemStore.java
@@ -107,7 +107,7 @@ public class TestCompactingMemStore extends 
TestDefaultMemStore {
 conf.setBoolean(MemStoreLAB.USEMSLAB_KEY, true);
 conf.setFloat(MemStoreLAB.CHUNK_POOL_MAXSIZE_KEY, 0.2f);
 conf.setInt(HRegion.MEMSTORE_PERIODIC_FLUSH_INTERVAL, 1000);
-HBaseTestingUtility hbaseUtility = 
HBaseTestingUtility.createLocalHTU(conf);
+HBaseTestingUtility hbaseUtility = new HBaseTestingUtility(conf);
 HColumnDescriptor hcd = new HColumnDescriptor(FAMILY);
 HTableDescriptor htd = new HTableDescriptor(TableName.valueOf("foobar"));
 htd.addFamily(hcd);
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
index f88e3ed..9e7c038 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
@@ -917,7 +917,7 @@ public class TestDefaultMemStore {
 try {
   EnvironmentEdgeForMemstoreTest edge = new 
EnvironmentEdgeForMemstoreTest();
   EnvironmentEdgeManager.injectEdge(edge);
-  HBaseTestingUtility hbaseUtility = 
HBaseTestingUtility.createLocalHTU(conf);
+  HBaseTestingUtility hbaseUtility = new HBaseTestingUtility(conf);
   String cf = "foo";
   HRegion region =
   hbaseUtility.createTestRegion("foobar", 
ColumnFamilyDescriptorBuilder.of(cf));
@@ -943,7 +943,7 @@ public class TestDefaultMemStore {
 // the MEMSTORE_PERIODIC_FLUSH_INTERVAL is set to a higher value)
 Configuration conf = new Configuration();
 conf.setInt(HRegion.MEMSTORE_PERIODIC_FLUSH_INTERVAL, 
HRegion.SYSTEM_CACHE_FLUSH_INTERVAL * 10);
-HBaseTestingUtility hbaseUtility = 
HBaseTestingUtility.createLocalHTU(conf);
+HBaseTestingUtility hbaseUtility = new HBaseTestingUtility(conf);
 Path testDir = hbaseUtility.getDataTestDir();
 EnvironmentEdgeForMemstoreTest edge = new EnvironmentEdgeForMemstoreTest();
 EnvironmentEdgeManager.injectEdge(edge);
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStoreSegmentsIterator.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStoreSegmentsIterator.java
index 7aec6d0..3602db6 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStoreSegmentsIterator.java
+++ 
b/hbase-server/src/

[hbase] branch master updated (661abeb -> b591a3d)

2020-02-03 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from 661abeb  HBASE-23780 Edit of test classifications (#1109)
 add b591a3d  HBASE-23772 Removed deprecated getTimeStampOfLastShippedOp 
from MetricsSource

No new revisions were added by this update.

Summary of changes:
 .../hadoop/hbase/replication/regionserver/MetricsSource.java  | 11 ---
 1 file changed, 11 deletions(-)



[hbase] branch master updated (5a3ad6f -> 12f1c7c)

2020-02-02 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from 5a3ad6f  HBASE-23776 Removed deprecated method createLocalHTU() from 
HBaseTestingUtility
 add 12f1c7c  HBASE-23777 Removed deprecated createTableDescriptor(String, 
int, int, int, KeepDeletedCells) from HBaseTestingUtility

No new revisions were added by this update.

Summary of changes:
 .../apache/hadoop/hbase/HBaseTestingUtility.java   | 13 -
 .../hadoop/hbase/regionserver/TestKeepDeletes.java | 31 +++---
 2 files changed, 16 insertions(+), 28 deletions(-)



[hbase] branch master updated: HBASE-23776 Removed deprecated method createLocalHTU() from HBaseTestingUtility

2020-02-01 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new 5a3ad6f  HBASE-23776 Removed deprecated method createLocalHTU() from 
HBaseTestingUtility
5a3ad6f is described below

commit 5a3ad6f08f4304f73c911726cf2e33b9ced1f43a
Author: Jan Hentschel 
AuthorDate: Sun Feb 2 00:28:25 2020 +0100

HBASE-23776 Removed deprecated method createLocalHTU() from 
HBaseTestingUtility

Signed-off-by: stack 
---
 .../apache/hadoop/hbase/HBaseTestingUtility.java   | 22 --
 .../coprocessor/TestCoprocessorInterface.java  |  2 +-
 .../coprocessor/TestCoreMasterCoprocessor.java |  2 +-
 .../coprocessor/TestCoreRegionCoprocessor.java |  2 +-
 .../TestCoreRegionServerCoprocessor.java   |  2 +-
 .../hbase/io/encoding/TestEncodedSeekers.java  |  2 +-
 .../hadoop/hbase/io/hfile/TestCacheOnWrite.java|  2 +-
 .../io/hfile/TestForceCacheImportantBlocks.java|  2 +-
 .../hbase/io/hfile/TestScannerFromBucketCache.java |  2 +-
 .../hfile/TestScannerSelectionUsingKeyRange.java   |  2 +-
 .../io/hfile/TestScannerSelectionUsingTTL.java |  2 +-
 .../hbase/master/TestHMasterRPCException.java  |  2 +-
 .../apache/hadoop/hbase/mob/TestMobFileCache.java  |  2 +-
 .../hbase/regionserver/TestAtomicOperation.java|  2 +-
 .../regionserver/TestCacheOnWriteInSchema.java |  2 +-
 .../hbase/regionserver/TestColumnSeeking.java  |  2 +-
 .../hadoop/hbase/regionserver/TestCompaction.java  |  2 +-
 .../TestCompactionArchiveConcurrentClose.java  |  2 +-
 .../regionserver/TestFailedAppendAndSync.java  |  2 +-
 .../hadoop/hbase/regionserver/TestHRegion.java |  2 +-
 .../hadoop/hbase/regionserver/TestKeepDeletes.java |  2 +-
 .../hbase/regionserver/TestMajorCompaction.java|  2 +-
 .../hbase/regionserver/TestMinorCompaction.java|  2 +-
 .../hbase/regionserver/TestMultiColumnScanner.java |  2 +-
 .../hbase/regionserver/TestMultiLogThreshold.java  |  2 +-
 .../hbase/regionserver/TestRegionIncrement.java|  2 +-
 .../hadoop/hbase/regionserver/TestRowTooBig.java   |  2 +-
 .../hbase/regionserver/TestScanWithBloomError.java |  2 +-
 .../hadoop/hbase/regionserver/TestScanner.java |  2 +-
 .../regionserver/TestScannerWithCorruptHFile.java  |  2 +-
 .../hbase/regionserver/TestSeekOptimizations.java  |  2 +-
 .../regionserver/TestTimestampFilterSeekHint.java  |  2 +-
 .../hbase/snapshot/TestSnapshotManifest.java   |  2 +-
 33 files changed, 32 insertions(+), 54 deletions(-)

diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index 3f40130..864a14d 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -302,11 +302,6 @@ public class HBaseTestingUtility extends 
HBaseZKTestingUtility {
* Initially, all tmp files are written to a local test data directory.
* Once {@link #startMiniDFSCluster} is called, either directly or via
* {@link #startMiniCluster()}, tmp data will be written to the DFS 
directory instead.
-   *
-   * Previously, there was a distinction between the type of utility 
returned by
-   * {@link #createLocalHTU()} and this constructor; this is no longer the 
case. All
-   * HBaseTestingUtility objects will behave as local until a DFS cluster is 
started,
-   * at which point they will switch to using mini DFS for storage.
*/
   public HBaseTestingUtility() {
 this(HBaseConfiguration.create());
@@ -319,11 +314,6 @@ public class HBaseTestingUtility extends 
HBaseZKTestingUtility {
* Once {@link #startMiniDFSCluster} is called, either directly or via
* {@link #startMiniCluster()}, tmp data will be written to the DFS 
directory instead.
*
-   * Previously, there was a distinction between the type of utility 
returned by
-   * {@link #createLocalHTU()} and this constructor; this is no longer the 
case. All
-   * HBaseTestingUtility objects will behave as local until a DFS cluster is 
started,
-   * at which point they will switch to using mini DFS for storage.
-   *
* @param conf The configuration to use for further operations
*/
   public HBaseTestingUtility(@Nullable Configuration conf) {
@@ -353,18 +343,6 @@ public class HBaseTestingUtility extends 
HBaseZKTestingUtility {
   }
 
   /**
-   * @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link 
#HBaseTestingUtility()}
-   *   instead.
-   * @return a normal HBaseTestingUtility
-   * @see #HBaseTestingUtility()
-   * @see https://issues.apache.org/jira/browse/HBASE-19841;>HBASE-19841
-   */
-  @Deprecated
-  public static HBaseTestingUtility createLocalHTU() {
-return new HBaseTestingUtil

[hbase] branch master updated: HBASE-23736 Removed deprecated getTimeStampOfLastAppliedOp from MetricsSink

2020-01-29 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new 60b80b6  HBASE-23736 Removed deprecated getTimeStampOfLastAppliedOp 
from MetricsSink
60b80b6 is described below

commit 60b80b6298ef94166208a09452a2cbe5dfaf3f95
Author: Jan Hentschel 
AuthorDate: Wed Jan 29 17:02:09 2020 +0100

HBASE-23736 Removed deprecated getTimeStampOfLastAppliedOp from MetricsSink

Signed-off-by: Viraj Jasani 
Signed-off-by: Xu Cang 
---
 .../hadoop/hbase/replication/regionserver/MetricsSink.java   | 12 
 1 file changed, 12 deletions(-)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsSink.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsSink.java
index eafb54c..ae57e78 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsSink.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsSink.java
@@ -91,18 +91,6 @@ public class MetricsSink {
   }
 
   /**
-   * Get the TimeStampOfLastAppliedOp. If no replication Op applied yet, the 
value is the timestamp
-   * at which hbase instance starts
-   * @return timeStampsOfLastAppliedOp;
-   * @deprecated Since 2.0.0. Will be removed in 3.0.0.
-   * @see #getTimestampOfLastAppliedOp()
-   */
-  @Deprecated
-  public long getTimeStampOfLastAppliedOp() {
-return getTimestampOfLastAppliedOp();
-  }
-
-  /**
* Get the TimestampOfLastAppliedOp. If no replication Op applied yet, the 
value is the timestamp
* at which hbase instance starts
* @return timeStampsOfLastAppliedOp;



[hbase] branch master updated (85d0208 -> e836f56)

2020-01-28 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from 85d0208  HBASE-23751 Move core to hbase-thirdparty 3.2.0
 add e836f56  HBASE-23738 Removed deprecated createLocalHRegion from 
HBaseTestingUtility

No new revisions were added by this update.

Summary of changes:
 .../apache/hadoop/hbase/HBaseTestingUtility.java   | 26 --
 .../regionserver/TestHRegionReplayEvents.java  | 16 -
 2 files changed, 4 insertions(+), 38 deletions(-)



[hbase] branch branch-1 updated: HBASE-23621 Reduced the number of Checkstyle violations in tests of hbase-common

2020-01-27 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1 by this push:
 new 2267ab9  HBASE-23621 Reduced the number of Checkstyle violations in 
tests of hbase-common
2267ab9 is described below

commit 2267ab9399b0e3d1b2714aa5ee311fd0bbf52c31
Author: Jan Hentschel 
AuthorDate: Mon Jan 27 13:05:25 2020 +0100

HBASE-23621 Reduced the number of Checkstyle violations in tests of 
hbase-common

Signed-off-by: stack 
---
 .../java/org/apache/hadoop/hbase/ClassFinder.java  |  55 
 .../hadoop/hbase/HBaseCommonTestingUtility.java|  43 +++---
 .../org/apache/hadoop/hbase/ResourceChecker.java   |  22 ++--
 .../java/org/apache/hadoop/hbase/TestCellUtil.java |  44 +++
 .../org/apache/hadoop/hbase/TestClassFinder.java   |  17 +--
 .../hadoop/hbase/TestHBaseConfiguration.java   |  51 ++--
 .../hadoop/hbase/codec/TestCellCodecWithTags.java  |   3 +-
 .../hbase/codec/TestKeyValueCodecWithTags.java |   3 +-
 .../hadoop/hbase/io/crypto/TestEncryption.java |  36 ++---
 .../hadoop/hbase/util/RedundantKVGenerator.java| 145 -
 .../apache/hadoop/hbase/HBaseTestingUtility.java   |   3 +-
 11 files changed, 155 insertions(+), 267 deletions(-)

diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/ClassFinder.java 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/ClassFinder.java
index ba6d8a2..e16303b 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/ClassFinder.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/ClassFinder.java
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase;
 
 import java.io.File;
@@ -53,24 +52,32 @@ public class ClassFinder {
 
   public interface ResourcePathFilter {
 boolean isCandidatePath(String resourcePath, boolean isJar);
-  };
+  }
 
   public interface FileNameFilter {
 boolean isCandidateFile(String fileName, String absFilePath);
-  };
+  }
 
   public interface ClassFilter {
 boolean isCandidateClass(Class c);
-  };
+  }
 
   public static class Not implements ResourcePathFilter, FileNameFilter, 
ClassFilter {
 private ResourcePathFilter resourcePathFilter;
 private FileNameFilter fileNameFilter;
 private ClassFilter classFilter;
 
-public Not(ResourcePathFilter resourcePathFilter){this.resourcePathFilter 
= resourcePathFilter;}
-public Not(FileNameFilter fileNameFilter){this.fileNameFilter = 
fileNameFilter;}
-public Not(ClassFilter classFilter){this.classFilter = classFilter;}
+public Not(ResourcePathFilter resourcePathFilter) {
+  this.resourcePathFilter = resourcePathFilter;
+}
+
+public Not(FileNameFilter fileNameFilter) {
+  this.fileNameFilter = fileNameFilter;
+}
+
+public Not(ClassFilter classFilter) {
+  this.classFilter = classFilter;
+}
 
 @Override
 public boolean isCandidatePath(String resourcePath, boolean isJar) {
@@ -90,7 +97,10 @@ public class ClassFinder {
 ClassFilter[] classFilters;
 ResourcePathFilter[] resourcePathFilters;
 
-public And(ClassFilter...classFilters) { this.classFilters = classFilters; 
}
+public And(ClassFilter...classFilters) {
+  this.classFilters = classFilters;
+}
+
 public And(ResourcePathFilter... resourcePathFilters) {
   this.resourcePathFilters = resourcePathFilters;
 }
@@ -120,10 +130,6 @@ public class ClassFinder {
 this(null, null, null, classLoader);
   }
 
-  public ClassFinder() {
-this(ClassLoader.getSystemClassLoader());
-  }
-
   public ClassFinder(ResourcePathFilter resourcePathFilter, FileNameFilter 
fileNameFilter,
   ClassFilter classFilter) {
 this(resourcePathFilter, fileNameFilter, classFilter, 
ClassLoader.getSystemClassLoader());
@@ -180,7 +186,7 @@ public class ClassFinder {
   }
 }
 
-Set> classes = new HashSet>();
+Set> classes = new HashSet<>();
 for (File directory : dirs) {
   classes.addAll(findClassesFromFiles(directory, packageName, 
proceedOnExceptions));
 }
@@ -193,7 +199,7 @@ public class ClassFinder {
   private Set> findClassesFromJar(String jarFileName,
   String packageName, boolean proceedOnExceptions)
 throws IOException, ClassNotFoundException, LinkageError {
-JarInputStream jarFile = null;
+JarInputStream jarFile;
 try {
   jarFile = new JarInputStream(new FileInputStream(jarFileName));
 } catch (IOException ioEx) {
@@ -201,8 +207,8 @@ public class ClassFinder {
   throw ioEx;
 }
 
-Set> classes = new HashSet>();
-JarEntry entry = null;
+Set> classes = new HashSet<>();
+JarEntry entry;
 try {
   while (true) {
 try {
@@ -248,7 +254,7 @@ public cla

[hbase-operator-tools] branch master updated: HBASE-23714 Updated to version 22 of the Apache parent POM

2020-01-27 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase-operator-tools.git


The following commit(s) were added to refs/heads/master by this push:
 new b94adcf  HBASE-23714 Updated to version 22 of the Apache parent POM
b94adcf is described below

commit b94adcf78d5d2c0c900833fc2c6f8ec72269581e
Author: Jan Hentschel 
AuthorDate: Mon Jan 27 13:02:05 2020 +0100

HBASE-23714 Updated to version 22 of the Apache parent POM

Signed-off-by: Peter Somogyi 
---
 pom.xml | 20 +---
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/pom.xml b/pom.xml
index b83afe9..943b179 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
   
 org.apache
 apache
-21
+22
 
 
   
@@ -127,8 +127,6 @@
 ${compileSource}
 3.3.3
 2.1.6
-3.6.1
-2.21.0
 surefire-junit47
 true
 8.18
@@ -160,14 +158,6 @@
 
 
   org.apache.maven.plugins
-  maven-javadoc-plugin
-
-
-  org.apache.maven.plugins
-  maven-remote-resources-plugin
-
-
-  org.apache.maven.plugins
   maven-release-plugin
   
 

[hbase] branch branch-1 updated: HBASE-23661 Reduced number of Checkstyle violations in hbase-rest

2020-01-26 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1 by this push:
 new 4a39f0a  HBASE-23661 Reduced number of Checkstyle violations in 
hbase-rest
4a39f0a is described below

commit 4a39f0a2c50e681b2e5b7fce7de2d9d6f8d28805
Author: Jan Hentschel 
AuthorDate: Sun Jan 26 13:38:42 2020 +0100

HBASE-23661 Reduced number of Checkstyle violations in hbase-rest

Signed-off-by: stack 
---
 .../apache/hadoop/hbase/rest/ResultGenerator.java  |  3 +-
 .../hadoop/hbase/rest/RowResultGenerator.java  | 10 +--
 .../apache/hadoop/hbase/rest/client/Response.java  |  8 +--
 .../hbase/rest/filter/GZIPRequestStream.java   |  4 +-
 .../hbase/rest/filter/GZIPResponseStream.java  |  4 +-
 .../hadoop/hbase/rest/filter/GzipFilter.java   | 12 ++--
 .../rest/filter/RestCsrfPreventionFilter.java  | 25 +++-
 .../hadoop/hbase/rest/model/CellSetModel.java  | 30 +
 .../rest/model/StorageClusterStatusModel.java  | 48 ++
 .../hadoop/hbase/rest/model/TableSchemaModel.java  | 73 ++
 10 files changed, 91 insertions(+), 126 deletions(-)

diff --git 
a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/ResultGenerator.java 
b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/ResultGenerator.java
index 989c59e..e4dcb4f 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/ResultGenerator.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/ResultGenerator.java
@@ -16,14 +16,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase.rest;
 
 import java.io.IOException;
 import java.util.Iterator;
 
-import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.Cell;
+import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.filter.Filter;
 import org.apache.hadoop.hbase.rest.model.ScannerModel;
 
diff --git 
a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResultGenerator.java 
b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResultGenerator.java
index d07d81b..1a5c990 100644
--- 
a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResultGenerator.java
+++ 
b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResultGenerator.java
@@ -16,7 +16,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase.rest;
 
 import java.io.IOException;
@@ -25,10 +24,10 @@ import java.util.NoSuchElementException;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.DoNotRetryIOException;
 import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.client.Get;
 import org.apache.hadoop.hbase.client.NeedUnmanagedConnectionException;
 import org.apache.hadoop.hbase.client.Result;
@@ -46,11 +45,10 @@ public class RowResultGenerator extends ResultGenerator {
   public RowResultGenerator(final String tableName, final RowSpec rowspec,
   final Filter filter, final boolean cacheBlocks)
   throws IllegalArgumentException, IOException {
-Table table = RESTServlet.getInstance().getTable(tableName);
-try {
+try (Table table = RESTServlet.getInstance().getTable(tableName)) {
   Get get = new Get(rowspec.getRow());
   if (rowspec.hasColumns()) {
-for (byte[] col: rowspec.getColumns()) {
+for (byte[] col : rowspec.getColumns()) {
   byte[][] split = KeyValue.parseColumn(col);
   if (split.length == 1) {
 get.addFamily(split[0]);
@@ -79,8 +77,6 @@ public class RowResultGenerator extends ResultGenerator {
   // help to avoid confusion by leaving a record of what happened here in
   // the log.
   LOG.warn(StringUtils.stringifyException(e));
-} finally {
-  table.close();
 }
   }
 
diff --git 
a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Response.java 
b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Response.java
index 871b646..2004609 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Response.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Response.java
@@ -16,7 +16,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase.rest.client;
 
 import java.io.InputStream;
@@ -26,7 +25,7 @@ import 
org.apache.hadoop.hbase.classification.InterfaceAudience;
 import

[hbase] branch branch-2.1 updated: HBASE-23686 Revert binary incompatible change in ByteRangeUtils and removed reflections in CommonFSUtils

2020-01-24 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
 new 00555d2  HBASE-23686 Revert binary incompatible change in 
ByteRangeUtils and removed reflections in CommonFSUtils
00555d2 is described below

commit 00555d2fe4bdbdf21a121370aefc8ea48a2c74f0
Author: Jan Hentschel 
AuthorDate: Fri Jan 24 20:28:01 2020 +0100

HBASE-23686 Revert binary incompatible change in ByteRangeUtils and removed 
reflections in CommonFSUtils

Signed-off-by: Sean Busbey 
---
 .../resources/hbase/checkstyle-suppressions.xml|  4 ++
 .../java/org/apache/hadoop/hbase/net/Address.java  |  2 +-
 .../apache/hadoop/hbase/util/ByteRangeUtils.java   |  5 +-
 .../apache/hadoop/hbase/util/CommonFSUtils.java| 67 --
 4 files changed, 16 insertions(+), 62 deletions(-)

diff --git 
a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml 
b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
index b83b468..de5385c 100644
--- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
+++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
@@ -46,4 +46,8 @@
   
   
   
+  
+  
+  
+  
 
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java
index d76ef9f..48fa522 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java
@@ -31,7 +31,7 @@ import 
org.apache.hbase.thirdparty.com.google.common.net.HostAndPort;
  * We cannot have Guava classes in our API hence this Type.
  */
 @InterfaceAudience.Public
-public final class Address implements Comparable {
+public class Address implements Comparable {
   private HostAndPort hostAndPort;
 
   private Address(HostAndPort hostAndPort) {
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java
index fb0b336..9acfa26 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java
@@ -30,10 +30,7 @@ import 
org.apache.hbase.thirdparty.com.google.common.collect.Lists;
  * Utility methods for working with {@link ByteRange}.
  */
 @InterfaceAudience.Public
-public final class ByteRangeUtils {
-  private ByteRangeUtils() {
-  }
-
+public class ByteRangeUtils {
   public static int numEqualPrefixBytes(ByteRange left, ByteRange right, int 
rightInnerOffset) {
 int maxCompares = Math.min(left.getLength(), right.getLength() - 
rightInnerOffset);
 final byte[] lbytes = left.getBytes();
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
index 6a9f73d..2384d14 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
@@ -148,69 +148,22 @@ public abstract class CommonFSUtils {
* Return the number of bytes that large input files should be optimally
* be split into to minimize i/o time.
*
-   * use reflection to search for getDefaultBlockSize(Path f)
-   * if the method doesn't exist, fall back to using getDefaultBlockSize()
-   *
* @param fs filesystem object
* @return the default block size for the path's filesystem
-   * @throws IOException e
*/
-  public static long getDefaultBlockSize(final FileSystem fs, final Path path) 
throws IOException {
-Method m = null;
-Class cls = fs.getClass();
-try {
-  m = cls.getMethod("getDefaultBlockSize", Path.class);
-} catch (NoSuchMethodException e) {
-  LOG.info("FileSystem doesn't support getDefaultBlockSize");
-} catch (SecurityException e) {
-  LOG.info("Doesn't have access to getDefaultBlockSize on FileSystems", e);
-  m = null; // could happen on setAccessible()
-}
-if (m == null) {
-  return fs.getDefaultBlockSize(path);
-} else {
-  try {
-Object ret = m.invoke(fs, path);
-return ((Long)ret).longValue();
-  } catch (Exception e) {
-throw new IOException(e);
-  }
-}
+  public static long getDefaultBlockSize(final FileSystem fs, final Path path) 
{
+return fs.getDefaultBlockSize(path);
   }
 
   /*
* Get the default replication.
*
-   * use reflection to search for getDefaultReplication(Path f)
-   * if the method doesn't exist, fall back to using getDefaultReplication()
-   *
* @param fs filesystem object
* @param f path of file
* @return default replication for the p

[hbase] branch branch-2.2 updated: HBASE-23686 Revert binary incompatible change in ByteRangeUtils and removed reflections in CommonFSUtils

2020-01-24 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
 new e04dee7  HBASE-23686 Revert binary incompatible change in 
ByteRangeUtils and removed reflections in CommonFSUtils
e04dee7 is described below

commit e04dee70e19e45465781cf3b097f96cb64a034ff
Author: Jan Hentschel 
AuthorDate: Fri Jan 24 20:28:01 2020 +0100

HBASE-23686 Revert binary incompatible change in ByteRangeUtils and removed 
reflections in CommonFSUtils

Signed-off-by: Sean Busbey 
---
 .../resources/hbase/checkstyle-suppressions.xml|   4 +
 .../java/org/apache/hadoop/hbase/net/Address.java  |   2 +-
 .../apache/hadoop/hbase/util/ByteRangeUtils.java   |   5 +-
 .../apache/hadoop/hbase/util/CommonFSUtils.java| 152 +
 4 files changed, 43 insertions(+), 120 deletions(-)

diff --git 
a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml 
b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
index b83b468..de5385c 100644
--- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
+++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
@@ -46,4 +46,8 @@
   
   
   
+  
+  
+  
+  
 
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java
index d76ef9f..48fa522 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java
@@ -31,7 +31,7 @@ import 
org.apache.hbase.thirdparty.com.google.common.net.HostAndPort;
  * We cannot have Guava classes in our API hence this Type.
  */
 @InterfaceAudience.Public
-public final class Address implements Comparable {
+public class Address implements Comparable {
   private HostAndPort hostAndPort;
 
   private Address(HostAndPort hostAndPort) {
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java
index fb0b336..9acfa26 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java
@@ -30,10 +30,7 @@ import 
org.apache.hbase.thirdparty.com.google.common.collect.Lists;
  * Utility methods for working with {@link ByteRange}.
  */
 @InterfaceAudience.Public
-public final class ByteRangeUtils {
-  private ByteRangeUtils() {
-  }
-
+public class ByteRangeUtils {
   public static int numEqualPrefixBytes(ByteRange left, ByteRange right, int 
rightInnerOffset) {
 int maxCompares = Math.min(left.getLength(), right.getLength() - 
rightInnerOffset);
 final byte[] lbytes = left.getBytes();
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
index 6a9f73d..7ed2a78 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
@@ -148,69 +148,22 @@ public abstract class CommonFSUtils {
* Return the number of bytes that large input files should be optimally
* be split into to minimize i/o time.
*
-   * use reflection to search for getDefaultBlockSize(Path f)
-   * if the method doesn't exist, fall back to using getDefaultBlockSize()
-   *
* @param fs filesystem object
* @return the default block size for the path's filesystem
-   * @throws IOException e
*/
-  public static long getDefaultBlockSize(final FileSystem fs, final Path path) 
throws IOException {
-Method m = null;
-Class cls = fs.getClass();
-try {
-  m = cls.getMethod("getDefaultBlockSize", Path.class);
-} catch (NoSuchMethodException e) {
-  LOG.info("FileSystem doesn't support getDefaultBlockSize");
-} catch (SecurityException e) {
-  LOG.info("Doesn't have access to getDefaultBlockSize on FileSystems", e);
-  m = null; // could happen on setAccessible()
-}
-if (m == null) {
-  return fs.getDefaultBlockSize(path);
-} else {
-  try {
-Object ret = m.invoke(fs, path);
-return ((Long)ret).longValue();
-  } catch (Exception e) {
-throw new IOException(e);
-  }
-}
+  public static long getDefaultBlockSize(final FileSystem fs, final Path path) 
{
+return fs.getDefaultBlockSize(path);
   }
 
   /*
* Get the default replication.
*
-   * use reflection to search for getDefaultReplication(Path f)
-   * if the method doesn't exist, fall back to using getDefaultReplication()
-   *
* @param fs filesystem object
* @param f path of file
* @return default replication for the p

[hbase] branch branch-2 updated: HBASE-23686 Revert binary incompatible change in ByteRangeUtils and removed reflections in CommonFSUtils

2020-01-24 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new bfa4b0c  HBASE-23686 Revert binary incompatible change in 
ByteRangeUtils and removed reflections in CommonFSUtils
bfa4b0c is described below

commit bfa4b0c4c1aca4e986973ebb548659722625ae44
Author: Jan Hentschel 
AuthorDate: Fri Jan 24 20:28:01 2020 +0100

HBASE-23686 Revert binary incompatible change in ByteRangeUtils and removed 
reflections in CommonFSUtils

Signed-off-by: Sean Busbey 
---
 .../resources/hbase/checkstyle-suppressions.xml|   4 +
 .../java/org/apache/hadoop/hbase/net/Address.java  |   2 +-
 .../apache/hadoop/hbase/util/ByteRangeUtils.java   |   5 +-
 .../apache/hadoop/hbase/util/CommonFSUtils.java| 152 +
 4 files changed, 43 insertions(+), 120 deletions(-)

diff --git 
a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml 
b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
index 0694b35..9351ecb 100644
--- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
+++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
@@ -51,4 +51,8 @@
   
   
   
+  
+  
+  
+  
 
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java
index d76ef9f..48fa522 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java
@@ -31,7 +31,7 @@ import 
org.apache.hbase.thirdparty.com.google.common.net.HostAndPort;
  * We cannot have Guava classes in our API hence this Type.
  */
 @InterfaceAudience.Public
-public final class Address implements Comparable {
+public class Address implements Comparable {
   private HostAndPort hostAndPort;
 
   private Address(HostAndPort hostAndPort) {
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java
index fb0b336..9acfa26 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java
@@ -30,10 +30,7 @@ import 
org.apache.hbase.thirdparty.com.google.common.collect.Lists;
  * Utility methods for working with {@link ByteRange}.
  */
 @InterfaceAudience.Public
-public final class ByteRangeUtils {
-  private ByteRangeUtils() {
-  }
-
+public class ByteRangeUtils {
   public static int numEqualPrefixBytes(ByteRange left, ByteRange right, int 
rightInnerOffset) {
 int maxCompares = Math.min(left.getLength(), right.getLength() - 
rightInnerOffset);
 final byte[] lbytes = left.getBytes();
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
index 9b64e82..a96a799 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
@@ -148,69 +148,22 @@ public abstract class CommonFSUtils {
* Return the number of bytes that large input files should be optimally
* be split into to minimize i/o time.
*
-   * use reflection to search for getDefaultBlockSize(Path f)
-   * if the method doesn't exist, fall back to using getDefaultBlockSize()
-   *
* @param fs filesystem object
* @return the default block size for the path's filesystem
-   * @throws IOException e
*/
-  public static long getDefaultBlockSize(final FileSystem fs, final Path path) 
throws IOException {
-Method m = null;
-Class cls = fs.getClass();
-try {
-  m = cls.getMethod("getDefaultBlockSize", Path.class);
-} catch (NoSuchMethodException e) {
-  LOG.info("FileSystem doesn't support getDefaultBlockSize");
-} catch (SecurityException e) {
-  LOG.info("Doesn't have access to getDefaultBlockSize on FileSystems", e);
-  m = null; // could happen on setAccessible()
-}
-if (m == null) {
-  return fs.getDefaultBlockSize(path);
-} else {
-  try {
-Object ret = m.invoke(fs, path);
-return ((Long)ret).longValue();
-  } catch (Exception e) {
-throw new IOException(e);
-  }
-}
+  public static long getDefaultBlockSize(final FileSystem fs, final Path path) 
{
+return fs.getDefaultBlockSize(path);
   }
 
   /*
* Get the default replication.
*
-   * use reflection to search for getDefaultReplication(Path f)
-   * if the method doesn't exist, fall back to using getDefaultReplication()
-   *
* @param fs filesystem object
* @param f path of file
* @return default replication for the p

[hbase] branch branch-1 updated (c080923 -> 21f2edd)

2020-01-24 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from c080923  HBASE-23710 - Priority configuration for system coprocessor
 add 21f2edd  HBASE-23627 Resolved remaining Checkstyle violations in 
hbase-thrift

No new revisions were added by this update.

Summary of changes:
 .../hadoop/hbase/thrift/IncrementCoalescer.java| 88 +-
 1 file changed, 36 insertions(+), 52 deletions(-)



[hbase] branch branch-1 updated: HBASE-23623 Reduced the number of Checkstyle violations in hbase-rest

2020-01-23 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1 by this push:
 new 02d80b2  HBASE-23623 Reduced the number of Checkstyle violations in 
hbase-rest
02d80b2 is described below

commit 02d80b240bbb3ab244bbfc45b1a37a0202c22598
Author: Jan Hentschel 
AuthorDate: Thu Jan 23 13:03:28 2020 +0100

HBASE-23623 Reduced the number of Checkstyle violations in hbase-rest

Signed-off-by: stack 
---
 .../hadoop/hbase/rest/PerformanceEvaluation.java   | 24 +++-
 .../hadoop/hbase/rest/TestGetAndPutResource.java   | 40 ++---
 .../hbase/rest/TestNamespacesInstanceResource.java | 42 ++---
 .../hadoop/hbase/rest/TestNamespacesResource.java  | 12 ++--
 .../hadoop/hbase/rest/TestScannersWithLabels.java  |  9 ++-
 .../hadoop/hbase/rest/TestSchemaResource.java  | 42 +++--
 .../apache/hadoop/hbase/rest/TestTableScan.java| 64 +---
 .../hbase/rest/client/TestRemoteHTableRetries.java | 25 
 .../hadoop/hbase/rest/client/TestRemoteTable.java  | 69 ++
 .../hadoop/hbase/rest/model/TestScannerModel.java  |  3 -
 .../rest/model/TestStorageClusterStatusModel.java  |  7 +--
 11 files changed, 154 insertions(+), 183 deletions(-)

diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
index 17b1f53..ed142b7 100644
--- 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
+++ 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
@@ -305,10 +305,6 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
   return totalRows;
 }
 
-public int getClients() {
-  return clients;
-}
-
 public boolean isFlushCommits() {
   return flushCommits;
 }
@@ -486,11 +482,11 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 
 @Override
 protected void map(NullWritable key, PeInputSplit value, final Context 
context)
-   throws IOException, InterruptedException {
+throws IOException, InterruptedException {
   Status status = new Status() {
 @Override
 public void setStatus(String msg) {
-   context.setStatus(msg);
+  context.setStatus(msg);
 }
   };
 
@@ -631,7 +627,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 perClientRows, R,
  flushCommits, writeToWAL, useTags, noOfTags, connection, new 
Status() {
@Override
-   public void setStatus(final String msg) throws IOException {
+   public void setStatus(final String msg) {
  LOG.info("client-" + getName() + " " + msg);
}
  });
@@ -781,7 +777,6 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 private int startRow;
 private int perClientRunRows;
 private int totalRows;
-private int numClientThreads;
 private TableName tableName;
 private boolean flushCommits;
 private boolean writeToWAL;
@@ -789,13 +784,12 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 private int noOfTags;
 private Connection connection;
 
-TestOptions(int startRow, int perClientRunRows, int totalRows, int 
numClientThreads,
-TableName tableName, boolean flushCommits, boolean writeToWAL, boolean 
useTags,
+TestOptions(int startRow, int perClientRunRows, int totalRows, TableName 
tableName,
+boolean flushCommits, boolean writeToWAL, boolean useTags,
 int noOfTags, Connection connection) {
   this.startRow = startRow;
   this.perClientRunRows = perClientRunRows;
   this.totalRows = totalRows;
-  this.numClientThreads = numClientThreads;
   this.tableName = tableName;
   this.flushCommits = flushCommits;
   this.writeToWAL = writeToWAL;
@@ -816,10 +810,6 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
   return totalRows;
 }
 
-public int getNumClientThreads() {
-  return numClientThreads;
-}
-
 public TableName getTableName() {
   return tableName;
 }
@@ -1286,7 +1276,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 long totalElapsedTime;
 
 TestOptions options = new TestOptions(startRow, perClientRunRows,
-  totalRows, N, tableName, flushCommits, writeToWAL, useTags, noOfTags, 
connection);
+  totalRows, tableName, flushCommits, writeToWAL, useTags, noOfTags, 
connection);
 final Test t;
 try {
   Constructor constructor = cmd.getDeclaredConstructor(
@@ -1310,7 +1300,7 @@ public class Performan

[hbase-connectors] branch master updated: HBASE-23603 Updated Apache POM to version 22

2020-01-22 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase-connectors.git


The following commit(s) were added to refs/heads/master by this push:
 new 423fa92  HBASE-23603 Updated Apache POM to version 22
423fa92 is described below

commit 423fa92f1b7c201b1b469bc71f146bbb2f547883
Author: Jan Hentschel 
AuthorDate: Thu Jan 23 08:35:42 2020 +0100

HBASE-23603 Updated Apache POM to version 22

Signed-off-by: Peter Somogyi 
---
 kafka/hbase-kafka-model/pom.xml | 4 
 kafka/hbase-kafka-proxy/pom.xml | 4 
 pom.xml | 5 +
 3 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/kafka/hbase-kafka-model/pom.xml b/kafka/hbase-kafka-model/pom.xml
index 6834173..a9dc5fd 100644
--- a/kafka/hbase-kafka-model/pom.xml
+++ b/kafka/hbase-kafka-model/pom.xml
@@ -79,10 +79,6 @@
   
   
 org.apache.maven.plugins
-maven-remote-resources-plugin
-  
-  
-org.apache.maven.plugins
 maven-site-plugin
 
   true
diff --git a/kafka/hbase-kafka-proxy/pom.xml b/kafka/hbase-kafka-proxy/pom.xml
index 04c6877..a4372d4 100755
--- a/kafka/hbase-kafka-proxy/pom.xml
+++ b/kafka/hbase-kafka-proxy/pom.xml
@@ -41,10 +41,6 @@
 
   
 org.apache.maven.plugins
-maven-remote-resources-plugin
-  
-  
-org.apache.maven.plugins
 maven-site-plugin
 
   true
diff --git a/pom.xml b/pom.xml
index 02781a2..1b5f8b7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,7 +36,7 @@
   
 org.apache
 apache
-18
+22
 
 
   
@@ -130,7 +130,6 @@
 ${compileSource}
 3.5.0
 2.2.2
-3.8.1
 1.6.0
 0.5.0
 4.12
@@ -349,7 +348,6 @@
 
   org.apache.maven.plugins
   maven-compiler-plugin
-  ${maven.compiler.version}
   
 ${compileSource}
 ${compileSource}
@@ -367,7 +365,6 @@
 
   org.apache.rat
   apache-rat-plugin
-  0.11
   
 
   target/*



[hbase] branch branch-1 updated: HBASE-23645 Fixed remaining Checkstyle violations in hbase-common tests

2020-01-22 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1 by this push:
 new 9d4ea24  HBASE-23645 Fixed remaining Checkstyle violations in 
hbase-common tests
9d4ea24 is described below

commit 9d4ea24db5041fbf908cdc97c2b5312ffdeef9d9
Author: Jan Hentschel 
AuthorDate: Wed Jan 22 14:46:01 2020 +0100

HBASE-23645 Fixed remaining Checkstyle violations in hbase-common tests

Signed-off-by: stack 
---
 .../resources/hbase/checkstyle-suppressions.xml|   2 +
 .../java/org/apache/hadoop/hbase/TestKeyValue.java | 164 ++---
 .../java/org/apache/hadoop/hbase/TestTimeout.java  |  34 +++--
 .../test/java/org/apache/hadoop/hbase/Waiter.java  |  29 ++--
 .../hadoop/hbase/types/TestCopyOnWriteMaps.java| 114 +++---
 5 files changed, 166 insertions(+), 177 deletions(-)

diff --git 
a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml 
b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
index ec6a90e..a229588 100644
--- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
+++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
@@ -36,6 +36,8 @@
   
   
   
+  
+  
   
   
 
diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java
index 729de12..e7a2165 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java
@@ -25,7 +25,6 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
-import java.io.IOException;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
@@ -49,12 +48,12 @@ import org.junit.experimental.categories.Category;
 public class TestKeyValue extends TestCase {
   private static final Log LOG = LogFactory.getLog(TestKeyValue.class);
 
-  public void testColumnCompare() throws Exception {
-final byte [] a = Bytes.toBytes("aaa");
-byte [] family1 = Bytes.toBytes("abc");
-byte [] qualifier1 = Bytes.toBytes("def");
-byte [] family2 = Bytes.toBytes("abcd");
-byte [] qualifier2 = Bytes.toBytes("ef");
+  public void testColumnCompare() {
+final byte[] a = Bytes.toBytes("aaa");
+byte[] family1 = Bytes.toBytes("abc");
+byte[] qualifier1 = Bytes.toBytes("def");
+byte[] family2 = Bytes.toBytes("abcd");
+byte[] qualifier2 = Bytes.toBytes("ef");
 
 KeyValue aaa = new KeyValue(a, family1, qualifier1, 0L, KeyValue.Type.Put, 
a);
 assertFalse(CellUtil.matchingColumn(aaa, family2, qualifier2));
@@ -62,28 +61,27 @@ public class TestKeyValue extends TestCase {
 aaa = new KeyValue(a, family2, qualifier2, 0L, KeyValue.Type.Put, a);
 assertFalse(CellUtil.matchingColumn(aaa, family1, qualifier1));
 assertTrue(CellUtil.matchingColumn(aaa, family2,qualifier2));
-byte [] nullQualifier = new byte[0];
+byte[] nullQualifier = new byte[0];
 aaa = new KeyValue(a, family1, nullQualifier, 0L, KeyValue.Type.Put, a);
 assertTrue(CellUtil.matchingColumn(aaa, family1,null));
 assertFalse(CellUtil.matchingColumn(aaa, family2,qualifier2));
   }
 
   /**
-   * Test a corner case when the family qualifier is a prefix of the
-   *  column qualifier.
+   * Test a corner case when the family qualifier is a prefix of the column 
qualifier.
*/
-  public void testColumnCompare_prefix() throws Exception {
-final byte [] a = Bytes.toBytes("aaa");
-byte [] family1 = Bytes.toBytes("abc");
-byte [] qualifier1 = Bytes.toBytes("def");
-byte [] family2 = Bytes.toBytes("ab");
-byte [] qualifier2 = Bytes.toBytes("def");
+  public void testColumnCompare_prefix() {
+final byte[] a = Bytes.toBytes("aaa");
+byte[] family1 = Bytes.toBytes("abc");
+byte[] qualifier1 = Bytes.toBytes("def");
+byte[] family2 = Bytes.toBytes("ab");
+byte[] qualifier2 = Bytes.toBytes("def");
 
 KeyValue aaa = new KeyValue(a, family1, qualifier1, 0L, KeyValue.Type.Put, 
a);
 assertFalse(CellUtil.matchingColumn(aaa, family2, qualifier2));
   }
 
-  public void testBasics() throws Exception {
+  public void testBasics() {
 LOG.info("LOWKEY: " + KeyValue.LOWESTKEY.toString());
 check(Bytes.toBytes(getName()),
   Bytes.toBytes(getName()), Bytes.toBytes(getName()), 1,
@@ -108,11 +106,11 @@ public class TestKeyValue extends TestCase {
 LOG.info(kv.toString());
   }
 
-  public void testPlainCompare() throws Exception {
-final byte [] a = B

[hbase] branch branch-1 updated (8bf4985 -> ee50d48)

2020-01-21 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from 8bf4985  HBASE-23254 Release replication buffer quota correctly, when 
batch includes bulk loaded hfiles (#792)
 add ee50d48  HBASE-23625 Reduced number of Checkstyle violations in 
hbase-common

No new revisions were added by this update.

Summary of changes:
 .../java/org/apache/hadoop/hbase/CellScanner.java  |  4 +-
 .../hadoop/hbase/util/AbstractByteRange.java   | 41 +++---
 .../hbase/util/AbstractPositionedByteRange.java| 91 ++
 .../org/apache/hadoop/hbase/util/AtomicUtils.java  |  6 +-
 .../hadoop/hbase/util/DynamicClassLoader.java  | 70 +
 .../apache/hadoop/hbase/util/ExceptionUtil.java| 30 ---
 .../java/org/apache/hadoop/hbase/util/Methods.java | 10 ++-
 .../java/org/apache/hadoop/hbase/util/Sleeper.java | 15 ++--
 .../java/org/apache/hadoop/hbase/util/Strings.java | 16 ++--
 9 files changed, 107 insertions(+), 176 deletions(-)



[hbase] branch branch-2 updated: HBASE-23625 Reduced number of Checkstyle violations in hbase-common

2020-01-20 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new c165699  HBASE-23625 Reduced number of Checkstyle violations in 
hbase-common
c165699 is described below

commit c16569996b101a863e60172a593c403cc6d9488f
Author: Jan Hentschel 
AuthorDate: Mon Jan 20 22:24:01 2020 +0100

HBASE-23625 Reduced number of Checkstyle violations in hbase-common

Signed-off-by: stack 
---
 .../java/org/apache/hadoop/hbase/CellScanner.java  |  3 +-
 .../hadoop/hbase/IndividualBytesFieldCell.java | 54 ++---
 .../hadoop/hbase/util/AbstractByteRange.java   | 41 +++---
 .../hbase/util/AbstractPositionedByteRange.java| 91 ++
 .../org/apache/hadoop/hbase/util/AtomicUtils.java  |  6 +-
 .../hadoop/hbase/util/DynamicClassLoader.java  | 71 +
 .../apache/hadoop/hbase/util/ExceptionUtil.java| 30 ---
 .../java/org/apache/hadoop/hbase/util/Methods.java |  6 +-
 .../java/org/apache/hadoop/hbase/util/Sleeper.java | 12 +--
 .../java/org/apache/hadoop/hbase/util/Strings.java | 14 ++--
 10 files changed, 130 insertions(+), 198 deletions(-)

diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellScanner.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellScanner.java
index 9d0b8d8..3765f6d 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellScanner.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellScanner.java
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase;
 
 import java.io.IOException;
@@ -56,7 +55,7 @@ public interface CellScanner {
   /**
* Advance the scanner 1 cell.
* @return true if the next cell is found and {@link #current()} will return 
a valid Cell
-   * @throws IOException
+   * @throws IOException if advancing the scanner fails
*/
   boolean advance() throws IOException;
 }
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/IndividualBytesFieldCell.java
 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/IndividualBytesFieldCell.java
index e477023..3b48bf4 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/IndividualBytesFieldCell.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/IndividualBytesFieldCell.java
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase;
 
 import org.apache.commons.lang3.ArrayUtils;
@@ -25,12 +24,14 @@ import org.apache.yetus.audience.InterfaceAudience;
 
 @InterfaceAudience.Private
 public class IndividualBytesFieldCell implements ExtendedCell, Cloneable {
-
-  private static final long FIXED_OVERHEAD = ClassSize.align(  // do 
alignment(padding gap)
-ClassSize.OBJECT  // object header
-  + KeyValue.TIMESTAMP_TYPE_SIZE  // timestamp and type
-  + Bytes.SIZEOF_LONG // sequence id
-  + 5 * ClassSize.REFERENCE); // references to all byte arrays: row, 
family, qualifier, value, tags
+  // do alignment(padding gap)
+  private static final long FIXED_OVERHEAD = ClassSize.align(ClassSize.OBJECT 
// object header
+// timestamp and type
++ KeyValue.TIMESTAMP_TYPE_SIZE
+// sequence id
++ Bytes.SIZEOF_LONG
+// references to all byte arrays: row, family, qualifier, value, tags
++ 5 * ClassSize.REFERENCE);
 
   // The following fields are backed by individual byte arrays
   private final byte[] row;
@@ -54,13 +55,13 @@ public class IndividualBytesFieldCell implements 
ExtendedCell, Cloneable {
   private final byte type;  // A byte, rather than 
org.apache.hadoop.hbase.KeyValue.Type
   private long seqId;
 
-  public IndividualBytesFieldCell(byte[] row, byte[] family, byte[] qualifier,
-  long timestamp, KeyValue.Type type,  byte[] 
value) {
+  public IndividualBytesFieldCell(byte[] row, byte[] family, byte[] qualifier, 
long timestamp,
+  KeyValue.Type type,  byte[] value) {
 this(row, family, qualifier, timestamp, type, 0L /* sequence id */, value, 
null /* tags */);
   }
 
-  public IndividualBytesFieldCell(byte[] row, byte[] family, byte[] qualifier,
-  long timestamp, KeyValue.Type type, long 
seqId, byte[] value, byte[] tags) {
+  public IndividualBytesFieldCell(byte[] row, byte[] family, byte[] qualifier, 
long timestamp,
+  KeyValue.Type type, long seqId, byte[] value, byte[] tags) {
 this(row, 0, ArrayUtils.getLength(row),
 family, 0, ArrayUtils.getLength(family),
 qualifier, 0, ArrayUtils.getLength(qualifier),
@@ -69,13 +70,10 @@ public class IndividualBytesFieldCell implements 
ExtendedCell, Cloneable {
 tags

[hbase] branch branch-1 updated: HBASE-23646 Resolved remaining Checkstyle violations in tests of hbase-rest

2020-01-20 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1 by this push:
 new 2e3273f  HBASE-23646 Resolved remaining Checkstyle violations in tests 
of hbase-rest
2e3273f is described below

commit 2e3273f6ea49228a36a2bf1c9416d21cb78dc718
Author: Jan Hentschel 
AuthorDate: Mon Jan 20 22:21:32 2020 +0100

HBASE-23646 Resolved remaining Checkstyle violations in tests of hbase-rest

Signed-off-by: Viraj Jasani 
---
 .../resources/hbase/checkstyle-suppressions.xml|   2 +
 .../hadoop/hbase/rest/HBaseRESTTestingUtility.java |  19 +-
 .../hadoop/hbase/rest/PerformanceEvaluation.java   | 284 +--
 .../apache/hadoop/hbase/rest/RowResourceBase.java  |  98 ++--
 .../hadoop/hbase/rest/TestMultiRowResource.java|  27 +-
 .../hadoop/hbase/rest/TestScannersWithFilters.java | 538 +++--
 6 files changed, 474 insertions(+), 494 deletions(-)

diff --git 
a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml 
b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
index cdd88e0..ec6a90e 100644
--- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
+++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
@@ -36,4 +36,6 @@
   
   
   
+  
+  
 
diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
index 200c519..dd7361a 100644
--- 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
+++ 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
@@ -34,7 +34,6 @@ import org.mortbay.jetty.servlet.ServletHolder;
 import com.sun.jersey.spi.container.servlet.ServletContainer;
 
 public class HBaseRESTTestingUtility {
-
   private static final Log LOG = 
LogFactory.getLog(HBaseRESTTestingUtility.class);
 
   private int testServletPort;
@@ -62,7 +61,7 @@ public class HBaseRESTTestingUtility {
   "jetty");
 
 LOG.info("configured " + ServletContainer.class.getName());
-
+
 // set up Jetty and run the embedded server
 server = new Server(0);
 server.setSendServerVersion(false);
@@ -86,17 +85,19 @@ public class HBaseRESTTestingUtility {
   // get the port
 testServletPort = server.getConnectors()[0].getLocalPort();
 
-LOG.info("started " + server.getClass().getName() + " on port " + 
+LOG.info("started " + server.getClass().getName() + " on port " +
   testServletPort);
   }
 
   public void shutdownServletContainer() {
-if (server != null) try {
-  server.stop();
-  server = null;
-  RESTServlet.stop();
-} catch (Exception e) {
-  LOG.warn(StringUtils.stringifyException(e));
+if (server != null) {
+  try {
+server.stop();
+server = null;
+RESTServlet.stop();
+  } catch (Exception e) {
+LOG.warn(StringUtils.stringifyException(e));
+  }
 }
   }
 }
diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
index 9a3ec248..17b1f53 100644
--- 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
+++ 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
@@ -18,6 +18,22 @@
  */
 package org.apache.hadoop.hbase.rest;
 
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.lang.reflect.Constructor;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+import java.util.TreeMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
@@ -59,6 +75,7 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.Hash;
 import org.apache.hadoop.hbase.util.MurmurHash;
 import org.apache.hadoop.hbase.util.Pair;
+
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.NullWritable;
 import org.apache.hadoop.io.Text;
@@ -76,22 +93,6 @@ import org.apache.hadoop.util.LineReader;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
 
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.lang.reflect.Constructor;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.Li

[hbase] branch branch-2 updated: HBASE-23661 Reduced number of Checkstyle violations in hbase-rest

2020-01-19 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new f6a2238  HBASE-23661 Reduced number of Checkstyle violations in 
hbase-rest
f6a2238 is described below

commit f6a2238889626f64f7b8dc10215fbae7474d20b0
Author: Jan Hentschel 
AuthorDate: Sun Jan 19 18:17:14 2020 +0100

HBASE-23661 Reduced number of Checkstyle violations in hbase-rest

Signed-off-by: Viraj Jasani 
---
 .../apache/hadoop/hbase/rest/ResultGenerator.java  |  4 +-
 .../hadoop/hbase/rest/RowResultGenerator.java  | 13 +++---
 .../apache/hadoop/hbase/rest/client/Response.java  | 13 +++---
 .../hbase/rest/filter/GZIPRequestStream.java   |  4 +-
 .../hbase/rest/filter/GZIPResponseStream.java  |  4 +-
 .../hadoop/hbase/rest/filter/GzipFilter.java   | 11 +++--
 .../rest/filter/RestCsrfPreventionFilter.java  | 20 -
 .../hadoop/hbase/rest/model/CellSetModel.java  | 15 ---
 .../rest/model/StorageClusterStatusModel.java  | 48 +-
 .../hadoop/hbase/rest/model/TableSchemaModel.java  | 43 +--
 10 files changed, 77 insertions(+), 98 deletions(-)

diff --git 
a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/ResultGenerator.java 
b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/ResultGenerator.java
index 8e48da8..41135a8 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/ResultGenerator.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/ResultGenerator.java
@@ -16,17 +16,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase.rest;
 
 import java.io.IOException;
 import java.util.Iterator;
 
-import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.filter.Filter;
 import org.apache.hadoop.hbase.rest.model.ScannerModel;
 
+import org.apache.yetus.audience.InterfaceAudience;
+
 @InterfaceAudience.Private
 public abstract class ResultGenerator implements Iterator {
 
diff --git 
a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResultGenerator.java 
b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResultGenerator.java
index 9bc3ec3..f3d48fd 100644
--- 
a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResultGenerator.java
+++ 
b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResultGenerator.java
@@ -16,7 +16,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase.rest;
 
 import java.io.IOException;
@@ -26,13 +25,16 @@ import java.util.NoSuchElementException;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.DoNotRetryIOException;
-import org.apache.hadoop.hbase.security.AccessDeniedException;
 import org.apache.hadoop.hbase.client.Get;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Table;
 import org.apache.hadoop.hbase.filter.Filter;
+import org.apache.hadoop.hbase.security.AccessDeniedException;
+
 import org.apache.hadoop.util.StringUtils;
+
 import org.apache.yetus.audience.InterfaceAudience;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -46,11 +48,10 @@ public class RowResultGenerator extends ResultGenerator {
   public RowResultGenerator(final String tableName, final RowSpec rowspec,
   final Filter filter, final boolean cacheBlocks)
   throws IllegalArgumentException, IOException {
-Table table = RESTServlet.getInstance().getTable(tableName);
-try {
+try (Table table = RESTServlet.getInstance().getTable(tableName)) {
   Get get = new Get(rowspec.getRow());
   if (rowspec.hasColumns()) {
-for (byte[] col: rowspec.getColumns()) {
+for (byte[] col : rowspec.getColumns()) {
   byte[][] split = CellUtil.parseColumn(col);
   if (split.length == 1) {
 get.addFamily(split[0]);
@@ -83,8 +84,6 @@ public class RowResultGenerator extends ResultGenerator {
   if (e instanceof AccessDeniedException) {
 throw e;
   }
-} finally {
-  table.close();
 }
   }
 
diff --git 
a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Response.java 
b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Response.java
index 518e9bb..0e91005 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Response.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Response.java
@@ -16,17 +16,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase.rest.client;
 
 import java.io.IOException;
 import

[hbase] branch master updated: HBASE-23686 Revert binary incompatible change in ByteRangeUtils and removed reflections in CommonFSUtils

2020-01-19 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new 50e2644  HBASE-23686 Revert binary incompatible change in 
ByteRangeUtils and removed reflections in CommonFSUtils
50e2644 is described below

commit 50e264485d0f98aeb1bd0058ad3ed9d217840b7f
Author: Jan Hentschel 
AuthorDate: Sun Jan 19 18:06:31 2020 +0100

HBASE-23686 Revert binary incompatible change in ByteRangeUtils and removed 
reflections in CommonFSUtils

Signed-off-by: Sean Busbey 
---
 .../resources/hbase/checkstyle-suppressions.xml|   4 +
 .../java/org/apache/hadoop/hbase/net/Address.java  |   2 +-
 .../apache/hadoop/hbase/util/ByteRangeUtils.java   |   5 +-
 .../apache/hadoop/hbase/util/CommonFSUtils.java| 152 +
 4 files changed, 43 insertions(+), 120 deletions(-)

diff --git 
a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml 
b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
index 0694b35..9351ecb 100644
--- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
+++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
@@ -51,4 +51,8 @@
   
   
   
+  
+  
+  
+  
 
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java
index d76ef9f..48fa522 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java
@@ -31,7 +31,7 @@ import 
org.apache.hbase.thirdparty.com.google.common.net.HostAndPort;
  * We cannot have Guava classes in our API hence this Type.
  */
 @InterfaceAudience.Public
-public final class Address implements Comparable {
+public class Address implements Comparable {
   private HostAndPort hostAndPort;
 
   private Address(HostAndPort hostAndPort) {
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java
index fb0b336..9acfa26 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java
@@ -30,10 +30,7 @@ import 
org.apache.hbase.thirdparty.com.google.common.collect.Lists;
  * Utility methods for working with {@link ByteRange}.
  */
 @InterfaceAudience.Public
-public final class ByteRangeUtils {
-  private ByteRangeUtils() {
-  }
-
+public class ByteRangeUtils {
   public static int numEqualPrefixBytes(ByteRange left, ByteRange right, int 
rightInnerOffset) {
 int maxCompares = Math.min(left.getLength(), right.getLength() - 
rightInnerOffset);
 final byte[] lbytes = left.getBytes();
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
index 89ad897..ea0cb2b 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
@@ -149,69 +149,22 @@ public abstract class CommonFSUtils {
* Return the number of bytes that large input files should be optimally
* be split into to minimize i/o time.
*
-   * use reflection to search for getDefaultBlockSize(Path f)
-   * if the method doesn't exist, fall back to using getDefaultBlockSize()
-   *
* @param fs filesystem object
* @return the default block size for the path's filesystem
-   * @throws IOException e
*/
-  public static long getDefaultBlockSize(final FileSystem fs, final Path path) 
throws IOException {
-Method m = null;
-Class cls = fs.getClass();
-try {
-  m = cls.getMethod("getDefaultBlockSize", Path.class);
-} catch (NoSuchMethodException e) {
-  LOG.info("FileSystem doesn't support getDefaultBlockSize");
-} catch (SecurityException e) {
-  LOG.info("Doesn't have access to getDefaultBlockSize on FileSystems", e);
-  m = null; // could happen on setAccessible()
-}
-if (m == null) {
-  return fs.getDefaultBlockSize(path);
-} else {
-  try {
-Object ret = m.invoke(fs, path);
-return ((Long)ret).longValue();
-  } catch (Exception e) {
-throw new IOException(e);
-  }
-}
+  public static long getDefaultBlockSize(final FileSystem fs, final Path path) 
{
+return fs.getDefaultBlockSize(path);
   }
 
   /*
* Get the default replication.
*
-   * use reflection to search for getDefaultReplication(Path f)
-   * if the method doesn't exist, fall back to using getDefaultReplication()
-   *
* @param fs filesystem object
* @param f path of file
* @return default replication for the p

[hbase] branch branch-1 updated: HBASE-23622 Reduced the number of Checkstyle violations in hbase-common

2020-01-19 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1 by this push:
 new 99a59cf  HBASE-23622 Reduced the number of Checkstyle violations in 
hbase-common
99a59cf is described below

commit 99a59cf9e7122d5dd25cd464cea5ac4f6c96cdb0
Author: Jan Hentschel 
AuthorDate: Sun Jan 19 18:02:08 2020 +0100

HBASE-23622 Reduced the number of Checkstyle violations in hbase-common

Signed-off-by: Sean Busbey 
---
 .../resources/hbase/checkstyle-suppressions.xml|   2 +
 .../org/apache/hadoop/hbase/CellComparator.java|   2 +-
 .../java/org/apache/hadoop/hbase/net/Address.java  |   7 +-
 .../hadoop/hbase/trace/SpanReceiverHost.java   |  10 +-
 .../apache/hadoop/hbase/util/ByteRangeUtils.java   |  17 +-
 .../apache/hadoop/hbase/util/CommonFSUtils.java| 178 +
 .../hadoop/hbase/util/ConcatenatedLists.java   |   5 +-
 .../java/org/apache/hadoop/hbase/util/Order.java   |  41 +++--
 8 files changed, 96 insertions(+), 166 deletions(-)

diff --git 
a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml 
b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
index 72358ab..cdd88e0 100644
--- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
+++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
@@ -34,4 +34,6 @@
   
   
   
+  
+  
 
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java
index d8fcfe4..a2c6bdc 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java
@@ -55,7 +55,7 @@ public class CellComparator implements Comparator, 
Serializable {
* @param a
* @param b
* @param ignoreSequenceid True if we are to compare the key portion only 
and ignore
-   * the sequenceid. Set to false to compare key and consider sequenceid.
+   *the sequenceid. Set to false to compare key and consider sequenceid.
* @return 0 if equal, -1 if a  b, and +1 if a  b.
*/
   public static int compare(final Cell a, final Cell b, boolean 
ignoreSequenceid) {
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java
index 15b4960..e6ee60b 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/net/Address.java
@@ -26,7 +26,7 @@ import com.google.common.net.HostAndPort;
  * An immutable type to hold a hostname and port combo, like an Endpoint
  * or java.net.InetSocketAddress (but without danger of our calling
  * resolve -- we do NOT want a resolve happening every time we want
- * to hold a hostname and port combo). This class is also <>.
+ * to hold a hostname and port combo). This class is also {@link Comparable}
  * In implementation this class is a facade over Guava's {@link 
HostAndPort}.
  * We cannot have Guava classes in our API hence this Type.
  */
@@ -83,7 +83,10 @@ public class Address implements Comparable {
   @Override
   public int compareTo(Address that) {
 int compare = this.getHostname().compareTo(that.getHostname());
-if (compare != 0) return compare;
+if (compare != 0) {
+  return compare;
+}
+
 return this.getPort() - that.getPort();
   }
 }
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/trace/SpanReceiverHost.java
 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/trace/SpanReceiverHost.java
index 4818efc..63241c0 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/trace/SpanReceiverHost.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/trace/SpanReceiverHost.java
@@ -43,7 +43,7 @@ public class SpanReceiverHost {
   private boolean closed = false;
 
   @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="SE_BAD_FIELD")
-  private static enum SingletonHolder {
+  private enum SingletonHolder {
 INSTANCE;
 final Object lock = new Object();
 SpanReceiverHost host = null; // FindBugs: SE_BAD_FIELD
@@ -64,14 +64,13 @@ public class SpanReceiverHost {
   }
 
   SpanReceiverHost(Configuration conf) {
-receivers = new HashSet();
+receivers = new HashSet<>();
 this.conf = conf;
   }
 
   /**
* Reads the names of classes specified in the {@code 
hbase.trace.spanreceiver.classes} property
* and instantiates and registers them with the Tracer.
-   *
*/
   public void loadSpanReceivers() {
 String[] receiverNames = conf.getStrings(SPAN_RECEIVERS_CONF_KEY);
@@ -98,7 +97,10 @@ public class SpanReceiverHost {
* Calls close() on all SpanReceivers created by this SpanReceiverHost.
*/
   pu

[hbase] branch master updated (167892c -> 75b8501)

2020-01-18 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from 167892c  HBASE-23680 RegionProcedureStore missing cleaning of hfile 
archive (#1022)
 add 75b8501  HBASE-23661 Reduced number of Checkstyle violations in 
hbase-rest

No new revisions were added by this update.

Summary of changes:
 .../apache/hadoop/hbase/rest/ResultGenerator.java  |  4 +-
 .../hadoop/hbase/rest/RowResultGenerator.java  | 13 +++---
 .../apache/hadoop/hbase/rest/client/Response.java  | 13 +++---
 .../hbase/rest/filter/GZIPRequestStream.java   |  4 +-
 .../hbase/rest/filter/GZIPResponseStream.java  |  4 +-
 .../hadoop/hbase/rest/filter/GzipFilter.java   | 11 +++--
 .../rest/filter/RestCsrfPreventionFilter.java  | 20 -
 .../hadoop/hbase/rest/model/CellSetModel.java  | 15 ---
 .../rest/model/StorageClusterStatusModel.java  | 48 +
 .../hadoop/hbase/rest/model/TableSchemaModel.java  | 49 ++
 10 files changed, 80 insertions(+), 101 deletions(-)



[hbase] branch master updated (167892c -> 75b8501)

2020-01-18 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from 167892c  HBASE-23680 RegionProcedureStore missing cleaning of hfile 
archive (#1022)
 add 75b8501  HBASE-23661 Reduced number of Checkstyle violations in 
hbase-rest

No new revisions were added by this update.

Summary of changes:
 .../apache/hadoop/hbase/rest/ResultGenerator.java  |  4 +-
 .../hadoop/hbase/rest/RowResultGenerator.java  | 13 +++---
 .../apache/hadoop/hbase/rest/client/Response.java  | 13 +++---
 .../hbase/rest/filter/GZIPRequestStream.java   |  4 +-
 .../hbase/rest/filter/GZIPResponseStream.java  |  4 +-
 .../hadoop/hbase/rest/filter/GzipFilter.java   | 11 +++--
 .../rest/filter/RestCsrfPreventionFilter.java  | 20 -
 .../hadoop/hbase/rest/model/CellSetModel.java  | 15 ---
 .../rest/model/StorageClusterStatusModel.java  | 48 +
 .../hadoop/hbase/rest/model/TableSchemaModel.java  | 49 ++
 10 files changed, 80 insertions(+), 101 deletions(-)



[hbase] branch branch-1 updated: HBASE-23626 Reduced number of Checkstyle violations in tests in hbase-common

2020-01-18 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1 by this push:
 new dc602d7  HBASE-23626 Reduced number of Checkstyle violations in tests 
in hbase-common
dc602d7 is described below

commit dc602d7d5d29e9a2c5483177943ce5a013a2d655
Author: Jan Hentschel 
AuthorDate: Sat Jan 18 20:32:51 2020 +0100

HBASE-23626 Reduced number of Checkstyle violations in tests in hbase-common

Signed-off-by: stack 
---
 .../org/apache/hadoop/hbase/types/TestStruct.java  | 141 ++-
 .../org/apache/hadoop/hbase/types/TestUnion2.java  |  33 +--
 .../hadoop/hbase/util/ClassLoaderTestHelper.java   |  40 +--
 .../util/EnvironmentEdgeManagerTestHelper.java |   5 +-
 .../org/apache/hadoop/hbase/util/TestBytes.java| 267 ++---
 .../hbase/util/TestCoprocessorClassLoader.java |  25 +-
 .../apache/hadoop/hbase/util/TestOrderedBytes.java | 194 ---
 .../util/TestSimplePositionedMutableByteRange.java |  12 +-
 .../hbase/util/TimeOffsetEnvironmentEdge.java  |  15 +-
 9 files changed, 376 insertions(+), 356 deletions(-)

diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java
index 09ba655..f1e469a 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java
@@ -45,7 +45,6 @@ import org.junit.runners.Parameterized.Parameters;
 @RunWith(Parameterized.class)
 @Category(SmallTests.class)
 public class TestStruct {
-
   private Struct generic;
   @SuppressWarnings("rawtypes")
   private DataType specialized;
@@ -61,12 +60,12 @@ public class TestStruct {
   @Parameters
   public static Collection params() {
 Object[][] pojo1Args = {
-new Object[] { "foo", 5,   10.001 },
-new Object[] { "foo", 100, 7.0},
-new Object[] { "foo", 100, 10.001 },
-new Object[] { "bar", 5,   10.001 },
-new Object[] { "bar", 100, 10.001 },
-new Object[] { "baz", 5,   10.001 },
+  new Object[] { "foo", 5,   10.001 },
+  new Object[] { "foo", 100, 7.0},
+  new Object[] { "foo", 100, 10.001 },
+  new Object[] { "bar", 5,   10.001 },
+  new Object[] { "bar", 100, 10.001 },
+  new Object[] { "baz", 5,   10.001 },
 };
 
 Object[][] pojo2Args = {
@@ -78,22 +77,27 @@ public class TestStruct {
 };
 
 Object[][] params = new Object[][] {
-{ SpecializedPojo1Type1.GENERIC, new SpecializedPojo1Type1(), 
pojo1Args },
-{ SpecializedPojo2Type1.GENERIC, new SpecializedPojo2Type1(), 
pojo2Args },
+{ SpecializedPojo1Type1.getGeneric(), new SpecializedPojo1Type1(), 
pojo1Args },
+{ SpecializedPojo2Type1.getGeneric(), new SpecializedPojo2Type1(), 
pojo2Args },
 };
 return Arrays.asList(params);
   }
 
-  static final Comparator NULL_SAFE_BYTES_COMPARATOR =
-  new Comparator() {
-@Override
-public int compare(byte[] o1, byte[] o2) {
-  if (o1 == o2) return 0;
-  if (null == o1) return -1;
-  if (null == o2) return 1;
-  return Bytes.compareTo(o1, o2);
-}
-  };
+  static final Comparator NULL_SAFE_BYTES_COMPARATOR = new 
Comparator() {
+@Override
+public int compare(byte[] o1, byte[] o2) {
+  if (o1 == o2) {
+return 0;
+  }
+  if (null == o1) {
+return -1;
+  }
+  if (null == o2) {
+return 1;
+  }
+  return Bytes.compareTo(o1, o2);
+}
+  };
 
   /**
* A simple object to serialize.
@@ -161,20 +165,18 @@ public class TestStruct {
 return false;
   }
   Pojo1 other = (Pojo1) obj;
-  if (Double.doubleToLongBits(doubleFieldAsc) != 
Double.doubleToLongBits(other.doubleFieldAsc)) {
+  if (Double.doubleToLongBits(doubleFieldAsc) !=
+  Double.doubleToLongBits(other.doubleFieldAsc)) {
 return false;
   }
   if (intFieldAsc != other.intFieldAsc) {
 return false;
   }
   if (stringFieldAsc == null) {
-if (other.stringFieldAsc != null) {
-  return false;
-}
-  } else if (!stringFieldAsc.equals(other.stringFieldAsc)) {
-return false;
+return other.stringFieldAsc == null;
+  } else {
+return stringFieldAsc.equals(other.stringFieldAsc);
   }
-  return true;
 }
   }
 
@@ -220,16 +222,17 @@ public class TestStruct {
   if (cmp != 0) {
 return cmp;
   }
+
   if (null == stringFieldDsc) {
 cmp = 1;
-  }
-  else if (null == o.stringFieldDsc) {
+  } else if (null == o.stringFieldDsc) {
 cmp 

[hbase] branch branch-2.1 updated: HBASE-23646 Resolved remaining Checkstyle violations in tests of hbase-rest

2020-01-11 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
 new b6685a1  HBASE-23646 Resolved remaining Checkstyle violations in tests 
of hbase-rest
b6685a1 is described below

commit b6685a1a4a5b1558b4a7629fa90548f671f76159
Author: Jan Hentschel 
AuthorDate: Sat Jan 11 21:09:14 2020 +0100

HBASE-23646 Resolved remaining Checkstyle violations in tests of hbase-rest

Signed-off-by: Viraj Jasani 
---
 .../resources/hbase/checkstyle-suppressions.xml|   2 +
 .../hadoop/hbase/rest/HBaseRESTTestingUtility.java |  15 +-
 .../hadoop/hbase/rest/PerformanceEvaluation.java   |  68 ++--
 .../apache/hadoop/hbase/rest/RowResourceBase.java  | 101 ++---
 .../hadoop/hbase/rest/TestMultiRowResource.java|  31 +-
 .../hadoop/hbase/rest/TestScannersWithFilters.java | 415 +++--
 6 files changed, 315 insertions(+), 317 deletions(-)

diff --git 
a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml 
b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
index a5ddb1a..b83b468 100644
--- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
+++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
@@ -44,4 +44,6 @@
   
   
   
+  
+  
 
diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
index ffa1835..00b28c7 100644
--- 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
+++ 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
@@ -25,7 +25,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class HBaseRESTTestingUtility {
-
   private static final Logger LOG = 
LoggerFactory.getLogger(HBaseRESTTestingUtility.class);
 
   private RESTServer server;
@@ -52,12 +51,14 @@ public class HBaseRESTTestingUtility {
   }
 
   public void shutdownServletContainer() {
-if (server != null) try {
-  server.stop();
-  server = null;
-  RESTServlet.stop();
-} catch (Exception e) {
-  LOG.warn(StringUtils.stringifyException(e));
+if (server != null) {
+  try {
+server.stop();
+server = null;
+RESTServlet.stop();
+  } catch (Exception e) {
+LOG.warn(StringUtils.stringifyException(e));
+  }
 }
   }
 }
diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
index 0d433f2..c3f9c7c 100644
--- 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
+++ 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
@@ -75,6 +75,7 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.Hash;
 import org.apache.hadoop.hbase.util.MurmurHash;
 import org.apache.hadoop.hbase.util.Pair;
+
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.NullWritable;
 import org.apache.hadoop.io.Text;
@@ -91,6 +92,7 @@ import org.apache.hadoop.mapreduce.lib.reduce.LongSumReducer;
 import org.apache.hadoop.util.LineReader;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -204,8 +206,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 
   protected void addCommandDescriptor(Class cmdClass,
   String name, String description) {
-CmdDescriptor cmdDescriptor =
-  new CmdDescriptor(cmdClass, name, description);
+CmdDescriptor cmdDescriptor = new CmdDescriptor(cmdClass, name, 
description);
 commands.put(name, cmdDescriptor);
   }
 
@@ -335,7 +336,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
   // generate splits
   List splitList = new ArrayList<>();
 
-  for (FileStatus file: listStatus(job)) {
+  for (FileStatus file : listStatus(job)) {
 if (file.isDirectory()) {
   continue;
 }
@@ -344,10 +345,10 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 FSDataInputStream fileIn = fs.open(path);
 LineReader in = new LineReader(fileIn, job.getConfiguration());
 int lineLen;
-while(true) {
+while (true) {
   Text lineText = new Text();
   lineLen = in.readLine(lineText);
-  if(lineLen <= 0) {
+  if (lineLen <= 0) {
 break;
   }
   Matcher m = LINE_PATTERN.matcher(lineText.toString());
@@ -406,7 +407,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 
   @Override
   public boolean 

[hbase] branch branch-2.2 updated: HBASE-23646 Resolved remaining Checkstyle violations in tests of hbase-rest

2020-01-11 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
 new 56b08ee  HBASE-23646 Resolved remaining Checkstyle violations in tests 
of hbase-rest
56b08ee is described below

commit 56b08eee0d73d239eb8e6d2badfdcea06ef2cc07
Author: Jan Hentschel 
AuthorDate: Sat Jan 11 21:09:14 2020 +0100

HBASE-23646 Resolved remaining Checkstyle violations in tests of hbase-rest

Signed-off-by: Viraj Jasani 
---
 .../resources/hbase/checkstyle-suppressions.xml|   2 +
 .../hadoop/hbase/rest/HBaseRESTTestingUtility.java |  15 +-
 .../hadoop/hbase/rest/PerformanceEvaluation.java   |  68 ++--
 .../apache/hadoop/hbase/rest/RowResourceBase.java  | 101 ++---
 .../hadoop/hbase/rest/TestMultiRowResource.java|  31 +-
 .../hadoop/hbase/rest/TestScannersWithFilters.java | 415 +++--
 6 files changed, 315 insertions(+), 317 deletions(-)

diff --git 
a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml 
b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
index a5ddb1a..b83b468 100644
--- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
+++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
@@ -44,4 +44,6 @@
   
   
   
+  
+  
 
diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
index ffa1835..00b28c7 100644
--- 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
+++ 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
@@ -25,7 +25,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class HBaseRESTTestingUtility {
-
   private static final Logger LOG = 
LoggerFactory.getLogger(HBaseRESTTestingUtility.class);
 
   private RESTServer server;
@@ -52,12 +51,14 @@ public class HBaseRESTTestingUtility {
   }
 
   public void shutdownServletContainer() {
-if (server != null) try {
-  server.stop();
-  server = null;
-  RESTServlet.stop();
-} catch (Exception e) {
-  LOG.warn(StringUtils.stringifyException(e));
+if (server != null) {
+  try {
+server.stop();
+server = null;
+RESTServlet.stop();
+  } catch (Exception e) {
+LOG.warn(StringUtils.stringifyException(e));
+  }
 }
   }
 }
diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
index 0d433f2..c3f9c7c 100644
--- 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
+++ 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
@@ -75,6 +75,7 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.Hash;
 import org.apache.hadoop.hbase.util.MurmurHash;
 import org.apache.hadoop.hbase.util.Pair;
+
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.NullWritable;
 import org.apache.hadoop.io.Text;
@@ -91,6 +92,7 @@ import org.apache.hadoop.mapreduce.lib.reduce.LongSumReducer;
 import org.apache.hadoop.util.LineReader;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -204,8 +206,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 
   protected void addCommandDescriptor(Class cmdClass,
   String name, String description) {
-CmdDescriptor cmdDescriptor =
-  new CmdDescriptor(cmdClass, name, description);
+CmdDescriptor cmdDescriptor = new CmdDescriptor(cmdClass, name, 
description);
 commands.put(name, cmdDescriptor);
   }
 
@@ -335,7 +336,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
   // generate splits
   List splitList = new ArrayList<>();
 
-  for (FileStatus file: listStatus(job)) {
+  for (FileStatus file : listStatus(job)) {
 if (file.isDirectory()) {
   continue;
 }
@@ -344,10 +345,10 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 FSDataInputStream fileIn = fs.open(path);
 LineReader in = new LineReader(fileIn, job.getConfiguration());
 int lineLen;
-while(true) {
+while (true) {
   Text lineText = new Text();
   lineLen = in.readLine(lineText);
-  if(lineLen <= 0) {
+  if (lineLen <= 0) {
 break;
   }
   Matcher m = LINE_PATTERN.matcher(lineText.toString());
@@ -406,7 +407,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 
   @Override
   public boolean 

[hbase] branch branch-2 updated: HBASE-23646 Resolved remaining Checkstyle violations in tests of hbase-rest

2020-01-11 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new 954b602  HBASE-23646 Resolved remaining Checkstyle violations in tests 
of hbase-rest
954b602 is described below

commit 954b602a59b376bd51b082bec2f9ed5e4c2ef622
Author: Jan Hentschel 
AuthorDate: Sat Jan 11 21:09:14 2020 +0100

HBASE-23646 Resolved remaining Checkstyle violations in tests of hbase-rest

Signed-off-by: Viraj Jasani 
---
 .../resources/hbase/checkstyle-suppressions.xml|   2 +
 .../hadoop/hbase/rest/HBaseRESTTestingUtility.java |  15 +-
 .../hadoop/hbase/rest/PerformanceEvaluation.java   |  68 ++--
 .../apache/hadoop/hbase/rest/RowResourceBase.java  | 101 ++---
 .../hadoop/hbase/rest/TestMultiRowResource.java|  31 +-
 .../hadoop/hbase/rest/TestScannersWithFilters.java | 415 +++--
 6 files changed, 315 insertions(+), 317 deletions(-)

diff --git 
a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml 
b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
index 8186375..0694b35 100644
--- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
+++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
@@ -49,4 +49,6 @@
   
   
   
+  
+  
 
diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
index ffa1835..00b28c7 100644
--- 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
+++ 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
@@ -25,7 +25,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class HBaseRESTTestingUtility {
-
   private static final Logger LOG = 
LoggerFactory.getLogger(HBaseRESTTestingUtility.class);
 
   private RESTServer server;
@@ -52,12 +51,14 @@ public class HBaseRESTTestingUtility {
   }
 
   public void shutdownServletContainer() {
-if (server != null) try {
-  server.stop();
-  server = null;
-  RESTServlet.stop();
-} catch (Exception e) {
-  LOG.warn(StringUtils.stringifyException(e));
+if (server != null) {
+  try {
+server.stop();
+server = null;
+RESTServlet.stop();
+  } catch (Exception e) {
+LOG.warn(StringUtils.stringifyException(e));
+  }
 }
   }
 }
diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
index 0d433f2..c3f9c7c 100644
--- 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
+++ 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
@@ -75,6 +75,7 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.Hash;
 import org.apache.hadoop.hbase.util.MurmurHash;
 import org.apache.hadoop.hbase.util.Pair;
+
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.NullWritable;
 import org.apache.hadoop.io.Text;
@@ -91,6 +92,7 @@ import org.apache.hadoop.mapreduce.lib.reduce.LongSumReducer;
 import org.apache.hadoop.util.LineReader;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -204,8 +206,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 
   protected void addCommandDescriptor(Class cmdClass,
   String name, String description) {
-CmdDescriptor cmdDescriptor =
-  new CmdDescriptor(cmdClass, name, description);
+CmdDescriptor cmdDescriptor = new CmdDescriptor(cmdClass, name, 
description);
 commands.put(name, cmdDescriptor);
   }
 
@@ -335,7 +336,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
   // generate splits
   List splitList = new ArrayList<>();
 
-  for (FileStatus file: listStatus(job)) {
+  for (FileStatus file : listStatus(job)) {
 if (file.isDirectory()) {
   continue;
 }
@@ -344,10 +345,10 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 FSDataInputStream fileIn = fs.open(path);
 LineReader in = new LineReader(fileIn, job.getConfiguration());
 int lineLen;
-while(true) {
+while (true) {
   Text lineText = new Text();
   lineLen = in.readLine(lineText);
-  if(lineLen <= 0) {
+  if (lineLen <= 0) {
 break;
   }
   Matcher m = LINE_PATTERN.matcher(lineText.toString());
@@ -406,7 +407,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 
   @Override
   public boolean 

[hbase] branch master updated: HBASE-23646 Resolved remaining Checkstyle violations in tests of hbase-rest

2020-01-11 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new 0a9e1f8  HBASE-23646 Resolved remaining Checkstyle violations in tests 
of hbase-rest
0a9e1f8 is described below

commit 0a9e1f807de0de5ad79708556f36826aa3f1fd05
Author: Jan Hentschel 
AuthorDate: Sat Jan 11 21:09:14 2020 +0100

HBASE-23646 Resolved remaining Checkstyle violations in tests of hbase-rest

Signed-off-by: Viraj Jasani 
---
 .../resources/hbase/checkstyle-suppressions.xml|   2 +
 .../hadoop/hbase/rest/HBaseRESTTestingUtility.java |  15 +-
 .../hadoop/hbase/rest/PerformanceEvaluation.java   |  68 ++--
 .../apache/hadoop/hbase/rest/RowResourceBase.java  | 101 ++---
 .../hadoop/hbase/rest/TestMultiRowResource.java|  31 +-
 .../hadoop/hbase/rest/TestScannersWithFilters.java | 415 +++--
 6 files changed, 315 insertions(+), 317 deletions(-)

diff --git 
a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml 
b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
index 8186375..0694b35 100644
--- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
+++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
@@ -49,4 +49,6 @@
   
   
   
+  
+  
 
diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
index ffa1835..00b28c7 100644
--- 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
+++ 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
@@ -25,7 +25,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class HBaseRESTTestingUtility {
-
   private static final Logger LOG = 
LoggerFactory.getLogger(HBaseRESTTestingUtility.class);
 
   private RESTServer server;
@@ -52,12 +51,14 @@ public class HBaseRESTTestingUtility {
   }
 
   public void shutdownServletContainer() {
-if (server != null) try {
-  server.stop();
-  server = null;
-  RESTServlet.stop();
-} catch (Exception e) {
-  LOG.warn(StringUtils.stringifyException(e));
+if (server != null) {
+  try {
+server.stop();
+server = null;
+RESTServlet.stop();
+  } catch (Exception e) {
+LOG.warn(StringUtils.stringifyException(e));
+  }
 }
   }
 }
diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
index 94be9d9..a6f36fa 100644
--- 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
+++ 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
@@ -75,6 +75,7 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.Hash;
 import org.apache.hadoop.hbase.util.MurmurHash;
 import org.apache.hadoop.hbase.util.Pair;
+
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.NullWritable;
 import org.apache.hadoop.io.Text;
@@ -91,6 +92,7 @@ import org.apache.hadoop.mapreduce.lib.reduce.LongSumReducer;
 import org.apache.hadoop.util.LineReader;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -204,8 +206,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 
   protected void addCommandDescriptor(Class cmdClass,
   String name, String description) {
-CmdDescriptor cmdDescriptor =
-  new CmdDescriptor(cmdClass, name, description);
+CmdDescriptor cmdDescriptor = new CmdDescriptor(cmdClass, name, 
description);
 commands.put(name, cmdDescriptor);
   }
 
@@ -335,7 +336,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
   // generate splits
   List splitList = new ArrayList<>();
 
-  for (FileStatus file: listStatus(job)) {
+  for (FileStatus file : listStatus(job)) {
 if (file.isDirectory()) {
   continue;
 }
@@ -344,10 +345,10 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 FSDataInputStream fileIn = fs.open(path);
 LineReader in = new LineReader(fileIn, job.getConfiguration());
 int lineLen;
-while(true) {
+while (true) {
   Text lineText = new Text();
   lineLen = in.readLine(lineText);
-  if(lineLen <= 0) {
+  if (lineLen <= 0) {
 break;
   }
   Matcher m = LINE_PATTERN.matcher(lineText.toString());
@@ -406,7 +407,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 
   @Override
   public boolean nextKeyValue() {
-   

[hbase] branch branch-2.1 updated: HBASE-23654 Adding Apache Trafodion and EsgynDB to 'Powered by Apache HBase' page

2020-01-09 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
 new bd56a96  HBASE-23654 Adding Apache Trafodion and EsgynDB to 'Powered 
by Apache HBase' page
bd56a96 is described below

commit bd56a96fea05df746ae1f97dc59be0d1871ad06b
Author: Beata Sudi 
AuthorDate: Thu Jan 9 15:36:24 2020 +0100

HBASE-23654 Adding Apache Trafodion and EsgynDB to 'Powered by Apache 
HBase' page

Signed-off-by: Viraj Jasani 
Signed-off-by: Jan Hentschel 
---
 src/site/xdoc/poweredbyhbase.xml | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/src/site/xdoc/poweredbyhbase.xml b/src/site/xdoc/poweredbyhbase.xml
index ff1ba59..92e4a29 100644
--- a/src/site/xdoc/poweredbyhbase.xml
+++ b/src/site/xdoc/poweredbyhbase.xml
@@ -91,6 +91,13 @@ under the License.
 features to quickly extract data based on their trading, risk and clearing
 activities from one single location.
 
+   https://esgyn.com/;>EsgynDB
+   EsgynDB, powered by Apache Trafodion, provides enterprise SQL on 
Hadoop.
+ It includes full ACID transactions, online transaction processing and 
online
+ analytic processing, along with enterprise features such as disaster 
recovery
+ and full backup/restore. Native tables are stored in HBase, but read and 
write
+ access to various other file formats such as Apache Parquet and ORC is 
also supported. 
+
   http://www.explorys.net;>Explorys
   Explorys uses an HBase cluster containing over a billion anonymized 
clinical
 records, to enable subscribers to search and analyze patient populations,
@@ -314,6 +321,10 @@ under the License.
 We use MapReduce to frequently re-score our entire data set as we keep 
updating
 influencer metrics on a daily basis.
 
+   https://trafodion.apache.org/;>Trafodion
+   Apache Trafodion is a webscale SQL-on-Hadoop solution enabling 
transactional
+ or operational workloads. It uses HBase as its storage engine for SQL 
tables.
+
   http://trendmicro.com/;>Trend Micro
   Trend Micro uses HBase as a foundation for cloud scale storage for a 
variety
 of applications. We have been developing with HBase since version 0.1 and



[hbase] branch branch-2.2 updated: HBASE-23654 Adding Apache Trafodion and EsgynDB to 'Powered by Apache HBase' page

2020-01-09 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
 new 220f078  HBASE-23654 Adding Apache Trafodion and EsgynDB to 'Powered 
by Apache HBase' page
220f078 is described below

commit 220f078bda0db52e71d69beca6d1c90ae861dd6d
Author: Beata Sudi 
AuthorDate: Thu Jan 9 15:36:24 2020 +0100

HBASE-23654 Adding Apache Trafodion and EsgynDB to 'Powered by Apache 
HBase' page

Signed-off-by: Viraj Jasani 
Signed-off-by: Jan Hentschel 
---
 src/site/xdoc/poweredbyhbase.xml | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/src/site/xdoc/poweredbyhbase.xml b/src/site/xdoc/poweredbyhbase.xml
index ff1ba59..92e4a29 100644
--- a/src/site/xdoc/poweredbyhbase.xml
+++ b/src/site/xdoc/poweredbyhbase.xml
@@ -91,6 +91,13 @@ under the License.
 features to quickly extract data based on their trading, risk and clearing
 activities from one single location.
 
+   https://esgyn.com/;>EsgynDB
+   EsgynDB, powered by Apache Trafodion, provides enterprise SQL on 
Hadoop.
+ It includes full ACID transactions, online transaction processing and 
online
+ analytic processing, along with enterprise features such as disaster 
recovery
+ and full backup/restore. Native tables are stored in HBase, but read and 
write
+ access to various other file formats such as Apache Parquet and ORC is 
also supported. 
+
   http://www.explorys.net;>Explorys
   Explorys uses an HBase cluster containing over a billion anonymized 
clinical
 records, to enable subscribers to search and analyze patient populations,
@@ -314,6 +321,10 @@ under the License.
 We use MapReduce to frequently re-score our entire data set as we keep 
updating
 influencer metrics on a daily basis.
 
+   https://trafodion.apache.org/;>Trafodion
+   Apache Trafodion is a webscale SQL-on-Hadoop solution enabling 
transactional
+ or operational workloads. It uses HBase as its storage engine for SQL 
tables.
+
   http://trendmicro.com/;>Trend Micro
   Trend Micro uses HBase as a foundation for cloud scale storage for a 
variety
 of applications. We have been developing with HBase since version 0.1 and



[hbase] branch branch-2 updated: HBASE-23654 Adding Apache Trafodion and EsgynDB to 'Powered by Apache HBase' page

2020-01-09 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new d7e7d02  HBASE-23654 Adding Apache Trafodion and EsgynDB to 'Powered 
by Apache HBase' page
d7e7d02 is described below

commit d7e7d028bd7897a2997937f5978aad9f2af98dc9
Author: Beata Sudi 
AuthorDate: Thu Jan 9 15:36:24 2020 +0100

HBASE-23654 Adding Apache Trafodion and EsgynDB to 'Powered by Apache 
HBase' page

Signed-off-by: Viraj Jasani 
Signed-off-by: Jan Hentschel 
---
 src/site/xdoc/poweredbyhbase.xml | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/src/site/xdoc/poweredbyhbase.xml b/src/site/xdoc/poweredbyhbase.xml
index ff1ba59..92e4a29 100644
--- a/src/site/xdoc/poweredbyhbase.xml
+++ b/src/site/xdoc/poweredbyhbase.xml
@@ -91,6 +91,13 @@ under the License.
 features to quickly extract data based on their trading, risk and clearing
 activities from one single location.
 
+   https://esgyn.com/;>EsgynDB
+   EsgynDB, powered by Apache Trafodion, provides enterprise SQL on 
Hadoop.
+ It includes full ACID transactions, online transaction processing and 
online
+ analytic processing, along with enterprise features such as disaster 
recovery
+ and full backup/restore. Native tables are stored in HBase, but read and 
write
+ access to various other file formats such as Apache Parquet and ORC is 
also supported. 
+
   http://www.explorys.net;>Explorys
   Explorys uses an HBase cluster containing over a billion anonymized 
clinical
 records, to enable subscribers to search and analyze patient populations,
@@ -314,6 +321,10 @@ under the License.
 We use MapReduce to frequently re-score our entire data set as we keep 
updating
 influencer metrics on a daily basis.
 
+   https://trafodion.apache.org/;>Trafodion
+   Apache Trafodion is a webscale SQL-on-Hadoop solution enabling 
transactional
+ or operational workloads. It uses HBase as its storage engine for SQL 
tables.
+
   http://trendmicro.com/;>Trend Micro
   Trend Micro uses HBase as a foundation for cloud scale storage for a 
variety
 of applications. We have been developing with HBase since version 0.1 and



[hbase] branch master updated: HBASE-23654 Adding Apache Trafodion and EsgynDB to 'Powered by Apache HBase' page

2020-01-09 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new 0587cf3  HBASE-23654 Adding Apache Trafodion and EsgynDB to 'Powered 
by Apache HBase' page
0587cf3 is described below

commit 0587cf331a6ab8068502d923db7803670eb5b8e2
Author: Beata Sudi 
AuthorDate: Thu Jan 9 15:36:24 2020 +0100

HBASE-23654 Adding Apache Trafodion and EsgynDB to 'Powered by Apache 
HBase' page

Signed-off-by: Viraj Jasani 
Signed-off-by: Jan Hentschel 
---
 src/site/xdoc/poweredbyhbase.xml | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/src/site/xdoc/poweredbyhbase.xml b/src/site/xdoc/poweredbyhbase.xml
index ff1ba59..92e4a29 100644
--- a/src/site/xdoc/poweredbyhbase.xml
+++ b/src/site/xdoc/poweredbyhbase.xml
@@ -91,6 +91,13 @@ under the License.
 features to quickly extract data based on their trading, risk and clearing
 activities from one single location.
 
+   https://esgyn.com/;>EsgynDB
+   EsgynDB, powered by Apache Trafodion, provides enterprise SQL on 
Hadoop.
+ It includes full ACID transactions, online transaction processing and 
online
+ analytic processing, along with enterprise features such as disaster 
recovery
+ and full backup/restore. Native tables are stored in HBase, but read and 
write
+ access to various other file formats such as Apache Parquet and ORC is 
also supported. 
+
   http://www.explorys.net;>Explorys
   Explorys uses an HBase cluster containing over a billion anonymized 
clinical
 records, to enable subscribers to search and analyze patient populations,
@@ -314,6 +321,10 @@ under the License.
 We use MapReduce to frequently re-score our entire data set as we keep 
updating
 influencer metrics on a daily basis.
 
+   https://trafodion.apache.org/;>Trafodion
+   Apache Trafodion is a webscale SQL-on-Hadoop solution enabling 
transactional
+ or operational workloads. It uses HBase as its storage engine for SQL 
tables.
+
   http://trendmicro.com/;>Trend Micro
   Trend Micro uses HBase as a foundation for cloud scale storage for a 
variety
 of applications. We have been developing with HBase since version 0.1 and



[hbase] branch branch-2.1 updated: HBASE-23645 Fixed remaining Checkstyle violations in hbase-common tests

2020-01-07 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
 new ecd7e0f  HBASE-23645 Fixed remaining Checkstyle violations in 
hbase-common tests
ecd7e0f is described below

commit ecd7e0fc2cc5beb9a8f9dcfc879e009d3194cda2
Author: Jan Hentschel 
AuthorDate: Tue Jan 7 08:54:04 2020 +0100

HBASE-23645 Fixed remaining Checkstyle violations in hbase-common tests

Signed-off-by: Viraj Jasani 
---
 .../resources/hbase/checkstyle-suppressions.xml|   6 +-
 .../java/org/apache/hadoop/hbase/TestKeyValue.java | 217 ++---
 .../java/org/apache/hadoop/hbase/TestTimeout.java  |  43 ++--
 .../test/java/org/apache/hadoop/hbase/Waiter.java  |  25 +--
 .../hadoop/hbase/types/TestCopyOnWriteMaps.java| 106 +-
 5 files changed, 187 insertions(+), 210 deletions(-)

diff --git 
a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml 
b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
index 4e44081..a5ddb1a 100644
--- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
+++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
@@ -1,7 +1,7 @@
 
 https://checkstyle.org/dtds/suppressions_1_2.dtd;>
+"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
+"https://checkstyle.org/dtds/suppressions_1_2.dtd;>
 

[hbase] branch branch-2.2 updated: HBASE-23645 Fixed remaining Checkstyle violations in hbase-common tests

2020-01-07 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
 new 6d22b7c  HBASE-23645 Fixed remaining Checkstyle violations in 
hbase-common tests
6d22b7c is described below

commit 6d22b7c255da7bb5d2ad1699e4d7974677b0a8e3
Author: Jan Hentschel 
AuthorDate: Tue Jan 7 08:54:04 2020 +0100

HBASE-23645 Fixed remaining Checkstyle violations in hbase-common tests

Signed-off-by: Viraj Jasani 
---
 .../resources/hbase/checkstyle-suppressions.xml|   6 +-
 .../java/org/apache/hadoop/hbase/TestKeyValue.java | 217 ++---
 .../java/org/apache/hadoop/hbase/TestTimeout.java  |  43 ++--
 .../test/java/org/apache/hadoop/hbase/Waiter.java  |  25 +--
 .../hadoop/hbase/types/TestCopyOnWriteMaps.java| 106 +-
 5 files changed, 187 insertions(+), 210 deletions(-)

diff --git 
a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml 
b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
index 4e44081..a5ddb1a 100644
--- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
+++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
@@ -1,7 +1,7 @@
 
 https://checkstyle.org/dtds/suppressions_1_2.dtd;>
+"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
+"https://checkstyle.org/dtds/suppressions_1_2.dtd;>
 

[hbase] branch branch-2 updated: HBASE-23645 Fixed remaining Checkstyle violations in hbase-common tests

2020-01-07 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new 4f7de9e  HBASE-23645 Fixed remaining Checkstyle violations in 
hbase-common tests
4f7de9e is described below

commit 4f7de9e27e8f92f6335d043fdd1f5ef1fbc0077e
Author: Jan Hentschel 
AuthorDate: Tue Jan 7 08:54:04 2020 +0100

HBASE-23645 Fixed remaining Checkstyle violations in hbase-common tests

Signed-off-by: Viraj Jasani 
---
 .../resources/hbase/checkstyle-suppressions.xml|   2 +
 .../java/org/apache/hadoop/hbase/TestKeyValue.java | 217 ++---
 .../java/org/apache/hadoop/hbase/TestTimeout.java  |  43 ++--
 .../test/java/org/apache/hadoop/hbase/Waiter.java  |  25 +--
 .../hadoop/hbase/types/TestCopyOnWriteMaps.java| 106 +-
 5 files changed, 185 insertions(+), 208 deletions(-)

diff --git 
a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml 
b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
index 983bdae..8186375 100644
--- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
+++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
@@ -47,4 +47,6 @@
   
   
   
+  
+  
 
diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java
index b867c16..305c524 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java
@@ -30,7 +30,6 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
-import java.io.IOException;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
@@ -40,14 +39,12 @@ import java.util.TreeSet;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.apache.hadoop.hbase.util.ByteBufferUtils;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.junit.Assert;
 import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-
 @Category(SmallTests.class)
 public class TestKeyValue {
   @ClassRule
@@ -56,12 +53,12 @@ public class TestKeyValue {
   private static final Logger LOG = 
LoggerFactory.getLogger(TestKeyValue.class);
 
   @Test
-  public void testColumnCompare() throws Exception {
-final byte [] a = Bytes.toBytes("aaa");
-byte [] family1 = Bytes.toBytes("abc");
-byte [] qualifier1 = Bytes.toBytes("def");
-byte [] family2 = Bytes.toBytes("abcd");
-byte [] qualifier2 = Bytes.toBytes("ef");
+  public void testColumnCompare() {
+final byte[] a = Bytes.toBytes("aaa");
+byte[] family1 = Bytes.toBytes("abc");
+byte[] qualifier1 = Bytes.toBytes("def");
+byte[] family2 = Bytes.toBytes("abcd");
+byte[] qualifier2 = Bytes.toBytes("ef");
 
 KeyValue aaa = new KeyValue(a, family1, qualifier1, 0L, KeyValue.Type.Put, 
a);
 assertFalse(CellUtil.matchingColumn(aaa, family2, qualifier2));
@@ -69,30 +66,29 @@ public class TestKeyValue {
 aaa = new KeyValue(a, family2, qualifier2, 0L, KeyValue.Type.Put, a);
 assertFalse(CellUtil.matchingColumn(aaa, family1, qualifier1));
 assertTrue(CellUtil.matchingColumn(aaa, family2,qualifier2));
-byte [] nullQualifier = new byte[0];
+byte[] nullQualifier = new byte[0];
 aaa = new KeyValue(a, family1, nullQualifier, 0L, KeyValue.Type.Put, a);
 assertTrue(CellUtil.matchingColumn(aaa, family1,null));
 assertFalse(CellUtil.matchingColumn(aaa, family2,qualifier2));
   }
 
   /**
-   * Test a corner case when the family qualifier is a prefix of the
-   *  column qualifier.
+   * Test a corner case when the family qualifier is a prefix of the column 
qualifier.
*/
   @Test
-  public void testColumnCompare_prefix() throws Exception {
-final byte [] a = Bytes.toBytes("aaa");
-byte [] family1 = Bytes.toBytes("abc");
-byte [] qualifier1 = Bytes.toBytes("def");
-byte [] family2 = Bytes.toBytes("ab");
-byte [] qualifier2 = Bytes.toBytes("def");
+  public void testColumnCompare_prefix() {
+final byte[] a = Bytes.toBytes("aaa");
+byte[] family1 = Bytes.toBytes("abc");
+byte[] qualifier1 = Bytes.toBytes("def");
+byte[] family2 = Bytes.toBytes("ab");
+byte[] qualifier2 = Bytes.toBytes("def");
 
 KeyValue aaa = new KeyValue(a, family1, qualifier1, 0L, KeyValue.Type.Put, 
a);
 assertFalse(CellUtil.matchingColumn(aaa, family2, qualifier2));
   }
 
   @Test
-  public v

[hbase] branch master updated (33f45d4 -> 1eafba5)

2020-01-06 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from 33f45d4  HBASE-23636 Disable table may hang when regionserver stop or 
abort. (#982)
 add 1eafba5  HBASE-23645 Fixed remaining Checkstyle violations in 
hbase-common tests

No new revisions were added by this update.

Summary of changes:
 .../resources/hbase/checkstyle-suppressions.xml|   2 +
 .../java/org/apache/hadoop/hbase/TestKeyValue.java | 133 ++---
 .../java/org/apache/hadoop/hbase/TestTimeout.java  |  43 +++
 .../test/java/org/apache/hadoop/hbase/Waiter.java  |  25 ++--
 .../hadoop/hbase/types/TestCopyOnWriteMaps.java| 106 
 5 files changed, 144 insertions(+), 165 deletions(-)



[hbase] branch branch-2.1 updated: HBASE-23635 Reduced number of Checkstyle violations in hbase-mapreduce

2020-01-03 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
 new b54a4df  HBASE-23635 Reduced number of Checkstyle violations in 
hbase-mapreduce
b54a4df is described below

commit b54a4dfb8cb27876d6ff7ac6fced1feca1a3dd69
Author: Jan Hentschel 
AuthorDate: Sat Jan 4 00:48:24 2020 +0100

HBASE-23635 Reduced number of Checkstyle violations in hbase-mapreduce

Signed-off-by: Viraj Jasani 
Signed-off-by: stack 
---
 .../hadoop/hbase/TestPerformanceEvaluation.java| 43 +++---
 .../hadoop/hbase/mapreduce/NMapInputFormat.java| 21 ---
 .../TableSnapshotInputFormatTestBase.java  | 18 +++---
 .../hadoop/hbase/mapreduce/TestCellCounter.java| 65 +-
 .../hadoop/hbase/mapreduce/TestHashTable.java  | 16 +++---
 .../hbase/mapreduce/TestImportTsvParser.java   | 34 ++-
 .../hadoop/hbase/mapreduce/TestSyncTable.java  | 34 +--
 .../hadoop/hbase/mapreduce/TestTableSplit.java | 18 +++---
 .../mapreduce/TsvImporterCustomTestMapper.java | 15 +++--
 .../hbase/PerformanceEvaluation_Counter.properties |  4 +-
 10 files changed, 116 insertions(+), 152 deletions(-)

diff --git 
a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java
 
b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java
index f740fa1..4751e75 100644
--- 
a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java
+++ 
b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java
@@ -17,13 +17,15 @@
  */
 package org.apache.hadoop.hbase;
 
-import static org.junit.Assert.*;
+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.junit.Assert.fail;
 
 import com.codahale.metrics.Histogram;
 import com.codahale.metrics.Snapshot;
 import com.codahale.metrics.UniformReservoir;
-import com.fasterxml.jackson.core.JsonGenerationException;
-import com.fasterxml.jackson.databind.JsonMappingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import java.io.BufferedReader;
 import java.io.ByteArrayInputStream;
@@ -50,7 +52,6 @@ import org.junit.experimental.categories.Category;
 
 @Category({MiscTests.class, SmallTests.class})
 public class TestPerformanceEvaluation {
-
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
   HBaseClassTestRule.forClass(TestPerformanceEvaluation.class);
@@ -61,20 +62,19 @@ public class TestPerformanceEvaluation {
   public void testDefaultInMemoryCompaction() {
 PerformanceEvaluation.TestOptions defaultOpts =
 new PerformanceEvaluation.TestOptions();
-
assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT.toString(),
+assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT,
 defaultOpts.getInMemoryCompaction().toString());
 HTableDescriptor htd = 
PerformanceEvaluation.getTableDescriptor(defaultOpts);
 for (HColumnDescriptor hcd: htd.getFamilies()) {
-  
assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT.toString(),
+  assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT,
   hcd.getInMemoryCompaction().toString());
 }
   }
 
   @Test
-  public void testSerialization()
-  throws JsonGenerationException, JsonMappingException, IOException {
+  public void testSerialization() throws IOException {
 PerformanceEvaluation.TestOptions options = new 
PerformanceEvaluation.TestOptions();
-assertTrue(!options.isAutoFlush());
+assertFalse(options.isAutoFlush());
 options.setAutoFlush(true);
 ObjectMapper mapper = new ObjectMapper();
 String optionsString = mapper.writeValueAsString(options);
@@ -84,8 +84,7 @@ public class TestPerformanceEvaluation {
   }
 
   /**
-   * Exercise the mr spec writing.  Simple assertions to make sure it is 
basically working.
-   * @throws IOException
+   * Exercise the mr spec writing. Simple assertions to make sure it is 
basically working.
*/
   @Ignore @Test
   public void testWriteInputFile() throws IOException {
@@ -99,9 +98,8 @@ public class TestPerformanceEvaluation {
 Path p = new Path(dir, PerformanceEvaluation.JOB_INPUT_FILENAME);
 long len = fs.getFileStatus(p).getLen();
 assertTrue(len > 0);
-byte [] content = new byte[(int)len];
-FSDataInputStream dis = fs.open(p);
-try {
+byte[] content = new byte[(int) len];
+try (FSDataInputStream dis = fs.open(p)) {
   dis.readFully(content);
   BufferedReader br =
 new BufferedReader(new InputStreamReader(new 
ByteArrayInputStream(content)));
@@ -110,8 +108,6 @@ public class TestPerformanceEvaluation {
 co

[hbase] branch branch-2.2 updated: HBASE-23635 Reduced number of Checkstyle violations in hbase-mapreduce

2020-01-03 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
 new dbb74a5  HBASE-23635 Reduced number of Checkstyle violations in 
hbase-mapreduce
dbb74a5 is described below

commit dbb74a5526181185d0c1e38e7794f8172c527ebb
Author: Jan Hentschel 
AuthorDate: Sat Jan 4 00:48:24 2020 +0100

HBASE-23635 Reduced number of Checkstyle violations in hbase-mapreduce

Signed-off-by: Viraj Jasani 
Signed-off-by: stack 
---
 .../hadoop/hbase/TestPerformanceEvaluation.java| 30 +-
 .../hadoop/hbase/mapreduce/NMapInputFormat.java| 21 ---
 .../TableSnapshotInputFormatTestBase.java  | 18 +++---
 .../hadoop/hbase/mapreduce/TestCellCounter.java| 65 +-
 .../hadoop/hbase/mapreduce/TestHashTable.java  | 16 +++---
 .../hbase/mapreduce/TestImportTsvParser.java   | 34 ++-
 .../hadoop/hbase/mapreduce/TestSyncTable.java  | 34 +--
 .../hadoop/hbase/mapreduce/TestTableSplit.java | 18 +++---
 .../mapreduce/TsvImporterCustomTestMapper.java | 15 +++--
 .../hbase/PerformanceEvaluation_Counter.properties |  4 +-
 10 files changed, 110 insertions(+), 145 deletions(-)

diff --git 
a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java
 
b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java
index 6133c9d..1940725 100644
--- 
a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java
+++ 
b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java
@@ -18,6 +18,7 @@
 package org.apache.hadoop.hbase;
 
 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.junit.Assert.fail;
@@ -53,7 +54,6 @@ import org.apache.hbase.thirdparty.com.google.gson.Gson;
 
 @Category({MiscTests.class, SmallTests.class})
 public class TestPerformanceEvaluation {
-
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
   HBaseClassTestRule.forClass(TestPerformanceEvaluation.class);
@@ -64,19 +64,19 @@ public class TestPerformanceEvaluation {
   public void testDefaultInMemoryCompaction() {
 PerformanceEvaluation.TestOptions defaultOpts =
 new PerformanceEvaluation.TestOptions();
-
assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT.toString(),
+assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT,
 defaultOpts.getInMemoryCompaction().toString());
 HTableDescriptor htd = 
PerformanceEvaluation.getTableDescriptor(defaultOpts);
 for (HColumnDescriptor hcd: htd.getFamilies()) {
-  
assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT.toString(),
+  assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT,
   hcd.getInMemoryCompaction().toString());
 }
   }
 
   @Test
-  public void testSerialization() throws IOException {
+  public void testSerialization() {
 PerformanceEvaluation.TestOptions options = new 
PerformanceEvaluation.TestOptions();
-assertTrue(!options.isAutoFlush());
+assertFalse(options.isAutoFlush());
 options.setAutoFlush(true);
 Gson gson = GsonUtil.createGson().create();
 String optionsString = gson.toJson(options);
@@ -101,8 +101,7 @@ public class TestPerformanceEvaluation {
 long len = fs.getFileStatus(p).getLen();
 assertTrue(len > 0);
 byte[] content = new byte[(int) len];
-FSDataInputStream dis = fs.open(p);
-try {
+try (FSDataInputStream dis = fs.open(p)) {
   dis.readFully(content);
   BufferedReader br = new BufferedReader(
 new InputStreamReader(new ByteArrayInputStream(content), 
StandardCharsets.UTF_8));
@@ -111,8 +110,6 @@ public class TestPerformanceEvaluation {
 count++;
   }
   assertEquals(clients, count);
-} finally {
-  dis.close();
 }
   }
 
@@ -170,9 +167,8 @@ public class TestPerformanceEvaluation {
   }
 
   @Test
-  public void testZipfian()
-  throws NoSuchMethodException, SecurityException, InstantiationException, 
IllegalAccessException,
-  IllegalArgumentException, InvocationTargetException {
+  public void testZipfian() throws NoSuchMethodException, SecurityException, 
InstantiationException,
+  IllegalAccessException, IllegalArgumentException, 
InvocationTargetException {
 TestOptions opts = new PerformanceEvaluation.TestOptions();
 opts.setValueZipf(true);
 final int valueSize = 1024;
@@ -197,10 +193,10 @@ public class TestPerformanceEvaluation {
   public void testSetBufferSizeOption() {
 TestOptions opts = new PerformanceEvaluation.TestOptions();
 long bufferSize = opts.getBufferSize();
-assertEquals(bufferSize, 2l * 1024l * 10

[hbase] branch branch-2 updated: HBASE-23635 Reduced number of Checkstyle violations in hbase-mapreduce

2020-01-03 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new 085450b  HBASE-23635 Reduced number of Checkstyle violations in 
hbase-mapreduce
085450b is described below

commit 085450ba4e5dd386ba24ee9d071deb73754b90f7
Author: Jan Hentschel 
AuthorDate: Sat Jan 4 00:48:24 2020 +0100

HBASE-23635 Reduced number of Checkstyle violations in hbase-mapreduce

Signed-off-by: Viraj Jasani 
Signed-off-by: stack 
---
 .../hadoop/hbase/TestPerformanceEvaluation.java| 30 +-
 .../hadoop/hbase/mapreduce/NMapInputFormat.java| 21 ---
 .../TableSnapshotInputFormatTestBase.java  | 18 +++---
 .../hadoop/hbase/mapreduce/TestCellCounter.java| 65 +-
 .../hadoop/hbase/mapreduce/TestHashTable.java  | 16 +++---
 .../hbase/mapreduce/TestImportTsvParser.java   | 34 ++-
 .../hadoop/hbase/mapreduce/TestSyncTable.java  | 34 +--
 .../hadoop/hbase/mapreduce/TestTableSplit.java | 18 +++---
 .../mapreduce/TsvImporterCustomTestMapper.java | 15 +++--
 .../hbase/PerformanceEvaluation_Counter.properties |  4 +-
 10 files changed, 110 insertions(+), 145 deletions(-)

diff --git 
a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java
 
b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java
index 6133c9d..1940725 100644
--- 
a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java
+++ 
b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java
@@ -18,6 +18,7 @@
 package org.apache.hadoop.hbase;
 
 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.junit.Assert.fail;
@@ -53,7 +54,6 @@ import org.apache.hbase.thirdparty.com.google.gson.Gson;
 
 @Category({MiscTests.class, SmallTests.class})
 public class TestPerformanceEvaluation {
-
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
   HBaseClassTestRule.forClass(TestPerformanceEvaluation.class);
@@ -64,19 +64,19 @@ public class TestPerformanceEvaluation {
   public void testDefaultInMemoryCompaction() {
 PerformanceEvaluation.TestOptions defaultOpts =
 new PerformanceEvaluation.TestOptions();
-
assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT.toString(),
+assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT,
 defaultOpts.getInMemoryCompaction().toString());
 HTableDescriptor htd = 
PerformanceEvaluation.getTableDescriptor(defaultOpts);
 for (HColumnDescriptor hcd: htd.getFamilies()) {
-  
assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT.toString(),
+  assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT,
   hcd.getInMemoryCompaction().toString());
 }
   }
 
   @Test
-  public void testSerialization() throws IOException {
+  public void testSerialization() {
 PerformanceEvaluation.TestOptions options = new 
PerformanceEvaluation.TestOptions();
-assertTrue(!options.isAutoFlush());
+assertFalse(options.isAutoFlush());
 options.setAutoFlush(true);
 Gson gson = GsonUtil.createGson().create();
 String optionsString = gson.toJson(options);
@@ -101,8 +101,7 @@ public class TestPerformanceEvaluation {
 long len = fs.getFileStatus(p).getLen();
 assertTrue(len > 0);
 byte[] content = new byte[(int) len];
-FSDataInputStream dis = fs.open(p);
-try {
+try (FSDataInputStream dis = fs.open(p)) {
   dis.readFully(content);
   BufferedReader br = new BufferedReader(
 new InputStreamReader(new ByteArrayInputStream(content), 
StandardCharsets.UTF_8));
@@ -111,8 +110,6 @@ public class TestPerformanceEvaluation {
 count++;
   }
   assertEquals(clients, count);
-} finally {
-  dis.close();
 }
   }
 
@@ -170,9 +167,8 @@ public class TestPerformanceEvaluation {
   }
 
   @Test
-  public void testZipfian()
-  throws NoSuchMethodException, SecurityException, InstantiationException, 
IllegalAccessException,
-  IllegalArgumentException, InvocationTargetException {
+  public void testZipfian() throws NoSuchMethodException, SecurityException, 
InstantiationException,
+  IllegalAccessException, IllegalArgumentException, 
InvocationTargetException {
 TestOptions opts = new PerformanceEvaluation.TestOptions();
 opts.setValueZipf(true);
 final int valueSize = 1024;
@@ -197,10 +193,10 @@ public class TestPerformanceEvaluation {
   public void testSetBufferSizeOption() {
 TestOptions opts = new PerformanceEvaluation.TestOptions();
 long bufferSize = opts.getBufferSize();
-assertEquals(bufferSize, 2l * 1024l * 10

[hbase] branch master updated: HBASE-23635 Reduced number of Checkstyle violations in hbase-mapreduce

2020-01-03 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new ab97665  HBASE-23635 Reduced number of Checkstyle violations in 
hbase-mapreduce
ab97665 is described below

commit ab9766599dfae624330631ca6352d8a00bc2e607
Author: Jan Hentschel 
AuthorDate: Sat Jan 4 00:48:24 2020 +0100

HBASE-23635 Reduced number of Checkstyle violations in hbase-mapreduce

Signed-off-by: Viraj Jasani 
Signed-off-by: stack 
---
 .../hadoop/hbase/TestPerformanceEvaluation.java| 30 +-
 .../hadoop/hbase/mapreduce/NMapInputFormat.java| 21 ---
 .../TableSnapshotInputFormatTestBase.java  | 18 +++---
 .../hadoop/hbase/mapreduce/TestCellCounter.java| 65 +-
 .../hadoop/hbase/mapreduce/TestHashTable.java  | 16 +++---
 .../hbase/mapreduce/TestImportTsvParser.java   | 34 ++-
 .../hadoop/hbase/mapreduce/TestSyncTable.java  | 34 +--
 .../hadoop/hbase/mapreduce/TestTableSplit.java | 17 +++---
 .../mapreduce/TsvImporterCustomTestMapper.java | 15 +++--
 .../hbase/PerformanceEvaluation_Counter.properties |  4 +-
 10 files changed, 110 insertions(+), 144 deletions(-)

diff --git 
a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java
 
b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java
index bcaa975..8e3373a 100644
--- 
a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java
+++ 
b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java
@@ -18,6 +18,7 @@
 package org.apache.hadoop.hbase;
 
 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.junit.Assert.fail;
@@ -53,7 +54,6 @@ import org.apache.hbase.thirdparty.com.google.gson.Gson;
 
 @Category({MiscTests.class, SmallTests.class})
 public class TestPerformanceEvaluation {
-
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
   HBaseClassTestRule.forClass(TestPerformanceEvaluation.class);
@@ -64,19 +64,19 @@ public class TestPerformanceEvaluation {
   public void testDefaultInMemoryCompaction() {
 PerformanceEvaluation.TestOptions defaultOpts =
 new PerformanceEvaluation.TestOptions();
-
assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT.toString(),
+assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT,
 defaultOpts.getInMemoryCompaction().toString());
 HTableDescriptor htd = 
PerformanceEvaluation.getTableDescriptor(defaultOpts);
 for (HColumnDescriptor hcd: htd.getFamilies()) {
-  
assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT.toString(),
+  assertEquals(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT,
   hcd.getInMemoryCompaction().toString());
 }
   }
 
   @Test
-  public void testSerialization() throws IOException {
+  public void testSerialization() {
 PerformanceEvaluation.TestOptions options = new 
PerformanceEvaluation.TestOptions();
-assertTrue(!options.isAutoFlush());
+assertFalse(options.isAutoFlush());
 options.setAutoFlush(true);
 Gson gson = GsonUtil.createGson().create();
 String optionsString = gson.toJson(options);
@@ -101,8 +101,7 @@ public class TestPerformanceEvaluation {
 long len = fs.getFileStatus(p).getLen();
 assertTrue(len > 0);
 byte[] content = new byte[(int) len];
-FSDataInputStream dis = fs.open(p);
-try {
+try (FSDataInputStream dis = fs.open(p)) {
   dis.readFully(content);
   BufferedReader br = new BufferedReader(
 new InputStreamReader(new ByteArrayInputStream(content), 
StandardCharsets.UTF_8));
@@ -111,8 +110,6 @@ public class TestPerformanceEvaluation {
 count++;
   }
   assertEquals(clients, count);
-} finally {
-  dis.close();
 }
   }
 
@@ -170,9 +167,8 @@ public class TestPerformanceEvaluation {
   }
 
   @Test
-  public void testZipfian()
-  throws NoSuchMethodException, SecurityException, InstantiationException, 
IllegalAccessException,
-  IllegalArgumentException, InvocationTargetException {
+  public void testZipfian() throws NoSuchMethodException, SecurityException, 
InstantiationException,
+  IllegalAccessException, IllegalArgumentException, 
InvocationTargetException {
 TestOptions opts = new PerformanceEvaluation.TestOptions();
 opts.setValueZipf(true);
 final int valueSize = 1024;
@@ -197,10 +193,10 @@ public class TestPerformanceEvaluation {
   public void testSetBufferSizeOption() {
 TestOptions opts = new PerformanceEvaluation.TestOptions();
 long bufferSize = opts.getBufferSize();
-assertEquals(bufferSize, 2l * 1024l * 10

[hbase] branch branch-2.1 updated: HBASE-23623 Reduced the number of Checkstyle violations in hbase-rest

2020-01-01 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
 new 8c76a93  HBASE-23623 Reduced the number of Checkstyle violations in 
hbase-rest
8c76a93 is described below

commit 8c76a937c461686c8bdc03383e59b859fc7cde73
Author: Jan Hentschel 
AuthorDate: Thu Jan 2 00:39:54 2020 +0100

HBASE-23623 Reduced the number of Checkstyle violations in hbase-rest

Signed-off-by: stack 
Signed-off-by: Viraj Jasani 
---
 .../hadoop/hbase/rest/PerformanceEvaluation.java   | 239 +
 .../hadoop/hbase/rest/TestGetAndPutResource.java   |  23 +-
 .../hbase/rest/TestNamespacesInstanceResource.java |  20 +-
 .../hadoop/hbase/rest/TestNamespacesResource.java  |  10 +-
 .../hadoop/hbase/rest/TestScannersWithLabels.java  |  24 +--
 .../hadoop/hbase/rest/TestSchemaResource.java  |  12 +-
 .../apache/hadoop/hbase/rest/TestTableScan.java|  50 ++---
 .../hbase/rest/client/TestRemoteHTableRetries.java |   8 +-
 .../hadoop/hbase/rest/client/TestRemoteTable.java  |  19 +-
 .../hadoop/hbase/rest/model/TestScannerModel.java  |   7 +-
 .../rest/model/TestStorageClusterStatusModel.java  |  31 +--
 11 files changed, 192 insertions(+), 251 deletions(-)

diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
index 21d25e2..0d433f2 100644
--- 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
+++ 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
@@ -40,6 +40,7 @@ import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.ArrayBackedTag;
 import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HColumnDescriptor;
@@ -48,7 +49,6 @@ import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.Tag;
-import org.apache.hadoop.hbase.ArrayBackedTag;
 import org.apache.hadoop.hbase.client.BufferedMutator;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.ConnectionFactory;
@@ -121,8 +121,8 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
   private static final int ROWS_PER_GB = ONE_GB / ROW_LENGTH;
 
   public static final TableName TABLE_NAME = TableName.valueOf("TestTable");
-  public static final byte [] FAMILY_NAME = Bytes.toBytes("info");
-  public static final byte [] QUALIFIER_NAME = Bytes.toBytes("data");
+  public static final byte[] FAMILY_NAME = Bytes.toBytes("info");
+  public static final byte[] QUALIFIER_NAME = Bytes.toBytes("data");
   private TableName tableName = TABLE_NAME;
 
   protected HTableDescriptor TABLE_DESCRIPTOR;
@@ -144,6 +144,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
   private Connection connection;
 
   private static final Path PERF_EVAL_DIR = new Path("performance_evaluation");
+
   /**
* Regex to parse lines in input file passed to mapreduce task.
*/
@@ -162,11 +163,12 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
* Enum for map metrics.  Keep it out here rather than inside in the Map
* inner-class so we can find associated properties.
*/
-  protected static enum Counter {
+  protected enum Counter {
 /** elapsed time */
 ELAPSED_TIME,
 /** number of rows */
-ROWS}
+ROWS
+  }
 
   /**
* Constructor
@@ -214,7 +216,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 /**
  * Sets status
  * @param msg status message
- * @throws IOException
+ * @throws IOException if setting the status fails
  */
 void setStatus(final String msg) throws IOException;
   }
@@ -226,18 +228,15 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
*  the record value is the PeInputSplit itself.
*/
   public static class PeInputSplit extends InputSplit implements Writable {
-private TableName tableName = TABLE_NAME;
-private int startRow = 0;
-private int rows = 0;
-private int totalRows = 0;
-private int clients = 0;
-private boolean flushCommits = false;
-private boolean writeToWAL = true;
-private boolean useTags = false;
-private int noOfTags = 0;
-
-public PeInputSplit() {
-}
+private TableName tableName;
+private int startRow;
+private int rows;
+private int totalRows;
+private int clients;
+private boolean flushCommits;
+

[hbase] branch branch-2.2 updated: HBASE-23623 Reduced the number of Checkstyle violations in hbase-rest

2020-01-01 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
 new f63fc29  HBASE-23623 Reduced the number of Checkstyle violations in 
hbase-rest
f63fc29 is described below

commit f63fc294998e4080fc1403cbaf8431ca27454f0e
Author: Jan Hentschel 
AuthorDate: Thu Jan 2 00:39:54 2020 +0100

HBASE-23623 Reduced the number of Checkstyle violations in hbase-rest

Signed-off-by: stack 
Signed-off-by: Viraj Jasani 
---
 .../hadoop/hbase/rest/PerformanceEvaluation.java   | 239 +
 .../hadoop/hbase/rest/TestGetAndPutResource.java   |  23 +-
 .../hbase/rest/TestNamespacesInstanceResource.java |  20 +-
 .../hadoop/hbase/rest/TestNamespacesResource.java  |  10 +-
 .../hadoop/hbase/rest/TestScannersWithLabels.java  |  24 +--
 .../hadoop/hbase/rest/TestSchemaResource.java  |  12 +-
 .../apache/hadoop/hbase/rest/TestTableScan.java|  50 ++---
 .../hbase/rest/client/TestRemoteHTableRetries.java |   8 +-
 .../hadoop/hbase/rest/client/TestRemoteTable.java  |  19 +-
 .../hadoop/hbase/rest/model/TestScannerModel.java  |   7 +-
 .../rest/model/TestStorageClusterStatusModel.java  |  31 +--
 11 files changed, 192 insertions(+), 251 deletions(-)

diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
index 21d25e2..0d433f2 100644
--- 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
+++ 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
@@ -40,6 +40,7 @@ import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.ArrayBackedTag;
 import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HColumnDescriptor;
@@ -48,7 +49,6 @@ import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.Tag;
-import org.apache.hadoop.hbase.ArrayBackedTag;
 import org.apache.hadoop.hbase.client.BufferedMutator;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.ConnectionFactory;
@@ -121,8 +121,8 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
   private static final int ROWS_PER_GB = ONE_GB / ROW_LENGTH;
 
   public static final TableName TABLE_NAME = TableName.valueOf("TestTable");
-  public static final byte [] FAMILY_NAME = Bytes.toBytes("info");
-  public static final byte [] QUALIFIER_NAME = Bytes.toBytes("data");
+  public static final byte[] FAMILY_NAME = Bytes.toBytes("info");
+  public static final byte[] QUALIFIER_NAME = Bytes.toBytes("data");
   private TableName tableName = TABLE_NAME;
 
   protected HTableDescriptor TABLE_DESCRIPTOR;
@@ -144,6 +144,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
   private Connection connection;
 
   private static final Path PERF_EVAL_DIR = new Path("performance_evaluation");
+
   /**
* Regex to parse lines in input file passed to mapreduce task.
*/
@@ -162,11 +163,12 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
* Enum for map metrics.  Keep it out here rather than inside in the Map
* inner-class so we can find associated properties.
*/
-  protected static enum Counter {
+  protected enum Counter {
 /** elapsed time */
 ELAPSED_TIME,
 /** number of rows */
-ROWS}
+ROWS
+  }
 
   /**
* Constructor
@@ -214,7 +216,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 /**
  * Sets status
  * @param msg status message
- * @throws IOException
+ * @throws IOException if setting the status fails
  */
 void setStatus(final String msg) throws IOException;
   }
@@ -226,18 +228,15 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
*  the record value is the PeInputSplit itself.
*/
   public static class PeInputSplit extends InputSplit implements Writable {
-private TableName tableName = TABLE_NAME;
-private int startRow = 0;
-private int rows = 0;
-private int totalRows = 0;
-private int clients = 0;
-private boolean flushCommits = false;
-private boolean writeToWAL = true;
-private boolean useTags = false;
-private int noOfTags = 0;
-
-public PeInputSplit() {
-}
+private TableName tableName;
+private int startRow;
+private int rows;
+private int totalRows;
+private int clients;
+private boolean flushCommits;
+

[hbase] branch branch-2 updated: HBASE-23623 Reduced the number of Checkstyle violations in hbase-rest

2020-01-01 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new b81685c  HBASE-23623 Reduced the number of Checkstyle violations in 
hbase-rest
b81685c is described below

commit b81685cfcc771db125c88680ed5b4f2435a98d60
Author: Jan Hentschel 
AuthorDate: Thu Jan 2 00:39:54 2020 +0100

HBASE-23623 Reduced the number of Checkstyle violations in hbase-rest

Signed-off-by: stack 
Signed-off-by: Viraj Jasani 
---
 .../hadoop/hbase/rest/PerformanceEvaluation.java   | 239 +
 .../hadoop/hbase/rest/TestGetAndPutResource.java   |  23 +-
 .../hbase/rest/TestNamespacesInstanceResource.java |  20 +-
 .../hadoop/hbase/rest/TestNamespacesResource.java  |  10 +-
 .../hadoop/hbase/rest/TestScannersWithLabels.java  |  24 +--
 .../hadoop/hbase/rest/TestSchemaResource.java  |  12 +-
 .../apache/hadoop/hbase/rest/TestTableScan.java|  50 ++---
 .../hbase/rest/client/TestRemoteHTableRetries.java |   8 +-
 .../hadoop/hbase/rest/client/TestRemoteTable.java  |  19 +-
 .../hadoop/hbase/rest/model/TestScannerModel.java  |   7 +-
 .../rest/model/TestStorageClusterStatusModel.java  |  31 +--
 11 files changed, 192 insertions(+), 251 deletions(-)

diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
index 21d25e2..0d433f2 100644
--- 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
+++ 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
@@ -40,6 +40,7 @@ import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.ArrayBackedTag;
 import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HColumnDescriptor;
@@ -48,7 +49,6 @@ import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.Tag;
-import org.apache.hadoop.hbase.ArrayBackedTag;
 import org.apache.hadoop.hbase.client.BufferedMutator;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.ConnectionFactory;
@@ -121,8 +121,8 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
   private static final int ROWS_PER_GB = ONE_GB / ROW_LENGTH;
 
   public static final TableName TABLE_NAME = TableName.valueOf("TestTable");
-  public static final byte [] FAMILY_NAME = Bytes.toBytes("info");
-  public static final byte [] QUALIFIER_NAME = Bytes.toBytes("data");
+  public static final byte[] FAMILY_NAME = Bytes.toBytes("info");
+  public static final byte[] QUALIFIER_NAME = Bytes.toBytes("data");
   private TableName tableName = TABLE_NAME;
 
   protected HTableDescriptor TABLE_DESCRIPTOR;
@@ -144,6 +144,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
   private Connection connection;
 
   private static final Path PERF_EVAL_DIR = new Path("performance_evaluation");
+
   /**
* Regex to parse lines in input file passed to mapreduce task.
*/
@@ -162,11 +163,12 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
* Enum for map metrics.  Keep it out here rather than inside in the Map
* inner-class so we can find associated properties.
*/
-  protected static enum Counter {
+  protected enum Counter {
 /** elapsed time */
 ELAPSED_TIME,
 /** number of rows */
-ROWS}
+ROWS
+  }
 
   /**
* Constructor
@@ -214,7 +216,7 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
 /**
  * Sets status
  * @param msg status message
- * @throws IOException
+ * @throws IOException if setting the status fails
  */
 void setStatus(final String msg) throws IOException;
   }
@@ -226,18 +228,15 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
*  the record value is the PeInputSplit itself.
*/
   public static class PeInputSplit extends InputSplit implements Writable {
-private TableName tableName = TABLE_NAME;
-private int startRow = 0;
-private int rows = 0;
-private int totalRows = 0;
-private int clients = 0;
-private boolean flushCommits = false;
-private boolean writeToWAL = true;
-private boolean useTags = false;
-private int noOfTags = 0;
-
-public PeInputSplit() {
-}
+private TableName tableName;
+private int startRow;
+private int rows;
+private int totalRows;
+private int clients;
+private boolean flushCommits;
+

[hbase] branch master updated (d86778f -> e8d2931)

2020-01-01 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from d86778f  HBASE-23627 Resolved remaining Checkstyle violations in 
hbase-thrift
 add e8d2931  HBASE-23623 Reduced the number of Checkstyle violations in 
hbase-rest

No new revisions were added by this update.

Summary of changes:
 .../hadoop/hbase/rest/PerformanceEvaluation.java   | 239 +
 .../hadoop/hbase/rest/TestGetAndPutResource.java   |  23 +-
 .../hbase/rest/TestNamespacesInstanceResource.java |  20 +-
 .../hadoop/hbase/rest/TestNamespacesResource.java  |  10 +-
 .../hadoop/hbase/rest/TestScannersWithLabels.java  |  24 +--
 .../hadoop/hbase/rest/TestSchemaResource.java  |  12 +-
 .../apache/hadoop/hbase/rest/TestTableScan.java|  50 ++---
 .../hbase/rest/client/TestRemoteHTableRetries.java |   8 +-
 .../hadoop/hbase/rest/client/TestRemoteTable.java  |  19 +-
 .../hadoop/hbase/rest/model/TestScannerModel.java  |   7 +-
 .../rest/model/TestStorageClusterStatusModel.java  |  31 +--
 11 files changed, 192 insertions(+), 251 deletions(-)



[hbase] branch branch-2.2 updated: HBASE-23627 Resolved remaining Checkstyle violations in hbase-thrift

2020-01-01 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
 new 553985e  HBASE-23627 Resolved remaining Checkstyle violations in 
hbase-thrift
553985e is described below

commit 553985e1a4db2dcb12e7a50e1f6af7dc78e8d94d
Author: Jan Hentschel 
AuthorDate: Wed Jan 1 22:41:13 2020 +0100

HBASE-23627 Resolved remaining Checkstyle violations in hbase-thrift

Signed-off-by: Viraj Jasani 
Signed-off-by: stack 
---
 .../hadoop/hbase/thrift/IncrementCoalescer.java| 120 +++--
 .../thrift/TestThriftSpnegoHttpFallbackServer.java |  44 
 .../hbase/thrift/TestThriftSpnegoHttpServer.java   |  44 
 3 files changed, 102 insertions(+), 106 deletions(-)

diff --git 
a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/IncrementCoalescer.java
 
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/IncrementCoalescer.java
index 122675c..d8c2f03 100644
--- 
a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/IncrementCoalescer.java
+++ 
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/IncrementCoalescer.java
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase.thrift;
 
 import java.io.IOException;
@@ -35,7 +34,6 @@ import org.apache.hadoop.hbase.thrift.generated.TIncrement;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.Threads;
 import org.apache.hadoop.metrics2.util.MBeans;
-import org.apache.thrift.TException;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -51,7 +49,6 @@ import org.slf4j.LoggerFactory;
  */
 @InterfaceAudience.Private
 public class IncrementCoalescer implements IncrementCoalescerMBean {
-
   /**
* Used to identify a cell that will be incremented.
*
@@ -82,10 +79,6 @@ public class IncrementCoalescer implements 
IncrementCoalescerMBean {
   return rowKey;
 }
 
-public void setRowKey(byte[] rowKey) {
-  this.rowKey = rowKey;
-}
-
 public byte[] getFamily() {
   return family;
 }
@@ -115,17 +108,30 @@ public class IncrementCoalescer implements 
IncrementCoalescerMBean {
 
 @Override
 public boolean equals(Object obj) {
-  if (this == obj) return true;
-  if (obj == null) return false;
-  if (getClass() != obj.getClass()) return false;
+  if (this == obj) {
+return true;
+  }
+  if (obj == null) {
+return false;
+  }
+  if (getClass() != obj.getClass()) {
+return false;
+  }
+
   FullyQualifiedRow other = (FullyQualifiedRow) obj;
-  if (!Arrays.equals(family, other.family)) return false;
-  if (!Arrays.equals(qualifier, other.qualifier)) return false;
-  if (!Arrays.equals(rowKey, other.rowKey)) return false;
-  if (!Arrays.equals(table, other.table)) return false;
-  return true;
-}
 
+  if (!Arrays.equals(family, other.family)) {
+return false;
+  }
+  if (!Arrays.equals(qualifier, other.qualifier)) {
+return false;
+  }
+  if (!Arrays.equals(rowKey, other.rowKey)) {
+return false;
+  }
+
+  return Arrays.equals(table, other.table);
+}
   }
 
   private final LongAdder failedIncrements = new LongAdder();
@@ -139,9 +145,8 @@ public class IncrementCoalescer implements 
IncrementCoalescerMBean {
   private int maxQueueSize = 50;
   private static final int CORE_POOL_SIZE = 1;
 
-  private static final Logger LOG = 
LoggerFactory.getLogger(FullyQualifiedRow.class);
+  private static final Logger LOG = 
LoggerFactory.getLogger(IncrementCoalescer.class);
 
-  @SuppressWarnings("deprecation")
   public IncrementCoalescer(ThriftHBaseServiceHandler hand) {
 this.handler = hand;
 LinkedBlockingQueue queue = new LinkedBlockingQueue<>();
@@ -151,7 +156,7 @@ public class IncrementCoalescer implements 
IncrementCoalescerMBean {
 MBeans.register("thrift", "Thrift", this);
   }
 
-  public boolean queueIncrement(TIncrement inc) throws TException {
+  public boolean queueIncrement(TIncrement inc) {
 if (!canQueue()) {
   failedIncrements.increment();
   return false;
@@ -159,7 +164,7 @@ public class IncrementCoalescer implements 
IncrementCoalescerMBean {
 return internalQueueTincrement(inc);
   }
 
-  public boolean queueIncrements(List incs) throws TException {
+  public boolean queueIncrements(List incs) {
 if (!canQueue()) {
   failedIncrements.increment();
   return false;
@@ -169,12 +174,14 @@ public class IncrementCoalescer implements 
IncrementCoalescerMBean {
   internalQueueTincrement(tinc);
 }
 return true;
-
   }
 
-  private boolean internalQueueTincreme

[hbase] branch branch-2 updated: HBASE-23627 Resolved remaining Checkstyle violations in hbase-thrift

2020-01-01 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new a18a5c4  HBASE-23627 Resolved remaining Checkstyle violations in 
hbase-thrift
a18a5c4 is described below

commit a18a5c4baa2aee90830ac141ad70a76448aa3bb2
Author: Jan Hentschel 
AuthorDate: Wed Jan 1 22:41:13 2020 +0100

HBASE-23627 Resolved remaining Checkstyle violations in hbase-thrift

Signed-off-by: Viraj Jasani 
Signed-off-by: stack 
---
 .../hadoop/hbase/thrift/IncrementCoalescer.java| 94 ++
 .../thrift/TestThriftSpnegoHttpFallbackServer.java | 44 +-
 .../hbase/thrift/TestThriftSpnegoHttpServer.java   | 44 +-
 3 files changed, 84 insertions(+), 98 deletions(-)

diff --git 
a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/IncrementCoalescer.java
 
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/IncrementCoalescer.java
index 122675c..0649b26 100644
--- 
a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/IncrementCoalescer.java
+++ 
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/IncrementCoalescer.java
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase.thrift;
 
 import java.io.IOException;
@@ -35,7 +34,6 @@ import org.apache.hadoop.hbase.thrift.generated.TIncrement;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.Threads;
 import org.apache.hadoop.metrics2.util.MBeans;
-import org.apache.thrift.TException;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -51,7 +49,6 @@ import org.slf4j.LoggerFactory;
  */
 @InterfaceAudience.Private
 public class IncrementCoalescer implements IncrementCoalescerMBean {
-
   /**
* Used to identify a cell that will be incremented.
*
@@ -82,10 +79,6 @@ public class IncrementCoalescer implements 
IncrementCoalescerMBean {
   return rowKey;
 }
 
-public void setRowKey(byte[] rowKey) {
-  this.rowKey = rowKey;
-}
-
 public byte[] getFamily() {
   return family;
 }
@@ -119,13 +112,19 @@ public class IncrementCoalescer implements 
IncrementCoalescerMBean {
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   FullyQualifiedRow other = (FullyQualifiedRow) obj;
-  if (!Arrays.equals(family, other.family)) return false;
-  if (!Arrays.equals(qualifier, other.qualifier)) return false;
-  if (!Arrays.equals(rowKey, other.rowKey)) return false;
-  if (!Arrays.equals(table, other.table)) return false;
-  return true;
-}
 
+  if (!Arrays.equals(family, other.family)) {
+return false;
+  }
+  if (!Arrays.equals(qualifier, other.qualifier)) {
+return false;
+  }
+  if (!Arrays.equals(rowKey, other.rowKey)) {
+return false;
+  }
+
+  return Arrays.equals(table, other.table);
+}
   }
 
   private final LongAdder failedIncrements = new LongAdder();
@@ -139,9 +138,8 @@ public class IncrementCoalescer implements 
IncrementCoalescerMBean {
   private int maxQueueSize = 50;
   private static final int CORE_POOL_SIZE = 1;
 
-  private static final Logger LOG = 
LoggerFactory.getLogger(FullyQualifiedRow.class);
+  private static final Logger LOG = 
LoggerFactory.getLogger(IncrementCoalescer.class);
 
-  @SuppressWarnings("deprecation")
   public IncrementCoalescer(ThriftHBaseServiceHandler hand) {
 this.handler = hand;
 LinkedBlockingQueue queue = new LinkedBlockingQueue<>();
@@ -151,7 +149,7 @@ public class IncrementCoalescer implements 
IncrementCoalescerMBean {
 MBeans.register("thrift", "Thrift", this);
   }
 
-  public boolean queueIncrement(TIncrement inc) throws TException {
+  public boolean queueIncrement(TIncrement inc) {
 if (!canQueue()) {
   failedIncrements.increment();
   return false;
@@ -159,7 +157,7 @@ public class IncrementCoalescer implements 
IncrementCoalescerMBean {
 return internalQueueTincrement(inc);
   }
 
-  public boolean queueIncrements(List incs) throws TException {
+  public boolean queueIncrements(List incs) {
 if (!canQueue()) {
   failedIncrements.increment();
   return false;
@@ -172,7 +170,7 @@ public class IncrementCoalescer implements 
IncrementCoalescerMBean {
 
   }
 
-  private boolean internalQueueTincrement(TIncrement inc) throws TException {
+  private boolean internalQueueTincrement(TIncrement inc) {
 byte[][] famAndQf = CellUtil.parseColumn(inc.getColumn());
 if (famAndQf.length != 2) return false;
 
@@ -182,7 +180,7 @@ public class IncrementCoalescer implements 
IncrementCoalescerMBean {
 
   @SuppressWarnings("FutureReturnValueIgnored&qu

[hbase] branch master updated (e0eb98c -> d86778f)

2020-01-01 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git.


from e0eb98c  HBASE-23625 Reduced number of Checkstyle violations in 
hbase-common
 add d86778f  HBASE-23627 Resolved remaining Checkstyle violations in 
hbase-thrift

No new revisions were added by this update.

Summary of changes:
 .../hadoop/hbase/thrift/IncrementCoalescer.java| 85 +-
 .../thrift/TestThriftSpnegoHttpFallbackServer.java | 44 +--
 .../hbase/thrift/TestThriftSpnegoHttpServer.java   | 44 +--
 3 files changed, 74 insertions(+), 99 deletions(-)



[hbase] branch master updated: HBASE-23625 Reduced number of Checkstyle violations in hbase-common

2020-01-01 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new e0eb98c  HBASE-23625 Reduced number of Checkstyle violations in 
hbase-common
e0eb98c is described below

commit e0eb98c96368feaf493ec0f13933df40420bed7b
Author: Jan Hentschel 
AuthorDate: Wed Jan 1 22:32:37 2020 +0100

HBASE-23625 Reduced number of Checkstyle violations in hbase-common

Signed-off-by: stack 
---
 .../java/org/apache/hadoop/hbase/CellScanner.java  |  3 +-
 .../hadoop/hbase/IndividualBytesFieldCell.java | 55 +++--
 .../hadoop/hbase/util/AbstractByteRange.java   | 41 +++---
 .../hbase/util/AbstractPositionedByteRange.java| 91 ++
 .../org/apache/hadoop/hbase/util/AtomicUtils.java  |  6 +-
 .../hadoop/hbase/util/DynamicClassLoader.java  | 71 +
 .../apache/hadoop/hbase/util/ExceptionUtil.java| 30 ---
 .../java/org/apache/hadoop/hbase/util/Methods.java |  6 +-
 .../java/org/apache/hadoop/hbase/util/Sleeper.java | 12 +--
 .../java/org/apache/hadoop/hbase/util/Strings.java | 14 ++--
 10 files changed, 128 insertions(+), 201 deletions(-)

diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellScanner.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellScanner.java
index 9d0b8d8..3765f6d 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellScanner.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellScanner.java
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase;
 
 import java.io.IOException;
@@ -56,7 +55,7 @@ public interface CellScanner {
   /**
* Advance the scanner 1 cell.
* @return true if the next cell is found and {@link #current()} will return 
a valid Cell
-   * @throws IOException
+   * @throws IOException if advancing the scanner fails
*/
   boolean advance() throws IOException;
 }
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/IndividualBytesFieldCell.java
 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/IndividualBytesFieldCell.java
index e477023..5b4c429 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/IndividualBytesFieldCell.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/IndividualBytesFieldCell.java
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase;
 
 import org.apache.commons.lang3.ArrayUtils;
@@ -25,12 +24,14 @@ import org.apache.yetus.audience.InterfaceAudience;
 
 @InterfaceAudience.Private
 public class IndividualBytesFieldCell implements ExtendedCell, Cloneable {
-
-  private static final long FIXED_OVERHEAD = ClassSize.align(  // do 
alignment(padding gap)
-ClassSize.OBJECT  // object header
-  + KeyValue.TIMESTAMP_TYPE_SIZE  // timestamp and type
-  + Bytes.SIZEOF_LONG // sequence id
-  + 5 * ClassSize.REFERENCE); // references to all byte arrays: row, 
family, qualifier, value, tags
+  // do alignment(padding gap)
+  private static final long FIXED_OVERHEAD = ClassSize.align(ClassSize.OBJECT 
// object header
+// timestamp and type
++ KeyValue.TIMESTAMP_TYPE_SIZE
+// sequence id
++ Bytes.SIZEOF_LONG
+// references to all byte arrays: row, family, qualifier, value, tags
++ 5 * ClassSize.REFERENCE);
 
   // The following fields are backed by individual byte arrays
   private final byte[] row;
@@ -54,13 +55,8 @@ public class IndividualBytesFieldCell implements 
ExtendedCell, Cloneable {
   private final byte type;  // A byte, rather than 
org.apache.hadoop.hbase.KeyValue.Type
   private long seqId;
 
-  public IndividualBytesFieldCell(byte[] row, byte[] family, byte[] qualifier,
-  long timestamp, KeyValue.Type type,  byte[] 
value) {
-this(row, family, qualifier, timestamp, type, 0L /* sequence id */, value, 
null /* tags */);
-  }
-
-  public IndividualBytesFieldCell(byte[] row, byte[] family, byte[] qualifier,
-  long timestamp, KeyValue.Type type, long 
seqId, byte[] value, byte[] tags) {
+  public IndividualBytesFieldCell(byte[] row, byte[] family, byte[] qualifier, 
long timestamp,
+  KeyValue.Type type, long seqId, byte[] value, byte[] tags) {
 this(row, 0, ArrayUtils.getLength(row),
 family, 0, ArrayUtils.getLength(family),
 qualifier, 0, ArrayUtils.getLength(qualifier),
@@ -69,13 +65,10 @@ public class IndividualBytesFieldCell implements 
ExtendedCell, Cloneable {
 tags, 0, ArrayUtils.getLength(tags));
   }
 
-  public IndividualBytesFieldCell(byte[] row, int rOffset, int rLength

[hbase] branch branch-2.1 updated: HBASE-23626 Reduced number of Checkstyle violations in tests in hbase-common

2019-12-29 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
 new ec5a7bb  HBASE-23626 Reduced number of Checkstyle violations in tests 
in hbase-common
ec5a7bb is described below

commit ec5a7bb2330a1cd094b4f51192b2276052e7b644
Author: Jan Hentschel 
AuthorDate: Sun Dec 29 22:39:09 2019 +0100

HBASE-23626 Reduced number of Checkstyle violations in tests in hbase-common

Signed-off-by: Viraj Jasani 
---
 .../org/apache/hadoop/hbase/net/TestAddress.java   |   3 +-
 .../org/apache/hadoop/hbase/types/TestStruct.java  | 122 +-
 .../org/apache/hadoop/hbase/types/TestUnion2.java  |  35 +--
 .../hadoop/hbase/util/ClassLoaderTestHelper.java   |  36 +--
 .../util/EnvironmentEdgeManagerTestHelper.java |   4 +-
 .../org/apache/hadoop/hbase/util/TestBytes.java| 246 ++---
 .../hbase/util/TestCoprocessorClassLoader.java |  22 +-
 .../apache/hadoop/hbase/util/TestOrderedBytes.java | 194 +---
 .../util/TestSimplePositionedMutableByteRange.java |  12 +-
 .../hbase/util/TimeOffsetEnvironmentEdge.java  |  15 +-
 10 files changed, 354 insertions(+), 335 deletions(-)

diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/net/TestAddress.java 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/net/TestAddress.java
index 340f864..0517c46 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/net/TestAddress.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/net/TestAddress.java
@@ -17,6 +17,7 @@
  */
 package org.apache.hadoop.hbase.net;
 
+import static org.junit.Assert.assertEquals;
 
 import org.apache.hadoop.hbase.HBaseClassTestRule;
 import org.apache.hadoop.hbase.testclassification.MiscTests;
@@ -25,8 +26,6 @@ import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import static org.junit.Assert.assertEquals;
-
 @Category({ MiscTests.class, SmallTests.class })
 public class TestAddress {
   @ClassRule
diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java
index d1a0fa6..f02e3cf 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java
@@ -47,12 +47,11 @@ import org.junit.runners.Parameterized.Parameters;
 @RunWith(Parameterized.class)
 @Category({MiscTests.class, SmallTests.class})
 public class TestStruct {
-
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
   HBaseClassTestRule.forClass(TestStruct.class);
 
-  @Parameterized.Parameter(value = 0)
+  @Parameterized.Parameter()
   public Struct generic;
 
   @SuppressWarnings("rawtypes")
@@ -88,16 +87,21 @@ public class TestStruct {
 return Arrays.asList(params);
   }
 
-  static final Comparator NULL_SAFE_BYTES_COMPARATOR =
-  new Comparator() {
-@Override
-public int compare(byte[] o1, byte[] o2) {
-  if (o1 == o2) return 0;
-  if (null == o1) return -1;
-  if (null == o2) return 1;
-  return Bytes.compareTo(o1, o2);
-}
-  };
+  static final Comparator NULL_SAFE_BYTES_COMPARATOR = (o1, o2) -> {
+if (o1 == o2) {
+  return 0;
+}
+
+if (null == o1) {
+  return -1;
+}
+
+if (null == o2) {
+  return 1;
+}
+
+return Bytes.compareTo(o1, o2);
+  };
 
   /**
* A simple object to serialize.
@@ -134,7 +138,7 @@ public class TestStruct {
   if (cmp != 0) {
 return cmp;
   }
-  cmp = 
Integer.valueOf(intFieldAsc).compareTo(Integer.valueOf(o.intFieldAsc));
+  cmp = Integer.compare(intFieldAsc, o.intFieldAsc);
   if (cmp != 0) {
 return cmp;
   }
@@ -173,13 +177,10 @@ public class TestStruct {
 return false;
   }
   if (stringFieldAsc == null) {
-if (other.stringFieldAsc != null) {
-  return false;
-}
-  } else if (!stringFieldAsc.equals(other.stringFieldAsc)) {
-return false;
+return other.stringFieldAsc == null;
+  } else {
+return stringFieldAsc.equals(other.stringFieldAsc);
   }
-  return true;
 }
   }
 
@@ -225,16 +226,17 @@ public class TestStruct {
   if (cmp != 0) {
 return cmp;
   }
+
   if (null == stringFieldDsc) {
 cmp = 1;
-  }
-  else if (null == o.stringFieldDsc) {
+  } else if (null == o.stringFieldDsc) {
 cmp = -1;
-  }
-  else if (stringFieldDsc.equals(o.stringFieldDsc)) {
+  } else if (stringFieldDsc.equals(o.stringFieldDsc)) {
 cmp = 0;
+  } else {
+cmp = -stringFieldDsc.compareTo(o.stringFieldDsc);
   }
-  else cmp = -stringFieldDsc.compareTo(o.stringFieldDsc);
+
 

[hbase] branch branch-2.2 updated: HBASE-23626 Reduced number of Checkstyle violations in tests in hbase-common

2019-12-29 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
 new a1d5e81  HBASE-23626 Reduced number of Checkstyle violations in tests 
in hbase-common
a1d5e81 is described below

commit a1d5e814bbe02a456bae8e27286fb6fa8484e35d
Author: Jan Hentschel 
AuthorDate: Sun Dec 29 22:39:09 2019 +0100

HBASE-23626 Reduced number of Checkstyle violations in tests in hbase-common

Signed-off-by: Viraj Jasani 
---
 .../org/apache/hadoop/hbase/net/TestAddress.java   |   3 +-
 .../org/apache/hadoop/hbase/types/TestStruct.java  | 122 +-
 .../org/apache/hadoop/hbase/types/TestUnion2.java  |  35 +--
 .../hadoop/hbase/util/ClassLoaderTestHelper.java   |  36 +--
 .../util/EnvironmentEdgeManagerTestHelper.java |   4 +-
 .../org/apache/hadoop/hbase/util/TestBytes.java| 246 ++---
 .../hbase/util/TestCoprocessorClassLoader.java |  22 +-
 .../apache/hadoop/hbase/util/TestOrderedBytes.java | 194 +---
 .../util/TestSimplePositionedMutableByteRange.java |  12 +-
 .../hbase/util/TimeOffsetEnvironmentEdge.java  |  15 +-
 10 files changed, 354 insertions(+), 335 deletions(-)

diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/net/TestAddress.java 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/net/TestAddress.java
index 340f864..0517c46 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/net/TestAddress.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/net/TestAddress.java
@@ -17,6 +17,7 @@
  */
 package org.apache.hadoop.hbase.net;
 
+import static org.junit.Assert.assertEquals;
 
 import org.apache.hadoop.hbase.HBaseClassTestRule;
 import org.apache.hadoop.hbase.testclassification.MiscTests;
@@ -25,8 +26,6 @@ import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import static org.junit.Assert.assertEquals;
-
 @Category({ MiscTests.class, SmallTests.class })
 public class TestAddress {
   @ClassRule
diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java
index d1a0fa6..f02e3cf 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java
@@ -47,12 +47,11 @@ import org.junit.runners.Parameterized.Parameters;
 @RunWith(Parameterized.class)
 @Category({MiscTests.class, SmallTests.class})
 public class TestStruct {
-
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
   HBaseClassTestRule.forClass(TestStruct.class);
 
-  @Parameterized.Parameter(value = 0)
+  @Parameterized.Parameter()
   public Struct generic;
 
   @SuppressWarnings("rawtypes")
@@ -88,16 +87,21 @@ public class TestStruct {
 return Arrays.asList(params);
   }
 
-  static final Comparator NULL_SAFE_BYTES_COMPARATOR =
-  new Comparator() {
-@Override
-public int compare(byte[] o1, byte[] o2) {
-  if (o1 == o2) return 0;
-  if (null == o1) return -1;
-  if (null == o2) return 1;
-  return Bytes.compareTo(o1, o2);
-}
-  };
+  static final Comparator NULL_SAFE_BYTES_COMPARATOR = (o1, o2) -> {
+if (o1 == o2) {
+  return 0;
+}
+
+if (null == o1) {
+  return -1;
+}
+
+if (null == o2) {
+  return 1;
+}
+
+return Bytes.compareTo(o1, o2);
+  };
 
   /**
* A simple object to serialize.
@@ -134,7 +138,7 @@ public class TestStruct {
   if (cmp != 0) {
 return cmp;
   }
-  cmp = 
Integer.valueOf(intFieldAsc).compareTo(Integer.valueOf(o.intFieldAsc));
+  cmp = Integer.compare(intFieldAsc, o.intFieldAsc);
   if (cmp != 0) {
 return cmp;
   }
@@ -173,13 +177,10 @@ public class TestStruct {
 return false;
   }
   if (stringFieldAsc == null) {
-if (other.stringFieldAsc != null) {
-  return false;
-}
-  } else if (!stringFieldAsc.equals(other.stringFieldAsc)) {
-return false;
+return other.stringFieldAsc == null;
+  } else {
+return stringFieldAsc.equals(other.stringFieldAsc);
   }
-  return true;
 }
   }
 
@@ -225,16 +226,17 @@ public class TestStruct {
   if (cmp != 0) {
 return cmp;
   }
+
   if (null == stringFieldDsc) {
 cmp = 1;
-  }
-  else if (null == o.stringFieldDsc) {
+  } else if (null == o.stringFieldDsc) {
 cmp = -1;
-  }
-  else if (stringFieldDsc.equals(o.stringFieldDsc)) {
+  } else if (stringFieldDsc.equals(o.stringFieldDsc)) {
 cmp = 0;
+  } else {
+cmp = -stringFieldDsc.compareTo(o.stringFieldDsc);
   }
-  else cmp = -stringFieldDsc.compareTo(o.stringFieldDsc);
+
 

[hbase] branch branch-2 updated: HBASE-23626 Reduced number of Checkstyle violations in tests in hbase-common

2019-12-29 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new 71a0c30  HBASE-23626 Reduced number of Checkstyle violations in tests 
in hbase-common
71a0c30 is described below

commit 71a0c30cafad224f748df8551d535e8102b96cae
Author: Jan Hentschel 
AuthorDate: Sun Dec 29 22:39:09 2019 +0100

HBASE-23626 Reduced number of Checkstyle violations in tests in hbase-common

Signed-off-by: Viraj Jasani 
---
 .../org/apache/hadoop/hbase/net/TestAddress.java   |   3 +-
 .../org/apache/hadoop/hbase/types/TestStruct.java  | 122 +-
 .../org/apache/hadoop/hbase/types/TestUnion2.java  |  35 +--
 .../hadoop/hbase/util/ClassLoaderTestHelper.java   |  36 +--
 .../util/EnvironmentEdgeManagerTestHelper.java |   4 +-
 .../org/apache/hadoop/hbase/util/TestBytes.java| 246 ++---
 .../hbase/util/TestCoprocessorClassLoader.java |  22 +-
 .../apache/hadoop/hbase/util/TestOrderedBytes.java | 194 +---
 .../util/TestSimplePositionedMutableByteRange.java |  12 +-
 .../hbase/util/TimeOffsetEnvironmentEdge.java  |  15 +-
 10 files changed, 354 insertions(+), 335 deletions(-)

diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/net/TestAddress.java 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/net/TestAddress.java
index 340f864..0517c46 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/net/TestAddress.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/net/TestAddress.java
@@ -17,6 +17,7 @@
  */
 package org.apache.hadoop.hbase.net;
 
+import static org.junit.Assert.assertEquals;
 
 import org.apache.hadoop.hbase.HBaseClassTestRule;
 import org.apache.hadoop.hbase.testclassification.MiscTests;
@@ -25,8 +26,6 @@ import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import static org.junit.Assert.assertEquals;
-
 @Category({ MiscTests.class, SmallTests.class })
 public class TestAddress {
   @ClassRule
diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java
index d1a0fa6..f02e3cf 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java
@@ -47,12 +47,11 @@ import org.junit.runners.Parameterized.Parameters;
 @RunWith(Parameterized.class)
 @Category({MiscTests.class, SmallTests.class})
 public class TestStruct {
-
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
   HBaseClassTestRule.forClass(TestStruct.class);
 
-  @Parameterized.Parameter(value = 0)
+  @Parameterized.Parameter()
   public Struct generic;
 
   @SuppressWarnings("rawtypes")
@@ -88,16 +87,21 @@ public class TestStruct {
 return Arrays.asList(params);
   }
 
-  static final Comparator NULL_SAFE_BYTES_COMPARATOR =
-  new Comparator() {
-@Override
-public int compare(byte[] o1, byte[] o2) {
-  if (o1 == o2) return 0;
-  if (null == o1) return -1;
-  if (null == o2) return 1;
-  return Bytes.compareTo(o1, o2);
-}
-  };
+  static final Comparator NULL_SAFE_BYTES_COMPARATOR = (o1, o2) -> {
+if (o1 == o2) {
+  return 0;
+}
+
+if (null == o1) {
+  return -1;
+}
+
+if (null == o2) {
+  return 1;
+}
+
+return Bytes.compareTo(o1, o2);
+  };
 
   /**
* A simple object to serialize.
@@ -134,7 +138,7 @@ public class TestStruct {
   if (cmp != 0) {
 return cmp;
   }
-  cmp = 
Integer.valueOf(intFieldAsc).compareTo(Integer.valueOf(o.intFieldAsc));
+  cmp = Integer.compare(intFieldAsc, o.intFieldAsc);
   if (cmp != 0) {
 return cmp;
   }
@@ -173,13 +177,10 @@ public class TestStruct {
 return false;
   }
   if (stringFieldAsc == null) {
-if (other.stringFieldAsc != null) {
-  return false;
-}
-  } else if (!stringFieldAsc.equals(other.stringFieldAsc)) {
-return false;
+return other.stringFieldAsc == null;
+  } else {
+return stringFieldAsc.equals(other.stringFieldAsc);
   }
-  return true;
 }
   }
 
@@ -225,16 +226,17 @@ public class TestStruct {
   if (cmp != 0) {
 return cmp;
   }
+
   if (null == stringFieldDsc) {
 cmp = 1;
-  }
-  else if (null == o.stringFieldDsc) {
+  } else if (null == o.stringFieldDsc) {
 cmp = -1;
-  }
-  else if (stringFieldDsc.equals(o.stringFieldDsc)) {
+  } else if (stringFieldDsc.equals(o.stringFieldDsc)) {
 cmp = 0;
+  } else {
+cmp = -stringFieldDsc.compareTo(o.stringFieldDsc);
   }
-  else cmp = -stringFieldDsc.compareTo(o.stringFieldDsc);
+
  

[hbase] branch master updated: HBASE-23626 Reduced number of Checkstyle violations in tests in hbase-common

2019-12-29 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new 923ba77  HBASE-23626 Reduced number of Checkstyle violations in tests 
in hbase-common
923ba77 is described below

commit 923ba7763edecbf370ab9fd991f83c19464cdcc2
Author: Jan Hentschel 
AuthorDate: Sun Dec 29 22:39:09 2019 +0100

HBASE-23626 Reduced number of Checkstyle violations in tests in hbase-common

Signed-off-by: Viraj Jasani 
---
 .../org/apache/hadoop/hbase/net/TestAddress.java   |   4 +-
 .../org/apache/hadoop/hbase/types/TestStruct.java  | 122 +-
 .../org/apache/hadoop/hbase/types/TestUnion2.java  |  35 +--
 .../hadoop/hbase/util/ClassLoaderTestHelper.java   |  36 +--
 .../util/EnvironmentEdgeManagerTestHelper.java |   4 +-
 .../org/apache/hadoop/hbase/util/TestBytes.java| 246 ++---
 .../hbase/util/TestCoprocessorClassLoader.java |  22 +-
 .../apache/hadoop/hbase/util/TestOrderedBytes.java | 194 +---
 .../util/TestSimplePositionedMutableByteRange.java |  12 +-
 .../hbase/util/TimeOffsetEnvironmentEdge.java  |  15 +-
 10 files changed, 355 insertions(+), 335 deletions(-)

diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/net/TestAddress.java 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/net/TestAddress.java
index 89fe42a..0517c46 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/net/TestAddress.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/net/TestAddress.java
@@ -17,6 +17,8 @@
  */
 package org.apache.hadoop.hbase.net;
 
+import static org.junit.Assert.assertEquals;
+
 import org.apache.hadoop.hbase.HBaseClassTestRule;
 import org.apache.hadoop.hbase.testclassification.MiscTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
@@ -24,8 +26,6 @@ import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import static org.junit.Assert.assertEquals;
-
 @Category({ MiscTests.class, SmallTests.class })
 public class TestAddress {
   @ClassRule
diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java
index 428d130..82020d8 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestStruct.java
@@ -47,12 +47,11 @@ import org.junit.runners.Parameterized.Parameters;
 @RunWith(Parameterized.class)
 @Category({MiscTests.class, SmallTests.class})
 public class TestStruct {
-
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
   HBaseClassTestRule.forClass(TestStruct.class);
 
-  @Parameterized.Parameter(value = 0)
+  @Parameterized.Parameter()
   public Struct generic;
 
   @SuppressWarnings("rawtypes")
@@ -88,16 +87,21 @@ public class TestStruct {
 return Arrays.asList(params);
   }
 
-  static final Comparator NULL_SAFE_BYTES_COMPARATOR =
-  new Comparator() {
-@Override
-public int compare(byte[] o1, byte[] o2) {
-  if (o1 == o2) return 0;
-  if (null == o1) return -1;
-  if (null == o2) return 1;
-  return Bytes.compareTo(o1, o2);
-}
-  };
+  static final Comparator NULL_SAFE_BYTES_COMPARATOR = (o1, o2) -> {
+if (o1 == o2) {
+  return 0;
+}
+
+if (null == o1) {
+  return -1;
+}
+
+if (null == o2) {
+  return 1;
+}
+
+return Bytes.compareTo(o1, o2);
+  };
 
   /**
* A simple object to serialize.
@@ -134,7 +138,7 @@ public class TestStruct {
   if (cmp != 0) {
 return cmp;
   }
-  cmp = 
Integer.valueOf(intFieldAsc).compareTo(Integer.valueOf(o.intFieldAsc));
+  cmp = Integer.compare(intFieldAsc, o.intFieldAsc);
   if (cmp != 0) {
 return cmp;
   }
@@ -173,13 +177,10 @@ public class TestStruct {
 return false;
   }
   if (stringFieldAsc == null) {
-if (other.stringFieldAsc != null) {
-  return false;
-}
-  } else if (!stringFieldAsc.equals(other.stringFieldAsc)) {
-return false;
+return other.stringFieldAsc == null;
+  } else {
+return stringFieldAsc.equals(other.stringFieldAsc);
   }
-  return true;
 }
   }
 
@@ -225,16 +226,17 @@ public class TestStruct {
   if (cmp != 0) {
 return cmp;
   }
+
   if (null == stringFieldDsc) {
 cmp = 1;
-  }
-  else if (null == o.stringFieldDsc) {
+  } else if (null == o.stringFieldDsc) {
 cmp = -1;
-  }
-  else if (stringFieldDsc.equals(o.stringFieldDsc)) {
+  } else if (stringFieldDsc.equals(o.stringFieldDsc)) {
 cmp = 0;
+  } else {
+cmp = -stringFieldDsc.compareTo(o.stringFieldDsc);
   }
- 

[hbase] branch branch-2.1 updated: HBASE-23622 Reduced the number of Checkstyle violations in hbase-common

2019-12-28 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
 new ca0aaaf  HBASE-23622 Reduced the number of Checkstyle violations in 
hbase-common
ca0aaaf is described below

commit ca0aaaff30a0b27b2687a93694dbdda34cd2ef38
Author: Jan Hentschel 
AuthorDate: Sat Dec 28 20:03:58 2019 +0100

HBASE-23622 Reduced the number of Checkstyle violations in hbase-common

Signed-off-by: stack 
Signed-off-by: Viraj Jasani 
---
 .../org/apache/hadoop/hbase/BBKVComparator.java|  5 +-
 .../org/apache/hadoop/hbase/CellComparator.java|  2 +-
 .../apache/hadoop/hbase/CellComparatorImpl.java| 10 ++--
 .../java/org/apache/hadoop/hbase/net/Address.java  |  9 ++-
 .../hadoop/hbase/trace/SpanReceiverHost.java   | 10 ++--
 .../org/apache/hadoop/hbase/trace/TraceUtil.java   |  6 +-
 .../apache/hadoop/hbase/util/ByteRangeUtils.java   | 12 ++--
 .../apache/hadoop/hbase/util/CommonFSUtils.java| 70 --
 .../hadoop/hbase/util/ConcatenatedLists.java   |  5 +-
 .../java/org/apache/hadoop/hbase/util/Order.java   | 41 +
 10 files changed, 89 insertions(+), 81 deletions(-)

diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/BBKVComparator.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/BBKVComparator.java
index 017586d..bc76a9d 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/BBKVComparator.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/BBKVComparator.java
@@ -20,11 +20,11 @@ package org.apache.hadoop.hbase;
 import java.util.Comparator;
 
 import org.apache.hadoop.hbase.util.ByteBufferUtils;
-import org.apache.hbase.thirdparty.com.google.common.primitives.Longs;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.hbase.thirdparty.com.google.common.primitives.Longs;
 
 /**
  * A comparator for case where {@link ByteBufferKeyValue} is prevalent type 
(BBKV
@@ -71,7 +71,6 @@ public class BBKVComparator implements Comparator {
 
   @Override
   public int compare(Object l, Object r) {
-// LOG.info("ltype={} rtype={}", l, r);
 if ((l instanceof ByteBufferKeyValue) && (r instanceof 
ByteBufferKeyValue)) {
   return compare((ByteBufferKeyValue)l, (ByteBufferKeyValue)r, false);
 }
@@ -81,7 +80,7 @@ public class BBKVComparator implements Comparator {
 
   // TODO: Come back here. We get a few percentage points extra of throughput 
if this is a
   // private method.
-  static final int compare(ByteBufferKeyValue left, ByteBufferKeyValue right,
+  static int compare(ByteBufferKeyValue left, ByteBufferKeyValue right,
   boolean ignoreSequenceid) {
 // NOTE: Same method is in CellComparatorImpl, also private, not shared, 
intentionally. Not
 // sharing gets us a few percent more throughput in compares. If changes 
here or there, make
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java
index 3529d54..83a868d 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java
@@ -54,7 +54,7 @@ public interface CellComparator extends Comparator {
   /**
* Compare cells.
* @param ignoreSequenceid True if we are to compare the key portion only 
and ignore
-   * the sequenceid. Set to false to compare key and consider sequenceid.
+   *the sequenceid. Set to false to compare key and consider sequenceid.
* @return 0 if equal, -1 if a  b, and +1 if a  b.
*/
   int compare(Cell leftCell, Cell rightCell, boolean ignoreSequenceid);
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java
index 707d919..c647318 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase;
 
 import java.util.Comparator;
@@ -23,13 +22,12 @@ import java.util.Comparator;
 import org.apache.hadoop.hbase.KeyValue.Type;
 import org.apache.hadoop.hbase.util.ByteBufferUtils;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hbase.thirdparty.com.google.common.primitives.Longs;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.yetus.audience.InterfaceStability;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-
+import org.apache.hbase.thirdparty.com.google.common.primitives.Longs;
 
 /**
  * Compare two HBase 

[hbase] branch branch-2.2 updated: HBASE-23622 Reduced the number of Checkstyle violations in hbase-common

2019-12-28 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
 new 19d5d4b  HBASE-23622 Reduced the number of Checkstyle violations in 
hbase-common
19d5d4b is described below

commit 19d5d4bc80c77b3239898c0ff400edf6e44b1257
Author: Jan Hentschel 
AuthorDate: Sat Dec 28 20:03:58 2019 +0100

HBASE-23622 Reduced the number of Checkstyle violations in hbase-common

Signed-off-by: stack 
Signed-off-by: Viraj Jasani 
---
 .../org/apache/hadoop/hbase/BBKVComparator.java|  5 +-
 .../org/apache/hadoop/hbase/CellComparator.java|  2 +-
 .../apache/hadoop/hbase/CellComparatorImpl.java| 10 ++--
 .../java/org/apache/hadoop/hbase/net/Address.java  |  9 ++-
 .../hadoop/hbase/trace/SpanReceiverHost.java   | 10 ++--
 .../org/apache/hadoop/hbase/trace/TraceUtil.java   |  6 +-
 .../apache/hadoop/hbase/util/ByteRangeUtils.java   | 12 ++--
 .../apache/hadoop/hbase/util/CommonFSUtils.java| 70 --
 .../hadoop/hbase/util/ConcatenatedLists.java   |  5 +-
 .../java/org/apache/hadoop/hbase/util/Order.java   | 41 +
 10 files changed, 89 insertions(+), 81 deletions(-)

diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/BBKVComparator.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/BBKVComparator.java
index 017586d..bc76a9d 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/BBKVComparator.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/BBKVComparator.java
@@ -20,11 +20,11 @@ package org.apache.hadoop.hbase;
 import java.util.Comparator;
 
 import org.apache.hadoop.hbase.util.ByteBufferUtils;
-import org.apache.hbase.thirdparty.com.google.common.primitives.Longs;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.hbase.thirdparty.com.google.common.primitives.Longs;
 
 /**
  * A comparator for case where {@link ByteBufferKeyValue} is prevalent type 
(BBKV
@@ -71,7 +71,6 @@ public class BBKVComparator implements Comparator {
 
   @Override
   public int compare(Object l, Object r) {
-// LOG.info("ltype={} rtype={}", l, r);
 if ((l instanceof ByteBufferKeyValue) && (r instanceof 
ByteBufferKeyValue)) {
   return compare((ByteBufferKeyValue)l, (ByteBufferKeyValue)r, false);
 }
@@ -81,7 +80,7 @@ public class BBKVComparator implements Comparator {
 
   // TODO: Come back here. We get a few percentage points extra of throughput 
if this is a
   // private method.
-  static final int compare(ByteBufferKeyValue left, ByteBufferKeyValue right,
+  static int compare(ByteBufferKeyValue left, ByteBufferKeyValue right,
   boolean ignoreSequenceid) {
 // NOTE: Same method is in CellComparatorImpl, also private, not shared, 
intentionally. Not
 // sharing gets us a few percent more throughput in compares. If changes 
here or there, make
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java
index 3529d54..83a868d 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java
@@ -54,7 +54,7 @@ public interface CellComparator extends Comparator {
   /**
* Compare cells.
* @param ignoreSequenceid True if we are to compare the key portion only 
and ignore
-   * the sequenceid. Set to false to compare key and consider sequenceid.
+   *the sequenceid. Set to false to compare key and consider sequenceid.
* @return 0 if equal, -1 if a  b, and +1 if a  b.
*/
   int compare(Cell leftCell, Cell rightCell, boolean ignoreSequenceid);
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java
index 707d919..c647318 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase;
 
 import java.util.Comparator;
@@ -23,13 +22,12 @@ import java.util.Comparator;
 import org.apache.hadoop.hbase.KeyValue.Type;
 import org.apache.hadoop.hbase.util.ByteBufferUtils;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hbase.thirdparty.com.google.common.primitives.Longs;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.yetus.audience.InterfaceStability;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-
+import org.apache.hbase.thirdparty.com.google.common.primitives.Longs;
 
 /**
  * Compare two HBase 

[hbase] branch branch-2 updated: HBASE-23622 Reduced the number of Checkstyle violations in hbase-common

2019-12-28 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new f3e11d7  HBASE-23622 Reduced the number of Checkstyle violations in 
hbase-common
f3e11d7 is described below

commit f3e11d7691db2b43a07fc4c968e937e2c09a3eee
Author: Jan Hentschel 
AuthorDate: Sat Dec 28 20:03:58 2019 +0100

HBASE-23622 Reduced the number of Checkstyle violations in hbase-common

Signed-off-by: stack 
Signed-off-by: Viraj Jasani 
---
 .../org/apache/hadoop/hbase/BBKVComparator.java|  5 +-
 .../org/apache/hadoop/hbase/CellComparator.java|  2 +-
 .../apache/hadoop/hbase/CellComparatorImpl.java| 10 ++--
 .../java/org/apache/hadoop/hbase/net/Address.java  |  9 ++-
 .../hadoop/hbase/trace/SpanReceiverHost.java   | 10 ++--
 .../org/apache/hadoop/hbase/trace/TraceUtil.java   |  6 +-
 .../apache/hadoop/hbase/util/ByteRangeUtils.java   | 12 ++--
 .../apache/hadoop/hbase/util/CommonFSUtils.java| 70 --
 .../hadoop/hbase/util/ConcatenatedLists.java   |  5 +-
 .../java/org/apache/hadoop/hbase/util/Order.java   | 41 +
 10 files changed, 89 insertions(+), 81 deletions(-)

diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/BBKVComparator.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/BBKVComparator.java
index 017586d..bc76a9d 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/BBKVComparator.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/BBKVComparator.java
@@ -20,11 +20,11 @@ package org.apache.hadoop.hbase;
 import java.util.Comparator;
 
 import org.apache.hadoop.hbase.util.ByteBufferUtils;
-import org.apache.hbase.thirdparty.com.google.common.primitives.Longs;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.hbase.thirdparty.com.google.common.primitives.Longs;
 
 /**
  * A comparator for case where {@link ByteBufferKeyValue} is prevalent type 
(BBKV
@@ -71,7 +71,6 @@ public class BBKVComparator implements Comparator {
 
   @Override
   public int compare(Object l, Object r) {
-// LOG.info("ltype={} rtype={}", l, r);
 if ((l instanceof ByteBufferKeyValue) && (r instanceof 
ByteBufferKeyValue)) {
   return compare((ByteBufferKeyValue)l, (ByteBufferKeyValue)r, false);
 }
@@ -81,7 +80,7 @@ public class BBKVComparator implements Comparator {
 
   // TODO: Come back here. We get a few percentage points extra of throughput 
if this is a
   // private method.
-  static final int compare(ByteBufferKeyValue left, ByteBufferKeyValue right,
+  static int compare(ByteBufferKeyValue left, ByteBufferKeyValue right,
   boolean ignoreSequenceid) {
 // NOTE: Same method is in CellComparatorImpl, also private, not shared, 
intentionally. Not
 // sharing gets us a few percent more throughput in compares. If changes 
here or there, make
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java
index 3529d54..83a868d 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java
@@ -54,7 +54,7 @@ public interface CellComparator extends Comparator {
   /**
* Compare cells.
* @param ignoreSequenceid True if we are to compare the key portion only 
and ignore
-   * the sequenceid. Set to false to compare key and consider sequenceid.
+   *the sequenceid. Set to false to compare key and consider sequenceid.
* @return 0 if equal, -1 if a  b, and +1 if a  b.
*/
   int compare(Cell leftCell, Cell rightCell, boolean ignoreSequenceid);
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java
index 707d919..c647318 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase;
 
 import java.util.Comparator;
@@ -23,13 +22,12 @@ import java.util.Comparator;
 import org.apache.hadoop.hbase.KeyValue.Type;
 import org.apache.hadoop.hbase.util.ByteBufferUtils;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hbase.thirdparty.com.google.common.primitives.Longs;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.yetus.audience.InterfaceStability;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-
+import org.apache.hbase.thirdparty.com.google.common.primitives.Longs;
 
 /**
  * Compare two HBase cells.  Do n

[hbase] branch master updated: HBASE-23622 Reduced the number of Checkstyle violations in hbase-common

2019-12-28 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new 2ca1e46  HBASE-23622 Reduced the number of Checkstyle violations in 
hbase-common
2ca1e46 is described below

commit 2ca1e46d745bfe8e32082bddd57f746a0493b165
Author: Jan Hentschel 
AuthorDate: Sat Dec 28 20:03:58 2019 +0100

HBASE-23622 Reduced the number of Checkstyle violations in hbase-common

Signed-off-by: stack 
Signed-off-by: Viraj Jasani 
---
 .../org/apache/hadoop/hbase/BBKVComparator.java|  5 +-
 .../org/apache/hadoop/hbase/CellComparator.java|  2 +-
 .../apache/hadoop/hbase/CellComparatorImpl.java| 10 ++--
 .../java/org/apache/hadoop/hbase/net/Address.java  |  9 ++-
 .../hadoop/hbase/trace/SpanReceiverHost.java   | 10 ++--
 .../org/apache/hadoop/hbase/trace/TraceUtil.java   |  6 +-
 .../apache/hadoop/hbase/util/ByteRangeUtils.java   | 12 ++--
 .../apache/hadoop/hbase/util/CommonFSUtils.java| 70 --
 .../hadoop/hbase/util/ConcatenatedLists.java   |  5 +-
 .../java/org/apache/hadoop/hbase/util/Order.java   | 41 +
 10 files changed, 89 insertions(+), 81 deletions(-)

diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/BBKVComparator.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/BBKVComparator.java
index 017586d..bc76a9d 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/BBKVComparator.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/BBKVComparator.java
@@ -20,11 +20,11 @@ package org.apache.hadoop.hbase;
 import java.util.Comparator;
 
 import org.apache.hadoop.hbase.util.ByteBufferUtils;
-import org.apache.hbase.thirdparty.com.google.common.primitives.Longs;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.hbase.thirdparty.com.google.common.primitives.Longs;
 
 /**
  * A comparator for case where {@link ByteBufferKeyValue} is prevalent type 
(BBKV
@@ -71,7 +71,6 @@ public class BBKVComparator implements Comparator {
 
   @Override
   public int compare(Object l, Object r) {
-// LOG.info("ltype={} rtype={}", l, r);
 if ((l instanceof ByteBufferKeyValue) && (r instanceof 
ByteBufferKeyValue)) {
   return compare((ByteBufferKeyValue)l, (ByteBufferKeyValue)r, false);
 }
@@ -81,7 +80,7 @@ public class BBKVComparator implements Comparator {
 
   // TODO: Come back here. We get a few percentage points extra of throughput 
if this is a
   // private method.
-  static final int compare(ByteBufferKeyValue left, ByteBufferKeyValue right,
+  static int compare(ByteBufferKeyValue left, ByteBufferKeyValue right,
   boolean ignoreSequenceid) {
 // NOTE: Same method is in CellComparatorImpl, also private, not shared, 
intentionally. Not
 // sharing gets us a few percent more throughput in compares. If changes 
here or there, make
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java
index 3529d54..83a868d 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java
@@ -54,7 +54,7 @@ public interface CellComparator extends Comparator {
   /**
* Compare cells.
* @param ignoreSequenceid True if we are to compare the key portion only 
and ignore
-   * the sequenceid. Set to false to compare key and consider sequenceid.
+   *the sequenceid. Set to false to compare key and consider sequenceid.
* @return 0 if equal, -1 if a  b, and +1 if a  b.
*/
   int compare(Cell leftCell, Cell rightCell, boolean ignoreSequenceid);
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java
index 707d919..c647318 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase;
 
 import java.util.Comparator;
@@ -23,13 +22,12 @@ import java.util.Comparator;
 import org.apache.hadoop.hbase.KeyValue.Type;
 import org.apache.hadoop.hbase.util.ByteBufferUtils;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hbase.thirdparty.com.google.common.primitives.Longs;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.yetus.audience.InterfaceStability;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-
+import org.apache.hbase.thirdparty.com.google.common.primitives.Longs;
 
 /**
  * Compare two HBase cells.  Do n

[hbase] branch branch-2.1 updated: HBASE-23621 Reduced the number of Checkstyle violations in tests of hbase-common

2019-12-28 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
 new 249ddb7  HBASE-23621 Reduced the number of Checkstyle violations in 
tests of hbase-common
249ddb7 is described below

commit 249ddb7664b71b5d7d8adfab45037b62b93d8bdc
Author: Jan Hentschel 
AuthorDate: Fri Dec 27 10:37:23 2019 +0100

HBASE-23621 Reduced the number of Checkstyle violations in tests of 
hbase-common

Signed-off-by: stack 
Signed-off-by: Viraj Jasani 
---
 .../java/org/apache/hadoop/hbase/ClassFinder.java  |  39 +++---
 .../hadoop/hbase/HBaseCommonTestingUtility.java|  59 +
 .../org/apache/hadoop/hbase/ResourceChecker.java   |  22 ++--
 .../java/org/apache/hadoop/hbase/TestCellUtil.java |  21 ++--
 .../org/apache/hadoop/hbase/TestClassFinder.java   |  55 ++--
 .../hadoop/hbase/TestHBaseConfiguration.java   |  50 ++--
 .../hadoop/hbase/codec/TestCellCodecWithTags.java  |  11 +-
 .../hbase/codec/TestKeyValueCodecWithTags.java |  11 +-
 .../hadoop/hbase/io/crypto/TestEncryption.java |  10 +-
 .../hadoop/hbase/util/RedundantKVGenerator.java| 140 -
 .../apache/hadoop/hbase/HBaseZKTestingUtility.java |   2 +-
 11 files changed, 141 insertions(+), 279 deletions(-)

diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/ClassFinder.java 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/ClassFinder.java
index b8ec0dd..b299fab 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/ClassFinder.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/ClassFinder.java
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase;
 
 import java.io.File;
@@ -68,9 +67,17 @@ public class ClassFinder {
 private FileNameFilter fileNameFilter;
 private ClassFilter classFilter;
 
-public Not(ResourcePathFilter resourcePathFilter){this.resourcePathFilter 
= resourcePathFilter;}
-public Not(FileNameFilter fileNameFilter){this.fileNameFilter = 
fileNameFilter;}
-public Not(ClassFilter classFilter){this.classFilter = classFilter;}
+public Not(ResourcePathFilter resourcePathFilter) {
+  this.resourcePathFilter = resourcePathFilter;
+}
+
+public Not(FileNameFilter fileNameFilter) {
+  this.fileNameFilter = fileNameFilter;
+}
+
+public Not(ClassFilter classFilter) {
+  this.classFilter = classFilter;
+}
 
 @Override
 public boolean isCandidatePath(String resourcePath, boolean isJar) {
@@ -90,7 +97,10 @@ public class ClassFinder {
 ClassFilter[] classFilters;
 ResourcePathFilter[] resourcePathFilters;
 
-public And(ClassFilter...classFilters) { this.classFilters = classFilters; 
}
+public And(ClassFilter...classFilters) {
+  this.classFilters = classFilters;
+}
+
 public And(ResourcePathFilter... resourcePathFilters) {
   this.resourcePathFilters = resourcePathFilters;
 }
@@ -120,10 +130,6 @@ public class ClassFinder {
 this(null, null, null, classLoader);
   }
 
-  public ClassFinder() {
-this(ClassLoader.getSystemClassLoader());
-  }
-
   public ClassFinder(ResourcePathFilter resourcePathFilter, FileNameFilter 
fileNameFilter,
   ClassFilter classFilter) {
 this(resourcePathFilter, fileNameFilter, classFilter, 
ClassLoader.getSystemClassLoader());
@@ -193,7 +199,7 @@ public class ClassFinder {
   private Set> findClassesFromJar(String jarFileName,
   String packageName, boolean proceedOnExceptions)
 throws IOException, ClassNotFoundException, LinkageError {
-JarInputStream jarFile = null;
+JarInputStream jarFile;
 try {
   jarFile = new JarInputStream(new FileInputStream(jarFileName));
 } catch (IOException ioEx) {
@@ -202,7 +208,7 @@ public class ClassFinder {
 }
 
 Set> classes = new HashSet<>();
-JarEntry entry = null;
+JarEntry entry;
 try {
   while (true) {
 try {
@@ -285,16 +291,11 @@ public class ClassFinder {
   Class c = Class.forName(className, false, classLoader);
   boolean isCandidateClass = null == classFilter || 
classFilter.isCandidateClass(c);
   return isCandidateClass ? c : null;
-} catch (NoClassDefFoundError|ClassNotFoundException classNotFoundEx) {
-  if (!proceedOnExceptions) {
-throw classNotFoundEx;
-  }
-  LOG.debug("Failed to instantiate or check " + className + ": " + 
classNotFoundEx);
-} catch (LinkageError linkageEx) {
+} catch (ClassNotFoundException | LinkageError exception) {
   if (!proceedOnExceptions) {
-throw linkageEx;
+throw exception;
   }
-  LOG.debug("Failed to instantiate or check " + className + ": " + 
linkageEx);
+  LOG

[hbase] branch branch-2.2 updated: HBASE-23621 Reduced the number of Checkstyle violations in tests of hbase-common

2019-12-28 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
 new 4562e14  HBASE-23621 Reduced the number of Checkstyle violations in 
tests of hbase-common
4562e14 is described below

commit 4562e14b57dc4474bedc09b1c02c24d9515f84ce
Author: Jan Hentschel 
AuthorDate: Fri Dec 27 10:37:23 2019 +0100

HBASE-23621 Reduced the number of Checkstyle violations in tests of 
hbase-common

Signed-off-by: stack 
Signed-off-by: Viraj Jasani 
---
 .../java/org/apache/hadoop/hbase/ClassFinder.java  |  39 +++---
 .../hadoop/hbase/HBaseCommonTestingUtility.java|  59 +
 .../org/apache/hadoop/hbase/ResourceChecker.java   |  22 ++--
 .../java/org/apache/hadoop/hbase/TestCellUtil.java |  21 ++--
 .../org/apache/hadoop/hbase/TestClassFinder.java   |  55 ++--
 .../hadoop/hbase/TestHBaseConfiguration.java   |  50 ++--
 .../hadoop/hbase/codec/TestCellCodecWithTags.java  |  11 +-
 .../hbase/codec/TestKeyValueCodecWithTags.java |  11 +-
 .../hadoop/hbase/io/crypto/TestEncryption.java |  10 +-
 .../hadoop/hbase/util/RedundantKVGenerator.java| 140 -
 .../apache/hadoop/hbase/HBaseZKTestingUtility.java |   2 +-
 11 files changed, 141 insertions(+), 279 deletions(-)

diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/ClassFinder.java 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/ClassFinder.java
index b8ec0dd..b299fab 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/ClassFinder.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/ClassFinder.java
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase;
 
 import java.io.File;
@@ -68,9 +67,17 @@ public class ClassFinder {
 private FileNameFilter fileNameFilter;
 private ClassFilter classFilter;
 
-public Not(ResourcePathFilter resourcePathFilter){this.resourcePathFilter 
= resourcePathFilter;}
-public Not(FileNameFilter fileNameFilter){this.fileNameFilter = 
fileNameFilter;}
-public Not(ClassFilter classFilter){this.classFilter = classFilter;}
+public Not(ResourcePathFilter resourcePathFilter) {
+  this.resourcePathFilter = resourcePathFilter;
+}
+
+public Not(FileNameFilter fileNameFilter) {
+  this.fileNameFilter = fileNameFilter;
+}
+
+public Not(ClassFilter classFilter) {
+  this.classFilter = classFilter;
+}
 
 @Override
 public boolean isCandidatePath(String resourcePath, boolean isJar) {
@@ -90,7 +97,10 @@ public class ClassFinder {
 ClassFilter[] classFilters;
 ResourcePathFilter[] resourcePathFilters;
 
-public And(ClassFilter...classFilters) { this.classFilters = classFilters; 
}
+public And(ClassFilter...classFilters) {
+  this.classFilters = classFilters;
+}
+
 public And(ResourcePathFilter... resourcePathFilters) {
   this.resourcePathFilters = resourcePathFilters;
 }
@@ -120,10 +130,6 @@ public class ClassFinder {
 this(null, null, null, classLoader);
   }
 
-  public ClassFinder() {
-this(ClassLoader.getSystemClassLoader());
-  }
-
   public ClassFinder(ResourcePathFilter resourcePathFilter, FileNameFilter 
fileNameFilter,
   ClassFilter classFilter) {
 this(resourcePathFilter, fileNameFilter, classFilter, 
ClassLoader.getSystemClassLoader());
@@ -193,7 +199,7 @@ public class ClassFinder {
   private Set> findClassesFromJar(String jarFileName,
   String packageName, boolean proceedOnExceptions)
 throws IOException, ClassNotFoundException, LinkageError {
-JarInputStream jarFile = null;
+JarInputStream jarFile;
 try {
   jarFile = new JarInputStream(new FileInputStream(jarFileName));
 } catch (IOException ioEx) {
@@ -202,7 +208,7 @@ public class ClassFinder {
 }
 
 Set> classes = new HashSet<>();
-JarEntry entry = null;
+JarEntry entry;
 try {
   while (true) {
 try {
@@ -285,16 +291,11 @@ public class ClassFinder {
   Class c = Class.forName(className, false, classLoader);
   boolean isCandidateClass = null == classFilter || 
classFilter.isCandidateClass(c);
   return isCandidateClass ? c : null;
-} catch (NoClassDefFoundError|ClassNotFoundException classNotFoundEx) {
-  if (!proceedOnExceptions) {
-throw classNotFoundEx;
-  }
-  LOG.debug("Failed to instantiate or check " + className + ": " + 
classNotFoundEx);
-} catch (LinkageError linkageEx) {
+} catch (ClassNotFoundException | LinkageError exception) {
   if (!proceedOnExceptions) {
-throw linkageEx;
+throw exception;
   }
-  LOG.debug("Failed to instantiate or check " + className + ": " + 
linkageEx);
+  LOG

[hbase] branch branch-2 updated: HBASE-23621 Reduced the number of Checkstyle violations in tests of hbase-common

2019-12-28 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
 new 2382d00  HBASE-23621 Reduced the number of Checkstyle violations in 
tests of hbase-common
2382d00 is described below

commit 2382d009a68f5942da1681bf0b24aa522ec40fda
Author: Jan Hentschel 
AuthorDate: Fri Dec 27 10:37:23 2019 +0100

HBASE-23621 Reduced the number of Checkstyle violations in tests of 
hbase-common

Signed-off-by: stack 
Signed-off-by: Viraj Jasani 
---
 .../java/org/apache/hadoop/hbase/ClassFinder.java  |  39 +++---
 .../hadoop/hbase/HBaseCommonTestingUtility.java|  59 +
 .../org/apache/hadoop/hbase/ResourceChecker.java   |  22 ++--
 .../java/org/apache/hadoop/hbase/TestCellUtil.java |  21 ++--
 .../org/apache/hadoop/hbase/TestClassFinder.java   |  55 ++--
 .../hadoop/hbase/TestHBaseConfiguration.java   |  50 ++--
 .../hadoop/hbase/codec/TestCellCodecWithTags.java  |  11 +-
 .../hbase/codec/TestKeyValueCodecWithTags.java |  11 +-
 .../hadoop/hbase/io/crypto/TestEncryption.java |  10 +-
 .../hadoop/hbase/util/RedundantKVGenerator.java| 140 -
 .../apache/hadoop/hbase/HBaseZKTestingUtility.java |   2 +-
 11 files changed, 141 insertions(+), 279 deletions(-)

diff --git 
a/hbase-common/src/test/java/org/apache/hadoop/hbase/ClassFinder.java 
b/hbase-common/src/test/java/org/apache/hadoop/hbase/ClassFinder.java
index b8ec0dd..b299fab 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/ClassFinder.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/ClassFinder.java
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.hadoop.hbase;
 
 import java.io.File;
@@ -68,9 +67,17 @@ public class ClassFinder {
 private FileNameFilter fileNameFilter;
 private ClassFilter classFilter;
 
-public Not(ResourcePathFilter resourcePathFilter){this.resourcePathFilter 
= resourcePathFilter;}
-public Not(FileNameFilter fileNameFilter){this.fileNameFilter = 
fileNameFilter;}
-public Not(ClassFilter classFilter){this.classFilter = classFilter;}
+public Not(ResourcePathFilter resourcePathFilter) {
+  this.resourcePathFilter = resourcePathFilter;
+}
+
+public Not(FileNameFilter fileNameFilter) {
+  this.fileNameFilter = fileNameFilter;
+}
+
+public Not(ClassFilter classFilter) {
+  this.classFilter = classFilter;
+}
 
 @Override
 public boolean isCandidatePath(String resourcePath, boolean isJar) {
@@ -90,7 +97,10 @@ public class ClassFinder {
 ClassFilter[] classFilters;
 ResourcePathFilter[] resourcePathFilters;
 
-public And(ClassFilter...classFilters) { this.classFilters = classFilters; 
}
+public And(ClassFilter...classFilters) {
+  this.classFilters = classFilters;
+}
+
 public And(ResourcePathFilter... resourcePathFilters) {
   this.resourcePathFilters = resourcePathFilters;
 }
@@ -120,10 +130,6 @@ public class ClassFinder {
 this(null, null, null, classLoader);
   }
 
-  public ClassFinder() {
-this(ClassLoader.getSystemClassLoader());
-  }
-
   public ClassFinder(ResourcePathFilter resourcePathFilter, FileNameFilter 
fileNameFilter,
   ClassFilter classFilter) {
 this(resourcePathFilter, fileNameFilter, classFilter, 
ClassLoader.getSystemClassLoader());
@@ -193,7 +199,7 @@ public class ClassFinder {
   private Set> findClassesFromJar(String jarFileName,
   String packageName, boolean proceedOnExceptions)
 throws IOException, ClassNotFoundException, LinkageError {
-JarInputStream jarFile = null;
+JarInputStream jarFile;
 try {
   jarFile = new JarInputStream(new FileInputStream(jarFileName));
 } catch (IOException ioEx) {
@@ -202,7 +208,7 @@ public class ClassFinder {
 }
 
 Set> classes = new HashSet<>();
-JarEntry entry = null;
+JarEntry entry;
 try {
   while (true) {
 try {
@@ -285,16 +291,11 @@ public class ClassFinder {
   Class c = Class.forName(className, false, classLoader);
   boolean isCandidateClass = null == classFilter || 
classFilter.isCandidateClass(c);
   return isCandidateClass ? c : null;
-} catch (NoClassDefFoundError|ClassNotFoundException classNotFoundEx) {
-  if (!proceedOnExceptions) {
-throw classNotFoundEx;
-  }
-  LOG.debug("Failed to instantiate or check " + className + ": " + 
classNotFoundEx);
-} catch (LinkageError linkageEx) {
+} catch (ClassNotFoundException | LinkageError exception) {
   if (!proceedOnExceptions) {
-throw linkageEx;
+throw exception;
   }
-  LOG.debug("Failed to instantiate or check " + className + ": " + 
linkageEx);
+  LOG

[hbase] branch branch-2.1 updated: HBASE-23619 Used built-in formatting for logger in hbase-zookeeper

2019-12-27 Thread janh
This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
 new 7124edd  HBASE-23619 Used built-in formatting for logger in 
hbase-zookeeper
7124edd is described below

commit 7124edd9006b4c5a5d202ec9e4533fb06972d62e
Author: Jan Hentschel 
AuthorDate: Fri Dec 27 10:39:46 2019 +0100

HBASE-23619 Used built-in formatting for logger in hbase-zookeeper

Signed-off-by: stack 
---
 .../apache/hadoop/hbase/zookeeper/DeletionListener.java   |  2 +-
 .../hadoop/hbase/zookeeper/LoadBalancerTracker.java   |  2 +-
 .../apache/hadoop/hbase/zookeeper/MetaTableLocator.java   |  6 +++---
 .../hadoop/hbase/zookeeper/MiniZooKeeperCluster.java  | 15 ++-
 .../hadoop/hbase/zookeeper/RecoverableZooKeeper.java  | 12 +---
 .../org/apache/hadoop/hbase/zookeeper/ZKAclReset.java |  8 
 .../apache/hadoop/hbase/zookeeper/ZKLeaderManager.java|  4 ++--
 .../org/apache/hadoop/hbase/zookeeper/ZKNodeTracker.java  |  4 ++--
 .../java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java| 15 +++
 .../java/org/apache/hadoop/hbase/zookeeper/ZKWatcher.java | 10 +-
 10 files changed, 36 insertions(+), 42 deletions(-)

diff --git 
a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/DeletionListener.java
 
b/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/DeletionListener.java
index ed8751b..0654c23 100644
--- 
a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/DeletionListener.java
+++ 
b/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/DeletionListener.java
@@ -94,7 +94,7 @@ public class DeletionListener extends ZKListener {
   return;
 }
 if (LOG.isDebugEnabled()) {
-  LOG.debug("Processing delete on " + pathToWatch);
+  LOG.debug("Processing delete on {}", pathToWatch);
 }
 deletedLatch.countDown();
   }
diff --git 
a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java
 
b/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java
index 0e74483..f00dfa8 100644
--- 
a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java
+++ 
b/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java
@@ -51,7 +51,7 @@ public class LoadBalancerTracker extends ZKNodeTracker {
   // if data in ZK is null, use default of on.
   return upData == null || parseFrom(upData).getBalancerOn();
 } catch (DeserializationException dex) {
-  LOG.error("ZK state for LoadBalancer could not be parsed " + 
Bytes.toStringBinary(upData));
+  LOG.error("ZK state for LoadBalancer could not be parsed {}", 
Bytes.toStringBinary(upData));
   // return false to be safe.
   return false;
 }
diff --git 
a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MetaTableLocator.java
 
b/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MetaTableLocator.java
index 7f0fb11..514856e 100644
--- 
a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MetaTableLocator.java
+++ 
b/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MetaTableLocator.java
@@ -449,7 +449,7 @@ public class MetaTableLocator {
   LOG.warn("Tried to set null ServerName in hbase:meta; skipping -- 
ServerName required");
   return;
 }
-LOG.info("Setting hbase:meta (replicaId=" + replicaId + ") location in 
ZooKeeper as " +
+LOG.info("Setting hbase:meta (replicaId={}) location in ZooKeeper as {}", 
replicaId,
   serverName);
 // Make the MetaRegionServer pb and then get its bytes and save this as
 // the znode content.
@@ -542,7 +542,7 @@ public class MetaTableLocator {
 if (replicaId == RegionInfo.DEFAULT_REPLICA_ID) {
   LOG.info("Deleting hbase:meta region location in ZooKeeper");
 } else {
-  LOG.info("Deleting hbase:meta for " + replicaId + " region location in 
ZooKeeper");
+  LOG.info("Deleting hbase:meta for {} region location in ZooKeeper", 
replicaId);
 }
 try {
   // Just delete the node.  Don't need any watches.
@@ -580,7 +580,7 @@ public class MetaTableLocator {
   List metaReplicaNodes = zkw.getMetaReplicaNodes();
   numReplicasConfigured = metaReplicaNodes.size();
 } catch (KeeperException e) {
-  LOG.warn("Got ZK exception " + e);
+  LOG.warn("Got ZK exception {}", e);
 }
 for (int replicaId = 1; replicaId < numReplicasConfigured; replicaId++) {
   // return all replica locations for the meta
diff --git 
a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java
 
b/hbase-zookeeper/s

  1   2   3   4   5   6   >