zentol commented on a change in pull request #7668: [FLINK-11545] [container]
Add job-id arg to StandaloneJobClusterEntryPoint
URL: https://github.com/apache/flink/pull/7668#discussion_r255921144
##########
File path:
flink-container/src/main/java/org/apache/flink/container/entrypoint/StandaloneJobClusterConfigurationParserFactory.java
##########
@@ -79,6 +92,21 @@ public StandaloneJobClusterConfiguration
createResult(@Nonnull CommandLine comma
hostname,
restPort,
jobClassName,
- savepointRestoreSettings);
+ savepointRestoreSettings,
+ jobId);
+ }
+
+ private static JobID getJobId(CommandLine commandLine) {
+ String jobId =
commandLine.getOptionValue(JOB_ID_OPTION.getOpt());
+ if (jobId == null) {
+ return DEFAULT_JOB_ID;
+ }
+
+ try {
+ return JobID.fromHexString(jobId);
+ } catch (Throwable t) {
+ throw new IllegalArgumentException("Failed to parse job
ID '" + jobId + "'. The expected format is " +
Review comment:
in any case we shouldn't be catching throwables here but only
IllegalArgumentExceptions.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services