EtlEventData eventData = new EtlEventData();
eventData.setPipelineId(pipelineId);
eventData.setProcessId(processId);
eventData.setStartTime(new Date().getTime());// 返回当前时间
Node node = LoadBalanceFactory.getNextExtractNode(pipelineId);// 获取下一个处理节点信息
if (node == null) {// 没有后端节点
// TerminEventData termin = new TerminEventData();
// termin.setPipelineId(pipelineId);
// termin.setType(TerminType.ROLLBACK);
// termin.setCode("no_node");
// termin.setDesc(MessageFormat.format("pipeline[{}] extract stage has no node!", pipelineId));
// terminEvent.single(termin);
throw new ArbitrateException("Select_single", "no next node");
} else {
eventData.setNextNid(node.getId());
markUsed(eventData); // 标记为已使用
return eventData;// 只有这一条路返回
}
} catch (ZkNoNodeException e) {
logger.error("pipeline[{}] processId[{}] is invalid , retry again", pipelineId, processId);