Sau*_*abh 11 ruby java macos hadoop hbase
尝试hbase shell
在OSX中运行时出现以下错误(版本:10.11.4):
警告:-J-Dfile.encoding = UTF-8参数被忽略(在同一个VM中启动?)
警告:-J-XX:忽略MaxPermSize = 1024m参数(在同一个VM中启动?)
警告:-J-Xmx4096m参数被忽略(在同一个VM中启动?)
TypeError:无法在org/jruby/RubyKernel.java:1071中将Pathname转换为String require
需要在文件:/usr/local/Cellar/hbase/1.2.6/libexec/lib/jruby-complete-1.6.8.jar!/ META INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require .RB:36
(root)在/usr/local/Cellar/hbase/1.2.6/libexec/bin/hirb.rb:118
我通过以下方式安装了Hbase: brew install hbase
作为该解决方案给在这里,我也试图像下面设置PATH变量:
? ~ export HBASE_HOME=/usr/local/Cellar/hbase/1.2.6/libexec
? ~ export PATH=$HBASE_HOME/bin:$PATH
Run Code Online (Sandbox Code Playgroud)
我也有jruby-complete-1.6.8.jar
在$HBASE_HOME/lib
,如前所述这里.但仍然会出现同样的错误.
? rvm list:
rvm rubies
ruby-2.1.2 [ x86_64 ]
ruby-2.2.0 [ x86_64 ]
=* ruby-2.2.2 [ x86_64 ]
# => - current
# =* - current && default
# * - default
? ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
? which ruby
/usr/bin/ruby
Run Code Online (Sandbox Code Playgroud)
猜测rvm中有什么问题,我通过以下方式卸载它:rvm remove
和rvm uninstall
.但仍然存在错误.
? brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
mongodb@2.6
Warning: Your Xcode (7.3.1) is outdated.
Please update to Xcode 8.2.1 (or delete it).
Xcode can be updated from the App Store.
Warning: Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:
brew install erlang@19
Run `brew missing` for more details.
? brew missing
rabbitmq: erlang@19
Run Code Online (Sandbox Code Playgroud)
我想到的是我能够以root用户身份运行HBASE,所以如果我这样做:
> Sudo su
root> export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
root> hbase shell
......It works......
Run Code Online (Sandbox Code Playgroud)
所以看来,这是一些许可问题,因为它无法正常运行.
您是否尝试过使用 Oracle 的 JDK 并从 Apache 页面安装?
http://ftp.ps.pl/pub/apache/hbase/1.3.1/hbase-1.3.1-bin.tar.gz
在我的情况下它工作得很好
> ./start-hbase.sh
starting master, logging to $HOME/..../hbase-1.3.1/bin/../logs/hbase-michalo-master-pi.local.out
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Run Code Online (Sandbox Code Playgroud)
并且,在另一个外壳中
> ./hbase shell
WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.3.1, r930b9a55528fe45d8edce7af42fef2d35e77677a, Thu Apr 6 19:36:54 PDT 2017
hbase(main):001:0>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
560 次 |
最近记录: |