@Test public void TestConvertDatanodeStorage() { DatanodeStorage dns1 = new DatanodeStorage( "id1", DatanodeStorage.State.NORMAL, StorageType.SSD); DatanodeStorageProto proto = PBHelper.convert(dns1); DatanodeStorage dns2 = PBHelper.convert(proto); compare(dns1, dns2); }
public static DatanodeStorageProto convert(DatanodeStorage s) { return DatanodeStorageProto.newBuilder() .setState(PBHelper.convert(s.getState())) .setStorageID(s.getStorageID()).build(); }
public static DatanodeStorage convert(DatanodeStorageProto s) { return new DatanodeStorage(s.getStorageID(), PBHelper.convert(s.getState())); }
public static DatanodeStorageProto convert(DatanodeStorage s) { return DatanodeStorageProto.newBuilder() .setState(PBHelper.convert(s.getState())).setStorageID(s.getStorageID()) .build(); }
public static DatanodeStorageProto convert(DatanodeStorage s) { return DatanodeStorageProto.newBuilder() .setState(PBHelper.convertState(s.getState())) .setStorageType(PBHelper.convertStorageType(s.getStorageType())) .setStorageUuid(s.getStorageID()).build(); }
public static DatanodeStorage convert(DatanodeStorageProto s) { return new DatanodeStorage(s.getStorageUuid(), PBHelper.convertState(s.getState()), PBHelper.convertType(s.getStorageType())); }