Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
3.0.0-alpha-1, 2.3.0, 2.2.3
-
None
-
None
-
None
Description
When hadoop is set on the OS path, hbase CLI command prints below error, before processing and executing related option:
[root@hbase01 hbase-3.0.0-SNAPSHOT]# bin/hbase version Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty HBase 3.0.0-SNAPSHOT Source code repository git://ChevreuilWellington/Users/wellingtonchevreuil/Projects/hbase/hbase revision=bb83e423cc6c2102df98e78e864ce1f92e597d31 Compiled by wellingtonchevreuil on Wed Oct 9 11:09:25 BST 2019 From source with checksum 4f90bf3a8ec77da34a0a9929a5e794f308f52a0bd644c727b39c7faccb4a68a022e2ddb8be453596fe4312b7e3de19b48ba80c0200606b97ab1bec0f24f06f7d
This is non critical, though, since even with the above error, command is still executed properly.
It seems we are specifying the wrong path for hbase jars here, causing none of the jars to be loaded in CLASSPATH variable, at this point.
Then, when hadoop is detected to be in the script path, it enters this if and tries to execute org.apache.hadoop.hbase.util.GetJavaProperty here, but hbase-server jar is not in the CLASSPATH yet.
This is sorted by fixing the jars path mentioned above as follows:
diff --git a/bin/hbase b/bin/hbase index a69ad6d1ad..f1dc5e36c6 100755 --- a/bin/hbase +++ b/bin/hbase @@ -188,7 +188,7 @@ if [ -d "$HBASE_HOME/hbase-server/target/hbase-webapps" ]; then fi #add the hbase jars for each module -for f in $HBASE_HOME/hbase-jars/hbase*.jar; do +for f in $HBASE_HOME/lib/hbase*.jar; do if [[ $f = *sources.jar ]] then : # Skip sources.jar
Attachments
Issue Links
- links to