Right, we’ve been trying this with little luck — largely because I get the
error:
Caused by: java.lang.ClassCastException:
org.apache.hadoop.hive.serde2.io.HiveCharWritable cannot be cast to
org.apache.hadoop.hive.ql.io.orc.OrcStruct
Code:
OrcFileSource<Verint1978Record> source = new
OrcFileSource<Verint1978Record>(new Path(inputPath),
Orcs.reflects(Verint1978Record.class));
PCollection<Verint1978Record> persons = pipeline.read(source);
Verint1978Record
public class Verint1978Record {
private String lct_nbr;
private String vid_caa_id;
private Integer hrs_nbr;
private Integer mte_nbr;
private Character acl_idc;
private Integer sec_dur;
private Integer sec_to_pcs;
private Integer sec_pcd;
private Character use_for_rpr_idc;
private Integer grp_cnt;
private Integer sng_cnt;
private String upd_dt;
private String upd_id;
private String cal_dt;
}
---------------------------------------------------------------------------
[cid:81A61E19-6323-41F7-A88E-590E34601268]
Landon Robinson
Big Data & Hadoop Engineer
IT Business Intelligence, Lowe’s Companies Inc.
---------------------------------------------------------------------------
From: David Ortiz <[email protected]<mailto:[email protected]>>
Date: Friday, January 29, 2016 at 10:19 AM
To: LCI <[email protected]<mailto:[email protected]>>,
Apache Crunch Mailing List
<[email protected]<mailto:[email protected]>>
Subject: Re: Reading Hive Tables into PCollection
http://hortonworks.com/blog/using-orcfile-cascading-apache-crunch/
Here's the java excerpt from that article to read into Avro class (I'm
assuming).
[code language=”Java”]
// Read an ORCFile using reflection-based serialization (slowest):
OrcFileSource<Person> source = new OrcFileSource<Person>(new Path(inputPath), \
Orcs.reflection(Person.class));
PCollection<Person> persons = pipeline.read(source);
On Fri, Jan 29, 2016 at 10:17 AM Robinson, Landon - Landon
<[email protected]<mailto:[email protected]>> wrote:
Orc format.
---------------------------------------------------------------------------
[cid:4743D013-31C4-407E-A06B-31ABF1E6414D]
Landon Robinson
Big Data & Hadoop Engineer
IT Business Intelligence, Lowe’s Companies Inc.
---------------------------------------------------------------------------
From: David Ortiz <[email protected]<mailto:[email protected]>>
Reply-To: Apache Crunch Mailing List
<[email protected]<mailto:[email protected]>>
Date: Thursday, January 28, 2016 at 1:22 PM
To: Apache Crunch Mailing List
<[email protected]<mailto:[email protected]>>
Subject: Re: Reading Hive Tables into PCollection
What format are they stored as?
On Thu, Jan 28, 2016 at 1:20 PM Robinson, Landon - Landon
<[email protected]<mailto:[email protected]>> wrote:
Crunch Gurus,
What is the Crunch-convenient or recommended way to read the contents of a Hive
table into a Pcollection?
Thanks!
Best,
Landon
---------------------------------------------------------------------------
Landon Robinson
Big Data & Hadoop Engineer
---------------------------------------------------------------------------
NOTICE: All information in and attached to the e-mails below may be
proprietary, confidential, privileged and otherwise protected from improper or
erroneous disclosure. If you are not the sender's intended recipient, you are
not authorized to intercept, read, print, retain, copy, forward, or disseminate
this message. If you have erroneously received this communication, please
notify the sender immediately by phone (704-758-1000) or by e-mail and destroy
all copies of this message electronic, paper, or otherwise.
By transmitting documents via this email: Users, Customers, Suppliers and
Vendors collectively acknowledge and agree the transmittal of information via
email is voluntary, is offered as a convenience, and is not a secured method of
communication; Not to transmit any payment information E.G. credit card, debit
card, checking account, wire transfer information, passwords, or sensitive and
personal information E.G. Driver's license, DOB, social security, or any other
information the user wishes to remain confidential; To transmit only
non-confidential information such as plans, pictures and drawings and to assume
all risk and liability for and indemnify Lowe's from any claims, losses or
damages that may arise from the transmittal of documents or including
non-confidential information in the body of an email transmittal. Thank you.
NOTICE: All information in and attached to the e-mails below may be
proprietary, confidential, privileged and otherwise protected from improper or
erroneous disclosure. If you are not the sender's intended recipient, you are
not authorized to intercept, read, print, retain, copy, forward, or disseminate
this message. If you have erroneously received this communication, please
notify the sender immediately by phone (704-758-1000) or by e-mail and destroy
all copies of this message electronic, paper, or otherwise.
By transmitting documents via this email: Users, Customers, Suppliers and
Vendors collectively acknowledge and agree the transmittal of information via
email is voluntary, is offered as a convenience, and is not a secured method of
communication; Not to transmit any payment information E.G. credit card, debit
card, checking account, wire transfer information, passwords, or sensitive and
personal information E.G. Driver's license, DOB, social security, or any other
information the user wishes to remain confidential; To transmit only
non-confidential information such as plans, pictures and drawings and to assume
all risk and liability for and indemnify Lowe's from any claims, losses or
damages that may arise from the transmittal of documents or including
non-confidential information in the body of an email transmittal. Thank you.
NOTICE: All information in and attached to the e-mails below may be
proprietary, confidential, privileged and otherwise protected from improper or
erroneous disclosure. If you are not the sender's intended recipient, you are
not authorized to intercept, read, print, retain, copy, forward, or disseminate
this message. If you have erroneously received this communication, please
notify the sender immediately by phone (704-758-1000) or by e-mail and destroy
all copies of this message electronic, paper, or otherwise.
By transmitting documents via this email: Users, Customers, Suppliers and
Vendors collectively acknowledge and agree the transmittal of information via
email is voluntary, is offered as a convenience, and is not a secured method of
communication; Not to transmit any payment information E.G. credit card, debit
card, checking account, wire transfer information, passwords, or sensitive and
personal information E.G. Driver's license, DOB, social security, or any other
information the user wishes to remain confidential; To transmit only
non-confidential information such as plans, pictures and drawings and to assume
all risk and liability for and indemnify Lowe's from any claims, losses or
damages that may arise from the transmittal of documents or including
non-confidential information in the body of an email transmittal. Thank you.