org.apache.hadoop.hive.ql.history
Class HiveHistory

java.lang.Object
  extended by org.apache.hadoop.hive.ql.history.HiveHistory

public class HiveHistory
extends Object


Nested Class Summary
static class HiveHistory.Info
           
static class HiveHistory.Keys
           
static interface HiveHistory.Listener
          Listner interface Parser will call handle function for each record type
static class HiveHistory.QueryInfo
           
static class HiveHistory.RecordTypes
           
static class HiveHistory.SessionInfo
           
static class HiveHistory.TaskInfo
           
 
Constructor Summary
HiveHistory(SessionState ss)
          Construct HiveHistory object an open history log file.
 
Method Summary
 void endQuery(String queryId)
          Called at the end of Job.
 void endTask(String queryId, Task<? extends Serializable> task)
          Called at the end of a task.
 String getHistFileName()
           
static void parseHiveHistory(String path, HiveHistory.Listener l)
          Parses history file and calls call back functions
 void printRowCount(String queryId)
           
 void progressTask(String queryId, Task<? extends Serializable> task)
          Called at the end of a task.
 void setIdToTableMap(Map<String,String> map)
          Set the table to id map
 void setQueryProperty(String queryId, HiveHistory.Keys propName, String propValue)
          Used to set job status and other attributes of a job
 void setTaskCounters(String queryId, String taskId, org.apache.hadoop.mapred.RunningJob rj)
          Serialize the task counters and set as a task property.
 void setTaskProperty(String queryId, String taskId, HiveHistory.Keys propName, String propValue)
          Used to set task properties.
 void startQuery(String cmd, String id)
          Called at the start of job Driver.run()
 void startTask(String queryId, Task<? extends Serializable> task, String taskName)
          Called at the start of a task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HiveHistory

public HiveHistory(SessionState ss)
Construct HiveHistory object an open history log file.

Parameters:
ss -
Method Detail

parseHiveHistory

public static void parseHiveHistory(String path,
                                    HiveHistory.Listener l)
                             throws IOException
Parses history file and calls call back functions

Parameters:
path -
l -
Throws:
IOException

getHistFileName

public String getHistFileName()
Returns:
historyFileName

startQuery

public void startQuery(String cmd,
                       String id)
Called at the start of job Driver.run()


setQueryProperty

public void setQueryProperty(String queryId,
                             HiveHistory.Keys propName,
                             String propValue)
Used to set job status and other attributes of a job

Parameters:
queryId -
propName -
propValue -

setTaskProperty

public void setTaskProperty(String queryId,
                            String taskId,
                            HiveHistory.Keys propName,
                            String propValue)
Used to set task properties.

Parameters:
taskId -
propName -
propValue -

setTaskCounters

public void setTaskCounters(String queryId,
                            String taskId,
                            org.apache.hadoop.mapred.RunningJob rj)
Serialize the task counters and set as a task property.

Parameters:
taskId -
rj -

printRowCount

public void printRowCount(String queryId)

endQuery

public void endQuery(String queryId)
Called at the end of Job. A Job is sql query.

Parameters:
queryId -

startTask

public void startTask(String queryId,
                      Task<? extends Serializable> task,
                      String taskName)
Called at the start of a task. Called by Driver.run() A Job can have multiple tasks. Tasks will have multiple operator.

Parameters:
task -

endTask

public void endTask(String queryId,
                    Task<? extends Serializable> task)
Called at the end of a task.

Parameters:
task -

progressTask

public void progressTask(String queryId,
                         Task<? extends Serializable> task)
Called at the end of a task.

Parameters:
task -

setIdToTableMap

public void setIdToTableMap(Map<String,String> map)
Set the table to id map

Parameters:
map -


Copyright © 2009 The Apache Software Foundation