Search in sources :

Example 21 with MapTask

use of com.google.api.services.dataflow.model.MapTask in project beam by apache.

the class FixMultiOutputInfosOnParDoInstructionsTest method testDefaultOutputIsAddedIfOnlySingleOutput.

@Test
public void testDefaultOutputIsAddedIfOnlySingleOutput() {
    FixMultiOutputInfosOnParDoInstructions function = new FixMultiOutputInfosOnParDoInstructions(IdGenerators.decrementingLongs());
    MapTask output = function.apply(createMapTaskWithParDo(1));
    assertEquals(createMapTaskWithParDo(1, "-1"), output);
}
Also used : MapTask(com.google.api.services.dataflow.model.MapTask) Test(org.junit.Test)

Aggregations

MapTask (com.google.api.services.dataflow.model.MapTask)21 Test (org.junit.Test)15 ParallelInstruction (com.google.api.services.dataflow.model.ParallelInstruction)11 Edge (org.apache.beam.runners.dataflow.worker.graph.Edges.Edge)9 InstructionOutputNode (org.apache.beam.runners.dataflow.worker.graph.Nodes.InstructionOutputNode)9 Node (org.apache.beam.runners.dataflow.worker.graph.Nodes.Node)9 ParallelInstructionNode (org.apache.beam.runners.dataflow.worker.graph.Nodes.ParallelInstructionNode)9 DefaultEdge (org.apache.beam.runners.dataflow.worker.graph.Edges.DefaultEdge)8 MultiOutputInfoEdge (org.apache.beam.runners.dataflow.worker.graph.Edges.MultiOutputInfoEdge)8 InstructionOutput (com.google.api.services.dataflow.model.InstructionOutput)7 ReadInstruction (com.google.api.services.dataflow.model.ReadInstruction)7 WorkItem (com.google.api.services.dataflow.model.WorkItem)4 ArrayList (java.util.ArrayList)4 MultiOutputInfo (com.google.api.services.dataflow.model.MultiOutputInfo)3 ParDoInstruction (com.google.api.services.dataflow.model.ParDoInstruction)3 StreamingComputationConfig (com.google.api.services.dataflow.model.StreamingComputationConfig)3 WriteInstruction (com.google.api.services.dataflow.model.WriteInstruction)3 ByteString (org.apache.beam.vendor.grpc.v1p43p2.com.google.protobuf.ByteString)3 FlattenInstruction (com.google.api.services.dataflow.model.FlattenInstruction)2 StreamingConfigTask (com.google.api.services.dataflow.model.StreamingConfigTask)2