本文整理了Java中com.taobao.zeus.model.processer.ZooKeeperProcesser
类的一些代码示例,展示了ZooKeeperProcesser
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperProcesser
类的具体详情如下:
包路径:com.taobao.zeus.model.processer.ZooKeeperProcesser
类名称:ZooKeeperProcesser
[英]ZooKeeper 处理器 用于进行ZK通知
[中]动物园管理员处理器 用于进行ZK通知
代码示例来源:origin: ctripcorp/dataworks-zeus
@Override
public String getConfig() {
JSONObject o=new JSONObject();
o.put("host", getHost()==null?"":getHost());
o.put("path", getPath()==null?"":getPath());
o.put("useDefault", getUseDefault());
return o.toString();
}
代码示例来源:origin: ctripcorp/dataworks-zeus
@Override
public Integer run() throws Exception {
Integer exitCode=0;
try {
Boolean data=jobContext.getCoreExitCode()==0?true:false;
if(processer==null){
JSONObject content=new JSONObject();
content.put("id",getJobContext().getJobHistory().getJobId());
content.put("historyId", getJobContext().getJobHistory().getId());
content.put("status", jobContext.getCoreExitCode()==0?true:false);
content.put("time", new Date().getTime());
zkResultNotify.send(jobContext.getJobHistory().getId(), content.toString());
}else{
String host=processer.getHost();
String path=processer.getPath();
log("开始通知ZooKeeper host:"+host+",path:"+path);
zkResultNotify.send(host, path, data.toString());
log("ZooKeeper通知完成");
}
} catch (Exception e) {
exitCode=-1;
log("ZK通知发送失败");
log(e);
}
return exitCode;
}
代码示例来源:origin: michael8335/zeus2
} else if (p instanceof ZooKeeperProcesser) {
ZooKeeperProcesser zkp = (ZooKeeperProcesser) p;
if (!zkp.getUseDefault()) {
jobs.add(new ZooKeeperJob(jobContext,
(ZooKeeperProcesser) p, applicationContext));
代码示例来源:origin: ctripcorp/dataworks-zeus
result= new DownloadProcesser();
}else if("zookeeper".equalsIgnoreCase(id)){
result=new ZooKeeperProcesser();
result.parse(o.getString("config"));
}else if("mail".equalsIgnoreCase(id)){
内容来源于网络,如有侵权,请联系作者删除!