Skip to content

Commit

Permalink
HBASE-20833 Modify pre-upgrade coprocessor validator to support table…
Browse files Browse the repository at this point in the history
… level coprocessors

- -jar parameter now accepts multiple jar files and directories of jar files.
- observer classes can be verified by -class option.
- -table parameter was added to check table level coprocessors.
- -config parameter was added to obtain the coprocessor classes from
  HBase cofiguration.
- -scan option was removed.

Signed-off-by: Mike Drob <mdrob@apache.org>
  • Loading branch information
meszibalu authored and madrob committed Jul 9, 2018
1 parent 59867ee commit ad5b4af
Show file tree
Hide file tree
Showing 5 changed files with 350 additions and 131 deletions.
Expand Up @@ -65,9 +65,9 @@ public void setConf(Configuration conf) {
private void printUsage() { private void printUsage() {
System.out.println("usage: hbase " + TOOL_NAME + " command ..."); System.out.println("usage: hbase " + TOOL_NAME + " command ...");
System.out.println("Available commands:"); System.out.println("Available commands:");
System.out.printf(" %-12s Validate co-processors are compatible with HBase%n", System.out.printf(" %-15s Validate co-processors are compatible with HBase%n",
VALIDATE_CP_NAME); VALIDATE_CP_NAME);
System.out.printf(" %-12s Validate DataBlockEncoding are compatible on the cluster%n", System.out.printf(" %-15s Validate DataBlockEncodings are compatible with HBase%n",
VALIDATE_DBE_NAME); VALIDATE_DBE_NAME);
System.out.println("For further information, please use command -h"); System.out.println("For further information, please use command -h");
} }
Expand Down Expand Up @@ -104,8 +104,10 @@ public int run(String[] args) throws Exception {
public static void main(String[] args) { public static void main(String[] args) {
int ret; int ret;


Configuration conf = HBaseConfiguration.create();

try { try {
ret = ToolRunner.run(HBaseConfiguration.create(), new PreUpgradeValidator(), args); ret = ToolRunner.run(conf, new PreUpgradeValidator(), args);
} catch (Exception e) { } catch (Exception e) {
LOG.error("Error running command-line tool", e); LOG.error("Error running command-line tool", e);
ret = AbstractHBaseTool.EXIT_FAILURE; ret = AbstractHBaseTool.EXIT_FAILURE;
Expand Down

0 comments on commit ad5b4af

Please sign in to comment.