public NamenodeStatus getNamenodeStatus(String props) throws IOException, MalformedObjectNameException, NumberFormatException { NamenodeStatus nn = new NamenodeStatus(); nn.host = host; nn.filesAndDirectories = getProperty(props, "TotalFiles").getLongValue(); nn.capacity = getProperty(props, "Total").getLongValue(); nn.free = getProperty(props, "Free").getLongValue(); nn.bpUsed = getProperty(props, "BlockPoolUsedSpace").getLongValue(); nn.nonDfsUsed = getProperty(props, "NonDfsUsedSpace").getLongValue(); nn.blocksCount = getProperty(props, "TotalBlocks").getLongValue(); nn.missingBlocksCount = getProperty(props, "NumberOfMissingBlocks") .getLongValue(); nn.httpAddress = httpAddress.toURL(); getLiveNodeCount(getProperty(props, "LiveNodes").asText(), nn); getDeadNodeCount(getProperty(props, "DeadNodes").asText(), nn); nn.softwareVersion = getProperty(props, "SoftwareVersion").getTextValue(); return nn; }
public NamenodeStatus getNamenodeStatus(String props) throws IOException, MalformedObjectNameException, NumberFormatException { NamenodeStatus nn = new NamenodeStatus(); nn.host = host; nn.filesAndDirectories = getProperty(props, "TotalFiles").getLongValue(); nn.capacity = getProperty(props, "Total").getLongValue(); nn.free = getProperty(props, "Free").getLongValue(); nn.bpUsed = getProperty(props, "BlockPoolUsedSpace").getLongValue(); nn.nonDfsUsed = getProperty(props, "NonDfsUsedSpace").getLongValue(); nn.blocksCount = getProperty(props, "TotalBlocks").getLongValue(); nn.missingBlocksCount = getProperty(props, "NumberOfMissingBlocks") .getLongValue(); nn.httpAddress = httpAddress.toURL(); getLiveNodeCount(getProperty(props, "LiveNodes").asText(), nn); getDeadNodeCount(getProperty(props, "DeadNodes").asText(), nn); nn.softwareVersion = getProperty(props, "SoftwareVersion").getTextValue(); return nn; }
public NamenodeStatus getNamenodeStatus() throws IOException, MalformedObjectNameException { NamenodeStatus nn = new NamenodeStatus(); nn.address = this.address; nn.filesAndDirectories = mxbeanProxy.getTotalFiles(); nn.capacity = mxbeanProxy.getTotal(); nn.free = mxbeanProxy.getFree(); nn.nsUsed = mxbeanProxy.getNamespaceUsed(); nn.nonDfsUsed = mxbeanProxy.getNonDfsUsedSpace(); nn.blocksCount = mxbeanProxy.getTotalBlocks(); nn.missingBlocksCount = mxbeanProxy.getNumberOfMissingBlocks(); nn.httpAddress = DFSUtil.getInfoServer(rpcAddress, conf); nn.safeModeText = mxbeanProxy.getSafeModeText(); getLiveNodeCount(mxbeanProxy.getLiveNodes(), nn); getDeadNodeCount(mxbeanProxy.getDeadNodes(), nn); nn.namenodeSpecificInfo = mxbeanProxy.getNNSpecificKeys(); nn.isPrimary = mxbeanProxy.getIsPrimary(); return nn; }