uce opened a new pull request #7717: [FLINK-11533] [container] Add option parse 
JAR manifest for jobClassName
URL: https://github.com/apache/flink/pull/7717
 
 
   ## What is the purpose of the change
   
   This PR allows users to point the `StandaloneJobClusterEntryPoint` to a JAR 
file instead of requiring a job class name of the job to execute.
   
   Users can provide the argument as follows: `--job-classname 
from-jar:/foo/bar.jar` and let the entry point parse the JAR manifest for the 
entry class. The prefix is not a valid class name and should not conflict with 
existing usage of this option.
   
   The original plan in the ticket was to add an additional command line 
argument like `--job-jar` but that seemed confusing as the JAR would only be 
used to parse the job class name. Also, an additional argument would have made 
the entry point argument validation slightly more complex (e.g. both 
`--job-classname` and `--job-jar` would be optional, but exactly one of the two 
required).
   
   I think the current approach is a step into the right direction. Eventually, 
I think there is a case to be made for having a `--job-jar` argument that 
actually distributes the user JAR between the cluster components (with proper 
distribution of blobs, setup of the user class loader, etc.) instead of 
requiring it to be on the class path.
   
   ## Brief change log
   
   - Add `JarManifestParser` utility
   - Check `PackagedProgram.MANIFEST_ATTRIBUTE_ASSEMBLER_CLASS`, 
`PackagedProgram.MANIFEST_ATTRIBUTE_MAIN_CLASS` manifest attributes if 
`job-classname` starts with `from-jar:`
   
   ## Verifying this change
   
   - This change added unit tests
   - Additionally, a test JAR assembly step has been added to test the new 
functionality with a proper job jar
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: **yes** (adds special case behavior of command line 
argument `--job-classname`)
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: no
     - The S3 file system connector: no
   
   ## Documentation
   
   - Updated command line argument help page
   - Added note to Kubernetes template README
   

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

Reply via email to