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

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

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



##########
File path: 
sdks/java/core/src/test/java/org/apache/beam/sdk/io/DefaultFilenamePolicyTest.java
##########
@@ -48,6 +51,26 @@ private static String constructName(
     return constructed.toString();
   }
 
+  private static DefaultFilenamePolicy.Params encodeDecodeParams(

Review comment:
       Use 
[CoderUtils.clone](https://github.com/apache/beam/blob/f3ac4822191ca63d74a8fd71f81da976b3d2fbd1/sdks/java/core/src/main/java/org/apache/beam/sdk/util/CoderUtils.java#L140)




----------------------------------------------------------------
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: 472533)
    Time Spent: 2h 20m  (was: 2h 10m)

> 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: 2h 20m
>  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