Package com.taobao.zeus.model.processer

Examples of com.taobao.zeus.model.processer.Processer


   
    if(persist.getPreProcessers()!=null && !"".equals(persist.getPreProcessers().trim())){
      JSONArray preArray=JSONArray.fromObject(persist.getPreProcessers());
      List<Processer> preProcessers=new ArrayList<Processer>();
      for(int i=0;i<preArray.size();i++){
        Processer p=ProcesserUtil.parse(preArray.getJSONObject(i));
        if(p!=null){
          preProcessers.add(p);
        }
       
      }
      jd.setPreProcessers(preProcessers);
    }
    if(persist.getPostProcessers()!=null && !"".equals(persist.getPostProcessers().trim())){
      JSONArray postArray=JSONArray.fromObject(persist.getPostProcessers());
      List<Processer> postProcessers=new ArrayList<Processer>();
      for(int i=0;i<postArray.size();i++){
        Processer p=ProcesserUtil.parse(postArray.getJSONObject(i));
        if(p!=null){
          postProcessers.add(p);
        }
      }
      jd.setPostProcessers(postProcessers);
View Full Code Here


import com.taobao.zeus.model.processer.ZooKeeperProcesser;

public class ProcesserUtil {

  public static Processer parse(JSONObject o){
    Processer result=null;
    String id=o.getString("id");
    if("download".equals(id)){
      result= new DownloadProcesser();
    }else if("zookeeper".equalsIgnoreCase(id)){
      result=new ZooKeeperProcesser();
      result.parse(o.getString("config"));
    }else if("mail".equalsIgnoreCase(id)){
      result=new MailProcesser();
      result.parse(o.getString("config"));
    }else if("meta".equalsIgnoreCase(id)){
      result=new MetaProcesser();
      result.parse(o.getString("config"));
    }else if("wangwang".equalsIgnoreCase(id)){
      result=new WangWangProcesser();
      result.parse(o.getString("config"));
    }else if("OutputCheck".equalsIgnoreCase(id)){
      result=new OutputCheckProcesser();
      result.parse(o.getString("config"));
    }else if("OutputClean".equalsIgnoreCase(id)){
      result=new OutputCleanProcesser();
      result.parse(o.getString("config"));
    }else if("JobProcesser".equalsIgnoreCase(id)){
      result=new JobProcesser();
      result.parse(o.getString("config"));
    }else if("hive".equalsIgnoreCase(id)){
      result = new HiveProcesser();
      result.parse(o.getString("config"));
    }
   
    return result;
  }
View Full Code Here

  }
 
  private List<Processer> parseProcessers(List<String> ps){
    List<Processer> list=new ArrayList<Processer>();
    for(String s:ps){
      Processer p=ProcesserUtil.parse(JSONObject.fromObject(s));
      if(p!=null){
        list.add(p);
      }
    }
    return list;
View Full Code Here

TOP

Related Classes of com.taobao.zeus.model.processer.Processer

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.