简体   繁体   English

失败:执行错误,从org.apache.hadoop.hive.ql.exec.DDLTask返回代码1。 组织/ apache / hadoop / hive / serde2 / SerDe

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

I am processing the twitter data to hive external table, but while creating hive external table I get an error. 我正在处理Twitter数据到配置单元外部表,但是在创建配置单元外部表时出现错误。 Please look into the my code in below. 请在下面查看我的代码。

  1. Added the jar file to move the hive/lib location. 添加了jar文件以移动hive / lib位置。
  2. Added to the jar file hive by using following command 使用以下命令将其添加到jar文件配置单元中
    I have add the flowing jars in hive lib directory: 我在蜂巢lib目录中添加了流动的jar:

     ADD JAR /usr/local/hive/lib/hive-serdes-1.0-SNAPSHOT.jar; 

    Please find the external hive table: 请找到外部配置单元表:

     CREATE EXTERNAL TABLE Mytweets_raw ( id BIGINT, created_at STRING, source STRING, favorited BOOLEAN, retweet_count INT, retweeted_status STRUCT<text:STRING,tuser: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, tuser 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 'hdfs://localhost:54310/data/tweets_raw'; 

    After this I am getting following error message, please any body can help on this? 在此之后,我收到以下错误消息,请任何机构对此提供帮助?

More information: My current environment is 详细信息:我当前的环境是

  • Hadoop 2.9.0 Hadoop 2.9.0
  • Hive 2.3.2 蜂巢2.3.2

This worked for me, I just needed to replace the serde format from 'com.cloudera.hive.serde.JSONSerDe' to 'org.openx.data.jsonserde.JsonSerDe', and the error was resolved in my case. 这对我有用,我只需要将serde格式从'com.cloudera.hive.serde.JSONSerDe'替换为'org.openx.data.jsonserde.JsonSerDe',错误就可以解决了。 Good luck !! 祝好运 !!

 CREATE EXTERNAL TABLE tweets4 (
    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 'org.openx.data.jsonserde.JsonSerDe'
 LOCATION '/twitter-project/project1';

Error code 1 signifies permission issue. 错误代码1表示权限问题。 It will be really difficult to identify the issue (Mostly environment issue). 很难确定问题(大多数是环境问题)。 There can be many reasons why we are getting this error. 我们收到此错误的原因可能有很多。 Try below cases and see if you are getting same error. 请尝试以下情况,看看是否遇到相同的错误。

1) Check you have permissions to create tables(Hive path). 1)检查您是否有权创建表(配置单元路径)。

2) Create simple Hive external table(You can confirm you have access for meta store) 2)创建简单的Hive外部表(您可以确认您有权访问元存储)

3) Create Simple External Hive table by pointing to HDFS location( You can confirm your access permissions for HDFS path) 3)通过指向HDFS位置创建简单的外部Hive表(您可以确认对HDFS路径的访问权限)

4) Create Simple External Hive table by pointing to local path ( You can confirm your access permissions for local path) 4)通过指向本地路径创建简单的外部Hive表(您可以确认对本地路径的访问权限)

5) Check you have 777 permissions for the jar location. 5)检查您对jar位置具有777权限。

I suggest try multiple cases where there is possibility of permission issue apart from the above. 我建议尝试除上述情况之外还有许可问题的多种情况。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 创建配置单元表时出错:失败:执行错误,从org.apache.hadoop.hive.ql.exec.DDLTask返回代码1。 元异常 - Error creating hive table: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException 执行错误,从org.apache.hadoop.hive.ql.exec.DDLTask返回代码1。 COM /的MongoDB / UTIL / JSON - Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. com/mongodb/util/JSON Hive Erro-失败:执行错误,从org.apache.hadoop.hive.ql.exec.DDLTask返回代码1 - Hive Erro- FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask Hive存档分区(动态)失败:执行错误,从org.apache.hadoop.hive.ql.exec.DDLTask返回代码1 - Hive archive partition(dynamic) FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask 来自 org.apache.hadoop.hive.ql.exec.mapredtask 的配置单元执行错误返回代码 2 失败 - hive failed execution error return code 2 from org.apache.hadoop.hive.ql.exec.mapredtask Hive:失败:执行错误,从org.apache.hadoop.hive.ql.exec.mr.MapRedTask返回代码2 - Hive : FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask 失败:执行错误,从 org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask​​ 返回代码 1 - FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask Hive:执行错误,从org.apache.hadoop.hive.ql.exec.FunctionTask返回代码-101 - Hive:Execution Error, return code -101 from org.apache.hadoop.hive.ql.exec.FunctionTask Hive 错误:失败:执行错误,从 org.apache.hadoop.hive.ql.exec.mr.MapRedTask 返回代码 2 - Hive Error : FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask 失败:执行错误,在Hive中进行联接操作期间,从org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask​​返回代码2 - FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask during join operation in hive
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM