Skip to content

Commit

Permalink
Add withCompression to TextIO.Write
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-winkelman committed Jul 18, 2018
1 parent c14c975 commit bf02368
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,15 @@ public Write withWritableByteChannelFactory(
return new Write(inner.withWritableByteChannelFactory(writableByteChannelFactory));
}

/**
* See {@link TypedWrite#withCompression(Compression)}.
*/
public Write withCompression(Compression compression) {
checkArgument(compression != null, "compression can not be null");
return withWritableByteChannelFactory(
FileBasedSink.CompressionType.fromCanonical(compression));
}

/** See {@link TypedWrite#withWindowedWrites}. */
public Write withWindowedWrites() {
return new Write(inner.withWindowedWrites());
Expand Down

0 comments on commit bf02368

Please sign in to comment.