赞
踩
当hadoop配置了kerberos时,提交命令要修改一下:
kinit -kt /opt/TDP/keytab/yarn.keytab yarn/node170@HADOOP.CHINATELECOM.CN
export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:/opt/TDP/hadoop/lib
- flink run -m yarn-cluster \
- -yd \
- -yjm 1024m \
- -ytm 1024m \
- -ynm UserVisitCount \
- -p 10 \
- -ys 4 \
- -yD security.kerberos.login.keytab=/opt/TDP/keytab/yarn.keytab \
- -yD security.kerberos.login.principal=yarn/node170@HADOOP.CHINATELECOM.CN \
- /opt/TDP/flink/examples/streaming/WordCount.jar \
- --input "hdfs:///testdir/abc.txt" \
- --output "hdfs:///result"
注意:
--input目录文件要提前上传
--output目录不要创建,否则任务会失败!
如果hadoop没有配置kerberos,删除这两条命令提交试试
- -yD security.kerberos.login.keytab=/opt/TDP/keytab/yarn.keytab \
- -yD security.kerberos.login.principal=yarn/node170@HADOOP.CHINATELECOM.CN \
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。