Examples of DownloadJob


Examples of com.taobao.zeus.jobs.sub.tool.DownloadJob

      }
    }
    jobContext.setProperties(new RenderHierarchyProperties(hp));
    hp.setProperty("hadoop.mapred.job.zeus_id", "zeus_debug_"+history.getId());
    List<Job> pres = new ArrayList<Job>(1);
    pres.add(new DownloadJob(jobContext));
    Job core = null;
    if(history.getJobRunType()==JobRunType.Hive){
      core =new HiveJob(jobContext,applicationContext);
    }else if(history.getJobRunType()==JobRunType.Shell){
      core=new HadoopShellJob(jobContext);
View Full Code Here

Examples of com.taobao.zeus.jobs.sub.tool.DownloadJob

    //添加宙斯标记属性,提供给云梯
    hp.setProperty("hadoop.mapred.job.zues_id", "zeus_job_"+history.getJobId()+"_"+history.getId());
   
    //前置处理Job创建
    List<Job> pres=parseJobs(jobContext, applicationContext, jobBean,jobBean.getJobDescriptor().getPreProcessers(),history,workDir);
    pres.add(0, new DownloadJob(jobContext));
    //后置处理Job创建
    List<Job> posts=parseJobs( jobContext, applicationContext, jobBean,jobBean.getJobDescriptor().getPostProcessers(),history,workDir);
    posts.add(new ZooKeeperJob(jobContext, null, applicationContext));
    //核心处理Job创建
    Job core=null;
View Full Code Here

Examples of com.taobao.zeus.jobs.sub.tool.DownloadJob

          }while(!old.equals(config));
        }
        p.parse(config);
      }
      if(p instanceof DownloadProcesser){
        jobs.add(new DownloadJob(jobContext));
      }else if(p instanceof ZooKeeperProcesser){
        ZooKeeperProcesser zkp=(ZooKeeperProcesser)p;
        if(!zkp.getUseDefault()){
          jobs.add(new ZooKeeperJob(jobContext, (ZooKeeperProcesser) p,applicationContext));
        }
View Full Code Here

Examples of org.mage.plugins.card.dl.DownloadJob

                else if(symbol.equals("Q")) symbol = "untap";
                else if(symbol.equals("S")) symbol = "snow";
               
                String url = format(urlFmt, sizes[sizeIndex], symbol);
               
                return new DownloadJob(sym, fromURL(url), toFile(dst));
            }
        };
    }
View Full Code Here

Examples of org.mage.plugins.card.dl.DownloadJob

                else if(symbol.equals("Q")) symbol = "untap";
                else if(symbol.equals("S")) symbol = "snow";

                String url = format(urlFmt, sizes[sizeIndex], symbol);

                return new DownloadJob(sym, fromURL(url), toFile(dst));
            }
        };
    }
View Full Code Here

Examples of org.mage.plugins.card.dl.DownloadJob

        File dst = new File(outDir, set + "-" + rarity + ".jpg");
        if (symbolsReplacements.containsKey(set)) {
            set = symbolsReplacements.get(set);
        }
        String url = "http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=" + set + "&size=small&rarity=" + rarity;
        return new DownloadJob(set + "-" + rarity, fromURL(url), toFile(dst));
    }
View Full Code Here

Examples of org.mage.plugins.card.dl.DownloadJob

    public Iterator<DownloadJob> iterator() {
        ArrayList<DownloadJob> jobs = new ArrayList<>();

        for (Map.Entry<String, String> url : directLinks.entrySet()) {
            File dst = new File(outDir, url.getKey());
            jobs.add(new DownloadJob(url.getKey(), fromURL(url.getValue()), toFile(dst)));
        }
        return jobs.iterator();
    }
View Full Code Here

Examples of util.io.DownloadJob

  public void readFromFile(File file) throws IOException, FileFormatException {
    BufferedInputStream stream = null;
    try {
      stream = new BufferedInputStream(new FileInputStream(file), 0x4000);
     
      readFromStream(stream, new DownloadJob(null, file.toString(), null));
    }
    finally {
      if (stream != null) {
        try { stream.close(); } catch (IOException exc) {}
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.