pnowojski commented on a change in pull request #10084: [FLINK-14382][yarn] 
Incorrect handling of FLINK_PLUGINS_DIR on Yarn
URL: https://github.com/apache/flink/pull/10084#discussion_r344683007
 
 

 ##########
 File path: 
flink-java/src/main/java/org/apache/flink/api/java/utils/ParameterTool.java
 ##########
 @@ -231,13 +253,19 @@ public int getNumberOfParameters() {
        }
 
        /**
-        * Returns the String value for the given key.
+        * Returns the String value for the given key. The value should only 
have one item.
+        * Use {@link #getMultiParameter(String)} instead if want to get 
multiple values parameter.
         * If the key does not exist it will return null.
         */
        public String get(String key) {
                addToDefaults(key, null);
                unrequestedParameters.remove(key);
-               return data.get(key);
+               if (!data.containsKey(key)) {
+                       return null;
+               }
+               Preconditions.checkState(data.get(key).size() == 1,
 
 Review comment:
   nitty nit: maybe add a test case for that?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to