com.taobao.zeus.model.processer.ZooKeeperProcesser类的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(66)

本文整理了Java中com.taobao.zeus.model.processer.ZooKeeperProcesser类的一些代码示例,展示了ZooKeeperProcesser类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperProcesser类的具体详情如下:
包路径:com.taobao.zeus.model.processer.ZooKeeperProcesser
类名称: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)){

相关文章