use of org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.StorageInfoProto in project hadoop by apache.
the class TestPBHelper method testConvertStoragInfo.
@Test
public void testConvertStoragInfo() {
StorageInfo info = getStorageInfo(NodeType.NAME_NODE);
StorageInfoProto infoProto = PBHelper.convert(info);
StorageInfo info2 = PBHelper.convert(infoProto, NodeType.NAME_NODE);
assertEquals(info.getClusterID(), info2.getClusterID());
assertEquals(info.getCTime(), info2.getCTime());
assertEquals(info.getLayoutVersion(), info2.getLayoutVersion());
assertEquals(info.getNamespaceID(), info2.getNamespaceID());
}
Aggregations