[ 
https://issues.apache.org/jira/browse/FLINK-8339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16311707#comment-16311707
 ] 

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_r159707553
  
    --- Diff: 
flink-clients/src/test/java/org/apache/flink/client/cli/util/DummyCustomCommandLine.java
 ---
    @@ -62,12 +63,21 @@ public void addGeneralOptions(Options baseOptions) {
        }
     
        @Override
    -   public T retrieveCluster(CommandLine commandLine, Configuration config, 
String configurationDirectory) throws UnsupportedOperationException {
    -           return clusterClient;
    +   public ClusterDescriptor<T> createClusterDescriptor(
    +                   Configuration configuration,
    +                   String configurationDirectory,
    +                   CommandLine commandLine) {
    +           return new DummyClusterDescriptor<>(clusterClient);
        }
     
        @Override
    -   public T createCluster(String applicationName, CommandLine commandLine, 
Configuration config, String configurationDirectory, List<URL> userJarFiles) 
throws Exception {
    -           return clusterClient;
    +   @Nullable
    +   public String getClusterId(Configuration configuration, CommandLine 
commandLine) {
    +           return "dummy";
    +   }
    +
    +   @Override
    +   public ClusterSpecification getClusterSpecification(Configuration 
configuration, CommandLine commandLine) {
    +           return new 
ClusterSpecification.ClusterSpecificationBuilder().createClusterSpecification();
    --- End diff --
    
    See comment on `DefaultCLI.java`


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

Reply via email to