GPUdb C++ API  Version 7.2.2.4
gpudb::CreateProcRequest Struct Reference

A set of parameters for GPUdb::createProc. More...

#include <gpudb/protocol/create_proc.h>

Public Member Functions

 CreateProcRequest ()
 Constructs a CreateProcRequest object with default parameters. More...
 
 CreateProcRequest (const std::string &procName_, const std::string &executionMode_, const std::map< std::string, std::vector< uint8_t > > &files_, const std::string &command_, const std::vector< std::string > &args_, const std::map< std::string, std::string > &options_)
 Constructs a CreateProcRequest object with the specified parameters. More...
 

Public Attributes

std::string procName
 Name of the proc to be created. More...
 
std::string executionMode
 The execution mode of the proc. More...
 
std::map< std::string, std::vector< uint8_t > > files
 A map of the files that make up the proc. More...
 
std::string command
 The command (excluding arguments) that will be invoked when the proc is executed. More...
 
std::vector< std::string > args
 An array of command-line arguments that will be passed to command when the proc is executed. More...
 
std::map< std::string, std::string > options
 Optional parameters. More...
 

Detailed Description

A set of parameters for GPUdb::createProc.

Creates an instance (proc) of the user-defined functions (UDF) specified by the given command, options, and files, and makes it available for execution.

Definition at line 19 of file create_proc.h.

Constructor & Destructor Documentation

◆ CreateProcRequest() [1/2]

gpudb::CreateProcRequest::CreateProcRequest ( )
inline

Constructs a CreateProcRequest object with default parameters.

Definition at line 24 of file create_proc.h.

◆ CreateProcRequest() [2/2]

gpudb::CreateProcRequest::CreateProcRequest ( const std::string &  procName_,
const std::string &  executionMode_,
const std::map< std::string, std::vector< uint8_t > > &  files_,
const std::string &  command_,
const std::vector< std::string > &  args_,
const std::map< std::string, std::string > &  options_ 
)
inline

Constructs a CreateProcRequest object with the specified parameters.

Parameters
[in]procName_Name of the proc to be created. Must not be the name of a currently existing proc.
[in]executionMode_The execution mode of the proc. Supported values:
  • create_proc_distributed: Input table data will be divided into data segments that are distributed across all nodes in the cluster, and the proc command will be invoked once per data segment in parallel. Output table data from each invocation will be saved to the same node as the corresponding input data.
  • create_proc_nondistributed: The proc command will be invoked only once per execution, and will not have direct access to any tables named as input or output table parameters in the call to GPUdb::executeProc. It will, however, be able to access the database using native API calls.
The default value is create_proc_distributed.
[in]files_A map of the files that make up the proc. The keys of the map are file names, and the values are the binary contents of the files. The file names may include subdirectory names (e.g. 'subdir/file') but must not resolve to a directory above the root for the proc. Files may be loaded from existing files in KiFS. Those file names should be prefixed with the uri kifs:// and the values in the map should be empty. The default value is an empty map.
[in]command_The command (excluding arguments) that will be invoked when the proc is executed. It will be invoked from the directory containing the proc files_ and may be any command that can be resolved from that directory. It need not refer to a file actually in that directory; for example, it could be 'java' if the proc is a Java application; however, any necessary external programs must be preinstalled on every database node. If the command refers to a file in that directory, it must be preceded with './' as per Linux convention. If not specified, and exactly one file is provided in files_, that file will be invoked. The default value is ''.
[in]args_An array of command-line arguments that will be passed to command_ when the proc is executed. The default value is an empty vector.
[in]options_Optional parameters.
  • create_proc_max_concurrency_per_node: The maximum number of concurrent instances of the proc that will be executed per node. 0 allows unlimited concurrency. The default value is '0'.
  • create_proc_set_environment: A python environment to use when executing the proc. Must be an existing environment, else an error will be returned. The default value is ''.
The default value is an empty map.

Definition at line 116 of file create_proc.h.

Member Data Documentation

◆ args

std::vector<std::string> gpudb::CreateProcRequest::args

An array of command-line arguments that will be passed to command when the proc is executed.

The default value is an empty vector.

Definition at line 188 of file create_proc.h.

◆ command

std::string gpudb::CreateProcRequest::command

The command (excluding arguments) that will be invoked when the proc is executed.

It will be invoked from the directory containing the proc files and may be any command that can be resolved from that directory. It need not refer to a file actually in that directory; for example, it could be 'java' if the proc is a Java application; however, any necessary external programs must be preinstalled on every database node. If the command refers to a file in that directory, it must be preceded with './' as per Linux convention. If not specified, and exactly one file is provided in files, that file will be invoked. The default value is ''.

Definition at line 181 of file create_proc.h.

◆ executionMode

std::string gpudb::CreateProcRequest::executionMode

The execution mode of the proc.

Supported values:

  • create_proc_distributed: Input table data will be divided into data segments that are distributed across all nodes in the cluster, and the proc command will be invoked once per data segment in parallel. Output table data from each invocation will be saved to the same node as the corresponding input data.
  • create_proc_nondistributed: The proc command will be invoked only once per execution, and will not have direct access to any tables named as input or output table parameters in the call to GPUdb::executeProc. It will, however, be able to access the database using native API calls.

The default value is create_proc_distributed.

Definition at line 155 of file create_proc.h.

◆ files

std::map<std::string, std::vector<uint8_t> > gpudb::CreateProcRequest::files

A map of the files that make up the proc.

The keys of the map are file names, and the values are the binary contents of the files. The file names may include subdirectory names (e.g. 'subdir/file') but must not resolve to a directory above the root for the proc.

Files may be loaded from existing files in KiFS. Those file names should be prefixed with the uri kifs:// and the values in the map should be empty. The default value is an empty map.

Definition at line 167 of file create_proc.h.

◆ options

std::map<std::string, std::string> gpudb::CreateProcRequest::options

Optional parameters.

  • create_proc_max_concurrency_per_node: The maximum number of concurrent instances of the proc that will be executed per node. 0 allows unlimited concurrency. The default value is '0'.
  • create_proc_set_environment: A python environment to use when executing the proc. Must be an existing environment, else an error will be returned. The default value is ''.

The default value is an empty map.

Definition at line 205 of file create_proc.h.

◆ procName

std::string gpudb::CreateProcRequest::procName

Name of the proc to be created.

Must not be the name of a currently existing proc.

Definition at line 130 of file create_proc.h.


The documentation for this struct was generated from the following file: