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

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

                Author: ASF GitHub Bot
            Created on: 01/Oct/21 12:04
            Start Date: 01/Oct/21 12:04
    Worklog Time Spent: 10m 
      Work Description: scwhittle commented on a change in pull request #15416:
URL: https://github.com/apache/beam/pull/15416#discussion_r720188218



##########
File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/io/FileBasedSink.java
##########
@@ -556,25 +565,35 @@ public ResourceId apply(ResourceId tempDirectory) {
      */
     @Experimental(Kind.FILESYSTEM)
     public WriteOperation(FileBasedSink<?, DestinationT, OutputT> sink, 
ResourceId tempDirectory) {
-      this(sink, StaticValueProvider.of(tempDirectory));
+      this(sink, StaticValueProvider.of(tempDirectory), false);

Review comment:
       The failures seem relevant as the test also performs a write before 
reading.
   
   Trying to reproduce locally so I can debug.  I'm wondering if it is failing 
since it is trying to write to some protected dir in tests or a directory needs 
to be created.
   
   I don't think that should be true there because the previous behavior was to 
not subdirectory, as the staticvalueprovider was used instead of the 
TemporaryDirectoryBuilder provider that created the subdir used by other 
constructor.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 658910)
    Time Spent: 2h 50m  (was: 2h 40m)

> When writing to GCS, spread prefix of temporary files and reuse autoscaling 
> of the temporary directory
> ------------------------------------------------------------------------------------------------------
>
>                 Key: BEAM-12818
>                 URL: https://issues.apache.org/jira/browse/BEAM-12818
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-gcp
>            Reporter: Sam Whittle
>            Assignee: Sam Whittle
>            Priority: P2
>             Fix For: 2.34.0
>
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> When writing files using FileIO, the given temporary directory has a 
> subdirectory created in it for each FileBasedSink.  This is useful for 
> non-windowed output where the temporary directory can be matched to delete 
> leftover files that were lost during processing.
> However for windowed writes such subdirectories are unnecessary and cause a 
> common prefix to be shared for the temporary files. Additionally this common 
> prefix varies per job and thus the autoscaling for the previous prefix is no 
> longer effective, see
> https://cloud.google.com/storage/docs/request-rate#randomness_after_sequential_prefixes_is_not_as_effective



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

Reply via email to