org.apache.hadoop.hive.ql.exec.errors
Class RegexErrorHeuristic

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.errors.RegexErrorHeuristic
All Implemented Interfaces:
ErrorHeuristic
Direct Known Subclasses:
DataCorruptErrorHeuristic, MapAggrMemErrorHeuristic, ScriptErrorHeuristic

public abstract class RegexErrorHeuristic
extends Object
implements ErrorHeuristic

Simple heuristic where the query and the lines of the task log file are run through regular expressions to see if they resemble a known error condition. Only a single regular expression can be supplied to match the query whereas multiple regular expressions can be supplied to match lines from the log file. A mapping is maintained from the regular expression to the lines from the log file that it matched.


Constructor Summary
RegexErrorHeuristic()
           
 
Method Summary
abstract  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 conf)
          Initialize this error heuristic.
 void processLogLine(String line)
          Process the given log line.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexErrorHeuristic

public RegexErrorHeuristic()
Method Detail

init

public void init(String query,
                 org.apache.hadoop.mapred.JobConf conf)
Description copied from interface: ErrorHeuristic
Initialize this error heuristic. Must be called before any other methods are called

Specified by:
init in interface ErrorHeuristic

getErrorAndSolution

public abstract ErrorAndSolution getErrorAndSolution()
Description copied from interface: ErrorHeuristic
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.

Specified by:
getErrorAndSolution in interface ErrorHeuristic
Returns:
a matching error, or null if a suitable match wasn't found.

processLogLine

public void processLogLine(String line)
Description copied from interface: ErrorHeuristic
Process the given log line. It should be called for every line in the task log file, in sequence.

Specified by:
processLogLine in interface ErrorHeuristic


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