问题描述
我试图通过将所有必需的jar添加到来自Java命令行路径(./java -cp的类路径中来运行相同的代码(org.apache.hadoop.hbase.mapreduce.Export)导出类. :/npachava/*导出测试/test),出现以下错误.
I am trying to run the same code(org.apache.hadoop.hbase.mapreduce.Export) Export class by adding the all the required jars to the class path from java command line path( ./java -cp ".:/npachava/*" Export test /test) ,I am getting following error.
Exception in thread "main" java.io.IOException: Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the correspond server addresses.
at org.apache.hadoop.mapreduce.Cluster.initialize(Cluster.java:120)
at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:82)
at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:75)
at org.apache.hadoop.mapreduce.Job$9.run(Job.java:1260)
at org.apache.hadoop.mapreduce.Job$9.run(Job.java:1256)
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:1657)
at org.apache.hadoop.mapreduce.Job.connect(Job.java:1256)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:1284)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1308)
at Export.main(Export.java:194)
但是从hbase bin目录(./hbase org.apache.hadoop.hbase.mapreduce.Driver导出测试/TestTableData)的命令提示符下运行即可.
But running from the command prompt fromthe hbase bin directory( ./hbase org.apache.hadoop.hbase.mapreduce.Driver export test /TestTableData) works perfectly fine.
我尝试将配置设置为yarn/local,但是都没有起作用
I have tried to set the config to yarn/local but both didnt worked
Configuration conf = HBaseConfiguration.create();
conf.set("mapreduce.framework.name", "yarn"); also with "local"
任何人都可以帮助
我在Linux上使用hbase 0.94.17版本运行.
I am running with hbase 0.94.17 version on my linux.
推荐答案
添加 hadoop-mapreduce-client-jobclient.jar (下载前请选择hadoop版本).
add hadoop-mapreduce-client-jobclient.jar (select hadoop version before downloading).
这篇关于无法初始化集群.请检查您的配置是否包含mapreduce.framework.name和相应的服务器地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!