首页 > 系统相关 >Windows安装Flink20220915

Windows安装Flink20220915

时间:2022-12-16 11:31:52浏览次数:51  
标签:SET License Windows FLINK Flink20220915 logname tm% 安装 jm%

1.官方下载地址  https://flink.apache.org/zh/downloads.html#apache-flink-1144

   最好用国内镜像下载比较快

  下载后对压缩包解压,路径自定义

Windows安装Flink20220915_flink

2.安装包中是不含启动bat的,需要我们新建

flink.bat

​​::###############################################################################​​
​​:: 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.​​
​​::###############################################################################​​

​​@echo​​​ ​​off​​
​​setlocal​​

​​SET bin=%~dp0​​
​​SET FLINK_HOME=%bin%..​​
​​SET FLINK_LIB_DIR=%FLINK_HOME%\lib​​
​​SET FLINK_PLUGINS_DIR=%FLINK_HOME%\plugins​​

​​SET JVM_ARGS=-Xmx512m​​

​​SET FLINK_JM_CLASSPATH=%FLINK_LIB_DIR%\*​​

​​java %JVM_ARGS% -cp ​​​​"%FLINK_JM_CLASSPATH%"​​​​; org.apache.flink.client.cli.CliFrontend %*​​

​​endlocal​​

start-cluster.bat 启动批处理文件

​​::###############################################################################​​
​​:: 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.​​
​​::###############################################################################​​

​​@echo​​​ ​​off​​
​​setlocal EnableDelayedExpansion​​

​​SET bin=%~dp0​​
​​SET FLINK_HOME=%bin%..​​
​​SET FLINK_LIB_DIR=%FLINK_HOME%\lib​​
​​SET FLINK_PLUGINS_DIR=%FLINK_HOME%\plugins​​
​​SET FLINK_CONF_DIR=%FLINK_HOME%\conf​​
​​SET FLINK_LOG_DIR=%FLINK_HOME%\log​​

​​SET JVM_ARGS=-Xms1024m -Xmx1024m​​

​​SET FLINK_CLASSPATH=%FLINK_LIB_DIR%\*​​

​​SET logname_jm=flink-%username%-jobmanager.log​​
​​SET logname_tm=flink-%username%-taskmanager.log​​
​​SET log_jm=%FLINK_LOG_DIR%\%logname_jm%​​
​​SET log_tm=%FLINK_LOG_DIR%\%logname_tm%​​
​​SET outname_jm=flink-%username%-jobmanager.out​​
​​SET outname_tm=flink-%username%-taskmanager.out​​
​​SET out_jm=%FLINK_LOG_DIR%\%outname_jm%​​
​​SET out_tm=%FLINK_LOG_DIR%\%outname_tm%​​

​​SET log_setting_jm=-Dlog.file=​​​​"%log_jm%"​​​ ​​-Dlogback.configurationFile=file:​​​​"%FLINK_CONF_DIR%/logback.xml"​​​ ​​-Dlog4j.configuration=file:​​​​"%FLINK_CONF_DIR%/log4j.properties"​​
​​SET log_setting_tm=-Dlog.file=​​​​"%log_tm%"​​​ ​​-Dlogback.configurationFile=file:​​​​"%FLINK_CONF_DIR%/logback.xml"​​​ ​​-Dlog4j.configuration=file:​​​​"%FLINK_CONF_DIR%/log4j.properties"​​

​​:: Log rotation (quick and dirty)​​
​​CD ​​​​"%FLINK_LOG_DIR%"​​
​​for​​​ ​​/l %%x in (5, -1, 1) ​​​​do​​​ ​​(​​
​​SET /A y = %%x+1​​
​​RENAME ​​​​"%logname_jm%.%%x"​​​ ​​"%logname_jm%.!y!"​​​ ​​2> nul​​
​​RENAME ​​​​"%logname_tm%.%%x"​​​ ​​"%logname_tm%.!y!"​​​ ​​2> nul​​
​​RENAME ​​​​"%outname_jm%.%%x"​​​ ​​"%outname_jm%.!y!"​​​ ​​2> nul​​
​​RENAME ​​​​"%outname_tm%.%%x"​​​ ​​"%outname_tm%.!y!"​​​ ​​2> nul​​
​​)​​
​​RENAME ​​​​"%logname_jm%"​​​ ​​"%logname_jm%.0"​​​ ​​2> nul​​
​​RENAME ​​​​"%logname_tm%"​​​ ​​"%logname_tm%.0"​​​ ​​2> nul​​
​​RENAME ​​​​"%outname_jm%"​​​ ​​"%outname_jm%.0"​​​ ​​2> nul​​
​​RENAME ​​​​"%outname_tm%"​​​ ​​"%outname_tm%.0"​​​ ​​2> nul​​
​​DEL ​​​​"%logname_jm%.6"​​​ ​​2> nul​​
​​DEL ​​​​"%logname_tm%.6"​​​ ​​2> nul​​
​​DEL ​​​​"%outname_jm%.6"​​​ ​​2> nul​​
​​DEL ​​​​"%outname_tm%.6"​​​ ​​2> nul​​

​​for​​​ ​​%%X in (java.exe) ​​​​do​​​ ​​(set FOUND=%%~$PATH:X)​​
​​if​​​ ​​not defined FOUND (​​
​​echo java.exe was not found in PATH variable​​
​​goto​​​ ​​:eof​​
​​)​​

​​echo Starting a local cluster with one JobManager process and one TaskManager process.​​

​​echo You can terminate the processes via CTRL-C in the spawned shell windows.​​

​​echo Web interface by ​​​​default​​​ ​​on http:​​​​//localhost:8081/.​​

​​start java %JVM_ARGS% %log_setting_jm% -cp ​​​​"%FLINK_CLASSPATH%"​​​​; org.apache.flink.runtime.entrypoint.StandaloneSessionClusterEntrypoint --configDir ​​​​"%FLINK_CONF_DIR%"​​​ ​​> ​​​​"%out_jm%"​​​ ​​2>&1​​
​​start java %JVM_ARGS% %log_setting_tm% -cp ​​​​"%FLINK_CLASSPATH%"​​​​; org.apache.flink.runtime.taskexecutor.TaskManagerRunner --configDir ​​​​"%FLINK_CONF_DIR%"​​​ ​​> ​​​​"%out_tm%"​​​ ​​2>&1​​

​​endlocal​​

3.运行测试

cmd命令,定位到刚刚Flink的安装包bin目录下,执行

start-cluster.bat
http://localhost:8081/   可以访问后台UI界面

Windows安装Flink20220915_apache_02

 

 

 

 

标签:SET,License,Windows,FLINK,Flink20220915,logname,tm%,安装,jm%
From: https://blog.51cto.com/smallfa/5947037

相关文章

  • Kylin-最小化编译安装MySQL
    Kylin-最小化编译安装MySQL编译环境部署安装编译软件[root@server2local]#dnfinstallgccgcc-c++ncursesncurses-develcmakebisonperlmaketar-yInstalle......
  • docker学习系列:在centos7上面安装docker
    一、场景最近在折腾安装​​centos7​​​,刚好有一些服务想直接用​​docker​​,每次安装都得找找教程。现在就自己写好教程,给以后备用。二、环境软件版本Centos7三、正文3.......
  • 如何在windows中安装和使用Linux
    按下键盘的win+x键打开应用和功能,按如图进行下面操作重启电脑后用管理原身份打开cmd窗口,输入以下命令:(官方链接:https://learn.microsoft.com/zh-cn/windows/wsl/basic-......
  • php安装swoole扩展开启openssl报错问题
    php安装swoole扩展开启openssl报错问题安装swoole命令peclinstallswoole如果需要开启openssl的话,在下边的提示中输入yesenableopensslsupport?[no]:#询问是......
  • Windows 无法加载这个硬件的设备驱动程序。驱动程序可能已损坏或不见了。 (代码 39)
    哔站中有视频解决方案,可以直观看如何操作:Windows无法加载这个硬件的设备驱动程序。驱动程序可能已损坏或不见了。(代码39)第一步:明确感叹号故障硬件——右键“属性”—......
  • mysql安装系统错误
    一.看到一篇博客解决二.替换掉增加文件2.1替换位置2.2分享链接链接:https://pan.baidu.com/s/1tig9d7-_HCMYcrIz2SYQpg?pwd=8zzp提取码:8zzp......
  • Docker 创建安装运行.NetCore/Consul/minio脚本命令相关
    ==dockernetworkcreate-dbridgejasonnet1:.NetCore相关项目//===========01:登录认证授权sudodockerrm容器id-fsudodockerrmiv_authserve......
  • docker安装minio OSS文件存储服务
    查看minio的docker版本使用docker命令查看minio的版本dockersearchminio拉取镜像dockerpullminio/minio创建目录:一个用来存放配置,一个用来存储上传文件的目录......
  • Docker容器安装与基本使用
    一、Docker概述1、docker概述docker是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的linux机器上,也可以实现虚拟化......
  • sublime text3 3126 安装配置
    下载​​http://www.sublimetext.com/3​​​序列号如下:支持版本号3126—–BEGINLICENSE—–MichaelBarnesSingleUserLicenseEA7E-8213858......