Package org.apache.accumulo.trace.instrument

Examples of org.apache.accumulo.trace.instrument.Span.stop()


  public long isReady(long tid, T environment) throws Exception {
    Span span = Trace.trace(tinfo, repo.getDescription());
    try {
      return repo.isReady(tid, environment);
    } finally {
      span.stop();
    }
  }
 
  @Override
  public Repo<T> call(long tid, T environment) throws Exception {
View Full Code Here


      Repo<T> result = repo.call(tid, environment);
      if (result == null)
        return result;
      return new TraceRepo<T>(result);
    } finally {
      span.stop();
    }
  }
 
  @Override
  public void undo(long tid, T environment) throws Exception {
View Full Code Here

  public void undo(long tid, T environment) throws Exception {
    Span span = Trace.trace(tinfo, repo.getDescription());
    try {
      repo.undo(tid, environment);
    } finally {
      span.stop();
    }
  }
 
  @Override
  public String getDescription() {
View Full Code Here

        try {
          return method.invoke(instance, args);
        } catch (InvocationTargetException ex) {
          throw ex.getCause();
        } finally {
          span.stop();
        }
      }
    };
    return (T) Proxy.newProxyInstance(instance.getClass().getClassLoader(), instance.getClass().getInterfaces(), handler);
  }
View Full Code Here

        try {
          return method.invoke(instance, args);
        } catch (InvocationTargetException ex) {
          throw ex.getCause();
        } finally {
          span.stop();
        }
      }
    };
    return (T) Proxy.newProxyInstance(instance.getClass().getClassLoader(), instance.getClass().getInterfaces(), handler);
  }
View Full Code Here

    if (Trace.isTracing())
      span.data("path", f.toString());
    try {
      return impl.getFileStatus(f).isDir();
    } finally {
      span.stop();
    }
  }
 
  @Override
  public boolean isFile(Path f) throws IOException {
View Full Code Here

    if (Trace.isTracing())
      span.data("path", f.toString());
    try {
      return impl.isFile(f);
    } finally {
      span.stop();
    }
  }
 
  @SuppressWarnings("deprecation")
  @Override
View Full Code Here

    if (Trace.isTracing())
      span.data("path", f.toString());
    try {
      return impl.getLength(f);
    } finally {
      span.stop();
    }
  }
 
  @Override
  public ContentSummary getContentSummary(Path f) throws IOException {
View Full Code Here

    assertTrue(tracer.traces.get(traceId).size() == 1);
    assertEquals("shortest trace ever", tracer.traces.get(traceId).get(0).description);
   
    Span pause = Trace.start("pause");
    Thread.sleep(100);
    pause.stop();
    assertTrue(tracer.traces.get(traceId).size() == 2);
    assertTrue(tracer.traces.get(traceId).get(1).millis() >= 100);
   
    Thread t = new Thread(Trace.wrap(new Runnable() {
      @Override
View Full Code Here

    if (Trace.isTracing())
      span.data("path", f.toString());
    try {
      return impl.getContentSummary(f);
    } finally {
      span.stop();
    }
  }
 
  @Override
  public FileStatus[] listStatus(Path f, PathFilter filter) throws IOException {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.