All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.hackerwin7.jd.lib.utils.magpie.MagpieConfScanner Maven / Gradle / Ivy

There is a newer version: 0.1.3.1
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy