flink-conf.yaml

flink-conf.yaml文件存放目录在/opt/flink/conf

  1. # jobManager 的IP地址
  2. jobmanager.rpc.address: localhost
  3. # jobManager 的端口号
  4. jobmanager.rpc.port: 6123
  5. # jobManager JVM heap 内存大小
  6. jobmanager.heap.size: 1024m
  7. # taskManager JVM heap 内存大小
  8. taskmanager.heap.size: 1024m
  9. # 每个taskManager提供任务的slots数量大小
  10. taskmanager.numberOfTaskSlots: 1
  11. #程序默认的并行计算的个数
  12. parallelism.default: 1
  13. #==============================================================================
  14. # High Availability
  15. #==============================================================================
  16. # 可以选择'NONE'或者'zookeeper'
  17. # The high-availability mode. Possible options are 'NONE' or 'zookeeper'.
  18. #
  19. # high-availability: zookeeper
  20. # The path where metadata for master recovery is persisted. While ZooKeeper stores
  21. # the small ground truth for checkpoint and leader election, this location stores
  22. # the larger objects, like persisted dataflow graphs.
  23. #
  24. # Must be a durable file system that is accessible from all nodes
  25. # (like HDFS, S3, Ceph, nfs, ...)
  26. # 文件系统路径,让Flink在高可用设置中持久保存元数据
  27. # high-availability.storageDir: hdfs:///flink/ha/
  28. # The list of ZooKeeper quorum peers that coordinate the high-availability
  29. # setup. This must be a list of the form:
  30. # "host1:clientPort,host2:clientPort,..." (default clientPort: 2181)
  31. # zookeeper集群中仲裁者的机器ip和port端口号
  32. # high-availability.zookeeper.quorum: localhost:2181
  33. # ACL options are based on https://zookeeper.apache.org/doc/r3.1.2/zookeeperProgrammers.html#sc_BuiltinACLSchemes
  34. # It can be either "creator" (ZOO_CREATE_ALL_ACL) or "open" (ZOO_OPEN_ACL_UNSAFE)
  35. # The default value is "open" and it can be changed to "creator" if ZK security is enabled
  36. # 默认是open,如果zookeeper security启用了该值会更改成 creator
  37. # high-availability.zookeeper.client.acl: open
  38. #==============================================================================
  39. # Fault tolerance and checkpointing 容错和检查点
  40. #==============================================================================
  41. # The backend that will be used to store operator state checkpoints if
  42. # checkpointing is enabled.
  43. #
  44. # Supported backends are 'jobmanager', 'filesystem', 'rocksdb', or the
  45. # <class-name-of-factory>.
  46. # 用于存储和检查点状态
  47. # state.backend: filesystem
  48. # Directory for checkpoints filesystem, when using any of the default bundled
  49. # state backends.
  50. # 存储检查点的数据文件和元数据的默认目录
  51. # state.checkpoints.dir: hdfs://namenode-host:port/flink-checkpoints
  52. # Default target directory for savepoints, optional.
  53. # savepoints 的默认目标目录(可选)
  54. # state.savepoints.dir: hdfs://namenode-host:port/flink-checkpoints
  55. # Flag to enable/disable incremental checkpoints for backends that
  56. # support incremental checkpoints (like the RocksDB state backend).
  57. # 用于启用/禁用增量 checkpoints 的标志
  58. # state.backend.incremental: false
  59. #==============================================================================
  60. # Web Frontend
  61. #==============================================================================
  62. # The address under which the web-based runtime monitor listens.
  63. # 基于web的运行时监视器侦听的地址
  64. #jobmanager.web.address: 0.0.0.0
  65. # web的运行时监视器端口
  66. rest.port: 8081
  67. # 是否从基于web的jobManager启用作业提交
  68. #jobmanager.web.submit.enable: false
  69. #==============================================================================
  70. # Advanced 高级配置
  71. #==============================================================================
  72. # 是否应在TaskManager启动时预先分配TaskManager管理的内存
  73. # taskmanager.memory.preallocate: false
  74. # The classloading resolve order. Possible values are 'child-first' (Flink's default)
  75. # and 'parent-first' (Java's default).
  76. #
  77. # Child first classloading allows users to use different dependency/library
  78. # versions in their application than those in the classpath. Switching back
  79. # to 'parent-first' may help with debugging dependency issues.
  80. # 类加载解析顺序,是先检查用户代码jar('child-first')还是应用程序类路径('parent-first')。默认设置指示首先从用户代码jar加载类
  81. # classloader.resolve-order: child-first
  82. # The amount of memory going to the network stack. These numbers usually need
  83. # no tuning. Adjusting them may be necessary in case of an "Insufficient number
  84. # of network buffers" error. The default min is 64MB, teh default max is 1GB.
  85. # 用于网络缓冲区的JVM内存的分数。这决定了 TaskManager 可以同时拥有多少流数据交换通道以及通道缓冲的程度。
  86. # 如果作业被拒绝或者您收到系统没有足够缓冲区的警告,请增加此值或下面的最小/最大值。
  87. # 另外请注意'taskmanager.network.memory.min'和'taskmanager.network.memory.max'可能会覆盖此分数
  88. # taskmanager.network.memory.fraction: 0.1
  89. # taskmanager.network.memory.min: 67108864
  90. # taskmanager.network.memory.max: 1073741824
  91. #==============================================================================
  92. # Flink Cluster Security Configuration 集群的安全配置
  93. #==============================================================================
  94. #
  95. # Kerberos authentication for various components - Hadoop, ZooKeeper, and connectors -
  96. # may be enabled in four steps:
  97. # 1. configure the local krb5.conf file
  98. # 2. provide Kerberos credentials (either a keytab or a ticket cache w/ kinit)
  99. # 3. make the credentials available to various JAAS login contexts
  100. # 4. configure the connector to use JAAS/SASL
  101. # The below configure how Kerberos credentials are provided. A keytab will be used instead of
  102. # a ticket cache if the keytab path and principal are set.
  103. # 提示是否从 Kerberos ticket 缓存中读取
  104. # security.kerberos.login.use-ticket-cache: true
  105. #
  106. # 包含用户凭据的 Kerberos 秘钥表文件的绝对路径
  107. # security.kerberos.login.keytab: /path/to/kerberos/keytab
  108. # 与keytab 关联的 Kerberos 主体名称
  109. # security.kerberos.login.principal: flink-user
  110. # The configuration below defines which JAAS login contexts
  111. # 以逗号分隔的登录上下文列表,用于提供 Kerberos 凭据 (例如:'Client , KafkaClient' 使用凭证进行 zookeeper 身份验证和 kafka 的身份验证)
  112. # security.kerberos.login.contexts: Client,KafkaClient
  113. #==============================================================================
  114. # ZK Security Configuration zookeeper 安全配置
  115. #==============================================================================
  116. # Below configurations are applicable if ZK ensemble is configured for security
  117. # Override below configuration to provide custom ZK service name if configured
  118. # 覆盖以下配置以提供自定义 zookeeper 名字
  119. # zookeeper.sasl.service-name: zookeeper
  120. # The configuration below must match one of the values set in "security.kerberos.login.contexts"
  121. # 该配置必须匹配'security.kerberos.login.contexts'中的列表(含有一个)
  122. # zookeeper.sasl.login-context-name: Client
  123. #==============================================================================
  124. # HistoryServer
  125. #==============================================================================
  126. # 可以通过 bin/historyserver.sh (start|stop) 命令启动和关闭 HistoryServer
  127. # The HistoryServer is started and stopped via bin/historyserver.sh (start|stop)
  128. # Directory to upload completed jobs to. Add this directory to the list of
  129. # monitored directories of the HistoryServer as well (see below).
  130. # 将已经完成的作业上传到的目录
  131. #jobmanager.archive.fs.dir: hdfs:///completed-jobs/
  132. # The address under which the web-based HistoryServer listens.
  133. # 基于 Web 的 HistoryServer 的地址
  134. #historyserver.web.address: 0.0.0.0
  135. # The port under which the web-based HistoryServer listens.
  136. # 基于 Web 的 HistoryServer 的端口号
  137. #historyserver.web.port: 8082
  138. # Comma separated list of directories to monitor for completed jobs.
  139. # 以逗号分隔的目录列表,用于监视已完成的作业
  140. #historyserver.archive.fs.dir: hdfs:///completed-jobs/
  141. # Interval in milliseconds for refreshing the monitored directories.
  142. # 刷新受监控目录的时间间隔(以毫秒为单位)
  143. #historyserver.archive.fs.refresh-interval: 10000

zoo.cfg

  1. # 每个 tick 的毫秒数
  2. tickTime=2000
  3. # 初始同步阶段可以采用的 tick 数
  4. initLimit=10
  5. # 在发送请求和获取确认之间可以传递的 tick 数
  6. syncLimit=5
  7. # 存储快照的目录
  8. # dataDir=/tmp/zookeeper
  9. # 客户端将连接的端口
  10. clientPort=2181
  11. # ZooKeeper quorum peers
  12. server.1=localhost:2888:3888
  13. # server.2=host:peer-port:leader-port