if (span != null) { result.setTraceInfo(RPCTraceInfoProto.newBuilder() .setTraceId(span.getSpanId().getHigh()) .setParentId(span.getSpanId().getLow()) .build());
public static RpcRequestHeaderProto makeRpcRequestHeader(RPC.RpcKind rpcKind, RpcRequestHeaderProto.OperationProto operation, int callId, int retryCount, byte[] uuid) { RpcRequestHeaderProto.Builder result = RpcRequestHeaderProto.newBuilder(); result.setRpcKind(convert(rpcKind)).setRpcOp(operation).setCallId(callId) .setRetryCount(retryCount).setClientId(ByteString.copyFrom(uuid)); // Add tracing info if we are currently tracing. if (Trace.isTracing()) { Span s = Trace.currentSpan(); result.setTraceInfo(RPCTraceInfoProto.newBuilder() .setParentId(s.getSpanId()) .setTraceId(s.getTraceId()).build()); } return result.build(); } }
public static RpcRequestHeaderProto makeRpcRequestHeader(RPC.RpcKind rpcKind, RpcRequestHeaderProto.OperationProto operation, int callId, int retryCount, byte[] uuid) { RpcRequestHeaderProto.Builder result = RpcRequestHeaderProto.newBuilder(); result.setRpcKind(convert(rpcKind)).setRpcOp(operation).setCallId(callId) .setRetryCount(retryCount).setClientId(ByteString.copyFrom(uuid)); // Add tracing info if we are currently tracing. if (Trace.isTracing()) { Span s = Trace.currentSpan(); result.setTraceInfo(RPCTraceInfoProto.newBuilder() .setParentId(s.getSpanId()) .setTraceId(s.getTraceId()).build()); } return result.build(); } }
if (span != null) { result.setTraceInfo(RPCTraceInfoProto.newBuilder() .setTraceId(span.getSpanId().getHigh()) .setParentId(span.getSpanId().getLow()) .build());
public static RpcRequestHeaderProto makeRpcRequestHeader(RPC.RpcKind rpcKind, RpcRequestHeaderProto.OperationProto operation, int callId, int retryCount, byte[] uuid) { RpcRequestHeaderProto.Builder result = RpcRequestHeaderProto.newBuilder(); result.setRpcKind(convert(rpcKind)).setRpcOp(operation).setCallId(callId) .setRetryCount(retryCount).setClientId(ByteString.copyFrom(uuid)); // Add tracing info if we are currently tracing. if (Trace.isTracing()) { Span s = Trace.currentSpan(); result.setTraceInfo(RPCTraceInfoProto.newBuilder() .setParentId(s.getSpanId()) .setTraceId(s.getTraceId()).build()); } return result.build(); } }
public Builder mergeFrom(org.apache.hadoop.ipc.protobuf.RpcHeaderProtos.RPCTraceInfoProto other) { if (other == org.apache.hadoop.ipc.protobuf.RpcHeaderProtos.RPCTraceInfoProto.getDefaultInstance()) return this; if (other.hasTraceId()) { setTraceId(other.getTraceId()); } if (other.hasParentId()) { setParentId(other.getParentId()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.ipc.protobuf.RpcHeaderProtos.RPCTraceInfoProto other) { if (other == org.apache.hadoop.ipc.protobuf.RpcHeaderProtos.RPCTraceInfoProto.getDefaultInstance()) return this; if (other.hasTraceId()) { setTraceId(other.getTraceId()); } if (other.hasParentId()) { setParentId(other.getParentId()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.ipc.protobuf.RpcHeaderProtos.RPCTraceInfoProto other) { if (other == org.apache.hadoop.ipc.protobuf.RpcHeaderProtos.RPCTraceInfoProto.getDefaultInstance()) return this; if (other.hasTraceId()) { setTraceId(other.getTraceId()); } if (other.hasParentId()) { setParentId(other.getParentId()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.ipc.protobuf.RpcHeaderProtos.RPCTraceInfoProto other) { if (other == org.apache.hadoop.ipc.protobuf.RpcHeaderProtos.RPCTraceInfoProto.getDefaultInstance()) return this; if (other.hasTraceId()) { setTraceId(other.getTraceId()); } if (other.hasParentId()) { setParentId(other.getParentId()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.ipc.protobuf.RpcHeaderProtos.RPCTraceInfoProto other) { if (other == org.apache.hadoop.ipc.protobuf.RpcHeaderProtos.RPCTraceInfoProto.getDefaultInstance()) return this; if (other.hasTraceId()) { setTraceId(other.getTraceId()); } if (other.hasParentId()) { setParentId(other.getParentId()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }