|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.ql.Driver
public class Driver
Nested Class Summary | |
---|---|
class |
Driver.DriverResponse
Encapsulates the basic response info returned by the Driver. |
Constructor Summary | |
---|---|
Driver()
|
|
Driver(HiveConf conf)
for backwards compatibility with current tests |
Method Summary | |
---|---|
void |
addToRunnable(Queue<Task<? extends Serializable>> runnable,
Task<? extends Serializable> tsk)
|
int |
close()
|
int |
compile(String command)
Compile a new query. |
int |
countJobs(List<Task<? extends Serializable>> tasks)
|
int |
countJobs(List<Task<? extends Serializable>> tasks,
List<Task<? extends Serializable>> seenTasks)
|
int |
execute()
|
org.apache.hadoop.mapred.ClusterStatus |
getClusterStatus()
Return the status information about the Map-Reduce cluster |
int |
getMaxRows()
Return the maximum number of rows returned by getResults |
QueryPlan |
getPlan()
|
org.apache.hadoop.hive.ql.plan.api.Query |
getQueryPlan()
|
boolean |
getResults(Vector<String> res)
|
Schema |
getSchema()
Get a Schema with fields represented with native Hive types |
Schema |
getThriftSchema()
Get a Schema with fields represented with Thrift DDL types |
boolean |
hasReduceTasks(List<Task<? extends Serializable>> tasks)
|
void |
init()
|
boolean |
isLaunchable(Task<? extends Serializable> tsk)
Checks if a task can be launched |
int |
launchTask(Task<? extends Serializable> tsk,
String queryId,
boolean noName,
Map<TaskResult,TaskRunner> running,
String jobname,
int jobs,
int curJobNo)
Launches a new task |
TaskResult |
pollTasks(Set<TaskResult> results)
Polls running tasks to see if a task has ended. |
int |
run(String command)
|
Driver.DriverResponse |
runCommand(String command)
|
void |
setMaxRows(int maxRows)
Set the maximum number of rows returned by getResults |
void |
taskCleanup()
Cleans up remaining tasks in case of failure |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Driver(HiveConf conf)
public Driver()
Method Detail |
---|
public void init()
init
in interface CommandProcessor
public int countJobs(List<Task<? extends Serializable>> tasks)
public int countJobs(List<Task<? extends Serializable>> tasks, List<Task<? extends Serializable>> seenTasks)
public org.apache.hadoop.mapred.ClusterStatus getClusterStatus() throws Exception
Exception
public Schema getSchema() throws Exception
Exception
public Schema getThriftSchema() throws Exception
Exception
public int getMaxRows()
public void setMaxRows(int maxRows)
public boolean hasReduceTasks(List<Task<? extends Serializable>> tasks)
public int compile(String command)
command
- The SQL query to compile.public QueryPlan getPlan()
public int run(String command)
run
in interface CommandProcessor
public Driver.DriverResponse runCommand(String command)
public int execute()
public int launchTask(Task<? extends Serializable> tsk, String queryId, boolean noName, Map<TaskResult,TaskRunner> running, String jobname, int jobs, int curJobNo)
tsk
- task being launchedqueryId
- Id of the query containing the tasknoName
- whether the task has a name setrunning
- map from taskresults to taskrunnersjobname
- name of the task, if it is a map-reduce jobjobs
- number of map-reduce jobscurJobNo
- the sequential number of the next map-reduce job
public void taskCleanup()
public TaskResult pollTasks(Set<TaskResult> results)
results
- Set of result objects for running tasks
public boolean isLaunchable(Task<? extends Serializable> tsk)
tsk
- the task to be checked
public void addToRunnable(Queue<Task<? extends Serializable>> runnable, Task<? extends Serializable> tsk)
public boolean getResults(Vector<String> res) throws IOException
IOException
public int close()
public org.apache.hadoop.hive.ql.plan.api.Query getQueryPlan() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |