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

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

                Author: ASF GitHub Bot
            Created on: 16/Jan/19 20:26
            Start Date: 16/Jan/19 20:26
    Worklog Time Spent: 10m 
      Work Description: kennknowles commented on issue #7537: [BEAM-6407] 
Revert "BEAM-5933: avoid memory allocation in hashCode call"
URL: https://github.com/apache/beam/pull/7537#issuecomment-454927557
 
 
   Note that these are certainly distinct hashes: 
https://docs.oracle.com/javase/8/docs/api/java/util/Objects.html#hash-java.lang.Object...-
   
   I'm guessing that the check whether every view is set up right also uses 
Objects.hash. So there might be an easy roll-forward.
 
----------------------------------------------------------------
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


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

    Worklog Id:     (was: 185977)
    Time Spent: 40m  (was: 0.5h)

> regression: FileIO.writeDynamic() with side inputs fails in DirectRunner
> ------------------------------------------------------------------------
>
>                 Key: BEAM-6407
>                 URL: https://issues.apache.org/jira/browse/BEAM-6407
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-direct
>    Affects Versions: 2.9.0
>            Reporter: Niel Markwick
>            Assignee: Kenneth Knowles
>            Priority: Major
>              Labels: regression
>             Fix For: 2.10.0
>
>         Attachments: beam-filewriter-demo.tgz
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> When FileIO.writeDynamic is used with automatic sharding and  a Contextful.Fn 
> that uses side inputs for the file naming, DirectRunner (and TestPipeline) 
> fail with: 
> {{java.lang.IllegalStateException: All PCollectionViews that are consumed 
> must be written by some WriteView PTransform: Missing [<unnamed> 
> [RunnerPCollectionView]]}}
>  
> Example code:  
> {code:java}
> PCollectionView<String> outputFileName =
>    pipeline.apply(
>       "outputDir",
>        Create.of("/tmp/testout")).apply(View.asSingleton());
> Contextful.Fn<String, FileIO.Write.FileNaming> manifestNaming =
>    (element, c) ->
>       (window, pane, numShards, shardIndex, compression) -> 
>          c.sideInput(outputFileName)+shardIndex;
> pipeline.apply(FileIO.<String, String>writeDynamic()
>    .by(SerializableFunctions.constant(""))
>    .withDestinationCoder(StringUtf8Coder.of())
>    .via(TextIO.sink())
>    .withTempDirectory("/tmp")
>    .withNaming(Contextful.of(
>       manifestNaming,
>       Requirements.requiresSideInputs(outputFileName))));
> {code}
>  
> This does not occur in Dataflow-runner
> It does not occur if the ContextFul.Fn is not given side inputs.
> It does not occur if withNumShards(1) is set.
> It did not occur in 2.8.0, and does in 2.9.0 and 2.10.0-SNAPSHOT (as of today)
>  
> The cause appears to be due to the DirectRunner using TransformOverrides 
> re-writing FileIO sinks to use runner-determined-sharding
> ( see [DirectRunner.java line 
> 226|https://github.com/apache/beam/blob/master/runners/direct-java/src/main/java/org/apache/beam/runners/direct/DirectRunner.java#L226]
>  )
>  but I do not know why this started occuring in 2.9.0...



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to