Github user gvramana commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2313#discussion_r189180538
--- Diff:
integration/spark2/src/main/java/org/apache/carbondata/spark/vectorreader/VectorizedCarbonRecordReader.java
---
@@ -144,14 +145,10 @@ public void initialize(InputSplit inputSplit,
TaskAttemptContext taskAttemptCont
}
throw new InterruptedException(e.getMessage());
} catch (Exception e) {
- Throwable ext = e;
- while (ext != null) {
- if (ext instanceof FileNotFoundException) {
- LOGGER.error(e);
- throw new InterruptedException(
- "Insert overwrite may be in progress.Please check " +
e.getMessage());
- }
- ext = ext.getCause();
+ if (ExceptionUtils.hasCause(e, FileNotFoundException.class)) {
--- End diff --
hasCause is not recursive, so can use indexOfThrowable
---