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

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

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

Utils.isValidConf介绍

暂无

代码示例

代码示例来源: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

throws AlreadyAliveException,
  InvalidTopologyException {
if (!Utils.isValidConf(stormConf)) {
  throw new IllegalArgumentException("Storm conf is not valid. Must be json-serializable");

代码示例来源: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

private void submitTopology(String name, Map stormConf, StormTopology stormTopology, String topologyJarPath) 
    throws AlreadyAliveException, InvalidTopologyException {
  if(!Utils.isValidConf(stormConf)) {
    throw new IllegalArgumentException("Storm conf is not valid. Must be json-serializable");

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

if(!Utils.isValidConf(stormConf)) {
  throw new IllegalArgumentException("Storm conf is not valid. Must be json-serializable");

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

if (!Utils.isValidConf(stormConf)) {
  throw new IllegalArgumentException("Storm conf is not valid. Must be json-serializable");

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

if (!Utils.isValidConf(stormConf)) {
  throw new IllegalArgumentException("Storm conf is not valid. Must be json-serializable");

相关文章