Package org.apache.accumulo.cloudtrace.instrument

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


    }
    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++) {
View Full Code Here


    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

        }
       
      } finally {
        CompactionStats lgMajcStats = new CompactionStats(citr.getCount(), entriesCompacted);
        majCStats.add(lgMajcStats);
        write.stop();
      }
     
    } finally {
      // close sequence files opened
      for (FileSKVIterator reader : readers) {
View Full Code Here

          @Override
          public int compare(Pair<LogFileKey,LogFileValue> o1, Pair<LogFileKey,LogFileValue> o2) {
            return o1.getFirst().compareTo(o2.getFirst());
          }
        });
        span.stop();
        span = Trace.start("Logger write");
        span.data("logfile", dest.getName());
        MapFile.Writer writer = new MapFile.Writer(fs.getConf(), fs, path, LogFileKey.class, LogFileValue.class);
        short replication = (short) acuConf.getCount(Property.LOGGER_RECOVERY_FILE_REPLICATION);
        fs.setReplication(new Path(path + "/" + MapFile.DATA_FILE_NAME), replication);
View Full Code Here

        try {
          for (Pair<LogFileKey,LogFileValue> entry : kv)
            writer.append(entry.getFirst(), entry.getSecond());
        } finally {
          writer.close();
          span.stop();
        }
      }
     
      private void copyLog(final String localLog, final String fullyQualifiedFileName) throws IOException {
        Path dest = new Path(fullyQualifiedFileName + ".copy");
View Full Code Here

  public synchronized void seek(long desired) throws IOException {
    Span span = Trace.start("FSDataInputStream.seek");
    try {
      impl.seek(desired);
    } finally {
      span.stop();
    }
  }
 
  @Override
  public int read(long position, byte[] buffer, int offset, int length) throws IOException {
View Full Code Here

    if (Trace.isTracing())
      span.data("length", Integer.toString(length));
    try {
      return impl.read(position, buffer, offset, length);
    } finally {
      span.stop();
    }
  }
 
  @Override
  public void readFully(long position, byte[] buffer, int offset, int length) throws IOException {
View Full Code Here

    if (Trace.isTracing())
      span.data("length", Integer.toString(length));
    try {
      impl.readFully(position, buffer, offset, length);
    } finally {
      span.stop();
    }
  }
 
  @Override
  public void readFully(long position, byte[] buffer) throws IOException {
View Full Code Here

    if (Trace.isTracing())
      span.data("length", Integer.toString(buffer.length));
    try {
      impl.readFully(position, buffer);
    } finally {
      span.stop();
    }
  }
 
  @Override
  public boolean seekToNewSource(long targetPos) throws IOException {
View Full Code Here

  public boolean seekToNewSource(long targetPos) throws IOException {
    Span span = Trace.start("FSDataInputStream.seekToNewSource");
    try {
      return impl.seekToNewSource(targetPos);
    } finally {
      span.stop();
    }
  }
 
  private final FSDataInputStream impl;
 
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.