Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hive writing Error #60

Closed
nmaillard opened this issue Jul 12, 2013 · 3 comments
Closed

Hive writing Error #60

nmaillard opened this issue Jul 12, 2013 · 3 comments

Comments

@nmaillard
Copy link

Hi everyone

thanks for a great piece of software.
I am running cloudera CDH4.3 with hive .10 on a three node cluster.

I have created Hive "reading" and Hive "writing" tables pointing to my elasticsearch server.
I can read fine however when I try to push data as per your example:
INSERT OVERWRITE TABLE es_tasks_write select "false","titi","tata" from sample_table limit 10;

I get an error message:

2013-07-12 16:31:33,709 FATAL ExecReducer: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row (tag=0) {"key":{},"value":{"_col0":"false","_col1":"titi","_col2":"tata"},"alias":0}
at org.apache.hadoop.hive.ql.exec.ExecReducer.reduce(ExecReducer.java:258)
at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:506)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:447)
at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
at org.apache.hadoop.mapred.Child.main(Child.java:262)
Caused by: java.lang.ClassCastException: org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryStruct cannot be cast to [Ljava.lang.Object;
at org.elasticsearch.hadoop.hive.HiveValueWriter.write(HiveValueWriter.java:155)
at org.elasticsearch.hadoop.hive.HiveValueWriter.write(HiveValueWriter.java:56)
at org.elasticsearch.hadoop.hive.HiveValueWriter.write(HiveValueWriter.java:40)
at org.elasticsearch.hadoop.serialization.ContentBuilder.value(ContentBuilder.java:242)

@costin
Copy link
Member

costin commented Jul 13, 2013

Could you please post your ES mapping and Hive script (table creation and query)? It would help in reproducing the issue accurately.
Also any particular configuration changes to Hive that are worth mentioning?

@nmaillard
Copy link
Author

Hello

Thanks for the help it was actually my hive query that broke on some entries.

@costin
Copy link
Member

costin commented Jul 16, 2013

Thanks for the feedback - I've looked at the stacktrace and enhanced the HiveWriter to handle LazyBinary types as well (in addition to Lazy types).

@costin costin closed this as completed Jul 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants