简体   繁体   中英

Error of Wrong Format in hive while loading data from hdfs

I have successfully created a table but when m loading the data stored in hdfs streamed from twitter i got the error:

"Loading data to table default.tweets
Failed with exception Wrong file format. Please check the file's format.
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask"

I dont know what to do next . Here is the creation:

CREATE EXTERNAL TABLE tweets (
    >    id BIGINT,
    >    created_at STRING,
    >    source STRING,
    >    favorited BOOLEAN,
    >    retweet_count INT,
    >    retweeted_status STRUCT<
    >       text:STRING,
    >       user:STRUCT<screen_name:STRING,name:STRING>>,
    >    entities STRUCT<
    >       urls:ARRAY<STRUCT<expanded_url:STRING>>,
    >       user_mentions:ARRAY<STRUCT<screen_name:STRING,name:STRING>>,
    >       hashtags:ARRAY<STRUCT<text:STRING>>>,
    >    text STRING,
    >    user 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/flume/tweets';

Please guide me. Thanks

Check in your Hive log files, you can get some additional information of the exception. Or please paste the exception part of log file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM