HBASE-23817 The message "Please make sure that backup is enabled on the cluster." is shown even when the backup feature is enabled (#3427)

Signed-off-by: Toshihiro Suzuki <brfrn169@gmail.com>
This commit is contained in:
Wei-Chiu Chuang 2021-06-29 02:19:32 -07:00 committed by GitHub
parent 9eae57fe2e
commit 79659d8e66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 7 deletions

View File

@ -85,8 +85,6 @@ public class BackupDriver extends AbstractHBaseTool {
return -1;
}
System.out.println(BackupRestoreConstants.VERIFY_BACKUP);
String cmd = null;
String[] remainArgs = null;
if (args == null || args.length == 0) {
@ -210,5 +208,6 @@ public class BackupDriver extends AbstractHBaseTool {
protected void printToolUsage() throws IOException {
System.out.println(BackupCommands.USAGE);
System.out.println(BackupRestoreConstants.VERIFY_BACKUP);
}
}

View File

@ -105,13 +105,13 @@ public interface BackupRestoreConstants {
+ "org.apache.hadoop.hbase.backup.regionserver.LogRollRegionServerProcedureManager\n"
+ "hbase.coprocessor.region.classes=YOUR_CLASSES,"
+ "org.apache.hadoop.hbase.backup.BackupObserver\n"
+ "and restart the cluster\n";
+ "and restart the cluster\n"
+ "For more information please see http://hbase.apache.org/book.html#backuprestore\n";
String ENABLE_BACKUP = "Backup is not enabled. To enable backup, "+
"in hbase-site.xml, set:\n "
+ BACKUP_CONFIG_STRING;
String VERIFY_BACKUP = "Please make sure that backup is enabled on the cluster. To enable "
+ "backup, in hbase-site.xml, set:\n " + BACKUP_CONFIG_STRING;
String VERIFY_BACKUP = "To enable backup, in hbase-site.xml, set:\n " + BACKUP_CONFIG_STRING;
/*
* Delimiter in table name list in restore command

View File

@ -92,8 +92,6 @@ public class RestoreDriver extends AbstractHBaseTool {
return -1;
}
System.out.println(BackupRestoreConstants.VERIFY_BACKUP);
// enable debug logging
if (cmd.hasOption(OPTION_DEBUG)) {
Log4jUtils.setLogLevel("org.apache.hadoop.hbase.backup", "DEBUG");
@ -269,5 +267,6 @@ public class RestoreDriver extends AbstractHBaseTool {
helpFormatter.setWidth(100);
helpFormatter.setSyntaxPrefix("Options:");
helpFormatter.printHelp(" ", null, options, USAGE_FOOTER);
System.out.println(BackupRestoreConstants.VERIFY_BACKUP);
}
}