org.apache.hadoop.hive.ql.exec.errors
Interface ErrorHeuristic

All Known Implementing Classes:
DataCorruptErrorHeuristic, MapAggrMemErrorHeuristic, RegexErrorHeuristic, ScriptErrorHeuristic

public interface ErrorHeuristic

Classes implementing ErrorHeuristic are able to generate a possible cause and solution for Hive jobs that have failed by examining the query, task log files, and the job configuration. A class implementing ErrorHeuristic should only detect one type of error.


Method Summary
 ErrorAndSolution getErrorAndSolution()
          Examine the hive query, job configuration, and the lines from the task log seen so far though processLogLine() and generate a possible cause/solution.
 void init(String query, org.apache.hadoop.mapred.JobConf jobConf)
          Initialize this error heuristic.
 void processLogLine(String line)
          Process the given log line.
 

Method Detail

init

void init(String query,
          org.apache.hadoop.mapred.JobConf jobConf)
Initialize this error heuristic. Must be called before any other methods are called

Parameters:
query -
jobConf -

processLogLine

void processLogLine(String line)
Process the given log line. It should be called for every line in the task log file, in sequence.

Parameters:
line -

getErrorAndSolution

ErrorAndSolution getErrorAndSolution()
Examine the hive query, job configuration, and the lines from the task log seen so far though processLogLine() and generate a possible cause/solution. Once this method is called, the implementing class should be reset to the state before any processLogLine() calls were made.

Returns:
a matching error, or null if a suitable match wasn't found.


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