[ 
https://issues.apache.org/jira/browse/BEAM-10292?focusedWorklogId=472976&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-472976
 ]

ASF GitHub Bot logged work on BEAM-10292:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 20/Aug/20 16:55
            Start Date: 20/Aug/20 16:55
    Worklog Time Spent: 10m 
      Work Description: lukecwik commented on a change in pull request #12050:
URL: https://github.com/apache/beam/pull/12050#discussion_r474136756



##########
File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/io/LocalFileSystem.java
##########
@@ -202,6 +202,10 @@ protected void delete(Collection<LocalResourceId> 
resourceIds) throws IOExceptio
 
   @Override
   protected LocalResourceId matchNewResource(String singleResourceSpec, 
boolean isDirectory) {
+    if (singleResourceSpec.endsWith(File.separator) && !isDirectory) {

Review comment:
       Your right, it seems as though Linux doesn't allow `/`, Mac OS X doesn't 
allow `:`, Windows doesn't allow `\`.




----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 472976)
    Time Spent: 3h 40m  (was: 3.5h)

> DefaultFilenamePolicy.ParamsCoder loses information whether Params's resource 
> ID is file/directory
> --------------------------------------------------------------------------------------------------
>
>                 Key: BEAM-10292
>                 URL: https://issues.apache.org/jira/browse/BEAM-10292
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: David Janicek
>            Priority: P2
>          Time Spent: 3h 40m
>  Remaining Estimate: 0h
>
> *DefaultFilenamePolicy.ParamsCoder* uses simple *StringUtf8Coder* for 
> encoding/decoding *DefaultFilenamePolicy.Params*'s *baseFilename* and 
> therefore looses information whether *Params.baseFilename* resource ID is 
> file or directory.
> The result is that it's effectively preventing user to define directory as 
> *baseFilename provider* when using dynamic destinations because after 
> deserialization it's translated to file.
> Solution is easy - use *ResourceIdCoder* for encoding/decoding.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to