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

项目:hadoop    文件:PBHelper.java   
public static DatanodeRegistrationProto convert(
    DatanodeRegistration registration) {
  DatanodeRegistrationProto.Builder builder = DatanodeRegistrationProto
      .newBuilder();
  return builder.setDatanodeID(PBHelper.convert((DatanodeID) registration))
      .setStorageInfo(PBHelper.convert(registration.getStorageInfo()))
      .setKeys(PBHelper.convert(registration.getExportedKeys()))
      .setSoftwareVersion(registration.getSoftwareVersion()).build();
}
项目:hadoop    文件:TestPBHelper.java   
@Test
public void testConvertDatanodeRegistration() {
  DatanodeID dnId = DFSTestUtil.getLocalDatanodeID();
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  DatanodeRegistration reg = new DatanodeRegistration(dnId,
      new StorageInfo(NodeType.DATA_NODE), expKeys, "3.0.0");
  DatanodeRegistrationProto proto = PBHelper.convert(reg);
  DatanodeRegistration reg2 = PBHelper.convert(proto);
  compare(reg.getStorageInfo(), reg2.getStorageInfo());
  compare(reg.getExportedKeys(), reg2.getExportedKeys());
  compare(reg, reg2);
  assertEquals(reg.getSoftwareVersion(), reg2.getSoftwareVersion());
}
项目:aliyun-oss-hadoop-fs    文件:PBHelper.java   
public static DatanodeRegistrationProto convert(
    DatanodeRegistration registration) {
  DatanodeRegistrationProto.Builder builder = DatanodeRegistrationProto
      .newBuilder();
  return builder.setDatanodeID(PBHelperClient.convert((DatanodeID) registration))
      .setStorageInfo(convert(registration.getStorageInfo()))
      .setKeys(convert(registration.getExportedKeys()))
      .setSoftwareVersion(registration.getSoftwareVersion()).build();
}
项目:aliyun-oss-hadoop-fs    文件:TestPBHelper.java   
@Test
public void testConvertDatanodeRegistration() {
  DatanodeID dnId = DFSTestUtil.getLocalDatanodeID();
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  DatanodeRegistration reg = new DatanodeRegistration(dnId,
      new StorageInfo(NodeType.DATA_NODE), expKeys, "3.0.0");
  DatanodeRegistrationProto proto = PBHelper.convert(reg);
  DatanodeRegistration reg2 = PBHelper.convert(proto);
  compare(reg.getStorageInfo(), reg2.getStorageInfo());
  compare(reg.getExportedKeys(), reg2.getExportedKeys());
  compare(reg, reg2);
  assertEquals(reg.getSoftwareVersion(), reg2.getSoftwareVersion());
}
项目:big-c    文件:PBHelper.java   
public static DatanodeRegistrationProto convert(
    DatanodeRegistration registration) {
  DatanodeRegistrationProto.Builder builder = DatanodeRegistrationProto
      .newBuilder();
  return builder.setDatanodeID(PBHelper.convert((DatanodeID) registration))
      .setStorageInfo(PBHelper.convert(registration.getStorageInfo()))
      .setKeys(PBHelper.convert(registration.getExportedKeys()))
      .setSoftwareVersion(registration.getSoftwareVersion()).build();
}
项目:big-c    文件:TestPBHelper.java   
@Test
public void testConvertDatanodeRegistration() {
  DatanodeID dnId = DFSTestUtil.getLocalDatanodeID();
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  DatanodeRegistration reg = new DatanodeRegistration(dnId,
      new StorageInfo(NodeType.DATA_NODE), expKeys, "3.0.0");
  DatanodeRegistrationProto proto = PBHelper.convert(reg);
  DatanodeRegistration reg2 = PBHelper.convert(proto);
  compare(reg.getStorageInfo(), reg2.getStorageInfo());
  compare(reg.getExportedKeys(), reg2.getExportedKeys());
  compare(reg, reg2);
  assertEquals(reg.getSoftwareVersion(), reg2.getSoftwareVersion());
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static DatanodeRegistrationProto convert(
    DatanodeRegistration registration) {
  DatanodeRegistrationProto.Builder builder = DatanodeRegistrationProto
      .newBuilder();
  return builder.setDatanodeID(PBHelper.convert((DatanodeID) registration))
      .setStorageInfo(PBHelper.convert(registration.getStorageInfo()))
      .setKeys(PBHelper.convert(registration.getExportedKeys()))
      .setSoftwareVersion(registration.getSoftwareVersion()).build();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestPBHelper.java   
@Test
public void testConvertDatanodeRegistration() {
  DatanodeID dnId = DFSTestUtil.getLocalDatanodeID();
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  DatanodeRegistration reg = new DatanodeRegistration(dnId,
      new StorageInfo(NodeType.DATA_NODE), expKeys, "3.0.0");
  DatanodeRegistrationProto proto = PBHelper.convert(reg);
  DatanodeRegistration reg2 = PBHelper.convert(proto);
  compare(reg.getStorageInfo(), reg2.getStorageInfo());
  compare(reg.getExportedKeys(), reg2.getExportedKeys());
  compare(reg, reg2);
  assertEquals(reg.getSoftwareVersion(), reg2.getSoftwareVersion());
}
项目:hadoop-plus    文件:PBHelper.java   
public static DatanodeRegistrationProto convert(
    DatanodeRegistration registration) {
  DatanodeRegistrationProto.Builder builder = DatanodeRegistrationProto
      .newBuilder();
  return builder.setDatanodeID(PBHelper.convert((DatanodeID) registration))
      .setStorageInfo(PBHelper.convert(registration.getStorageInfo()))
      .setKeys(PBHelper.convert(registration.getExportedKeys()))
      .setSoftwareVersion(registration.getSoftwareVersion()).build();
}
项目:hadoop-plus    文件:TestPBHelper.java   
@Test
public void testConvertDatanodeRegistration() {
  DatanodeID dnId = DFSTestUtil.getLocalDatanodeID();
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  DatanodeRegistration reg = new DatanodeRegistration(dnId,
      new StorageInfo(), expKeys, "3.0.0");
  DatanodeRegistrationProto proto = PBHelper.convert(reg);
  DatanodeRegistration reg2 = PBHelper.convert(proto);
  compare(reg.getStorageInfo(), reg2.getStorageInfo());
  compare(reg.getExportedKeys(), reg2.getExportedKeys());
  compare(reg, reg2);
  assertEquals(reg.getSoftwareVersion(), reg2.getSoftwareVersion());
}
项目:FlexMap    文件:PBHelper.java   
public static DatanodeRegistrationProto convert(
    DatanodeRegistration registration) {
  DatanodeRegistrationProto.Builder builder = DatanodeRegistrationProto
      .newBuilder();
  return builder.setDatanodeID(PBHelper.convert((DatanodeID) registration))
      .setStorageInfo(PBHelper.convert(registration.getStorageInfo()))
      .setKeys(PBHelper.convert(registration.getExportedKeys()))
      .setSoftwareVersion(registration.getSoftwareVersion()).build();
}
项目:FlexMap    文件:TestPBHelper.java   
@Test
public void testConvertDatanodeRegistration() {
  DatanodeID dnId = DFSTestUtil.getLocalDatanodeID();
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  DatanodeRegistration reg = new DatanodeRegistration(dnId,
      new StorageInfo(NodeType.DATA_NODE), expKeys, "3.0.0");
  DatanodeRegistrationProto proto = PBHelper.convert(reg);
  DatanodeRegistration reg2 = PBHelper.convert(proto);
  compare(reg.getStorageInfo(), reg2.getStorageInfo());
  compare(reg.getExportedKeys(), reg2.getExportedKeys());
  compare(reg, reg2);
  assertEquals(reg.getSoftwareVersion(), reg2.getSoftwareVersion());
}
项目:hops    文件:PBHelper.java   
public static DatanodeRegistrationProto convert(
    DatanodeRegistration registration) {
  DatanodeRegistrationProto.Builder builder =
      DatanodeRegistrationProto.newBuilder();
  return builder.setDatanodeID(PBHelper.convert((DatanodeID) registration))
      .setStorageInfo(PBHelper.convert(registration.getStorageInfo()))
      .setKeys(PBHelper.convert(registration.getExportedKeys()))
      .setSoftwareVersion(registration.getSoftwareVersion()).build();
}
项目:hops    文件:TestPBHelper.java   
@Test
public void testConvertDatanodeRegistration() {
  DatanodeID dnId = DFSTestUtil.getLocalDatanodeID();
  BlockKey[] keys = new BlockKey[]{getBlockKey(2), getBlockKey(3)};
  ExportedBlockKeys expKeys =
      new ExportedBlockKeys(true, 9, 10, getBlockKey(1), keys);
  DatanodeRegistration reg =
      new DatanodeRegistration(dnId, new StorageInfo(), expKeys, "3.0.0");
  DatanodeRegistrationProto proto = PBHelper.convert(reg);
  DatanodeRegistration reg2 = PBHelper.convert(proto);
  compare(reg.getStorageInfo(), reg2.getStorageInfo());
  compare(reg.getExportedKeys(), reg2.getExportedKeys());
  compare(reg, reg2);
  assertEquals(reg.getSoftwareVersion(), reg2.getSoftwareVersion());
}
项目:hadoop-TCP    文件:PBHelper.java   
public static DatanodeRegistrationProto convert(
    DatanodeRegistration registration) {
  DatanodeRegistrationProto.Builder builder = DatanodeRegistrationProto
      .newBuilder();
  return builder.setDatanodeID(PBHelper.convert((DatanodeID) registration))
      .setStorageInfo(PBHelper.convert(registration.getStorageInfo()))
      .setKeys(PBHelper.convert(registration.getExportedKeys()))
      .setSoftwareVersion(registration.getSoftwareVersion()).build();
}
项目:hadoop-TCP    文件:TestPBHelper.java   
@Test
public void testConvertDatanodeRegistration() {
  DatanodeID dnId = DFSTestUtil.getLocalDatanodeID();
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  DatanodeRegistration reg = new DatanodeRegistration(dnId,
      new StorageInfo(), expKeys, "3.0.0");
  DatanodeRegistrationProto proto = PBHelper.convert(reg);
  DatanodeRegistration reg2 = PBHelper.convert(proto);
  compare(reg.getStorageInfo(), reg2.getStorageInfo());
  compare(reg.getExportedKeys(), reg2.getExportedKeys());
  compare(reg, reg2);
  assertEquals(reg.getSoftwareVersion(), reg2.getSoftwareVersion());
}
项目:hardfs    文件:PBHelper.java   
public static DatanodeRegistrationProto convert(
    DatanodeRegistration registration) {
  DatanodeRegistrationProto.Builder builder = DatanodeRegistrationProto
      .newBuilder();
  return builder.setDatanodeID(PBHelper.convert((DatanodeID) registration))
      .setStorageInfo(PBHelper.convert(registration.getStorageInfo()))
      .setKeys(PBHelper.convert(registration.getExportedKeys()))
      .setSoftwareVersion(registration.getSoftwareVersion()).build();
}
项目:hardfs    文件:TestPBHelper.java   
@Test
public void testConvertDatanodeRegistration() {
  DatanodeID dnId = DFSTestUtil.getLocalDatanodeID();
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  DatanodeRegistration reg = new DatanodeRegistration(dnId,
      new StorageInfo(), expKeys, "3.0.0");
  DatanodeRegistrationProto proto = PBHelper.convert(reg);
  DatanodeRegistration reg2 = PBHelper.convert(proto);
  compare(reg.getStorageInfo(), reg2.getStorageInfo());
  compare(reg.getExportedKeys(), reg2.getExportedKeys());
  compare(reg, reg2);
  assertEquals(reg.getSoftwareVersion(), reg2.getSoftwareVersion());
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static DatanodeRegistrationProto convert(
    DatanodeRegistration registration) {
  DatanodeRegistrationProto.Builder builder = DatanodeRegistrationProto
      .newBuilder();
  return builder.setDatanodeID(PBHelper.convert((DatanodeID) registration))
      .setStorageInfo(PBHelper.convert(registration.getStorageInfo()))
      .setKeys(PBHelper.convert(registration.getExportedKeys()))
      .setSoftwareVersion(registration.getSoftwareVersion()).build();
}
项目:hadoop-on-lustre2    文件:TestPBHelper.java   
@Test
public void testConvertDatanodeRegistration() {
  DatanodeID dnId = DFSTestUtil.getLocalDatanodeID();
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  DatanodeRegistration reg = new DatanodeRegistration(dnId,
      new StorageInfo(NodeType.DATA_NODE), expKeys, "3.0.0");
  DatanodeRegistrationProto proto = PBHelper.convert(reg);
  DatanodeRegistration reg2 = PBHelper.convert(proto);
  compare(reg.getStorageInfo(), reg2.getStorageInfo());
  compare(reg.getExportedKeys(), reg2.getExportedKeys());
  compare(reg, reg2);
  assertEquals(reg.getSoftwareVersion(), reg2.getSoftwareVersion());
}
项目:hadoop    文件:PBHelper.java   
public static DatanodeRegistration convert(DatanodeRegistrationProto proto) {
  StorageInfo si = convert(proto.getStorageInfo(), NodeType.DATA_NODE);
  return new DatanodeRegistration(PBHelper.convert(proto.getDatanodeID()),
      si, PBHelper.convert(proto.getKeys()), proto.getSoftwareVersion());
}
项目:aliyun-oss-hadoop-fs    文件:PBHelper.java   
public static DatanodeRegistration convert(DatanodeRegistrationProto proto) {
  StorageInfo si = convert(proto.getStorageInfo(), NodeType.DATA_NODE);
  return new DatanodeRegistration(PBHelperClient.convert(proto.getDatanodeID()),
      si, convert(proto.getKeys()), proto.getSoftwareVersion());
}
项目:big-c    文件:PBHelper.java   
public static DatanodeRegistration convert(DatanodeRegistrationProto proto) {
  StorageInfo si = convert(proto.getStorageInfo(), NodeType.DATA_NODE);
  return new DatanodeRegistration(PBHelper.convert(proto.getDatanodeID()),
      si, PBHelper.convert(proto.getKeys()), proto.getSoftwareVersion());
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static DatanodeRegistration convert(DatanodeRegistrationProto proto) {
  StorageInfo si = convert(proto.getStorageInfo(), NodeType.DATA_NODE);
  return new DatanodeRegistration(PBHelper.convert(proto.getDatanodeID()),
      si, PBHelper.convert(proto.getKeys()), proto.getSoftwareVersion());
}
项目:hadoop-plus    文件:PBHelper.java   
public static DatanodeRegistration convert(DatanodeRegistrationProto proto) {
  return new DatanodeRegistration(PBHelper.convert(proto.getDatanodeID()),
      PBHelper.convert(proto.getStorageInfo()), PBHelper.convert(proto
          .getKeys()), proto.getSoftwareVersion());
}
项目:FlexMap    文件:PBHelper.java   
public static DatanodeRegistration convert(DatanodeRegistrationProto proto) {
  StorageInfo si = convert(proto.getStorageInfo(), NodeType.DATA_NODE);
  return new DatanodeRegistration(PBHelper.convert(proto.getDatanodeID()),
      si, PBHelper.convert(proto.getKeys()), proto.getSoftwareVersion());
}
项目:hops    文件:PBHelper.java   
public static DatanodeRegistration convert(DatanodeRegistrationProto proto) {
  return new DatanodeRegistration(PBHelper.convert(proto.getDatanodeID()),
      PBHelper.convert(proto.getStorageInfo()),
      PBHelper.convert(proto.getKeys()), proto.getSoftwareVersion());
}
项目:hadoop-TCP    文件:PBHelper.java   
public static DatanodeRegistration convert(DatanodeRegistrationProto proto) {
  return new DatanodeRegistration(PBHelper.convert(proto.getDatanodeID()),
      PBHelper.convert(proto.getStorageInfo()), PBHelper.convert(proto
          .getKeys()), proto.getSoftwareVersion());
}
项目:hardfs    文件:PBHelper.java   
public static DatanodeRegistration convert(DatanodeRegistrationProto proto) {
  return new DatanodeRegistration(PBHelper.convert(proto.getDatanodeID()),
      PBHelper.convert(proto.getStorageInfo()), PBHelper.convert(proto
          .getKeys()), proto.getSoftwareVersion());
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static DatanodeRegistration convert(DatanodeRegistrationProto proto) {
  StorageInfo si = convert(proto.getStorageInfo(), NodeType.DATA_NODE);
  return new DatanodeRegistration(PBHelper.convert(proto.getDatanodeID()),
      si, PBHelper.convert(proto.getKeys()), proto.getSoftwareVersion());
}