[ 
https://issues.apache.org/jira/browse/FLINK-12491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18143412#comment-18143412
 ] 

Zhe Wang commented on FLINK-12491:
----------------------------------

I checked current master (`9efe0f8854ce`) and the discrepancy is still present:
both the `CoreOptions.TMP_DIRS` Javadoc and its option description list `|`,
while `ConfigurationUtils.splitPaths()` only splits on commas or the OS path
separator.

The review of #8418 already agreed to remove `|` from the documentation and
update the option description. That PR is now closed and unmerged. May I
continue under this issue with a small documentation and characterization-test
change, keeping the parsing behavior unchanged and crediting the earlier work?

> Incorrect documentation for directory path separators of CoreOptions.TMP_DIRS
> -----------------------------------------------------------------------------
>
>                 Key: FLINK-12491
>                 URL: https://issues.apache.org/jira/browse/FLINK-12491
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Configuration
>    Affects Versions: 2.1.0
>            Reporter: Kezhu Wang
>            Priority: Minor
>              Labels: auto-unassigned, pull-request-available
>             Fix For: 2.5.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {{CoreOptions.TMP_DIRS}} and {{ConfigConstants.TASK_MANAGER_TMP_DIR_KEY}} 
> both say that:
> {quote}
> The config parameter defining the directories for temporary files, separated 
> by
>        * ",", "|", or the system's \{@link java.io.File#pathSeparator}.
> {quote}
> But the parsing phase uses {{String.split}} with argument {{",|" + 
> File.pathSeparator}} eventually. However, in fact the sole parameter of 
> {{String.split}} is a regular expression, so the directory path separators 
> are "," or {{java.io.File#pathSeparator}}. After digging into history, I 
> found that the documentation was introduced in commit 
> {{a7c407ace4f6cbfbde3e247071cee5a755ae66db}} and inherited by 
> {{76abcaa55d0d6ab704b7ab8164718e8e2dcae2c4}}. So, I think it is safe to drop 
> "|" from documentation.
> {code:title=ConfigurationUtils.java}
> public class ConfigurationUtils {
>       private static String[] splitPaths(@Nonnull String separatedPaths) {
>               return separatedPaths.length() > 0 ? separatedPaths.split(",|" 
> + File.pathSeparator) : EMPTY;
> }
> {code}



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to