<small id='buonM'></small><noframes id='buonM'>

  • <legend id='buonM'><style id='buonM'><dir id='buonM'><q id='buonM'></q></dir></style></legend>

      1. <i id='buonM'><tr id='buonM'><dt id='buonM'><q id='buonM'><span id='buonM'><b id='buonM'><form id='buonM'><ins id='buonM'></ins><ul id='buonM'></ul><sub id='buonM'></sub></form><legend id='buonM'></legend><bdo id='buonM'><pre id='buonM'><center id='buonM'></center></pre></bdo></b><th id='buonM'></th></span></q></dt></tr></i><div id='buonM'><tfoot id='buonM'></tfoot><dl id='buonM'><fieldset id='buonM'></fieldset></dl></div>

        <tfoot id='buonM'></tfoot>

        • <bdo id='buonM'></bdo><ul id='buonM'></ul>

        Hadoop 1.2.1 - 多节点集群 - Wordcount 程序的减速器阶

        时间:2023-09-26
        <tfoot id='E6cj5'></tfoot>

          <tbody id='E6cj5'></tbody>
          <legend id='E6cj5'><style id='E6cj5'><dir id='E6cj5'><q id='E6cj5'></q></dir></style></legend>

              1. <small id='E6cj5'></small><noframes id='E6cj5'>

                <i id='E6cj5'><tr id='E6cj5'><dt id='E6cj5'><q id='E6cj5'><span id='E6cj5'><b id='E6cj5'><form id='E6cj5'><ins id='E6cj5'></ins><ul id='E6cj5'></ul><sub id='E6cj5'></sub></form><legend id='E6cj5'></legend><bdo id='E6cj5'><pre id='E6cj5'><center id='E6cj5'></center></pre></bdo></b><th id='E6cj5'></th></span></q></dt></tr></i><div id='E6cj5'><tfoot id='E6cj5'></tfoot><dl id='E6cj5'><fieldset id='E6cj5'></fieldset></dl></div>
                • <bdo id='E6cj5'></bdo><ul id='E6cj5'></ul>
                • 本文介绍了Hadoop 1.2.1 - 多节点集群 - Wordcount 程序的减速器阶段挂起?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我的问题在这里可能听起来多余,但之前问题的解决方案都是临时的.我尝试过的很少,但还没有运气.

                  My question may sound redundant here but the solution to the earlier questions were all ad-hoc. few I have tried but no luck yet.

                  实际上,我正在研究 hadoop-1.2.1(在 ubuntu 14 上),最初我有 单节点设置 然后我运行了 WordCount 程序成功.然后我根据 this 教程添加了一个节点.它成功启动,没有任何错误,但是现在当我运行相同的 WordCount 程序时,它挂在减少阶段.我查看了任务跟踪器日志,它们如下所示:-

                  Acutally, I am working on hadoop-1.2.1(on ubuntu 14), Initially I had single node set-up and there I ran the WordCount program succesfully. Then I added one more node to it according to this tutorial. It started successfully, without any errors, But now when I am running the same WordCount program it is hanging in reduce phase. I looked at task-tracker logs, they are as given below :-

                  INFO org.apache.hadoop.mapred.TaskTracker: LaunchTaskAction (registerTask): attempt_201509110037_0001_m_000002_0 task's state:UNASSIGNED
                  INFO org.apache.hadoop.mapred.TaskTracker: Trying to launch : attempt_201509110037_0001_m_000002_0 which needs 1 slots
                  INFO org.apache.hadoop.mapred.TaskTracker: In TaskLauncher, current free slots : 2 and trying to launch attempt_201509110037_0001_m_000002_0 which needs 1 slots
                  INFO org.apache.hadoop.mapred.JobLocalizer: Initializing user hadoopuser on this TT.
                  INFO org.apache.hadoop.mapred.JvmManager: In JvmRunner constructed JVM ID: jvm_201509110037_0001_m_18975496
                  INFO org.apache.hadoop.mapred.JvmManager: JVM Runner jvm_201509110037_0001_m_18975496 spawned.
                  INFO org.apache.hadoop.mapred.TaskController: Writing commands to /app/hadoop/tmp/mapred/local/ttprivate/taskTracker/hadoopuser/jobcache/job_201509110037_0001/attempt_201509110037_0001_m_000002_0/taskjvm.sh
                  INFO org.apache.hadoop.mapred.TaskTracker: JVM with ID: jvm_201509110037_0001_m_18975496 given task: attempt_201509110037_0001_m_000002_0
                  INFO org.apache.hadoop.mapred.TaskTracker: attempt_201509110037_0001_m_000002_0 0.0% hdfs://HadoopMaster:54310/input/file02:25+3
                  INFO org.apache.hadoop.mapred.TaskTracker: Task attempt_201509110037_0001_m_000002_0 is done.
                  INFO org.apache.hadoop.mapred.TaskTracker: reported output size for attempt_201509110037_0001_m_000002_0  was 6
                  INFO org.apache.hadoop.mapred.TaskTracker: addFreeSlot : current free slots : 2
                  INFO org.apache.hadoop.mapred.JvmManager: JVM : jvm_201509110037_0001_m_18975496 exited with exit code 0. Number of tasks it ran: 1
                  INFO org.apache.hadoop.mapred.TaskTracker: LaunchTaskAction (registerTask): attempt_201509110037_0001_r_000000_0 task's state:UNASSIGNED
                  INFO org.apache.hadoop.mapred.TaskTracker: Trying to launch : attempt_201509110037_0001_r_000000_0 which needs 1 slots
                  INFO org.apache.hadoop.mapred.TaskTracker: In TaskLauncher, current free slots : 2 and trying to launch attempt_201509110037_0001_r_000000_0 which needs 1 slots
                  INFO org.apache.hadoop.io.nativeio.NativeIO: Initialized cache for UID to User mapping with a cache timeout of 14400 seconds.
                  INFO org.apache.hadoop.io.nativeio.NativeIO: Got UserName hadoopuser for UID 10 from the native implementation
                  INFO org.apache.hadoop.mapred.JvmManager: In JvmRunner constructed JVM ID: jvm_201509110037_0001_r_18975496
                  INFO org.apache.hadoop.mapred.JvmManager: JVM Runner jvm_201509110037_0001_r_18975496 spawned.
                  INFO org.apache.hadoop.mapred.TaskController: Writing commands to /app/hadoop/tmp/mapred/local/ttprivate/taskTracker/hadoopuser/jobcache/job_201509110037_0001/attempt_201509110037_0001_r_000000_0/taskjvm.sh
                  INFO org.apache.hadoop.mapred.TaskTracker: JVM with ID: jvm_201509110037_0001_r_18975496 given task: attempt_201509110037_0001_r_000000_0
                  INFO org.apache.hadoop.mapred.TaskTracker.clienttrace: src: 127.0.1.1:500, dest: 127.0.0.1:55946, bytes: 6, op: MAPRED_SHUFFLE, cliID: attempt_201509110037_0001_m_000002_0, duration: 7129894
                  INFO org.apache.hadoop.mapred.TaskTracker: attempt_201509110037_0001_r_000000_0 0.11111112% reduce > copy (1 of 3 at 0.00 MB/s) > 
                  INFO org.apache.hadoop.mapred.TaskTracker: attempt_201509110037_0001_r_000000_0 0.11111112% reduce > copy (1 of 3 at 0.00 MB/s) > 
                  INFO org.apache.hadoop.mapred.TaskTracker: attempt_201509110037_0001_r_000000_0 0.11111112% reduce > copy (1 of 3 at 0.00 MB/s) > 
                  INFO org.apache.hadoop.mapred.TaskTracker: attempt_201509110037_0001_r_000000_0 0.11111112% reduce > copy (1 of 3 at 0.00 MB/s) > 
                  INFO org.apache.hadoop.mapred.TaskTracker: attempt_201509110037_0001_r_000000_0 0.11111112% reduce > copy (1 of 3 at 0.00 MB/s) > 
                  INFO org.apache.hadoop.mapred.TaskTracker: attempt_201509110037_0001_r_000000_0 0.11111112% reduce > copy (1 of 3 at 0.00 MB/s) > 
                  

                  也在我运行程序的控制台上它挂在 -

                  Also on the console where I am running the program It hangs at -

                  00:39:24 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
                  00:39:24 INFO util.NativeCodeLoader: Loaded the native-hadoop library
                  00:39:24 WARN snappy.LoadSnappy: Snappy native library not loaded
                  00:39:24 INFO mapred.FileInputFormat: Total input paths to process : 2
                  00:39:24 INFO mapred.JobClient: Running job: job_201509110037_0001
                  00:39:25 INFO mapred.JobClient:  map 0% reduce 0%
                  00:39:28 INFO mapred.JobClient:  map 100% reduce 0%
                  00:39:35 INFO mapred.JobClient:  map 100% reduce 11%
                  

                  我的配置文件如下:-

                  //core-site.xml

                  <configuration>
                  <property>
                    <name>hadoop.tmp.dir</name>
                    <value>/app/hadoop/tmp</value>
                    <description>A base for other temporary directories.</description>
                  </property>
                  
                  <property>
                    <name>fs.default.name</name>
                    <value>hdfs://HadoopMaster:54310</value>
                    <description>The name of the default file system.  A URI whose
                    scheme and authority determine the FileSystem implementation.  The
                    uri's scheme determines the config property (fs.SCHEME.impl) naming
                    the FileSystem implementation class.  The uri's authority is used to
                    determine the host, port, etc. for a filesystem.</description>
                  </property>
                  </configuration>
                  

                  //hdfs-site.xml

                  <configuration>
                  <property>
                    <name>dfs.replication</name>
                    <value>1</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>   
                  </configuration>
                  

                  //mapred-site.xml

                  <configuration>
                  <property>
                    <name>mapred.job.tracker</name>
                    <value>HadoopMaster: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>mapred.reduce.slowstart.completed.maps</name>
                    <value>0.80</value>
                  </property>    
                  </configuration>
                  

                  /etc/hosts

                  127.0.0.1 localhost
                  127.0.1.1 M-1947
                  
                  #HADOOP CLUSTER SETUP
                  172.50.88.54 HadoopMaster
                  172.50.88.60 HadoopSlave1
                  
                  # The following lines are desirable for IPv6 capable hosts
                  ::1     ip6-localhost ip6-loopback
                  fe00::0 ip6-localnet
                  ff00::0 ip6-mcastprefix
                  ff02::1 ip6-allnodes
                  ff02::2 ip6-allrouters
                  

                  /etc/主机名

                  M-1947

                  //大师

                  Hadoop大师

                  //奴隶

                  Hadoop大师

                  HadoopSlave1

                  HadoopSlave1

                  我一直在努力解决它,感谢任何帮助.谢谢!

                  I have been struggling with it for long, any help is appreciated. Thanks !

                  推荐答案

                  解决了.. 虽然同一个问题在论坛上有多个问题,但根据我的验证解决方案是主机名解析中的任何节点集群应该是正确的(而且这个问题不取决于集群的大小).

                  Got it fixed.. although, the same issue has multiple questions on the forums but the verified solution according to me is that hostname resolution for the any node in the cluster should be correct (moreover this issue doesnot depend upon the size of cluster).

                  实际上是 dns-lookup 的问题,请确保进行以下更改以解决上述问题 -

                  Actually it is the issue with dns-lookup, ensure one make the below changes to resolve the above issue -

                  1. 尝试使用'$ hostname'在每台机器上打印主机名

                  1. try printing hostname on each machine using '$ hostname'

                  检查为每台机器打印的主机名是否与各自机器的主/从文件中的条目相同.

                  check that the hostname printed for each machine is same as the entry made in master/slaves file for respective machine.

                  示例:-

                  /etc/hosts文件中(比如说在hadoop集群的Master机器上)

                  in /etc/hosts file (let's say on Master machine of hadoop cluster)

                  127.0.0.1 本地主机

                  127.0.0.1 localhost

                  127.0.1.1 约翰机器

                  127.0.1.1 john-machine

                  #Hadoop 集群

                  172.50.88.21 HadoopMaster

                  172.50.88.21 HadoopMaster

                  172.50.88.22 HadoopSlave1

                  172.50.88.22 HadoopSlave1

                  172.50.88.23 HadoopSlave2

                  172.50.88.23 HadoopSlave2

                  那么它是 -> /etc/hostname 文件(在主机上)应该包含以下条目(用于解决上述问题)

                  then it's -> /etc/hostname file (on master machine) should contain the following entry (for the above issue to be resolved)

                  Hadoop大师

                  类似地验证每个从节点的/etc/hostname 文件.

                  similarly verify the /etc/hostname files of the each slave node.

                  这篇关于Hadoop 1.2.1 - 多节点集群 - Wordcount 程序的减速器阶段挂起?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何在 Hadoop-.20 api 中指定 KeyValueTextInputFormat 分隔 下一篇:简单的 Java Map/Reduce 框架

                  相关文章

                  最新文章

                  • <bdo id='EIwU9'></bdo><ul id='EIwU9'></ul>
                • <tfoot id='EIwU9'></tfoot>
                  <i id='EIwU9'><tr id='EIwU9'><dt id='EIwU9'><q id='EIwU9'><span id='EIwU9'><b id='EIwU9'><form id='EIwU9'><ins id='EIwU9'></ins><ul id='EIwU9'></ul><sub id='EIwU9'></sub></form><legend id='EIwU9'></legend><bdo id='EIwU9'><pre id='EIwU9'><center id='EIwU9'></center></pre></bdo></b><th id='EIwU9'></th></span></q></dt></tr></i><div id='EIwU9'><tfoot id='EIwU9'></tfoot><dl id='EIwU9'><fieldset id='EIwU9'></fieldset></dl></div>
                • <small id='EIwU9'></small><noframes id='EIwU9'>

                    1. <legend id='EIwU9'><style id='EIwU9'><dir id='EIwU9'><q id='EIwU9'></q></dir></style></legend>