Java 类org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto 实例源码

项目:hadoop    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRegistration() {
  StorageInfo info = getStorageInfo(NodeType.NAME_NODE);
  NamenodeRegistration reg = new NamenodeRegistration("address:999",
      "http:1000", info, NamenodeRole.NAMENODE);
  NamenodeRegistrationProto regProto = PBHelper.convert(reg);
  NamenodeRegistration reg2 = PBHelper.convert(regProto);
  assertEquals(reg.getAddress(), reg2.getAddress());
  assertEquals(reg.getClusterID(), reg2.getClusterID());
  assertEquals(reg.getCTime(), reg2.getCTime());
  assertEquals(reg.getHttpAddress(), reg2.getHttpAddress());
  assertEquals(reg.getLayoutVersion(), reg2.getLayoutVersion());
  assertEquals(reg.getNamespaceID(), reg2.getNamespaceID());
  assertEquals(reg.getRegistrationID(), reg2.getRegistrationID());
  assertEquals(reg.getRole(), reg2.getRole());
  assertEquals(reg.getVersion(), reg2.getVersion());

}
项目:big-c    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRegistration() {
  StorageInfo info = getStorageInfo(NodeType.NAME_NODE);
  NamenodeRegistration reg = new NamenodeRegistration("address:999",
      "http:1000", info, NamenodeRole.NAMENODE);
  NamenodeRegistrationProto regProto = PBHelper.convert(reg);
  NamenodeRegistration reg2 = PBHelper.convert(regProto);
  assertEquals(reg.getAddress(), reg2.getAddress());
  assertEquals(reg.getClusterID(), reg2.getClusterID());
  assertEquals(reg.getCTime(), reg2.getCTime());
  assertEquals(reg.getHttpAddress(), reg2.getHttpAddress());
  assertEquals(reg.getLayoutVersion(), reg2.getLayoutVersion());
  assertEquals(reg.getNamespaceID(), reg2.getNamespaceID());
  assertEquals(reg.getRegistrationID(), reg2.getRegistrationID());
  assertEquals(reg.getRole(), reg2.getRole());
  assertEquals(reg.getVersion(), reg2.getVersion());

}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRegistration() {
  StorageInfo info = getStorageInfo(NodeType.NAME_NODE);
  NamenodeRegistration reg = new NamenodeRegistration("address:999",
      "http:1000", info, NamenodeRole.NAMENODE);
  NamenodeRegistrationProto regProto = PBHelper.convert(reg);
  NamenodeRegistration reg2 = PBHelper.convert(regProto);
  assertEquals(reg.getAddress(), reg2.getAddress());
  assertEquals(reg.getClusterID(), reg2.getClusterID());
  assertEquals(reg.getCTime(), reg2.getCTime());
  assertEquals(reg.getHttpAddress(), reg2.getHttpAddress());
  assertEquals(reg.getLayoutVersion(), reg2.getLayoutVersion());
  assertEquals(reg.getNamespaceID(), reg2.getNamespaceID());
  assertEquals(reg.getRegistrationID(), reg2.getRegistrationID());
  assertEquals(reg.getRole(), reg2.getRole());
  assertEquals(reg.getVersion(), reg2.getVersion());

}
项目:hadoop-plus    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRegistration() {
  StorageInfo info = getStorageInfo();
  NamenodeRegistration reg = new NamenodeRegistration("address:999",
      "http:1000", info, NamenodeRole.NAMENODE);
  NamenodeRegistrationProto regProto = PBHelper.convert(reg);
  NamenodeRegistration reg2 = PBHelper.convert(regProto);
  assertEquals(reg.getAddress(), reg2.getAddress());
  assertEquals(reg.getClusterID(), reg2.getClusterID());
  assertEquals(reg.getCTime(), reg2.getCTime());
  assertEquals(reg.getHttpAddress(), reg2.getHttpAddress());
  assertEquals(reg.getLayoutVersion(), reg2.getLayoutVersion());
  assertEquals(reg.getNamespaceID(), reg2.getNamespaceID());
  assertEquals(reg.getRegistrationID(), reg2.getRegistrationID());
  assertEquals(reg.getRole(), reg2.getRole());
  assertEquals(reg.getVersion(), reg2.getVersion());

}
项目:FlexMap    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRegistration() {
  StorageInfo info = getStorageInfo(NodeType.NAME_NODE);
  NamenodeRegistration reg = new NamenodeRegistration("address:999",
      "http:1000", info, NamenodeRole.NAMENODE);
  NamenodeRegistrationProto regProto = PBHelper.convert(reg);
  NamenodeRegistration reg2 = PBHelper.convert(regProto);
  assertEquals(reg.getAddress(), reg2.getAddress());
  assertEquals(reg.getClusterID(), reg2.getClusterID());
  assertEquals(reg.getCTime(), reg2.getCTime());
  assertEquals(reg.getHttpAddress(), reg2.getHttpAddress());
  assertEquals(reg.getLayoutVersion(), reg2.getLayoutVersion());
  assertEquals(reg.getNamespaceID(), reg2.getNamespaceID());
  assertEquals(reg.getRegistrationID(), reg2.getRegistrationID());
  assertEquals(reg.getRole(), reg2.getRole());
  assertEquals(reg.getVersion(), reg2.getVersion());

}
项目:hops    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRegistration() {
  StorageInfo info = getStorageInfo();
  NamenodeRegistration reg =
      new NamenodeRegistration("address:999", "http:1000", info,
          NamenodeRole.NAMENODE);
  NamenodeRegistrationProto regProto = PBHelper.convert(reg);
  NamenodeRegistration reg2 = PBHelper.convert(regProto);
  assertEquals(reg.getAddress(), reg2.getAddress());
  assertEquals(reg.getClusterID(), reg2.getClusterID());
  assertEquals(reg.getCTime(), reg2.getCTime());
  assertEquals(reg.getHttpAddress(), reg2.getHttpAddress());
  assertEquals(reg.getLayoutVersion(), reg2.getLayoutVersion());
  assertEquals(reg.getNamespaceID(), reg2.getNamespaceID());
  assertEquals(reg.getRegistrationID(), reg2.getRegistrationID());
  assertEquals(reg.getRole(), reg2.getRole());
  assertEquals(reg.getVersion(), reg2.getVersion());

}
项目:hadoop-TCP    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRegistration() {
  StorageInfo info = getStorageInfo();
  NamenodeRegistration reg = new NamenodeRegistration("address:999",
      "http:1000", info, NamenodeRole.NAMENODE);
  NamenodeRegistrationProto regProto = PBHelper.convert(reg);
  NamenodeRegistration reg2 = PBHelper.convert(regProto);
  assertEquals(reg.getAddress(), reg2.getAddress());
  assertEquals(reg.getClusterID(), reg2.getClusterID());
  assertEquals(reg.getCTime(), reg2.getCTime());
  assertEquals(reg.getHttpAddress(), reg2.getHttpAddress());
  assertEquals(reg.getLayoutVersion(), reg2.getLayoutVersion());
  assertEquals(reg.getNamespaceID(), reg2.getNamespaceID());
  assertEquals(reg.getRegistrationID(), reg2.getRegistrationID());
  assertEquals(reg.getRole(), reg2.getRole());
  assertEquals(reg.getVersion(), reg2.getVersion());

}
项目:hardfs    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRegistration() {
  StorageInfo info = getStorageInfo();
  NamenodeRegistration reg = new NamenodeRegistration("address:999",
      "http:1000", info, NamenodeRole.NAMENODE);
  NamenodeRegistrationProto regProto = PBHelper.convert(reg);
  NamenodeRegistration reg2 = PBHelper.convert(regProto);
  assertEquals(reg.getAddress(), reg2.getAddress());
  assertEquals(reg.getClusterID(), reg2.getClusterID());
  assertEquals(reg.getCTime(), reg2.getCTime());
  assertEquals(reg.getHttpAddress(), reg2.getHttpAddress());
  assertEquals(reg.getLayoutVersion(), reg2.getLayoutVersion());
  assertEquals(reg.getNamespaceID(), reg2.getNamespaceID());
  assertEquals(reg.getRegistrationID(), reg2.getRegistrationID());
  assertEquals(reg.getRole(), reg2.getRole());
  assertEquals(reg.getVersion(), reg2.getVersion());

}
项目:hadoop-on-lustre2    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRegistration() {
  StorageInfo info = getStorageInfo(NodeType.NAME_NODE);
  NamenodeRegistration reg = new NamenodeRegistration("address:999",
      "http:1000", info, NamenodeRole.NAMENODE);
  NamenodeRegistrationProto regProto = PBHelper.convert(reg);
  NamenodeRegistration reg2 = PBHelper.convert(regProto);
  assertEquals(reg.getAddress(), reg2.getAddress());
  assertEquals(reg.getClusterID(), reg2.getClusterID());
  assertEquals(reg.getCTime(), reg2.getCTime());
  assertEquals(reg.getHttpAddress(), reg2.getHttpAddress());
  assertEquals(reg.getLayoutVersion(), reg2.getLayoutVersion());
  assertEquals(reg.getNamespaceID(), reg2.getNamespaceID());
  assertEquals(reg.getRegistrationID(), reg2.getRegistrationID());
  assertEquals(reg.getRole(), reg2.getRole());
  assertEquals(reg.getVersion(), reg2.getVersion());

}
项目:hadoop    文件:PBHelper.java   
public static NamenodeRegistrationProto convert(NamenodeRegistration reg) {
  return NamenodeRegistrationProto.newBuilder()
      .setHttpAddress(reg.getHttpAddress()).setRole(convert(reg.getRole()))
      .setRpcAddress(reg.getAddress())
      .setStorageInfo(convert((StorageInfo) reg)).build();
}
项目:hadoop    文件:PBHelper.java   
public static NamenodeRegistration convert(NamenodeRegistrationProto reg) {
  StorageInfo si = convert(reg.getStorageInfo(), NodeType.NAME_NODE);
  return new NamenodeRegistration(reg.getRpcAddress(), reg.getHttpAddress(),
      si, convert(reg.getRole()));
}
项目:big-c    文件:PBHelper.java   
public static NamenodeRegistrationProto convert(NamenodeRegistration reg) {
  return NamenodeRegistrationProto.newBuilder()
      .setHttpAddress(reg.getHttpAddress()).setRole(convert(reg.getRole()))
      .setRpcAddress(reg.getAddress())
      .setStorageInfo(convert((StorageInfo) reg)).build();
}
项目:big-c    文件:PBHelper.java   
public static NamenodeRegistration convert(NamenodeRegistrationProto reg) {
  StorageInfo si = convert(reg.getStorageInfo(), NodeType.NAME_NODE);
  return new NamenodeRegistration(reg.getRpcAddress(), reg.getHttpAddress(),
      si, convert(reg.getRole()));
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static NamenodeRegistrationProto convert(NamenodeRegistration reg) {
  return NamenodeRegistrationProto.newBuilder()
      .setHttpAddress(reg.getHttpAddress()).setRole(convert(reg.getRole()))
      .setRpcAddress(reg.getAddress())
      .setStorageInfo(convert((StorageInfo) reg)).build();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static NamenodeRegistration convert(NamenodeRegistrationProto reg) {
  StorageInfo si = convert(reg.getStorageInfo(), NodeType.NAME_NODE);
  return new NamenodeRegistration(reg.getRpcAddress(), reg.getHttpAddress(),
      si, convert(reg.getRole()));
}
项目:hadoop-plus    文件:PBHelper.java   
public static NamenodeRegistrationProto convert(NamenodeRegistration reg) {
  return NamenodeRegistrationProto.newBuilder()
      .setHttpAddress(reg.getHttpAddress()).setRole(convert(reg.getRole()))
      .setRpcAddress(reg.getAddress())
      .setStorageInfo(convert((StorageInfo) reg)).build();
}
项目:hadoop-plus    文件:PBHelper.java   
public static NamenodeRegistration convert(NamenodeRegistrationProto reg) {
  return new NamenodeRegistration(reg.getRpcAddress(), reg.getHttpAddress(),
      convert(reg.getStorageInfo()), convert(reg.getRole()));
}
项目:FlexMap    文件:PBHelper.java   
public static NamenodeRegistrationProto convert(NamenodeRegistration reg) {
  return NamenodeRegistrationProto.newBuilder()
      .setHttpAddress(reg.getHttpAddress()).setRole(convert(reg.getRole()))
      .setRpcAddress(reg.getAddress())
      .setStorageInfo(convert((StorageInfo) reg)).build();
}
项目:FlexMap    文件:PBHelper.java   
public static NamenodeRegistration convert(NamenodeRegistrationProto reg) {
  StorageInfo si = convert(reg.getStorageInfo(), NodeType.NAME_NODE);
  return new NamenodeRegistration(reg.getRpcAddress(), reg.getHttpAddress(),
      si, convert(reg.getRole()));
}
项目:hops    文件:PBHelper.java   
public static NamenodeRegistrationProto convert(NamenodeRegistration reg) {
  return NamenodeRegistrationProto.newBuilder()
      .setHttpAddress(reg.getHttpAddress()).setRole(convert(reg.getRole()))
      .setRpcAddress(reg.getAddress())
      .setStorageInfo(convert((StorageInfo) reg)).build();
}
项目:hops    文件:PBHelper.java   
public static NamenodeRegistration convert(NamenodeRegistrationProto reg) {
  return new NamenodeRegistration(reg.getRpcAddress(), reg.getHttpAddress(),
      convert(reg.getStorageInfo()), convert(reg.getRole()));
}
项目:hadoop-TCP    文件:PBHelper.java   
public static NamenodeRegistrationProto convert(NamenodeRegistration reg) {
  return NamenodeRegistrationProto.newBuilder()
      .setHttpAddress(reg.getHttpAddress()).setRole(convert(reg.getRole()))
      .setRpcAddress(reg.getAddress())
      .setStorageInfo(convert((StorageInfo) reg)).build();
}
项目:hadoop-TCP    文件:PBHelper.java   
public static NamenodeRegistration convert(NamenodeRegistrationProto reg) {
  return new NamenodeRegistration(reg.getRpcAddress(), reg.getHttpAddress(),
      convert(reg.getStorageInfo()), convert(reg.getRole()));
}
项目:hardfs    文件:PBHelper.java   
public static NamenodeRegistrationProto convert(NamenodeRegistration reg) {
  return NamenodeRegistrationProto.newBuilder()
      .setHttpAddress(reg.getHttpAddress()).setRole(convert(reg.getRole()))
      .setRpcAddress(reg.getAddress())
      .setStorageInfo(convert((StorageInfo) reg)).build();
}
项目:hardfs    文件:PBHelper.java   
public static NamenodeRegistration convert(NamenodeRegistrationProto reg) {
  return new NamenodeRegistration(reg.getRpcAddress(), reg.getHttpAddress(),
      convert(reg.getStorageInfo()), convert(reg.getRole()));
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static NamenodeRegistrationProto convert(NamenodeRegistration reg) {
  return NamenodeRegistrationProto.newBuilder()
      .setHttpAddress(reg.getHttpAddress()).setRole(convert(reg.getRole()))
      .setRpcAddress(reg.getAddress())
      .setStorageInfo(convert((StorageInfo) reg)).build();
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static NamenodeRegistration convert(NamenodeRegistrationProto reg) {
  StorageInfo si = convert(reg.getStorageInfo(), NodeType.NAME_NODE);
  return new NamenodeRegistration(reg.getRpcAddress(), reg.getHttpAddress(),
      si, convert(reg.getRole()));
}