Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加实例后立即分配尚未执行的分片 #2060

Open
jingting-zhang opened this issue Mar 15, 2022 · 2 comments
Open

增加实例后立即分配尚未执行的分片 #2060

jingting-zhang opened this issue Mar 15, 2022 · 2 comments
Labels

Comments

@jingting-zhang
Copy link

elastic-job不支持新增实例后立即再分片(把已分配但未执行的分片重新分配给新增的实例),只能等下次执行周期再重新分片。这个能否支持,有无必要支持?

@TeslaCN TeslaCN added the invalid label Apr 7, 2022
@TeslaCN
Copy link
Member

TeslaCN commented Apr 7, 2022

Hi @jingting-zhang
Please translate your issue into English.
Could you tell us something about your scenario? Is there any problem that doing reshard before next execution?

@takeseem
Copy link

如果没有分片信息,UI界面上很多操作都无法执行,如触发。详情也无法点击进入,否则NPE:apache/shardingsphere-elasticjob-ui#154

原因是:https://github.com/apache/shardingsphere-elasticjob/blob/master/elasticjob-lite/elasticjob-lite-lifecycle/src/main/java/org/apache/shardingsphere/elasticjob/lite/lifecycle/internal/statistics/ShardingStatisticsAPIImpl.java#L64

JobInstance jobInstance = YamlEngine.unmarshal(regCenter.get(jobNodePath.getInstanceNodePath(instanceId)), JobInstance.class);
regCenter.get将返回null

[ERROR] 01:33:13.385 [http-nio-8118-exec-9] o.a.s.e.l.u.w.h.RestExceptionHandler - null
java.lang.NullPointerException: null
	at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
	at java.util.regex.Matcher.reset(Matcher.java:309)
	at java.util.regex.Matcher.<init>(Matcher.java:229)
	at java.util.regex.Pattern.matcher(Pattern.java:1093)
	at org.yaml.snakeyaml.reader.StreamReader.checkPrintable(StreamReader.java:64)
	at org.yaml.snakeyaml.reader.StreamReader.<init>(StreamReader.java:47)
	at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:427)
	at org.apache.shardingsphere.elasticjob.infra.yaml.YamlEngine.unmarshal(YamlEngine.java:50)
	at org.apache.shardingsphere.elasticjob.lite.lifecycle.internal.statistics.ShardingStatisticsAPIImpl.getShardingInfo(ShardingStatisticsAPIImpl.java:64)
	at org.apache.shardingsphere.elasticjob.lite.lifecycle.internal.statistics.ShardingStatisticsAPIImpl.getShardingInfo(ShardingStatisticsAPIImpl.java:47)
	at org.apache.shardingsphere.elasticjob.lite.ui.web.controller.JobOperationController.getShardingInfo(JobOperationController.java:125)

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

No branches or pull requests

3 participants