use of org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.OpBlockChecksumProto in project hadoop by apache.
the class Receiver method opBlockChecksum.
/** Receive OP_BLOCK_CHECKSUM */
private void opBlockChecksum(DataInputStream in) throws IOException {
OpBlockChecksumProto proto = OpBlockChecksumProto.parseFrom(vintPrefixed(in));
TraceScope traceScope = continueTraceSpan(proto.getHeader(), proto.getClass().getSimpleName());
try {
blockChecksum(PBHelperClient.convert(proto.getHeader().getBlock()), PBHelperClient.convert(proto.getHeader().getToken()));
} finally {
if (traceScope != null)
traceScope.close();
}
}
use of org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.OpBlockChecksumProto in project hadoop by apache.
the class Sender method blockChecksum.
@Override
public void blockChecksum(final ExtendedBlock blk, final Token<BlockTokenIdentifier> blockToken) throws IOException {
OpBlockChecksumProto proto = OpBlockChecksumProto.newBuilder().setHeader(DataTransferProtoUtil.buildBaseHeader(blk, blockToken)).build();
send(out, Op.BLOCK_CHECKSUM, proto);
}
Aggregations