phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lk_phoenix"<lk_phoe...@163.com>
Subject Re: ClassCastException: org.joda.time.DateTime
Date Mon, 05 Dec 2016 08:16:01 GMT
I know what's wrong. I need use phoenix-4.9.0-HBase-1.2-pig.jar not phoenix-4.9.0-HBase-1.2-client.jar.

2016-12-05 

lk_phoenix 



发件人:"lk_phoenix"<lk_phoenix@163.com>
发送时间:2016-12-05 13:41
主题:ClassCastException: org.joda.time.DateTime
收件人:"user.phoenix"<user@phoenix.apache.org>
抄送:

hi,all: 
I have a test under centos7.2 JDK1.8.0_112 apache-phoenix-4.9.0-HBase-1.2 pig-0.16.0. I still
got same error : 
Error: java.io.IOException: java.lang.ClassCastException: org.joda.time.DateTime cannot be
cast to org.apache.phoenix.shaded.org.joda.time.DateTime at 
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.StoreFuncDecorator.putNext(StoreFuncDecorator.java:83)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat$PigRecordWriter.write(PigOutputFormat.java:144)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat$PigRecordWriter.write(PigOutputFormat.java:97)
at org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector.write(MapTask.java:658) at org.apache.hadoop.mapreduce.task.TaskInputOutputContextImpl.write(TaskInputOutputContextImpl.java:89)
at org.apache.hadoop.mapreduce.lib.map.WrappedMapper$Context.write(WrappedMapper.java:112)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapOnly$Map.collect(PigMapOnly.java:48)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.runPipeline(PigGenericMapBase.java:282)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.map(PigGenericMapBase.java:275)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.map(PigGenericMapBase.java:65)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:146) at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) at
org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158) Caused by: java.lang.ClassCastException:
org.joda.time.DateTime cannot be cast to org.apache.phoenix.shaded.org.joda.time.DateTime
at org.apache.phoenix.pig.util.TypeUtil.castPigTypeToPhoenix(TypeUtil.java:199) at org.apache.phoenix.pig.PhoenixHBaseStorage.putNext(PhoenixHBaseStorage.java:189)
at
my sourcedata :
AA,CC,3.5,EE,GG,2015-08-30
BB,DD,3.5,FF,HH,2015-08-05
pig script:
AA = load '/sourcedata/farm-prod/complete3.txt' USING PigStorage(',') AS(
name:chararray,
address:chararray,
price:double,
unit:chararray,
info_source:chararray,
date:datetime
);
dump AA;
out put :
(AA,CC,3.5,EE,GG,2015-08-30T00:00:00.000-04:00)
(BB,DD,3.5,FF,HH,2015-08-05T00:00:00.000-04:00)
STORE AA into 'hbase://FARM_PRODUCT_PRICE' using org.apache.phoenix.pig.PhoenixHBaseStorage('dev7,dev8,dev9','-batchSize
5000');
my phoenix table :
create table FARM_PRODUCT_PRICE
(
name varchar(30),
address varchar(80),
price double,
unit varchar(20),
info_source varchar(80),
date date not null CONSTRAINT pk PRIMARY KEY (name,address,date)
)VERSIONS=1,SALT_BUCKETS=3,COMPRESSION='snappy';

2016-12-05


lk_phoenix 
Mime
View raw message