com.cloudera.api.model
Class ApiRollingRestartArgs

java.lang.Object
  extended by com.cloudera.api.model.ApiRollingRestartArgs

public class ApiRollingRestartArgs
extends Object

Arguments used for Rolling Restart commands.


Constructor Summary
ApiRollingRestartArgs()
           
 
Method Summary
 boolean equals(Object o)
           
 List<String> getRestartRoleNames()
          List of specific roles to restart.
 List<String> getRestartRoleTypes()
          Role types to restart.
 Integer getSlaveBatchSize()
          Number of slave roles to restart at a time.
 Integer getSlaveFailCountThreshold()
          The threshold for number of slave batches that are allowed to fail to restart before the entire command is considered failed.
 Integer getSleepSeconds()
          Number of seconds to sleep between restarts of slave role batches.
 Boolean getStaleConfigsOnly()
          Restart roles with stale configs only.
 Boolean getUnUpgradedOnly()
          Restart roles that haven't been upgraded yet.
 int hashCode()
           
 void setRestartRoleNames(List<String> restartRoleNames)
           
 void setRestartRoleTypes(List<String> restartRoleTypes)
           
 void setSlaveBatchSize(int slaveBatchSize)
           
 void setSlaveFailCountThreshold(int slaveFailCountThreshold)
           
 void setSleepSeconds(int sleepSeconds)
           
 void setStaleConfigsOnly(boolean staleConfigsOnly)
           
 void setUnUpgradedOnly(boolean unUpgradedOnly)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApiRollingRestartArgs

public ApiRollingRestartArgs()
Method Detail

getSlaveBatchSize

public Integer getSlaveBatchSize()
Number of slave roles to restart at a time. Must be greater than zero. Default is 1. Please note that for HDFS, this number should be less than the replication factor (default 3) to ensure data availability during rolling restart.


setSlaveBatchSize

public void setSlaveBatchSize(int slaveBatchSize)

getSleepSeconds

public Integer getSleepSeconds()
Number of seconds to sleep between restarts of slave role batches. Must be greater than or equal to 0. Default is 0.


setSleepSeconds

public void setSleepSeconds(int sleepSeconds)

getSlaveFailCountThreshold

public Integer getSlaveFailCountThreshold()
The threshold for number of slave batches that are allowed to fail to restart before the entire command is considered failed. Must be greather than or equal to 0. Default is 0.

This argument is for ADVANCED users only.


setSlaveFailCountThreshold

public void setSlaveFailCountThreshold(int slaveFailCountThreshold)

getStaleConfigsOnly

public Boolean getStaleConfigsOnly()
Restart roles with stale configs only.


setStaleConfigsOnly

public void setStaleConfigsOnly(boolean staleConfigsOnly)

getUnUpgradedOnly

public Boolean getUnUpgradedOnly()
Restart roles that haven't been upgraded yet.


setUnUpgradedOnly

public void setUnUpgradedOnly(boolean unUpgradedOnly)

getRestartRoleTypes

public List<String> getRestartRoleTypes()
Role types to restart. If not specified, all startable roles are restarted. Both role types and role names should not be specified.


setRestartRoleTypes

public void setRestartRoleTypes(List<String> restartRoleTypes)

getRestartRoleNames

public List<String> getRestartRoleNames()
List of specific roles to restart. If none are specified, then all roles of specified role types are restarted. Both role types and role names should not be specified.


setRestartRoleNames

public void setRestartRoleNames(List<String> restartRoleNames)

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.