Search in sources :

Example 1 with StripedBlockInfo

use of org.apache.hadoop.hdfs.protocol.StripedBlockInfo in project hadoop by apache.

the class Receiver method opStripedBlockChecksum.

/** Receive OP_STRIPED_BLOCK_CHECKSUM. */
private void opStripedBlockChecksum(DataInputStream dis) throws IOException {
    OpBlockGroupChecksumProto proto = OpBlockGroupChecksumProto.parseFrom(vintPrefixed(dis));
    TraceScope traceScope = continueTraceSpan(proto.getHeader(), proto.getClass().getSimpleName());
    StripedBlockInfo stripedBlockInfo = new StripedBlockInfo(PBHelperClient.convert(proto.getHeader().getBlock()), PBHelperClient.convert(proto.getDatanodes()), PBHelperClient.convertTokens(proto.getBlockTokensList()), PBHelperClient.convertBlockIndices(proto.getBlockIndicesList()), PBHelperClient.convertErasureCodingPolicy(proto.getEcPolicy()));
    try {
        blockGroupChecksum(stripedBlockInfo, PBHelperClient.convert(proto.getHeader().getToken()), proto.getRequestedNumBytes());
    } finally {
        if (traceScope != null) {
            traceScope.close();
        }
    }
}
Also used : OpBlockGroupChecksumProto(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.OpBlockGroupChecksumProto) TraceScope(org.apache.htrace.core.TraceScope) StripedBlockInfo(org.apache.hadoop.hdfs.protocol.StripedBlockInfo)

Aggregations

StripedBlockInfo (org.apache.hadoop.hdfs.protocol.StripedBlockInfo)1 OpBlockGroupChecksumProto (org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.OpBlockGroupChecksumProto)1 TraceScope (org.apache.htrace.core.TraceScope)1