Search in sources :

Example 1 with ReleaseShortCircuitAccessRequestProto

use of org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ReleaseShortCircuitAccessRequestProto in project hadoop by apache.

the class Sender method releaseShortCircuitFds.

@Override
public void releaseShortCircuitFds(SlotId slotId) throws IOException {
    ReleaseShortCircuitAccessRequestProto.Builder builder = ReleaseShortCircuitAccessRequestProto.newBuilder().setSlotId(PBHelperClient.convert(slotId));
    SpanId spanId = Tracer.getCurrentSpanId();
    if (spanId.isValid()) {
        builder.setTraceInfo(DataTransferTraceInfoProto.newBuilder().setTraceId(spanId.getHigh()).setParentId(spanId.getLow()));
    }
    ReleaseShortCircuitAccessRequestProto proto = builder.build();
    send(out, Op.RELEASE_SHORT_CIRCUIT_FDS, proto);
}
Also used : ReleaseShortCircuitAccessRequestProto(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ReleaseShortCircuitAccessRequestProto) SpanId(org.apache.htrace.core.SpanId)

Example 2 with ReleaseShortCircuitAccessRequestProto

use of org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ReleaseShortCircuitAccessRequestProto in project hadoop by apache.

the class Receiver method opReleaseShortCircuitFds.

/** Receive {@link Op#RELEASE_SHORT_CIRCUIT_FDS} */
private void opReleaseShortCircuitFds(DataInputStream in) throws IOException {
    final ReleaseShortCircuitAccessRequestProto proto = ReleaseShortCircuitAccessRequestProto.parseFrom(vintPrefixed(in));
    TraceScope traceScope = continueTraceSpan(proto.getTraceInfo(), proto.getClass().getSimpleName());
    try {
        releaseShortCircuitFds(PBHelperClient.convert(proto.getSlotId()));
    } finally {
        if (traceScope != null)
            traceScope.close();
    }
}
Also used : TraceScope(org.apache.htrace.core.TraceScope) ReleaseShortCircuitAccessRequestProto(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ReleaseShortCircuitAccessRequestProto)

Aggregations

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