Search in sources :

Example 1 with DatanodeLocalInfo

use of org.apache.hadoop.hdfs.protocol.DatanodeLocalInfo in project hadoop by apache.

the class DFSAdmin method getDatanodeInfo.

private int getDatanodeInfo(String[] argv, int i) throws IOException {
    ClientDatanodeProtocol dnProxy = getDataNodeProxy(argv[i]);
    try {
        DatanodeLocalInfo dnInfo = dnProxy.getDatanodeInfo();
        System.out.println(dnInfo.getDatanodeLocalReport());
    } catch (IOException ioe) {
        throw new IOException("Datanode unreachable. " + ioe, ioe);
    }
    return 0;
}
Also used : IOException(java.io.IOException) ClientDatanodeProtocol(org.apache.hadoop.hdfs.protocol.ClientDatanodeProtocol) DatanodeLocalInfo(org.apache.hadoop.hdfs.protocol.DatanodeLocalInfo)

Aggregations

IOException (java.io.IOException)1 ClientDatanodeProtocol (org.apache.hadoop.hdfs.protocol.ClientDatanodeProtocol)1 DatanodeLocalInfo (org.apache.hadoop.hdfs.protocol.DatanodeLocalInfo)1