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)
0046 throws HiveSQLException;
0047
0048 OperationHandle executeStatementAsync(SessionHandle sessionHandle,
0049 String statement, Map<String, String> confOverlay)
0050 throws HiveSQLException;
0051
0052 OperationHandle getTypeInfo(SessionHandle sessionHandle)
0053 throws HiveSQLException;
0054
0055 OperationHandle getCatalogs(SessionHandle sessionHandle)
0056 throws HiveSQLException;
0057
0058 OperationHandle getSchemas(SessionHandle sessionHandle,
0059 String catalogName, String schemaName)
0060 throws HiveSQLException;
0061
0062 OperationHandle getTables(SessionHandle sessionHandle,
0063 String catalogName, String schemaName, String tableName, List<String> tableTypes)
0064 throws HiveSQLException;
0065
0066 OperationHandle getTableTypes(SessionHandle sessionHandle)
0067 throws HiveSQLException;
0068
0069 OperationHandle getColumns(SessionHandle sessionHandle,
0070 String catalogName, String schemaName, String tableName, String columnName)
0071 throws HiveSQLException;
0072
0073 OperationHandle getFunctions(SessionHandle sessionHandle,
0074 String catalogName, String schemaName, String functionName)
0075 throws HiveSQLException;
0076
0077 OperationStatus getOperationStatus(OperationHandle opHandle)
0078 throws HiveSQLException;
0079
0080 void cancelOperation(OperationHandle opHandle)
0081 throws HiveSQLException;
0082
0083 void closeOperation(OperationHandle opHandle)
0084 throws HiveSQLException;
0085
0086 TableSchema getResultSetMetadata(OperationHandle opHandle)
0087 throws HiveSQLException;
0088
0089 RowSet fetchResults(OperationHandle opHandle)
0090 throws HiveSQLException;
0091
0092 RowSet fetchResults(OperationHandle opHandle, FetchOrientation orientation,
0093 long maxRows, FetchType fetchType) throws HiveSQLException;
0094
0095 String getDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory,
0096 String owner, String renewer) throws HiveSQLException;
0097
0098 void cancelDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory,
0099 String tokenStr) throws HiveSQLException;
0100
0101 void renewDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory,
0102 String tokenStr) throws HiveSQLException;
0103
0104
0105 }