You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Apache9 (via GitHub)" <gi...@apache.org> on 2025/10/21 03:19:45 UTC

[PR] HBASE-29674 [hbase-operator-tools] Remove ClusterConnection in HBaseF… [hbase-operator-tools]

Apache9 opened a new pull request, #155:
URL: https://github.com/apache/hbase-operator-tools/pull/155

   …sckRepair.closeRegionSilentlyAndWait


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HBASE-29674 [hbase-operator-tools] Remove ClusterConnection in HBaseF… [hbase-operator-tools]

Posted by "Apache9 (via GitHub)" <gi...@apache.org>.
Apache9 commented on code in PR #155:
URL: https://github.com/apache/hbase-operator-tools/pull/155#discussion_r2465873283


##########
hbase-hbck2/src/main/java/org/apache/hbase/hbck1/HBaseFsckRepair.java:
##########
@@ -139,8 +140,33 @@ public static void waitUntilAssigned(Admin admin, RegionInfo region)
   public static void closeRegionSilentlyAndWait(Connection connection, ServerName server,
     RegionInfo region) throws IOException, InterruptedException {
     long timeout = connection.getConfiguration().getLong("hbase.hbck.close.timeout", 120000);
-    ServerManager.closeRegionSilentlyAndWait((ClusterConnection) connection, server, region,
-      timeout);
+    HBCKRegionServerAdmin admin = new HBCKRegionServerAdmin(connection, server);
+    admin.closeRegion(region.getRegionName());
+    if (timeout < 0) {
+      return;
+    }
+    long expiration = timeout + System.currentTimeMillis();
+    while (System.currentTimeMillis() < expiration) {
+      try {
+        RegionInfo rsRegion = admin.getRegionInfo(region.getRegionName());
+        if (rsRegion == null) {
+          return;
+        }
+      } catch (IOException ioe) {
+        if (
+          ioe instanceof NotServingRegionException
+            || (ioe instanceof RemoteWithExtrasException && ((RemoteWithExtrasException) ioe)
+              .unwrapRemoteException() instanceof NotServingRegionException)

Review Comment:
   This is the result of spotless:apply...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HBASE-29674 [hbase-operator-tools] Remove ClusterConnection in HBaseF… [hbase-operator-tools]

Posted by "petersomogyi (via GitHub)" <gi...@apache.org>.
petersomogyi commented on code in PR #155:
URL: https://github.com/apache/hbase-operator-tools/pull/155#discussion_r2465345755


##########
hbase-hbck2/src/main/java/org/apache/hbase/hbck1/HBaseFsckRepair.java:
##########
@@ -139,8 +140,33 @@ public static void waitUntilAssigned(Admin admin, RegionInfo region)
   public static void closeRegionSilentlyAndWait(Connection connection, ServerName server,
     RegionInfo region) throws IOException, InterruptedException {
     long timeout = connection.getConfiguration().getLong("hbase.hbck.close.timeout", 120000);
-    ServerManager.closeRegionSilentlyAndWait((ClusterConnection) connection, server, region,
-      timeout);
+    HBCKRegionServerAdmin admin = new HBCKRegionServerAdmin(connection, server);
+    admin.closeRegion(region.getRegionName());
+    if (timeout < 0) {
+      return;
+    }
+    long expiration = timeout + System.currentTimeMillis();
+    while (System.currentTimeMillis() < expiration) {
+      try {
+        RegionInfo rsRegion = admin.getRegionInfo(region.getRegionName());
+        if (rsRegion == null) {
+          return;
+        }
+      } catch (IOException ioe) {
+        if (
+          ioe instanceof NotServingRegionException
+            || (ioe instanceof RemoteWithExtrasException && ((RemoteWithExtrasException) ioe)
+              .unwrapRemoteException() instanceof NotServingRegionException)

Review Comment:
   nit: formatting is a bit off here.



##########
hbase-hbck2/src/main/java/org/apache/hbase/hbck1/HBaseFsckRepair.java:
##########
@@ -139,8 +140,33 @@ public static void waitUntilAssigned(Admin admin, RegionInfo region)
   public static void closeRegionSilentlyAndWait(Connection connection, ServerName server,
     RegionInfo region) throws IOException, InterruptedException {
     long timeout = connection.getConfiguration().getLong("hbase.hbck.close.timeout", 120000);
-    ServerManager.closeRegionSilentlyAndWait((ClusterConnection) connection, server, region,
-      timeout);
+    HBCKRegionServerAdmin admin = new HBCKRegionServerAdmin(connection, server);
+    admin.closeRegion(region.getRegionName());
+    if (timeout < 0) {
+      return;
+    }
+    long expiration = timeout + System.currentTimeMillis();
+    while (System.currentTimeMillis() < expiration) {
+      try {
+        RegionInfo rsRegion = admin.getRegionInfo(region.getRegionName());
+        if (rsRegion == null) {
+          return;
+        }
+      } catch (IOException ioe) {
+        if (
+          ioe instanceof NotServingRegionException
+            || (ioe instanceof RemoteWithExtrasException && ((RemoteWithExtrasException) ioe)
+              .unwrapRemoteException() instanceof NotServingRegionException)
+        ) {
+          // no need to retry again
+          return;
+        }
+        LOG.warn("Exception when retrieving regioninfo from: " + region.getRegionNameAsString(),
+          ioe);

Review Comment:
   ```suggestion
           LOG.warn("Exception when retrieving regioninfo from: {}", region.getRegionNameAsString(),
             ioe);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HBASE-29674 [hbase-operator-tools] Remove ClusterConnection in HBaseF… [hbase-operator-tools]

Posted by "Apache-HBase (via GitHub)" <gi...@apache.org>.
Apache-HBase commented on PR #155:
URL: https://github.com/apache/hbase-operator-tools/pull/155#issuecomment-3426333880

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 45s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +0 :ok: |  spotbugs  |   0m  1s |  spotbugs executables are not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   | -0 :warning: |  test4tests  |   0m  0s |  The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.  |
   ||| _ master Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m 35s |  master passed  |
   | +1 :green_heart: |  compile  |   0m 16s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   0m 16s |  master passed  |
   | +1 :green_heart: |  spotless  |   0m 12s |  branch has no errors when running spotless:check.  |
   | +1 :green_heart: |  javadoc  |   0m 13s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 17s |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 15s |  the patch passed  |
   | +1 :green_heart: |  javac  |   0m 15s |  the patch passed  |
   | +1 :green_heart: |  checkstyle  |   0m  9s |  the patch passed  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  spotless  |   0m  8s |  patch has no errors when running spotless:check.  |
   | +1 :green_heart: |  javadoc  |   0m  8s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   6m 48s |  hbase-hbck2 in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 10s |  The patch does not generate ASF License warnings.  |
   |  |   |  11m 28s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.48 ServerAPI=1.48 base: https://ci-hbase.apache.org/job/HBase-Operator-Tools-PreCommit/job/PR-155/2/artifact/yetus-precommit-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase-operator-tools/pull/155 |
   | Optional Tests | dupname asflicense javac javadoc unit spotbugs findbugs spotless checkstyle compile |
   | uname | Linux ffbd8787d3a0 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/jenkins/hbase-personality.sh |
   | git revision | master / 6b4e76f |
   | Default Java | Oracle Corporation-1.8.0_342-b07 |
   |  Test Results | https://ci-hbase.apache.org/job/HBase-Operator-Tools-PreCommit/job/PR-155/2/testReport/ |
   | Max. process+thread count | 1130 (vs. ulimit of 5000) |
   | modules | C: hbase-hbck2 U: hbase-hbck2 |
   | Console output | https://ci-hbase.apache.org/job/HBase-Operator-Tools-PreCommit/job/PR-155/2/console |
   | versions | git=2.30.2 maven=3.8.6 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HBASE-29674 [hbase-operator-tools] Remove ClusterConnection in HBaseF… [hbase-operator-tools]

Posted by "Apache9 (via GitHub)" <gi...@apache.org>.
Apache9 merged PR #155:
URL: https://github.com/apache/hbase-operator-tools/pull/155


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HBASE-29674 [hbase-operator-tools] Remove ClusterConnection in HBaseF… [hbase-operator-tools]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #155:
URL: https://github.com/apache/hbase-operator-tools/pull/155#discussion_r2446624133


##########
hbase-hbck2/src/main/java/org/apache/hbase/hbck1/HBaseFsckRepair.java:
##########
@@ -139,8 +140,33 @@ public static void waitUntilAssigned(Admin admin, RegionInfo region)
   public static void closeRegionSilentlyAndWait(Connection connection, ServerName server,
     RegionInfo region) throws IOException, InterruptedException {
     long timeout = connection.getConfiguration().getLong("hbase.hbck.close.timeout", 120000);
-    ServerManager.closeRegionSilentlyAndWait((ClusterConnection) connection, server, region,
-      timeout);
+    HBCKRegionServerAdmin admin = new HBCKRegionServerAdmin(connection, server);
+    admin.closeRegion(region.getRegionName());
+    if (timeout < 0) {
+      return;
+    }
+    long expiration = timeout + System.currentTimeMillis();
+    while (System.currentTimeMillis() < expiration) {
+      try {
+        RegionInfo rsRegion = admin.getRegionInfo(region.getRegionName());
+        if (rsRegion == null) {
+          return;
+        }
+      } catch (IOException ioe) {
+        if (
+          ioe instanceof NotServingRegionException
+            || (ioe instanceof RemoteWithExtrasException && ((RemoteWithExtrasException) ioe)
+              .unwrapRemoteException() instanceof NotServingRegionException)
+        ) {
+          // no need to retry again
+          return;
+        }
+        LOG.warn("Exception when retrieving regioninfo from: " + region.getRegionNameAsString(),
+          ioe);
+      }
+      Thread.sleep(1000);
+    }
+    throw new IOException("Region " + region + " failed to close within" + " timeout " + timeout);

Review Comment:
   Missing space in error message: 'within' + ' timeout' should be 'within ' + 'timeout' or 'within timeout'.
   ```suggestion
       throw new IOException("Region " + region + " failed to close within timeout " + timeout);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HBASE-29674 [hbase-operator-tools] Remove ClusterConnection in HBaseF… [hbase-operator-tools]

Posted by "Apache-HBase (via GitHub)" <gi...@apache.org>.
Apache-HBase commented on PR #155:
URL: https://github.com/apache/hbase-operator-tools/pull/155#issuecomment-3424617492

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 32s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +0 :ok: |  spotbugs  |   0m  0s |  spotbugs executables are not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   | -0 :warning: |  test4tests  |   0m  0s |  The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.  |
   ||| _ master Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   3m  7s |  master passed  |
   | +1 :green_heart: |  compile  |   0m 14s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   0m 12s |  master passed  |
   | +1 :green_heart: |  spotless  |   0m 10s |  branch has no errors when running spotless:check.  |
   | +1 :green_heart: |  javadoc  |   0m 11s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 16s |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 12s |  the patch passed  |
   | +1 :green_heart: |  javac  |   0m 12s |  the patch passed  |
   | +1 :green_heart: |  checkstyle  |   0m  5s |  the patch passed  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  spotless  |   0m  6s |  patch has no errors when running spotless:check.  |
   | +1 :green_heart: |  javadoc  |   0m  7s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   5m 22s |  hbase-hbck2 in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m  8s |  The patch does not generate ASF License warnings.  |
   |  |   |  10m 55s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.48 ServerAPI=1.48 base: https://ci-hbase.apache.org/job/HBase-Operator-Tools-PreCommit/job/PR-155/1/artifact/yetus-precommit-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase-operator-tools/pull/155 |
   | Optional Tests | dupname asflicense javac javadoc unit spotbugs findbugs spotless checkstyle compile |
   | uname | Linux 700300ec710e 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/jenkins/hbase-personality.sh |
   | git revision | master / 6b4e76f |
   | Default Java | Oracle Corporation-1.8.0_342-b07 |
   |  Test Results | https://ci-hbase.apache.org/job/HBase-Operator-Tools-PreCommit/job/PR-155/1/testReport/ |
   | Max. process+thread count | 1178 (vs. ulimit of 5000) |
   | modules | C: hbase-hbck2 U: hbase-hbck2 |
   | Console output | https://ci-hbase.apache.org/job/HBase-Operator-Tools-PreCommit/job/PR-155/1/console |
   | versions | git=2.30.2 maven=3.8.6 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org