[
https://issues.apache.org/jira/browse/HBASE-21763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16766181#comment-16766181
]
Wellington Chevreuil commented on HBASE-21763:
----------------------------------------------
Hi [~arshiya9414], good catch on these current errors.
Checked the current submitted patch, perhaps a better solution (or an addition
to the current checks introduced in this patch) for this *"-v"* option problem
is to actually create an "*hbck2.properties*" on the project
"src/main/resources" folder, with ${project.version} in the content. I noticed
current pom.xml already expects an "hbck2.properties" file on that directory,
so just creating it at that location as above would already cause it to be
created with the proper version (read from pom.xml file). It would also be nice
to have a unit test for this, to ensure it does not get broken again, case
someone remove the properties file of modifies the pom.
Tested *--hbase.zookeeper.property.clientPort* property, it may still show
java.lang.NumberFormatException if I miss the parameter value and specify a
command right away:
{noformat}
bin/hbase hbck -j ../hbase-hbck2-1.0.0-SNAPSHOT.jar
--hbase.zookeeper.property.clientPort unassigns 977eead507d2d64b65954f6e0c5c8f07
Exception in thread "main" java.lang.NumberFormatException: For input string:
"unassigns"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.valueOf(Integer.java:766)
at org.apache.hbase.HBCK2.run(HBCK2.java:358)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
at org.apache.hbase.HBCK2.main(HBCK2.java:440)
{noformat}
For *--zookeeper.znode.parent,* since it expects a znode format string, maybe
worth add validation to check if the passed param starts with an "/", as HBCK2
will fail if an invalid znode is passed.
> [HBCK2] hbck2 options does not work and throws exceptions
> ---------------------------------------------------------
>
> Key: HBASE-21763
> URL: https://issues.apache.org/jira/browse/HBASE-21763
> Project: HBase
> Issue Type: Bug
> Components: hbck2
> Affects Versions: hbck2-1.0.0
> Reporter: Syeda Arshiya Tabreen
> Assignee: Syeda Arshiya Tabreen
> Priority: Minor
> Fix For: hbck2-1.0.0
>
> Attachments: HBASE-21763.patch
>
>
> HBCK2 options throws below exceptions when executed
> 1. *--version* option throws NullPointerException
> 2. *--hbase.zookeeper.property.clientPort* option throws NumberFormatException
> 3. *--zookeeper.znode.parent* option throws IllegalArgumentException
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)