Back to home page

OSCL-LXR

 
 

    


0001 /**
0002  * Licensed to the Apache Software Foundation (ASF) under one
0003  * or more contributor license agreements.  See the NOTICE file
0004  * distributed with this work for additional information
0005  * regarding copyright ownership.  The ASF licenses this file
0006  * to you under the Apache License, Version 2.0 (the
0007  * "License"); you may not use this file except in compliance
0008  * with the License.  You may obtain a copy of the License at
0009  *
0010  *     http://www.apache.org/licenses/LICENSE-2.0
0011  *
0012  * Unless required by applicable law or agreed to in writing, software
0013  * distributed under the License is distributed on an "AS IS" BASIS,
0014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0015  * See the License for the specific language governing permissions and
0016  * limitations under the License.
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 }