I am running distcp command to copy the data from one cluster to another cluster . but in the both cluster high availability is enabled for the namenide. As of now I have hard coded address to read the hdfs files and write it back.
but when namenode switch over happens , my distcp job fails since can not read file at standby namenide . active namenode becomes inactive .
You'd need to add the properties mentioned in this doc : https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_administration/content/distcp_between_ha...
Post this you can directly use the nameservice and the failover of NN shouldn't be a problem.
Hope this helps.