栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

Sqoop的mysqltohive报错

Sqoop的mysqltohive报错

问题描述

执行语句bin/sqoop import --connect jdbc:mysql://localhost:3306/gdcmxy --username root --password root --table 2019bigdata --fields-terminated-by 't' --delete-target-dir --num-mappers 1 --hive-import --hive-database gdcmxy --hive-table 2019bigdata

Error: java.lang.RuntimeException: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

这个该死的问题,看到报错,初步判断主要是数据库连接问题,一开始以为是防火墙没有关,但考虑到之前不是hadoo肯定已经把防火墙关掉了,由此判断应该和防火墙没有关系。

集群环境:

解决方法:

把执行语句的localhost改为本机的ip地址bin/sqoop import --connect jdbc:mysql://192.168.112.81:3306/gdcmxy --username root --password root --table 2019bigdata --fields-terminated-by 't' --delete-target-dir --num-mappers 1 --hive-import --hive-database gdcmxy --hive-table 2019bigdata

成功导入

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/457542.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号