diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java index 73008c7ad5fd..e86274bc8f26 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java @@ -92,7 +92,7 @@ public static TableName getDefaultNameOfMetaForReplica() { public static TableName initializeHbaseMetaTableName(Configuration conf) { String suffix_val = conf.get(HConstants.HBASE_META_TABLE_SUFFIX, HConstants.HBASE_META_TABLE_SUFFIX_DEFAULT_VALUE); - LOG.info("Meta table suffix value: {}", suffix_val); + LOG.info("Read Replica Cluster suffix value: {}", suffix_val); if (Strings.isNullOrEmpty(suffix_val)) { return valueOf(NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR, "meta"); } else { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java index 034faa058027..445cee6a8492 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java +++ b/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); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java index 06ea8a9d52bf..df63a7e45c00 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java +++ b/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"); } } @@ -675,7 +675,8 @@ public static void setActiveClusterSuffix(final FileSystem fs, final Path rootdi final Path tempIdFile = new Path(tempDir, HConstants.ACTIVE_CLUSTER_SUFFIX_FILE_NAME); String fsuffix = new String(bdata, StandardCharsets.US_ASCII); - LOG.debug("Create Active cluster Suffix file [{}] with Suffix: {}", idFile, fsuffix); + LOG.debug("Read Replica Cluster id file [{}] is present and contains cluster id: {}", idFile, + fsuffix); writeClusterInfo(fs, rootdir, idFile, tempIdFile, bdata, wait); }