GitHub user xuchuanyin opened a pull request:

    https://github.com/apache/carbondata/pull/2871

    [CARBONDATA-3051] Fix bugs in unclosed streams

    Failed to run CarbonReaderTests in windows env. This is due to two
    problems in carbondata:
    
    Problem 1: While encountering problems, we should close all the streams 
instead of
    only close current one.
    
    Problem 2: Current FileReader is not singleton nor the fileCache
    variable is a class variable, so it can only provide cache function if
    we pass the object among the methods. After reading version info, the
    fileReader cannot be used by other methods, so we must close it.
    
    Be sure to do all of the following checklist to help us incorporate 
    your contribution quickly and easily:
    
     - [x] Any interfaces changed?
     `NA`
     - [x] Any backward compatibility impacted?
      `NA`
     - [x] Document update required?
     `NA`
     - [x] Testing done
            Please provide details on 
            - Whether new unit test cases have been added or why no new tests 
are required?
     `NA, only fix bugs`
            - How it is tested? Please attach test report.
     `Tested in local machine`
            - Is it a performance related change? Please attach the performance 
test report.
     `NA`
            - Any additional information to help reviewers in testing this 
change.
            `NA`
     - [x] For large changes, please consider breaking it into sub-tasks under 
an umbrella JIRA. 
     `NA`


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/xuchuanyin/carbondata 181029_bug_close_stream

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/2871.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2871
    
----
commit bf966bcc9bec3eab286f1fec7679d6e650c050d0
Author: xuchuanyin <xuchuanyin@...>
Date:   2018-10-29T07:33:10Z

    Fix bugs in unclosed streams
    
    Failed to run CarbonReaderTests in windows env. This is due to two
    problems in carbondata:
    
    Problem 1: While encountering problems, we should close all the streams 
instead of
    only close current one.
    
    Problem 2: Current FileReader is not singleton nor the fileCache
    variable is a class variable, so it can only provide cache function if
    we pass the object among the methods. After reading version info, the
    fileReader cannot be used by other methods, so we must close it.

----


---

Reply via email to