当前位置:   article > 正文

Flink 1.19.1 standalone 集群模式部署及配置_flink-cdc 1.19.1

flink-cdc 1.19.1

flink 1.19起 conf/flink-conf.yaml 更改为新的 conf/config.yaml

7df23ada99d64064a148a28d1770c559.png

standalone集群: dev001、dev002、dev003

config.yaml: jobmanager address 统一使用 dev001,bind-port 统一改成 0.0.0.0,taskmanager address 分别更改为dev所在host

  1. dev001 config.yaml:
  2. ################################################################################
  3. # Licensed to the Apache Software Foundation (ASF) under one
  4. # or more contributor license agreements. See the NOTICE file
  5. # distributed with this work for additional information
  6. # regarding copyright ownership. The ASF licenses this file
  7. # to you under the Apache License, Version 2.0 (the
  8. # "License"); you may not use this file except in compliance
  9. # with the License. You may obtain a copy of the License at
  10. #
  11. # http://www.apache.org/licenses/LICENSE-2.0
  12. #
  13. # Unless required by applicable law or agreed to in writing, software
  14. # distributed under the License is distributed on an "AS IS" BASIS,
  15. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. # See the License for the specific language governing permissions and
  17. # limitations under the License.
  18. ################################################################################
  19. # These parameters are required for Java 17 support.
  20. # They can be safely removed when using Java 8/11.
  21. env:
  22. java:
  23. opts:
  24. all: --add-exports=java.base/sun.net.util=ALL-UNNAMED --add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED
  25. #==============================================================================
  26. # Common
  27. #==============================================================================
  28. jobmanager:
  29. # The host interface the JobManager will bind to. By default, this is localhost, and will prevent
  30. # the JobManager from communicating outside the machine/container it is running on.
  31. # On YARN this setting will be ignored if it is set to 'localhost', defaulting to 0.0.0.0.
  32. # On Kubernetes this setting will be ignored, defaulting to 0.0.0.0.
  33. #
  34. # To enable this, set the bind-host address to one that has access to an outside facing network
  35. # interface, such as 0.0.0.0.
  36. bind-host: 0.0.0.0
  37. rpc:
  38. # The external address of the host on which the JobManager runs and can be
  39. # reached by the TaskManagers and any clients which want to connect. This setting
  40. # is only used in Standalone mode and may be overwritten on the JobManager side
  41. # by specifying the --host <hostname> parameter of the bin/jobmanager.sh executable.
  42. # In high availability mode, if you use the bin/start-cluster.sh script and setup
  43. # the conf/masters file, this will be taken care of automatically. Yarn
  44. # automatically configure the host name based on the hostname of the node where the
  45. # JobManager runs.
  46. address: dev001
  47. # The RPC port where the JobManager is reachable.
  48. port: 6123
  49. memory:
  50. process:
  51. # The total process memory size for the JobManager.
  52. # Note this accounts for all memory usage within the JobManager process, including JVM metaspace and other overhead.
  53. size: 1600m
  54. execution:
  55. # The failover strategy, i.e., how the job computation recovers from task failures.
  56. # Only restart tasks that may have been affected by the task failure, which typically includes
  57. # downstream tasks and potentially upstream tasks if their produced data is no longer available for consumption.
  58. failover-strategy: region
  59. taskmanager:
  60. # The host interface the TaskManager will bind to. By default, this is localhost, and will prevent
  61. # the TaskManager from communicating outside the machine/container it is running on.
  62. # On YARN this setting will be ignored if it is set to 'localhost', defaulting to 0.0.0.0.
  63. # On Kubernetes this setting will be ignored, defaulting to 0.0.0.0.
  64. #
  65. # To enable this, set the bind-host address to one that has access to an outside facing network
  66. # interface, such as 0.0.0.0.
  67. bind-host: 0.0.0.0
  68. # The address of the host on which the TaskManager runs and can be reached by the JobManager and
  69. # other TaskManagers. If not specified, the TaskManager will try different strategies to identify
  70. # the address.
  71. #
  72. # Note this address needs to be reachable by the JobManager and forward traffic to one of
  73. # the interfaces the TaskManager is bound to (see 'taskmanager.bind-host').
  74. #
  75. # Note also that unless all TaskManagers are running on the same machine, this address needs to be
  76. # configured separately for each TaskManager.
  77. host: dev001
  78. # The number of task slots that each TaskManager offers. Each slot runs one parallel pipeline.
  79. numberOfTaskSlots: 2
  80. memory:
  81. process:
  82. # The total process memory size for the TaskManager.
  83. #
  84. # Note this accounts for all memory usage within the TaskManager process, including JVM metaspace and other overhead.
  85. # To exclude JVM metaspace and overhead, please, use total Flink memory size instead of 'taskmanager.memory.process.size'.
  86. # It is not recommended to set both 'taskmanager.memory.process.size' and Flink memory.
  87. size: 1728m
  88. parallelism:
  89. # The parallelism used for programs that did not specify and other parallelism.
  90. default: 1
  91. # # The default file system scheme and authority.
  92. # # By default file paths without scheme are interpreted relative to the local
  93. # # root file system 'file:///'. Use this to override the default and interpret
  94. # # relative paths relative to a different file system,
  95. # # for example 'hdfs://mynamenode:12345'
  96. # fs:
  97. # default-scheme: hdfs://mynamenode:12345
  98. #==============================================================================
  99. # High Availability
  100. #==============================================================================
  101. # high-availability:
  102. # # The high-availability mode. Possible options are 'NONE' or 'zookeeper'.
  103. # type: zookeeper
  104. # # The path where metadata for master recovery is persisted. While ZooKeeper stores
  105. # # the small ground truth for checkpoint and leader election, this location stores
  106. # # the larger objects, like persisted dataflow graphs.
  107. # #
  108. # # Must be a durable file system that is accessible from all nodes
  109. # # (like HDFS, S3, Ceph, nfs, ...)
  110. # storageDir: hdfs:///flink/ha/
  111. # zookeeper:
  112. # # The list of ZooKeeper quorum peers that coordinate the high-availability
  113. # # setup. This must be a list of the form:
  114. # # "host1:clientPort,host2:clientPort,..." (default clientPort: 2181)
  115. # quorum: localhost:2181
  116. # client:
  117. # # ACL options are based on https://zookeeper.apache.org/doc/r3.1.2/zookeeperProgrammers.html#sc_BuiltinACLSchemes
  118. # # It can be either "creator" (ZOO_CREATE_ALL_ACL) or "open" (ZOO_OPEN_ACL_UNSAFE)
  119. # # The default value is "open" and it can be changed to "creator" if ZK security is enabled
  120. # acl: open
  121. #==============================================================================
  122. # Fault tolerance and checkpointing
  123. #==============================================================================
  124. # The backend that will be used to store operator state checkpoints if
  125. # checkpointing is enabled. Checkpointing is enabled when execution.checkpointing.interval > 0.
  126. # # Execution checkpointing related parameters. Please refer to CheckpointConfig and ExecutionCheckpointingOptions for more details.
  127. # execution:
  128. # checkpointing:
  129. # interval: 3min
  130. # externalized-checkpoint-retention: [DELETE_ON_CANCELLATION, RETAIN_ON_CANCELLATION]
  131. # max-concurrent-checkpoints: 1
  132. # min-pause: 0
  133. # mode: [EXACTLY_ONCE, AT_LEAST_ONCE]
  134. # timeout: 10min
  135. # tolerable-failed-checkpoints: 0
  136. # unaligned: false
  137. # state:
  138. # backend:
  139. # # Supported backends are 'hashmap', 'rocksdb', or the
  140. # # <class-name-of-factory>.
  141. # type: hashmap
  142. # # Flag to enable/disable incremental checkpoints for backends that
  143. # # support incremental checkpoints (like the RocksDB state backend).
  144. # incremental: false
  145. # checkpoints:
  146. # # Directory for checkpoints filesystem, when using any of the default bundled
  147. # # state backends.
  148. # dir: hdfs://namenode-host:port/flink-checkpoints
  149. # savepoints:
  150. # # Default target directory for savepoints, optional.
  151. # dir: hdfs://namenode-host:port/flink-savepoints
  152. #==============================================================================
  153. # Rest & web frontend
  154. #==============================================================================
  155. rest:
  156. # The address to which the REST client will connect to
  157. address: dev001
  158. # The address that the REST & web server binds to
  159. # By default, this is localhost, which prevents the REST & web server from
  160. # being able to communicate outside of the machine/container it is running on.
  161. #
  162. # To enable this, set the bind address to one that has access to outside-facing
  163. # network interface, such as 0.0.0.0.
  164. bind-address: 0.0.0.0
  165. # # The port to which the REST client connects to. If rest.bind-port has
  166. # # not been specified, then the server will bind to this port as well.
  167. # port: 8081
  168. # # Port range for the REST and web server to bind to.
  169. # bind-port: 8080-8090
  170. # web:
  171. # submit:
  172. # # Flag to specify whether job submission is enabled from the web-based
  173. # # runtime monitor. Uncomment to disable.
  174. # enable: false
  175. # cancel:
  176. # # Flag to specify whether job cancellation is enabled from the web-based
  177. # # runtime monitor. Uncomment to disable.
  178. # enable: false
  179. #==============================================================================
  180. # Advanced
  181. #==============================================================================
  182. # io:
  183. # tmp:
  184. # # Override the directories for temporary files. If not specified, the
  185. # # system-specific Java temporary directory (java.io.tmpdir property) is taken.
  186. # #
  187. # # For framework setups on Yarn, Flink will automatically pick up the
  188. # # containers' temp directories without any need for configuration.
  189. # #
  190. # # Add a delimited list for multiple directories, using the system directory
  191. # # delimiter (colon ':' on unix) or a comma, e.g.:
  192. # # /data1/tmp:/data2/tmp:/data3/tmp
  193. # #
  194. # # Note: Each directory entry is read from and written to by a different I/O
  195. # # thread. You can include the same directory multiple times in order to create
  196. # # multiple I/O threads against that directory. This is for example relevant for
  197. # # high-throughput RAIDs.
  198. # dirs: /tmp
  199. # classloader:
  200. # resolve:
  201. # # The classloading resolve order. Possible values are 'child-first' (Flink's default)
  202. # # and 'parent-first' (Java's default).
  203. # #
  204. # # Child first classloading allows users to use different dependency/library
  205. # # versions in their application than those in the classpath. Switching back
  206. # # to 'parent-first' may help with debugging dependency issues.
  207. # order: child-first
  208. # The amount of memory going to the network stack. These numbers usually need
  209. # no tuning. Adjusting them may be necessary in case of an "Insufficient number
  210. # of network buffers" error. The default min is 64MB, the default max is 1GB.
  211. #
  212. # taskmanager:
  213. # memory:
  214. # network:
  215. # fraction: 0.1
  216. # min: 64mb
  217. # max: 1gb
  218. #==============================================================================
  219. # Flink Cluster Security Configuration
  220. #==============================================================================
  221. # Kerberos authentication for various components - Hadoop, ZooKeeper, and connectors -
  222. # may be enabled in four steps:
  223. # 1. configure the local krb5.conf file
  224. # 2. provide Kerberos credentials (either a keytab or a ticket cache w/ kinit)
  225. # 3. make the credentials available to various JAAS login contexts
  226. # 4. configure the connector to use JAAS/SASL
  227. # # The below configure how Kerberos credentials are provided. A keytab will be used instead of
  228. # # a ticket cache if the keytab path and principal are set.
  229. # security:
  230. # kerberos:
  231. # login:
  232. # use-ticket-cache: true
  233. # keytab: /path/to/kerberos/keytab
  234. # principal: flink-user
  235. # # The configuration below defines which JAAS login contexts
  236. # contexts: Client,KafkaClient
  237. #==============================================================================
  238. # ZK Security Configuration
  239. #==============================================================================
  240. # zookeeper:
  241. # sasl:
  242. # # Below configurations are applicable if ZK ensemble is configured for security
  243. # #
  244. # # Override below configuration to provide custom ZK service name if configured
  245. # # zookeeper.sasl.service-name: zookeeper
  246. # #
  247. # # The configuration below must match one of the values set in "security.kerberos.login.contexts"
  248. # login-context-name: Client
  249. #==============================================================================
  250. # HistoryServer
  251. #==============================================================================
  252. # The HistoryServer is started and stopped via bin/historyserver.sh (start|stop)
  253. #
  254. # jobmanager:
  255. # archive:
  256. # fs:
  257. # # Directory to upload completed jobs to. Add this directory to the list of
  258. # # monitored directories of the HistoryServer as well (see below).
  259. # dir: hdfs:///completed-jobs/
  260. # historyserver:
  261. # web:
  262. # # The address under which the web-based HistoryServer listens.
  263. # address: 0.0.0.0
  264. # # The port under which the web-based HistoryServer listens.
  265. # port: 8082
  266. # archive:
  267. # fs:
  268. # # Comma separated list of directories to monitor for completed jobs.
  269. # dir: hdfs:///completed-jobs/
  270. # # Interval in milliseconds for refreshing the monitored directories.
  271. # fs.refresh-interval: 10000
  272. dev002 config.yaml:
  273. ################################################################################
  274. # Licensed to the Apache Software Foundation (ASF) under one
  275. # or more contributor license agreements. See the NOTICE file
  276. # distributed with this work for additional information
  277. # regarding copyright ownership. The ASF licenses this file
  278. # to you under the Apache License, Version 2.0 (the
  279. # "License"); you may not use this file except in compliance
  280. # with the License. You may obtain a copy of the License at
  281. #
  282. # http://www.apache.org/licenses/LICENSE-2.0
  283. #
  284. # Unless required by applicable law or agreed to in writing, software
  285. # distributed under the License is distributed on an "AS IS" BASIS,
  286. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  287. # See the License for the specific language governing permissions and
  288. # limitations under the License.
  289. ################################################################################
  290. # These parameters are required for Java 17 support.
  291. # They can be safely removed when using Java 8/11.
  292. env:
  293. java:
  294. opts:
  295. all: --add-exports=java.base/sun.net.util=ALL-UNNAMED --add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED
  296. #==============================================================================
  297. # Common
  298. #==============================================================================
  299. jobmanager:
  300. # The host interface the JobManager will bind to. By default, this is localhost, and will prevent
  301. # the JobManager from communicating outside the machine/container it is running on.
  302. # On YARN this setting will be ignored if it is set to 'localhost', defaulting to 0.0.0.0.
  303. # On Kubernetes this setting will be ignored, defaulting to 0.0.0.0.
  304. #
  305. # To enable this, set the bind-host address to one that has access to an outside facing network
  306. # interface, such as 0.0.0.0.
  307. bind-host: 0.0.0.0
  308. rpc:
  309. # The external address of the host on which the JobManager runs and can be
  310. # reached by the TaskManagers and any clients which want to connect. This setting
  311. # is only used in Standalone mode and may be overwritten on the JobManager side
  312. # by specifying the --host <hostname> parameter of the bin/jobmanager.sh executable.
  313. # In high availability mode, if you use the bin/start-cluster.sh script and setup
  314. # the conf/masters file, this will be taken care of automatically. Yarn
  315. # automatically configure the host name based on the hostname of the node where the
  316. # JobManager runs.
  317. address: dev001
  318. # The RPC port where the JobManager is reachable.
  319. port: 6123
  320. memory:
  321. process:
  322. # The total process memory size for the JobManager.
  323. # Note this accounts for all memory usage within the JobManager process, including JVM metaspace and other overhead.
  324. size: 1600m
  325. execution:
  326. # The failover strategy, i.e., how the job computation recovers from task failures.
  327. # Only restart tasks that may have been affected by the task failure, which typically includes
  328. # downstream tasks and potentially upstream tasks if their produced data is no longer available for consumption.
  329. failover-strategy: region
  330. taskmanager:
  331. # The host interface the TaskManager will bind to. By default, this is localhost, and will prevent
  332. # the TaskManager from communicating outside the machine/container it is running on.
  333. # On YARN this setting will be ignored if it is set to 'localhost', defaulting to 0.0.0.0.
  334. # On Kubernetes this setting will be ignored, defaulting to 0.0.0.0.
  335. #
  336. # To enable this, set the bind-host address to one that has access to an outside facing network
  337. # interface, such as 0.0.0.0.
  338. bind-host: 0.0.0.0
  339. # The address of the host on which the TaskManager runs and can be reached by the JobManager and
  340. # other TaskManagers. If not specified, the TaskManager will try different strategies to identify
  341. # the address.
  342. #
  343. # Note this address needs to be reachable by the JobManager and forward traffic to one of
  344. # the interfaces the TaskManager is bound to (see 'taskmanager.bind-host').
  345. #
  346. # Note also that unless all TaskManagers are running on the same machine, this address needs to be
  347. # configured separately for each TaskManager.
  348. host: dev002
  349. # The number of task slots that each TaskManager offers. Each slot runs one parallel pipeline.
  350. numberOfTaskSlots: 2
  351. memory:
  352. process:
  353. # The total process memory size for the TaskManager.
  354. #
  355. # Note this accounts for all memory usage within the TaskManager process, including JVM metaspace and other overhead.
  356. # To exclude JVM metaspace and overhead, please, use total Flink memory size instead of 'taskmanager.memory.process.size'.
  357. # It is not recommended to set both 'taskmanager.memory.process.size' and Flink memory.
  358. size: 1728m
  359. parallelism:
  360. # The parallelism used for programs that did not specify and other parallelism.
  361. default: 1
  362. # # The default file system scheme and authority.
  363. # # By default file paths without scheme are interpreted relative to the local
  364. # # root file system 'file:///'. Use this to override the default and interpret
  365. # # relative paths relative to a different file system,
  366. # # for example 'hdfs://mynamenode:12345'
  367. # fs:
  368. # default-scheme: hdfs://mynamenode:12345
  369. #==============================================================================
  370. # High Availability
  371. #==============================================================================
  372. # high-availability:
  373. # # The high-availability mode. Possible options are 'NONE' or 'zookeeper'.
  374. # type: zookeeper
  375. # # The path where metadata for master recovery is persisted. While ZooKeeper stores
  376. # # the small ground truth for checkpoint and leader election, this location stores
  377. # # the larger objects, like persisted dataflow graphs.
  378. # #
  379. # # Must be a durable file system that is accessible from all nodes
  380. # # (like HDFS, S3, Ceph, nfs, ...)
  381. # storageDir: hdfs:///flink/ha/
  382. # zookeeper:
  383. # # The list of ZooKeeper quorum peers that coordinate the high-availability
  384. # # setup. This must be a list of the form:
  385. # # "host1:clientPort,host2:clientPort,..." (default clientPort: 2181)
  386. # quorum: localhost:2181
  387. # client:
  388. # # ACL options are based on https://zookeeper.apache.org/doc/r3.1.2/zookeeperProgrammers.html#sc_BuiltinACLSchemes
  389. # # It can be either "creator" (ZOO_CREATE_ALL_ACL) or "open" (ZOO_OPEN_ACL_UNSAFE)
  390. # # The default value is "open" and it can be changed to "creator" if ZK security is enabled
  391. # acl: open
  392. #==============================================================================
  393. # Fault tolerance and checkpointing
  394. #==============================================================================
  395. # The backend that will be used to store operator state checkpoints if
  396. # checkpointing is enabled. Checkpointing is enabled when execution.checkpointing.interval > 0.
  397. # # Execution checkpointing related parameters. Please refer to CheckpointConfig and ExecutionCheckpointingOptions for more details.
  398. # execution:
  399. # checkpointing:
  400. # interval: 3min
  401. # externalized-checkpoint-retention: [DELETE_ON_CANCELLATION, RETAIN_ON_CANCELLATION]
  402. # max-concurrent-checkpoints: 1
  403. # min-pause: 0
  404. # mode: [EXACTLY_ONCE, AT_LEAST_ONCE]
  405. # timeout: 10min
  406. # tolerable-failed-checkpoints: 0
  407. # unaligned: false
  408. # state:
  409. # backend:
  410. # # Supported backends are 'hashmap', 'rocksdb', or the
  411. # # <class-name-of-factory>.
  412. # type: hashmap
  413. # # Flag to enable/disable incremental checkpoints for backends that
  414. # # support incremental checkpoints (like the RocksDB state backend).
  415. # incremental: false
  416. # checkpoints:
  417. # # Directory for checkpoints filesystem, when using any of the default bundled
  418. # # state backends.
  419. # dir: hdfs://namenode-host:port/flink-checkpoints
  420. # savepoints:
  421. # # Default target directory for savepoints, optional.
  422. # dir: hdfs://namenode-host:port/flink-savepoints
  423. #==============================================================================
  424. # Rest & web frontend
  425. #==============================================================================
  426. rest:
  427. # The address to which the REST client will connect to
  428. address: dev002
  429. # The address that the REST & web server binds to
  430. # By default, this is localhost, which prevents the REST & web server from
  431. # being able to communicate outside of the machine/container it is running on.
  432. #
  433. # To enable this, set the bind address to one that has access to outside-facing
  434. # network interface, such as 0.0.0.0.
  435. bind-address: 0.0.0.0
  436. # # The port to which the REST client connects to. If rest.bind-port has
  437. # # not been specified, then the server will bind to this port as well.
  438. # port: 8081
  439. # # Port range for the REST and web server to bind to.
  440. # bind-port: 8080-8090
  441. # web:
  442. # submit:
  443. # # Flag to specify whether job submission is enabled from the web-based
  444. # # runtime monitor. Uncomment to disable.
  445. # enable: false
  446. # cancel:
  447. # # Flag to specify whether job cancellation is enabled from the web-based
  448. # # runtime monitor. Uncomment to disable.
  449. # enable: false
  450. #==============================================================================
  451. # Advanced
  452. #==============================================================================
  453. # io:
  454. # tmp:
  455. # # Override the directories for temporary files. If not specified, the
  456. # # system-specific Java temporary directory (java.io.tmpdir property) is taken.
  457. # #
  458. # # For framework setups on Yarn, Flink will automatically pick up the
  459. # # containers' temp directories without any need for configuration.
  460. # #
  461. # # Add a delimited list for multiple directories, using the system directory
  462. # # delimiter (colon ':' on unix) or a comma, e.g.:
  463. # # /data1/tmp:/data2/tmp:/data3/tmp
  464. # #
  465. # # Note: Each directory entry is read from and written to by a different I/O
  466. # # thread. You can include the same directory multiple times in order to create
  467. # # multiple I/O threads against that directory. This is for example relevant for
  468. # # high-throughput RAIDs.
  469. # dirs: /tmp
  470. # classloader:
  471. # resolve:
  472. # # The classloading resolve order. Possible values are 'child-first' (Flink's default)
  473. # # and 'parent-first' (Java's default).
  474. # #
  475. # # Child first classloading allows users to use different dependency/library
  476. # # versions in their application than those in the classpath. Switching back
  477. # # to 'parent-first' may help with debugging dependency issues.
  478. # order: child-first
  479. # The amount of memory going to the network stack. These numbers usually need
  480. # no tuning. Adjusting them may be necessary in case of an "Insufficient number
  481. # of network buffers" error. The default min is 64MB, the default max is 1GB.
  482. #
  483. # taskmanager:
  484. # memory:
  485. # network:
  486. # fraction: 0.1
  487. # min: 64mb
  488. # max: 1gb
  489. #==============================================================================
  490. # Flink Cluster Security Configuration
  491. #==============================================================================
  492. # Kerberos authentication for various components - Hadoop, ZooKeeper, and connectors -
  493. # may be enabled in four steps:
  494. # 1. configure the local krb5.conf file
  495. # 2. provide Kerberos credentials (either a keytab or a ticket cache w/ kinit)
  496. # 3. make the credentials available to various JAAS login contexts
  497. # 4. configure the connector to use JAAS/SASL
  498. # # The below configure how Kerberos credentials are provided. A keytab will be used instead of
  499. # # a ticket cache if the keytab path and principal are set.
  500. # security:
  501. # kerberos:
  502. # login:
  503. # use-ticket-cache: true
  504. # keytab: /path/to/kerberos/keytab
  505. # principal: flink-user
  506. # # The configuration below defines which JAAS login contexts
  507. # contexts: Client,KafkaClient
  508. #==============================================================================
  509. # ZK Security Configuration
  510. #==============================================================================
  511. # zookeeper:
  512. # sasl:
  513. # # Below configurations are applicable if ZK ensemble is configured for security
  514. # #
  515. # # Override below configuration to provide custom ZK service name if configured
  516. # # zookeeper.sasl.service-name: zookeeper
  517. # #
  518. # # The configuration below must match one of the values set in "security.kerberos.login.contexts"
  519. # login-context-name: Client
  520. #==============================================================================
  521. # HistoryServer
  522. #==============================================================================
  523. # The HistoryServer is started and stopped via bin/historyserver.sh (start|stop)
  524. #
  525. # jobmanager:
  526. # archive:
  527. # fs:
  528. # # Directory to upload completed jobs to. Add this directory to the list of
  529. # # monitored directories of the HistoryServer as well (see below).
  530. # dir: hdfs:///completed-jobs/
  531. # historyserver:
  532. # web:
  533. # # The address under which the web-based HistoryServer listens.
  534. # address: 0.0.0.0
  535. # # The port under which the web-based HistoryServer listens.
  536. # port: 8082
  537. # archive:
  538. # fs:
  539. # # Comma separated list of directories to monitor for completed jobs.
  540. # dir: hdfs:///completed-jobs/
  541. # # Interval in milliseconds for refreshing the monitored directories.
  542. # fs.refresh-interval: 10000
  543. dev003 config.yaml:
  544. ################################################################################
  545. # Licensed to the Apache Software Foundation (ASF) under one
  546. # or more contributor license agreements. See the NOTICE file
  547. # distributed with this work for additional information
  548. # regarding copyright ownership. The ASF licenses this file
  549. # to you under the Apache License, Version 2.0 (the
  550. # "License"); you may not use this file except in compliance
  551. # with the License. You may obtain a copy of the License at
  552. #
  553. # http://www.apache.org/licenses/LICENSE-2.0
  554. #
  555. # Unless required by applicable law or agreed to in writing, software
  556. # distributed under the License is distributed on an "AS IS" BASIS,
  557. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  558. # See the License for the specific language governing permissions and
  559. # limitations under the License.
  560. ################################################################################
  561. # These parameters are required for Java 17 support.
  562. # They can be safely removed when using Java 8/11.
  563. env:
  564. java:
  565. opts:
  566. all: --add-exports=java.base/sun.net.util=ALL-UNNAMED --add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED
  567. #==============================================================================
  568. # Common
  569. #==============================================================================
  570. jobmanager:
  571. # The host interface the JobManager will bind to. By default, this is localhost, and will prevent
  572. # the JobManager from communicating outside the machine/container it is running on.
  573. # On YARN this setting will be ignored if it is set to 'localhost', defaulting to 0.0.0.0.
  574. # On Kubernetes this setting will be ignored, defaulting to 0.0.0.0.
  575. #
  576. # To enable this, set the bind-host address to one that has access to an outside facing network
  577. # interface, such as 0.0.0.0.
  578. bind-host: 0.0.0.0
  579. rpc:
  580. # The external address of the host on which the JobManager runs and can be
  581. # reached by the TaskManagers and any clients which want to connect. This setting
  582. # is only used in Standalone mode and may be overwritten on the JobManager side
  583. # by specifying the --host <hostname> parameter of the bin/jobmanager.sh executable.
  584. # In high availability mode, if you use the bin/start-cluster.sh script and setup
  585. # the conf/masters file, this will be taken care of automatically. Yarn
  586. # automatically configure the host name based on the hostname of the node where the
  587. # JobManager runs.
  588. address: dev001
  589. # The RPC port where the JobManager is reachable.
  590. port: 6123
  591. memory:
  592. process:
  593. # The total process memory size for the JobManager.
  594. # Note this accounts for all memory usage within the JobManager process, including JVM metaspace and other overhead.
  595. size: 1600m
  596. execution:
  597. # The failover strategy, i.e., how the job computation recovers from task failures.
  598. # Only restart tasks that may have been affected by the task failure, which typically includes
  599. # downstream tasks and potentially upstream tasks if their produced data is no longer available for consumption.
  600. failover-strategy: region
  601. taskmanager:
  602. # The host interface the TaskManager will bind to. By default, this is localhost, and will prevent
  603. # the TaskManager from communicating outside the machine/container it is running on.
  604. # On YARN this setting will be ignored if it is set to 'localhost', defaulting to 0.0.0.0.
  605. # On Kubernetes this setting will be ignored, defaulting to 0.0.0.0.
  606. #
  607. # To enable this, set the bind-host address to one that has access to an outside facing network
  608. # interface, such as 0.0.0.0.
  609. bind-host: 0.0.0.0
  610. # The address of the host on which the TaskManager runs and can be reached by the JobManager and
  611. # other TaskManagers. If not specified, the TaskManager will try different strategies to identify
  612. # the address.
  613. #
  614. # Note this address needs to be reachable by the JobManager and forward traffic to one of
  615. # the interfaces the TaskManager is bound to (see 'taskmanager.bind-host').
  616. #
  617. # Note also that unless all TaskManagers are running on the same machine, this address needs to be
  618. # configured separately for each TaskManager.
  619. host: dev003
  620. # The number of task slots that each TaskManager offers. Each slot runs one parallel pipeline.
  621. numberOfTaskSlots: 2
  622. memory:
  623. process:
  624. # The total process memory size for the TaskManager.
  625. #
  626. # Note this accounts for all memory usage within the TaskManager process, including JVM metaspace and other overhead.
  627. # To exclude JVM metaspace and overhead, please, use total Flink memory size instead of 'taskmanager.memory.process.size'.
  628. # It is not recommended to set both 'taskmanager.memory.process.size' and Flink memory.
  629. size: 1728m
  630. parallelism:
  631. # The parallelism used for programs that did not specify and other parallelism.
  632. default: 1
  633. # # The default file system scheme and authority.
  634. # # By default file paths without scheme are interpreted relative to the local
  635. # # root file system 'file:///'. Use this to override the default and interpret
  636. # # relative paths relative to a different file system,
  637. # # for example 'hdfs://mynamenode:12345'
  638. # fs:
  639. # default-scheme: hdfs://mynamenode:12345
  640. #==============================================================================
  641. # High Availability
  642. #==============================================================================
  643. # high-availability:
  644. # # The high-availability mode. Possible options are 'NONE' or 'zookeeper'.
  645. # type: zookeeper
  646. # # The path where metadata for master recovery is persisted. While ZooKeeper stores
  647. # # the small ground truth for checkpoint and leader election, this location stores
  648. # # the larger objects, like persisted dataflow graphs.
  649. # #
  650. # # Must be a durable file system that is accessible from all nodes
  651. # # (like HDFS, S3, Ceph, nfs, ...)
  652. # storageDir: hdfs:///flink/ha/
  653. # zookeeper:
  654. # # The list of ZooKeeper quorum peers that coordinate the high-availability
  655. # # setup. This must be a list of the form:
  656. # # "host1:clientPort,host2:clientPort,..." (default clientPort: 2181)
  657. # quorum: localhost:2181
  658. # client:
  659. # # ACL options are based on https://zookeeper.apache.org/doc/r3.1.2/zookeeperProgrammers.html#sc_BuiltinACLSchemes
  660. # # It can be either "creator" (ZOO_CREATE_ALL_ACL) or "open" (ZOO_OPEN_ACL_UNSAFE)
  661. # # The default value is "open" and it can be changed to "creator" if ZK security is enabled
  662. # acl: open
  663. #==============================================================================
  664. # Fault tolerance and checkpointing
  665. #==============================================================================
  666. # The backend that will be used to store operator state checkpoints if
  667. # checkpointing is enabled. Checkpointing is enabled when execution.checkpointing.interval > 0.
  668. # # Execution checkpointing related parameters. Please refer to CheckpointConfig and ExecutionCheckpointingOptions for more details.
  669. # execution:
  670. # checkpointing:
  671. # interval: 3min
  672. # externalized-checkpoint-retention: [DELETE_ON_CANCELLATION, RETAIN_ON_CANCELLATION]
  673. # max-concurrent-checkpoints: 1
  674. # min-pause: 0
  675. # mode: [EXACTLY_ONCE, AT_LEAST_ONCE]
  676. # timeout: 10min
  677. # tolerable-failed-checkpoints: 0
  678. # unaligned: false
  679. # state:
  680. # backend:
  681. # # Supported backends are 'hashmap', 'rocksdb', or the
  682. # # <class-name-of-factory>.
  683. # type: hashmap
  684. # # Flag to enable/disable incremental checkpoints for backends that
  685. # # support incremental checkpoints (like the RocksDB state backend).
  686. # incremental: false
  687. # checkpoints:
  688. # # Directory for checkpoints filesystem, when using any of the default bundled
  689. # # state backends.
  690. # dir: hdfs://namenode-host:port/flink-checkpoints
  691. # savepoints:
  692. # # Default target directory for savepoints, optional.
  693. # dir: hdfs://namenode-host:port/flink-savepoints
  694. #==============================================================================
  695. # Rest & web frontend
  696. #==============================================================================
  697. rest:
  698. # The address to which the REST client will connect to
  699. address: dev003
  700. # The address that the REST & web server binds to
  701. # By default, this is localhost, which prevents the REST & web server from
  702. # being able to communicate outside of the machine/container it is running on.
  703. #
  704. # To enable this, set the bind address to one that has access to outside-facing
  705. # network interface, such as 0.0.0.0.
  706. bind-address: 0.0.0.0
  707. # # The port to which the REST client connects to. If rest.bind-port has
  708. # # not been specified, then the server will bind to this port as well.
  709. # port: 8081
  710. # # Port range for the REST and web server to bind to.
  711. # bind-port: 8080-8090
  712. # web:
  713. # submit:
  714. # # Flag to specify whether job submission is enabled from the web-based
  715. # # runtime monitor. Uncomment to disable.
  716. # enable: false
  717. # cancel:
  718. # # Flag to specify whether job cancellation is enabled from the web-based
  719. # # runtime monitor. Uncomment to disable.
  720. # enable: false
  721. #==============================================================================
  722. # Advanced
  723. #==============================================================================
  724. # io:
  725. # tmp:
  726. # # Override the directories for temporary files. If not specified, the
  727. # # system-specific Java temporary directory (java.io.tmpdir property) is taken.
  728. # #
  729. # # For framework setups on Yarn, Flink will automatically pick up the
  730. # # containers' temp directories without any need for configuration.
  731. # #
  732. # # Add a delimited list for multiple directories, using the system directory
  733. # # delimiter (colon ':' on unix) or a comma, e.g.:
  734. # # /data1/tmp:/data2/tmp:/data3/tmp
  735. # #
  736. # # Note: Each directory entry is read from and written to by a different I/O
  737. # # thread. You can include the same directory multiple times in order to create
  738. # # multiple I/O threads against that directory. This is for example relevant for
  739. # # high-throughput RAIDs.
  740. # dirs: /tmp
  741. # classloader:
  742. # resolve:
  743. # # The classloading resolve order. Possible values are 'child-first' (Flink's default)
  744. # # and 'parent-first' (Java's default).
  745. # #
  746. # # Child first classloading allows users to use different dependency/library
  747. # # versions in their application than those in the classpath. Switching back
  748. # # to 'parent-first' may help with debugging dependency issues.
  749. # order: child-first
  750. # The amount of memory going to the network stack. These numbers usually need
  751. # no tuning. Adjusting them may be necessary in case of an "Insufficient number
  752. # of network buffers" error. The default min is 64MB, the default max is 1GB.
  753. #
  754. # taskmanager:
  755. # memory:
  756. # network:
  757. # fraction: 0.1
  758. # min: 64mb
  759. # max: 1gb
  760. #==============================================================================
  761. # Flink Cluster Security Configuration
  762. #==============================================================================
  763. # Kerberos authentication for various components - Hadoop, ZooKeeper, and connectors -
  764. # may be enabled in four steps:
  765. # 1. configure the local krb5.conf file
  766. # 2. provide Kerberos credentials (either a keytab or a ticket cache w/ kinit)
  767. # 3. make the credentials available to various JAAS login contexts
  768. # 4. configure the connector to use JAAS/SASL
  769. # # The below configure how Kerberos credentials are provided. A keytab will be used instead of
  770. # # a ticket cache if the keytab path and principal are set.
  771. # security:
  772. # kerberos:
  773. # login:
  774. # use-ticket-cache: true
  775. # keytab: /path/to/kerberos/keytab
  776. # principal: flink-user
  777. # # The configuration below defines which JAAS login contexts
  778. # contexts: Client,KafkaClient
  779. #==============================================================================
  780. # ZK Security Configuration
  781. #==============================================================================
  782. # zookeeper:
  783. # sasl:
  784. # # Below configurations are applicable if ZK ensemble is configured for security
  785. # #
  786. # # Override below configuration to provide custom ZK service name if configured
  787. # # zookeeper.sasl.service-name: zookeeper
  788. # #
  789. # # The configuration below must match one of the values set in "security.kerberos.login.contexts"
  790. # login-context-name: Client
  791. #==============================================================================
  792. # HistoryServer
  793. #==============================================================================
  794. # The HistoryServer is started and stopped via bin/historyserver.sh (start|stop)
  795. #
  796. # jobmanager:
  797. # archive:
  798. # fs:
  799. # # Directory to upload completed jobs to. Add this directory to the list of
  800. # # monitored directories of the HistoryServer as well (see below).
  801. # dir: hdfs:///completed-jobs/
  802. # historyserver:
  803. # web:
  804. # # The address under which the web-based HistoryServer listens.
  805. # address: 0.0.0.0
  806. # # The port under which the web-based HistoryServer listens.
  807. # port: 8082
  808. # archive:
  809. # fs:
  810. # # Comma separated list of directories to monitor for completed jobs.
  811. # dir: hdfs:///completed-jobs/
  812. # # Interval in milliseconds for refreshing the monitored directories.
  813. # fs.refresh-interval: 10000

conf/masters 及 conf/works 使用 xsync 同步分发命令 分发到各机器节点即可:

5c4cf13312fd443a81162dbbec3460c8.png

  1. -- masters
  2. dev001:8081
  3. -- workers
  4. dev001
  5. dev002
  6. dev003

补充:

linux 查看port是否被占用:nestat -apn|grep 8081

linux 查看各节点flink任务:jps

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Guff_9hys/article/detail/751769
推荐阅读
相关标签
  

闽ICP备14008679号