【问题标题】:SQOOP Mysql import to Hive error User does not belong to hiveSQOOP Mysql import to Hive报错用户不属于hive
【发布时间】:2023-03-21 03:55:01
【问题描述】:

当我使用此命令将表导入 Hive 时

sqoop import \
--connect jdbc:mysql://192.168.200.33:3306/db_socmed_gp \
--username=fanta \
--password=fanta \
--table=tb_gp_account \
--hive-import \
--hive-database=db_socmed_gp \
--target-dir=home/fanta/db_socmed_gp2 \
--driver com.mysql.jdbc.Driver \
--direct

sqoop 将数据导入 Hive 时出现错误:

Loading data to table db_socmed_gp.tb_gp_account
chgrp: changing ownership of 'hdfs://lobah:8021/user/hive/warehouse/db_socmed_gp.db/tb_gp_account/part-m-00000': User does not belong to hive
chgrp: changing ownership of 'hdfs://lobah:8021/user/hive/warehouse/db_socmed_gp.db/tb_gp_account/part-m-00001': User does not belong to hive
chgrp: changing ownership of 'hdfs://lobah:8021/user/hive/warehouse/db_socmed_gp.db/tb_gp_account/part-m-00002': User does not belong to hive
chgrp: changing ownership of 'hdfs://lobah:8021/user/hive/warehouse/db_socmed_gp.db/tb_gp_account/part-m-00003': User does not belong to hive
Table db_socmed_gp.tb_gp_account stats: [numFiles=4, totalSize=21254586]

【问题讨论】:

  • 您使用的是 HDP 还是 Cloudera?如果你在命令行中执行groups(同一个用户运行Sqoop命令),它会显示什么?

标签: mysql hadoop sqoop


【解决方案1】:

您试图不属于 hadoop/Hive 组的用户来修改仓库目录的内容。为用户组授予必要的权限,然后重试。

【讨论】:

    【解决方案2】:

    我也遇到了这个问题 你应该把德比改成mysql 那就试试吧。。

    【讨论】:

      猜你喜欢
      • 2011-10-25
      • 2012-06-14
      • 2018-09-17
      • 1970-01-01
      • 2017-08-21
      • 1970-01-01
      • 2017-07-01
      • 1970-01-01
      • 2016-08-07
      相关资源
      最近更新 更多