Package com.alibaba.otter.shared.arbitrate.exception

Examples of com.alibaba.otter.shared.arbitrate.exception.ArbitrateException


        } catch (ZkNoNodeException e) {
            logger.error("pipeline[{}] processId[{}] is process", pipelineId, processId);
            terminMonitor.ack(processId); // modify for 2012-09-08, 发生主备切换时,await会进入死循环,针对NoNode后直接从内存队列中移除
            return await(pipelineId); // 再取下一个节点
        } catch (ZkException e) {
            throw new ArbitrateException("Termin_await", e);
        }
    }
View Full Code Here


                data.setPipelineId(pipelineId);
                data.setProcessId(processId);
                ack(data);
            }
        } catch (InterruptedException e) {
            throw new ArbitrateException(e);
        }
    }
View Full Code Here

        try {
            zookeeper.delete(path);
        } catch (ZkNoNodeException e) {
            // ignore,说明节点已经被删除
        } catch (ZkException e) {
            throw new ArbitrateException("Termin_ack", e);
        }

        TerminMonitor terminMonitor = ArbitrateFactory.getInstance(data.getPipelineId(), TerminMonitor.class);
        terminMonitor.ack(data.getProcessId());
    }
View Full Code Here

                    // 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("Extract_single", "no next node");
                } else {
                    eventData.setNextNid(node.getId());
                    return eventData;// 只有这一条路返回
                }
            } catch (ZkNoNodeException e) {
                logger.error("pipeline[{}] processId[{}] is invalid , retry again", pipelineId, processId);
                return await(pipelineId);// /出现节点不存在,说明出现了error情况,递归调用重新获取一次
            } catch (ZkException e) {
                throw new ArbitrateException("Extract_await", e.getMessage(), e);
            }
        } else {
            logger.warn("pipelineId[{}] extract ignore processId[{}] by status[{}]", new Object[] { pipelineId,
                    processId, status });
            return await(pipelineId);// 递归调用
View Full Code Here

            logger.warn("pipelineId[{}] extract ignore processId[{}] single by data:{}",
                        new Object[] { data.getPipelineId(), data.getProcessId(), data });
        } catch (ZkInterruptedException e) {
            // ignore
        } catch (ZkException e) {
            throw new ArbitrateException("Extract_single", e.getMessage(), e);
        }
    }
View Full Code Here

            Collections.sort(currentStages, new StageComparator());
        } catch (ZkNoNodeException e) {
            // ignore,说明节点已经被删除了
            return false;
        } catch (ZkException e) {
            throw new ArbitrateException("Termin_process", e);
        }

        // 按顺序删除对应的S.E.T.L节点
        // s节点
        if (currentStages == null || currentStages.contains(ArbitrateConstants.NODE_SELECTED)) {
            try {
                boolean successed = zookeeper.delete(StagePathUtils.getSelectStage(pipelineId, processId));
                if (!successed) {
                    processDeleteFailed();
                }
            } catch (ZkException e) {
                throw new ArbitrateException("Termin_process", e);
            }
        }

        // e节点
        if (currentStages == null || currentStages.contains(ArbitrateConstants.NODE_EXTRACTED)) {
            try {
                boolean successed = zookeeper.delete(StagePathUtils.getExtractStage(pipelineId, processId));
                if (!successed) {
                    processDeleteFailed();
                }
            } catch (ZkException e) {
                throw new ArbitrateException("Termin_process", e);
            }
        }

        // t节点
        if (currentStages == null || currentStages.contains(ArbitrateConstants.NODE_TRANSFORMED)) {
            try {
                boolean successed = zookeeper.delete(StagePathUtils.getTransformStage(pipelineId, processId));
                if (!successed) {
                    processDeleteFailed();
                }
            } catch (ZkException e) {
                throw new ArbitrateException("Termin_process", e);
            }
        }
        // l节点
        // try {
        // zookeeper.delete(StagePathUtils.getLoadStage(pipelineId, processId), -1, new VoidCallback() {
View Full Code Here

            zookeeper.create(path, bytes, CreateMode.PERSISTENT);
        } catch (ZkNodeExistsException e) {
            // ignore
            return false;
        } catch (ZkException e) {
            throw new ArbitrateException("Termin_single", e);
        }

        return true;
    }
View Full Code Here

                return false;
            }
            processChain(data);
            return true;
        } catch (KeeperException e) {
            throw new ArbitrateException("Termin_process", e);
        } finally {
            try {
                lock.unlock();// 马上进行释放
            } catch (KeeperException e1) {
                // ignore
View Full Code Here

                processChain(data); // 处理异常信息
                break;
            }

        } catch (ZkException e) {
            throw new ArbitrateException("Termin_process", e);
        }
    }
View Full Code Here

            }
        } catch (ZkNoNodeException e) {
            // ignore
        } catch (ZkException e) {
            throw new ArbitrateException("releaseMainStem", pipelineId.toString(), e);
        }
    }
View Full Code Here

TOP

Related Classes of com.alibaba.otter.shared.arbitrate.exception.ArbitrateException

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.