Skip to content

mcneiljt/orcmaker

Repository files navigation

Orc Maker

A library for creating Orc files from buffered JSON input.

Usage

Instantiate BasicEventDriver e.g.

BufferedOrcWriter bufferedOrcWriter = new BufferedOrcWriter(TypeDescription.fromString("struct<name:string,age:int,car:string>"), new Path("test-" + timestamp + ".orc"));

To add events to the orcfile call addMessage e.g.

bufferedOrcWriter.write("{\"name\":\"John\",\"age\":30,\"car\":null}");
bufferedOrcWriter.write("{\"name\":\"Jane\",\"age\":25,\"car\":\"Honda\"}");

Finally flush the buffer to the orcfile with flush e.g.

bufferedOrcWriter.flush();