As we know, the priority order of the configuration is :
CommandLine > user stormconf > storm.yaml > defaults.yaml

-----邮件原件-----
发件人: jinhong lu [mailto:[email protected]] 
发送时间: 2015年11月16日 12:57
收件人: [email protected]
主题: load configurations to topology


Hi, I do not understand the order of the configuration loading in
submitToplogy:

public static void submitTopologyAs(String name, Map stormConf,
StormTopology topology, SubmitOptions opts, ProgressListener
progressListener, String asUser)
            throws AlreadyAliveException, InvalidTopologyException,
AuthorizationException {
        if(!Utils.isValidConf(stormConf)) {
            throw new IllegalArgumentException("Storm conf is not valid.
Must be json-serializable");
        }
        stormConf = new HashMap(stormConf);
        stormConf.putAll(Utils.readCommandLineOpts());
        Map conf = Utils.readStormConfig();
        conf.putAll(stormConf);
 
stormConf.putAll(prepareZookeeperAuthentication(conf));readStormConfig();
        conf.putAll(stormConf);

It seems stormConf load the configuration from user stormConf, then
commandLine, after that, defaults.yaml and storm.yaml.
Isn’t the yaml files will overwrite the configuration in user stormConf and
commandLine?

Thanks.

Reply via email to