当前位置: 首页 > news >正文

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
在这里插入图片描述

相关文章:

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

1、安装docker 参考&#xff0c;本人这篇博客&#xff1a;https://blog.csdn.net/taotao_guiwang/article/details/135508643?spm1001.2014.3001.5501 2、flink-conf.yaml flink-conf.yaml放在/home/flink/conf/job、/home/flink/conf/task下面&#xff0c;flink-conf.yaml…...

qt.qpa.plugin: Could not find the Qt platform plugin “windows“ in ““

系统环境&#xff1a;Win10家庭中文版 Qt : 5.12.9 链接了一些64位的第三方库&#xff0c;程序编译完运行后出现 qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "" 弹窗如下&#xff1a; 网上搜了一些都是关于pyQt的&#xff0c…...

vue面试题集锦

1. 谈一谈对 MVVM 的理解&#xff1f; MVVM 是 Model-View-ViewModel 的缩写。MVVM 是一种设计思想。 Model 层代表数据模型&#xff0c;也可以在 Model 中定义数据修改和操作的业务逻辑; View 代表 UI 组件&#xff0c;它负责将数据模型转化成 UI 展现出来&#xff0c;View 是…...

2024年学鸿蒙开发就业前景怎么样?

随着科技的不断进步&#xff0c;鸿蒙系统作为华为自主研发的操作系统&#xff0c;逐渐引起了人们的关注。 2024年&#xff0c;鸿蒙开发就业前景如何&#xff1f; 对于那些对鸿蒙开发感兴趣并希望在这一领域寻找职业发展的人来说&#xff0c;这是一个非常重要的问题。 首先&a…...

Unity网络通讯学习

---部分截图来自 siki学院Unity网络通讯课程 Socket 网络上的两个程序通过一个双向的通信连接实现数据交换&#xff0c;这个连接的一端称为一个 Socket &#xff0c;Socket 包含了网络通信必须的五种信息 Socket 例子{ 协议&#xff1a; TCP 本地&#xff1a; IP &#xff…...

js入口函数和jQuery入口函数的区别

JS入口函数指的是JavaScript中的主入口函数&#xff0c;用来初始化页面加载完成后的操作。通常情况下&#xff0c;JS入口函数是在HTML页面中的<script>标签中定义的&#xff0c;通过onload事件等方式触发调用。 jQuery入口函数则是指使用jQuery库时的主入口函数&#xf…...

Docker-Compose编排Nginx1.25.1+PHP7.4.33+Redis7.0.11环境

实践说明&#xff1a;基于RHEL7(CentOS7.9)部署docker环境(23.0.1、24.0.2)&#xff0c;编排也可应用于RHEL7-9(如AlmaLinux9.1)&#xff0c;但因为docker的特性&#xff0c;适用场景是不限于此的。 文档形成时期&#xff1a;2017-2023年 因系统或软件版本不同&#xff0c;构建…...

《新课程教学》(电子版)是正规期刊吗?能评职称吗?

《新课程教学》&#xff08;电子版&#xff09;主要出版内容为学科教学理论、学科教学实践经验和成果&#xff0c;主要读者对象为中小学教师&#xff0c;期刊设卷首语、名家讲堂、课程与教学、教学实践、考试评价、教育信息化、教学琐谈、教育管理、教师心语、一线课堂、重温经…...

Posgresql macOS安装和基础操作

摘要 本文介绍macOS版本Postgresql的安装&#xff0c;pg常用命令。作为笔记记录&#xff0c;后续方便查看。 Postgresql安装 官网下载postgresql安装包https://www.postgresql.org/download/。官网下载慢时&#xff0c;可以从这里下载我上传的mac版本的pg安装包资源。下载后&am…...

ArkUI-X跨平台已至,何需其它!

运行环境 DevEco Studio&#xff1a;4.0Release OpenHarmony SDK API10 开发板&#xff1a;润和DAYU200 自从写了一篇ArkUI-X跨平台的文章之后&#xff0c;好多人都说对这个项目十分关注。 那么今天我们就来完整的梳理一下这个项目。 1、ArkUI-X 我们之前可能更多接触的…...

(2024,分数蒸馏抽样,Delta 降噪分数,LoRA)PALP:文本到图像模型的提示对齐个性化

PALP: Prompt Aligned Personalization of Text-to-Image Models 公和众和号&#xff1a;EDPJ&#xff08;进 Q 交流群&#xff1a;922230617 或加 VX&#xff1a;CV_EDPJ 进 V 交流群&#xff09; 目录 0. 摘要 4. 提示对齐方法 4.1 概述 4.2 个性化 4.3 提示对齐分数抽…...

近日遇到数据库及其他问题

一、查找备份表和原表不一样数据 select * from A where (select count(1) from A_BAK where A.IDA_BAK.ID) 0 二、在数据量比较大的表中新增有默认值的列速度较慢问题 使用 以下语句&#xff0c;在上亿数据的表中执行速度较慢 alter table TEST add col_a integer DEFA…...

【conda】conda 版本控制和环境迁移/安装conda加速工具mamba /conda常用指令/Anaconda配置

【conda】安装conda加速工具mamba /conda常用指令/Anaconda配置 0. conda 版本控制和环境迁移1. 安装conda加速工具mamba2. conda install version3. [Anaconda 镜像](https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/)使用帮助4. error deal 0. conda 版本控制和环境迁移…...

“/bin/bash“: stat /bin/bash: no such file or directory: unknown

简介&#xff1a;常规情况下&#xff0c;在进入容器时习惯使用 /bin/bash为结尾&#xff0c;如&#xff1a;docker exec -it test-sanic /bin/bash&#xff0c; 但是如果容器本身使用了精简版&#xff0c;只装了sh命令&#xff0c;未安装bash。这时就会抛出"/bin/bash&quo…...

基于Spring Boot+vue的云上新鲜水果超市商城系统

本云上水果超市是为了提高用户查阅信息的效率和管理人员管理信息的工作效率&#xff0c;可以快速存储大量数据&#xff0c;还有信息检索功能&#xff0c;这大大的满足了用户、员工信息和管理员这三者的需求。操作简单易懂&#xff0c;合理分析各个模块的功能&#xff0c;尽可能…...

vue-ESlint代码规范及修复

1. 介绍 ESLint:是一个代码检查工具&#xff0c;用来检查你的代码是否符合指定的规则(你和你的团队可以自行约定一套规则)。 在创建项目时&#xff0c;我们使用的是 JavaScript Standard Style 代码风格的规则。 规范网址&#xff1a;https://standardjs.com/rules-zhcn.htm…...

Oracle数据库断电后不能打开的解决

数据库突然断电后&#xff0c;不能打开。或者偶尔能打开&#xff0c;但是很快就关闭。  原因可能很多。但是解决问题只有一种办法&#xff1a;看trace日志&#xff0c;alert错误日志 简单写下我的解决过程&#xff1a; 1,在alert日志中&#xff1a; 错误如下两种&#xff1a…...

论文复现: In-Loop Filter with Customized Weights For VVC Intra Coding

论文复现&#xff1a; In-Loop Filter with Customized Weights For VVC Intra Coding 这个好难好难。啊啊啊啊。核心&#xff1a;权重预测模块功能快捷键合理的创建标题&#xff0c;有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的…...

配置华为设备NQA UDP Jitter检测VoIP业务抖动

组网需求 如图1所示&#xff0c;总部和子公司之间需要跨越外部网络进行通信&#xff0c;DeviceA和DeviceD为总部和子公司的网络出口设备&#xff0c;DeviceB和DeviceC为外部网络提供商的边缘设备。 总部和子公司之间经常要通过VoIP进行电话会议&#xff0c;要求双向时延小于2…...

GitHub要求所有贡献代码的用户在2023年底前启用双因素认证

到2023年底&#xff0c;所有向github托管的存储库贡献代码的用户都必须启用一种或多种形式的2FA。 双重身份认证 所谓双重身份认证&#xff08;Two-Factor Authentication&#xff09;&#xff0c;就是在账号密码以外还额外需要一种方式来确认用户身份。 GitHub正在大力推动双…...

Nginx——强化基础配置

1、牢记Context Context是Nginx中每条指令都会附带的信息&#xff0c;用来说明指令在哪个指令块中使用&#xff0c;可以将Context 理解为配置环境。 每个指令都拥有自己的配置环境&#xff0c;如果把配置环境记错了&#xff0c;或者在设计时未考虑配置环境的作用&#xff0c;…...

黑马苍穹外卖学习Day6

HttpClient 介绍 HttpClient 是 Apache 提供的一个开源的 Java HTTP 客户端库&#xff0c;用于发送 HTTP 请求和处理 HTTP 响应。它提供了一种更简便的方式来执行 HTTP 请求&#xff0c;并支持多种协议&#xff0c;如 HTTP、HTTPS、FTP 等。 使用 HttpClient 可以方便地与远程…...

【Java 设计模式】设计原则之里氏替换原则

文章目录 1. 定义2. 好处3. 应用4. 示例结语 在软件开发中&#xff0c;设计原则是创建灵活、可维护和可扩展软件的基础。 这些原则为我们提供了指导方针&#xff0c;帮助我们构建高质量、易理解的代码。 ✨单一职责原则&#xff08;SRP&#xff09; ✨开放/封闭原则&#xff08…...

一步步指南:从指定时长中提取需求的帧图片,高效剪辑视频

在现代多媒体时代&#xff0c;视频已经成生活中不可或缺的一部分。从视频中提取某一帧图片&#xff0c;或者对视频进行剪辑&#xff0c;都是常见的需求。下面一起来看云炫AI智剪如何从指定时长中提取需求的帧图片&#xff0c;如何高效地剪辑视频。 按指定时长提取视频某帧图片的…...

【打卡】牛客网:BM93 盛水最多的容器

题目&#xff1a; 考虑到盛水容器的特殊性。双指针从最两边开始遍历&#xff0c;遍历过程中舍弃最小的。 不知道原理。 模板的&#xff1a; class Solution { public:/*** 代码中的类名、方法名、参数名已经指定&#xff0c;请勿修改&#xff0c;直接返回方法规定的值即可*…...

Golang 文件操作

读取 一次性读取 data, err : os.ReadFile("filename.txt") if err ! nil {log.Fatal(err) } fmt.Println(string(data))按行读取 方式1&#xff1a;bufio.NewScanner file, err : os.Open("filename.txt") if err ! nil {panic(err) } defer file.Clo…...

C++I/O流——(3)文件输入/输出(第二节)

归纳编程学习的感悟&#xff0c; 记录奋斗路上的点滴&#xff0c; 希望能帮到一样刻苦的你&#xff01; 如有不足欢迎指正&#xff01; 共同学习交流&#xff01; &#x1f30e;欢迎各位→点赞 &#x1f44d; 收藏⭐ 留言​&#x1f4dd; 含泪播种的人一定能含笑收获&#xff…...

内网穿透[让你在家里也能榨干学校的服务器]Yep!

内网穿透 问题&#xff1a;什么是内网穿透&#xff0c;内网穿透的作用是什么&#xff1f; 前提&#xff01;&#xff01;&#xff01;&#xff01;你得拥有超级管理员的权限&#xff0c;比如root&#xff0c;不然后面的一切免提&#xff01; 应用场景如下&#xff1a;比如你…...

构建基于RHEL9系列(CentOS9,AlmaLinux9,RockyLinux9等)的支持63个常见模块的PHP8.1.20的RPM包

本文适用&#xff1a;rhel9系列&#xff0c;或同类系统(CentOS9,AlmaLinux9,RockyLinux9等) 文档形成时期&#xff1a;2023年 因系统版本不同&#xff0c;构建部署应略有差异&#xff0c;但本文未做细分&#xff0c;对稍有经验者应不存在明显障碍。 因软件世界之复杂和个人能力…...

你知道什么是Java中的类型强转吗?

强制类型转换 强转存在与父转子的时候&#xff0c;子转父不需要进行强转&#xff0c;如 Object o "hello"; //String类是Object类的子类&#xff0c;无需进行强转类型强转分为两种情况&#xff1a; Ⅰ、向下转型&#xff1a;将父类对象引用转换为子类对象引用&am…...

wordpress 緩慢/石家庄seo外包公司

SpringBoot项目解决 log4j2 核弹漏洞&#xff01; 事件情况 北京时间12月9号深夜&#xff0c;Apache Log4j2被曝出一个高危漏洞&#xff0c;攻击者通过jndi注入攻击的形式可以轻松远程执行任何代码。随后官方紧急推出了2.15.0和2.15.0-rc1新版本修复&#xff0c;依然未能完全…...

做网站前应该怎么处理/怎么推广自己的产品

目录 1.事务依赖数据库 2.ACID 3. MySQL 怎么保证原子性的&#xff1f; 4.Spring 支持两种方式的事务管理 5.Spring事务机制&#xff08;三个抽象定义&#xff0c;传播隔离机制&#xff09; 6.事务属性详解&#xff08;重点&#xff09; 7.Transactional 注解使用详解 8…...

台州网站建设/百度统计官网

写在前面还有一个月就美赛了&#xff0c;本系列文章适用于完全没有任何 matlab 基础&#xff0c;但是有别的编程语言基础的人看&#xff0c;我会结合自己的理解&#xff0c;有的放矢的讲&#xff0c;不会掺杂很多废话&#xff0c;各位读者轻喷~matlab 运算符Matlab 运算符分五类…...

简网app工场官网免费/优化大师下载

在HTTP协议中&#xff0c;响应状态码 429 Too Many Requests 表示在一定的时间内用户发送了太多的请求&#xff0c;即超出了“频次限制”。 在响应中&#xff0c;可以提供一个 Retry-After 首部来提示用户需要等待多长时间之后再发送新的请求。 服务器不主动拒绝请求&#xff0…...

定远县可以做网站的地方/重庆seo网站

在西门子PLC中利用STEP7软件编程的时候&#xff0c;想实现延时接通功能&#xff0c;通常会用到S_ODT定时器&#xff0c;因为这个最简单。在SCL中同样可以也将这个简单的延时接通定时器使用上&#xff0c;只不过没有像在LAD梯形图中编程那么简单了&#xff0c;稍微繁复了一些&am…...

企业网站开发 文献综述/河南网站定制

1. 问题描述&#xff1a; 给你一个下标从 0 开始、由 n 个整数组成的数组 arr 。arr 中两个元素的间隔定义为它们下标之间的绝对差 。更正式地&#xff0c;arr[i] 和 arr[j] 之间的间隔是 |i - j| 。返回一个长度为 n 的数组 intervals &#xff0c;其中 intervals[i] 是 arr[…...