kl0u opened a new pull request #11435: [FLINK-15852][cli] Prioritize ExecutorCLI over YarnSessionCLI for activeCLI URL: https://github.com/apache/flink/pull/11435 ## What is the purpose of the change This PR changes the order in which the `CliFrontend` selects the active CLI command. Currently in Flink there are 3 custom command lines, the `DefaultCLI`, the `FlinkYarnSessionCli` and the `ExecutorCLI` and when the user submits his/her CLI command, the `CliFrontend` selects which one to use (i.e. which one is active) for further processing based on criteria specific to each custom command line. The `FlinkYarnSessionCli` is chosen if there is a file called `.yarn-properties-USERNAME` (among other criteria) in a specific directory. This file can be written transparently to the user, if he/she used the CLI previously to launch a yarn session cluster. The `ExecutorCLI` is activated if and only if there is an explicit `-e` flag specified by the user. Given that currently Flink first checks if the yarn cli is active and, if not, it only then checks the `ExecutorCLI`, if this "magic" file exists from a previous run, there is no way for the user to use the `ExecutorCLI` without deleting the "properties" file, which may be useful in the future. Given that in the case of the `ExecutorCLI`, an explicit action is required by the user to activate it, while this is not the case for the yarn cli, this PR aims at changing the order in which the cli's are checked for being activated or not. ## Brief change log Changes the order of loading the clis in the `CliFrontend.loadCustomCommandLines()`. ## Verifying this change Added the `FlinkYarnSessionCliTest.testExecutorCLIisPrioritised()` ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (yes / **no**) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**) - The serializers: (yes / **no** / don't know) - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / **no** / don't know) - The S3 file system connector: (yes / **no** / don't know) ## Documentation - Does this pull request introduce a new feature? (yes / **no**) - If yes, how is the feature documented? (**not applicable** / docs / JavaDocs / not documented)
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
