Hello,

After investigating further, now I am able to read the column-data from 
ORC-file, using the following sample-program.



However, I would like to understand, whether this is the right-approach 
(or) if there is any other (better?) approach to read ORC-files. Could you 
please provide your inputs on the same.

Thanks,
 Ravi



From:   Ravi Tatapudi/India/IBM
To:     [email protected]
Cc:     Sumit Kumar6/India/IBM@IBMIN, Eric Jacobson/Worcester/IBM@IBMUS
Date:   12/02/2015 04:54 PM
Subject:        Facing issues while reading ORC files


Hello,

Sending the same mail, with corrected-subject-line. 

Using the attached simple program (orcrd.java), I am able to read the 
column-types, column names & print the data-row, which is getting printed 
as: {1, hello, orcFile}", from the attached ORC-file: "orcfile1".
However, when I try to get individual field-values, from this row (by 
reading the row as "OrcRow"), I am getting the exception: 
java.lang.ClassCastException: org.apache.hadoop.hive.ql.io.orc.OrcStruct 
incompatible with orcrd$OrcRow

[attachment "orcrd.java" deleted by Ravi Tatapudi/India/IBM] [attachment 
"orcfile1" deleted by Ravi Tatapudi/India/IBM] 

Could you please see the sample-program reading from the attached file 
("orcfile1") & let me know, how to read individual "field-values" from 
each-row. 

Thanks,
 Ravi


Attachment: orcrd.java
Description: Binary data

Reply via email to