无法连接hbase shell

camsedfj  于 2021-06-08  发布在  Hbase
关注(0)|答案(3)|浏览(545)

我在macosx10.11.6上安装了hbase 1.2.6,只是为了进行独立测试。我已配置 hbase-site.xml 以及 hbase-env.sh . 发出命令 ./hbase shell 要启动shell,我有以下错误

$ bin/hbase  shell
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.java.invokers.RubyToJavaInvoker (file:/Users/user/Hbase/Hb126/lib/jruby-complete-1.6.8.jar) to method java.lang.Object.registerNatives()
WARNING: Please consider reporting this to the maintainers of org.jruby.java.invokers.RubyToJavaInvoker
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
ArgumentError: wrong number of arguments (0 for 1)
  method_added at file:/Users/user/Hbase/Hb126/lib/jruby-complete-1.6.8.jar!/builtin/javasupport/core_ext/object.rb:10
  method_added at file:/Users/user/Hbase/Hb126/lib/jruby-complete-1.6.8.jar!/builtin/javasupport/core_ext/object.rb:129
       Pattern at file:/Users/user/Hbase/Hb126/lib/jruby-complete-1.6.8.jar!/builtin/java/java.util.regex.rb:2
        (root) at file:/Users/user/Hbase/Hb126/lib/jruby-complete-1.6.8.jar!/builtin/java/java.util.regex.rb:1
       require at org/jruby/RubyKernel.java:1062
        (root) at file:/Users/user/Hbase/Hb126/lib/jruby-complete-1.6.8.jar!/builtin/java/java.util.regex.rb:42
        (root) at /Users/user/Hbase/Hb126/bin/../bin/hirb.rb:38

java版本:

java 9.0.4
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)

jruby版本:

jruby 9.1.15.0 (2.3.3) 2017-12-07 929fde8 Java HotSpot(TM) 64-Bit Server VM 9.0.4+11 on 9.0.4+11 +jit [darwin-x86_64]

有什么帮助吗?

mwg9r5ms

mwg9r5ms1#

问题出在Java9上,Java8的脚本工作正常。我已经安装了Java8并更改了 JAVA_HOME 变量输入 conf/hbase-env.sh

chhkpiq4

chhkpiq42#

hbase目前不支持java 9。
https://issues.apache.org/jira/browse/hbase-12081
尝试设置不同的 JAVA_HOMEhbase-env

a0x5cqrl

a0x5cqrl3#

根据这个答案,改变 JAVA_HOME/usr/local/Cellar/hbase/1.2.6/libexec/conf/hbase-env

export JAVA_HOME="$(/usr/libexec/java_home -v '1.8*')"

相关问题