Java 类org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.OpReplaceBlockProto 实例源码

项目:hadoop    文件:Sender.java   
@Override
public void replaceBlock(final ExtendedBlock blk,
    final StorageType storageType, 
    final Token<BlockTokenIdentifier> blockToken,
    final String delHint,
    final DatanodeInfo source) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.newBuilder()
    .setHeader(DataTransferProtoUtil.buildBaseHeader(blk, blockToken))
    .setStorageType(PBHelper.convertStorageType(storageType))
    .setDelHint(delHint)
    .setSource(PBHelper.convertDatanodeInfo(source))
    .build();

  send(out, Op.REPLACE_BLOCK, proto);
}
项目:hadoop    文件:Receiver.java   
/** Receive OP_REPLACE_BLOCK */
private void opReplaceBlock(DataInputStream in) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.parseFrom(vintPrefixed(in));
  TraceScope traceScope = continueTraceSpan(proto.getHeader(),
      proto.getClass().getSimpleName());
  try {
    replaceBlock(PBHelper.convert(proto.getHeader().getBlock()),
        PBHelper.convertStorageType(proto.getStorageType()),
        PBHelper.convert(proto.getHeader().getToken()),
        proto.getDelHint(),
        PBHelper.convert(proto.getSource()));
  } finally {
    if (traceScope != null) traceScope.close();
  }
}
项目:aliyun-oss-hadoop-fs    文件:Sender.java   
@Override
public void replaceBlock(final ExtendedBlock blk,
    final StorageType storageType,
    final Token<BlockTokenIdentifier> blockToken,
    final String delHint,
    final DatanodeInfo source) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.newBuilder()
      .setHeader(DataTransferProtoUtil.buildBaseHeader(blk, blockToken))
      .setStorageType(PBHelperClient.convertStorageType(storageType))
      .setDelHint(delHint)
      .setSource(PBHelperClient.convertDatanodeInfo(source))
      .build();

  send(out, Op.REPLACE_BLOCK, proto);
}
项目:aliyun-oss-hadoop-fs    文件:Receiver.java   
/** Receive OP_REPLACE_BLOCK */
private void opReplaceBlock(DataInputStream in) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.parseFrom(vintPrefixed(in));
  TraceScope traceScope = continueTraceSpan(proto.getHeader(),
      proto.getClass().getSimpleName());
  try {
    replaceBlock(PBHelperClient.convert(proto.getHeader().getBlock()),
        PBHelperClient.convertStorageType(proto.getStorageType()),
        PBHelperClient.convert(proto.getHeader().getToken()),
        proto.getDelHint(),
        PBHelperClient.convert(proto.getSource()));
  } finally {
    if (traceScope != null) traceScope.close();
  }
}
项目:big-c    文件:Sender.java   
@Override
public void replaceBlock(final ExtendedBlock blk,
    final StorageType storageType, 
    final Token<BlockTokenIdentifier> blockToken,
    final String delHint,
    final DatanodeInfo source) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.newBuilder()
    .setHeader(DataTransferProtoUtil.buildBaseHeader(blk, blockToken))
    .setStorageType(PBHelper.convertStorageType(storageType))
    .setDelHint(delHint)
    .setSource(PBHelper.convertDatanodeInfo(source))
    .build();

  send(out, Op.REPLACE_BLOCK, proto);
}
项目:big-c    文件:Receiver.java   
/** Receive OP_REPLACE_BLOCK */
private void opReplaceBlock(DataInputStream in) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.parseFrom(vintPrefixed(in));
  TraceScope traceScope = continueTraceSpan(proto.getHeader(),
      proto.getClass().getSimpleName());
  try {
    replaceBlock(PBHelper.convert(proto.getHeader().getBlock()),
        PBHelper.convertStorageType(proto.getStorageType()),
        PBHelper.convert(proto.getHeader().getToken()),
        proto.getDelHint(),
        PBHelper.convert(proto.getSource()));
  } finally {
    if (traceScope != null) traceScope.close();
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:Sender.java   
@Override
public void replaceBlock(final ExtendedBlock blk,
    final StorageType storageType, 
    final Token<BlockTokenIdentifier> blockToken,
    final String delHint,
    final DatanodeInfo source) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.newBuilder()
    .setHeader(DataTransferProtoUtil.buildBaseHeader(blk, blockToken))
    .setStorageType(PBHelper.convertStorageType(storageType))
    .setDelHint(delHint)
    .setSource(PBHelper.convertDatanodeInfo(source))
    .build();

  send(out, Op.REPLACE_BLOCK, proto);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:Receiver.java   
/** Receive OP_REPLACE_BLOCK */
private void opReplaceBlock(DataInputStream in) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.parseFrom(vintPrefixed(in));
  TraceScope traceScope = continueTraceSpan(proto.getHeader(),
      proto.getClass().getSimpleName());
  try {
    replaceBlock(PBHelper.convert(proto.getHeader().getBlock()),
        PBHelper.convertStorageType(proto.getStorageType()),
        PBHelper.convert(proto.getHeader().getToken()),
        proto.getDelHint(),
        PBHelper.convert(proto.getSource()));
  } finally {
    if (traceScope != null) traceScope.close();
  }
}
项目:hadoop-plus    文件:Sender.java   
@Override
public void replaceBlock(final ExtendedBlock blk,
    final Token<BlockTokenIdentifier> blockToken,
    final String delHint,
    final DatanodeInfo source) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.newBuilder()
    .setHeader(DataTransferProtoUtil.buildBaseHeader(blk, blockToken))
    .setDelHint(delHint)
    .setSource(PBHelper.convertDatanodeInfo(source))
    .build();

  send(out, Op.REPLACE_BLOCK, proto);
}
项目:hadoop-plus    文件:Receiver.java   
/** Receive OP_REPLACE_BLOCK */
private void opReplaceBlock(DataInputStream in) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.parseFrom(vintPrefixed(in));
  replaceBlock(PBHelper.convert(proto.getHeader().getBlock()),
      PBHelper.convert(proto.getHeader().getToken()),
      proto.getDelHint(),
      PBHelper.convert(proto.getSource()));
}
项目:FlexMap    文件:Sender.java   
@Override
public void replaceBlock(final ExtendedBlock blk,
    final StorageType storageType, 
    final Token<BlockTokenIdentifier> blockToken,
    final String delHint,
    final DatanodeInfo source) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.newBuilder()
    .setHeader(DataTransferProtoUtil.buildBaseHeader(blk, blockToken))
    .setStorageType(PBHelper.convertStorageType(storageType))
    .setDelHint(delHint)
    .setSource(PBHelper.convertDatanodeInfo(source))
    .build();

  send(out, Op.REPLACE_BLOCK, proto);
}
项目:FlexMap    文件:Receiver.java   
/** Receive OP_REPLACE_BLOCK */
private void opReplaceBlock(DataInputStream in) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.parseFrom(vintPrefixed(in));
  TraceScope traceScope = continueTraceSpan(proto.getHeader(),
      proto.getClass().getSimpleName());
  try {
    replaceBlock(PBHelper.convert(proto.getHeader().getBlock()),
        PBHelper.convertStorageType(proto.getStorageType()),
        PBHelper.convert(proto.getHeader().getToken()),
        proto.getDelHint(),
        PBHelper.convert(proto.getSource()));
  } finally {
    if (traceScope != null) traceScope.close();
  }
}
项目:hops    文件:Sender.java   
@Override
public void replaceBlock(final ExtendedBlock blk,
    final Token<BlockTokenIdentifier> blockToken, final String delHint,
    final DatanodeInfo source) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.newBuilder()
      .setHeader(DataTransferProtoUtil.buildBaseHeader(blk, blockToken))
      .setDelHint(delHint).setSource(PBHelper.convertDatanodeInfo(source))
      .build();

  send(out, Op.REPLACE_BLOCK, proto);
}
项目:hops    文件:Receiver.java   
/**
 * Receive OP_REPLACE_BLOCK
 */
private void opReplaceBlock(DataInputStream in) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.parseFrom(vintPrefixed(in));
  replaceBlock(PBHelper.convert(proto.getHeader().getBlock()),
      PBHelper.convert(proto.getHeader().getToken()), proto.getDelHint(),
      PBHelper.convert(proto.getSource()));
}
项目:hadoop-TCP    文件:Sender.java   
@Override
public void replaceBlock(final ExtendedBlock blk,
    final Token<BlockTokenIdentifier> blockToken,
    final String delHint,
    final DatanodeInfo source) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.newBuilder()
    .setHeader(DataTransferProtoUtil.buildBaseHeader(blk, blockToken))
    .setDelHint(delHint)
    .setSource(PBHelper.convertDatanodeInfo(source))
    .build();

  send(out, Op.REPLACE_BLOCK, proto);
}
项目:hadoop-TCP    文件:Receiver.java   
/** Receive OP_REPLACE_BLOCK */
private void opReplaceBlock(DataInputStream in) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.parseFrom(vintPrefixed(in));
  replaceBlock(PBHelper.convert(proto.getHeader().getBlock()),
      PBHelper.convert(proto.getHeader().getToken()),
      proto.getDelHint(),
      PBHelper.convert(proto.getSource()));
}
项目:hardfs    文件:Sender.java   
@Override
public void replaceBlock(final ExtendedBlock blk,
    final Token<BlockTokenIdentifier> blockToken,
    final String delHint,
    final DatanodeInfo source) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.newBuilder()
    .setHeader(DataTransferProtoUtil.buildBaseHeader(blk, blockToken))
    .setDelHint(delHint)
    .setSource(PBHelper.convertDatanodeInfo(source))
    .build();

  send(out, Op.REPLACE_BLOCK, proto);
}
项目:hardfs    文件:Receiver.java   
/** Receive OP_REPLACE_BLOCK */
private void opReplaceBlock(DataInputStream in) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.parseFrom(vintPrefixed(in));
  replaceBlock(PBHelper.convert(proto.getHeader().getBlock()),
      PBHelper.convert(proto.getHeader().getToken()),
      proto.getDelHint(),
      PBHelper.convert(proto.getSource()));
}
项目:hadoop-on-lustre2    文件:Sender.java   
@Override
public void replaceBlock(final ExtendedBlock blk,
    final Token<BlockTokenIdentifier> blockToken,
    final String delHint,
    final DatanodeInfo source) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.newBuilder()
    .setHeader(DataTransferProtoUtil.buildBaseHeader(blk, blockToken))
    .setDelHint(delHint)
    .setSource(PBHelper.convertDatanodeInfo(source))
    .build();

  send(out, Op.REPLACE_BLOCK, proto);
}
项目:hadoop-on-lustre2    文件:Receiver.java   
/** Receive OP_REPLACE_BLOCK */
private void opReplaceBlock(DataInputStream in) throws IOException {
  OpReplaceBlockProto proto = OpReplaceBlockProto.parseFrom(vintPrefixed(in));
  replaceBlock(PBHelper.convert(proto.getHeader().getBlock()),
      PBHelper.convert(proto.getHeader().getToken()),
      proto.getDelHint(),
      PBHelper.convert(proto.getSource()));
}