Execution error, return code 1 when trying to create an external table in Hive

496 views Asked by At

I have searched and tried all solutions online and I seem to be getting the same error when trying to create an external table in hive:

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org/apache/hadoop/hive/serde2/SerDe

I am trying to create an external table, populating it with data I extracted from Twitter using Flume. My extracted data is located in hdfs storage system : /user/hadoop/twitter_data.

I did the following:

  1. Downloaded hive-serdes-1.0-SNAPSHOT.jar from Cloudera.

  2. Add jar /home/hadoop/Desktop/Flume_cheat/twitter/hive-serdes-1.0-SNAPSHOT.jar.

  3. create external table Twitter_Flume3 (id BIGINT,created_at STRING,source STRING,favorited BOOLEAN,retweet_count INT,retweeted_status STRUCT<text:STRING,user1:STRUCT<screen_name:STRING,name:STRING>>,entities STRUCT<urls:ARRAY<STRUCT<expanded_url:STRING>>,user2_mentions:ARRAY<STRUCT<screen_name:STRING,name:STRING>>,hashtags:ARRAY<STRUCT<text:STRING>>>,text STRING,user3 STRUCT<screen_name:STRING,name:STRING,friends_count:INT,followers_count:INT,statuses_count:INT,verified:BOOLEAN,utc_offset:INT,time_zone:STRING>,in_reply_to_screen_name STRING) ROW FORMAT SERDE 'com.cloudera.hive.serde.JSONSerDe' LOCATION '/user/training/flume_result';

  4. FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org/apache/hadoop/hive/serde2/SerDe

Version

  • Hadoop version 3.2.1
  • Hive version 3.1.2
0

There are 0 answers