if ((queueSizeMap != null) && (false == queueSizeMap.isEmpty())) {
Set<Long> key = queueSizeMap.keySet();
for (Iterator it = key.iterator(); it.hasNext();) {
Long pipelineId = (Long) it.next();
Channel channel = channelService.findByPipelineId(pipelineId);
// 判断channel状态,只有启动状态才进行判断超时时间
if (!channel.getStatus().isStop()) {
DelayStat delayStat = delayStatService.findRealtimeDelayStat(pipelineId);
logger.info("delayStat.getDelayNumber() == " + delayStat.getDelayNumber());
if (null != delayStat.getDelayNumber()
&& delayStat.getDelayNumber() >= queueSizeMap.get(pipelineId)) {
result = false;
}
}
}
}
if ((delayTimeMap != null) && (false == delayTimeMap.isEmpty())) {
Set<Long> key = delayTimeMap.keySet();
for (Iterator it = key.iterator(); it.hasNext();) {
Long pipelineId = (Long) it.next();
Channel channel = channelService.findByPipelineId(pipelineId);
// 判断channel状态,只有启动状态才进行判断超时时间
if (!channel.getStatus().isStop()) {
DelayStat delayStat = delayStatService.findRealtimeDelayStat(pipelineId);
logger.info("delayStat.getDelayTime() == " + delayStat.getDelayTime());
if (null != delayStat.getDelayTime() && delayStat.getDelayTime() >= delayTimeMap.get(pipelineId)) {
result = false;
}
}
}
}
if ((timeoutMap != null) && (false == timeoutMap.isEmpty())) {
Set<Long> key = timeoutMap.keySet();
for (Iterator it = key.iterator(); it.hasNext();) {
Long pipelineId = (Long) it.next();
Channel channel = channelService.findByPipelineId(pipelineId);
// 判断channel状态,只有启动状态才进行判断超时时间
if (!channel.getStatus().isStop()) {
ThroughputCondition condition = new ThroughputCondition();
condition.setPipelineId(pipelineId);
condition.setType(ThroughputType.ROW);
ThroughputStat throughputStat = throughputStatService.findThroughputStatByPipelineId(condition);