seatunnel icon indicating copy to clipboard operation
seatunnel copied to clipboard

[Improve][E2E] modify the method of obtaining JobId

Open hawk9821 opened this issue 1 year ago • 0 comments

Purpose of this pull request

modify the method of obtaining JobId

Pattern jobIdPattern = Pattern.compile(
                  ".*Init JobMaster for Job tidbcdc_to_tidb.conf \\(([0-9]*)\\).*",
                  Pattern.DOTALL);
Matcher matcher = jobIdPattern.matcher(container.getServerLogs());
String jobId;
if (matcher.matches()) {
    jobId = matcher.group(1);
} else {
    throw new RuntimeException("Can not find jobId");
}

change to

String jobId = JobIdGenerator.newJobId();
container.executeJob("/tidb/tidbcdc_to_tidb.conf", jobId);

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

  • [ ] If any new Jar binary package adding in your PR, please add License Notice according New License Guide
  • [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
  • [ ] If you are contributing the connector code, please check that the following files are updated:
    1. Update plugin-mapping.properties and add new connector information in it
    2. Update the pom file of seatunnel-dist
    3. Add ci label in label-scope-conf
    4. Add e2e testcase in seatunnel-e2e
    5. Update connector plugin_config
  • [ ] Update the release-note.

hawk9821 avatar Oct 21 '24 03:10 hawk9821