Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Tutorial for writing directly to ORC files with Java

avatar
Super Guru

Are there any current or recent tutorials that cover writing data directly to ORC files via a Java application? The ORC files will be used by Hive.

I've seen this: http://hortonworks.com/blog/using-orcfile-cascading-apache-crunch/ but it is a little dated. Is there anything newer or more detailed? This is a similar link: https://codecheese.wordpress.com/2016/04/20/writing-an-orc-file-using-java/.

Also are there any reasons to /not/ write directly to ORC files?

1 ACCEPTED SOLUTION

avatar

@Michael Young

The example in the second link you provided is good. I would also recommend taking a look at the examples in the link below for different kinds of manipulations/actions you can do to/with ORC files through java.

http://www.programcreek.com/java-api-examples/index.php?api=org.apache.hadoop.hive.ql.io.orc.OrcFile

View solution in original post

8 REPLIES 8

avatar

@Michael Young

The example in the second link you provided is good. I would also recommend taking a look at the examples in the link below for different kinds of manipulations/actions you can do to/with ORC files through java.

http://www.programcreek.com/java-api-examples/index.php?api=org.apache.hadoop.hive.ql.io.orc.OrcFile

avatar
Super Guru

Thank you. This is a handy link.

avatar
Super Guru

Customer indicated this link was the most useful for them.

avatar
Super Guru
@Michael Young

I am reasonably sure you are aware of the core-java api of Apache ORC. Is this link not enough?

https://orc.apache.org/docs/core-java.html

avatar
Super Guru

Thank you.

This question is on behalf of someone else. I'm not sure if they are aware of that or not. I'll pass the information along.

avatar
New Contributor

I just built and release a 1.0 version of an Apache licensed java library to create ORC files from optionally annotated classes. I'd appreciate people trying it out and suggesting features to add. The library is available at github