[GitHub] carbondata pull request #3003: [WIP]Avoid creating empty carbondata file whe...

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #3003: [WIP]Avoid creating empty carbondata file whe...

qiuchenjian-2
GitHub user ajantha-bhat opened a pull request:

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

    [WIP]Avoid creating empty carbondata file when all the records are bad record with action redirect.

    **problem:** In the no_sort flow, writer will be open as there is no blocking sort step.
    So, when all the record goes as bad record with redirect in converted step.
    writer is closing the empty .carbondata file.
    when this empty carbondata file is queried , we get multiple issues including NPE.
   
    **solution:** When the file size is 0 bytes. do the following
    a) If one data and one index file -- delete carbondata file and avoid index file creation
    b) If multiple data and one index file (with few data file is full of bad recod) -- delete carbondata files, remove them from blockIndexInfoList, so index file not will not have that info of empty carbon files
    c) In case direct write to store path is enable. need to delete data file from there and avoid writing index file with that carbondata in info.
   
    Be sure to do all of the following checklist to help us incorporate
    your contribution quickly and easily:
   
     - [ ] Any interfaces changed? NA
     
     - [ ] Any backward compatibility impacted? NA
     
     - [ ] Document update required? NA
   
     - [ ] Testing done
    Added UT      
     - [ ] 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/ajantha-bhat/carbondata issue_fix

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

    https://github.com/apache/carbondata/pull/3003.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 #3003
   
----
commit 7701f0488b886d8db679bb8b69aee79bc515fe4f
Author: ajantha-bhat <ajanthabhat@...>
Date:   2018-12-19T12:57:53Z

    Avoid creating empty carbondata file when all the records are bad record with action redirect.

----


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #3003: [WIP]Avoid creating empty carbondata file when all t...

qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3003
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1851/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #3003: [WIP]Avoid creating empty carbondata file when all t...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3003
 
    Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10106/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #3003: [WIP]Avoid creating empty carbondata file when all t...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3003
 
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2059/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #3003: [WIP]Avoid creating empty carbondata file when all t...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3003
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1859/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #3003: [WIP]Avoid creating empty carbondata file when all t...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3003
 
    Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10114/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #3003: [WIP]Avoid creating empty carbondata file when all t...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3003
 
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2067/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #3003: [CARBONDATA-3186]Avoid creating empty carbondata fil...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ajantha-bhat commented on the issue:

    https://github.com/apache/carbondata/pull/3003
 
    @kumarvishal09 , @ravipesala : please check the changes


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #3003: [CARBONDATA-3186]Avoid creating empty carbond...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/3003#discussion_r243530948
 
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java ---
    @@ -272,18 +272,44 @@ protected void commitCurrentFile(boolean copyInCurrentThread) {
         CarbonUtil.closeStreams(this.fileOutputStream, this.fileChannel);
         if (!enableDirectlyWriteDataToStorePath) {
           try {
    -        if (copyInCurrentThread) {
    -          CarbonUtil.copyCarbonDataFileToCarbonStorePath(carbonDataFileTempPath,
    -              model.getCarbonDataDirectoryPath(), fileSizeInBytes);
    +        if (currentFileSize == 0) {
               FileFactory
                   .deleteFile(carbonDataFileTempPath, FileFactory.getFileType(carbonDataFileTempPath));
    +          if (blockIndexInfoList.size() > 0 && blockIndexInfoList.get(blockIndexInfoList.size() - 1)
    --- End diff --
   
    Please extract this to some method .....below else and this condition are same


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #3003: [CARBONDATA-3186]Avoid creating empty carbond...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ajantha-bhat commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/3003#discussion_r243770677
 
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java ---
    @@ -272,18 +272,44 @@ protected void commitCurrentFile(boolean copyInCurrentThread) {
         CarbonUtil.closeStreams(this.fileOutputStream, this.fileChannel);
         if (!enableDirectlyWriteDataToStorePath) {
           try {
    -        if (copyInCurrentThread) {
    -          CarbonUtil.copyCarbonDataFileToCarbonStorePath(carbonDataFileTempPath,
    -              model.getCarbonDataDirectoryPath(), fileSizeInBytes);
    +        if (currentFileSize == 0) {
               FileFactory
                   .deleteFile(carbonDataFileTempPath, FileFactory.getFileType(carbonDataFileTempPath));
    +          if (blockIndexInfoList.size() > 0 && blockIndexInfoList.get(blockIndexInfoList.size() - 1)
    --- End diff --
   
    not same, paths are different.
   
    Now moved into a method that takes path.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #3003: [CARBONDATA-3186]Avoid creating empty carbondata fil...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3003
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1913/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #3003: [CARBONDATA-3186]Avoid creating empty carbondata fil...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3003
 
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2124/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #3003: [CARBONDATA-3186]Avoid creating empty carbondata fil...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3003
 
    Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10167/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #3003: [CARBONDATA-3186]Avoid creating empty carbondata fil...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3003
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1919/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #3003: [CARBONDATA-3186]Avoid creating empty carbondata fil...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3003
 
    Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10172/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #3003: [CARBONDATA-3186]Avoid creating empty carbondata fil...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3003
 
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2129/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #3003: [CARBONDATA-3186]Avoid creating empty carbondata fil...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on the issue:

    https://github.com/apache/carbondata/pull/3003
 
    LGTM


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #3003: [CARBONDATA-3186]Avoid creating empty carbond...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user asfgit closed the pull request at:

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


---