# https://flink.apache.org/downloads.html
tar zxvf     *.tax.gz
# scala下载 解压 配置  vim  /etc/profile
export SCALA_HOME=/usr/local/scala-2.12.13

Example configuration
Configure high availability mode and ZooKeeper quorum in conf/flink-conf.yaml:

high-availability: zookeeper
high-availability.zookeeper.quorum: localhost:2181
high-availability.zookeeper.path.root: /flink
#high-availability.cluster-id: /cluster_one # important: customize per cluster ,on yarn不配置
high-availability.storageDir: hdfs:///flink/recovery


./bin/flink run-application -t yarn-application ./examples/streaming/TopSpeedWindowing.jar
./bin/flink run-application -t yarn-application ./examples/batch/WordCount.jar

Application Mode
Application Mode will launch a Flink cluster on YARN, where the main() method of the application jar gets executed on the JobManager in YARN. The cluster will shut down as soon as the application has finished. You can manually stop the cluster using yarn application -kill or by cancelling the Flink job.

./bin/flink run-application -t yarn-application ./examples/streaming/TopSpeedWindowing.jar

Once an Application Mode cluster is deployed, you can interact with it for operations like cancelling or taking a savepoint.

List running job on the cluster

./bin/flink list -t yarn-application -Dyarn.application.id=application_XXXX_YY

Cancel running job

./bin/flink cancel -t yarn-application -Dyarn.application.id=application_XXXX_YY <jobId>

Note that cancelling your job on an Application Cluster will stop the cluster.
To unlock the full potential of the application mode, consider using it with the yarn.provided.lib.dirs configuration option and pre-upload your application jar to a location accessible by all nodes in your cluster. In this case, the command could look like:

./bin/flink run-application -t yarn-application \
	-Dyarn.provided.lib.dirs="hdfs://myhdfs/my-remote-flink-dist-dir" \

The above will allow the job submission to be extra lightweight as the needed Flink jars and the application jar are going to be picked up by the specified remote locations rather than be shipped to the cluster by the client.

在yarn ui 看任务运行状态

已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页