Java 类org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferTraceInfoProto 实例源码

项目:hadoop    文件:Sender.java   
@Override
public void releaseShortCircuitFds(SlotId slotId) throws IOException {
  ReleaseShortCircuitAccessRequestProto.Builder builder =
      ReleaseShortCircuitAccessRequestProto.newBuilder().
      setSlotId(PBHelper.convert(slotId));
  if (Trace.isTracing()) {
    Span s = Trace.currentSpan();
    builder.setTraceInfo(DataTransferTraceInfoProto.newBuilder()
        .setTraceId(s.getTraceId()).setParentId(s.getSpanId()));
  }
  ReleaseShortCircuitAccessRequestProto proto = builder.build();
  send(out, Op.RELEASE_SHORT_CIRCUIT_FDS, proto);
}
项目:hadoop    文件:Sender.java   
@Override
public void requestShortCircuitShm(String clientName) throws IOException {
  ShortCircuitShmRequestProto.Builder builder =
      ShortCircuitShmRequestProto.newBuilder().
      setClientName(clientName);
  if (Trace.isTracing()) {
    Span s = Trace.currentSpan();
    builder.setTraceInfo(DataTransferTraceInfoProto.newBuilder()
        .setTraceId(s.getTraceId()).setParentId(s.getSpanId()));
  }
  ShortCircuitShmRequestProto proto = builder.build();
  send(out, Op.REQUEST_SHORT_CIRCUIT_SHM, proto);
}
项目:hadoop    文件:DataTransferProtoUtil.java   
static BaseHeaderProto buildBaseHeader(ExtendedBlock blk,
    Token<BlockTokenIdentifier> blockToken) {
  BaseHeaderProto.Builder builder =  BaseHeaderProto.newBuilder()
    .setBlock(PBHelper.convert(blk))
    .setToken(PBHelper.convert(blockToken));
  if (Trace.isTracing()) {
    Span s = Trace.currentSpan();
    builder.setTraceInfo(DataTransferTraceInfoProto.newBuilder()
        .setTraceId(s.getTraceId())
        .setParentId(s.getSpanId()));
  }
  return builder.build();
}
项目:hadoop    文件:DataTransferProtoUtil.java   
public static TraceScope continueTraceSpan(DataTransferTraceInfoProto proto,
    String description) {
  TraceScope scope = null;
  TraceInfo info = fromProto(proto);
  if (info != null) {
    scope = Trace.startSpan(description, info);
  }
  return scope;
}
项目:aliyun-oss-hadoop-fs    文件:Sender.java   
@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);
}
项目:aliyun-oss-hadoop-fs    文件:Sender.java   
@Override
public void requestShortCircuitShm(String clientName) throws IOException {
  ShortCircuitShmRequestProto.Builder builder =
      ShortCircuitShmRequestProto.newBuilder().
          setClientName(clientName);
  SpanId spanId = Tracer.getCurrentSpanId();
  if (spanId.isValid()) {
    builder.setTraceInfo(DataTransferTraceInfoProto.newBuilder().
        setTraceId(spanId.getHigh()).
        setParentId(spanId.getLow()));
  }
  ShortCircuitShmRequestProto proto = builder.build();
  send(out, Op.REQUEST_SHORT_CIRCUIT_SHM, proto);
}
项目:aliyun-oss-hadoop-fs    文件:DataTransferProtoUtil.java   
static BaseHeaderProto buildBaseHeader(ExtendedBlock blk,
    Token<BlockTokenIdentifier> blockToken) {
  BaseHeaderProto.Builder builder =  BaseHeaderProto.newBuilder()
      .setBlock(PBHelperClient.convert(blk))
      .setToken(PBHelperClient.convert(blockToken));
  SpanId spanId = Tracer.getCurrentSpanId();
  if (spanId.isValid()) {
    builder.setTraceInfo(DataTransferTraceInfoProto.newBuilder()
        .setTraceId(spanId.getHigh())
        .setParentId(spanId.getLow()));
  }
  return builder.build();
}
项目:aliyun-oss-hadoop-fs    文件:DataTransferProtoUtil.java   
public static SpanId fromProto(DataTransferTraceInfoProto proto) {
  if ((proto != null) && proto.hasTraceId() &&
        proto.hasParentId()) {
    return new SpanId(proto.getTraceId(), proto.getParentId());
  }
  return null;
}
项目:aliyun-oss-hadoop-fs    文件:Receiver.java   
private TraceScope continueTraceSpan(DataTransferTraceInfoProto proto,
                                     String description) {
  TraceScope scope = null;
  SpanId spanId = fromProto(proto);
  if (spanId != null) {
    scope = tracer.newScope(description, spanId);
  }
  return scope;
}
项目:big-c    文件:Sender.java   
@Override
public void releaseShortCircuitFds(SlotId slotId) throws IOException {
  ReleaseShortCircuitAccessRequestProto.Builder builder =
      ReleaseShortCircuitAccessRequestProto.newBuilder().
      setSlotId(PBHelper.convert(slotId));
  if (Trace.isTracing()) {
    Span s = Trace.currentSpan();
    builder.setTraceInfo(DataTransferTraceInfoProto.newBuilder()
        .setTraceId(s.getTraceId()).setParentId(s.getSpanId()));
  }
  ReleaseShortCircuitAccessRequestProto proto = builder.build();
  send(out, Op.RELEASE_SHORT_CIRCUIT_FDS, proto);
}
项目:big-c    文件:Sender.java   
@Override
public void requestShortCircuitShm(String clientName) throws IOException {
  ShortCircuitShmRequestProto.Builder builder =
      ShortCircuitShmRequestProto.newBuilder().
      setClientName(clientName);
  if (Trace.isTracing()) {
    Span s = Trace.currentSpan();
    builder.setTraceInfo(DataTransferTraceInfoProto.newBuilder()
        .setTraceId(s.getTraceId()).setParentId(s.getSpanId()));
  }
  ShortCircuitShmRequestProto proto = builder.build();
  send(out, Op.REQUEST_SHORT_CIRCUIT_SHM, proto);
}
项目:big-c    文件:DataTransferProtoUtil.java   
static BaseHeaderProto buildBaseHeader(ExtendedBlock blk,
    Token<BlockTokenIdentifier> blockToken) {
  BaseHeaderProto.Builder builder =  BaseHeaderProto.newBuilder()
    .setBlock(PBHelper.convert(blk))
    .setToken(PBHelper.convert(blockToken));
  if (Trace.isTracing()) {
    Span s = Trace.currentSpan();
    builder.setTraceInfo(DataTransferTraceInfoProto.newBuilder()
        .setTraceId(s.getTraceId())
        .setParentId(s.getSpanId()));
  }
  return builder.build();
}
项目:big-c    文件:DataTransferProtoUtil.java   
public static TraceScope continueTraceSpan(DataTransferTraceInfoProto proto,
    String description) {
  TraceScope scope = null;
  TraceInfo info = fromProto(proto);
  if (info != null) {
    scope = Trace.startSpan(description, info);
  }
  return scope;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:Sender.java   
@Override
public void releaseShortCircuitFds(SlotId slotId) throws IOException {
  ReleaseShortCircuitAccessRequestProto.Builder builder =
      ReleaseShortCircuitAccessRequestProto.newBuilder().
      setSlotId(PBHelper.convert(slotId));
  if (Trace.isTracing()) {
    Span s = Trace.currentSpan();
    builder.setTraceInfo(DataTransferTraceInfoProto.newBuilder()
        .setTraceId(s.getTraceId()).setParentId(s.getSpanId()));
  }
  ReleaseShortCircuitAccessRequestProto proto = builder.build();
  send(out, Op.RELEASE_SHORT_CIRCUIT_FDS, proto);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:Sender.java   
@Override
public void requestShortCircuitShm(String clientName) throws IOException {
  ShortCircuitShmRequestProto.Builder builder =
      ShortCircuitShmRequestProto.newBuilder().
      setClientName(clientName);
  if (Trace.isTracing()) {
    Span s = Trace.currentSpan();
    builder.setTraceInfo(DataTransferTraceInfoProto.newBuilder()
        .setTraceId(s.getTraceId()).setParentId(s.getSpanId()));
  }
  ShortCircuitShmRequestProto proto = builder.build();
  send(out, Op.REQUEST_SHORT_CIRCUIT_SHM, proto);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:DataTransferProtoUtil.java   
static BaseHeaderProto buildBaseHeader(ExtendedBlock blk,
    Token<BlockTokenIdentifier> blockToken) {
  BaseHeaderProto.Builder builder =  BaseHeaderProto.newBuilder()
    .setBlock(PBHelper.convert(blk))
    .setToken(PBHelper.convert(blockToken));
  if (Trace.isTracing()) {
    Span s = Trace.currentSpan();
    builder.setTraceInfo(DataTransferTraceInfoProto.newBuilder()
        .setTraceId(s.getTraceId())
        .setParentId(s.getSpanId()));
  }
  return builder.build();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:DataTransferProtoUtil.java   
public static TraceScope continueTraceSpan(DataTransferTraceInfoProto proto,
    String description) {
  TraceScope scope = null;
  TraceInfo info = fromProto(proto);
  if (info != null) {
    scope = Trace.startSpan(description, info);
  }
  return scope;
}
项目:FlexMap    文件:Sender.java   
@Override
public void releaseShortCircuitFds(SlotId slotId) throws IOException {
  ReleaseShortCircuitAccessRequestProto.Builder builder =
      ReleaseShortCircuitAccessRequestProto.newBuilder().
      setSlotId(PBHelper.convert(slotId));
  if (Trace.isTracing()) {
    Span s = Trace.currentSpan();
    builder.setTraceInfo(DataTransferTraceInfoProto.newBuilder()
        .setTraceId(s.getTraceId()).setParentId(s.getSpanId()));
  }
  ReleaseShortCircuitAccessRequestProto proto = builder.build();
  send(out, Op.RELEASE_SHORT_CIRCUIT_FDS, proto);
}
项目:FlexMap    文件:Sender.java   
@Override
public void requestShortCircuitShm(String clientName) throws IOException {
  ShortCircuitShmRequestProto.Builder builder =
      ShortCircuitShmRequestProto.newBuilder().
      setClientName(clientName);
  if (Trace.isTracing()) {
    Span s = Trace.currentSpan();
    builder.setTraceInfo(DataTransferTraceInfoProto.newBuilder()
        .setTraceId(s.getTraceId()).setParentId(s.getSpanId()));
  }
  ShortCircuitShmRequestProto proto = builder.build();
  send(out, Op.REQUEST_SHORT_CIRCUIT_SHM, proto);
}
项目:FlexMap    文件:DataTransferProtoUtil.java   
static BaseHeaderProto buildBaseHeader(ExtendedBlock blk,
    Token<BlockTokenIdentifier> blockToken) {
  BaseHeaderProto.Builder builder =  BaseHeaderProto.newBuilder()
    .setBlock(PBHelper.convert(blk))
    .setToken(PBHelper.convert(blockToken));
  if (Trace.isTracing()) {
    Span s = Trace.currentSpan();
    builder.setTraceInfo(DataTransferTraceInfoProto.newBuilder()
        .setTraceId(s.getTraceId())
        .setParentId(s.getSpanId()));
  }
  return builder.build();
}
项目:FlexMap    文件:DataTransferProtoUtil.java   
public static TraceScope continueTraceSpan(DataTransferTraceInfoProto proto,
    String description) {
  TraceScope scope = null;
  TraceInfo info = fromProto(proto);
  if (info != null) {
    scope = Trace.startSpan(description, info);
  }
  return scope;
}
项目:hadoop    文件:DataTransferProtoUtil.java   
public static TraceInfo fromProto(DataTransferTraceInfoProto proto) {
  if (proto == null) return null;
  if (!proto.hasTraceId()) return null;
  return new TraceInfo(proto.getTraceId(), proto.getParentId());
}
项目:big-c    文件:DataTransferProtoUtil.java   
public static TraceInfo fromProto(DataTransferTraceInfoProto proto) {
  if (proto == null) return null;
  if (!proto.hasTraceId()) return null;
  return new TraceInfo(proto.getTraceId(), proto.getParentId());
}
项目:hadoop-2.6.0-cdh5.4.3    文件:DataTransferProtoUtil.java   
public static TraceInfo fromProto(DataTransferTraceInfoProto proto) {
  if (proto == null) return null;
  if (!proto.hasTraceId()) return null;
  return new TraceInfo(proto.getTraceId(), proto.getParentId());
}
项目:FlexMap    文件:DataTransferProtoUtil.java   
public static TraceInfo fromProto(DataTransferTraceInfoProto proto) {
  if (proto == null) return null;
  if (!proto.hasTraceId()) return null;
  return new TraceInfo(proto.getTraceId(), proto.getParentId());
}