flink报错NoResourceAvailableException: Could not acquire the minimum required resources
没有可以使用的资源。。那么究竟什么资源没有可以被使用了?一般都是说内存。所以我们给他调整内存的参数。
以下是flink配置参数可以使用的一些配置选项
# The total process memory size for the JobManager.
#
# Note this accounts for all memory usage within the JobManager process, including JVM metaspace and other overhead.
jobmanager.memory.process.size: 6600m
# The total process memory size for the TaskManager.
#
# Note this accounts for all memory usage within the TaskManager process, including JVM metaspace and other overhead.
taskmanager.memory.process.size: 5728m
# To exclude JVM metaspace and overhead, please, use total Flink memory size instead of 'taskmanager.memory.process.size'.
# It is not recommended to set both 'taskmanager.memory.process.size' and Flink memory.
#
taskmanager.memory.flink.size: 2280m
# The number of task slots that each TaskManager offers. Each slot runs one parallel pipeline.
taskmanager.numberOfTaskSlots: 4
# The parallelism used for programs that did not specify and other parallelism.
parallelism.default: 1
因为我们的内存是16G的服务器,所以我现给调整为以下参数看看,试一试,看是否报错。
jobmanager.memory.process.size: 2600m
taskmanager.memory.process.size: 2728m
taskmanager.memory.flink.size: 2280m
配置好了以后重新启动后到webUI看一下大小,确实变大了,观察观察
特别需要注意的地方,我使用的1.13版本在windows系统上执行有些问题,最后放到Linux中成功运行。