这篇文章主要讲解了“Apache Flink常用操作是什么”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Apache Flink常用操作是什么”吧!
使用Maven将自己的代码编译打包
打好的包一般放在工程目录的target子文件夹下
mvn clean package
flink任务运行命令
session模式运行flink run --class com.zclh.data.wordcount.WordCountKafkaInStdOut /data/cdh/test/flink-kafka-1.0-SNAPSHOT.jar指定用户运行任务,job模式sudo -u hdfsbin/flink run -m yarn-cluster -yjm 1024 -ytm 1024 --class com.zclh.data.wordcount.WordCountKafkaInStdOut /data/cdh/test/flink-kafka-1.0-SNAPSHOT.jarjob模式运行任务bin/flink run -m yarn-cluster -yjm 1024 -ytm 1024 --class com.zclh.data.wordcount.WordCountKafkaInStdOut /data/cdh/test/flink-kafka-1.0.jarbin/flink run -m yarn-cluster -yjm 1024 -ytm 1024 --class com.zclh.data.wordcount.WordCountKafkaInStdOut /data/cdh/test/flink-kafka-1.1.jarbin/flink run -m yarn-cluster -yjm 1024 -ytm 1024 --class com.zclh.data.wordcount.WordCountKafkaInStdOut /data/cdh/test/flink-kafka-1.2.jarbin/flink run -m yarn-cluster -yjm 1024 -ytm 1024 --class com.zclh.data.wordcount.WordCountKafkaInStdOut /data/cdh/test/flink-kafka-1.3.jarbin/flink run -m yarn-cluster -yjm 1024 -ytm 1024 --class com.atguigu.hotitems_analysis.KafkaProducerUtil /data/cdh/test/HotItemsAnalysis-1.0.jarbin/flink run -m yarn-cluster -yjm 1024 -ytm 1024 --class com.atguigu.hotitems_analysis.HotItems /data/cdh/test/HotItemsAnalysis-2.0.jarbin/flink run -m yarn-cluster -yjm 1024 -ytm 1024 /data/cdh/test/HotItemsAnalysis-3.0.jar --class com.atguigu.hotitems_analysis.HotItemsbin/flink run --class com.atguigu.hotitems_analysis.HotItems /data/cdh/test/HotItemsAnalysis-3.0.jar
启动jar包中指定的类
java -cp /data/cdh/test/HotItemsAnalysis-4.0.jar com.atguigu.hotitems_analysis.KafkaProducerUtiljava -cp /data/cdh/test/HotItemsAnalysis-5.0.jar com.atguigu.hotitems_analysis.KafkaProducerUtilbin/flink run --class com.atguigu.hotitems_analysis.HotItems /data/cdh/test/HotItemsAnalysis-4.0.jarbin/flink run --class com.atguigu.hotitems_analysis.HotItems /data/cdh/test/HotItemsAnalysis-5.0.jarbin/flink run -m yarn-cluster -yjm 1024 -ytm 1024 --class com.atguigu.hotitems_analysis.HotItems /data/cdh/test/HotItemsAnalysis-5.0.jar
感谢各位的阅读,以上就是“Apache Flink常用操作是什么”的内容了,经过本文的学习后,相信大家对Apache Flink常用操作是什么这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是编程网,小编将为大家推送更多相关知识点的文章,欢迎关注!