Search in sources :

Example 41 with ZkException

use of org.I0Itec.zkclient.exception.ZkException in project otter by alibaba.

the class ToolArbitrateEvent method single.

/**
 * 提供数据接口更新对应的pipeline上的状态
 */
public void single(SyncStatusEventData syncStatus) {
    String path = StagePathUtils.getPipeline(syncStatus.getPipelineId());
    try {
        byte[] bytes = JsonUtils.marshalToByte(syncStatus);
        zookeeper.writeData(path, bytes);
        logger.info("## single status : " + syncStatus);
    } catch (ZkException e) {
        throw new ArbitrateException("single_SyncStatus", syncStatus.getPipelineId().toString(), e);
    }
}
Also used : ZkException(org.I0Itec.zkclient.exception.ZkException) ArbitrateException(com.alibaba.otter.shared.arbitrate.exception.ArbitrateException)

Aggregations

ZkException (org.I0Itec.zkclient.exception.ZkException)41 ArbitrateException (com.alibaba.otter.shared.arbitrate.exception.ArbitrateException)27 ZkNoNodeException (org.I0Itec.zkclient.exception.ZkNoNodeException)22 PermitMonitor (com.alibaba.otter.shared.arbitrate.impl.setl.monitor.PermitMonitor)7 EtlEventData (com.alibaba.otter.shared.arbitrate.model.EtlEventData)7 ZkNodeExistsException (org.I0Itec.zkclient.exception.ZkNodeExistsException)7 MainStemEventData (com.alibaba.otter.shared.arbitrate.model.MainStemEventData)5 ProcessNodeEventData (com.alibaba.otter.shared.arbitrate.model.ProcessNodeEventData)5 ChannelStatus (com.alibaba.otter.shared.common.model.config.channel.ChannelStatus)5 IOException (java.io.IOException)4 Node (com.alibaba.otter.shared.common.model.config.node.Node)3 ArrayList (java.util.ArrayList)3 ZkInterruptedException (org.I0Itec.zkclient.exception.ZkInterruptedException)3 TerminMonitor (com.alibaba.otter.shared.arbitrate.impl.setl.monitor.TerminMonitor)2 InetSocketAddress (java.net.InetSocketAddress)2 Date (java.util.Date)2 List (java.util.List)2 Lock (java.util.concurrent.locks.Lock)2 ReentrantLock (java.util.concurrent.locks.ReentrantLock)2 ZkBadVersionException (org.I0Itec.zkclient.exception.ZkBadVersionException)2