You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/02/08 12:23:19 UTC

[GitHub] uce commented on a change in pull request #7668: [FLINK-11545] [container] Add job-id arg to StandaloneJobClusterEntryPoint

uce 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_r255053650
 
 

 ##########
 File path: flink-container/src/main/java/org/apache/flink/container/entrypoint/StandaloneJobClusterConfigurationParserFactory.java
 ##########
 @@ -79,6 +92,20 @@ 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 + "'", t);
 
 Review comment:
   Good idea. Is the updated message OK?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services