public class AlterEnvironmentRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.alterEnvironment.
Alters an existing environment which can be referenced by a user-defined function (UDF).
| Modifier and Type | Class and Description |
|---|---|
static class |
AlterEnvironmentRequest.Action
A set of string constants for the
AlterEnvironmentRequest
parameter action. |
static class |
AlterEnvironmentRequest.Options
A set of string constants for the
AlterEnvironmentRequest
parameter options. |
| Constructor and Description |
|---|
AlterEnvironmentRequest()
Constructs an AlterEnvironmentRequest object with default parameters.
|
AlterEnvironmentRequest(String environmentName,
String action,
String value,
Map<String,String> options)
Constructs an AlterEnvironmentRequest 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.
|
String |
getAction()
Modification operation to be applied.
|
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
String |
getEnvironmentName()
Name of the environment to be altered.
|
Map<String,String> |
getOptions()
Optional parameters.
|
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
String |
getValue()
The value of the modification, depending on
action. |
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.
|
AlterEnvironmentRequest |
setAction(String action)
Modification operation to be applied.
|
AlterEnvironmentRequest |
setEnvironmentName(String environmentName)
Name of the environment to be altered.
|
AlterEnvironmentRequest |
setOptions(Map<String,String> options)
Optional parameters.
|
AlterEnvironmentRequest |
setValue(String value)
The value of the modification, depending on
action. |
String |
toString() |
public AlterEnvironmentRequest()
public AlterEnvironmentRequest(String environmentName, String action, String value, Map<String,String> options)
environmentName - Name of the environment to be altered.action - Modification operation to be applied.
Supported values:
INSTALL_PACKAGE:
Install a python package from PyPI, an external
data source or KiFS
INSTALL_REQUIREMENTS: Install packages from a
requirements file
UNINSTALL_PACKAGE: Uninstall a python package.
UNINSTALL_REQUIREMENTS: Uninstall packages from
a requirements file
RESET: Uninstalls all
packages in the environment and resets it to the
original state at time of creation
REBUILD: Recreates the
environment and re-installs all packages,
upgrades the packages if necessary based on
dependencies
value - The value of the modification, depending on action. For example, if action is INSTALL_PACKAGE, this would be the
python package name. If action is INSTALL_REQUIREMENTS, this
would be the path of a requirements file from which to
install packages. If an external data source is specified
in DATASOURCE_NAME, this
can be the path to a wheel file or source archive.
Alternatively, if installing from a file (wheel or source
archive), the value may be a reference to a file in KiFS.options - Optional parameters.
DATASOURCE_NAME:
Name of an existing external data source from
which packages specified in value can be
loaded
Map.public static org.apache.avro.Schema getClassSchema()
public String getEnvironmentName()
environmentName.public AlterEnvironmentRequest setEnvironmentName(String environmentName)
environmentName - The new value for environmentName.this to mimic the builder pattern.public String getAction()
INSTALL_PACKAGE: Install a python
package from PyPI, an external data source or KiFS
INSTALL_REQUIREMENTS:
Install packages from a requirements file
UNINSTALL_PACKAGE: Uninstall a
python package.
UNINSTALL_REQUIREMENTS:
Uninstall packages from a requirements file
RESET: Uninstalls all packages in the
environment and resets it to the original state at time of
creation
REBUILD: Recreates the environment and
re-installs all packages, upgrades the packages if necessary
based on dependencies
action.public AlterEnvironmentRequest setAction(String action)
INSTALL_PACKAGE: Install a python
package from PyPI, an external data source or KiFS
INSTALL_REQUIREMENTS:
Install packages from a requirements file
UNINSTALL_PACKAGE: Uninstall a
python package.
UNINSTALL_REQUIREMENTS:
Uninstall packages from a requirements file
RESET: Uninstalls all packages in the
environment and resets it to the original state at time of
creation
REBUILD: Recreates the environment and
re-installs all packages, upgrades the packages if necessary
based on dependencies
action - The new value for action.this to mimic the builder pattern.public String getValue()
action.
For example, if action is INSTALL_PACKAGE, this would be the python
package name.
If action is INSTALL_REQUIREMENTS, this would be the path of a requirements file
from which to install packages.
If an external data source is specified in DATASOURCE_NAME, this can be the path to a
wheel file or source archive. Alternatively, if installing from a file
(wheel or source archive), the value may be a reference to a file in KiFS.
value.public AlterEnvironmentRequest setValue(String value)
action.
For example, if action is INSTALL_PACKAGE, this would be the python
package name.
If action is INSTALL_REQUIREMENTS, this would be the path of a requirements file
from which to install packages.
If an external data source is specified in DATASOURCE_NAME, this can be the path to a
wheel file or source archive. Alternatively, if installing from a file
(wheel or source archive), the value may be a reference to a file in KiFS.
value - The new value for value.this to mimic the builder pattern.public Map<String,String> getOptions()
DATASOURCE_NAME: Name of an
existing external data source from which packages specified in
value can be loaded
Map.options.public AlterEnvironmentRequest setOptions(Map<String,String> options)
DATASOURCE_NAME: Name of an
existing external data source from which packages specified in
value can be loaded
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.GenericContainerpublic Object get(int index)
get in interface org.apache.avro.generic.IndexedRecordindex - the position of the field to getIndexOutOfBoundsExceptionpublic void put(int index,
Object value)
put in interface org.apache.avro.generic.IndexedRecordindex - the position of the field to setvalue - the value to setIndexOutOfBoundsExceptionCopyright © 2025. All rights reserved.