Skip to content

Commit

Permalink
Disable use of GcsIOChannelFactory on Query 10
Browse files Browse the repository at this point in the history
  • Loading branch information
iemejia authored and echauchot committed May 9, 2017
1 parent e2f6c81 commit 4ba9a1b
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import org.apache.beam.sdk.transforms.windowing.PaneInfo.Timing;
import org.apache.beam.sdk.transforms.windowing.Repeatedly;
import org.apache.beam.sdk.transforms.windowing.Window;
import org.apache.beam.sdk.util.GcsIOChannelFactory;
import org.apache.beam.sdk.values.KV;
import org.apache.beam.sdk.values.PCollection;
import org.joda.time.Duration;
Expand Down Expand Up @@ -133,11 +132,13 @@ public void setMaxNumWorkers(int maxNumWorkers) {
*/
private WritableByteChannel openWritableGcsFile(GcsOptions options, String filename)
throws IOException {
WritableByteChannel channel =
GcsIOChannelFactory.fromOptions(options).create(filename, "text/plain");
checkState(channel instanceof GoogleCloudStorageWriteChannel);
((GoogleCloudStorageWriteChannel) channel).setUploadBufferSize(CHANNEL_BUFFER);
return channel;
//TODO Decide what to do about this one
// WritableByteChannel channel =
// GcsIOChannelFactory.fromOptions(options).create(filename, "text/plain");
// checkState(channel instanceof GoogleCloudStorageWriteChannel);
// ((GoogleCloudStorageWriteChannel) channel).setUploadBufferSize(CHANNEL_BUFFER);
// return channel;
throw new UnsupportedOperationException("Disabled after removal of GcsIOChannelFactory");
}

/** Return a short string to describe {@code timing}. */
Expand Down

0 comments on commit 4ba9a1b

Please sign in to comment.