/// <exception cref="System.IO.IOException"/> public override void RequestShortCircuitFds(ExtendedBlock blk, Org.Apache.Hadoop.Security.Token.Token <BlockTokenIdentifier> blockToken, ShortCircuitShm.SlotId slotId, int maxVersion , bool supportsReceiptVerification) { DataTransferProtos.OpRequestShortCircuitAccessProto.Builder builder = DataTransferProtos.OpRequestShortCircuitAccessProto .NewBuilder().SetHeader(DataTransferProtoUtil.BuildBaseHeader(blk, blockToken)). SetMaxVersion(maxVersion); if (slotId != null) { builder.SetSlotId(PBHelper.Convert(slotId)); } builder.SetSupportsReceiptVerification(supportsReceiptVerification); DataTransferProtos.OpRequestShortCircuitAccessProto proto = ((DataTransferProtos.OpRequestShortCircuitAccessProto )builder.Build()); Send(@out, OP.RequestShortCircuitFds, proto); }
/// <summary> /// Receive /// <see cref="OP.RequestShortCircuitFds"/> /// /// </summary> /// <exception cref="System.IO.IOException"/> private void OpRequestShortCircuitFds(DataInputStream @in) { DataTransferProtos.OpRequestShortCircuitAccessProto proto = DataTransferProtos.OpRequestShortCircuitAccessProto .ParseFrom(PBHelper.VintPrefixed(@in)); ShortCircuitShm.SlotId slotId = (proto.HasSlotId()) ? PBHelper.Convert(proto.GetSlotId ()) : null; TraceScope traceScope = DataTransferProtoUtil.ContinueTraceSpan(proto.GetHeader() , proto.GetType().Name); try { RequestShortCircuitFds(PBHelper.Convert(proto.GetHeader().GetBlock()), PBHelper.Convert (proto.GetHeader().GetToken()), slotId, proto.GetMaxVersion(), proto.GetSupportsReceiptVerification ()); } finally { if (traceScope != null) { traceScope.Close(); } } }