org.apache.hadoop.hive.io
Class HiveIOExceptionHandlerUtil

java.lang.Object
  extended by org.apache.hadoop.hive.io.HiveIOExceptionHandlerUtil

public class HiveIOExceptionHandlerUtil
extends Object


Constructor Summary
HiveIOExceptionHandlerUtil()
           
 
Method Summary
static org.apache.hadoop.mapred.RecordReader handleRecordReaderCreationException(Exception e, org.apache.hadoop.mapred.JobConf job)
          Handle exception thrown when creating record reader.
static boolean handleRecordReaderNextException(Exception e, org.apache.hadoop.mapred.JobConf job)
          Handle exception thrown when calling record reader's next.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HiveIOExceptionHandlerUtil

public HiveIOExceptionHandlerUtil()
Method Detail

handleRecordReaderCreationException

public static org.apache.hadoop.mapred.RecordReader handleRecordReaderCreationException(Exception e,
                                                                                        org.apache.hadoop.mapred.JobConf job)
                                                                                 throws IOException
Handle exception thrown when creating record reader. In case that there is an exception raised when construction the record reader and one handler can handle this exception, it should return an record reader, which is either a dummy empty record reader or a specific record reader that do some magic.

Parameters:
e -
job -
Returns:
RecordReader
Throws:
IOException

handleRecordReaderNextException

public static boolean handleRecordReaderNextException(Exception e,
                                                      org.apache.hadoop.mapred.JobConf job)
                                               throws IOException
Handle exception thrown when calling record reader's next. If this exception is handled by one handler, will just return true. Otherwise, either re-throw this exception in one handler or at the end of the handler chain.

Parameters:
e -
job -
Returns:
true on success
Throws:
IOException


Copyright © 2013 The Apache Software Foundation