[
https://issues.apache.org/jira/browse/FLINK-8339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16311647#comment-16311647
]
ASF GitHub Bot commented on FLINK-8339:
---------------------------------------
Github user GJL commented on a diff in the pull request:
https://github.com/apache/flink/pull/5225#discussion_r159702188
--- Diff:
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java ---
@@ -457,7 +499,19 @@ protected int stop(String[] args) throws Exception {
final CustomCommandLine<?> activeCommandLine =
getActiveCustomCommandLine(commandLine);
- final ClusterClient client =
activeCommandLine.retrieveCluster(commandLine, configuration,
configurationDirectory);
+ final ClusterDescriptor<?> clusterDescriptor =
activeCommandLine.createClusterDescriptor(
--- End diff --
It seems that there is a pattern of getting the `clusterDescriptor` and and
the `client` for all the commands. Also shutting down the client and closing
the descriptor is repeated. Imo we should extract the pattern to avoid code
duplication.
> Let CustomCommandLine return a ClusterDescriptor
> ------------------------------------------------
>
> Key: FLINK-8339
> URL: https://issues.apache.org/jira/browse/FLINK-8339
> Project: Flink
> Issue Type: Sub-task
> Components: Client
> Affects Versions: 1.5.0
> Reporter: Till Rohrmann
> Assignee: Till Rohrmann
> Labels: flip-6
> Fix For: 1.5.0
>
>
> The {{CustomCommandLine}} currently is able to retrieve a {{ClusterClient}}
> and deploy a cluster. In order to better separate concerns it would be good
> if the {{CustomCommandLine}} would simply return a {{ClusterDescriptor}}
> which could then be used to retrieve a {{ClusterClient}} or to deploy a Flink
> cluster.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)