TeslaCN commented on a change in pull request #1721:
URL:
https://github.com/apache/shardingsphere-elasticjob/pull/1721#discussion_r522761700
##########
File path:
elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/sharding/JobInstance.java
##########
@@ -34,10 +34,16 @@
private static final String DELIMITER = "@-@";
+ private static final String PARAM_JOB_INST_ID = "jobInstanceId";
Review comment:
Name it `PROPERTY_JOB_INSTANCE_ID` may be better.
##########
File path:
elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/sharding/JobInstance.java
##########
@@ -34,10 +34,16 @@
private static final String DELIMITER = "@-@";
+ private static final String PARAM_JOB_INST_ID = "jobInstanceId";
+
private final String jobInstanceId;
public JobInstance() {
- jobInstanceId = IpUtils.getIp() + DELIMITER +
ManagementFactory.getRuntimeMXBean().getName().split("@")[0];
+ String jobInstIdSuffix = System.getProperty(PARAM_JOB_INST_ID);
+ if (jobInstIdSuffix == null) {
Review comment:
Constant is on the left.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]