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

项目:hadoop    文件:PBHelper.java   
public static BlockWithLocationsProto convert(BlockWithLocations blk) {
  return BlockWithLocationsProto.newBuilder()
      .setBlock(convert(blk.getBlock()))
      .addAllDatanodeUuids(Arrays.asList(blk.getDatanodeUuids()))
      .addAllStorageUuids(Arrays.asList(blk.getStorageIDs()))
      .addAllStorageTypes(convertStorageTypes(blk.getStorageTypes()))
      .build();
}
项目:hadoop    文件:PBHelper.java   
public static BlockWithLocations convert(BlockWithLocationsProto b) {
  final List<String> datanodeUuids = b.getDatanodeUuidsList();
  final List<String> storageUuids = b.getStorageUuidsList();
  final List<StorageTypeProto> storageTypes = b.getStorageTypesList();
  return new BlockWithLocations(convert(b.getBlock()),
      datanodeUuids.toArray(new String[datanodeUuids.size()]),
      storageUuids.toArray(new String[storageUuids.size()]),
      convertStorageTypes(storageTypes, storageUuids.size()));
}
项目:hadoop    文件:PBHelper.java   
public static BlocksWithLocations convert(BlocksWithLocationsProto blocks) {
  List<BlockWithLocationsProto> b = blocks.getBlocksList();
  BlockWithLocations[] ret = new BlockWithLocations[b.size()];
  int i = 0;
  for (BlockWithLocationsProto entry : b) {
    ret[i++] = convert(entry);
  }
  return new BlocksWithLocations(ret);
}
项目:hadoop    文件:TestPBHelper.java   
@Test
public void testConvertBlockWithLocations() {
  BlockWithLocations locs = getBlockWithLocations(1);
  BlockWithLocationsProto locsProto = PBHelper.convert(locs);
  BlockWithLocations locs2 = PBHelper.convert(locsProto);
  compare(locs, locs2);
}
项目:big-c    文件:PBHelper.java   
public static BlockWithLocationsProto convert(BlockWithLocations blk) {
  return BlockWithLocationsProto.newBuilder()
      .setBlock(convert(blk.getBlock()))
      .addAllDatanodeUuids(Arrays.asList(blk.getDatanodeUuids()))
      .addAllStorageUuids(Arrays.asList(blk.getStorageIDs()))
      .addAllStorageTypes(convertStorageTypes(blk.getStorageTypes()))
      .build();
}
项目:big-c    文件:PBHelper.java   
public static BlockWithLocations convert(BlockWithLocationsProto b) {
  final List<String> datanodeUuids = b.getDatanodeUuidsList();
  final List<String> storageUuids = b.getStorageUuidsList();
  final List<StorageTypeProto> storageTypes = b.getStorageTypesList();
  return new BlockWithLocations(convert(b.getBlock()),
      datanodeUuids.toArray(new String[datanodeUuids.size()]),
      storageUuids.toArray(new String[storageUuids.size()]),
      convertStorageTypes(storageTypes, storageUuids.size()));
}
项目:big-c    文件:PBHelper.java   
public static BlocksWithLocations convert(BlocksWithLocationsProto blocks) {
  List<BlockWithLocationsProto> b = blocks.getBlocksList();
  BlockWithLocations[] ret = new BlockWithLocations[b.size()];
  int i = 0;
  for (BlockWithLocationsProto entry : b) {
    ret[i++] = convert(entry);
  }
  return new BlocksWithLocations(ret);
}
项目:big-c    文件:TestPBHelper.java   
@Test
public void testConvertBlockWithLocations() {
  BlockWithLocations locs = getBlockWithLocations(1);
  BlockWithLocationsProto locsProto = PBHelper.convert(locs);
  BlockWithLocations locs2 = PBHelper.convert(locsProto);
  compare(locs, locs2);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static BlockWithLocationsProto convert(BlockWithLocations blk) {
  return BlockWithLocationsProto.newBuilder()
      .setBlock(convert(blk.getBlock()))
      .addAllDatanodeUuids(Arrays.asList(blk.getDatanodeUuids()))
      .addAllStorageUuids(Arrays.asList(blk.getStorageIDs()))
      .addAllStorageTypes(convertStorageTypes(blk.getStorageTypes()))
      .build();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static BlockWithLocations convert(BlockWithLocationsProto b) {
  final List<String> datanodeUuids = b.getDatanodeUuidsList();
  final List<String> storageUuids = b.getStorageUuidsList();
  final List<StorageTypeProto> storageTypes = b.getStorageTypesList();
  return new BlockWithLocations(convert(b.getBlock()),
      datanodeUuids.toArray(new String[datanodeUuids.size()]),
      storageUuids.toArray(new String[storageUuids.size()]),
      convertStorageTypes(storageTypes, storageUuids.size()));
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static BlocksWithLocations convert(BlocksWithLocationsProto blocks) {
  List<BlockWithLocationsProto> b = blocks.getBlocksList();
  BlockWithLocations[] ret = new BlockWithLocations[b.size()];
  int i = 0;
  for (BlockWithLocationsProto entry : b) {
    ret[i++] = convert(entry);
  }
  return new BlocksWithLocations(ret);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestPBHelper.java   
@Test
public void testConvertBlockWithLocations() {
  BlockWithLocations locs = getBlockWithLocations(1);
  BlockWithLocationsProto locsProto = PBHelper.convert(locs);
  BlockWithLocations locs2 = PBHelper.convert(locsProto);
  compare(locs, locs2);
}
项目:hadoop-plus    文件:PBHelper.java   
public static BlocksWithLocations convert(BlocksWithLocationsProto blocks) {
  List<BlockWithLocationsProto> b = blocks.getBlocksList();
  BlockWithLocations[] ret = new BlockWithLocations[b.size()];
  int i = 0;
  for (BlockWithLocationsProto entry : b) {
    ret[i++] = convert(entry);
  }
  return new BlocksWithLocations(ret);
}
项目:hadoop-plus    文件:TestPBHelper.java   
@Test
public void testConvertBlockWithLocations() {
  BlockWithLocations locs = getBlockWithLocations(1);
  BlockWithLocationsProto locsProto = PBHelper.convert(locs);
  BlockWithLocations locs2 = PBHelper.convert(locsProto);
  compare(locs, locs2);
}
项目:FlexMap    文件:PBHelper.java   
public static BlockWithLocationsProto convert(BlockWithLocations blk) {
  return BlockWithLocationsProto.newBuilder()
      .setBlock(convert(blk.getBlock()))
      .addAllDatanodeUuids(Arrays.asList(blk.getDatanodeUuids()))
      .addAllStorageUuids(Arrays.asList(blk.getStorageIDs()))
      .addAllStorageTypes(convertStorageTypes(blk.getStorageTypes()))
      .build();
}
项目:FlexMap    文件:PBHelper.java   
public static BlockWithLocations convert(BlockWithLocationsProto b) {
  final List<String> datanodeUuids = b.getDatanodeUuidsList();
  final List<String> storageUuids = b.getStorageUuidsList();
  final List<StorageTypeProto> storageTypes = b.getStorageTypesList();
  return new BlockWithLocations(convert(b.getBlock()),
      datanodeUuids.toArray(new String[datanodeUuids.size()]),
      storageUuids.toArray(new String[storageUuids.size()]),
      convertStorageTypes(storageTypes, storageUuids.size()));
}
项目:FlexMap    文件:PBHelper.java   
public static BlocksWithLocations convert(BlocksWithLocationsProto blocks) {
  List<BlockWithLocationsProto> b = blocks.getBlocksList();
  BlockWithLocations[] ret = new BlockWithLocations[b.size()];
  int i = 0;
  for (BlockWithLocationsProto entry : b) {
    ret[i++] = convert(entry);
  }
  return new BlocksWithLocations(ret);
}
项目:FlexMap    文件:TestPBHelper.java   
@Test
public void testConvertBlockWithLocations() {
  BlockWithLocations locs = getBlockWithLocations(1);
  BlockWithLocationsProto locsProto = PBHelper.convert(locs);
  BlockWithLocations locs2 = PBHelper.convert(locsProto);
  compare(locs, locs2);
}
项目:hops    文件:PBHelper.java   
public static BlocksWithLocations convert(BlocksWithLocationsProto blocks) {
  List<BlockWithLocationsProto> b = blocks.getBlocksList();
  BlockWithLocations[] ret = new BlockWithLocations[b.size()];
  int i = 0;
  for (BlockWithLocationsProto entry : b) {
    ret[i++] = convert(entry);
  }
  return new BlocksWithLocations(ret);
}
项目:hops    文件:TestPBHelper.java   
@Test
public void testConvertBlockWithLocations() {
  BlockWithLocations locs = getBlockWithLocations(1);
  BlockWithLocationsProto locsProto = PBHelper.convert(locs);
  BlockWithLocations locs2 = PBHelper.convert(locsProto);
  compare(locs, locs2);
}
项目:hadoop-TCP    文件:PBHelper.java   
public static BlocksWithLocations convert(BlocksWithLocationsProto blocks) {
  List<BlockWithLocationsProto> b = blocks.getBlocksList();
  BlockWithLocations[] ret = new BlockWithLocations[b.size()];
  int i = 0;
  for (BlockWithLocationsProto entry : b) {
    ret[i++] = convert(entry);
  }
  return new BlocksWithLocations(ret);
}
项目:hadoop-TCP    文件:TestPBHelper.java   
@Test
public void testConvertBlockWithLocations() {
  BlockWithLocations locs = getBlockWithLocations(1);
  BlockWithLocationsProto locsProto = PBHelper.convert(locs);
  BlockWithLocations locs2 = PBHelper.convert(locsProto);
  compare(locs, locs2);
}
项目:hardfs    文件:PBHelper.java   
public static BlocksWithLocations convert(BlocksWithLocationsProto blocks) {
  List<BlockWithLocationsProto> b = blocks.getBlocksList();
  BlockWithLocations[] ret = new BlockWithLocations[b.size()];
  int i = 0;
  for (BlockWithLocationsProto entry : b) {
    ret[i++] = convert(entry);
  }
  return new BlocksWithLocations(ret);
}
项目:hardfs    文件:TestPBHelper.java   
@Test
public void testConvertBlockWithLocations() {
  BlockWithLocations locs = getBlockWithLocations(1);
  BlockWithLocationsProto locsProto = PBHelper.convert(locs);
  BlockWithLocations locs2 = PBHelper.convert(locsProto);
  compare(locs, locs2);
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static BlockWithLocations convert(BlockWithLocationsProto b) {
  final List<String> datanodeUuids = b.getDatanodeUuidsList();
  final List<String> storageUuids = b.getStorageUuidsList();
  return new BlockWithLocations(convert(b.getBlock()),
      datanodeUuids.toArray(new String[datanodeUuids.size()]),
      storageUuids.toArray(new String[storageUuids.size()]));
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static BlocksWithLocations convert(BlocksWithLocationsProto blocks) {
  List<BlockWithLocationsProto> b = blocks.getBlocksList();
  BlockWithLocations[] ret = new BlockWithLocations[b.size()];
  int i = 0;
  for (BlockWithLocationsProto entry : b) {
    ret[i++] = convert(entry);
  }
  return new BlocksWithLocations(ret);
}
项目:hadoop-on-lustre2    文件:TestPBHelper.java   
@Test
public void testConvertBlockWithLocations() {
  BlockWithLocations locs = getBlockWithLocations(1);
  BlockWithLocationsProto locsProto = PBHelper.convert(locs);
  BlockWithLocations locs2 = PBHelper.convert(locsProto);
  compare(locs, locs2);
}
项目:hadoop-plus    文件:PBHelper.java   
public static BlockWithLocationsProto convert(BlockWithLocations blk) {
  return BlockWithLocationsProto.newBuilder()
      .setBlock(convert(blk.getBlock()))
      .addAllStorageIDs(Arrays.asList(blk.getStorageIDs())).build();
}
项目:hadoop-plus    文件:PBHelper.java   
public static BlockWithLocations convert(BlockWithLocationsProto b) {
  return new BlockWithLocations(convert(b.getBlock()), b.getStorageIDsList()
      .toArray(new String[0]));
}
项目:hops    文件:PBHelper.java   
public static BlockWithLocationsProto convert(BlockWithLocations blk) {
  return BlockWithLocationsProto.newBuilder()
      .setBlock(convert(blk.getBlock()))
      .addAllStorageIDs(Arrays.asList(blk.getStorageIDs())).build();
}
项目:hops    文件:PBHelper.java   
public static BlockWithLocations convert(BlockWithLocationsProto b) {
  return new BlockWithLocations(convert(b.getBlock()),
      b.getStorageIDsList().toArray(new String[0]));
}
项目:hadoop-TCP    文件:PBHelper.java   
public static BlockWithLocationsProto convert(BlockWithLocations blk) {
  return BlockWithLocationsProto.newBuilder()
      .setBlock(convert(blk.getBlock()))
      .addAllStorageIDs(Arrays.asList(blk.getStorageIDs())).build();
}
项目:hadoop-TCP    文件:PBHelper.java   
public static BlockWithLocations convert(BlockWithLocationsProto b) {
  return new BlockWithLocations(convert(b.getBlock()), b.getStorageIDsList()
      .toArray(new String[0]));
}
项目:hardfs    文件:PBHelper.java   
public static BlockWithLocationsProto convert(BlockWithLocations blk) {
  return BlockWithLocationsProto.newBuilder()
      .setBlock(convert(blk.getBlock()))
      .addAllStorageIDs(Arrays.asList(blk.getStorageIDs())).build();
}
项目:hardfs    文件:PBHelper.java   
public static BlockWithLocations convert(BlockWithLocationsProto b) {
  return new BlockWithLocations(convert(b.getBlock()), b.getStorageIDsList()
      .toArray(new String[0]));
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static BlockWithLocationsProto convert(BlockWithLocations blk) {
  return BlockWithLocationsProto.newBuilder()
      .setBlock(convert(blk.getBlock()))
      .addAllDatanodeUuids(Arrays.asList(blk.getDatanodeUuids()))
      .addAllStorageUuids(Arrays.asList(blk.getStorageIDs())).build();
}