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

项目:hadoop    文件:PBHelper.java   
public static ExportedBlockKeysProto convert(ExportedBlockKeys keys) {
  ExportedBlockKeysProto.Builder builder = ExportedBlockKeysProto
      .newBuilder();
  builder.setIsBlockTokenEnabled(keys.isBlockTokenEnabled())
      .setKeyUpdateInterval(keys.getKeyUpdateInterval())
      .setTokenLifeTime(keys.getTokenLifetime())
      .setCurrentKey(convert(keys.getCurrentKey()));
  for (BlockKey k : keys.getAllKeys()) {
    builder.addAllKeys(convert(k));
  }
  return builder.build();
}
项目:hadoop    文件:TestPBHelper.java   
@Test
public void testConvertExportedBlockKeys() {
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  ExportedBlockKeysProto expKeysProto = PBHelper.convert(expKeys);
  ExportedBlockKeys expKeys1 = PBHelper.convert(expKeysProto);
  compare(expKeys, expKeys1);
}
项目:big-c    文件:PBHelper.java   
public static ExportedBlockKeysProto convert(ExportedBlockKeys keys) {
  ExportedBlockKeysProto.Builder builder = ExportedBlockKeysProto
      .newBuilder();
  builder.setIsBlockTokenEnabled(keys.isBlockTokenEnabled())
      .setKeyUpdateInterval(keys.getKeyUpdateInterval())
      .setTokenLifeTime(keys.getTokenLifetime())
      .setCurrentKey(convert(keys.getCurrentKey()));
  for (BlockKey k : keys.getAllKeys()) {
    builder.addAllKeys(convert(k));
  }
  return builder.build();
}
项目:big-c    文件:TestPBHelper.java   
@Test
public void testConvertExportedBlockKeys() {
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  ExportedBlockKeysProto expKeysProto = PBHelper.convert(expKeys);
  ExportedBlockKeys expKeys1 = PBHelper.convert(expKeysProto);
  compare(expKeys, expKeys1);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static ExportedBlockKeysProto convert(ExportedBlockKeys keys) {
  ExportedBlockKeysProto.Builder builder = ExportedBlockKeysProto
      .newBuilder();
  builder.setIsBlockTokenEnabled(keys.isBlockTokenEnabled())
      .setKeyUpdateInterval(keys.getKeyUpdateInterval())
      .setTokenLifeTime(keys.getTokenLifetime())
      .setCurrentKey(convert(keys.getCurrentKey()));
  for (BlockKey k : keys.getAllKeys()) {
    builder.addAllKeys(convert(k));
  }
  return builder.build();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestPBHelper.java   
@Test
public void testConvertExportedBlockKeys() {
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  ExportedBlockKeysProto expKeysProto = PBHelper.convert(expKeys);
  ExportedBlockKeys expKeys1 = PBHelper.convert(expKeysProto);
  compare(expKeys, expKeys1);
}
项目:hadoop-plus    文件:PBHelper.java   
public static ExportedBlockKeysProto convert(ExportedBlockKeys keys) {
  ExportedBlockKeysProto.Builder builder = ExportedBlockKeysProto
      .newBuilder();
  builder.setIsBlockTokenEnabled(keys.isBlockTokenEnabled())
      .setKeyUpdateInterval(keys.getKeyUpdateInterval())
      .setTokenLifeTime(keys.getTokenLifetime())
      .setCurrentKey(convert(keys.getCurrentKey()));
  for (BlockKey k : keys.getAllKeys()) {
    builder.addAllKeys(convert(k));
  }
  return builder.build();
}
项目:hadoop-plus    文件:TestPBHelper.java   
@Test
public void testConvertExportedBlockKeys() {
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  ExportedBlockKeysProto expKeysProto = PBHelper.convert(expKeys);
  ExportedBlockKeys expKeys1 = PBHelper.convert(expKeysProto);
  compare(expKeys, expKeys1);
}
项目:FlexMap    文件:PBHelper.java   
public static ExportedBlockKeysProto convert(ExportedBlockKeys keys) {
  ExportedBlockKeysProto.Builder builder = ExportedBlockKeysProto
      .newBuilder();
  builder.setIsBlockTokenEnabled(keys.isBlockTokenEnabled())
      .setKeyUpdateInterval(keys.getKeyUpdateInterval())
      .setTokenLifeTime(keys.getTokenLifetime())
      .setCurrentKey(convert(keys.getCurrentKey()));
  for (BlockKey k : keys.getAllKeys()) {
    builder.addAllKeys(convert(k));
  }
  return builder.build();
}
项目:FlexMap    文件:TestPBHelper.java   
@Test
public void testConvertExportedBlockKeys() {
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  ExportedBlockKeysProto expKeysProto = PBHelper.convert(expKeys);
  ExportedBlockKeys expKeys1 = PBHelper.convert(expKeysProto);
  compare(expKeys, expKeys1);
}
项目:hops    文件:PBHelper.java   
public static ExportedBlockKeysProto convert(ExportedBlockKeys keys) {
  ExportedBlockKeysProto.Builder builder =
      ExportedBlockKeysProto.newBuilder();
  builder.setIsBlockTokenEnabled(keys.isBlockTokenEnabled())
      .setKeyUpdateInterval(keys.getKeyUpdateInterval())
      .setTokenLifeTime(keys.getTokenLifetime())
      .setCurrentKey(convert(keys.getCurrentKey()));
  for (BlockKey k : keys.getAllKeys()) {
    builder.addAllKeys(convert(k));
  }
  return builder.build();
}
项目:hops    文件:TestPBHelper.java   
@Test
public void testConvertExportedBlockKeys() {
  BlockKey[] keys = new BlockKey[]{getBlockKey(2), getBlockKey(3)};
  ExportedBlockKeys expKeys =
      new ExportedBlockKeys(true, 9, 10, getBlockKey(1), keys);
  ExportedBlockKeysProto expKeysProto = PBHelper.convert(expKeys);
  ExportedBlockKeys expKeys1 = PBHelper.convert(expKeysProto);
  compare(expKeys, expKeys1);
}
项目:hadoop-TCP    文件:PBHelper.java   
public static ExportedBlockKeysProto convert(ExportedBlockKeys keys) {
  ExportedBlockKeysProto.Builder builder = ExportedBlockKeysProto
      .newBuilder();
  builder.setIsBlockTokenEnabled(keys.isBlockTokenEnabled())
      .setKeyUpdateInterval(keys.getKeyUpdateInterval())
      .setTokenLifeTime(keys.getTokenLifetime())
      .setCurrentKey(convert(keys.getCurrentKey()));
  for (BlockKey k : keys.getAllKeys()) {
    builder.addAllKeys(convert(k));
  }
  return builder.build();
}
项目:hadoop-TCP    文件:TestPBHelper.java   
@Test
public void testConvertExportedBlockKeys() {
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  ExportedBlockKeysProto expKeysProto = PBHelper.convert(expKeys);
  ExportedBlockKeys expKeys1 = PBHelper.convert(expKeysProto);
  compare(expKeys, expKeys1);
}
项目:hardfs    文件:PBHelper.java   
public static ExportedBlockKeysProto convert(ExportedBlockKeys keys) {
  ExportedBlockKeysProto.Builder builder = ExportedBlockKeysProto
      .newBuilder();
  builder.setIsBlockTokenEnabled(keys.isBlockTokenEnabled())
      .setKeyUpdateInterval(keys.getKeyUpdateInterval())
      .setTokenLifeTime(keys.getTokenLifetime())
      .setCurrentKey(convert(keys.getCurrentKey()));
  for (BlockKey k : keys.getAllKeys()) {
    builder.addAllKeys(convert(k));
  }
  return builder.build();
}
项目:hardfs    文件:TestPBHelper.java   
@Test
public void testConvertExportedBlockKeys() {
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  ExportedBlockKeysProto expKeysProto = PBHelper.convert(expKeys);
  ExportedBlockKeys expKeys1 = PBHelper.convert(expKeysProto);
  compare(expKeys, expKeys1);
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static ExportedBlockKeysProto convert(ExportedBlockKeys keys) {
  ExportedBlockKeysProto.Builder builder = ExportedBlockKeysProto
      .newBuilder();
  builder.setIsBlockTokenEnabled(keys.isBlockTokenEnabled())
      .setKeyUpdateInterval(keys.getKeyUpdateInterval())
      .setTokenLifeTime(keys.getTokenLifetime())
      .setCurrentKey(convert(keys.getCurrentKey()));
  for (BlockKey k : keys.getAllKeys()) {
    builder.addAllKeys(convert(k));
  }
  return builder.build();
}
项目:hadoop-on-lustre2    文件:TestPBHelper.java   
@Test
public void testConvertExportedBlockKeys() {
  BlockKey[] keys = new BlockKey[] { getBlockKey(2), getBlockKey(3) };
  ExportedBlockKeys expKeys = new ExportedBlockKeys(true, 9, 10,
      getBlockKey(1), keys);
  ExportedBlockKeysProto expKeysProto = PBHelper.convert(expKeys);
  ExportedBlockKeys expKeys1 = PBHelper.convert(expKeysProto);
  compare(expKeys, expKeys1);
}
项目:hadoop    文件:PBHelper.java   
public static ExportedBlockKeys convert(ExportedBlockKeysProto keys) {
  return new ExportedBlockKeys(keys.getIsBlockTokenEnabled(),
      keys.getKeyUpdateInterval(), keys.getTokenLifeTime(),
      convert(keys.getCurrentKey()), convertBlockKeys(keys.getAllKeysList()));
}
项目:big-c    文件:PBHelper.java   
public static ExportedBlockKeys convert(ExportedBlockKeysProto keys) {
  return new ExportedBlockKeys(keys.getIsBlockTokenEnabled(),
      keys.getKeyUpdateInterval(), keys.getTokenLifeTime(),
      convert(keys.getCurrentKey()), convertBlockKeys(keys.getAllKeysList()));
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static ExportedBlockKeys convert(ExportedBlockKeysProto keys) {
  return new ExportedBlockKeys(keys.getIsBlockTokenEnabled(),
      keys.getKeyUpdateInterval(), keys.getTokenLifeTime(),
      convert(keys.getCurrentKey()), convertBlockKeys(keys.getAllKeysList()));
}
项目:hadoop-plus    文件:PBHelper.java   
public static ExportedBlockKeys convert(ExportedBlockKeysProto keys) {
  return new ExportedBlockKeys(keys.getIsBlockTokenEnabled(),
      keys.getKeyUpdateInterval(), keys.getTokenLifeTime(),
      convert(keys.getCurrentKey()), convertBlockKeys(keys.getAllKeysList()));
}
项目:FlexMap    文件:PBHelper.java   
public static ExportedBlockKeys convert(ExportedBlockKeysProto keys) {
  return new ExportedBlockKeys(keys.getIsBlockTokenEnabled(),
      keys.getKeyUpdateInterval(), keys.getTokenLifeTime(),
      convert(keys.getCurrentKey()), convertBlockKeys(keys.getAllKeysList()));
}
项目:hops    文件:PBHelper.java   
public static ExportedBlockKeys convert(ExportedBlockKeysProto keys) {
  return new ExportedBlockKeys(keys.getIsBlockTokenEnabled(),
      keys.getKeyUpdateInterval(), keys.getTokenLifeTime(),
      convert(keys.getCurrentKey()), convertBlockKeys(keys.getAllKeysList()));
}
项目:hadoop-TCP    文件:PBHelper.java   
public static ExportedBlockKeys convert(ExportedBlockKeysProto keys) {
  return new ExportedBlockKeys(keys.getIsBlockTokenEnabled(),
      keys.getKeyUpdateInterval(), keys.getTokenLifeTime(),
      convert(keys.getCurrentKey()), convertBlockKeys(keys.getAllKeysList()));
}
项目:hardfs    文件:PBHelper.java   
public static ExportedBlockKeys convert(ExportedBlockKeysProto keys) {
  return new ExportedBlockKeys(keys.getIsBlockTokenEnabled(),
      keys.getKeyUpdateInterval(), keys.getTokenLifeTime(),
      convert(keys.getCurrentKey()), convertBlockKeys(keys.getAllKeysList()));
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static ExportedBlockKeys convert(ExportedBlockKeysProto keys) {
  return new ExportedBlockKeys(keys.getIsBlockTokenEnabled(),
      keys.getKeyUpdateInterval(), keys.getTokenLifeTime(),
      convert(keys.getCurrentKey()), convertBlockKeys(keys.getAllKeysList()));
}