TisonKun opened a new pull request #6737: [FLINK-10399] Refractor 
ParameterTool#fromArgs
URL: https://github.com/apache/flink/pull/6737
 
 
   ## What is the purpose of the change
   
   This pull request is about a refractor of `ParameterTool#fromArgs`.
   
   Current `ParameterTool#fromArgs` uses a weird implement by which flink 
developer would fail to parse it fast.
   
   The main problem is that, when parse args, we always try to get a key-value 
pair, but the implement iterate by a for loop, thus introduce weird 
flag/mutable variable and branches.
   
   ## Brief change log
   
   Refractor `ParameterTool#fromArgs`. Use a index(int iterator) and while loop 
to replace the original for loop. Make it more clear for the purpose and reduce 
weird branches and flags.
   
   Place some `final` modifier where I cannot get the idea that the variable is 
`final` when look at it.
   
   ## Verifying this change
   
   `ParameterToolTest` should guard the refractor.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (**no**)
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (**yes**, but only the implementation, the interface and 
behavior kept.)
     - The serializers: (**no**)
     - The runtime per-record code paths (performance sensitive): (**no**)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper:  (**no**)
     - The S3 file system connector:  (**no**)
   
   ## Documentation
   
     - Does this pull request introduce a new feature?  (**no**)
     - If yes, how is the feature documented? (**no**)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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