Skip to content

Commit 79659d8

Browse files
authored
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>
1 parent 9eae57f commit 79659d8

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/BackupDriver.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ private int parseAndRun(String[] args) throws IOException {
8585
return -1;
8686
}
8787

88-
System.out.println(BackupRestoreConstants.VERIFY_BACKUP);
89-
9088
String cmd = null;
9189
String[] remainArgs = null;
9290
if (args == null || args.length == 0) {
@@ -210,5 +208,6 @@ public int run(String[] args) throws IOException {
210208

211209
protected void printToolUsage() throws IOException {
212210
System.out.println(BackupCommands.USAGE);
211+
System.out.println(BackupRestoreConstants.VERIFY_BACKUP);
213212
}
214213
}

hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/BackupRestoreConstants.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ public interface BackupRestoreConstants {
105105
+ "org.apache.hadoop.hbase.backup.regionserver.LogRollRegionServerProcedureManager\n"
106106
+ "hbase.coprocessor.region.classes=YOUR_CLASSES,"
107107
+ "org.apache.hadoop.hbase.backup.BackupObserver\n"
108-
+ "and restart the cluster\n";
108+
+ "and restart the cluster\n"
109+
+ "For more information please see http://hbase.apache.org/book.html#backuprestore\n";
109110
String ENABLE_BACKUP = "Backup is not enabled. To enable backup, "+
110111
"in hbase-site.xml, set:\n "
111112
+ BACKUP_CONFIG_STRING;
112113

113-
String VERIFY_BACKUP = "Please make sure that backup is enabled on the cluster. To enable "
114-
+ "backup, in hbase-site.xml, set:\n " + BACKUP_CONFIG_STRING;
114+
String VERIFY_BACKUP = "To enable backup, in hbase-site.xml, set:\n " + BACKUP_CONFIG_STRING;
115115

116116
/*
117117
* Delimiter in table name list in restore command

hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/RestoreDriver.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ private int parseAndRun(String[] args) throws IOException {
9292
return -1;
9393
}
9494

95-
System.out.println(BackupRestoreConstants.VERIFY_BACKUP);
96-
9795
// enable debug logging
9896
if (cmd.hasOption(OPTION_DEBUG)) {
9997
Log4jUtils.setLogLevel("org.apache.hadoop.hbase.backup", "DEBUG");
@@ -269,5 +267,6 @@ protected void printToolUsage() {
269267
helpFormatter.setWidth(100);
270268
helpFormatter.setSyntaxPrefix("Options:");
271269
helpFormatter.printHelp(" ", null, options, USAGE_FOOTER);
270+
System.out.println(BackupRestoreConstants.VERIFY_BACKUP);
272271
}
273272
}

0 commit comments

Comments
 (0)