Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

为什么运行jstorm supervisor后老是会自己备份$JSTORM_HOME/conf/storm.yaml #488

Open
whaon opened this issue Apr 14, 2017 · 12 comments

Comments

@whaon
Copy link

whaon commented Apr 14, 2017

目录下的配置文件会被自动备份如下:

-rw-r--r-- 1 root root 2741 Apr 14 14:38 storm.yaml
-rw-r--r-- 1 root root 2741 Apr 14 14:33 storm.yaml.1
-rw-r--r-- 1 root root 2741 Apr 14 14:33 storm.yaml.2
-rw-r--r-- 1 root root 2744 Apr 14 14:32 storm.yaml.3

日志也不断的打印出来如下:

[INFO 2017-04-14 14:37:06 c.a.j.u.LoadConf:184 SupervisorRefreshConfig] backing current storm.yaml...
[INFO 2017-04-14 14:37:06 c.a.j.u.LoadConf:190 SupervisorRefreshConfig] updating storm.yaml at: /usr/local/fluentd/jstorm-2.2.1/conf/storm.yaml
[INFO 2017-04-14 14:37:31 c.a.j.c.YarnConfigBlacklist:57 SupervisorRefreshConfig] config blacklist:storm.local.dir,java.library.path,jstorm.home,jstorm.log.dir
[INFO 2017-04-14 14:37:31 c.a.j.u.LoadConf:184 SupervisorRefreshConfig] backing current storm.yaml...
[INFO 2017-04-14 14:37:31 c.a.j.u.LoadConf:190 SupervisorRefreshConfig] updating storm.yaml at: /usr/local/fluentd/jstorm-2.2.1/conf/storm.yaml
[INFO 2017-04-14 14:37:56 c.a.j.c.YarnConfigBlacklist:57 SupervisorRefreshConfig] config blacklist:storm.local.dir,java.library.path,jstorm.home,jstorm.log.dir
[INFO 2017-04-14 14:37:56 c.a.j.u.LoadConf:184 SupervisorRefreshConfig] backing current storm.yaml...
[INFO 2017-04-14 14:37:56 c.a.j.u.LoadConf:190 SupervisorRefreshConfig] updating storm.yaml at: /usr/local/fluentd/jstorm-2.2.1/conf/storm.yaml
[INFO 2017-04-14 14:38:21 c.a.j.c.YarnConfigBlacklist:57 SupervisorRefreshConfig] config blacklist:storm.local.dir,java.library.path,jstorm.home,jstorm.log.dir
[INFO 2017-04-14 14:38:21 c.a.j.u.LoadConf:184 SupervisorRefreshConfig] backing current storm.yaml...
[INFO 2017-04-14 14:38:21 c.a.j.u.LoadConf:190 SupervisorRefreshConfig] updating storm.yaml at: /usr/local/fluentd/jstorm-2.2.1/conf/storm.yaml
[INFO 2017-04-14 14:38:46 c.a.j.c.YarnConfigBlacklist:57 SupervisorRefreshConfig] config blacklist:storm.local.dir,java.library.path,jstorm.home,jstorm.log.dir
[INFO 2017-04-14 14:38:46 c.a.j.u.LoadConf:184 SupervisorRefreshConfig] backing current storm.yaml...
[INFO 2017-04-14 14:38:46 c.a.j.u.LoadConf:190 SupervisorRefreshConfig] updating storm.yaml at: /usr/local/fluentd/jstorm-2.2.1/conf/storm.yaml
[INFO 2017-04-14 14:39:11 c.a.j.c.YarnConfigBlacklist:57 SupervisorRefreshConfig] config blacklist:storm.local.dir,java.library.path,jstorm.home,jstorm.log.dir
[INFO 2017-04-14 14:39:11 c.a.j.u.LoadConf:184 SupervisorRefreshConfig] backing current storm.yaml...
[INFO 2017-04-14 14:39:11 c.a.j.u.LoadConf:190 SupervisorRefreshConfig] updating storm.yaml at: /usr/local/fluentd/jstorm-2.2.1/conf/storm.yaml
@fengjian428
Copy link
Contributor

config如果更新会被分发到每个supervisor下。你对比一下,应该有改动的。

@whaon
Copy link
Author

whaon commented Apr 17, 2017

@fengjian428 hi,你的意思是nimbus的config有变动会分发到每个supervisor下么
那如果只是supervisor的config有变动 呢

@whaon
Copy link
Author

whaon commented Apr 17, 2017

@fengjian428 试了下,如果单独改supervisor机器上的config,也会出现自动备份,并且会把我后面该的给还原掉

@fengjian428
Copy link
Contributor

恩 其实会统一还原成nimbus的当前配置

@whaon
Copy link
Author

whaon commented Apr 18, 2017

@fengjian428 那怎么进行动态扩容呢,比如这台机器的supervisor,原先只配置了2个worker,后面想要增加该怎么办

@fengjian428
Copy link
Contributor

直接扩容就可以了,这个没有限制,端口列表是不会改变的

@whaon
Copy link
Author

whaon commented Apr 20, 2017

@fengjian428 你这边说的直接扩容是指什么呢,端口列表是不会改变的?
你的意思是,比如我a机器,一开始配置的端口有2个,6800,6801,那么这台机器的worker就一直是2个,后面也不能改变了,想要扩容只能通过增加机器,在该机器上启动新的supervisor
你的意思是这样么?

@unsleepy22
Copy link
Contributor

这个是个bug。。。最新代码已经fix了

@whaon
Copy link
Author

whaon commented May 23, 2017

@unsleepy22 好的,还没升到最新代码
请问下,怎么进行动态扩容呢,据我所知有以下几种情况:

  1. 加机器,充当supervisor,nimbus自动感知,这个之前就可行
  2. 对已经存在的supervisor,想要增加slots.port,这个支持么,比如原来4个端口 ,我想增加一个,应该怎么做
  3. 对于已经提交的topology,可以改变使用的worker,以及可以改变spout和bolt使用的线程数么

@unsleepy22
Copy link
Contributor

  1. 如果你是写死port list,那你直接改,加port list,重启supervisor就可以。如果你是让supervisor自动计算的,那你调整supervisor.slots.port.cpu.weight或者supervisor.slots.port.mem.weight来计算你需要的slot数目,然后重启supervisor。
  2. 已经提交的,需要restart with conf。不能直接扩容。

@unsleepy22
Copy link
Contributor

另外,修改supervisor的配置,需要考虑配置自动同步的影响,最新版的代码,你可以把配置同步关掉:cluster.conf.sync.enabled: false

@whaon
Copy link
Author

whaon commented May 24, 2017

@unsleepy22 非常感谢回复
我在网上查了下,好像可以用reblance命令对已经提交的topology进行更改,貌似可以增加worknum,但是对于spout和bolt使用的线程数好像只能减少不能增加,请问是这样么

把配置同步关掉了后,就可以更改各个supervisor的配置而互不影响么

restart with conf貌似没什么用啊,这个命令应该不能指定jar包吧,那spout和bolt使用的线程数在代码里改了也没用啊

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants