Flink会话集群docker-compose一键安装

1、安装docker

参考,本人这篇博客:https://blog.csdn.net/taotao_guiwang/article/details/135508643?spm=1001.2014.3001.5501

2、flink-conf.yaml

flink-conf.yaml放在/home/flink/conf/job、/home/flink/conf/task下面,flink-conf.yaml内容如下:

################################################################################
#  Licensed to the Apache Software Foundation (ASF) under one
#  or more contributor license agreements.  See the NOTICE file
#  distributed with this work for additional information
#  regarding copyright ownership.  The ASF licenses this file
#  to you under the Apache License, Version 2.0 (the
#  "License"); you may not use this file except in compliance
#  with the License.  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
# limitations under the License.
#################################################################################==============================================================================
# Common
#==============================================================================# The external address of the host on which the JobManager runs and can be
# reached by the TaskManagers and any clients which want to connect. This setting
# is only used in Standalone mode and may be overwritten on the JobManager side
# by specifying the --host <hostname> parameter of the bin/jobmanager.sh executable.
# In high availability mode, if you use the bin/start-cluster.sh script and setup
# the conf/masters file, this will be taken care of automatically. Yarn/Mesos
# automatically configure the host name based on the hostname of the node where the
# JobManager runs.jobmanager.rpc.address: jobmanager# The RPC port where the JobManager is reachable.jobmanager.rpc.port: 6123# The total process memory size for the JobManager.
#
# Note this accounts for all memory usage within the JobManager process, including JVM metaspace and other overhead.jobmanager.memory.process.size: 4096m# The total process memory size for the TaskManager.
#
# Note this accounts for all memory usage within the TaskManager process, including JVM metaspace and other overhead.taskmanager.memory.process.size: 16384m# To exclude JVM metaspace and overhead, please, use total Flink memory size instead of 'taskmanager.memory.process.size'.
# It is not recommended to set both 'taskmanager.memory.process.size' and Flink memory.
#
# taskmanager.memory.flink.size: 1280m# The number of task slots that each TaskManager offers. Each slot runs one parallel pipeline.taskmanager.numberOfTaskSlots: 10# The parallelism used for programs that did not specify and other parallelism.parallelism.default: 1# The default file system scheme and authority.
# 
# By default file paths without scheme are interpreted relative to the local
# root file system 'file:///'. Use this to override the default and interpret
# relative paths relative to a different file system,
# for example 'hdfs://mynamenode:12345'
#
# fs.default-scheme#==============================================================================
# High Availability
#==============================================================================# The high-availability mode. Possible options are 'NONE' or 'zookeeper'.
#
# high-availability: zookeeper# The path where metadata for master recovery is persisted. While ZooKeeper stores
# the small ground truth for checkpoint and leader election, this location stores
# the larger objects, like persisted dataflow graphs.
# 
# Must be a durable file system that is accessible from all nodes
# (like HDFS, S3, Ceph, nfs, ...) 
#
# high-availability.storageDir: hdfs:///flink/ha/# The list of ZooKeeper quorum peers that coordinate the high-availability
# setup. This must be a list of the form:
# "host1:clientPort,host2:clientPort,..." (default clientPort: 2181)
#
# high-availability.zookeeper.quorum: localhost:2181# ACL options are based on https://zookeeper.apache.org/doc/r3.1.2/zookeeperProgrammers.html#sc_BuiltinACLSchemes
# It can be either "creator" (ZOO_CREATE_ALL_ACL) or "open" (ZOO_OPEN_ACL_UNSAFE)
# The default value is "open" and it can be changed to "creator" if ZK security is enabled
#
# high-availability.zookeeper.client.acl: open#==============================================================================
# Fault tolerance and checkpointing
#==============================================================================# The backend that will be used to store operator state checkpoints if
# checkpointing is enabled.
#
# Supported backends are 'jobmanager', 'filesystem', 'rocksdb', or the
# <class-name-of-factory>.
#
# state.backend: filesystem# Directory for checkpoints filesystem, when using any of the default bundled
# state backends.
#
# state.checkpoints.dir: hdfs://namenode-host:port/flink-checkpoints# Default target directory for savepoints, optional.
#
#state.savepoints.dir: file:/tmp/savepoint# Flag to enable/disable incremental checkpoints for backends that
# support incremental checkpoints (like the RocksDB state backend). 
#
# state.backend.incremental: false# The failover strategy, i.e., how the job computation recovers from task failures.
# Only restart tasks that may have been affected by the task failure, which typically includes
# downstream tasks and potentially upstream tasks if their produced data is no longer available for consumption.jobmanager.execution.failover-strategy: region#==============================================================================
# Rest & web frontend
#==============================================================================# The port to which the REST client connects to. If rest.bind-port has
# not been specified, then the server will bind to this port as well.
#
#rest.port: 8081# The address to which the REST client will connect to
#
#rest.address: 0.0.0.0# Port range for the REST and web server to bind to.
#
#rest.bind-port: 8080-8090# The address that the REST & web server binds to
#
#rest.bind-address: 0.0.0.0# Flag to specify whether job submission is enabled from the web-based
# runtime monitor. Uncomment to disable.#web.submit.enable: false#==============================================================================
# Advanced
#==============================================================================# Override the directories for temporary files. If not specified, the
# system-specific Java temporary directory (java.io.tmpdir property) is taken.
#
# For framework setups on Yarn or Mesos, Flink will automatically pick up the
# containers' temp directories without any need for configuration.
#
# Add a delimited list for multiple directories, using the system directory
# delimiter (colon ':' on unix) or a comma, e.g.:
#     /data1/tmp:/data2/tmp:/data3/tmp
#
# Note: Each directory entry is read from and written to by a different I/O
# thread. You can include the same directory multiple times in order to create
# multiple I/O threads against that directory. This is for example relevant for
# high-throughput RAIDs.
#
# io.tmp.dirs: /tmp# The classloading resolve order. Possible values are 'child-first' (Flink's default)
# and 'parent-first' (Java's default).
#
# Child first classloading allows users to use different dependency/library
# versions in their application than those in the classpath. Switching back
# to 'parent-first' may help with debugging dependency issues.
#
# classloader.resolve-order: child-first# The amount of memory going to the network stack. These numbers usually need 
# no tuning. Adjusting them may be necessary in case of an "Insufficient number
# of network buffers" error. The default min is 64MB, the default max is 1GB.
# 
# taskmanager.memory.network.fraction: 0.1
# taskmanager.memory.network.min: 64mb
# taskmanager.memory.network.max: 1gb#==============================================================================
# Flink Cluster Security Configuration
#==============================================================================# Kerberos authentication for various components - Hadoop, ZooKeeper, and connectors -
# may be enabled in four steps:
# 1. configure the local krb5.conf file
# 2. provide Kerberos credentials (either a keytab or a ticket cache w/ kinit)
# 3. make the credentials available to various JAAS login contexts
# 4. configure the connector to use JAAS/SASL# The below configure how Kerberos credentials are provided. A keytab will be used instead of
# a ticket cache if the keytab path and principal are set.# security.kerberos.login.use-ticket-cache: true
# security.kerberos.login.keytab: /path/to/kerberos/keytab
# security.kerberos.login.principal: flink-user# The configuration below defines which JAAS login contexts# security.kerberos.login.contexts: Client,KafkaClient#==============================================================================
# ZK Security Configuration
#==============================================================================# Below configurations are applicable if ZK ensemble is configured for security# Override below configuration to provide custom ZK service name if configured
# zookeeper.sasl.service-name: zookeeper# The configuration below must match one of the values set in "security.kerberos.login.contexts"
# zookeeper.sasl.login-context-name: Client#==============================================================================
# HistoryServer
#==============================================================================# The HistoryServer is started and stopped via bin/historyserver.sh (start|stop)# Directory to upload completed jobs to. Add this directory to the list of
# monitored directories of the HistoryServer as well (see below).
#jobmanager.archive.fs.dir: hdfs:///completed-jobs/# The address under which the web-based HistoryServer listens.
#historyserver.web.address: 0.0.0.0# The port under which the web-based HistoryServer listens.
#historyserver.web.port: 8082# Comma separated list of directories to monitor for completed jobs.
#historyserver.archive.fs.dir: hdfs:///completed-jobs/# Interval in milliseconds for refreshing the monitored directories.
#historyserver.archive.fs.refresh-interval: 10000blob.server.port: 6124
query.server.port: 6125

3、docker-compose.yaml

使用如下命令部署集群:

docker-compose -f docker-compose.yml up -d

docker-compose.yaml内容如下:

version: "2.1"
services:jobmanager:image: flink:1.12.7-scala_2.11expose:- "6123"ports:- "8081:8081"command: jobmanagerenvironment:- JOB_MANAGER_RPC_ADDRESS=jobmanagervolumes:- /home/flink/conf/job/flink-conf.yaml:/opt/flink/conf/flink-conf.yamlrestart: alwaystaskmanager:image: flink:1.12.7-scala_2.11expose:- "6121"- "6122"depends_on:- jobmanagercommand: taskmanagerlinks:- "jobmanager:jobmanager"environment:- JOB_MANAGER_RPC_ADDRESS=jobmanagervolumes:- /home/flink/conf/task/flink-conf.yaml:/opt/flink/conf/flink-conf.yamlrestart: always

4、启动后

在这里插入图片描述

5、页面访问

访问地址:http://IP:8081
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/625702.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

C++输入输出和文件

文章目录 一. 流, 缓冲区和iostream文件二. 使用cout进行输出1. 用cout进行格式化2. 刷新输出缓冲区 三. 使用cin进行输入1. cin>>如何检查输入2. 流状态3. 其他istream类方法 四. 文件输入和输出1. 简单的文件I/O2. 文件模式3. 随机存取4. 内核格式化 To be continue...…

jmeter--6.跨线程组关联

目录 1. 跨线程组实现接口关联 2. 跨线程组实现Cookie关联 1. 跨线程组实现接口关联 1.1 根据json/正则的方式提取到需要的响应数据 1.2 在接口下新增一个BeanShell 后置处理器&#xff0c;并通过函数助手写入【${__setProperty(new_token,${access_token},)}】&#xff0c;…

Unet系列网络解析

Unet UNet最早发表在2015的MICCAI上&#xff0c;到2020年中旬的引用量已经超过了9700多次&#xff0c;估计现在都过万了&#xff0c;从这方面看足以见得其影响力。当然&#xff0c;UNet这个基本的网络结构有太多的改进型&#xff0c;应用范围已经远远超出了医学图像的范畴。我…

命名空间 “Eigen“ 没有成员 “SelfAdjointEigenSolver“

代码中用到SelfAdjointEigenSolver 结果报错&#xff1a;报错实在windows10条件下发生的。 查找资料&#xff0c;最后还是要定位到官方文档。 计算自伴随矩阵的特征值和特征向量。 这是在特征值模块中定义的。 添加如下引用即可解决&#xff0c;请点赞关注。 #include <…

设备之AP555【之一】

1、Audio Precision官网 Audio Precision 是声学及音频测试中公认的标准。AP提供了高性能声学和音频分析仪&#xff0c;配件和应用程序&#xff0c;帮助全球工程师设计&#xff0c;验证和制造消费电子、专业和工业的声学和音频产品。 APX555B 是具有三十年经验的测试设备&…

Java项目:120SpringBoot婚恋网站

博主主页&#xff1a;Java旅途 简介&#xff1a;分享计算机知识、学习路线、系统源码及教程 文末获取源码 一、项目介绍 婚恋网站是由SpringBootMybatis开发的&#xff0c;功能详细&#xff0c;满足婚恋网的基本要求。 主要功能如下&#xff1a; 登录注册用户浏览用户搜索成…

2024年腾讯云服务器多少钱1年?超便宜62元一年

腾讯云服务器租用价格表&#xff1a;轻量应用服务器2核2G3M价格62元一年、2核2G4M价格118元一年&#xff0c;540元三年、2核4G5M带宽218元一年&#xff0c;2核4G5M带宽756元三年、轻量4核8G12M服务器446元一年、646元15个月&#xff0c;云服务器CVM S5实例2核2G配置280.8元一年…

springCould中的Hystrix【下】-从小白开始【8】

目录 &#x1f9c2;1.熔断机制❤️❤️❤️ &#x1f32d;2.修改8001服务 ❤️❤️❤️ &#x1f95e;3.测试 ❤️❤️❤️ &#x1f953;4. 服务监控hystrixDashboard❤️❤️❤️ &#x1f32d;5.仪表盘❤️❤️❤️ &#x1f9c2;6.仪表盘的使用 ❤️❤️❤️ 1.熔断机…

数据库SELECT语句

文章目录 一、检索数据二、排序检索三、过滤数据四、数据过滤4.1 组合WHERE子句1. AND操作符2. OR操作符3. 计算次序 4.2 IN操作符4.3 NOT操作符 五、用通配符过滤LIKE操作符1. 百分号&#xff08;%&#xff09;通配符2. 下划线&#xff08;_&#xff09;通配符 使用通配符的技…

【Kotlin】协程的字节码原理

前言 协程是Koltin语言最重要的特性之一&#xff0c;也是最难理解的特性。网上关于kotlin协程的描述也是五花八门&#xff0c;有人说它是轻量级线程&#xff0c;有人说它是无阻塞式挂起&#xff0c;有人说它是一个异步框架等等&#xff0c;众说纷芸。甚至还有人出了书籍专门介…

transbigdata笔记:可视化

1 可视化轨迹 transbigdata.visualization_trip(trajdata, col[Lng, Lat, ID, Time], zoomauto, height500) 例子见transbigdata 笔记&#xff1a;官方文档案例1&#xff08;出租车GPS数据处理&#xff09;-CSDN博客 2 可视化od transbigdata.visualization_od(oddata, col…

【分布式技术】监控平台zabbix对接grafana,优化dashboard

目录 第一步&#xff1a;在zabbix server服务端安装grafana&#xff0c;并启动 第二步&#xff1a; 访问http://ip:3000/login 第三步&#xff1a;创建数据源 第四步&#xff1a;导入dashboard模板 ps&#xff1a;自定义创建新面板 第一步&#xff1a;在zabbix server服务…

Java线上问题堆栈排查分析

最近线上出现类似内存溢出问题&#xff0c;需要排查具体原因&#xff0c;记录过程&#xff0c;方便备查。 一、数据抓取 在启动参数中添加参数&#xff0c;可参照以下设置。 参数的作用是在程序发生内存溢出 OutOfMemory 时打印日志&#xff0c;dump下来&#xff0c;方便用工…

leetcode 206翻转链表

题目&#xff1a; 给你单链表的头节点 head &#xff0c;请你反转链表&#xff0c;并返回反转后的链表。 提示&#xff1a; 链表中节点的数目范围是 [0, 5000] -5000 < Node.val < 5000 解法&#xff1a; 思路 使用双指针&#xff0c;pre,定义当前指针cur&#xff0…

入门Docker1: 容器技术的基础

目录 服务器选型 虚拟机 基于主机(物理机或虚机)的多服务实例 基于容器的服务实例 Docker Docker三要素 Docker安装 Docker基本使用 基本操作 仓库镜像 容器 服务器选型 在选择服务器操作系统时&#xff0c; Windows 附带了许多您需要付费的功能。 Linux 是开放源代…

Could not find annotations-4.9.0.jar 异常

问题 org.gradle.internal.resolve.ArtifactNotFoundException: Could not find annotations-4.9.0.jar (com.github.bumptech.glide:annotations:4.9.0).原因 解决方式 repositories {google()//谷歌放前面jcenter()//放在谷歌后面}更换顺序后确实没问题了 参考文章 https:…

Python接口自动化测试项目实战

1.1 接口测试项目搭建 1.1.1 教育局招生管理系统部署 教育局招生管理系统是基于javamysql,下面介绍它的部署过程。 1.从我的网盘下载部署文件。 2.安装jdk以及配置环境变量。 点击 文件进行安装。 下一步下一步直接安装。 本人的安装路径是C:\Program Files\Java\jdk1.7.…

解决Vue 3 + Element Plus树形表格全选多选以及子节点勾选的问题

目录 前言 问题概述 解决方案 1. 创建树形表格 2. 实现全选功能 3. 实现多选功能 4. 实现子节点勾选 5. 实现父节点勾选 总结 前言 作者简介&#xff1a; 懒大王敲代码&#xff0c;计算机专业应届生 今天给大家聊聊解决Vue 3 Element Plus树形表格全选多选以及子节…

【MATLAB】EEMD+FFT+HHT组合算法

代码原理 EEMD&#xff08;经验模态分解&#xff09;FFT&#xff08;快速傅里叶变换&#xff09;HHT&#xff08;希尔伯特-黄变换&#xff09;组合算法是一种常用的信号处理和分析方法。这个组合算法包含了EEMD、FFT和HHT三个步骤&#xff0c;可以用于处理非线性和非平稳信号。…

小程序中使用微信同声传译插件实现语音识别、语音合成、文本翻译功能----语音识别(一)

官方文档链接&#xff1a;https://mp.weixin.qq.com/wxopen/plugindevdoc?appidwx069ba97219f66d99&token370941954&langzh_CN#- 要使用插件需要先在小程序管理后台的设置->第三方设置->插件管理中添加插件&#xff0c;目前该插件仅认证后的小程序。 语音识别…