Search in sources :

Example 1 with OpBlockChecksumProto

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();
    }
}
Also used : OpBlockChecksumProto(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.OpBlockChecksumProto) TraceScope(org.apache.htrace.core.TraceScope)

Example 2 with OpBlockChecksumProto

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);
}
Also used : OpBlockChecksumProto(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.OpBlockChecksumProto)

Aggregations

OpBlockChecksumProto (org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.OpBlockChecksumProto)2 TraceScope (org.apache.htrace.core.TraceScope)1