Package com.alibaba.jstorm.utils

Examples of com.alibaba.jstorm.utils.IntervalCheck


  }

  void waitChannelReady(long cachedSize, long sleepMs) {
    long begin = System.currentTimeMillis();
    boolean changeThreadhold = false;
    IntervalCheck oneSecond = new IntervalCheck();
    IntervalCheck timeoutIntervalCheck = new IntervalCheck();
    timeoutIntervalCheck.setInterval(timeoutSecond);
    while (isChannelReady() == null) {

      long now = System.currentTimeMillis();
      long delt = now - begin;
      if (oneSecond.check() == true) {
        LOG.warn(
            "Target server  {} is unavailable, pending {}, bufferSize {}, block sending {}ms",
            name, pendings.get(), cachedSize, delt);
      }

      if (timeoutIntervalCheck.check() == true) {
        if (messageBatchRef.get() != null) {
          LOG.warn(
              "Target server  {} is unavailable, wait too much time, throw timeout message",
              name);
          messageBatchRef.set(null);
View Full Code Here


  private Set<Integer> lastLocalNodeTasks;

  public MkLocalFirst(List<Integer> workerTasks, List<Integer> allOutTasks,
      WorkerData workerData) {

    intervalCheck = new IntervalCheck();
    intervalCheck.setInterval(60);

    this.allOutTasks = allOutTasks;
    this.workerData = workerData;
View Full Code Here

    batchQueue = new LinkedBlockingQueue<BatchSpoutMsgId>();
    this.collector = collector;
    this.conf = conf;
    taskName = context.getThisComponentId() + "_" + context.getThisTaskId();
   
    intervalCheck = new IntervalCheck();

    try {
      zkClient = BatchCommon.getZkClient(conf);

      initMsgId();
View Full Code Here

TOP

Related Classes of com.alibaba.jstorm.utils.IntervalCheck

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.