HBase 0.92单独在Windows上使用Cygwin [英] HBase 0.92 Standalone on Windows with Cygwin
问题描述
有人知道一个教程如何HBase可以在Cygwin下的Windows上运行?
Does anybody know a tutorial how HBase can be run on Windows under Cygwin?
我设法设置所有的东西,例如用SSH自动登录的密钥,但我坚持以下错误信息:
I managed to setup everything such as the keys for auto login with SSH but Im stuck with following error message:
localhost: +======================================================================+
localhost: | Error: JAVA_HOME is not set and Java could not be found |
localhost: +----------------------------------------------------------------------+
localhost: | Please download the latest Sun JDK from the Sun Java web site |
localhost: | > http://java.sun.com/javase/downloads/ < |
localhost: | |
localhost: | HBase requires Java 1.6 or later. |
localhost: | NOTE: This script will find Sun Java whether you install using the |
localhost: | binary or the RPM based installer. |
localhost: +======================================================================+
...
java.lang.NoClassDefFoundError: org/apache/zookeeper/KeeperException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.KeeperException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
我已经设置.bash_profile指向:
I already set .bash_profile to point to:
export JAVA_HOME='/usr/lib/jre1.6.1'
它是真实jre上的符号链接
which is symbolic link on the real jre
/usr/lib/jre1.6.1 -> /cygdrive/c/Java/jre7/
推荐答案
同样的问题,我发现如下:
Cygwin使用:作为路径分隔符。
但是创建CLASS_PATH的脚本工作不正确。最后的CLASS_PATH看起来像
...:zookeeper.jar:,结尾有:。之前运行java脚本将CLASS_PATH转换为Windows样式。但是用:结束了!
I had the same issue and I found following: Cygwin use ":" as a path separator. But script that creates CLASS_PATH works incorrectly. Final CLASS_PATH looks like "...:zookeeper.jar:" with ":" at the end. Before run java script converting CLASS_PATH to Windows style. But with ":" at the end !!
所以我的解决方案是:在hbase / lib下创建一个空文件zzz.jar >。
zzz.jar将在CLASS_PATH中最后一次,zookeeper.jar将正确添加到CLASS_PATH。
So my solution is: just create an empty file "zzz.jar" under hbase/lib. zzz.jar will be very last in CLASS_PATH and zookeeper.jar will be added to CLASS_PATH correctly.
我知道这是更好的修复脚本,但我关心:)
我需要HBase只有2天,所以它工作,我很高兴:)
I know it is better to fix script, but I who cares :) I need HBase for 2 days only, so it works and I am happy :)
这篇关于HBase 0.92单独在Windows上使用Cygwin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!