我在Mac OS X 10.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]
任何帮助?
答案 0 :(得分:3)
答案 1 :(得分:2)
问题是Java 9,Java 8脚本正常运行。
我已经安装了Java 8并更改了JAVA_HOME
conf/hbase-env.sh
变量
答案 2 :(得分:0)
根据this SO回答,将JAVA_HOME
中的/usr/local/Cellar/hbase/1.2.6/libexec/conf/hbase-env
更改为
export JAVA_HOME="$(/usr/libexec/java_home -v '1.8*')"