chengshiwen edited a comment on issue #4438:
URL: 
https://github.com/apache/incubator-dolphinscheduler/issues/4438#issuecomment-759457064


   Confirmed by source code:
   1. Running command `bin/hadoop jar wordcount.jar 
org.apache.hadoop.examples.WordCount [GENERIC_OPTIONS] [COMMAND_OPTIONS]` will 
execute `"$JAVA" $JAVA_HEAP_MAX $HADOOP_OPTS $CLASS "$@"` with 
`CLASS=org.apache.hadoop.util.RunJar` ([source 
code](https://github.com/apache/hadoop/blob/branch-2.8.5/hadoop-common-project/hadoop-common/src/main/bin/hadoop#L166))
   2. The class `org.apache.hadoop.util.RunJar` parses the args with usage 
`"RunJar jarFile [mainClass] args..."` ([source 
code](https://github.com/apache/hadoop/blob/branch-2.8.5/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java#L156))
   3. The example `WordCount` will handle generic Hadoop command-line options 
([source 
code](https://github.com/apache/hadoop/blob/branch-2.8.5/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordCount.java#L68))
   4. The class `GenericOptionsParser` will parse the options and set the 
configuration ([source 
code](https://github.com/apache/hadoop/blob/branch-2.8.5/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/GenericOptionsParser.java))
   
   So, the `[GENERIC_OPTIONS]` and `[COMMAND_OPTIONS]` can be swapped in 
position and order if you use the `GenericOptionsParser`. Otherwise, this 
`[GENERIC_OPTIONS]` will not work. In other words, this issue depends on your 
implementation.
   
   **Conclusion**: This issue is not a bug.


----------------------------------------------------------------
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:
[email protected]


Reply via email to