drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arina-ielchiieva <...@git.apache.org>
Subject [GitHub] drill pull request #666: DRILL-4956: Temporary tables support
Date Tue, 17 Jan 2017 15:30:42 GMT
Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/666#discussion_r94757405
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/WriterRecordBatch.java
---
    @@ -174,13 +174,23 @@ protected void setupNewSchema() throws IOException {
         schema = container.getSchema();
       }
     
    +  /** Clean up needs to be performed before closing writer. Partially written data will
be removed. */
       private void closeWriter() {
         if (recordWriter != null) {
           try {
             recordWriter.cleanup();
    -        recordWriter = null;
           } catch(IOException ex) {
             context.fail(ex);
    +      } finally {
    +        try {
    +          if (!processed) {
    +            recordWriter.abort();
    +          }
    +        } catch (IOException e) {
    +          logger.error("Abort failed. There could be leftover output files.");
    --- End diff --
    
    Done.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message