public class AlterEnvironmentRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.alterEnvironment(AlterEnvironmentRequest)
.
Alters an existing environment which can be referenced by a user-defined function (UDF).
Modifier and Type | Class and Description |
---|---|
static class |
AlterEnvironmentRequest.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. |
static class |
AlterEnvironmentRequest.Options
Optional parameters.
|
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() |
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() |
Map<String,String> |
getOptions() |
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
String |
getValue() |
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) |
AlterEnvironmentRequest |
setEnvironmentName(String environmentName) |
AlterEnvironmentRequest |
setOptions(Map<String,String> options) |
AlterEnvironmentRequest |
setValue(String value) |
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()
public AlterEnvironmentRequest setEnvironmentName(String environmentName)
environmentName
- Name of the environment to be altered.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
public AlterEnvironmentRequest setAction(String action)
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
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.public AlterEnvironmentRequest setValue(String value)
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.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
.public AlterEnvironmentRequest setOptions(Map<String,String> options)
options
- Optional parameters.
DATASOURCE_NAME
: Name of an existing external data
source from which packages specified in value
can be loaded
Map
.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 © 2024. All rights reserved.