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

All Known Implementing Classes:
HiveHistoryImpl

public interface HiveHistory

HiveHistory. Logs information such as query, query plan, runtime statistics into a file. Each session uses a new object, which creates a new file.


Nested Class Summary
static class HiveHistory.Info
          Info.
static class HiveHistory.Keys
          Keys.
static interface HiveHistory.Listener
          Listener interface.
static class HiveHistory.QueryInfo
          QueryInfo.
static class HiveHistory.RecordTypes
          RecordTypes.
static class HiveHistory.SessionInfo
          SessionInfo.
static class HiveHistory.TaskInfo
          TaskInfo.
 
Method Summary
 void closeStream()
          Close the log file stream
 void endQuery(String queryId)
          Called at the end of a query
 void endTask(String queryId, Task<? extends Serializable> task)
          Called at the end of a task.
 String getHistFileName()
           
 void logPlanProgress(QueryPlan plan)
          Logs the current plan state
 void printRowCount(String queryId)
           
 void progressTask(String queryId, Task<? extends Serializable> task)
          Logs progress of a task if ConfVars.HIVE_LOG_INCREMENTAL_PLAN_PROGRESS is set to true
 void setIdToTableMap(Map<String,String> map)
          Set the id to table name map
 void setQueryProperty(String queryId, HiveHistory.Keys propName, String propValue)
          Used to set query status and other attributes of a query
 void setTaskCounters(String queryId, String taskId, org.apache.hadoop.mapred.Counters ctrs)
          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 query execution in Driver.execute().
 void startTask(String queryId, Task<? extends Serializable> task, String taskName)
          Called at the start of a task.
 

Method Detail

getHistFileName

String getHistFileName()
Returns:
historyFileName

startQuery

void startQuery(String cmd,
                String id)
Called at the start of query execution in Driver.execute().


setQueryProperty

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

Parameters:
queryId -
propName -
propValue -

setTaskProperty

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

Parameters:
taskId -
propName -
propValue -

setTaskCounters

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

Parameters:
queryId -
taskId -
ctrs -

printRowCount

void printRowCount(String queryId)

endQuery

void endQuery(String queryId)
Called at the end of a query

Parameters:
queryId -

startTask

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

Parameters:
task -

endTask

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

Parameters:
task -

progressTask

void progressTask(String queryId,
                  Task<? extends Serializable> task)
Logs progress of a task if ConfVars.HIVE_LOG_INCREMENTAL_PLAN_PROGRESS is set to true

Parameters:
task -

logPlanProgress

void logPlanProgress(QueryPlan plan)
                     throws IOException
Logs the current plan state

Parameters:
plan -
Throws:
IOException

setIdToTableMap

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

Parameters:
map -

closeStream

void closeStream()
Close the log file stream



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