Package com.gpudb.protocol
Class AdminSwitchoverRequest
- java.lang.Object
-
- com.gpudb.protocol.AdminSwitchoverRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class AdminSwitchoverRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.adminSwitchover.Manually switch over one or more processes to another host. Individual ranks or entire hosts may be moved to another host.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAdminSwitchoverRequest.OptionsA set of string constants for theAdminSwitchoverRequestparameteroptions.
-
Constructor Summary
Constructors Constructor Description AdminSwitchoverRequest()Constructs an AdminSwitchoverRequest object with default parameters.AdminSwitchoverRequest(List<String> processes, List<String> destinations, Map<String,String> options)Constructs an AdminSwitchoverRequest object with the specified parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.List<String>getDestinations()Indicates to which host to switch over each corresponding process given inprocesses.Map<String,String>getOptions()Optional parameters.List<String>getProcesses()Indicates the process identifier to switch over to another host.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.AdminSwitchoverRequestsetDestinations(List<String> destinations)Indicates to which host to switch over each corresponding process given inprocesses.AdminSwitchoverRequestsetOptions(Map<String,String> options)Optional parameters.AdminSwitchoverRequestsetProcesses(List<String> processes)Indicates the process identifier to switch over to another host.StringtoString()
-
-
-
Constructor Detail
-
AdminSwitchoverRequest
public AdminSwitchoverRequest()
Constructs an AdminSwitchoverRequest object with default parameters.
-
AdminSwitchoverRequest
public AdminSwitchoverRequest(List<String> processes, List<String> destinations, Map<String,String> options)
Constructs an AdminSwitchoverRequest object with the specified parameters.- Parameters:
processes- Indicates the process identifier to switch over to another host. Options are 'hostN' and 'rankN' where 'N' corresponds to the number associated with a host or rank in the Network section of the gpudb.conf file; e.g., 'host[N].address' or 'rank[N].host'. If 'hostN' is provided, all processes on that host will be moved to another host. Each entry in this array will be switched over to the corresponding host entry at the same index indestinations.destinations- Indicates to which host to switch over each corresponding process given inprocesses. Each index must be specified as 'hostN' where 'N' corresponds to the number associated with a host or rank in the Network section of the gpudb.conf file; e.g., 'host[N].address'. Each entry in this array will receive the corresponding process entry at the same index inprocesses.options- Optional parameters.DRY_RUN: If set toTRUE, only validation checks will be performed. Nothing is switched over. Supported values: The default value isFALSE.
Map.
-
-
Method Detail
-
getClassSchema
public static org.apache.avro.Schema getClassSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Returns:
- The schema for the class.
-
getProcesses
public List<String> getProcesses()
Indicates the process identifier to switch over to another host. Options are 'hostN' and 'rankN' where 'N' corresponds to the number associated with a host or rank in the Network section of the gpudb.conf file; e.g., 'host[N].address' or 'rank[N].host'. If 'hostN' is provided, all processes on that host will be moved to another host. Each entry in this array will be switched over to the corresponding host entry at the same index indestinations.- Returns:
- The current value of
processes.
-
setProcesses
public AdminSwitchoverRequest setProcesses(List<String> processes)
Indicates the process identifier to switch over to another host. Options are 'hostN' and 'rankN' where 'N' corresponds to the number associated with a host or rank in the Network section of the gpudb.conf file; e.g., 'host[N].address' or 'rank[N].host'. If 'hostN' is provided, all processes on that host will be moved to another host. Each entry in this array will be switched over to the corresponding host entry at the same index indestinations.- Parameters:
processes- The new value forprocesses.- Returns:
thisto mimic the builder pattern.
-
getDestinations
public List<String> getDestinations()
Indicates to which host to switch over each corresponding process given inprocesses. Each index must be specified as 'hostN' where 'N' corresponds to the number associated with a host or rank in the Network section of the gpudb.conf file; e.g., 'host[N].address'. Each entry in this array will receive the corresponding process entry at the same index inprocesses.- Returns:
- The current value of
destinations.
-
setDestinations
public AdminSwitchoverRequest setDestinations(List<String> destinations)
Indicates to which host to switch over each corresponding process given inprocesses. Each index must be specified as 'hostN' where 'N' corresponds to the number associated with a host or rank in the Network section of the gpudb.conf file; e.g., 'host[N].address'. Each entry in this array will receive the corresponding process entry at the same index inprocesses.- Parameters:
destinations- The new value fordestinations.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> getOptions()
Optional parameters.DRY_RUN: If set toTRUE, only validation checks will be performed. Nothing is switched over. Supported values: The default value isFALSE.
Map.- Returns:
- The current value of
options.
-
setOptions
public AdminSwitchoverRequest setOptions(Map<String,String> options)
Optional parameters.DRY_RUN: If set toTRUE, only validation checks will be performed. Nothing is switched over. Supported values: The default value isFALSE.
Map.- Parameters:
options- The new value foroptions.- Returns:
thisto mimic the builder pattern.
-
getSchema
public org.apache.avro.Schema getSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getSchemain interfaceorg.apache.avro.generic.GenericContainer- Returns:
- The schema object describing this class.
-
get
public Object get(int index)
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to get- Returns:
- value of the field with the given index.
- Throws:
IndexOutOfBoundsException
-
put
public void put(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-