Thrift-API-HiveClient2
view release on metacpan or search on metacpan
lib/Thrift/API/HiveClient2/cli_service.thrift view on Meta::CPAN
GET_TABLES,
GET_TABLE_TYPES,
GET_COLUMNS,
GET_FUNCTIONS,
UNKNOWN,
}
// Client-side reference to a task running
// asynchronously on the server.
struct TOperationHandle {
1: required THandleIdentifier operationId
2: required TOperationType operationType
// If hasResultSet = TRUE, then this operation
// generates a result set that can be fetched.
// Note that the result set may be empty.
//
// If hasResultSet = FALSE, then this operation
// does not generate a result set, and calling
// GetResultSetMetadata or FetchResults against
// this OperationHandle will generate an error.
3: required bool hasResultSet
// For operations that don't generate result sets,
// modifiedRowCount is either:
//
// 1) The number of rows that were modified by
// the DML operation (e.g. number of rows inserted,
// number of rows deleted, etc).
//
// 2) 0 for operations that don't modify or add rows.
//
// 3) < 0 if the operation is capable of modifiying rows,
// but Hive is unable to determine how many rows were
// modified. For example, Hive's LOAD DATA command
// doesn't generate row count information because
// Hive doesn't inspect the data as it is loaded.
//
// modifiedRowCount is unset if the operation generates
// a result set.
4: optional double modifiedRowCount
}
// OpenSession()
//
// Open a session (connection) on the server against
// which operations may be executed.
struct TOpenSessionReq {
// The version of the HiveServer2 protocol that the client is using.
1: required TProtocolVersion client_protocol = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V1
// Username and password for authentication.
// Depending on the authentication scheme being used,
// this information may instead be provided by a lower
// protocol layer, in which case these fields may be
// left unset.
2: optional string username
3: optional string password
// Configuration overlay which is applied when the session is
// first created.
4: optional map<string, string> configuration
}
struct TOpenSessionResp {
1: required TStatus status
// The protocol version that the server is using.
2: required TProtocolVersion serverProtocolVersion = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V1
// Session Handle
3: optional TSessionHandle sessionHandle
// The configuration settings for this session.
4: optional map<string, string> configuration
}
// CloseSession()
//
// Closes the specified session and frees any resources
// currently allocated to that session. Any open
// operations in that session will be canceled.
struct TCloseSessionReq {
1: required TSessionHandle sessionHandle
}
struct TCloseSessionResp {
1: required TStatus status
}
enum TGetInfoType {
CLI_MAX_DRIVER_CONNECTIONS = 0,
CLI_MAX_CONCURRENT_ACTIVITIES = 1,
CLI_DATA_SOURCE_NAME = 2,
CLI_FETCH_DIRECTION = 8,
CLI_SERVER_NAME = 13,
CLI_SEARCH_PATTERN_ESCAPE = 14,
CLI_DBMS_NAME = 17,
CLI_DBMS_VER = 18,
CLI_ACCESSIBLE_TABLES = 19,
CLI_ACCESSIBLE_PROCEDURES = 20,
CLI_CURSOR_COMMIT_BEHAVIOR = 23,
CLI_DATA_SOURCE_READ_ONLY = 25,
CLI_DEFAULT_TXN_ISOLATION = 26,
CLI_IDENTIFIER_CASE = 28,
CLI_IDENTIFIER_QUOTE_CHAR = 29,
CLI_MAX_COLUMN_NAME_LEN = 30,
CLI_MAX_CURSOR_NAME_LEN = 31,
CLI_MAX_SCHEMA_NAME_LEN = 32,
CLI_MAX_CATALOG_NAME_LEN = 34,
CLI_MAX_TABLE_NAME_LEN = 35,
CLI_SCROLL_CONCURRENCY = 43,
CLI_TXN_CAPABLE = 46,
CLI_USER_NAME = 47,
CLI_TXN_ISOLATION_OPTION = 72,
CLI_INTEGRITY = 73,
CLI_GETDATA_EXTENSIONS = 81,
lib/Thrift/API/HiveClient2/cli_service.thrift view on Meta::CPAN
CLI_MAX_COLUMNS_IN_INDEX = 98,
CLI_MAX_COLUMNS_IN_ORDER_BY = 99,
CLI_MAX_COLUMNS_IN_SELECT = 100,
CLI_MAX_COLUMNS_IN_TABLE = 101,
CLI_MAX_INDEX_SIZE = 102,
CLI_MAX_ROW_SIZE = 104,
CLI_MAX_STATEMENT_LEN = 105,
CLI_MAX_TABLES_IN_SELECT = 106,
CLI_MAX_USER_NAME_LEN = 107,
CLI_OJ_CAPABILITIES = 115,
CLI_XOPEN_CLI_YEAR = 10000,
CLI_CURSOR_SENSITIVITY = 10001,
CLI_DESCRIBE_PARAMETER = 10002,
CLI_CATALOG_NAME = 10003,
CLI_COLLATION_SEQ = 10004,
CLI_MAX_IDENTIFIER_LEN = 10005,
}
union TGetInfoValue {
1: string stringValue
2: i16 smallIntValue
3: i32 integerBitmask
4: i32 integerFlag
5: i32 binaryValue
6: i64 lenValue
}
// GetInfo()
//
// This function is based on ODBC's CLIGetInfo() function.
// The function returns general information about the data source
// using the same keys as ODBC.
struct TGetInfoReq {
// The sesssion to run this request against
1: required TSessionHandle sessionHandle
2: required TGetInfoType infoType
}
struct TGetInfoResp {
1: required TStatus status
2: required TGetInfoValue infoValue
}
// ExecuteStatement()
//
// Execute a statement.
// The returned OperationHandle can be used to check on the
// status of the statement, and to fetch results once the
// statement has finished executing.
struct TExecuteStatementReq {
// The session to exexcute the statement against
1: required TSessionHandle sessionHandle
// The statement to be executed (DML, DDL, SET, etc)
2: required string statement
// Configuration properties that are overlayed on top of the
// the existing session configuration before this statement
// is executed. These properties apply to this statement
// only and will not affect the subsequent state of the Session.
3: optional map<string, string> confOverlay
}
struct TExecuteStatementResp {
1: required TStatus status
2: optional TOperationHandle operationHandle
}
// GetTypeInfo()
//
// Get information about types supported by the HiveServer instance.
// The information is returned as a result set which can be fetched
// using the OperationHandle provided in the response.
//
// Refer to the documentation for ODBC's CLIGetTypeInfo function for
// the format of the result set.
struct TGetTypeInfoReq {
// The session to run this request against.
1: required TSessionHandle sessionHandle
}
struct TGetTypeInfoResp {
1: required TStatus status
2: optional TOperationHandle operationHandle
}
// GetCatalogs()
//
// Returns the list of catalogs (databases)
// Results are ordered by TABLE_CATALOG
//
// Resultset columns :
// col1
// name: TABLE_CAT
// type: STRING
// desc: Catalog name. NULL if not applicable.
//
struct TGetCatalogsReq {
// Session to run this request against
1: required TSessionHandle sessionHandle
}
struct TGetCatalogsResp {
1: required TStatus status
2: optional TOperationHandle operationHandle
}
// GetSchemas()
//
// Retrieves the schema names available in this database.
// The results are ordered by TABLE_CATALOG and TABLE_SCHEM.
// col1
// name: TABLE_SCHEM
// type: STRING
( run in 2.931 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )