flink on yarn使用第三方jars的方法如何查看进程所持有jar包
前言
在yarn上跑的程序必须拥有代码,环境,配置。
flink on yarn模式,用户提交完jar以后,通过yarn调度队列,任务jar会被分配到某个节点,连同配置,环境,一起被分发到某个Task节点。
flink run 命令参数详情
1 参数必选 : -n,--container <arg> 分配多少个yarn容器 (=taskmanager的数量)
2 参数可选 : -D <arg> 动态属性 -d,--detached 独立运行 -jm,--jobManagerMemory <arg> JobManager的内存 [in MB] -nm,--name 在YARN上为一个自定义的应用设置一个名字 -q,--query 显示yarn中可用的资源 (内存, cpu核数) -qu,--queue <arg> 指定YARN队列. -s,--slots <arg> 每个TaskManager使用的slots数量 -tm,--taskManagerMemory <arg> 每个TaskManager的内存 [in MB] -z,--zookeeperNamespace <arg> 针对HA模式在zookeeper上创建NameSpace -id,--applicationId <yarnAppId> YARN集群上的任务id,附着到一个后台运行的yarn session中3 run [OPTIONS] <jar-file> <arguments> run操作参数: -c,--class <classname> 如果没有在jar包中指定入口类,则需要在这里通过这个参数指定 -m,--jobmanager <host:port> 指定需要连接的jobmanager(主节点)地址,使用这个参数可以指定一个不同于配置文件中的jobmanager -p,--parallelism <parallelism> 指定程序的并行度。可以覆盖配置文件中的默认值。4 启动一个新的yarn-session,它们都有一个y或者yarn的前缀例如:./bin/flink run -m yarn-cluster -yn 2 ./examples/batch/WordCount.jar 连接指定host和port的jobmanager:./bin/flink run -m SparkMaster:1234 ./examples/batch/WordCount.jar -input hdfs://hostname:port/hello.txt -output hdfs://hostname:port/result1启动一个新的yarn-session:./bin/flink run -m yarn-cluster -yn 2 ./examples/batch/WordCount.jar -input hdfs://hostname:port/hello.txt -output hdfs://hostname:port/result15 注意:命令行的选项也可以使用./bin/flink 工具获得。6 Action "run" compiles and runs a program.Syntax: run [OPTIONS] <jar-file> <arguments>"run" action options:-c,--class <classname> Class with the program entry point("main" method or "getPlan()" method.Only needed if the JAR file does notspecify the class in its manifest.-C,--classpath <url> Adds a URL to each user codeclassloader on all nodes in thecluster. The paths must specify aprotocol (e.g. file://) and beaccessible on all nodes (e.g. by meansof a NFS share). You can use thisoption multiple times for specifyingmore than one URL. The protocol mustbe supported by the {@linkjava.net.URLClassLoader}.-d,--detached If present, runs the job in detachedmode-n,--allowNonRestoredState Allow to skip savepoint state thatcannot be restored. You need to allowthis if you removed an operator fromyour program that was part of theprogram when the savepoint wastriggered.-p,--parallelism <parallelism> The parallelism with which to run theprogram. Optional flag to override thedefault value specified in theconfiguration.-q,--sysoutLogging If present, suppress logging output tostandard out.-s,--fromSavepoint <savepointPath> Path to a savepoint to restore the jobfrom (for examplehdfs:///flink/savepoint-1537).7 Options for yarn-cluster mode:-d,--detached If present, runs the job in detachedmode-m,--jobmanager <arg> Address of the JobManager (master) towhich to connect. Use this flag toconnect to a different JobManager thanthe one specified in theconfiguration.-yD <property=value> use value for given property-yd,--yarndetached If present, runs the job in detachedmode (deprecated; use non-YARNspecific option instead)-yh,--yarnhelp Help for the Yarn session CLI.-yid,--yarnapplicationId <arg> Attach to running YARN session-yj,--yarnjar <arg> Path to Flink jar file-yjm,--yarnjobManagerMemory <arg> Memory for JobManager Container withoptional unit (default: MB)-yn,--yarncontainer <arg> Number of YARN container to allocate(=Number of Task Managers)-ynl,--yarnnodeLabel <arg> Specify YARN node label for the YARNapplication-ynm,--yarnname <arg> Set a custom name for the applicationon YARN-yq,--yarnquery Display available YARN resources(memory, cores)-yqu,--yarnqueue <arg> Specify YARN queue.-ys,--yarnslots <arg> Number of slots per TaskManager-yst,--yarnstreaming Start Flink in streaming mode-yt,--yarnship <arg> Ship files in the specified directory(t for transfer)-ytm,--yarntaskManagerMemory <arg> Memory per TaskManager Container withoptional unit (default: MB)-yz,--yarnzookeeperNamespace <arg> Namespace to create the Zookeepersub-paths for high availability mode-z,--zookeeperNamespace <arg> Namespace to create the Zookeepersub-paths for high availability mode
示例
flink run -m yarn-cluster -yt your_external_jars_path -yjm 1024 -ytm 1536 -yn 2 \
-ys 3 -yqu flink -ynm yourapplicationname /usr/local/flink/examples/streaming/SocketWindowWordCount.jar \
--hostname yourhostname --port yourport
通过-yt指定jars
查看进程所持有jar包
通过JPS查看到Task进程。
通过切换成root账户
cd /proc/5283/fd
可以查看5283进程拿到什么jar。
flink on yarn使用第三方jars的方法如何查看进程所持有jar包相关推荐
- 不使用 Maven 等构建工具,而使用原始方法在 IntelliJ IDEA 中制作 JAR 包
不使用 Maven 等构建工具,而使用原始方法在 IntelliJ IDEA 中制作 JAR 包 说明 步骤 说明 本文的 原始 Java 程序,指的是不使用项目构建工具(如 Maven)而建立起的一 ...
- java 双声道音频_java实现切割wav音频文件的方法详解【附外部jar包下载】
本文实例讲述了java实现切割wav音频文件的方法.分享给大家供大家参考,具体如下: import it.sauronsoftware.jave.Encoder; import it.sauronso ...
- Java操作Access数据库使用方法及案例 及 所需jar包【源码及jar包在最后下载】
目录 写在前面 数据库编辑软件MDBplus.exe SQL查询语句的差异 字符串转数字 字符串转日期 示例:如下图打开SQL编辑窗口 源码及jar包下载地址 写在前面 最近接了一个项目,就是个简单的 ...
- 60-124-340-源码-运行模式-Yarn-通过 YARN 的资源本地化技术减少 Flink 在 YARN 上的部署时间
1.美图 2.概述 在使用 Flink 的生产实践中,我们发现采用 Flink on YARN 的部署方式时,将大量用户依赖的 JAR 包和其他文件上传到对应的容器中是从用户发送部署请求到应用实际运行 ...
- ideal 本地jar依赖_通过 YARN 的资源本地化技术减少 Flink 在 YARN 上的部署时间
在使用 Flink 的生产实践中,我们发现采用 Flink on YARN 的部署方式时,将大量用户依赖的 JAR 包和其他文件上传到对应的容器中是从用户发送部署请求到应用实际运行起来的重要耗时操作. ...
- Flink on Yarn的两种模式及HA
Flink on Yarn模式部署始末:Flink的Standalone和on Yarn模式都属于集群运行模式,但是有很大的不同,在实际环境中,使用Flink on Yarn模式者居多.那么使用on ...
- Flink on Yarn的两种模式
Flink on Yarn模式部署始末:Flink的Standalone和on Yarn模式都属于集群运行模式,但是有很大的不同,在实际环境中,使用Flink on Yarn模式者居多. 那 ...
- IDEA 导入jar包和使用jar包方法
背景: 场景一:获取到了一个jar包,本地想用jar包内的方法, 场景二:获取到了一个jar包,想发布到maven中央库,或者其他阿里云库等 解决办法: 场景一:获取到了一个jar包,本地想用jar包 ...
- linux进程khungtaskd,Linux查看进程的所有信息的方法示例
服务器上有一个任务进程,当我们使用ps -ef | grep task查看时,只能得到一些最基本的信息,假如我们需要知道对应的文件路径.启动命令的完整路径,就无从下手了. 今天教大家一个方法来查看进程 ...
最新文章
- 算法竞赛入门经典读书笔记(二)7.1简单枚举
- 2月上旬国内域名总量止跌回升 净增长量达8574个
- JQ返回顶部代码分享~~~~
- JUC原子类-类成员(五)
- c语言修改windows系统时间,c语言实现系统时间校正工具代码分享
- opengl如何画出一个球_OpenGL-Controlling and Monitoring the Pipeline
- 物联网和工业互联网场景下的边缘计算
- MySQL (一)(未完成)
- MySQL数据库 -- Navicat、pycharm连接数据库
- 数据库MySQL详解
- Chrome 扩展程序——FireShot:网页截图工具
- 序列号Serial Number管理
- 兰州大学本科毕业论文答辩PPT模板
- Tecplot 10 将输入的多个plt文件做成动画 :
- 解决:Adobe Flash Player已不再受支持
- 会玩,有人用 Python 模拟导弹防御!
- NMS(Non-Maximum Suppression,非极大值抑制)解析
- ffmpeg去logo转
- 水果店圈子:水果店日常朋友圈文案,水果店发朋友圈文案
- 【判断三角形成立条件并进一步判断三角形类型】
热门文章
- jQuery的ready方法实现原理分析
- NLTK语料库nltk.download()安装失败及下载很慢的解决方法
- S@Kura的PHP进阶之路(三)
- [虚拟机] 如何让VMware上的虚拟机识别到U盘
- 学习使用安卓scroller
- 眼睛血管分割matlab版本
- Leetcode 2261. K Divisible Elements Subarrays
- 通用路由封装协议--GRE的简单配置
- tf1.x error:Variable generator/encoder_image/conv2d/kernel already exists, disallowed
- 女朋友生日java程序_★★女朋友要过生日了!我想用java为她写一个程序,一举两得啊! 希望大家多提建议啊!谢谢!!!...