Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}

Expand Down Expand Up @@ -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);
}

Expand Down