com.github.hackerwin7.jd.lib.utils.magpie.MagpieConfScanner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jd-lib Show documentation
Show all versions of jd-lib Show documentation
components for jd relative projects
package com.github.hackerwin7.jd.lib.utils.magpie;
import com.github.hackerwin7.jd.lib.utils.TrainConfService;
import net.sf.json.JSONObject;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Created by IntelliJ IDEA.
* User: hackerwin7
* Date: 2016/02/02
* Time: 5:40 PM
* Desc: scan the bdp config for magpie job
*/
public class MagpieConfScanner {
public static Map scanMagpieTrackerConf() throws Exception {
Map confs = new HashMap<>();
List jobIds = MagpieJobScanner.scanMagpieTrackerJob();
for(String jobId : jobIds) {
JSONObject conf = TrainConfService.getConf(jobId);
confs.put(jobId, conf);
}
return confs;
}
public static Map scanMagpieParserConf() throws Exception {
Map confs = new HashMap<>();
List jobIds = MagpieJobScanner.scanMagpieParserJob();
for(String jobId : jobIds) {
JSONObject conf = TrainConfService.getConf(jobId);
confs.put(jobId, conf);
}
return confs;
}
}