public static String [ ] getJournalHttpHosts ( Configuration conf ) { Collection < String > hosts = conf . getStringCollection ( JournalConfigKeys . DFS_JOURNALNODE_HOSTS ) ; int defaultHttpPort = JournalConfigKeys . DFS_JOURNALNODE_HTTP_PORT_DEFAULT ; String [ ] httpAddresses = new String [ hosts . size ( ) ] ; int i = 0 ; for ( String address : hosts ) { if ( address . indexOf ( ":" ) < 0 ) { address += ":" + defaultHttpPort ; } httpAddresses [ i ++ ] = address ; } return httpAddresses ; }
Parse the DFS_JOURNALNODE_HOSTS to get the list of Journal Node Hosts