Package org.apache.accumulo.trace.instrument

Examples of org.apache.accumulo.trace.instrument.Span


    }
  }
 
  @Override
  public long getUsed() throws IOException {
    Span span = Trace.start("getUsed");
    try {
      return impl.getUsed();
    } finally {
      span.stop();
    }
  }
View Full Code Here


      Long x = new Long(i);
    }
    System.out.println(String.format("Trivial took %d millis", System.currentTimeMillis() - now));
    now = System.currentTimeMillis();
    for (long i = 0; i < 1000 * 1000; i++) {
      Span s = Trace.start("perf");
      s.stop();
    }
    System.out.println(String.format("Span Loop took %d millis", System.currentTimeMillis() - now));
    now = System.currentTimeMillis();
    Trace.on("test");
    for (long i = 0; i < 1000 * 1000; i++) {
      Span s = Trace.start("perf");
      s.stop();
    }
    Trace.off();
    System.out.println(String.format("Trace took %d millis", System.currentTimeMillis() - now));
  }
View Full Code Here

  }
 
  @SuppressWarnings("deprecation")
  @Override
  public long getBlockSize(Path f) throws IOException {
    Span span = Trace.start("getBlockSize");
    if (Trace.isTracing()) {
      span.data("path", f.toString());
    }
    try {
      return impl.getBlockSize(f);
    } finally {
      span.stop();
    }
  }
View Full Code Here

    }
  }
 
  @Override
  public long getDefaultBlockSize() {
    Span span = Trace.start("getDefaultBlockSize");
    try {
      return impl.getDefaultBlockSize();
    } finally {
      span.stop();
    }
  }
View Full Code Here

    }
  }
 
  @Override
  public short getDefaultReplication() {
    Span span = Trace.start("getDefaultReplication");
    try {
      return impl.getDefaultReplication();
    } finally {
      span.stop();
    }
  }
View Full Code Here

    }
  }
 
  @Override
  public FileChecksum getFileChecksum(Path f) throws IOException {
    Span span = Trace.start("getFileChecksum");
    if (Trace.isTracing()) {
      span.data("path", f.toString());
    }
    try {
      return impl.getFileChecksum(f);
    } finally {
      span.stop();
    }
  }
View Full Code Here

    }
  }
 
  @Override
  public void setVerifyChecksum(boolean verifyChecksum) {
    Span span = Trace.start("setVerifyChecksum");
    try {
      impl.setVerifyChecksum(verifyChecksum);
    } finally {
      span.stop();
    }
  }
View Full Code Here

    }
  }
 
  @Override
  public void setPermission(Path p, FsPermission permission) throws IOException {
    Span span = Trace.start("setPermission");
    if (Trace.isTracing()) {
      span.data("path", p.toString());
    }
    try {
      impl.setPermission(p, permission);
    } finally {
      span.stop();
    }
  }
View Full Code Here

    }
  }
 
  @Override
  public void setOwner(Path p, String username, String groupname) throws IOException {
    Span span = Trace.start("setOwner");
    if (Trace.isTracing()) {
      span.data("path", p.toString());
      span.data("user", username);
      span.data("group", groupname);
    }
   
    try {
      impl.setOwner(p, username, groupname);
    } finally {
      span.stop();
    }
  }
View Full Code Here

    }
  }
 
  @Override
  public void setTimes(Path p, long mtime, long atime) throws IOException {
    Span span = Trace.start("setTimes");
    try {
      impl.setTimes(p, mtime, atime);
    } finally {
      span.stop();
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.trace.instrument.Span

Copyright © 2018 www.massapicom. 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.