Class 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 for GPUdb.adminSwitchover.

    Manually switch over one or more processes to another host. Individual ranks or entire hosts may be moved to another host.

    • 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 in destinations.
        destinations - Indicates to which host to switch over each corresponding process given in processes. 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 in processes.
        options - Optional parameters.
        • DRY_RUN: If set to TRUE, only validation checks will be performed. Nothing is switched over. Supported values: The default value is FALSE.
        The default value is an empty 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 in destinations.
        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 in destinations.
        Parameters:
        processes - The new value for processes.
        Returns:
        this to mimic the builder pattern.
      • getDestinations

        public List<String> getDestinations()
        Indicates to which host to switch over each corresponding process given in processes. 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 in processes.
        Returns:
        The current value of destinations.
      • setDestinations

        public AdminSwitchoverRequest setDestinations​(List<String> destinations)
        Indicates to which host to switch over each corresponding process given in processes. 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 in processes.
        Parameters:
        destinations - The new value for destinations.
        Returns:
        this to mimic the builder pattern.
      • getOptions

        public Map<String,​String> getOptions()
        Optional parameters.
        • DRY_RUN: If set to TRUE, only validation checks will be performed. Nothing is switched over. Supported values: The default value is FALSE.
        The default value is an empty Map.
        Returns:
        The current value of options.
      • setOptions

        public AdminSwitchoverRequest setOptions​(Map<String,​String> options)
        Optional parameters.
        • DRY_RUN: If set to TRUE, only validation checks will be performed. Nothing is switched over. Supported values: The default value is FALSE.
        The default value is an empty Map.
        Parameters:
        options - The new value for options.
        Returns:
        this to 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:
        getSchema in interface org.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:
        get in interface org.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:
        put in interface org.apache.avro.generic.IndexedRecord
        Parameters:
        index - the position of the field to set
        value - the value to set
        Throws:
        IndexOutOfBoundsException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object