立即学习:https://edu.csdn.net/course/play/11032/239287?utm_source=blogtoedu
2.sqoop实操 hdfs mysql
grant all on *.* to 'root'@'%' identified by 'xinfei182210';
授权其他用户使用
在sqoop目录下将数据库表导入hdfs
bin/sqoop import \
--connect 'jdbc:mysql://localhost01/test?useUnicode=true&characterEncoding=utf-8' \
--username root \
--password xinfei182210 \
--table stu \
--fields-terminated-by '\t' \
--m 2
在web查看hdfs文件系统 看导入的路径
在hadoop路径下查看
bin/hdfs dfs -cat /user/hadoop/sti/*