@SuppressWarnings("unchecked")
  public static HiveIOExceptionHandlerChain getHiveIOExceptionHandlerChain(
      JobConf conf) {
    HiveIOExceptionHandlerChain chain = new HiveIOExceptionHandlerChain();
    String exceptionHandlerStr = conf.get(HIVE_IO_EXCEPTION_HANDLE_CHAIN);
    List<HiveIOExceptionHandler> handlerChain = new ArrayList<HiveIOExceptionHandler>();
    if (exceptionHandlerStr != null && !exceptionHandlerStr.trim().equals("")) {
      String[] handlerArr = exceptionHandlerStr.split(",");
      if (handlerArr != null && handlerArr.length > 0) {
        for (String handlerStr : handlerArr) {
          if (!handlerStr.trim().equals("")) {
            try {
              Class<? extends HiveIOExceptionHandler> handlerCls =
                (Class<? extends HiveIOExceptionHandler>) Class.forName(handlerStr);
              HiveIOExceptionHandler handler = ReflectionUtils.newInstance(handlerCls, null);
              handlerChain.add(handler);
            } catch (Exception e) {
            }
          }
        }
      }
    }

    chain.setHandlerChain(handlerChain);
    return chain;
  }
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.
shims/common/src/main/java/org/apache/hadoop/hive/io/HiveIOExceptionHandlerChain.java