Search in sources :

Example 81 with MemorySize

use of org.apache.flink.configuration.MemorySize in project flink by apache.

the class DefaultVertexParallelismDeciderTest method before.

@Before
public void before() throws Exception {
    Configuration configuration = new Configuration();
    configuration.setInteger(JobManagerOptions.ADAPTIVE_BATCH_SCHEDULER_MAX_PARALLELISM, MAX_PARALLELISM);
    configuration.setInteger(JobManagerOptions.ADAPTIVE_BATCH_SCHEDULER_MIN_PARALLELISM, MIN_PARALLELISM);
    configuration.set(JobManagerOptions.ADAPTIVE_BATCH_SCHEDULER_DATA_VOLUME_PER_TASK, new MemorySize(DATA_VOLUME_PER_TASK));
    configuration.setInteger(JobManagerOptions.ADAPTIVE_BATCH_SCHEDULER_DEFAULT_SOURCE_PARALLELISM, DEFAULT_SOURCE_PARALLELISM);
    decider = DefaultVertexParallelismDecider.from(configuration);
}
Also used : MemorySize(org.apache.flink.configuration.MemorySize) Configuration(org.apache.flink.configuration.Configuration) Before(org.junit.Before)

Aggregations

MemorySize (org.apache.flink.configuration.MemorySize)81 Test (org.junit.Test)56 Configuration (org.apache.flink.configuration.Configuration)51 IllegalConfigurationException (org.apache.flink.configuration.IllegalConfigurationException)6 Path (org.apache.flink.core.fs.Path)5 File (java.io.File)4 ArrayList (java.util.ArrayList)3 CPUResource (org.apache.flink.api.common.resources.CPUResource)3 FileSourceSplit (org.apache.flink.connector.file.src.FileSourceSplit)2 BulkFormat (org.apache.flink.connector.file.src.reader.BulkFormat)2 ExecutionJobVertex (org.apache.flink.runtime.executiongraph.ExecutionJobVertex)2 IntermediateResultPartitionTest (org.apache.flink.runtime.executiongraph.IntermediateResultPartitionTest)2 SlotSharingGroup (org.apache.flink.runtime.jobmanager.scheduler.SlotSharingGroup)2 TaskExecutorFlinkMemory (org.apache.flink.runtime.util.config.memory.taskmanager.TaskExecutorFlinkMemory)2 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)2 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 UUID (java.util.UUID)1 ResourceSpec (org.apache.flink.api.common.operators.ResourceSpec)1