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, 2019 in Big Data Hadoop by Simi
135 views

1 answer to this question.

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, 2019 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 30, 2018 in Big Data Hadoop by Ashish
• 2,650 points
1,527 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
• 69,190 points
720 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
• 69,190 points
1,017 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
• 69,190 points
2,088 views
+1 vote
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
• 11,380 points
8,623 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
• 11,380 points
1,522 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
76,097 views
–1 vote
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,390 points
3,307 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
• 13,490 points
333 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
• 13,490 points
8,734 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP