org.apache.eagle.jpm.util.Utils.sleep()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(269)

本文整理了Java中org.apache.eagle.jpm.util.Utils.sleep()方法的一些代码示例,展示了Utils.sleep()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.sleep()方法的具体详情如下:
包路径:org.apache.eagle.jpm.util.Utils
类名称:Utils
方法名:sleep

Utils.sleep介绍

暂无

代码示例

代码示例来源:origin: apache/eagle

@Override
public void ack(Object messageId) {
  //remove from processStartTime, if size == 0, then update lastUpdateTime
  Long startTime = (Long)messageId;
  if (LOG.isDebugEnabled()) {
    LOG.debug("succeed startTime {}", startTime);
  }
  this.processStartTime.remove(startTime);
  if (this.processStartTime.size() == 0) {
    while (true) {
      try {
        LOG.info("all have finished, update lastUpdateTime to {}", this.lastUpdateTime + MAX_SAFE_TIME);
        AggregationTimeManager.instance().updateLastFinishTime(this.lastUpdateTime + MAX_SAFE_TIME);
        break;
      } catch (Exception e) {
        Utils.sleep(3);
      }
    }
  }
}

代码示例来源:origin: apache/eagle

@Override
public void nextTuple() {
  LOG.info("start to fetch job list");
  try {
    List<AppInfo> apps = rmResourceFetcher.getResource(Constants.ResourceType.RUNNING_MR_JOB);
    if (apps == null) {
      apps = new ArrayList<>();
    }
    handleApps(apps, true);
    long fetchTime = Calendar.getInstance().getTimeInMillis();
    if (fetchTime - this.lastFinishAppTime > 60000L) {
      apps = rmResourceFetcher.getResource(Constants.ResourceType.COMPLETE_MR_JOB, Long.toString(this.lastFinishAppTime));
      if (apps == null) {
        apps = new ArrayList<>();
      }
      handleApps(apps, false);
      this.lastFinishAppTime = fetchTime;
      this.runningJobManager.updateLastFinishTime(partitionId, fetchTime);
    }
  } catch (Exception e) {
    LOG.warn("exception found {}", e);
  } finally {
    //need to be configured
    Utils.sleep(60);
  }
}

代码示例来源:origin: apache/eagle

@Override
public void nextTuple() {
  Utils.sleep(5);
  if (LOG.isDebugEnabled()) {
    LOG.debug("start to run");

代码示例来源:origin: apache/eagle

LOG.error("An fetal exception is caught: {}", e.getMessage(), e);
} finally {
  Utils.sleep(endpointConfig.fetchRunningJobInterval);

相关文章