从hdfs加载数据时,配置单元格格式错误

时间:2015-07-26 11:30:08

标签: hadoop hive flume

我已经成功创建了一个表但是当加载存储在从twitter发送的hdfs中的数据时我得到了错误:

"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"

我不知道接下来该做什么。这是创作:

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';

请指导我。 感谢

1 个答案:

答案 0 :(得分:0)

签入您的Hive日志文件,您可以获得有关异常的一些其他信息。或者请粘贴日志文件的异常部分。