backtype.storm.utils.Utils.readCommandLineOpts()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中backtype.storm.utils.Utils.readCommandLineOpts()方法的一些代码示例,展示了Utils.readCommandLineOpts()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.readCommandLineOpts()方法的具体详情如下:
包路径:backtype.storm.utils.Utils
类名称:Utils
方法名:readCommandLineOpts

Utils.readCommandLineOpts介绍

暂无

代码示例

代码示例来源:origin: alibaba/jstorm

public static Map readStormConfig() {
  Map ret = readDefaultConfig();
  String confFile = System.getProperty("storm.conf.file");
  Map storm;
  if (StringUtils.isBlank(confFile)) {
    storm = LoadConf.findAndReadYaml("storm.yaml", false, false);
  } else {
    storm = loadDefinedConf(confFile);
  }
  ret.putAll(storm);
  ret.putAll(readCommandLineOpts());
  replaceLocalDir(ret);
  return ret;
}

代码示例来源:origin: alibaba/jstorm

@SuppressWarnings("unchecked")
@Override
public void submitTopologyWithOpts(String topologyName, Map conf, StormTopology topology, SubmitOptions submitOpts) {
  if (!Utils.isValidConf(conf))
    throw new RuntimeException("Topology conf is not json-serializable");
  conf.putAll(LocalUtils.getLocalBaseConf());
  conf.putAll(Utils.readCommandLineOpts());
  try {
    if (submitOpts == null) {
      state.getNimbus().submitTopology(topologyName, null, Utils.to_json(conf), topology);
    } else {
      state.getNimbus().submitTopologyWithOpts(topologyName, null, Utils.to_json(conf), topology, submitOpts);
    }
  } catch (Exception e) {
    LOG.error("failed to submit topology " + topologyName, e);
    throw new RuntimeException(e);
  }
}

代码示例来源:origin: alibaba/jstorm

userTotalConf.putAll(Utils.readCommandLineOpts());

代码示例来源:origin: com.n3twork.storm/storm-core

public static Map readStormConfig() {
  Map ret = readDefaultConfig();
  String confFile = System.getProperty("storm.conf.file");
  Map storm;
  if (confFile==null || confFile.equals("")) {
    storm = findAndReadConfigFile("storm.yaml", false);
  } else {
    storm = findAndReadConfigFile(confFile, true);
  }
  ret.putAll(storm);
  ret.putAll(readCommandLineOpts());
  return ret;
}

代码示例来源:origin: com.alibaba.jstorm/jstorm-core

public static Map readStormConfig() {
  Map ret = readDefaultConfig();
  String confFile = System.getProperty("storm.conf.file");
  Map storm;
  if (StringUtils.isBlank(confFile)) {
    storm = LoadConf.findAndReadYaml("storm.yaml", false, false);
  } else {
    storm = loadDefinedConf(confFile);
  }
  ret.putAll(storm);
  ret.putAll(readCommandLineOpts());
  replaceLocalDir(ret);
  return ret;
}

代码示例来源:origin: com.alibaba.jstorm/jstorm-core

@SuppressWarnings("unchecked")
@Override
public void submitTopologyWithOpts(String topologyName, Map conf, StormTopology topology, SubmitOptions submitOpts) {
  if (!Utils.isValidConf(conf))
    throw new RuntimeException("Topology conf is not json-serializable");
  
  conf.putAll(LocalUtils.getLocalBaseConf());
  conf.putAll(Utils.readCommandLineOpts());
  
  try {
    if (submitOpts == null) {
      state.getNimbus().submitTopology(topologyName, null, Utils.to_json(conf), topology);
    } else {
      state.getNimbus().submitTopologyWithOpts(topologyName, null, Utils.to_json(conf), topology, submitOpts);
    }
  } catch (Exception e) {
    LOG.error("Failed to submit topology " + topologyName, e);
    throw new RuntimeException(e);
  }
}

代码示例来源:origin: lmco/streamflow

stormConf.putAll(Utils.readCommandLineOpts());
Map conf = Utils.readStormConfig();
conf.putAll(stormConf);

代码示例来源:origin: com.n3twork.storm/storm-core

stormConf.putAll(Utils.readCommandLineOpts());
Map conf = Utils.readStormConfig();
conf.putAll(stormConf);

代码示例来源:origin: com.alibaba.jstorm/jstorm-core

stormConf.putAll(Utils.readCommandLineOpts());
Map conf = Utils.readStormConfig();
conf.putAll(stormConf);

代码示例来源:origin: apache/eagle

stormConf.putAll(Utils.readCommandLineOpts());
Map conf = Utils.readStormConfig();
conf.putAll(stormConf);

相关文章