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

Reading double in hive #157

Closed
jpparis-orange opened this Issue Mar 3, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@jpparis-orange
Copy link

jpparis-orange commented Mar 3, 2014

Hello!

I'm trying to read double value with hive. I have prepared a gist recreation here : https://gist.github.com/jpparis-orange/9321708#file-eshivedouble.

Here is the version of the different components I use:

  • elasticsearch-1.0.0
  • elasticsearch-hadoop-yarn.jar from 1.3.0.M2
  • hadoop-2.2.0-bin
  • hive-0.12.0-bin

If I select a double field in hive, I get the following exception:
Error: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row [Error getting row data with exception java.lang.ClassCastException: org.apache.hadoop.io.DoubleWritable cannot be cast to org.apache.hadoop.hive.serde2.io.DoubleWritable
at org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableDoubleObjectInspector.get(WritableDoubleObjectInspector.java:35)
at org.apache.hadoop.hive.serde2.SerDeUtils.buildJSONString(SerDeUtils.java:277)
...
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row [Error getting row data with exception java.lang.ClassCastException: org.apache.hadoop.io.DoubleWritable cannot be cast to org.apache.hadoop.hive.serde2.io.DoubleWritable
at org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableDoubleObjectInspector.get(WritableDoubleObjectInspector.java:35)
at org.apache.hadoop.hive.serde2.SerDeUtils.buildJSONString(SerDeUtils.java:277)
...
Caused by: java.lang.ClassCastException: org.apache.hadoop.io.DoubleWritable cannot be cast to org.apache.hadoop.hive.serde2.io.DoubleWritable
at org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableDoubleObjectInspector.get(WritableDoubleObjectInspector.java:35)
at org.apache.hadoop.hive.serde2.lazy.LazyUtils.writePrimitiveUTF8(LazyUtils.java:218)

jp

@costin costin closed this in 43c9507 Mar 4, 2014

@costin

This comment has been minimized.

Copy link
Member

costin commented Mar 4, 2014

Thanks for the detailed report - this has been fixed in master. Can you please check it out, build it locally and try it out? A simple gradlew -x test build should be enough. As an alternative you can wait for the nightly build to publish an artifact but that will take 20-30' until all the build plans complete.
Note that there's no yarn jar - the default one works in both environments.

Cheers,

@costin costin added bug labels Mar 4, 2014

@jpparis-orange

This comment has been minimized.

Copy link
Author

jpparis-orange commented Mar 4, 2014

Hi!
I have downloaded the master... and my test runs fine now.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.