Java 类org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.DatanodeStorageProto 实例源码

项目:hadoop-on-lustre2    文件:TestPBHelper.java   
@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);
}
项目:hadoop-plus    文件:PBHelper.java   
public static DatanodeStorageProto convert(DatanodeStorage s) {
  return DatanodeStorageProto.newBuilder()
      .setState(PBHelper.convert(s.getState()))
      .setStorageID(s.getStorageID()).build();
}
项目:hadoop-plus    文件:PBHelper.java   
public static DatanodeStorage convert(DatanodeStorageProto s) {
  return new DatanodeStorage(s.getStorageID(), PBHelper.convert(s.getState()));
}
项目:hops    文件:PBHelper.java   
public static DatanodeStorageProto convert(DatanodeStorage s) {
  return DatanodeStorageProto.newBuilder()
      .setState(PBHelper.convert(s.getState())).setStorageID(s.getStorageID())
      .build();
}
项目:hops    文件:PBHelper.java   
public static DatanodeStorage convert(DatanodeStorageProto s) {
  return new DatanodeStorage(s.getStorageID(),
      PBHelper.convert(s.getState()));
}
项目:hadoop-TCP    文件:PBHelper.java   
public static DatanodeStorageProto convert(DatanodeStorage s) {
  return DatanodeStorageProto.newBuilder()
      .setState(PBHelper.convert(s.getState()))
      .setStorageID(s.getStorageID()).build();
}
项目:hadoop-TCP    文件:PBHelper.java   
public static DatanodeStorage convert(DatanodeStorageProto s) {
  return new DatanodeStorage(s.getStorageID(), PBHelper.convert(s.getState()));
}
项目:hardfs    文件:PBHelper.java   
public static DatanodeStorageProto convert(DatanodeStorage s) {
  return DatanodeStorageProto.newBuilder()
      .setState(PBHelper.convert(s.getState()))
      .setStorageID(s.getStorageID()).build();
}
项目:hardfs    文件:PBHelper.java   
public static DatanodeStorage convert(DatanodeStorageProto s) {
  return new DatanodeStorage(s.getStorageID(), PBHelper.convert(s.getState()));
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static DatanodeStorageProto convert(DatanodeStorage s) {
  return DatanodeStorageProto.newBuilder()
      .setState(PBHelper.convertState(s.getState()))
      .setStorageType(PBHelper.convertStorageType(s.getStorageType()))
      .setStorageUuid(s.getStorageID()).build();
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static DatanodeStorage convert(DatanodeStorageProto s) {
  return new DatanodeStorage(s.getStorageUuid(),
                             PBHelper.convertState(s.getState()),
                             PBHelper.convertType(s.getStorageType()));
}