Skip to content

Commit

Permalink
[hotfix] Remove unused ClusterSpecification#fromConfiguration.
Browse files Browse the repository at this point in the history
  • Loading branch information
xintongsong authored and tillrohrmann committed Jan 6, 2020
1 parent 48f838f commit a455ddf
Showing 1 changed file with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@

package org.apache.flink.client.deployment;

import org.apache.flink.configuration.Configuration;
import org.apache.flink.configuration.ConfigurationUtils;
import org.apache.flink.configuration.TaskManagerOptions;
import org.apache.flink.runtime.clusterframework.TaskExecutorResourceUtils;

/**
* Description of the cluster to start by the {@link ClusterDescriptor}.
*/
Expand Down Expand Up @@ -65,23 +60,6 @@ public String toString() {
'}';
}

public static ClusterSpecification fromConfiguration(Configuration configuration) {
int slots = configuration.getInteger(TaskManagerOptions.NUM_TASK_SLOTS, 1);

int jobManagerMemoryMb = ConfigurationUtils.getJobManagerHeapMemory(configuration).getMebiBytes();
int taskManagerMemoryMb = TaskExecutorResourceUtils
.resourceSpecFromConfig(configuration)
.getTotalProcessMemorySize()
.getMebiBytes();

return new ClusterSpecificationBuilder()
.setMasterMemoryMB(jobManagerMemoryMb)
.setTaskManagerMemoryMB(taskManagerMemoryMb)
.setNumberTaskManagers(1)
.setSlotsPerTaskManager(slots)
.createClusterSpecification();
}

/**
* Builder for the {@link ClusterSpecification} instance.
*/
Expand Down

0 comments on commit a455ddf

Please sign in to comment.