Class WorkerResourceSpec.Builder
- java.lang.Object
-
- org.apache.flink.runtime.resourcemanager.WorkerResourceSpec.Builder
-
- Enclosing class:
- WorkerResourceSpec
public static class WorkerResourceSpec.Builder extends Object
Builder forWorkerResourceSpec
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WorkerResourceSpec
build()
WorkerResourceSpec.Builder
setCpuCores(double cpuCores)
WorkerResourceSpec.Builder
setExtendedResource(ExternalResource extendedResource)
Add the given extended resource.WorkerResourceSpec.Builder
setExtendedResources(Collection<ExternalResource> extendedResources)
Add the given extended resources.WorkerResourceSpec.Builder
setManagedMemoryMB(int managedMemoryMB)
WorkerResourceSpec.Builder
setNetworkMemoryMB(int networkMemoryMB)
WorkerResourceSpec.Builder
setNumSlots(int numSlots)
WorkerResourceSpec.Builder
setTaskHeapMemoryMB(int taskHeapMemoryMB)
WorkerResourceSpec.Builder
setTaskOffHeapMemoryMB(int taskOffHeapMemoryMB)
-
-
-
Method Detail
-
setCpuCores
public WorkerResourceSpec.Builder setCpuCores(double cpuCores)
-
setTaskHeapMemoryMB
public WorkerResourceSpec.Builder setTaskHeapMemoryMB(int taskHeapMemoryMB)
-
setTaskOffHeapMemoryMB
public WorkerResourceSpec.Builder setTaskOffHeapMemoryMB(int taskOffHeapMemoryMB)
-
setNetworkMemoryMB
public WorkerResourceSpec.Builder setNetworkMemoryMB(int networkMemoryMB)
-
setManagedMemoryMB
public WorkerResourceSpec.Builder setManagedMemoryMB(int managedMemoryMB)
-
setNumSlots
public WorkerResourceSpec.Builder setNumSlots(int numSlots)
-
setExtendedResource
public WorkerResourceSpec.Builder setExtendedResource(ExternalResource extendedResource)
Add the given extended resource. The old value with the same resource name will be replaced if present.
-
setExtendedResources
public WorkerResourceSpec.Builder setExtendedResources(Collection<ExternalResource> extendedResources)
Add the given extended resources. This will discard all the previous added extended resources.
-
build
public WorkerResourceSpec build()
-
-