Not able to see racks in reports

0 votes

I made changes for coresite.xml and etc /hosts and restarted the hadoop demons. When I tired to check the hadoop report not able to see the racks in the report. Can you please help me?

Feb 22 in Big Data Hadoop by Simi
14 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Seems like rack awareness is not configure. 

Try to follow the below-given steps to configure rack awareness:

1. Stop all the daemons running.

$ ./stop-all.sh

2. Create a topology data file anywhere in Master node (NameNode)

$ vi topology.data

3. Mention your slave nodes ( DataNodes) relative to their rack into topology.data- as follows:

192.168.1.4 /rack1

192.168.1.5 /rack1

192.168.1.6 /rack2

192.168.1.7 /rack2

192.168.1.8 /rack3

5. Create a topology.sh script file

#!/bin/bash

while [ $# -gt 0 ] ; do

   nodeArg=$1

   exec< /home/hadoop/topology.data

   result=""

   while read line ; do

       ar=( $line )

       if [ "${ar[0]}" = "$nodeArg" ] ; then

       result="${ar[1]}"

       fi

   done

   shift

   if [ -z "$result" ]; then

     echo -n "/default/rack "

    else

     echo -n "$result "

   fi

   done

6. Add the below property into hdfs-site.xml of Master node.

<property>

<name>topology.script.file.name</name>

<value>/home/hadoop/topology.sh</value>

</property>

7. Start the Hadoop cluster command: ./start-dfs.sh

8. Check the Hadoop admin report to see if the cluster is aware of the rack.

$ ​hadoop dfsadmin -report
answered Feb 22 by Lucky

Related Questions In Big Data Hadoop

0 votes
1 answer

Not able to start Job History Server in Hadoop 2.8.1

You have to start JobHistoryServer process specifically ...READ MORE

answered Mar 29, 2018 in Big Data Hadoop by Ashish
• 2,630 points
234 views
0 votes
1 answer

Not able to start jobtracker in hadoop

There is no jobtracker in hadoop 2.2.0 YARN framework. ...READ MORE

answered Dec 11, 2018 in Big Data Hadoop by Omkar
• 65,850 points
53 views
+1 vote
1 answer

Not able to start datanode in Hadoop

Follow these steps: Stop namenode Delete the datanode directory ...READ MORE

answered Dec 12, 2018 in Big Data Hadoop by Omkar
• 65,850 points
48 views
0 votes
1 answer

Not able to insert in hive partition table

You have to add the partition before ...READ MORE

answered Dec 14, 2018 in Big Data Hadoop by Omkar
• 65,850 points
96 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 9,030 points
1,661 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 9,030 points
130 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
8,048 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,260 points
561 views
0 votes
1 answer

Why am I not able to see the Hadoop daemons that are running?

I guess you are starting the services ...READ MORE

answered Apr 18, 2018 in Big Data Hadoop by Shubham
• 12,150 points
38 views
0 votes
2 answers

Hadoop is not able to find jps command

jps is actually not a command of ...READ MORE

answered Apr 18, 2018 in Big Data Hadoop by Shubham
• 12,150 points
1,130 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.