Skip to content
Permalink
Browse files
HBASE-22825 [HBCK2] Add a client-side to hbase-operator-tools that ca…
…n exploit fixMeta added in server side Fix review comments - Put FixMeta alphabetically Signed-off-by: Sean Busbey <busbey@apache.org> Signed-off-by: stack <stack@apache.org>
  • Loading branch information
jatsakthi authored and saintstack committed Sep 5, 2019
1 parent 6dc9154 commit 49f4af2bf0a9f884036382ca12e5475ac17e185e
Showing 2 changed files with 19 additions and 1 deletion.
@@ -88,6 +88,8 @@ public class HBCK2 extends Configured implements org.apache.hadoop.util.Tool {
private static final String VERSION = "version";
private static final String SET_REGION_STATE = "setRegionState";
private static final String SCHEDULE_RECOVERIES = "scheduleRecoveries";
private static final String FIX_META = "fixMeta";

private Configuration conf;
static String [] MINIMUM_HBCK2_VERSION = {"2.0.3", "2.1.1", "2.2.0", "3.0.0"};
private boolean skipCheck = false;
@@ -306,6 +308,9 @@ private static String getCommandUsage() {
writer.println(" restores 'hbase.version' if missing. Interacts with the filesystem");
writer.println(" only! Modified regions need to be reopened to pick-up changes.");
writer.println();
writer.println(" " + FIX_META);
writer.println(" Do a server-side fixing of bad or inconsistent state in hbase:meta");
writer.println();
writer.println(" " + REPLICATION + " [OPTIONS] [<TABLENAME>...]");
writer.println(" Options:");
writer.println(" -f, --fix fix any replication issues found.");
@@ -586,6 +591,19 @@ private int doCommandLine(CommandLine commandLine, Options options) throws IOExc
}
break;

case FIX_META:
if (commands.length > 1) {
usage(options, command + " doesn't take any arguments");

This comment has been minimized.

Copy link
@jfrabaute

jfrabaute Sep 6, 2019

Contributor

Hi,

I'm trying to build the latest version, and the compile phase is failing with the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project hbase-hbck2: Compilation failure
[ERROR] /home/fabrice/git/hbase-operator-tools/hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java:[596,11] cannot find symbol
[ERROR] symbol: method usage(org.apache.hbase.thirdparty.org.apache.commons.cli.Options,java.lang.String)
[ERROR] location: class org.apache.hbase.HBCK2

I can't find the method "usage". Is that compiling for you?

Thanks.

This comment has been minimized.

Copy link
@busbey

busbey Sep 6, 2019

Contributor

Please open a JIRA or email dev@hbase. A comment here is going to have very limited visibility.

This comment has been minimized.

Copy link
@jfrabaute

jfrabaute Sep 6, 2019

Contributor

I just sent a pull request: #23

Is that ok?

This comment has been minimized.

Copy link
@busbey

busbey Sep 6, 2019

Contributor

that was great, thanks! I merged it as an addendum to this commit. if you have anything else you'd like to clean up, please file a jira that you can reference from the PR.

return EXIT_FAILURE;
}
try (ClusterConnection connection = connect(); Hbck hbck = connection.getHbck()) {
checkHBCKSupport(connection, command, "2.0.6", "2.1.6", "2.2.1", "2.3.0",
"3.0.0");
hbck.fixMeta();
System.out.println("Server-side processing of fixMeta triggered.");
}
break;

default:
showErrorMessage("Unsupported command: " + command);
return EXIT_FAILURE;
@@ -123,7 +123,7 @@
<compileSource>1.8</compileSource>
<java.min.version>${compileSource}</java.min.version>
<maven.min.version>3.3.3</maven.min.version>
<hbase.version>2.1.2</hbase.version>
<hbase.version>2.1.6</hbase.version>
<maven.compiler.version>3.6.1</maven.compiler.version>
<surefire.version>2.21.0</surefire.version>
<surefire.provider>surefire-junit47</surefire.provider>

0 comments on commit 49f4af2

Please sign in to comment.