本文整理了Java中org.apache.storm.Config.setMessageTimeoutSecs()
方法的一些代码示例,展示了Config.setMessageTimeoutSecs()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Config.setMessageTimeoutSecs()
方法的具体详情如下:
包路径:org.apache.storm.Config
类名称:Config
方法名:setMessageTimeoutSecs
暂无
代码示例来源:origin: apache/storm
public void setMessageTimeoutSecs(int secs) {
setMessageTimeoutSecs(this, secs);
}
代码示例来源:origin: apache/metron
@Override
public Config apply(Arg arg) {
if(arg.getArg() != null) {
arg.getConfig().setMessageTimeoutSecs(Integer.parseInt(arg.getArg()));
}
return arg.getConfig();
}
}
代码示例来源:origin: com.twitter.heron/heron-storm
public void setMessageTimeoutSecs(int secs) {
setMessageTimeoutSecs(this, secs);
}
代码示例来源:origin: org.apache.storm/storm-core
public void setMessageTimeoutSecs(int secs) {
setMessageTimeoutSecs(this, secs);
}
代码示例来源:origin: BriData/DBus
private void start(StormTopology topology, boolean runAsLocal) throws Exception {
Config conf = new Config();
conf.put(Constants.StormConfigKey.FULL_SPLITTER_TOPOLOGY_ID, fullSplitterTopologyId);
conf.put(Constants.StormConfigKey.FULL_PULLER_TOPOLOGY_ID, fullPullerTopologyId);
conf.put(Constants.StormConfigKey.ZKCONNECT, this.zkConnect);
//设置message超时时间为10小时,保证每个分片都能在10小时内拉完数据
conf.setMessageTimeoutSecs(36000);
conf.setMaxSpoutPending(30);
conf.setDebug(true);
conf.setNumWorkers(1);
if (runAsLocal) {
conf.setMaxTaskParallelism(3);
LocalCluster cluster = new LocalCluster();
cluster.submitTopology(topologyName, conf, topology);
} else {
StormSubmitter.submitTopology(topologyName, conf, topology);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!