0

当我尝试通过 oozie 连接到 HBase 时,出现以下异常:

`Failing Oozie Launcher, Main class [com.sample.util.HBaseBulkLoad], main() threw exception, org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation@6f36e7f3 closed
java.io.IOException: org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation@6f36e7f3 closed
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:794)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:782)
    at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:249)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:213)
    at com.sample.dao.HBaseDao.bulkLoadUsingMapper(HBaseDao.java:191)
    at com.sample.util.HBaseBulkLoad.main(HBaseBulkLoad.java:32)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:454)
    at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50)
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:393)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:327)
    at org.apache.hadoop.mapred.Child$4.run(Child.java:270)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:415)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1232)
    at org.apache.hadoop.mapred.Child.main(Child.java:264)`

我的 workflow.xml 看起来像这样,

`<workflow-app xmlns="uri:oozie:workflow:0.2" name="sample-wf">
<start to="java-node"/>
 <action name="java-node">
        <java>
            <job-tracker>${jobTracker}</job-tracker>
            <name-node>${nameNode}</name-node>
            <configuration>
                <property>
                    <name>mapred.job.queue.name</name>
                    <value>${queueName}</value>
                </property>
            </configuration>
            <main-class>com.sample.util.HBaseBulkLoad</main-class>
                <arg>TEST</arg>
                <arg>hdfs://centOS/user/sample/input/sample5.txt</arg>
                <arg>hdfs://centOS/user/sample/HFile</arg>
        </java>
        <ok to="end"/>
        <error to="fail"/>
    </action>
    <kill name="fail">
        <message>Java failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <end name="end"/>
</workflow-app>`

我可以使用hadoop jar命令运行 jar 文件,但不能使用 oozie。我在java中设置了所有必需的配置。但仍然得到异常。

HMasterHRegionServer正在运行。哪位知道的请帮帮我...

4

1 回答 1

0

确保运行 Oozie 作业的机器可以访问您的 Zookeeper 服务器,否则 HBaseClient 将无法发现您的 HRegionServers。

于 2012-08-29T20:09:31.307 回答