carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jackylk <...@git.apache.org>
Subject [GitHub] carbondata pull request #1678: [CARBONDATA-1903] Fix code issues in carbonda...
Date Wed, 20 Dec 2017 07:13:44 GMT
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1678#discussion_r157950581
  
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java
---
    @@ -298,8 +298,7 @@ private void readAndLoadDataFromSortTempFiles() throws Exception {
             try {
               dataHandler.closeHandler();
             } catch (CarbonDataWriterException e) {
    -          LOGGER.error(e);
    -          throw new Exception("Problem loading data during compaction: " + e.getMessage());
    +          LOGGER.error(e, "Error in close data handler");
    --- End diff --
    
    I think it is better not to hide the exception even in finally block, there are multiple
operations inside dataHandler.closeHandler(), let it throw exception to caller then we can
know which operation cause the exception.
    In line 292, 295, 301, please modify to use `new Exception(msg, e) to include the original
exception in the new exception.


---

Mime
View raw message