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

iqih9akk  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(478)

我已经成功地创建了一个表,但是当我加载从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';

请引导我。谢谢

ecr0jaav

ecr0jaav1#

检查您的配置单元日志文件,您可以获得一些异常的附加信息。或者请粘贴日志文件的异常部分。

相关问题