Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Datetime Error

Highlighted

Datetime Error

Explorer

For a pig script I am executing the following statement A = LOAD 'hbase://query/select * from TABLE_NAME where (DATE_1 >= to_date(\'2017-10-12 07:00:00\') and DATE < to_date(\'2017-10-14 07:00:00\')) OR (OTHER_DATE >= to_date(\'2017-10-12 07:00:00\') and OTHER_DATE < to_date(\'2017-10-14 07:00:00\'))' USING org.apache.phoenix.pig.PhoenixHBaseLoader('hbase_connection') AS (DATE_1:DATETIME, OTHER_DATE_2:DATETIME, DATE_3:DATETIME, ID:INT);

X = LIMIT A 5;

DUMP X;

This throws a runtime exception : ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2135: Received error from store function.java.lang.RuntimeException: Unexpected data type org.apache.phoenix.shaded.org.joda.time.DateTime found stream. Note only standard Pig type is supported when you output from UDF/LoadFunc

2 REPLIES 2

Re: Datetime Error

Rising Star

Seems like a data issue.

Highlighted

Re: Datetime Error

Explorer

This was an issue the JodaTime Class dependencies in the Pheonix-Pig and Pheonix-Client jars: https://issues.apache.org/jira/browse/PHOENIX-3240

The JodaTime class dependency needs to be removed/shaded from one of the Jars to prevent conflicts. Recommend working with HW support for a patch or upgrading to the latest version of Pheonix.

Don't have an account?
Coming from Hortonworks? Activate your account here