public class ExecuteProcRequest extends Object implements org.apache.avro.generic.IndexedRecord
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
& 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.
Modifier and Type | Class and Description |
---|---|
static class |
ExecuteProcRequest.Options
A set of string constants for the
ExecuteProcRequest parameter
options . |
Constructor and Description |
---|
ExecuteProcRequest()
Constructs 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.
|
Modifier and Type | Method and Description | ||
---|---|---|---|
boolean |
equals(Object obj) |
||
Object |
get(int index)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
||
Map<String,ByteBuffer> |
getBinParams()
A map containing named binary parameters to pass to the proc.
|
||
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
||
Map<String,List<String>> |
getInputColumnNames()
Map of table names from
inputTableNames to
lists of names of columns from those tables that will be passed to the
proc. |
||
List<String> |
getInputTableNames()
Names of the tables containing data to be passed to the proc.
|
||
Map<String,String> |
getOptions()
Optional parameters.
|
||
List<String> |
getOutputTableNames()
| ||
String |
getProcName()
Name of the proc to execute.
|
||
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
||
int |
hashCode() |
||
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
||
ExecuteProcRequest |
setBinParams(Map<String,ByteBuffer> binParams)
A map containing named binary parameters to pass to the proc.
|
||
ExecuteProcRequest |
setInputColumnNames(Map<String,List<String>> inputColumnNames)
Map of table names from
inputTableNames to
lists of names of columns from those tables that will be passed to the
proc. |
||
ExecuteProcRequest |
setInputTableNames(List<String> inputTableNames)
Names of the tables containing data to be passed to the proc.
|
||
ExecuteProcRequest |
setOptions(Map<String,String> options)
Optional parameters.
|
||
ExecuteProcRequest |
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
ExecuteProcRequest setParams(Map<String,String> params)
A map containing named parameters to pass to the proc.
| ||
ExecuteProcRequest |
setProcName(String procName)
Name of the proc to execute.
|
||
String |
toString() |
public 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)
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 empty Map
.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 empty
Map
.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 empty List
.inputColumnNames
- Map of table names from inputTableNames
to 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 from inputTableNames
is 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 empty Map
.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) from
inputTableNames
, 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 empty List
.options
- Optional parameters.
CACHE_INPUT
: A
comma-delimited list of table names from inputTableNames
from which input data will be
cached for use in subsequent calls to GPUdb.executeProc
with the USE_CACHED_INPUT
option. Cached input data will be retained until
the proc status is cleared with the clear_complete
option of GPUdb.showProcStatus
and all proc instances
using the cached data have completed. The
default value is ''.
USE_CACHED_INPUT
: A comma-delimited list of run
IDs (as returned from prior calls to GPUdb.executeProc
) of running or completed proc
instances from which input data cached using the
CACHE_INPUT
option
will be used. Cached input data will not be used
for any tables specified in inputTableNames
, but data from all other tables
cached for the specified run IDs will be passed
to the proc. If the same table was cached for
multiple specified run IDs, the cached data from
the first run ID specified in the list that
includes that table will be used. The default
value is ''.
RUN_TAG
: A string that,
if not empty, can be used in subsequent calls to
GPUdb.showProcStatus
or GPUdb.killProc
to identify the proc instance.
The default value is ''.
MAX_OUTPUT_LINES
: The maximum number of lines
of output from stdout and stderr to return via
GPUdb.showProcStatus
. If the number of lines
output exceeds the maximum, earlier lines are
discarded. The default value is '100'.
EXECUTE_AT_STARTUP
: If TRUE
, an instance of the proc will run when the
database is started instead of running
immediately. The runId
can be retrieved using GPUdb.showProc
and used in GPUdb.showProcStatus
.
Supported values:
The default value is FALSE
.
EXECUTE_AT_STARTUP_AS
: Sets the alternate user
name to execute this proc instance as when
EXECUTE_AT_STARTUP
is TRUE
. The default value is ''.
Map
.public static org.apache.avro.Schema getClassSchema()
public String getProcName()
procName
.public ExecuteProcRequest setProcName(String procName)
procName
- The new value for procName
.this
to mimic the builder pattern.public Map<String,String> getParams()
Map
.params
.public ExecuteProcRequest setParams(Map<String,String> params)
Map
.params
- The new value for params
.this
to mimic the builder pattern.public Map<String,ByteBuffer> getBinParams()
Map
.binParams
.public ExecuteProcRequest setBinParams(Map<String,ByteBuffer> binParams)
Map
.binParams
- The new value for binParams
.this
to mimic the builder pattern.public List<String> getInputTableNames()
List
.inputTableNames
.public ExecuteProcRequest setInputTableNames(List<String> inputTableNames)
List
.inputTableNames
- The new value for inputTableNames
.this
to mimic the builder pattern.public Map<String,List<String>> getInputColumnNames()
inputTableNames
to
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 from inputTableNames
is 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 empty
Map
.inputColumnNames
.public ExecuteProcRequest setInputColumnNames(Map<String,List<String>> inputColumnNames)
inputTableNames
to
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 from inputTableNames
is 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 empty
Map
.inputColumnNames
- The new value for inputColumnNames
.this
to mimic the builder pattern.public List<String> getOutputTableNames()
inputTableNames
, 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 empty List
.outputTableNames
.public ExecuteProcRequest setOutputTableNames(List<String> outputTableNames)
inputTableNames
, 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 empty List
.outputTableNames
- The new value for outputTableNames
.this
to mimic the builder pattern.public Map<String,String> getOptions()
CACHE_INPUT
: A comma-delimited list
of table names from inputTableNames
from which input data will be cached for use in
subsequent calls to GPUdb.executeProc
with the USE_CACHED_INPUT
option. Cached input data will be retained
until the proc status is cleared with the clear_complete
option of GPUdb.showProcStatus
and all proc instances using the cached
data have completed. The default value is ''.
USE_CACHED_INPUT
: A
comma-delimited list of run IDs (as returned from prior calls to
GPUdb.executeProc
) of running or completed proc instances from
which input data cached using the CACHE_INPUT
option will be used. Cached input data will not be
used for any tables specified in inputTableNames
, but data from all other tables cached for the
specified run IDs will be passed to the proc. If the same table
was cached for multiple specified run IDs, the cached data from
the first run ID specified in the list that includes that table
will be used. The default value is ''.
RUN_TAG
: A string that, if not empty,
can be used in subsequent calls to GPUdb.showProcStatus
or GPUdb.killProc
to
identify the proc instance. The default value is ''.
MAX_OUTPUT_LINES
: The maximum
number of lines of output from stdout and stderr to return via
GPUdb.showProcStatus
. If the number of lines output exceeds the
maximum, earlier lines are discarded. The default value is
'100'.
EXECUTE_AT_STARTUP
: If TRUE
, an instance of the proc will run when the
database is started instead of running immediately. The runId
can be
retrieved using GPUdb.showProc
and used in GPUdb.showProcStatus
.
Supported values:
The default value is FALSE
.
EXECUTE_AT_STARTUP_AS
:
Sets the alternate user name to execute this proc instance as
when EXECUTE_AT_STARTUP
is
TRUE
. The default value is ''.
Map
.options
.public ExecuteProcRequest setOptions(Map<String,String> options)
CACHE_INPUT
: A comma-delimited list
of table names from inputTableNames
from which input data will be cached for use in
subsequent calls to GPUdb.executeProc
with the USE_CACHED_INPUT
option. Cached input data will be retained
until the proc status is cleared with the clear_complete
option of GPUdb.showProcStatus
and all proc instances using the cached
data have completed. The default value is ''.
USE_CACHED_INPUT
: A
comma-delimited list of run IDs (as returned from prior calls to
GPUdb.executeProc
) of running or completed proc instances from
which input data cached using the CACHE_INPUT
option will be used. Cached input data will not be
used for any tables specified in inputTableNames
, but data from all other tables cached for the
specified run IDs will be passed to the proc. If the same table
was cached for multiple specified run IDs, the cached data from
the first run ID specified in the list that includes that table
will be used. The default value is ''.
RUN_TAG
: A string that, if not empty,
can be used in subsequent calls to GPUdb.showProcStatus
or GPUdb.killProc
to
identify the proc instance. The default value is ''.
MAX_OUTPUT_LINES
: The maximum
number of lines of output from stdout and stderr to return via
GPUdb.showProcStatus
. If the number of lines output exceeds the
maximum, earlier lines are discarded. The default value is
'100'.
EXECUTE_AT_STARTUP
: If TRUE
, an instance of the proc will run when the
database is started instead of running immediately. The runId
can be
retrieved using GPUdb.showProc
and used in GPUdb.showProcStatus
.
Supported values:
The default value is FALSE
.
EXECUTE_AT_STARTUP_AS
:
Sets the alternate user name to execute this proc instance as
when EXECUTE_AT_STARTUP
is
TRUE
. The default value is ''.
Map
.options
- The new value for options
.this
to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
public Object get(int index)
get
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to getIndexOutOfBoundsException
public void put(int index, Object value)
put
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to setvalue
- the value to setIndexOutOfBoundsException
Copyright © 2025. All rights reserved.