|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lens.driver.hive.HiveDriver
public class HiveDriver
The Class HiveDriver.
| Field Summary | |
|---|---|
static float |
DAILY_PARTITION_WEIGHT_DEFAULT
|
static long |
DEFAULT_EXPIRY_DELAY
|
static String |
HIVE_CONNECTION_CLASS
The Constant HIVE_CONNECTION_CLASS. |
static float |
HOURLY_PARTITION_WEIGHT_DEFAULT
|
static String |
HS2_CALCULATE_PRIORITY
|
static String |
HS2_CONNECTION_EXPIRY_DELAY
The Constant HS2_CONNECTION_EXPIRY_DELAY. |
static String |
HS2_PARTITION_WEIGHT_DAILY
|
static String |
HS2_PARTITION_WEIGHT_HOURLY
|
static String |
HS2_PARTITION_WEIGHT_MONTHLY
|
static String |
HS2_PRIORITY_DEFAULT_RANGES
|
static String |
HS2_PRIORITY_RANGES
Config param for defining priority ranges. |
static org.apache.log4j.Logger |
LOG
The Constant LOG. |
static float |
MONTHLY_PARTITION_WEIGHT_DEFAULT
|
| Constructor Summary | |
|---|---|
HiveDriver()
Instantiates a new hive driver. |
|
| Method Summary | |
|---|---|
boolean |
areRsourcesAddedForSession(String sessionHandle)
Return true if resources have been added to this Hive session |
boolean |
cancelQuery(QueryHandle handle)
Cancel the execution of the query, specified by the handle. |
void |
close()
Close the driver, releasing all resouces used up by the driver. |
void |
closePreparedQuery(QueryPrepareHandle handle)
Close the prepare query specified by the prepared handle, releases all the resources held by the prepared query. |
void |
closeQuery(QueryHandle handle)
Close the query specified by the handle, releases all the resources held by the query. |
void |
closeResultSet(QueryHandle handle)
Close the resultset for the query. |
void |
closeSession(LensSessionHandle sessionHandle)
Close session. |
void |
configure(org.apache.hadoop.conf.Configuration conf)
Configure driver with Configuration passed. |
QueryCost |
estimate(AbstractQueryContext qctx)
Estimate the cost of execution for given query. |
LensResultSet |
execute(QueryContext ctx)
Blocking execute of the query The driver would be closing the driver handle, once the results are fetched. |
void |
executeAsync(QueryContext ctx)
Asynchronously execute the query. |
HiveQueryPlan |
explain(AbstractQueryContext explainCtx)
Explain the given query. |
DriverQueryPlan |
explainAndPrepare(PreparedQueryContext pContext)
Explain and prepare the given query. |
LensResultSet |
fetchResultSet(QueryContext ctx)
Fetch the results of the query, specified by the handle. |
org.apache.hadoop.conf.Configuration |
getConf()
Get driver configuration |
boolean |
hasLensSession(LensSessionHandle session)
Checks for lens session. |
void |
prepare(PreparedQueryContext pContext)
Prepare the given query. |
void |
readExternal(ObjectInput in)
|
void |
registerDriverEventListener(LensEventListener<DriverEvent> driverEventListener)
Add a listener for driver events. |
void |
registerForCompletionNotification(QueryHandle handle,
long timeoutMillis,
QueryCompletionListener listener)
Register for query completion notification. |
void |
setResourcesAddedForSession(String sessionHandle)
Tell Hive driver that resources have been added for this session |
void |
updateStatus(QueryContext context)
Update driver query status in the context object. |
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.log4j.Logger LOG
public static final String HIVE_CONNECTION_CLASS
public static final String HS2_CONNECTION_EXPIRY_DELAY
public static final String HS2_CALCULATE_PRIORITY
public static final String HS2_PRIORITY_RANGES
public static final String HS2_PARTITION_WEIGHT_MONTHLY
public static final String HS2_PARTITION_WEIGHT_DAILY
public static final String HS2_PARTITION_WEIGHT_HOURLY
public static final long DEFAULT_EXPIRY_DELAY
public static final String HS2_PRIORITY_DEFAULT_RANGES
public static final float MONTHLY_PARTITION_WEIGHT_DEFAULT
public static final float DAILY_PARTITION_WEIGHT_DEFAULT
public static final float HOURLY_PARTITION_WEIGHT_DEFAULT
| Constructor Detail |
|---|
public HiveDriver()
throws LensException
LensException - the lens exception| Method Detail |
|---|
public boolean areRsourcesAddedForSession(String sessionHandle)
sessionHandle -
public void setResourcesAddedForSession(String sessionHandle)
sessionHandle - public org.apache.hadoop.conf.Configuration getConf()
LensDriver
getConf in interface LensDriver
public void configure(org.apache.hadoop.conf.Configuration conf)
throws LensException
LensDriverConfiguration passed.
configure in interface LensDriverconf - The configuration object
LensException - the lens exception
public QueryCost estimate(AbstractQueryContext qctx)
throws LensException
LensDriver
estimate in interface LensDriverqctx - The query context
LensException - the lens exception if driver cannot estimate
public HiveQueryPlan explain(AbstractQueryContext explainCtx)
throws LensException
LensDriver
explain in interface LensDriverexplainCtx - The explain context
LensException - the lens exception
public DriverQueryPlan explainAndPrepare(PreparedQueryContext pContext)
throws LensException
LensDriver
explainAndPrepare in interface LensDriverpContext - the context
LensException - the lens exception
public void prepare(PreparedQueryContext pContext)
throws LensException
LensDriver
prepare in interface LensDriverpContext - the context
LensException - the lens exception
public void closePreparedQuery(QueryPrepareHandle handle)
throws LensException
LensDriver
closePreparedQuery in interface LensDriverhandle - The query handle
LensException - the lens exception
public LensResultSet execute(QueryContext ctx)
throws LensException
LensDriver
execute in interface LensDriverctx - the context
LensException - the lens exception
public void executeAsync(QueryContext ctx)
throws LensException
LensDriver
executeAsync in interface LensDriverctx - The query context
LensException - the lens exception
public void updateStatus(QueryContext context)
throws LensException
LensDriver
updateStatus in interface LensDrivercontext - The query context
LensException - the lens exception
public LensResultSet fetchResultSet(QueryContext ctx)
throws LensException
LensDriver
fetchResultSet in interface LensDriverctx - The query context
LensException - the lens exception
public void closeResultSet(QueryHandle handle)
throws LensException
LensDriver
closeResultSet in interface LensDriverhandle - The query handle
LensException - the lens exception
public void closeQuery(QueryHandle handle)
throws LensException
LensDriver
closeQuery in interface LensDriverhandle - The query handle
LensException - the lens exception
public boolean cancelQuery(QueryHandle handle)
throws LensException
LensDriver
cancelQuery in interface LensDriverhandle - The query handle.
LensException - the lens exceptionpublic void close()
LensDriver
close in interface LensDriverpublic void registerDriverEventListener(LensEventListener<DriverEvent> driverEventListener)
registerDriverEventListener in interface LensDriverdriverEventListener - the driver event listener
public void registerForCompletionNotification(QueryHandle handle,
long timeoutMillis,
QueryCompletionListener listener)
throws LensException
LensDriver
registerForCompletionNotification in interface LensDriverhandle - the handletimeoutMillis - the timeout millislistener - the listener
LensException - the lens exception
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizableIOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void closeSession(LensSessionHandle sessionHandle)
sessionHandle - the session handlepublic boolean hasLensSession(LensSessionHandle session)
session - the session
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||