anmolnar commented on code in PR #7857:
URL: https://github.com/apache/hbase/pull/7857#discussion_r2906412164
##########
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: {}",
+ new String(getSuffixFileDataToWrite(), StandardCharsets.UTF_8));
} catch (FileNotFoundException fnfe) {
// this is the active cluster, create active cluster suffix file if it
does not exist
FSUtils.setActiveClusterSuffix(fs, rootdir,
getSuffixFileDataToWrite(), wait);
Review Comment:
Logging of this branch is also inaccurate. This is the point where we first
create the suffix file when file system is initialized in the active cluster
and no logs are emitted. The FSUtil method `setActiveClusterSuffix` will log,
but only at debug level. Please add some meaningful log message here too.
--
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]