Examples of LocatedBlockProto


Examples of org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto

 
  public static RecoveringBlockProto convert(RecoveringBlock b) {
    if (b == null) {
      return null;
    }
    LocatedBlockProto lb = PBHelper.convert((LocatedBlock)b);
    return RecoveringBlockProto.newBuilder().setBlock(lb)
        .setNewGenStamp(b.getNewGenerationStamp()).build();
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto

 
  public static RecoveringBlockProto convert(RecoveringBlock b) {
    if (b == null) {
      return null;
    }
    LocatedBlockProto lb = PBHelper.convert((LocatedBlock)b);
    return RecoveringBlockProto.newBuilder().setBlock(lb)
        .setNewGenStamp(b.getNewGenerationStamp()).build();
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto

  @Override
  public UpdateBlockForPipelineResponseProto updateBlockForPipeline(
      RpcController controller, UpdateBlockForPipelineRequestProto req)
      throws ServiceException {
    try {
      LocatedBlockProto result = PBHelper.convert(server
          .updateBlockForPipeline(PBHelper.convert(req.getBlock()),
              req.getClientName()));
      return UpdateBlockForPipelineResponseProto.newBuilder().setBlock(result)
          .build();
    } catch (IOException e) {
View Full Code Here

Examples of org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto

 
  public static RecoveringBlockProto convert(RecoveringBlock b) {
    if (b == null) {
      return null;
    }
    LocatedBlockProto lb = PBHelper.convert((LocatedBlock)b);
    return RecoveringBlockProto.newBuilder().setBlock(lb)
        .setNewGenStamp(b.getNewGenerationStamp()).build();
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto

  @Override
  public UpdateBlockForPipelineResponseProto updateBlockForPipeline(
      RpcController controller, UpdateBlockForPipelineRequestProto req)
      throws ServiceException {
    try {
      LocatedBlockProto result = PBHelper.convert(server
          .updateBlockForPipeline(PBHelper.convert(req.getBlock()),
              req.getClientName()));
      return UpdateBlockForPipelineResponseProto.newBuilder().setBlock(result)
          .build();
    } catch (IOException e) {
View Full Code Here

Examples of org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto

        DFSTestUtil.getLocalDatanodeInfo("127.0.0.1", "h2", AdminStates.DECOMMISSIONED),
        DFSTestUtil.getLocalDatanodeInfo("127.0.0.1", "h3", AdminStates.NORMAL)
    };
    LocatedBlock lb = new LocatedBlock(
        new ExtendedBlock("bp12", 12345, 10, 53), dnInfos, 5, false);
    LocatedBlockProto lbProto = PBHelper.convert(lb);
    LocatedBlock lb2 = PBHelper.convert(lbProto);
    assertEquals(lb.getBlock(), lb2.getBlock());
    compare(lb.getBlockToken(), lb2.getBlockToken());
    assertEquals(lb.getStartOffset(), lb2.getStartOffset());
    assertEquals(lb.isCorrupt(), lb2.isCorrupt());
View Full Code Here

Examples of org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto

 
  public static RecoveringBlockProto convert(RecoveringBlock b) {
    if (b == null) {
      return null;
    }
    LocatedBlockProto lb = PBHelper.convert((LocatedBlock)b);
    return RecoveringBlockProto.newBuilder().setBlock(lb)
        .setNewGenStamp(b.getNewGenerationStamp()).build();
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto

 
  public static RecoveringBlockProto convert(RecoveringBlock b) {
    if (b == null) {
      return null;
    }
    LocatedBlockProto lb = PBHelper.convert((LocatedBlock)b);
    return RecoveringBlockProto.newBuilder().setBlock(lb)
        .setNewGenStamp(b.getNewGenerationStamp()).build();
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto

  @Override
  public UpdateBlockForPipelineResponseProto updateBlockForPipeline(
      RpcController controller, UpdateBlockForPipelineRequestProto req)
      throws ServiceException {
    try {
      LocatedBlockProto result = PBHelper.convert(server
          .updateBlockForPipeline(PBHelper.convert(req.getBlock()),
              req.getClientName()));
      return UpdateBlockForPipelineResponseProto.newBuilder().setBlock(result)
          .build();
    } catch (IOException e) {
View Full Code Here

Examples of org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto

        59, 69, 32, "local", AdminStates.DECOMMISSIONED);
    dnInfos[2] = new DatanodeInfo("host2", "host2", "2", 5000, 5001, 5002, 20000, 10001, 9999,
        59, 69, 32, "local", AdminStates.NORMAL);
    LocatedBlock lb = new LocatedBlock(
        new ExtendedBlock("bp12", 12345, 10, 53), dnInfos, 5, false);
    LocatedBlockProto lbProto = PBHelper.convert(lb);
    LocatedBlock lb2 = PBHelper.convert(lbProto);
    assertEquals(lb.getBlock(), lb2.getBlock());
    compare(lb.getBlockToken(), lb2.getBlockToken());
    assertEquals(lb.getStartOffset(), lb2.getStartOffset());
    assertEquals(lb.isCorrupt(), lb2.isCorrupt());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.