Skip to content

Instantly share code, notes, and snippets.

@mustafaakin
Created February 27, 2018 10:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mustafaakin/c24b009834ca24f83baf1aff7229bb4c to your computer and use it in GitHub Desktop.
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