简体   繁体   English

带有YARN的HBase引发错误

[英]HBase with YARN throws ERROR

I'm using Hadoop 2.5.1 with HBase 0.98.11 on Ubuntu 14.04 我在Ubuntu 14.04上将Hadoop 2.5.1与HBase 0.98.11结合使用

I could run it in Pseudo-distributed mode. 我可以在伪分布式模式下运行它。 Now that I want to run on distributed mode. 现在,我想在分布式模式下运行。 I follow the instruction from sites and end up having an error in RUNTIME called "Error: org/apache/hadoop/hbase/HBaseConfiguration" (while there is no error when I compile the code). 我按照站点上的说明进行操作,最终在RUNTIME中出现一个错误,错误为“错误:org / apache / hadoop / hbase / HBaseConfiguration”(编译代码时没有错误)。

After trying things, I found that if I comment the mapreduce.framework.name in mapred-site.xml and also stuffs in yarn-site, I could be able to run the hadoop successfully. 经过尝试后,我发现,如果我在mapred-site.xml中注释了mapreduce.framework.name,并且还在yarn-site中注释了东西,则可以成功运行hadoop。

But I think it's the single-node running (I have no idea, just guessing by comparing the running time to what I ran in Pseudo and there is no MR in slave's node jps when running the job on master). 但是我认为这是单节点运行(我不知道,只是通过将运行时间与我在Pseudo中运行的时间进行比较来猜测,并且在主节点上运行作业时从节点的jps中没有MR)。

Here are some of my conf: 这是我的一些conf:

hdfs-site hdfs站点

<property>
<name>dfs.replication</name>
<value>2</value>
<description>Default block replication.
The actual number of replications can be specified when the file is created.
The default is used if replication is not specified in create time.
</description>
</property>
<!-- <property>
<name>dfs.namenode.name.dir</name>
<value>file:/usr/local/hadoop_store/hdfs/namenode</value>
</property>-->
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/local/hadoop_store/hdfs/datanode</value>
</property>

<property>
<name>dfs.datanode.use.datanode.hostname</name>
<value>false</value>
</property>

<property>
<name>dfs.permissions</name>
<value>false</value>
</property>

mapred-site 映射站点

 <property>
   <name>mapred.job.tracker</name>
   <value>localhost:54311</value>
   <description>The host and port that the MapReduce job tracker runs
   at.  If "local", then jobs are run in-process as a single map
   and reduce task.
   </description>
 </property>

 <!--<property>
   <name>mapreduce.framework.name</name>
   <value>yarn</value>
 </property>-->

yarn-site 纱线现场

 <!-- Site specific YARN configuration properties -->

 <!--<property>
     <name>yarn.nodemanager.aux-services</name>
     <value>mapreduce_shuffle</value>
 </property>
 <property>
     <name>yarn.nodemanager.aux-services.mapreduce_shuffle.class</name>
     <value>org.apache.hadoop.mapred.ShuffleHandler</value>
 </property>
 <property>
     <name>yarn.resourcemanager.address</name>
     <value>10.1.1.177:8032</value>
 </property>
 <property>
     <name>yarn.resourcemanager.scheduler.address</name>
     <value>10.1.1.177:8030</value>
 </property>
 <property>
     <name>yarn.resourcemanager.resource-tracker.address</name>
     <value>10.1.1.177:8031</value>
 </property>-->

Thank you so much for every help 非常感谢您的帮助

UPDATE: I try making some changes to the yarn-site by adding yarn.applicaton.classpath like this 更新:我尝试通过像这样添加yarn.applicaton.classpath来对纱线位置进行一些更改

https://dl-web.dropbox.com/get/Public/yarn.png?_subject_uid=51053996&w=AABeDJfRp_D31RiVHqBWn0r9naQR_lFVJXIlwvCwjdhCAQ https://dl-web.dropbox.com/get/Public/yarn.png?_subject_uid=51053996&w=AABeDJfRp_D31RiVHqBWn0r9naQR_lFVJXIlwvCwjdhCAQ

The error changed to EXIT CODE. 错误更改为退出代码。

https://dl-web.dropbox.com/get/Public/exitcode.jpg?_subject_uid=51053996&w=AAAQ-bYoRSrQV3yFq36vEDPnAB9aIHnyOQfnvt2cUHn5IQ https://dl-web.dropbox.com/get/Public/exitcode.jpg?_subject_uid=51053996&w=AAAQ-bYoRSrQV3yFq36vEDPnAB9aIHnyOQfnvt2cUHn5IQ

UPDATE2: In syslog of the application logs it says UPDATE2:在应用程序日志的syslog中,它说

2015-04-24 20:34:59,164 INFO [main] org.apache.hadoop.mapreduce.v2.app.MRAppMaster: Created MRAppMaster for application appattempt_1429792550440_0035_000002 2015-04-24 20:34:59,589 WARN [main] org.apache.hadoop.conf.Configuration: job.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.retry.interval; 2015-04-24 20:34:59,164信息[主] org.apache.hadoop.mapreduce.v2.app.MRAppMaster:为应用程序appattempt_1429792550440_0035_000002创建了MRAppMaster 2015-04-24 20:34:59,589 WARN [主] org.apache .hadoop.conf.Configuration:job.xml:尝试覆盖最终参数:mapreduce.job.end-notification.max.retry.interval; Ignoring. 无视。 2015-04-24 20:34:59,610 WARN [main] org.apache.hadoop.conf.Configuration: job.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.attempts; 2015-04-24 20:34:59,610警告[main] org.apache.hadoop.conf.Configuration:job.xml:尝试覆盖最终参数:mapreduce.job.end-notification.max.attempts; Ignoring. 无视。 2015-04-24 20:34:59,616 FATAL [main] org.apache.hadoop.mapreduce.v2.app.MRAppMaster: Error starting MRAppMaster java.lang.NoSuchMethodError: org.apache.hadoop.http.HttpConfig.setPolicy(Lorg/apache/hadoop/http/HttpConfig$Policy;)V at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.main(MRAppMaster.java:1364) 2015-04-24 20:34:59,621 INFO [Thread-1] org.apache.hadoop.mapreduce.v2.app.MRAppMaster: MRAppMaster received a signal. 2015-04-24 20:34:59,616 FATAL [main] org.apache.hadoop.mapreduce.v2.app.MRAppMaster:启动MRAppMaster java.lang.NoSuchMethodError时出错:org.apache.hadoop.http.HttpConfig.setPolicy(Lorg / apache / hadoop / http / HttpConfig $ Policy;)V org.apache.hadoop.mapreduce.v2.app.MRAppMaster.main(MRAppMaster.java:1364)2015-04-24 20:34:59,621信息[线程- 1] org.apache.hadoop.mapreduce.v2.app.MRAppMaster:MRAppMaster收到信号。 Signaling RMCommunicator and JobHistoryEventHandler. 向RMCommunicator和JobHistoryEventHandler发出信号。

Any suggestions pls 任何建议请

I guess that you didn't set up your hadoop cluster correctly please follow these steps : 我想您没有正确设置hadoop集群,请按照以下步骤操作:

Hadoop Configuration: Hadoop配置:

step 1 : edit hadoop-env.sh as following: 步骤1:按如下所示编辑hadoop-env.sh

# The java implementation to use.  Required.
export JAVA_HOME=/usr/lib/jvm/java-6-sun

step 2 : Now create a directory and set the required ownerships and permissions 步骤2:现在创建目录并设置所需的所有权和权限

$ sudo mkdir -p /app/hadoop/tmp
$ sudo chown hduser:hadoop /app/hadoop/tmp
# ...and if you want to tighten up security, chmod from 755 to 750...
$ sudo chmod 750 /app/hadoop/tmp

step 3 : edit core-site.xml 步骤3:编辑core-site.xml

<property>
  <name>hadoop.tmp.dir</name>
  <value>/app/hadoop/tmp</value>
</property>

<property>
  <name>fs.default.name</name>
  <value>hdfs://localhost:54310</value>
</property>

step 5 : edit mapred-site.xml 步骤5:编辑mapred-site.xml

  <property>
      <name>mapreduce.framework.name</name>
      <value>yarn</value>
    </property>

step 6 : edit hdfs-site.xml 步骤6:编辑hdfs-site.xml

<property>
  <name>dfs.replication</name>
          <value>1</value>
</property>

<property>
  <name>dfs.name.dir</name>
  <value>file:///home/hduser/hadoopdata/hdfs/namenode</value>
</property>

<property>
  <name>dfs.data.dir</name>
  <value>file:///home/hduser/hadoop/hadoopdata/hdfs/datanode</value>
</property>

step 7 : edit yarn-site.xml 步骤7:编辑yarn-site.xml

<property>
   <name>yarn.nodemanager.aux-services</name>
   <value>mapreduce_shuffle</value>
</property>

finally format your hdfs (You need to do this the first time you set up a Hadoop cluster) 最终格式化您的hdfs(首次设置Hadoop集群时需要执行此操作)

$ /usr/local/hadoop/bin/hadoop namenode -format

Hbase Configuration: Hbase配置:

edit you hbase-site.xml : 编辑您的hbase-site.xml

<property>
  <name>hbase.rootdir</name>
  <value>hdfs://localhost:54310/hbase</value>
</property> 

<property>
   <name>hbase.cluster.distributed</name>
   <value>true</value>
</property>

<property>
   <name>hbase.zookeeper.quorum</name>  
   <value>localhost</value>
</property>

<property>   
  <name>dfs.replication</name>   
  <value>1</value>    
</property>

 <property>       
  <name>hbase.zookeeper.property.clientPort</name>  
  <value>2181</value>                                                                                 
 </property>

 <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/usr/local/hbase/zookeeper</value>   
 </property>                                                                                                                          

Hope this helps you 希望这对您有帮助

After sticking with the problem for more than 3 days (maybe it's from my misunderstanding the concept), I can fix the problem by adding HADOOP_CLASSPATH (like what I did when setting up the pseudo-distribute in hadoop-env) into the yarn-env. 解决问题超过3天后(也许是由于我对概念的误解),我可以通过将HADOOP_CLASSPATH(如在hadoop-env中设置伪分配时所做的那样)添加到yarn-env中来解决问题。 。

I have no idea much in detail. 我不十分详细。 But, yeah, hope this may be able to help someone in the future. 但是,是的,希望这将来能够对某人有所帮助。

Cheers. 干杯。

I was using Spark on Yarn and was getting the same error. 我在Yarn上使用Spark并收到相同的错误。 Actually, the spark jar had a internal dependency of hadoop-client and hadoop-mapreduce-client-* jars pointing to older 2.2.0 versions. 实际上,火花罐具有指向较旧的2.2.0版本的hadoop-client和hadoop-mapreduce-client- * jar的内部依赖性。 So, I included these entries in my POM with the Hadoop version that I was running and did a clean build. 因此,我将这些条目包含在我正在运行的Hadoop版本的POM中,并进行了干净的构建。

This resolved the issue for me. 这为我解决了这个问题。 Hope this helps someone. 希望这对某人有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM