org.apache.hive.service.cli.operation
Class Operation

java.lang.Object
  extended by org.apache.hive.service.cli.operation.Operation
Direct Known Subclasses:
ExecuteStatementOperation, MetadataOperation

public abstract class Operation
extends Object


Field Summary
static long DEFAULT_FETCH_MAX_ROWS
           
protected  boolean hasResultSet
           
static org.apache.commons.logging.Log LOG
           
protected  Session parentSession
           
 
Constructor Summary
protected Operation(Session parentSession, OperationType opType)
           
 
Method Summary
protected  void assertState(OperationState state)
           
 void cancel()
           
abstract  void close()
           
 HiveConf getConfiguration()
           
 OperationHandle getHandle()
           
 RowSet getNextRowSet()
           
abstract  RowSet getNextRowSet(FetchOrientation orientation, long maxRows)
           
 Session getParentSession()
           
abstract  TableSchema getResultSetSchema()
           
 OperationState getState()
           
 OperationType getType()
           
 boolean hasResultSet()
           
 boolean isCanceled()
           
 boolean isFailed()
           
 boolean isFinished()
           
 boolean isRunning()
           
abstract  void run()
           
 void setConfiguration(HiveConf configuration)
           
protected  void setHasResultSet(boolean hasResultSet)
           
protected  OperationState setState(OperationState newState)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentSession

protected final Session parentSession

LOG

public static final org.apache.commons.logging.Log LOG

DEFAULT_FETCH_MAX_ROWS

public static final long DEFAULT_FETCH_MAX_ROWS
See Also:
Constant Field Values

hasResultSet

protected boolean hasResultSet
Constructor Detail

Operation

protected Operation(Session parentSession,
                    OperationType opType)
Method Detail

setConfiguration

public void setConfiguration(HiveConf configuration)

getConfiguration

public HiveConf getConfiguration()

getParentSession

public Session getParentSession()

getHandle

public OperationHandle getHandle()

getType

public OperationType getType()

getState

public OperationState getState()

hasResultSet

public boolean hasResultSet()

setHasResultSet

protected void setHasResultSet(boolean hasResultSet)

setState

protected final OperationState setState(OperationState newState)
                                 throws HiveSQLException
Throws:
HiveSQLException

assertState

protected final void assertState(OperationState state)
                          throws HiveSQLException
Throws:
HiveSQLException

isRunning

public boolean isRunning()

isFinished

public boolean isFinished()

isCanceled

public boolean isCanceled()

isFailed

public boolean isFailed()

run

public abstract void run()
                  throws HiveSQLException
Throws:
HiveSQLException

cancel

public void cancel()
            throws HiveSQLException
Throws:
HiveSQLException

close

public abstract void close()
                    throws HiveSQLException
Throws:
HiveSQLException

getResultSetSchema

public abstract TableSchema getResultSetSchema()
                                        throws HiveSQLException
Throws:
HiveSQLException

getNextRowSet

public abstract RowSet getNextRowSet(FetchOrientation orientation,
                                     long maxRows)
                              throws HiveSQLException
Throws:
HiveSQLException

getNextRowSet

public RowSet getNextRowSet()
                     throws HiveSQLException
Throws:
HiveSQLException


Copyright © 2013 The Apache Software Foundation