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

flink兼容性验证

flink介绍:https://blog.csdn.net/weixin_43563705/article/details/107604693

一、安装启动

  • 安装flink及其依赖
    yum install java-1.8.0-openjdk curl tar
    mkdir -p /usr/local/flink
    wget https://mirrors.aliyun.com/apache/flink/flink-1.16.1/flink-1.16.1-bin-scala_2.12.tgz

  • 启动flink
    cd /usr/local/flink
    tar -xvf flink-1.16.1-bin-scala_2.12.tgz
    cd flink-1.16.1
    ./bin/start-cluster.sh
    出现如下字样:
    Starting cluster.
    Starting standalonesession daemon on host bogon.
    Starting taskexecutor daemon on host bogon.

二、测试

1、查看摘要信息
curl localhost:8081

如果部署成功,我们可以看到类似如下字样的返回结果

<!--~ 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.--><!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Apache Flink Web Dashboard</title><link rel="apple-touch-icon" sizes="180x180" href="assets/favicon/apple-touch-icon.png"><link rel="icon" type="image/png" href="assets/favicon/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="assets/favicon/favicon-16x16.png" sizes="16x16"><link rel="manifest" href="assets/favicon/manifest.json"><link rel="mask-icon" href="assets/favicon/safari-pinned-tab.svg" color="#aa1919"><link rel="shortcut icon" href="assets/favicon/favicon.ico"><meta name="msapplication-config" content="assets/favicon/browserconfig.xml"><meta name="theme-color" content="#ffffff"><base href="./">

2、通过web浏览器请求对应服务器8081端口
flink浏览器界面

3、提交任务 WordCount
./bin/flink run examples/streaming/WordCount.jar

可以看到类似如下的输出:
Executing example with default input data.
Use --input to specify file input.
Printing result to stdout. Use --output to specify output path.
Job has been submitted with JobID d4fa249528a524aac35743bc9bc20ae8
Program execution finished
Job with JobID d4fa249528a524aac35743bc9bc20ae8 has finished.
Job Runtime: 1471 ms

之后,可以在网页上看到运行结果
在这里插入图片描述
也可以查看执行日志 tail flink-root-taskexecutor-0-bogon.out
(nymph,1)
(in,3)
(thy,1)
(orisons,1)
(be,4)
(all,2)
(my,1)
(sins,1)
(remember,1)
(d,4)

三、清理环境

./bin/stop-cluster.sh
rm -rf /usr/local/flink

http://www.lryc.cn/news/27295.html

相关文章:

  • 智慧工厂数字孪生可视化监测系统有效提升厂区安全管控效力
  • c++中基本类型详细解释外加基本运算规则
  • 扬帆优配“机器人+”方案加码产业发展,这些股有望高增长
  • 推送投票制作微信推送里投票制作教程在线投票活动制作
  • 【架构师】跟我一起学架构——微服务分层监控
  • Linux:https静态网站搭建案例
  • 前端css整理
  • 混凝土搅拌站远程监控解决方案
  • Spark SQL 学习总结
  • 深度学习 - 37.TF x Keras Deep Cross Network DCN 实现
  • Ubuntu中使用Synaptic进行包管理
  • python之selenium库安装及用法(定位法、获取文本、文本框输入、鼠标点击、滑动滚动条)
  • FPGA纯verilog实现图像视频旋转 串口指令控制旋转角度 提供工程源码和技术支持
  • EventGraph:Event Extraction as Semantic Graph Parsing 论文解读
  • 【蓝桥杯集训·每日一题】AcWing 3696. 构造有向无环图
  • 国内vs国外:外贸建站该如何选择?
  • HLS协议有哪些特别优势
  • JavaScript里的回调函数属于闭包吗?
  • 编程基本概念
  • Azure OpenAI 官方指南02|ChatGPT 的架构设计与应用实例
  • RK3568核心板以太网大数据测试报告-万象奥科
  • 来 CSDN 三年,我写了一本Python书
  • TIA博途中通过SCL语言实现快速排序的具体方法示例
  • 第 46 届世界技能大赛浙江省选拔赛“网络安全“项目B模块任务书
  • 【C】字符串操作函数
  • 【python】 pytest自动化测试框架--selenium,requests,appium自动化工具
  • Spring boot 实战指南(三):配置事务,整合Elasticsearch、swagger、redis、rabbitMQ
  • 九、Bean的循环依赖问题
  • macOS关闭SIP后,仍无法修改/usr文件夹下文件
  • 【编程基础之Python】8、Python复合数据类型