我在哪里可以找到这个storm可配置拓扑的默认值,worker.timeout.secs

i2loujxw  于 2022-12-09  发布在  Apache
关注(0)|答案(1)|浏览(140)

我在这里找到声明:https://github.com/apache/storm/blob/3f96c249cbc17ce062491bfbb39d484e241ab168/storm-client/src/jvm/org/apache/storm/Config.java#L1161,但无法从yaml(https://github.com/apache/storm/blob/b6e7d0355e0397b8acc566961ed31279338998e1/conf/defaults.yaml)中找到它的默认值。我试图在我的设置中调优此参数,但需要弄清楚什么是“推荐”值开始。

2lpgd968

2lpgd9681#

The comment on topology.worker.timeout.secs says:
Topology configurable worker heartbeat timeout before the supervisor tries to restart the worker process. Maximum value constrained by WORKER_MAX_TIMEOUT_SECS . When topology timeout is greater, the following configs are effectively overridden: SUPERVISOR_WORKER_TIMEOUT_SECS , SUPERVISOR_WORKER_START_TIMEOUT_SECS , NIMBUS_TASK_TIMEOUT_SECS and NIMBUS_TASK_LAUNCH_SECS .
As I can not find a default value for that as well, I had a look into nimbus.java :

if (mergedConf.containsKey(Config.TOPOLOGY_WORKER_TIMEOUT_SECS)) {
  int workerTimeoutSecs = (Integer) ObjectReader.getInt(mergedConf.get(Config.TOPOLOGY_WORKER_TIMEOUT_SECS));
  int workerMaxTimeoutSecs = (Integer) ObjectReader.getInt(mergedConf.get(Config.WORKER_MAX_TIMEOUT_SECS));
  if (workerTimeoutSecs > workerMaxTimeoutSecs) {
      ret.put(Config.TOPOLOGY_WORKER_TIMEOUT_SECS, workerMaxTimeoutSecs);
      ...
  }
}

But this key is not contained anywhere, and when I am debugging through nimbus and evaluate that config, I get null , meaning, that this value is never set.

Looking at WORKER_MAX_TIMEOUT_SECS gives 600 seconds in default.yaml , so I think this might serve as a starting point for you.

相关问题