Importtsv 命令给出:容器以非零退出代码 1 错误退出

Importtsv command gives : Container exited with a non-zero exit code 1 error

我正在尝试将 tsv 文件加载到现有的 hbase table。我正在使用以下命令:

/usr/local/hbase/bin$ hbase org.apache.hadoop.hbase.mapreduce.ImportTsv -Dimporttsv.columns=HBASE_ROW_KEY,cf:value '-Dtable_name.separator=\t' Table-name /hdfs-path-to-input-file

但是当我执行上面的命令时,出现如下错误

Container id: container_1434304449478_0018_02_000001
Exit code: 1
Stack trace: ExitCodeException exitCode=1:
        at org.apache.hadoop.util.Shell.runCommand(Shell.java:538)
        at org.apache.hadoop.util.Shell.run(Shell.java:455)
        at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:715)
        at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:211)
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:302)
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:82)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)


Container exited with a non-zero exit code 1
Failing this attempt. Failing the application.
2015-06-16 13:37:48,779 INFO  [main] mapreduce.Job: Counters: 0

通过 UI 进一步挖掘容器日志时,我收到以下错误

2015-06-16 13:28:02,776 ERROR [main] org.apache.hadoop.mapreduce.v2.app.client.MRClientService: Webapps failed to start. Ignoring for now:
java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.hadoop.yarn.server.webproxy.amfilter.AmFilterInitializer not found
    at org.apache.hadoop.conf.Configuration.getClasses(Configuration.java:1699)
    at org.apache.hadoop.http.HttpServer.getFilterInitializers(HttpServer.java:325)
    at org.apache.hadoop.http.HttpServer.<init>(HttpServer.java:267)
    at org.apache.hadoop.yarn.webapp.WebApps$Builder.<init>(WebApps.java:222)
    at org.apache.hadoop.yarn.webapp.WebApps$Builder.start(WebApps.java:219)
    at org.apache.hadoop.mapreduce.v2.app.client.MRClientService.serviceStart(MRClientService.java:136)
    at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193)
    at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.serviceStart(MRAppMaster.java:1058)
    at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193)
    at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.run(MRAppMaster.java:1445)
    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:1491)
    at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.initAndStartAppMaster(MRAppMaster.java:1441)
    at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.main(MRAppMaster.java:1374)
Caused by: java.lang.ClassNotFoundException: Class org.apache.hadoop.yarn.server.webproxy.amfilter.AmFilterInitializer not found
    at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1626)
    at org.apache.hadoop.conf.Configuration.getClasses(Configuration.java:1695)

我在多节点集群上使用 Hadoop-2.6.0 和 Hbase-0.98 版本。

我无法理解导致此错误的原因。请指导我。

java.lang.ClassNotFoundException: Class org.apache.hadoop.yarn.server.webproxy.amfilter.AmFilterInitializer not found

上面一行清楚地表明您缺少网络代理 jar。

您需要在您的 Hbase lib 文件夹中添加以下 jar。

hadoop-yarn-server-web-proxy-2.6.0.jar