org.apache.lens.driver.hive
Class HiveInMemoryResultSet

java.lang.Object
  extended by org.apache.lens.server.api.driver.LensResultSet
      extended by org.apache.lens.server.api.driver.InMemoryResultSet
          extended by org.apache.lens.driver.hive.HiveInMemoryResultSet

public class HiveInMemoryResultSet
extends InMemoryResultSet

The Class HiveInMemoryResultSet.


Constructor Summary
HiveInMemoryResultSet(org.apache.hive.service.cli.OperationHandle hiveHandle, org.apache.hive.service.cli.CLIServiceClient client, boolean closeAfterFecth)
          Instantiates a new hive in memory result set.
 
Method Summary
 LensResultSetMetadata getMetadata()
          Get the result set metadata
 boolean hasNext()
          Whether there is another result row available.
 ResultRow next()
          Read the next result row.
 void setFetchSize(int size)
          Set number of rows to be fetched at time
 int size()
          Get the size of the result set.
 
Methods inherited from class org.apache.lens.server.api.driver.InMemoryResultSet
toQueryResult
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HiveInMemoryResultSet

public HiveInMemoryResultSet(org.apache.hive.service.cli.OperationHandle hiveHandle,
                             org.apache.hive.service.cli.CLIServiceClient client,
                             boolean closeAfterFecth)
                      throws org.apache.hive.service.cli.HiveSQLException
Instantiates a new hive in memory result set.

Parameters:
hiveHandle - the hive handle
client - the client
closeAfterFecth - the close after fecth
Throws:
org.apache.hive.service.cli.HiveSQLException - the hive sql exception
Method Detail

size

public int size()
         throws LensException
Description copied from class: LensResultSet
Get the size of the result set.

Specified by:
size in class LensResultSet
Returns:
The size if available, -1 if not available.
Throws:
LensException - the lens exception

getMetadata

public LensResultSetMetadata getMetadata()
                                  throws LensException
Description copied from class: LensResultSet
Get the result set metadata

Specified by:
getMetadata in class LensResultSet
Returns:
Returns LensResultSetMetadata
Throws:
LensException

hasNext

public boolean hasNext()
                throws LensException
Description copied from class: InMemoryResultSet
Whether there is another result row available.

Specified by:
hasNext in class InMemoryResultSet
Returns:
true if next row if available, false otherwise
Throws:
LensException - the lens exception

next

public ResultRow next()
               throws LensException
Description copied from class: InMemoryResultSet
Read the next result row.

Specified by:
next in class InMemoryResultSet
Returns:
The row as list of object
Throws:
LensException - the lens exception

setFetchSize

public void setFetchSize(int size)
                  throws LensException
Description copied from class: InMemoryResultSet
Set number of rows to be fetched at time

Specified by:
setFetchSize in class InMemoryResultSet
Throws:
LensException


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.