File tree Expand file tree Collapse file tree
carpet-record/src/main/java/com/jerolba/carpet Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939 * A Parquet file writer for writing java records of type T to a file or output
4040 * stream. The writer is also a consumer that can be used with Java 8 streams.
4141 *
42+ * Creates a ParquetWriter with this configuration:
43+ *
44+ * <pre>{@code
45+ * .withWriteMode(Mode.OVERWRITE)
46+ * .withWriterVersion(WriterVersion.PARQUET_2_0)
47+ * .withCompressionCodec(CompressionCodecName.SNAPPY)
48+ *
49+ * }</pre>
50+ *
4251 * @param <T> The type of records to write.
4352 */
4453public class CarpetWriter <T > implements Closeable , Consumer <T > {
@@ -141,6 +150,7 @@ public static class Builder<T> {
141150 public Builder (OutputFile path , Class <T > recordClass ) {
142151 builder = CarpetParquetWriter .builder (path , recordClass )
143152 .withWriteMode (Mode .OVERWRITE )
153+ .withWriterVersion (WriterVersion .PARQUET_2_0 )
144154 .withCompressionCodec (CompressionCodecName .SNAPPY );
145155 }
146156
You can’t perform that action at this time.
0 commit comments