Created
February 27, 2018 10:34
-
-
Save mustafaakin/c24b009834ca24f83baf1aff7229bb4c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Configuration conf = new Configuration(); | |
| Path p = new Path("data.parquet"); // This is not java.nio.file.Path | |
| ParquetWriter<FlowLogs> writer = AvroParquetWriter.<FlowLog>builder(p) | |
| .withSchema(ReflectData.AllowNull.get().getSchema(FlowLog.class)) | |
| .withDataModel(ReflectData.get()) | |
| .withConf(conf) | |
| .withCompressionCodec(CompressionCodecName.SNAPPY) | |
| .withWriteMode(Mode.OVERWRITE) | |
| .build(); | |
| FlowLog flowLog = new FlowLog().setVersion(...) | |
| writer.write(flowLog) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment