You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2018/11/16 12:04:24 UTC

[GitHub] busbey closed pull request #1: Clean up for hbck2 now that 2.1.1 is out

busbey closed pull request #1: Clean up for hbck2 now that 2.1.1 is out
URL: https://github.com/apache/hbase-operator-tools/pull/1
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java b/hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java
index 49e9c64..e9089e8 100644
--- a/hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java
+++ b/hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java
@@ -101,12 +101,13 @@ void checkHBCKSupport(Connection connection) throws IOException {
   }
 
   static void checkVersion(final String versionStr) {
-    if (versionStr.startsWith(TWO_POINT_ONE)) {
-      throw new UnsupportedOperationException(TWO_POINT_ONE + " has no support for hbck2");
-    }
     if (VersionInfo.compareVersion(MININUM_VERSION, versionStr) > 0) {
       throw new UnsupportedOperationException("Requires " + MININUM_VERSION + " at least.");
     }
+    // except 2.1.0 didn't ship with support
+    if (VersionInfo.compareVersion(TWO_POINT_ONE, versionStr) == 0) {
+      throw new UnsupportedOperationException(TWO_POINT_ONE + " has no support for hbck2");
+    }
   }
 
   TableState setTableState(TableName tableName, TableState.State state) throws IOException {
diff --git a/hbase-hbck2/src/test/java/org/apache/hbase/TestHBCK2.java b/hbase-hbck2/src/test/java/org/apache/hbase/TestHBCK2.java
index 1b54687..e902275 100644
--- a/hbase-hbck2/src/test/java/org/apache/hbase/TestHBCK2.java
+++ b/hbase-hbck2/src/test/java/org/apache/hbase/TestHBCK2.java
@@ -69,6 +69,11 @@ public void testCheckVersion210() {
     HBCK2.checkVersion("2.1.0");
   }
 
+  @Test
+  public void testCheckVersionSpecial210() {
+    HBCK2.checkVersion("2.1.0-patchedForHBCK2");
+  }
+
   @Test
   public void testCheckVersion203() {
     HBCK2.checkVersion("2.0.3");
diff --git a/pom.xml b/pom.xml
index f241901..e975217 100644
--- a/pom.xml
+++ b/pom.xml
@@ -123,7 +123,7 @@
     <compileSource>1.8</compileSource>
     <java.min.version>${compileSource}</java.min.version>
     <maven.min.version>3.3.3</maven.min.version>
-    <hbase.version>2.1.1-SNAPSHOT</hbase.version>
+    <hbase.version>2.1.1</hbase.version>
     <maven.compiler.version>3.6.1</maven.compiler.version>
     <surefire.version>2.21.0</surefire.version>
     <surefire.provider>surefire-junit47</surefire.provider>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services