无法在Windows上安装HBase

时间:2019-02-17 16:08:03

标签: windows hbase

我正在尝试安装hbase 0.94.13。我修改了hbase-default.xml,使其看起来像这样:

<?xml version="1.0" encoding="UTF-8"?><section xml:id="hbase_default_configurations" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://docbook.org/ns/docbook"><title>HBase Default Configuration</title><para/><glossary xml:id="hbase.default.configuration"><title>HBase Default Configuration</title><para>
The documentation below is generated using the default hbase configuration file,
<filename>hbase-default.xml</filename>, as source.
</para><glossentry id="hbase.rootdir"><glossterm><varname>hbase.rootdir</varname></glossterm><glossdef><para>The directory shared by region servers and into
    which HBase persists.  The URL should be 'fully-qualified'
    to include the filesystem scheme.  For example, to specify the
    HDFS directory '/hbase' where the HDFS instance's namenode is
    running at namenode.example.org on port 9000, set this value to:
    hdfs://namenode.example.org:9000/hbase.  By default HBase writes
    into /tmp.  Change this configuration else all data will be lost
    on machine restart.
   ....</glossary></section>

我遵循了本教程http://ics.upjs.sk/~novotnyr/blog/334/setting-up-hbase-on-windows的操作,但遇到此错误:

19/02/17 17:59:37 FATAL conf.Configuration: bad conf file: top-level element not <configuration>
19/02/17 17:59:37 WARN conf.Configuration: bad conf file: element not <property>
19/02/17 17:59:37 WARN conf.Configuration: bad conf file: element not <property>
19/02/17 17:59:37 WARN conf.Configuration: bad conf file: element not <property>
Exception in thread "main" java.lang.RuntimeException: hbase-default.xml file seems to be for and old version of HBase (null), this version is 0.94.13
        at org.apache.hadoop.hbase.HBaseConfiguration.checkDefaultsVersion(HBaseConfiguration.java:68)
        at org.apache.hadoop.hbase.HBaseConfiguration.addHbaseResources(HBaseConfiguration.java:100)
        at org.apache.hadoop.hbase.HBaseConfiguration.create(HBaseConfiguration.java:111)
        at org.apache.hadoop.hbase.util.HBaseConfTool.main(HBaseConfTool.java:38)
19/02/17 17:59:38 FATAL conf.Configuration: bad conf file: top-level element not <configuration>
19/02/17 17:59:38 WARN conf.Configuration: bad conf file: element not <property>
19/02/17 17:59:38 WARN conf.Configuration: bad conf file: element not <property>
19/02/17 17:59:38 WARN conf.Configuration: bad conf file: element not <property>
Exception in thread "main" java.lang.RuntimeException: hbase-default.xml file seems to be for and old version of HBase (null), this version is 0.94.13
        at org.apache.hadoop.hbase.HBaseConfiguration.checkDefaultsVersion(HBaseConfiguration.java:68)
        at org.apache.hadoop.hbase.HBaseConfiguration.addHbaseResources(HBaseConfiguration.java:100)
        at org.apache.hadoop.hbase.HBaseConfiguration.create(HBaseConfiguration.java:111)
        at org.apache.hadoop.hbase.zookeeper.ZKServerTool.main(ZKServerTool.java:39)
starting master, logging to /cygdrive/c/hbase-0.94.13/bin/../logs/hbase-user-master-user-PC.out
java.lang.NoClassDefFoundError: org/apache/zookeeper/KeeperException
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
        at java.lang.Class.getMethod0(Class.java:3018)
        at java.lang.Class.getMethod(Class.java:1784)
        at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.KeeperException
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
user@localhost's password:
localhost: regionserver running as process 9820. Stop it first.

能帮我吗?预先感谢

1 个答案:

答案 0 :(得分:0)

似乎,HBASE_CLASSPATH中缺少Zookeeper jar。您需要在hbase-env.sh文件中进行设置。

export HBASE_CLASSPATH=<Path to the Zookeeper jar and other depenedencies>