virajjasani commented on a change in pull request #3606:
URL: https://github.com/apache/hbase/pull/3606#discussion_r760976617
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java
##########
@@ -825,6 +829,20 @@ private void createRSGroupTable() throws IOException {
}
public boolean isOnline() {
+ if (isMasterRunning(masterServices)) {
+ try {
+ // try reading from the table
+ CompletableFuture<Result> read =
conn.getTable(RSGROUP_TABLE_NAME).get(new Get(ROW_KEY));
+ if (read.get(10000, TimeUnit.MILLISECONDS) != null) {
+ online = true;
+ }
+ } catch (Exception e) {
+ LOG.warn("Failed to read from " + RSGROUP_TABLE_NAME+ "; setting
online = false");
Review comment:
nit: use log placeholder `{}` for table name?
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java
##########
@@ -825,6 +829,20 @@ private void createRSGroupTable() throws IOException {
}
public boolean isOnline() {
Review comment:
The logic seems good to me. @Apache9 Would you like to verify?
--
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]