Skip to content
This repository was archived by the owner on Nov 11, 2022. It is now read-only.

Revert PR-427 to re-enable streaming bounded read #428

Merged
merged 1 commit into from
Sep 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -361,15 +361,7 @@ public static DataflowPipelineRunner fromOptions(PipelineOptions options) {
builder.put(View.AsList.class, StreamingViewAsList.class);
builder.put(View.AsIterable.class, StreamingViewAsIterable.class);
builder.put(Read.Unbounded.class, StreamingUnboundedRead.class);
if (options.getExperiments() == null
|| !options.getExperiments().contains("enable_streaming_bounded_read")) {
builder.put(Read.Bounded.class, UnsupportedIO.class);
builder.put(AvroIO.Read.Bound.class, UnsupportedIO.class);
builder.put(BigQueryIO.Read.Bound.class, UnsupportedIO.class);
builder.put(TextIO.Read.Bound.class, UnsupportedIO.class);
} else {
builder.put(Read.Bounded.class, StreamingBoundedRead.class);
}
builder.put(Read.Bounded.class, StreamingBoundedRead.class);
builder.put(AvroIO.Write.Bound.class, UnsupportedIO.class);
builder.put(Window.Bound.class, AssignWindows.class);
// In streaming mode must use either the custom Pubsub unbounded source/sink or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
import com.google.cloud.dataflow.sdk.coders.Coder;
import com.google.cloud.dataflow.sdk.coders.VarLongCoder;
import com.google.cloud.dataflow.sdk.io.AvroIO;
import com.google.cloud.dataflow.sdk.io.AvroSource;
import com.google.cloud.dataflow.sdk.io.BigQueryIO;
import com.google.cloud.dataflow.sdk.io.Read;
import com.google.cloud.dataflow.sdk.io.TextIO;
import com.google.cloud.dataflow.sdk.options.DataflowPipelineDebugOptions;
Expand Down Expand Up @@ -930,33 +928,6 @@ private void testUnsupportedSource(PTransform<PInput, ?> source, String name, bo
p.run();
}

@Test
public void testBoundedSourceUnsupportedInStreaming() throws Exception {
testUnsupportedSource(
AvroSource.readFromFileWithClass("foo", String.class), "Read.Bounded", true);
}

@Test
public void testBigQueryIOSourceUnsupportedInStreaming() throws Exception {
testUnsupportedSource(
BigQueryIO.Read.from("project:bar.baz").withoutValidation(), "BigQueryIO.Read", true);
}

@Test
public void testAvroIOSourceUnsupportedInStreaming() throws Exception {
testUnsupportedSource(AvroIO.Read.from("foo"), "AvroIO.Read", true);
}

@Test
public void testTextIOSourceUnsupportedInStreaming() throws Exception {
testUnsupportedSource(TextIO.Read.from("foo"), "TextIO.Read", true);
}

@Test
public void testReadBoundedSourceUnsupportedInStreaming() throws Exception {
testUnsupportedSource(Read.from(AvroSource.from("/tmp/test")), "Read.Bounded", true);
}

@Test
public void testReadUnboundedUnsupportedInBatch() throws Exception {
testUnsupportedSource(Read.from(new TestCountingSource(1)), "Read.Unbounded", false);
Expand Down