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.

select from a serdex table in Hive

select from a serdex table in Hive

New Contributor

Hi,

I have a table as below description. when I want to select from this table or even I want to drop the table , I get error as attached in serverlog.

please help what I have to do .I need to add that when I select from other table it shows the result.

Table Description :

hiveserver2-2-txt.txthiveserver2-txt.txt

create external table carry_log ( Time STRING, code STRING, INFO STRING, EXPR STRING ) ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe' WITH SERDEPROPERTIES ( "input.regex"="(\\d{2}:\\d{2}:\\d{2}),(\\d{3})\\s(\\w{4})\\s\\s(.*)" ) STORED AS TEXTFILE LOCATION '/tmp/access_logs/';

2 REPLIES 2
Highlighted

Re: select from a serdex table in Hive

Cloudera Employee

Your classpath (I'm assuming that's what it is at the top of one of your logs) is showing multiple different versions of hive-contrib.jar, which may be conflicting with each other:

/usr/iop/4.1.0.0/hive/lib/hive-cli.jar:/usr/iop/4.1.0.0/hive/lib/hive-common-1.2.1-IBM-12.jar:/usr/iop/4.1.0.0/hive/lib/hive-common.jar:/usr/iop/4.1.0.0/hive/lib/hive-contrib-0.8.1.jar

You should only have 1 version of hive libs in the classpath otherwise you don't know which version may be getting used. Also consider using org.apache.hadoop.hive.serde2.RegexSerde (it was eventually moved from hive-contrib over to hive-serde

Re: select from a serdex table in Hive

New Contributor

ok let me try , thanks