Search in sources :

Example 1 with DatanodeStorageProto

use of org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeStorageProto in project hadoop by apache.

the class TestPBHelper method TestConvertDatanodeStorage.

@Test
public void TestConvertDatanodeStorage() {
    DatanodeStorage dns1 = new DatanodeStorage("id1", DatanodeStorage.State.NORMAL, StorageType.SSD);
    DatanodeStorageProto proto = PBHelperClient.convert(dns1);
    DatanodeStorage dns2 = PBHelperClient.convert(proto);
    compare(dns1, dns2);
}
Also used : DatanodeStorageProto(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeStorageProto) DatanodeStorage(org.apache.hadoop.hdfs.server.protocol.DatanodeStorage) Test(org.junit.Test)

Aggregations

DatanodeStorageProto (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeStorageProto)1 DatanodeStorage (org.apache.hadoop.hdfs.server.protocol.DatanodeStorage)1 Test (org.junit.Test)1