本文整理了Java中org.apache.eagle.jpm.util.Utils.sleep()
方法的一些代码示例,展示了Utils.sleep()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.sleep()
方法的具体详情如下:
包路径:org.apache.eagle.jpm.util.Utils
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!