Solved
SparkContext giving error in initialization : org.apache.hadoop.ipc.StandbyException
while running a normal spark job SparkContext is not getting initialized giving below error:
[Thread-6] ERROR org.apache.spark.SparkContext - Error initializing SparkContext.
org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category READ is not supported in state standby.
I believe it is pointing to standby NN.
This error is coming after we enabled Namenode HA in our cloudera's cluster.
I have checked hive-site.xml, core-site.xml and spark-defaults.xml.
These all are havinf correct configs pointing to nameservice id.

