org.apache.hadoop.hive.ql
Class DriverContext

java.lang.Object
  extended by org.apache.hadoop.hive.ql.DriverContext

public class DriverContext
extends Object

DriverContext.


Constructor Summary
DriverContext()
           
DriverContext(Context ctx)
           
 
Method Summary
 boolean addToRunnable(Task<? extends Serializable> tsk)
           
 void finished(TaskRunner runner)
           
 Context getCtx()
           
 int getCurJobNo()
           
 Task<? extends Serializable> getRunnable(int maxthreads)
           
 void incCurJobNo(int amount)
           
static boolean isLaunchable(Task<? extends Serializable> tsk)
          Checks if a task can be launched.
 boolean isRunning()
           
 boolean isShutdown()
           
 void launching(TaskRunner runner)
           
 TaskRunner pollFinished()
          Polls running tasks to see if a task has ended.
 void prepare(QueryPlan plan)
           
 void prepare(TaskRunner runner)
           
 void remove(Task<? extends Serializable> task)
           
 void shutdown()
          Cleans up remaining tasks in case of failure
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DriverContext

public DriverContext()

DriverContext

public DriverContext(Context ctx)
Method Detail

isShutdown

public boolean isShutdown()

isRunning

public boolean isRunning()

remove

public void remove(Task<? extends Serializable> task)

launching

public void launching(TaskRunner runner)
               throws HiveException
Throws:
HiveException

getRunnable

public Task<? extends Serializable> getRunnable(int maxthreads)
                                         throws HiveException
Throws:
HiveException

pollFinished

public TaskRunner pollFinished()
                        throws InterruptedException
Polls running tasks to see if a task has ended.

Returns:
The result object for any completed/failed task
Throws:
InterruptedException

shutdown

public void shutdown()
Cleans up remaining tasks in case of failure


isLaunchable

public static boolean isLaunchable(Task<? extends Serializable> tsk)
Checks if a task can be launched.

Parameters:
tsk - the task to be checked
Returns:
true if the task is launchable, false otherwise

addToRunnable

public boolean addToRunnable(Task<? extends Serializable> tsk)
                      throws HiveException
Throws:
HiveException

getCurJobNo

public int getCurJobNo()

getCtx

public Context getCtx()

incCurJobNo

public void incCurJobNo(int amount)

prepare

public void prepare(QueryPlan plan)

prepare

public void prepare(TaskRunner runner)

finished

public void finished(TaskRunner runner)


Copyright © 2014 The Apache Software Foundation. All rights reserved.