aokunsang commented on issue #5473:
URL: https://github.com/apache/seatunnel/issues/5473#issuecomment-1718842185
1、structure PackageJarJob object
PackageJarJob packageJarJob = new PackageJarJob();
Path starterJarPath = SeaTunnelKit.getStarterJarPath(seatunnelHomePath);
packageJarJob.setJarFilePath(starterJarPath.toFile().toURI().toString());
packageJarJob.setEntryPointClass(SeaTunnelKit.SEATUNNEL_MAIN_CLASS);
packageJarJob.setProgramArgs(new String[] { "--config",
configPath.toString() });
Set<URL> jars = new HashSet<>();
jars.add(configPath.toUri().toURL());
.... other dependent jars
ConfigUtils.encodeCollectionToConfig(configuration, PipelineOptions.JARS,
jars, Object::toString);
2、structure JobGraph object and submit flink
RestClusterClient<StandaloneClusterId> client = new
RestClusterClient<>(configuration,StandaloneClusterId.getInstance());
PackagedProgram program = FlinkKit.buildProgram(configuration, job);
JobGraph jobGraph = PackagedProgramUtils.createJobGraph(program,
configuration, job.getParallelism(), false);
JobID jobID = client.submitJob(jobGraph).get();
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]