I hope you are doing good.

Can you try to configure rack awareness in Hadoop-1.X version by referring to the steps below: 
  • Stop all the daemons running.
  • Create a topology data file anywhere in Master node (NameNode) 
Command: vi toplogy.data
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
  • Create a topology.sh script file 
Command: vi topology.sh

Place the below lines in it.

#!/bin/bash
while [ $# -gt 0 ] ; do
   nodeArg=$1
   exec< /home/hduser/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
  • Add the below property into core-site.xml of Master node only 
<property>
<name>topology.script.file.name</name>
<value>/home/hadoop/topology.sh</value>
</property>
  • Start the Hadoop cluster. 
Command: start-dfs.sh
  • Check the Hadoop admin report to see if the cluster is aware of the rack. 
Command: hadoop dfsadmin -report 

Please try it and let me know if this helps you.