Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1471#discussion_r151827362
  
    --- Diff: 
processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java
 ---
    @@ -463,20 +426,24 @@ protected void writeIndexFile() throws IOException, 
CarbonDataWriterException {
        * @throws CarbonDataWriterException
        */
       protected void closeExecutorService() throws CarbonDataWriterException {
    -    executorService.shutdown();
         try {
    -      executorService.awaitTermination(2, TimeUnit.HOURS);
    -    } catch (InterruptedException e) {
    -      throw new CarbonDataWriterException(e.getMessage());
    -    }
    -    for (int i = 0; i < executorServiceSubmitList.size(); i++) {
    +      listener.finish();
    +      executorService.shutdown();
           try {
    -        executorServiceSubmitList.get(i).get();
    +        executorService.awaitTermination(2, TimeUnit.HOURS);
           } catch (InterruptedException e) {
             throw new CarbonDataWriterException(e.getMessage());
    -      } catch (ExecutionException e) {
    -        throw new CarbonDataWriterException(e.getMessage());
           }
    +      for (int i = 0; i < executorServiceSubmitList.size(); i++) {
    +        executorServiceSubmitList.get(i).get();
    +      }
    +    } catch (InterruptedException e) {
    +      throw new CarbonDataWriterException(e.getMessage());
    +    } catch (ExecutionException e) {
    --- End diff --
    
    merge with line 440


---

Reply via email to