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

hive3.1.2 on hadoop 3.2.1 JsonSerDe #225

Open
mrhjx2 opened this issue Jun 22, 2020 · 3 comments
Open

hive3.1.2 on hadoop 3.2.1 JsonSerDe #225

mrhjx2 opened this issue Jun 22, 2020 · 3 comments

Comments

@mrhjx2
Copy link

mrhjx2 commented Jun 22, 2020

load json type data
use JsonSerDe(1.3.8)

CREATE EXTERNAL TABLE test001(
e string COMMENT 'from deserializer',
p string COMMENT 'from deserializer',
t timestamp COMMENT 'from deserializer',
app string COMMENT 'from deserializer')
PARTITIONED BY (
dt string)
ROW FORMAT SERDE
'org.openx.data.jsonserde.JsonSerDe'
WITH SERDEPROPERTIES (
'ignore.malformed.json'='true')
STORED AS TEXTFILE;
there'not any problem when load data to hive;
but I get a issues exception msg on running SQL(select t from test001).
the exception msg is :
Exception in thread "main" java.lang.AbstractMethodError: Method org/openx/data/jsonserde/objectinspector/primitive/JavaStringTimestampObjectInspector.getPrimitiveWritableObject(Ljava/lang/Object;)Lorg/apache/hadoop/hive/serde2/io/TimestampWritableV2; is abstract
at org.openx.data.jsonserde.objectinspector.primitive.JavaStringTimestampObjectInspector.getPrimitiveWritableObject(JavaStringTimestampObjectInspector.java)
at org.apache.hadoop.hive.serde2.lazy.LazyUtils.writePrimitiveUTF8(LazyUtils.java:308)
at org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.serialize(LazySimpleSerDe.java:292)
at org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.serializeField(LazySimpleSerDe.java:247)

there is no problem when run SQL(select p from test001).

@rcongiu
Copy link
Owner

rcongiu commented Aug 11, 2020

can you attach files with the table definition and the sample data that causes the error ? The create table is garbled and without the data you're running I can't reproduce the error.

@rentaow
Copy link

rentaow commented Aug 26, 2020

I can hit this issue as well. This is likely an incompatibility issue with Hive 3.x due to some model change in the hive timestamp object.

I can repro with the follow statement and running on Hive version 3.1.2

CREATE TABLE t1(
a string,
t timestamp)
ROW FORMAT SERDE
'org.openx.data.jsonserde.JsonSerDe'
WITH SERDEPROPERTIES (
'ignore.malformed.json'='true');

insert into t1 select 'aaa',current_timestamp();

Status: Failed Vertex failed, vertexName=Map 1, vertexId=vertex_1598478619392_0002_1_00, diagnostics=[Task failed, taskId=task_1598478619392_0002_1_00_000000, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : java.lang.RuntimeException: java.lang.NoSuchMethodError: org.apache.hadoop.hive.serde2.objectinspector.primitive.TimestampObjectInspector.getPrimitiveJavaObject(Ljava/lang/Object;)Ljava/sql/Timestamp; at org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:101) at org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.pushRecord(MapRecordSource.java:76) at org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.run(MapRecordProcessor.java:419) at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:267) at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:250)

@rcongiu
Copy link
Owner

rcongiu commented Aug 26, 2020

thanks, I'll have a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants