Examples of Tracer


Examples of org.fusesource.mqtt.client.Tracer

        // shut off connect retry
        return mqtt;
    }

    protected Tracer createTracer() {
        return new Tracer(){
            @Override
            public void onReceive(MQTTFrame frame) {
                LOG.info("Client Received:\n"+frame);
            }
View Full Code Here

Examples of org.honu.util.Tracer

  /**
   *  Best effort, there's no guarantee that chunks
   *  have really been written to disk
   */
  public CommitStatus add(List<Chunk> chunks) throws WriterException {
    Tracer t = Tracer.startNewTracer("honu.server." + group +".addToList");
    long now = System.currentTimeMillis();
    if (chunks != null) {
      try {
        chunksWrittenThisRotate = true;
        ChukwaArchiveKey archiveKey = new ChukwaArchiveKey();

        for (Chunk chunk : chunks) {
          archiveKey.setTimePartition(timePeriod);
          archiveKey.setDataType(chunk.getDataType());
          archiveKey.setStreamName(chunk.getTags() + "/" + chunk.getSource()
              + "/" + chunk.getStreamName());
          archiveKey.setSeqId(chunk.getSeqID());

          if (chunk != null) {
            seqFileWriter.append(archiveKey, chunk);
            // compute size for stats
            dataSize += chunk.getData().length;
          }
        }
       
        long end = System.currentTimeMillis();
        if (log.isDebugEnabled()) {
          log.debug(group+"- duration=" + (end-now) + " size=" + chunks.size());
        }

      } catch (IOException e) {
        if (t!= null) {
          t.stopAndLogTracer();
        }
       
        writeChunkRetries--;
        log.error(group +"- Could not save the chunk. ", e);

        if (writeChunkRetries < 0) {
          log
          .fatal(group +"- Too many IOException when trying to write a chunk, Collector is going to exit!");
          DaemonWatcher.bailout(-1);
        }
        throw new WriterException(e);
      }
    }
 
    if (t!= null) {
      t.stopAndLogTracer();
    }
    
    return COMMIT_OK;
  }
View Full Code Here

Examples of org.jtester.annotations.Tracer

    // @AutoInject生效时:@SpringBeanByName 和 @SpringBeanByType bean注册
    RegisterDynamicBean.dynamicRegisterBeanDefinition(beanFactory, testedClazz);

    // 是否定义bean输入输出跟踪日志
    boolean traceSpringBean = TracerModuleHelper.traceSpringBean();
    Tracer tracer = AnnotationUtils.getClassLevelAnnotation(Tracer.class, testedClazz);
    if ((tracer == null && traceSpringBean) || (tracer != null && tracer.spring())) {
      SpringModuleHelper.addTracerBeanDefinition(beanFactory);
    }
    return beanFactory;
  }
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.