@Override public int doWorkInternal(GetConf tool, String[] args) throws URISyntaxException, IOException { tool.printSet(DFSUtil.getJournalNodeAddresses(tool.getConf())); return 0; } }
@Override public int doWorkInternal(GetConf tool, String []args) throws IOException { tool.printMap(DFSUtil.getBackupNodeAddresses(tool.getConf())); return 0; } }
@Override public int doWorkInternal(GetConf tool, String []args) throws IOException { tool.printMap(DFSUtil.getSecondaryNameNodeAddresses(tool.getConf())); return 0; } }
@Override int doWorkInternal(GetConf tool, String []args) throws IOException { tool.printMap(DFSUtil.getNNServiceRpcAddressesForCluster(tool.getConf())); return 0; } }
@Override public int doWorkInternal(GetConf tool, String []args) throws IOException { Configuration config = tool.getConf(); List<ConfiguredNNAddress> cnnlist = DFSUtil.flattenAddressMap( DFSUtil.getNNServiceRpcAddressesForCluster(config)); if (!cnnlist.isEmpty()) { for (ConfiguredNNAddress cnn : cnnlist) { InetSocketAddress rpc = cnn.getAddress(); tool.printOut(rpc.getHostName()+":"+rpc.getPort()); } return 0; } tool.printError("Did not get namenode service rpc addresses."); return -1; } }
/** Method to be overridden by sub classes for specific behavior */ int doWorkInternal(GetConf tool, String[] args) throws Exception { String value = tool.getConf().getTrimmed(key); if (value != null) { tool.printOut(value); return 0; } tool.printError("Configuration " + key + " is missing."); return -1; } }
@Override public int doWorkInternal(GetConf tool, String []args) throws IOException { tool.printMap(DFSUtil.getBackupNodeAddresses(tool.getConf())); return 0; } }
@Override public int doWorkInternal(GetConf tool, String []args) throws IOException { tool.printMap(DFSUtil.getSecondaryNameNodeAddresses(tool.getConf())); return 0; } }
@Override int doWorkInternal(GetConf tool, String []args) throws IOException { tool.printMap(DFSUtil.getNNServiceRpcAddressesForCluster(tool.getConf())); return 0; } }
@Override public int doWorkInternal(GetConf tool, String []args) throws IOException { tool.printMap(DFSUtil.getBackupNodeAddresses(tool.getConf())); return 0; } }
@Override int doWorkInternal(GetConf tool, String []args) throws IOException { tool.printMap(DFSUtil.getNNServiceRpcAddressesForCluster(tool.getConf())); return 0; } }
@Override public int doWorkInternal(GetConf tool, String []args) throws IOException { tool.printMap(DFSUtil.getSecondaryNameNodeAddresses(tool.getConf())); return 0; } }
/** Method to be overridden by sub classes for specific behavior */ int doWorkInternal(GetConf tool, String[] args) throws Exception { String value = tool.getConf().getTrimmed(key); if (value != null) { tool.printOut(value); return 0; } tool.printError("Configuration " + key + " is missing."); return -1; } }
@Override public int doWorkInternal(GetConf tool, String []args) throws IOException { Configuration config = tool.getConf(); List<ConfiguredNNAddress> cnnlist = DFSUtil.flattenAddressMap( DFSUtil.getNNServiceRpcAddressesForCluster(config)); if (!cnnlist.isEmpty()) { for (ConfiguredNNAddress cnn : cnnlist) { InetSocketAddress rpc = cnn.getAddress(); tool.printOut(rpc.getHostName()+":"+rpc.getPort()); } return 0; } tool.printError("Did not get namenode service rpc addresses."); return -1; } }
@Override public int doWorkInternal(GetConf tool, String []args) throws IOException { Configuration config = tool.getConf(); List<ConfiguredNNAddress> cnnlist = DFSUtil.flattenAddressMap( DFSUtil.getNNServiceRpcAddressesForCluster(config)); if (!cnnlist.isEmpty()) { for (ConfiguredNNAddress cnn : cnnlist) { InetSocketAddress rpc = cnn.getAddress(); tool.printOut(rpc.getHostName()+":"+rpc.getPort()); } return 0; } tool.printError("Did not get namenode service rpc addresses."); return -1; } }
/** Method to be overridden by sub classes for specific behavior */ int doWorkInternal(GetConf tool, String[] args) throws Exception { String value = tool.getConf().getTrimmed(key); if (value != null) { tool.printOut(value); return 0; } tool.printError("Configuration " + key + " is missing."); return -1; } }