org.apache.htrace.core.Tracer.curThreadTracer()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(161)

本文整理了Java中org.apache.htrace.core.Tracer.curThreadTracer()方法的一些代码示例,展示了Tracer.curThreadTracer()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tracer.curThreadTracer()方法的具体详情如下:
包路径:org.apache.htrace.core.Tracer
类名称:Tracer
方法名:curThreadTracer

Tracer.curThreadTracer介绍

暂无

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-common

LOG.debug("GroupCacheLoader - load.");
TraceScope scope = null;
Tracer tracer = Tracer.curThreadTracer();
if (tracer != null) {
 scope = tracer.newScope("Groups#fetchGroupList");

代码示例来源:origin: org.apache.hadoop/hadoop-common

@Override
public Object invoke(Object proxy, Method method, Object[] args)
 throws Throwable {
 long startTime = 0;
 if (LOG.isDebugEnabled()) {
  startTime = Time.monotonicNow();
 }
 // if Tracing is on then start a new span for this rpc.
 // guard it in the if statement to make sure there isn't
 // any extra string manipulation.
 Tracer tracer = Tracer.curThreadTracer();
 TraceScope traceScope = null;
 if (tracer != null) {
  traceScope = tracer.newScope(RpcClientUtil.methodToTraceString(method));
 }
 ObjectWritable value;
 try {
  value = (ObjectWritable)
   client.call(RPC.RpcKind.RPC_WRITABLE, new Invocation(method, args),
    remoteId, fallbackToSimpleAuth);
 } finally {
  if (traceScope != null) traceScope.close();
 }
 if (LOG.isDebugEnabled()) {
  long callTime = Time.monotonicNow() - startTime;
  LOG.debug("Call: " + method.getName() + " " + callTime);
 }
 return value.get();
}

代码示例来源:origin: org.apache.hadoop/hadoop-common

Tracer tracer = Tracer.curThreadTracer();
TraceScope traceScope = null;
if (tracer != null) {

代码示例来源:origin: apache/hbase

SingleServerRequestRunnable runnable = createSingleServerRequest(
    multiAction, numAttempt, server, callsInProgress);
Tracer tracer = Tracer.curThreadTracer();

代码示例来源:origin: org.apache.hbase/hbase-client

SingleServerRequestRunnable runnable = createSingleServerRequest(
    multiAction, numAttempt, server, callsInProgress);
Tracer tracer = Tracer.curThreadTracer();

代码示例来源:origin: io.hops/hadoop-common

public List<String> load(String user) throws Exception {
 TraceScope scope = null;
 Tracer tracer = Tracer.curThreadTracer();
 if (tracer != null) {
  scope = tracer.newScope("Groups#fetchGroupList");

代码示例来源:origin: io.hops/hadoop-common

@Override
public Object invoke(Object proxy, Method method, Object[] args)
 throws Throwable {
 long startTime = 0;
 if (LOG.isDebugEnabled()) {
  startTime = Time.now();
 }
 // if Tracing is on then start a new span for this rpc.
 // guard it in the if statement to make sure there isn't
 // any extra string manipulation.
 Tracer tracer = Tracer.curThreadTracer();
 TraceScope traceScope = null;
 if (tracer != null) {
  traceScope = tracer.newScope(RpcClientUtil.methodToTraceString(method));
 }
 ObjectWritable value;
 try {
  value = (ObjectWritable)
   client.call(RPC.RpcKind.RPC_WRITABLE, new Invocation(method, args),
    remoteId, fallbackToSimpleAuth);
 } finally {
  if (traceScope != null) traceScope.close();
 }
 if (LOG.isDebugEnabled()) {
  long callTime = Time.now() - startTime;
  LOG.debug("Call: " + method.getName() + " " + callTime);
 }
 return value.get();
}

代码示例来源:origin: io.hops/hadoop-common

Tracer tracer = Tracer.curThreadTracer();
TraceScope traceScope = null;
if (tracer != null) {

代码示例来源:origin: com.aliyun.hbase/alihbase-client

SingleServerRequestRunnable runnable = createSingleServerRequest(
    multiAction, numAttempt, server, callsInProgress);
Tracer tracer = Tracer.curThreadTracer();

相关文章