flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request #5375: [FLINK-7095] [TaskManager] Add Command line parsin...
Date Mon, 29 Jan 2018 15:56:52 GMT
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5375#discussion_r164473535
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunner.java
---
    @@ -213,10 +226,11 @@ public static void main(String[] args) throws Exception {
     			LOG.info("Cannot determine the maximum number of open file descriptors");
     		}
     
    -		ParameterTool parameterTool = ParameterTool.fromArgs(args);
    -
    -		final String configDir = parameterTool.get("configDir");
    +		// try to parse the command line arguments
    +		CommandLineParser parser = new DefaultParser();
    +		CommandLine cmd = parser.parse(ALL_OPTIONS, args);
     
    +		final String configDir = cmd.getOptionValue("configDir");
    --- End diff --
    
    Have you tried whether this actually works? It looks to me as if this will always return
`null`. Please write a test for it.


---

Mime
View raw message