0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 package org.apache.hive.service.cli;
0019
0020 import java.util.List;
0021 import java.util.Map;
0022
0023
0024
0025
0026 import org.apache.hive.service.auth.HiveAuthFactory;
0027
0028 public interface ICLIService {
0029
0030 SessionHandle openSession(String username, String password,
0031 Map<String, String> configuration)
0032 throws HiveSQLException;
0033
0034 SessionHandle openSessionWithImpersonation(String username, String password,
0035 Map<String, String> configuration, String delegationToken)
0036 throws HiveSQLException;
0037
0038 void closeSession(SessionHandle sessionHandle)
0039 throws HiveSQLException;
0040
0041 GetInfoValue getInfo(SessionHandle sessionHandle, GetInfoType infoType)
0042 throws HiveSQLException;
0043
0044 OperationHandle executeStatement(SessionHandle sessionHandle, String statement,
0045 Map<String, String> confOverlay) throws HiveSQLException;
0046
0047 OperationHandle executeStatement(SessionHandle sessionHandle, String statement,
0048 Map<String, String> confOverlay, long queryTimeout) throws HiveSQLException;
0049
0050 OperationHandle executeStatementAsync(SessionHandle sessionHandle, String statement,
0051 Map<String, String> confOverlay) throws HiveSQLException;
0052 OperationHandle executeStatementAsync(SessionHandle sessionHandle, String statement,
0053 Map<String, String> confOverlay, long queryTimeout) throws HiveSQLException;
0054
0055 OperationHandle getTypeInfo(SessionHandle sessionHandle)
0056 throws HiveSQLException;
0057
0058 OperationHandle getCatalogs(SessionHandle sessionHandle)
0059 throws HiveSQLException;
0060
0061 OperationHandle getSchemas(SessionHandle sessionHandle,
0062 String catalogName, String schemaName)
0063 throws HiveSQLException;
0064
0065 OperationHandle getTables(SessionHandle sessionHandle,
0066 String catalogName, String schemaName, String tableName, List<String> tableTypes)
0067 throws HiveSQLException;
0068
0069 OperationHandle getTableTypes(SessionHandle sessionHandle)
0070 throws HiveSQLException;
0071
0072 OperationHandle getColumns(SessionHandle sessionHandle,
0073 String catalogName, String schemaName, String tableName, String columnName)
0074 throws HiveSQLException;
0075
0076 OperationHandle getFunctions(SessionHandle sessionHandle,
0077 String catalogName, String schemaName, String functionName)
0078 throws HiveSQLException;
0079
0080 OperationStatus getOperationStatus(OperationHandle opHandle)
0081 throws HiveSQLException;
0082
0083 void cancelOperation(OperationHandle opHandle)
0084 throws HiveSQLException;
0085
0086 void closeOperation(OperationHandle opHandle)
0087 throws HiveSQLException;
0088
0089 TableSchema getResultSetMetadata(OperationHandle opHandle)
0090 throws HiveSQLException;
0091
0092 RowSet fetchResults(OperationHandle opHandle)
0093 throws HiveSQLException;
0094
0095 RowSet fetchResults(OperationHandle opHandle, FetchOrientation orientation,
0096 long maxRows, FetchType fetchType) throws HiveSQLException;
0097
0098 String getDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory,
0099 String owner, String renewer) throws HiveSQLException;
0100
0101 void cancelDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory,
0102 String tokenStr) throws HiveSQLException;
0103
0104 void renewDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory,
0105 String tokenStr) throws HiveSQLException;
0106
0107 OperationHandle getPrimaryKeys(SessionHandle sessionHandle, String catalog,
0108 String schema, String table) throws HiveSQLException;
0109
0110 OperationHandle getCrossReference(SessionHandle sessionHandle,
0111 String primaryCatalog, String primarySchema, String primaryTable,
0112 String foreignCatalog, String foreignSchema, String foreignTable) throws HiveSQLException;
0113 }