org.apache.hadoop.hive.io
Class HiveIOExceptionHandlerChain
java.lang.Object
org.apache.hadoop.hive.io.HiveIOExceptionHandlerChain
public class HiveIOExceptionHandlerChain
- extends Object
An exception handler chain that process the input exception by going through
all exceptions defined in this chain one by one until either one exception
handler returns true or it reaches the end of the chain. If it reaches the
end of the chain, and still no exception handler returns true, throw the
exception to the caller.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HIVE_IO_EXCEPTION_HANDLE_CHAIN
public static String HIVE_IO_EXCEPTION_HANDLE_CHAIN
HiveIOExceptionHandlerChain
public HiveIOExceptionHandlerChain()
getHiveIOExceptionHandlerChain
public static HiveIOExceptionHandlerChain getHiveIOExceptionHandlerChain(org.apache.hadoop.mapred.JobConf conf)
getHandlerChain
protected List<HiveIOExceptionHandler> getHandlerChain()
- Returns:
- the exception handler chain defined
setHandlerChain
protected void setHandlerChain(List<HiveIOExceptionHandler> handlerChain)
- set the exception handler chain
- Parameters:
handlerChain
-
handleRecordReaderCreationException
public org.apache.hadoop.mapred.RecordReader<?,?> handleRecordReaderCreationException(Exception e)
throws IOException
- Throws:
IOException
handleRecordReaderNextException
public boolean handleRecordReaderNextException(Exception e)
throws IOException
- This is to handle exception when doing next operations. Here we use a
HiveIOExceptionNextHandleResult to store the results of each handler. If
the exception is handled by one handler, the handler should set
HiveIOExceptionNextHandleResult to be handled, and also set the handle
result. The handle result is used to return the reader's next to determine
if need to open a new file for read or not.
- Throws:
IOException
Copyright © 2013 The Apache Software Foundation