io.druid.indexing.overlord.autoscaling.SimpleResourceManagementConfig Maven / Gradle / Ivy
/*
* Druid - a distributed column store.
* Copyright 2012 - 2015 Metamarkets Group Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.druid.indexing.overlord.autoscaling;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.joda.time.Period;
/**
*/
public class SimpleResourceManagementConfig
{
@JsonProperty
private Period workerIdleTimeout = new Period("PT90m");
@JsonProperty
private Period maxScalingDuration = new Period("PT15M");
@JsonProperty
private int numEventsToTrack = 50;
@JsonProperty
private Period pendingTaskTimeout = new Period("PT30s");
@JsonProperty
private String workerVersion = null;
@JsonProperty
private int workerPort = 8080;
public Period getWorkerIdleTimeout()
{
return workerIdleTimeout;
}
public SimpleResourceManagementConfig setWorkerIdleTimeout(Period workerIdleTimeout)
{
this.workerIdleTimeout = workerIdleTimeout;
return this;
}
public Period getMaxScalingDuration()
{
return maxScalingDuration;
}
public SimpleResourceManagementConfig setMaxScalingDuration(Period maxScalingDuration)
{
this.maxScalingDuration = maxScalingDuration;
return this;
}
public int getNumEventsToTrack()
{
return numEventsToTrack;
}
public SimpleResourceManagementConfig setNumEventsToTrack(int numEventsToTrack)
{
this.numEventsToTrack = numEventsToTrack;
return this;
}
public Period getPendingTaskTimeout()
{
return pendingTaskTimeout;
}
public SimpleResourceManagementConfig setPendingTaskTimeout(Period pendingTaskTimeout)
{
this.pendingTaskTimeout = pendingTaskTimeout;
return this;
}
public String getWorkerVersion()
{
return workerVersion;
}
public SimpleResourceManagementConfig setWorkerVersion(String workerVersion)
{
this.workerVersion = workerVersion;
return this;
}
public int getWorkerPort()
{
return workerPort;
}
public SimpleResourceManagementConfig setWorkerPort(int workerPort)
{
this.workerPort = workerPort;
return this;
}
}