Hi, I have two questions pertaining to accessing the hadoop ha cluster from java client.
1. Is it necessary to supply conf.set("dfs.ha.automatic-failover.enabled",true); and conf.set("ha.zookeeper.quorum","zk1.example.com:2181,zk2.example.com:2181,zk3.example.com:2181"); in addition to the other properties set in the code below? private Configuration initHAConf(URI journalURI, Configuration conf) { conf.set(DFSConfigKeys.DFS_NAMENODE_SHARED_EDITS_DIR_KEY, journalURI.toString()); String address1 = "127.0.0.1:" + NN1_IPC_PORT; String address2 = "127.0.0.1:" + NN2_IPC_PORT; conf.set(DFSUtil.addKeySuffixes(DFS_NAMENODE_RPC_ADDRESS_KEY, NAMESERVICE, NN1), address1); conf.set(DFSUtil.addKeySuffixes(DFS_NAMENODE_RPC_ADDRESS_KEY, NAMESERVICE, NN2), address2); conf.set(DFSConfigKeys.DFS_NAMESERVICES, NAMESERVICE); conf.set(DFSUtil.addKeySuffixes(DFS_HA_NAMENODES_KEY_PREFIX, NAMESERVICE), NN1 + "," + NN2); conf.set(DFS_CLIENT_FAILOVER_PROXY_PROVIDER_KEY_PREFIX + "." + NAMESERVICE, ConfiguredFailoverProxyProvider.class.getName()); conf.set("fs.defaultFS", "hdfs://" + NAMESERVICE); return conf;} 2. If we supply zookeeper configuration details as mentioned in the question 1 is it necessary to set the primary and secondary namenode addresses as mentioned in the code above? Since we have given zookeeper connection details the client should be able to figure out the active namenode connection details. Regards Pushparaj