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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]