Flink 1.8 的快照版本已经发布,我们可以来使用一下,当然了,过程肯定还是有一些曲折的,这里已经帮大家给记录下来了
使用过程
下载
git clone https://github.com/apache/flink
编译(大概有20分钟这样)
cd flink
mvn clean package -DskipTests
编译通过版本在build-target
目录中
[admin@storm1 flink]$ ls build-target
bin conf examples lib LICENSE log NOTICE opt README.txt
直接运行cluster
版本是可以的
[admin@storm1 bin]$ ./start-cluster.sh
Setting HADOOP_CONF_DIR=/etc/hadoop/conf because no HADOOP_CONF_DIR was set.
Starting cluster.
Setting HADOOP_CONF_DIR=/etc/hadoop/conf because no HADOOP_CONF_DIR was set.
Setting HADOOP_CONF_DIR=/etc/hadoop/conf because no HADOOP_CONF_DIR was set.
Starting standalonesession daemon on host storm1.starsriver.cn.
Setting HADOOP_CONF_DIR=/etc/hadoop/conf because no HADOOP_CONF_DIR was set.
Setting HADOOP_CONF_DIR=/etc/hadoop/conf because no HADOOP_CONF_DIR was set.
Starting taskexecutor daemon on host storm1.starsriver.cn.
运行在yarn上,还需要做一些变动
lib中需要如下几个包 打包下载
flink-hadoop-compatibility_2.11-1.8-SNAPSHOT.jar
javax.ws.rs-api-2.0.1.jar
jersey-common-2.27.jar
jersey-core-1.9.jar
就可以启动yarn-session.sh
了
bin/yarn-session.sh run -n 2 -tm 2048 -s 4
或者是单个yarn-job
flink run -d -m yarn-cluster ./dataset-1.0-SNAPSHOT-all.jar -yn 2 -ytm 2048m
网友评论