Подтвердить что ты не робот

Запуск "hbase shell", дающий ошибку в OSX

Получение следующей ошибки при попытке запустить hbase shell в OSX (версия: 10.11.4):

warning: -J-Dfile.encoding = аргумент UTF-8 игнорируется (запущен в том же VM?)

предупреждение: -J-XX: аргумент MaxPermSize = 1024m игнорируется (запущен в той же VM?)

предупреждение: -J-Xmx4096m аргумент игнорируется (запущен в той же VM?)

TypeError: невозможно преобразовать Pathname в String в org/jruby/RubyKernel.java: 1071

требуется в файле:/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: brew install hbase

Как указано в решении здесь, я также пытаюсь установить переменные PATH следующим образом:

➜  ~ export HBASE_HOME=/usr/local/Cellar/hbase/1.2.6/libexec
➜  ~ export PATH=$HBASE_HOME/bin:$PATH

У меня также есть jruby-complete-1.6.8.jar в $HBASE_HOME/lib, как указано здесь. Но по-прежнему сохраняется та же ошибка.

Изменить 1

➜ 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

Угадав, что что-то не так в rvm, я удалил его через: rvm remove и rvm uninstall. Но ошибка сохраняется.

Изменить 2

➜  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:
  [email protected]

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 [email protected]

Run `brew missing` for more details.

➜  brew missing
rabbitmq: [email protected]

Изменить 3

Что я понял, я могу запустить HBASE в качестве пользователя root, поэтому, если я это сделаю:

> Sudo su
root> export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
root> hbase shell
       ......It works......

Итак, похоже, это проблема с разрешением, из-за которой не удается нормально работать.

4b9b3361

Ответ 1

Вы пытались использовать 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

И в другой оболочке

> ./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>