flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GJL <...@git.apache.org>
Subject [GitHub] flink pull request #5225: [FLINK-8339] [flip6] Let CustomCommandLine return ...
Date Thu, 04 Jan 2018 16:57:12 GMT
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.


---

Mime
View raw message