sort(isas); } catch (Exception e) { NamenodeMXBeanHelper nnHelper = null; try { nnHelper = getNNHelper(isa); nnHelper.getDecomNodeInfoForReport(statusMap); } catch (Exception e) { updateUnknownStatus(statusMap, unreportedNamenode); getDecommissionNodeClusterState(statusMap); return new DecommissionStatus(statusMap, isas, getDatanodeHttpPort(conf), decommissionExceptions);
private static String queryMbean(URI httpAddress, Configuration conf) throws IOException { /** * Although the other namenode might support HTTPS, it is fundamentally * broken to get the JMX via an HTTPS connection inside the namenode, * because in HTTPS set up the principal of the client and the one of * the namenode differs. Therefore, there is no guarantees that the * HTTPS connection can be set up. * * As a result, we just hard code the connection as an HTTP connection. */ URL url = new URL(httpAddress.toURL(), JMX_QRY); return readOutput(url); } /**
try { nnHelper = new NamenodeMXBeanHelper(isa, conf); String mbeanProps= queryMbean(nnHelper.httpAddress, conf); if (clusterid.equals("")) { clusterid = nnHelper.getClusterId(mbeanProps); updateUnknownStatus(statusMap, unreportedNamenode); getDecommissionNodeClusterState(statusMap); return new DecommissionStatus(statusMap, clusterid, getDatanodeHttpPort(conf), decommissionExceptions);
try { nnHelper = new NamenodeMXBeanHelper(isa, conf); String mbeanProps= queryMbean(nnHelper.httpAddress, conf); NamenodeStatus nn = nnHelper.getNamenodeStatus(mbeanProps); if (cs.clusterid.isEmpty() || cs.clusterid.equals("")) { // Set clusterid only once
sort(isas); LOG.info("connect to " + isa.toString()); try { nnHelper = getNNHelper(isa); nn = nnHelper.getNamenodeStatus(); } catch ( Exception e ) {
try { nnHelper = new NamenodeMXBeanHelper(isa, conf); String mbeanProps= queryMbean(nnHelper.httpAddress, conf); if (clusterid.equals("")) { clusterid = nnHelper.getClusterId(mbeanProps); updateUnknownStatus(statusMap, unreportedNamenode); getDecommissionNodeClusterState(statusMap); return new DecommissionStatus(statusMap, clusterid, getDatanodeHttpPort(conf), decommissionExceptions);
try { nnHelper = new NamenodeMXBeanHelper(isa, conf); String mbeanProps= queryMbean(nnHelper.httpAddress, conf); NamenodeStatus nn = nnHelper.getNamenodeStatus(mbeanProps); if (cs.clusterid.isEmpty() || cs.clusterid.equals("")) { // Set clusterid only once
private static String queryMbean(URI httpAddress, Configuration conf) throws IOException { /** * Although the other namenode might support HTTPS, it is fundamentally * broken to get the JMX via an HTTPS connection inside the namenode, * because in HTTPS set up the principal of the client and the one of * the namenode differs. Therefore, there is no guarantees that the * HTTPS connection can be set up. * * As a result, we just hard code the connection as an HTTP connection. */ URL url = new URL(httpAddress.toURL(), JMX_QRY); return readOutput(url); } /**