org.apache.hive.service.cli
Class CLIService
java.lang.Object
org.apache.hive.service.AbstractService
org.apache.hive.service.CompositeService
org.apache.hive.service.cli.CLIService
- All Implemented Interfaces:
- ICLIService, Service
public class CLIService
- extends CompositeService
- implements ICLIService
SQLService.
Method Summary |
void |
cancelOperation(OperationHandle opHandle)
|
void |
closeOperation(OperationHandle opHandle)
|
void |
closeSession(SessionHandle sessionHandle)
|
OperationHandle |
executeStatement(SessionHandle sessionHandle,
String statement,
Map<String,String> confOverlay)
|
RowSet |
fetchResults(OperationHandle opHandle)
|
RowSet |
fetchResults(OperationHandle opHandle,
FetchOrientation orientation,
long maxRows)
|
OperationHandle |
getCatalogs(SessionHandle sessionHandle)
|
OperationHandle |
getColumns(SessionHandle sessionHandle,
String catalogName,
String schemaName,
String tableName,
String columnName)
|
OperationHandle |
getFunctions(SessionHandle sessionHandle,
String catalogName,
String schemaName,
String functionName)
|
GetInfoValue |
getInfo(SessionHandle sessionHandle,
GetInfoType getInfoType)
|
OperationState |
getOperationStatus(OperationHandle opHandle)
|
TableSchema |
getResultSetMetadata(OperationHandle opHandle)
|
OperationHandle |
getSchemas(SessionHandle sessionHandle,
String catalogName,
String schemaName)
|
OperationHandle |
getTables(SessionHandle sessionHandle,
String catalogName,
String schemaName,
String tableName,
List<String> tableTypes)
|
OperationHandle |
getTableTypes(SessionHandle sessionHandle)
|
OperationHandle |
getTypeInfo(SessionHandle sessionHandle)
|
void |
init(HiveConf hiveConf)
Initialize the service. |
SessionHandle |
openSession(String username,
String password,
Map<String,String> configuration)
|
void |
start()
Start the service. |
void |
stop()
Stop the service. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLIService
public CLIService()
init
public void init(HiveConf hiveConf)
- Description copied from class:
AbstractService
- Initialize the service.
The transition must be from
Service.STATE.NOTINITED
to Service.STATE.INITED
unless the
operation failed and an exception was raised.
- Specified by:
init
in interface Service
- Overrides:
init
in class CompositeService
start
public void start()
- Description copied from class:
AbstractService
- Start the service.
The transition should be from
Service.STATE.INITED
to Service.STATE.STARTED
unless the
operation failed and an exception was raised.
- Specified by:
start
in interface Service
- Overrides:
start
in class CompositeService
stop
public void stop()
- Description copied from class:
AbstractService
- Stop the service.
This operation must be designed to complete regardless of the initial state
of the service, including the state of all its internal fields.
- Specified by:
stop
in interface Service
- Overrides:
stop
in class CompositeService
openSession
public SessionHandle openSession(String username,
String password,
Map<String,String> configuration)
throws HiveSQLException
- Specified by:
openSession
in interface ICLIService
- Throws:
HiveSQLException
closeSession
public void closeSession(SessionHandle sessionHandle)
throws HiveSQLException
- Specified by:
closeSession
in interface ICLIService
- Throws:
HiveSQLException
getInfo
public GetInfoValue getInfo(SessionHandle sessionHandle,
GetInfoType getInfoType)
throws HiveSQLException
- Specified by:
getInfo
in interface ICLIService
- Throws:
HiveSQLException
executeStatement
public OperationHandle executeStatement(SessionHandle sessionHandle,
String statement,
Map<String,String> confOverlay)
throws HiveSQLException
- Specified by:
executeStatement
in interface ICLIService
- Throws:
HiveSQLException
getTypeInfo
public OperationHandle getTypeInfo(SessionHandle sessionHandle)
throws HiveSQLException
- Specified by:
getTypeInfo
in interface ICLIService
- Throws:
HiveSQLException
getCatalogs
public OperationHandle getCatalogs(SessionHandle sessionHandle)
throws HiveSQLException
- Specified by:
getCatalogs
in interface ICLIService
- Throws:
HiveSQLException
getSchemas
public OperationHandle getSchemas(SessionHandle sessionHandle,
String catalogName,
String schemaName)
throws HiveSQLException
- Specified by:
getSchemas
in interface ICLIService
- Throws:
HiveSQLException
getTables
public OperationHandle getTables(SessionHandle sessionHandle,
String catalogName,
String schemaName,
String tableName,
List<String> tableTypes)
throws HiveSQLException
- Specified by:
getTables
in interface ICLIService
- Throws:
HiveSQLException
getTableTypes
public OperationHandle getTableTypes(SessionHandle sessionHandle)
throws HiveSQLException
- Specified by:
getTableTypes
in interface ICLIService
- Throws:
HiveSQLException
getColumns
public OperationHandle getColumns(SessionHandle sessionHandle,
String catalogName,
String schemaName,
String tableName,
String columnName)
throws HiveSQLException
- Specified by:
getColumns
in interface ICLIService
- Throws:
HiveSQLException
getFunctions
public OperationHandle getFunctions(SessionHandle sessionHandle,
String catalogName,
String schemaName,
String functionName)
throws HiveSQLException
- Specified by:
getFunctions
in interface ICLIService
- Throws:
HiveSQLException
getOperationStatus
public OperationState getOperationStatus(OperationHandle opHandle)
throws HiveSQLException
- Specified by:
getOperationStatus
in interface ICLIService
- Throws:
HiveSQLException
cancelOperation
public void cancelOperation(OperationHandle opHandle)
throws HiveSQLException
- Specified by:
cancelOperation
in interface ICLIService
- Throws:
HiveSQLException
closeOperation
public void closeOperation(OperationHandle opHandle)
throws HiveSQLException
- Specified by:
closeOperation
in interface ICLIService
- Throws:
HiveSQLException
getResultSetMetadata
public TableSchema getResultSetMetadata(OperationHandle opHandle)
throws HiveSQLException
- Specified by:
getResultSetMetadata
in interface ICLIService
- Throws:
HiveSQLException
fetchResults
public RowSet fetchResults(OperationHandle opHandle,
FetchOrientation orientation,
long maxRows)
throws HiveSQLException
- Specified by:
fetchResults
in interface ICLIService
- Throws:
HiveSQLException
fetchResults
public RowSet fetchResults(OperationHandle opHandle)
throws HiveSQLException
- Specified by:
fetchResults
in interface ICLIService
- Throws:
HiveSQLException
Copyright © 2013 The Apache Software Foundation