繁体   English   中英

无法启动 HBase shell

[英]unable to launch HBase shell

我能够让 localhost:16010 运行。 但是,不知何故,当我使用时,Hbase shell 没有启动:

01HW993798:bin tcssig$ cd /Users/tcssig/Downloads/hbase-1.0.3/bin
01HW993798:bin tcssig$ hbase shell

-bash: hbase: command not found

当我直接启动 Hbase Unix 可执行文件时,它会生成以下错误日志。

 Error: JAVA_HOME is not set 

虽然我已经设置了。 仅在此之后,本地主机:16010 正在运行。

注意:我知道有一个类似的问题,但那里没有相关的答案。

使用它我可以调用命令,但现在它给出了错误:

./hbase: line 403: /Users/tcssig/Downloads/hbase-

1.0.3/bin/JAVA_HOME:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Cont``ents/Home/bin/java: No such file or directory

虽然我那里有java文件。

你的 hbase 调用应该是这样的:

cd /Users/tcssig/Downloads/hbase-1.0.3/bin
./hbase shell  [Note the ./]

当您只键入hbase shell linux 会在PATH环境变量中包含的所有目录中搜索 hbase 可执行文件。 由于上面的 bin 目录不包括在内,它会出错。

或者,您也可以根据 linux 发行版更新路径变量,执行此操作的命令可能会有所不同。 它应该是这样的:

export PATH=/Users/tcssig/Downloads/hbase-1.0.3/bin:$PATH

将此命令放在您的.bashrc.bash_profile ,然后获取此文件。 这样 bin 目录现在包含在 PATH 中,并且hbase命令可用。

进入$HBASE_HOME/bin路径,然后尝试:

./hbase shell

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM