Package com.gpudb.protocol
Class ExecuteProcRequest
java.lang.Object
com.gpudb.protocol.ExecuteProcRequest
All Implemented Interfaces:
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecordA set of parameters for
GPUdb.executeProc.
Executes a proc. This endpoint is asynchronous and does not wait for the proc to complete before returning.
If the proc being executed is distributed, inputTableNames and inputColumnNames may be passed to the proc to use for reading data, and outputTableNames may be passed to the proc to use for writing data.
If the proc being executed is non-distributed, these table parameters will be ignored.
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA set of string constants for theExecuteProcRequestparameteroptions.Constructor Summary
ConstructorsConstructorDescriptionConstructs an ExecuteProcRequest object with default parameters.ExecuteProcRequest(String procName, Map<String, String> params, Map<String, ByteBuffer> binParams, List<String> inputTableNames, Map<String, List<String>> inputColumnNames, List<String> outputTableNames, Map<String, String> options) Constructs an ExecuteProcRequest object with the specified parameters.Method Summary
Modifier and TypeMethodDescriptionbooleanget(int index) This method supports the Avro framework and is not intended to be called directly by the user.A map containing named binary parameters to pass to the proc.static org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.Map of table names frominputTableNamesto lists of names of columns from those tables that will be passed to the proc.Names of the tables containing data to be passed to the proc.Optional parameters.Names of the tables to which output data from the proc will be written, each in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria.A map containing named parameters to pass to the proc.Name of the proc to execute.org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.inthashCode()voidThis method supports the Avro framework and is not intended to be called directly by the user.setBinParams(Map<String, ByteBuffer> binParams) A map containing named binary parameters to pass to the proc.setInputColumnNames(Map<String, List<String>> inputColumnNames) Map of table names frominputTableNamesto lists of names of columns from those tables that will be passed to the proc.setInputTableNames(List<String> inputTableNames) Names of the tables containing data to be passed to the proc.setOptions(Map<String, String> options) Optional parameters.setOutputTableNames(List<String> outputTableNames) Names of the tables to which output data from the proc will be written, each in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria.A map containing named parameters to pass to the proc.setProcName(String procName) Name of the proc to execute.toString()
Constructor Details
ExecuteProcRequest
public ExecuteProcRequest()Constructs an ExecuteProcRequest object with default parameters.ExecuteProcRequest
public ExecuteProcRequest(String procName, Map<String, String> params, Map<String, ByteBuffer> binParams, List<String> inputTableNames, Map<String, List<String>> inputColumnNames, List<String> outputTableNames, Map<String, String> options) Constructs an ExecuteProcRequest object with the specified parameters.Parameters:procName- Name of the proc to execute. Must be the name of a currently existing proc.params- A map containing named parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value. The default value is an emptyMap.binParams- A map containing named binary parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value. The default value is an emptyMap.inputTableNames- Names of the tables containing data to be passed to the proc. Each name specified must be the name of a currently existing table, in [schema_name.]table_name format, using standard name resolution rules. If no table names are specified, no data will be passed to the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an emptyList.inputColumnNames- Map of table names frominputTableNamesto lists of names of columns from those tables that will be passed to the proc. Each column name specified must be the name of an existing column in the corresponding table. If a table name frominputTableNamesis not included, all columns from that table will be passed to the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an emptyMap.outputTableNames- Names of the tables to which output data from the proc will be written, each in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria. If a specified table does not exist, it will automatically be created with the same schema as the corresponding table (by order) frominputTableNames, excluding any primary and shard keys. If a specified table is a non-persistent result table, it must not have primary or shard keys. If no table names are specified, no output data can be returned from the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an emptyList.options- Optional parameters.CACHE_INPUT: No longer supported; option will be ignored. The default value is ”.USE_CACHED_INPUT: No longer supported; option will be ignored. The default value is ”.RUN_TAG: A string that, if not empty, can be used in subsequent calls toGPUdb.showProcStatusorGPUdb.killProcto identify the proc instance. The default value is ”.MAX_OUTPUT_LINES: The maximum number of lines of output from stdout and stderr to return viaGPUdb.showProcStatus. If the number of lines output exceeds the maximum, earlier lines are discarded. The default value is ‘100’.EXECUTE_AT_STARTUP: IfTRUE, an instance of the proc will run when the database is started instead of running immediately. TherunIdcan be retrieved usingGPUdb.showProcand used inGPUdb.showProcStatus. Supported values:The default value isFALSE.EXECUTE_AT_STARTUP_AS: Sets the alternate user name to execute this proc instance as whenEXECUTE_AT_STARTUPisTRUE. The default value is ”.
Map.
Method Details
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.setProcName
Name of the proc to execute. Must be the name of a currently existing proc.Parameters:procName- The new value forprocName.Returns:thisto mimic the builder pattern.setParams
A map containing named parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value. The default value is an emptyMap.Parameters:params- The new value forparams.Returns:thisto mimic the builder pattern.getBinParams
A map containing named binary parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value. The default value is an emptyMap.Returns:The current value ofbinParams.setBinParams
A map containing named binary parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value. The default value is an emptyMap.Parameters:binParams- The new value forbinParams.Returns:thisto mimic the builder pattern.getInputTableNames
Names of the tables containing data to be passed to the proc. Each name specified must be the name of a currently existing table, in [schema_name.]table_name format, using standard name resolution rules. If no table names are specified, no data will be passed to the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an emptyList.Returns:The current value ofinputTableNames.setInputTableNames
Names of the tables containing data to be passed to the proc. Each name specified must be the name of a currently existing table, in [schema_name.]table_name format, using standard name resolution rules. If no table names are specified, no data will be passed to the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an emptyList.Parameters:inputTableNames- The new value forinputTableNames.Returns:thisto mimic the builder pattern.getInputColumnNames
Map of table names frominputTableNamesto lists of names of columns from those tables that will be passed to the proc. Each column name specified must be the name of an existing column in the corresponding table. If a table name frominputTableNamesis not included, all columns from that table will be passed to the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an emptyMap.Returns:The current value ofinputColumnNames.setInputColumnNames
Map of table names frominputTableNamesto lists of names of columns from those tables that will be passed to the proc. Each column name specified must be the name of an existing column in the corresponding table. If a table name frominputTableNamesis not included, all columns from that table will be passed to the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an emptyMap.Parameters:inputColumnNames- The new value forinputColumnNames.Returns:thisto mimic the builder pattern.getOutputTableNames
Names of the tables to which output data from the proc will be written, each in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria. If a specified table does not exist, it will automatically be created with the same schema as the corresponding table (by order) frominputTableNames, excluding any primary and shard keys. If a specified table is a non-persistent result table, it must not have primary or shard keys. If no table names are specified, no output data can be returned from the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an emptyList.Returns:The current value ofoutputTableNames.setOutputTableNames
Names of the tables to which output data from the proc will be written, each in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria. If a specified table does not exist, it will automatically be created with the same schema as the corresponding table (by order) frominputTableNames, excluding any primary and shard keys. If a specified table is a non-persistent result table, it must not have primary or shard keys. If no table names are specified, no output data can be returned from the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an emptyList.Parameters:outputTableNames- The new value foroutputTableNames.Returns:thisto mimic the builder pattern.getOptions
Optional parameters.CACHE_INPUT: No longer supported; option will be ignored. The default value is ”.USE_CACHED_INPUT: No longer supported; option will be ignored. The default value is ”.RUN_TAG: A string that, if not empty, can be used in subsequent calls toGPUdb.showProcStatusorGPUdb.killProcto identify the proc instance. The default value is ”.MAX_OUTPUT_LINES: The maximum number of lines of output from stdout and stderr to return viaGPUdb.showProcStatus. If the number of lines output exceeds the maximum, earlier lines are discarded. The default value is ‘100’.EXECUTE_AT_STARTUP: IfTRUE, an instance of the proc will run when the database is started instead of running immediately. TherunIdcan be retrieved usingGPUdb.showProcand used inGPUdb.showProcStatus. Supported values:The default value isFALSE.EXECUTE_AT_STARTUP_AS: Sets the alternate user name to execute this proc instance as whenEXECUTE_AT_STARTUPisTRUE. The default value is ”.
Map.Returns:The current value ofoptions.setOptions
Optional parameters.CACHE_INPUT: No longer supported; option will be ignored. The default value is ”.USE_CACHED_INPUT: No longer supported; option will be ignored. The default value is ”.RUN_TAG: A string that, if not empty, can be used in subsequent calls toGPUdb.showProcStatusorGPUdb.killProcto identify the proc instance. The default value is ”.MAX_OUTPUT_LINES: The maximum number of lines of output from stdout and stderr to return viaGPUdb.showProcStatus. If the number of lines output exceeds the maximum, earlier lines are discarded. The default value is ‘100’.EXECUTE_AT_STARTUP: IfTRUE, an instance of the proc will run when the database is started instead of running immediately. TherunIdcan be retrieved usingGPUdb.showProcand used inGPUdb.showProcStatus. Supported values:The default value isFALSE.EXECUTE_AT_STARTUP_AS: Sets the alternate user name to execute this proc instance as whenEXECUTE_AT_STARTUPisTRUE. The default value is ”.
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.GenericContainerReturns:The schema object describing this class.get
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:getin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to getReturns:value of the field with the given index.Throws:put
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:putin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to setvalue- the value to setThrows: