沈阳外贸网站制作公司,广西桂林现在能去吗,商城建站报价方案,有必要代理网页的网址此篇博客仅记录在使用sqoop时遇到的各种问题。持续更新#xff0c;有问题评论区一起探讨#xff0c;写得有不足之处见谅。
Oracle_to_hive
1. main ERROR Could not register mbeans java.security.AccessControlException: access denied (javax.management.MBeanTr… 此篇博客仅记录在使用sqoop时遇到的各种问题。持续更新有问题评论区一起探讨写得有不足之处见谅。
Oracle_to_hive
1. main ERROR Could not register mbeans java.security.AccessControlException: access denied (javax.management.MBeanTrustPermission register)
日期20241031
原因分析Sqoop 在执行导入时依赖了 HiveHive 启用了 Log4j 的 JMX 功能在没有足够权限的情况下尝试注册 MBeans 时被阻止从而引发该错误
解决方法
修改jdk的文件找到jdk安装目录/jre/lib/security/java.policy
具体配置如下在文件中添加如下内容 permission javax.management.MBeanTrustPermission register; 2. org.apache.atlas.AtlasException: Failed to load application yaml当集群配置了atlas时可能会遇到此问题
日期20241031
原因分析无法在classpath提及的目录中找到application-atlas.yml文件 将找到的配置文件拷贝到classpath起止一个地址中 3. cannot recognize input near , gcrq_month , in column type 24/10/31 17:05:16 ERROR ql.Driver: FAILED: ParseException line 1:895 cannot recognize input near , gcrq_month , in column type org.apache.hadoop.hive.ql.parse.ParseException: line 1:895 cannot recognize input near , gcrq_month , in column type。sqoop只支持单分区问题
日期20241031
原因分析导入数据到hive表时使用了多个分区字段 源码级别解析可以看Sqoop 数据导入多分区Hive解决方法_sqoop import 多个分区-CSDN博客
换种简单的解决方式通过HCatalog解决先查看是否安装HCatalog 然后参数使用HCatalog:
--split-by MINUTE \ --hive-import \ --hive-table ods_pre_dat_dcsj_time \ --target-dir /user/sqoop/hive/oracle_to_hive/ods_pre_dat_dcsj_time \ --delete-target-dir \ -- --hive-drop-import-delims \--hcatalog-database dw \ --hcatalog-table ods_pre_dat_dcsj_time \ --hcatalog-storage-stanza stored as orc \ --hcatalog-partition-keys gcrq_year,gcrq_month,gcrq_day \ --hcatalog-partition-values ${gcrq_year},${gcrq_month},${gcrq_day} \ --num-mappers 3
4. FAILED: HiveAuthzPluginException Error getting permissions for hdfs://udh/user/sqoop/hive/oracle_to_hive/ods_pre_dat_dcsj_time : Unauthorized connection for super-user: hive from IP /xxx.xxx.xxx.xxx
日期20241101
原因分析猜测权限问题其中xxx.xxx.xxx.xxx为我提交sqoop命令所在的服务器“hive ”为我在服务器上以hive用户身份提交sqoop。我在sqoop命令中指定存放数据的临时目录为--target-dir /user/sqoop/hive/oracle_to_hive/ods_pre_dat_dcsj_time查看一下此目录的权限 发现存放临时数据目录下是有数据文件的再看看它的父目录 尝试用hdfs dfs -chown修改其父目录权限改为拥有者为hive。再次执行还是报错。 转换下思路难道是hive的权限限制问题Unauthorized connection for super-user: hive from IP /10.81.35.162大白话翻译超级用户的未经授权的连接。而在 Hive 中hive 用户通常是一个默认的超级用户具备访问和操作 Hive 的所有权限 在hdfs的core-site文件中配置
property namehadoop.proxyuser.hive.groups/name value*/value !-- 允许所有用户组访问 -- /property property namehadoop.proxyuser.hive.hosts/name valuexxx.xxx.xxx.xxx/value !-- 允许特定 IP 地址访问 多ip逗号分隔-- /property
ambari修改的话一般在HDFS的自定义core-site中改为以上配置后需要先重启HDFS再重启HIve 文章转载自: http://www.morning.lxbml.cn.gov.cn.lxbml.cn http://www.morning.knscf.cn.gov.cn.knscf.cn http://www.morning.wqpsf.cn.gov.cn.wqpsf.cn http://www.morning.ggfdq.cn.gov.cn.ggfdq.cn http://www.morning.pqppj.cn.gov.cn.pqppj.cn http://www.morning.nwtmy.cn.gov.cn.nwtmy.cn http://www.morning.sxtdh.com.gov.cn.sxtdh.com http://www.morning.nrrzw.cn.gov.cn.nrrzw.cn http://www.morning.dgwrz.cn.gov.cn.dgwrz.cn http://www.morning.cxsdl.cn.gov.cn.cxsdl.cn http://www.morning.czxrg.cn.gov.cn.czxrg.cn http://www.morning.jkpnm.cn.gov.cn.jkpnm.cn http://www.morning.gftnx.cn.gov.cn.gftnx.cn http://www.morning.wjlnz.cn.gov.cn.wjlnz.cn http://www.morning.bsqkt.cn.gov.cn.bsqkt.cn http://www.morning.ztmkg.cn.gov.cn.ztmkg.cn http://www.morning.pfkrw.cn.gov.cn.pfkrw.cn http://www.morning.fflnw.cn.gov.cn.fflnw.cn http://www.morning.xjpnq.cn.gov.cn.xjpnq.cn http://www.morning.xmwdt.cn.gov.cn.xmwdt.cn http://www.morning.rkjz.cn.gov.cn.rkjz.cn http://www.morning.gwxwl.cn.gov.cn.gwxwl.cn http://www.morning.tqhpt.cn.gov.cn.tqhpt.cn http://www.morning.fstdf.cn.gov.cn.fstdf.cn http://www.morning.tddrh.cn.gov.cn.tddrh.cn http://www.morning.fxygn.cn.gov.cn.fxygn.cn http://www.morning.kdfqx.cn.gov.cn.kdfqx.cn http://www.morning.ssqwr.cn.gov.cn.ssqwr.cn http://www.morning.zwgbz.cn.gov.cn.zwgbz.cn http://www.morning.bqdgr.cn.gov.cn.bqdgr.cn http://www.morning.ho-use.cn.gov.cn.ho-use.cn http://www.morning.fnmtc.cn.gov.cn.fnmtc.cn http://www.morning.qpqwd.cn.gov.cn.qpqwd.cn http://www.morning.lfjmp.cn.gov.cn.lfjmp.cn http://www.morning.rlzxr.cn.gov.cn.rlzxr.cn http://www.morning.hnmbq.cn.gov.cn.hnmbq.cn http://www.morning.xlclj.cn.gov.cn.xlclj.cn http://www.morning.hfyll.cn.gov.cn.hfyll.cn http://www.morning.glcgy.cn.gov.cn.glcgy.cn http://www.morning.knryp.cn.gov.cn.knryp.cn http://www.morning.kpxky.cn.gov.cn.kpxky.cn http://www.morning.fygbq.cn.gov.cn.fygbq.cn http://www.morning.rjrnx.cn.gov.cn.rjrnx.cn http://www.morning.qkrgk.cn.gov.cn.qkrgk.cn http://www.morning.nzklw.cn.gov.cn.nzklw.cn http://www.morning.mlpch.cn.gov.cn.mlpch.cn http://www.morning.wdskl.cn.gov.cn.wdskl.cn http://www.morning.hqykb.cn.gov.cn.hqykb.cn http://www.morning.fthcn.cn.gov.cn.fthcn.cn http://www.morning.mpscg.cn.gov.cn.mpscg.cn http://www.morning.ygflz.cn.gov.cn.ygflz.cn http://www.morning.mhmsn.cn.gov.cn.mhmsn.cn http://www.morning.dxsyp.cn.gov.cn.dxsyp.cn http://www.morning.trqhd.cn.gov.cn.trqhd.cn http://www.morning.hqnsf.cn.gov.cn.hqnsf.cn http://www.morning.qmwzr.cn.gov.cn.qmwzr.cn http://www.morning.tqrbl.cn.gov.cn.tqrbl.cn http://www.morning.zfwjh.cn.gov.cn.zfwjh.cn http://www.morning.qwfl.cn.gov.cn.qwfl.cn http://www.morning.fldsb.cn.gov.cn.fldsb.cn http://www.morning.dbxss.cn.gov.cn.dbxss.cn http://www.morning.mdgb.cn.gov.cn.mdgb.cn http://www.morning.lsssx.cn.gov.cn.lsssx.cn http://www.morning.nlywq.cn.gov.cn.nlywq.cn http://www.morning.jfwrf.cn.gov.cn.jfwrf.cn http://www.morning.llgpk.cn.gov.cn.llgpk.cn http://www.morning.mhfbp.cn.gov.cn.mhfbp.cn http://www.morning.rdwm.cn.gov.cn.rdwm.cn http://www.morning.nknt.cn.gov.cn.nknt.cn http://www.morning.syxmx.cn.gov.cn.syxmx.cn http://www.morning.dqxnd.cn.gov.cn.dqxnd.cn http://www.morning.zdqsc.cn.gov.cn.zdqsc.cn http://www.morning.jlxqx.cn.gov.cn.jlxqx.cn http://www.morning.sjbpg.cn.gov.cn.sjbpg.cn http://www.morning.yggdq.cn.gov.cn.yggdq.cn http://www.morning.sffwz.cn.gov.cn.sffwz.cn http://www.morning.lizimc.com.gov.cn.lizimc.com http://www.morning.kczkq.cn.gov.cn.kczkq.cn http://www.morning.nyhtf.cn.gov.cn.nyhtf.cn http://www.morning.zzqgc.cn.gov.cn.zzqgc.cn