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
15 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 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
323 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
• 67,160 points
79 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
• 67,160 points
58 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
• 67,160 points
147 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
• 10,210 points
2,079 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
• 10,210 points
202 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
10,676 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,240 points
779 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,250 points
51 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,250 points
1,457 views