Kota-SH commented on code in PR #7857:
URL: https://github.com/apache/hbase/pull/7857#discussion_r2906724291


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java:
##########
@@ -616,14 +616,14 @@ public static ActiveClusterSuffix 
getActiveClusterSuffix(FileSystem fs, Path roo
           data = in.readUTF();
           cs = new ActiveClusterSuffix(data);
         } catch (EOFException eof) {
-          LOG.warn("Active Cluster Suffix File {} is empty ", idPath);
+          LOG.warn("Read Replica Cluster id file {} is empty ", idPath);
         } finally {
           in.close();
         }
       }
       return cs;
     } else {
-      throw new FileNotFoundException("Active Cluster Suffix File " + idPath + 
" not found");
+      throw new FileNotFoundException("Read Replica Cluster id file " + idPath 
+ " not found");

Review Comment:
   Same here.
   ```suggestion
         throw new FileNotFoundException("[Read-replica feature] Active Cluster 
Suffix File " + idPath + " not found");
   ```



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java:
##########
@@ -405,14 +405,15 @@ private void negotiateActiveClusterSuffixFile(long wait) 
throws IOException {
           this.activeClusterSuffix = acs;
         } else {
           // throw error
-          LOG.info("rootdir {} : Active Cluster File Suffix {} ", rootdir, 
acs);
+          LOG.info("rootdir {} : Read replica active cluster file suffix {} ", 
rootdir, acs);

Review Comment:
   This is a mismatch scenario, logging something like "Active cluster suffix 
mismatch -- rootdir: {}  but the file contains: {}, another cluster is running 
in active" would be more helpful imo.



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java:
##########
@@ -616,14 +616,14 @@ public static ActiveClusterSuffix 
getActiveClusterSuffix(FileSystem fs, Path roo
           data = in.readUTF();
           cs = new ActiveClusterSuffix(data);
         } catch (EOFException eof) {
-          LOG.warn("Active Cluster Suffix File {} is empty ", idPath);
+          LOG.warn("Read Replica Cluster id file {} is empty ", idPath);

Review Comment:
   ```suggestion
             LOG.warn("[Read Replica Feature] Active Cluster id file {} is 
empty ", idPath);
   ```



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java:
##########


Review Comment:
   Detail about which file and which config in this log line would be more 
helpful while debugging. 



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java:
##########
@@ -405,14 +405,15 @@ private void negotiateActiveClusterSuffixFile(long wait) 
throws IOException {
           this.activeClusterSuffix = acs;
         } else {
           // throw error
-          LOG.info("rootdir {} : Active Cluster File Suffix {} ", rootdir, 
acs);
+          LOG.info("rootdir {} : Read replica active cluster file suffix {} ", 
rootdir, acs);
           throw new IOException("Cannot start master, because another cluster 
is running in active "
-            + "(read-write) mode on this storage location. Active Cluster Id: 
{} " + acs
-            + " This cluster Id: " + getClusterId());
+            + "(read-write) mode on this storage location. Active Cluster Id: 
" + acs
+            + ", This cluster Id: "
+            + new String(getSuffixFileDataToWrite(), StandardCharsets.UTF_8));
         }
         LOG.info(
-          "This is the active cluster on this storage location, " + "File 
Suffix {} : Suffix {} : ",
-          acs, getActiveClusterSuffix());
+          "Read Replica Cluster: This is the active cluster on this storage 
location with cluster id: {}",

Review Comment:
   ```suggestion
             "[Read-replica feature] This cluster is the active (read-write) 
cluster on this shared storage location, cluster id: {}",
   ```



-- 
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]

Reply via email to