org.apache.hive.service.cli.session
Class HiveSessionImpl

java.lang.Object
  extended by org.apache.hive.service.cli.session.HiveSessionImpl
All Implemented Interfaces:
HiveSession
Direct Known Subclasses:
HiveSessionImplwithUGI

public class HiveSessionImpl
extends Object
implements HiveSession

HiveSession


Constructor Summary
HiveSessionImpl(String username, String password, Map<String,String> sessionConf)
           
 
Method Summary
protected  void acquire()
           
 void cancelOperation(OperationHandle opHandle)
           
 void close()
          close the session
 void closeOperation(OperationHandle opHandle)
           
 OperationHandle executeStatement(String statement, Map<String,String> confOverlay)
          execute operation handler
 RowSet fetchResults(OperationHandle opHandle)
           
 RowSet fetchResults(OperationHandle opHandle, FetchOrientation orientation, long maxRows)
           
 OperationHandle getCatalogs()
          getCatalogs operation handler
 OperationHandle getColumns(String catalogName, String schemaName, String tableName, String columnName)
          getColumns operation handler
 OperationHandle getFunctions(String catalogName, String schemaName, String functionName)
          getFunctions operation handler
 HiveConf getHiveConf()
           
 GetInfoValue getInfo(GetInfoType getInfoType)
          getInfo operation handler
 IMetaStoreClient getMetaStoreClient()
           
 String getPassword()
           
 TableSchema getResultSetMetadata(OperationHandle opHandle)
           
 OperationHandle getSchemas(String catalogName, String schemaName)
          getSchemas operation handler
protected  HiveSession getSession()
           
 SessionHandle getSessionHandle()
           
 SessionState getSessionState()
           
 OperationHandle getTables(String catalogName, String schemaName, String tableName, List<String> tableTypes)
          getTables operation handler
 OperationHandle getTableTypes()
          getTableTypes operation handler
 OperationHandle getTypeInfo()
          getTypeInfo operation handler
 String getUsername()
           
 String getUserName()
           
protected  void release()
           
 void setOperationManager(OperationManager operationManager)
          Set operation manager for the session
 void setSessionManager(SessionManager sessionManager)
          Set the session manager for the session
 void setUserName(String userName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HiveSessionImpl

public HiveSessionImpl(String username,
                       String password,
                       Map<String,String> sessionConf)
Method Detail

setSessionManager

public void setSessionManager(SessionManager sessionManager)
Description copied from interface: HiveSession
Set the session manager for the session

Specified by:
setSessionManager in interface HiveSession

setOperationManager

public void setOperationManager(OperationManager operationManager)
Description copied from interface: HiveSession
Set operation manager for the session

Specified by:
setOperationManager in interface HiveSession

acquire

protected void acquire()
                throws HiveSQLException
Throws:
HiveSQLException

release

protected void release()

getSessionHandle

public SessionHandle getSessionHandle()
Specified by:
getSessionHandle in interface HiveSession

getUsername

public String getUsername()
Specified by:
getUsername in interface HiveSession

getPassword

public String getPassword()
Specified by:
getPassword in interface HiveSession

getHiveConf

public HiveConf getHiveConf()
Specified by:
getHiveConf in interface HiveSession

getMetaStoreClient

public IMetaStoreClient getMetaStoreClient()
                                    throws HiveSQLException
Specified by:
getMetaStoreClient in interface HiveSession
Throws:
HiveSQLException

getInfo

public GetInfoValue getInfo(GetInfoType getInfoType)
                     throws HiveSQLException
Description copied from interface: HiveSession
getInfo operation handler

Specified by:
getInfo in interface HiveSession
Returns:
Throws:
HiveSQLException

executeStatement

public OperationHandle executeStatement(String statement,
                                        Map<String,String> confOverlay)
                                 throws HiveSQLException
Description copied from interface: HiveSession
execute operation handler

Specified by:
executeStatement in interface HiveSession
Returns:
Throws:
HiveSQLException

getTypeInfo

public OperationHandle getTypeInfo()
                            throws HiveSQLException
Description copied from interface: HiveSession
getTypeInfo operation handler

Specified by:
getTypeInfo in interface HiveSession
Returns:
Throws:
HiveSQLException

getCatalogs

public OperationHandle getCatalogs()
                            throws HiveSQLException
Description copied from interface: HiveSession
getCatalogs operation handler

Specified by:
getCatalogs in interface HiveSession
Returns:
Throws:
HiveSQLException

getSchemas

public OperationHandle getSchemas(String catalogName,
                                  String schemaName)
                           throws HiveSQLException
Description copied from interface: HiveSession
getSchemas operation handler

Specified by:
getSchemas in interface HiveSession
Returns:
Throws:
HiveSQLException

getTables

public OperationHandle getTables(String catalogName,
                                 String schemaName,
                                 String tableName,
                                 List<String> tableTypes)
                          throws HiveSQLException
Description copied from interface: HiveSession
getTables operation handler

Specified by:
getTables in interface HiveSession
Returns:
Throws:
HiveSQLException

getTableTypes

public OperationHandle getTableTypes()
                              throws HiveSQLException
Description copied from interface: HiveSession
getTableTypes operation handler

Specified by:
getTableTypes in interface HiveSession
Returns:
Throws:
HiveSQLException

getColumns

public OperationHandle getColumns(String catalogName,
                                  String schemaName,
                                  String tableName,
                                  String columnName)
                           throws HiveSQLException
Description copied from interface: HiveSession
getColumns operation handler

Specified by:
getColumns in interface HiveSession
Returns:
Throws:
HiveSQLException

getFunctions

public OperationHandle getFunctions(String catalogName,
                                    String schemaName,
                                    String functionName)
                             throws HiveSQLException
Description copied from interface: HiveSession
getFunctions operation handler

Specified by:
getFunctions in interface HiveSession
Returns:
Throws:
HiveSQLException

close

public void close()
           throws HiveSQLException
Description copied from interface: HiveSession
close the session

Specified by:
close in interface HiveSession
Throws:
HiveSQLException

getSessionState

public SessionState getSessionState()
Specified by:
getSessionState in interface HiveSession

getUserName

public String getUserName()
Specified by:
getUserName in interface HiveSession

setUserName

public void setUserName(String userName)
Specified by:
setUserName in interface HiveSession

cancelOperation

public void cancelOperation(OperationHandle opHandle)
                     throws HiveSQLException
Specified by:
cancelOperation in interface HiveSession
Throws:
HiveSQLException

closeOperation

public void closeOperation(OperationHandle opHandle)
                    throws HiveSQLException
Specified by:
closeOperation in interface HiveSession
Throws:
HiveSQLException

getResultSetMetadata

public TableSchema getResultSetMetadata(OperationHandle opHandle)
                                 throws HiveSQLException
Specified by:
getResultSetMetadata in interface HiveSession
Throws:
HiveSQLException

fetchResults

public RowSet fetchResults(OperationHandle opHandle,
                           FetchOrientation orientation,
                           long maxRows)
                    throws HiveSQLException
Specified by:
fetchResults in interface HiveSession
Throws:
HiveSQLException

fetchResults

public RowSet fetchResults(OperationHandle opHandle)
                    throws HiveSQLException
Specified by:
fetchResults in interface HiveSession
Throws:
HiveSQLException

getSession

protected HiveSession getSession()


Copyright © 2012 The Apache Software Foundation