You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by xuchuanyin <gi...@git.apache.org> on 2017/11/29 14:01:14 UTC

[GitHub] carbondata pull request #1593: [CARBONDATA-1837] Reusing origin row to reduc...

GitHub user xuchuanyin opened a pull request:

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

    [CARBONDATA-1837] Reusing origin row to reduce memory consumption

    Be sure to do all of the following checklist to help us incorporate 
    your contribution quickly and easily:
    
     - [X] Any interfaces changed?
      `ADDED TWO INTERFACE FOR CARBON_ROW_BATCH`
     - [X] Any backward compatibility impacted?
      `NO`
     - [X] Document update required?
      `NO`
     - [X] Testing done
            Please provide details on 
            - Whether new unit test cases have been added or why no new tests are required?
            `NO. ONLY FOR OPTIMIZATION`
            - How it is tested? Please attach test report.
            `TESTED IN CLUSTER OF 3 NODES`
            - Is it a performance related change? Please attach the performance test report.
            `PERFORMANCE SHOULD BE ENHANCED A BIT, SINCE MEMORY CONSUMPTION IS REDUCED`
            - Any additional information to help reviewers in testing this change.
            `NO`
     - [X] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. 
            `NOT RELATED`
    
    NOTES:
    ===
    In data converting process of data loading, Carbondata will convert each row to another by batch.
    
    Currently, it will create a new batch to store the converted rows, which I think can be optimized to reuse the old row batch's space, thus will reduce memory consumption and GC related overhead.
    
    Tests have been done in my local cluster, enhancement gained is not obvious, but the performance didn't become worse than that of before.

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

    $ git pull https://github.com/xuchuanyin/carbondata opt_converter_memory

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

    https://github.com/apache/carbondata/pull/1593.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 #1593
    
----
commit b5b812cfad95e42500c2ed8e1724632dd489e55f
Author: xuchuanyin <xu...@hust.edu.cn>
Date:   2017-11-29T03:59:48Z

    reuse origin batch to reduce memory consumption

----


---

[GitHub] carbondata issue #1593: [CARBONDATA-1837] Reusing origin row to reduce memor...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1593
  
    Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/428/



---

[GitHub] carbondata issue #1593: [CARBONDATA-1837] Reusing origin row to reduce memor...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1593
  
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2138/



---

[GitHub] carbondata pull request #1593: [CARBONDATA-1837] Reusing origin row to reduc...

Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1593#discussion_r155001692
  
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/loading/row/CarbonRowBatch.java ---
    @@ -61,4 +61,19 @@ public CarbonRow next() throws NoSuchElementException {
       @Override public void remove() {
     
       }
    +
    +  /**
    +   * set current row, this can be used to set value for the RowBatch while iterating it
    +   * @param row
    +   */
    +  public void setCurrentRow(CarbonRow row) {
    +    rowBatch[index - 1] = row;
    --- End diff --
    
    why not use index, but index - 1?


---

[GitHub] carbondata issue #1593: [CARBONDATA-1837] Reusing origin row to reduce memor...

Posted by xuchuanyin <gi...@git.apache.org>.
Github user xuchuanyin commented on the issue:

    https://github.com/apache/carbondata/pull/1593
  
    retest this please


---

[GitHub] carbondata issue #1593: [CARBONDATA-1837] Reusing origin row to reduce memor...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1593
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1699/



---

[GitHub] carbondata issue #1593: [CARBONDATA-1837] Reusing origin row to reduce memor...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1593
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1589/



---

[GitHub] carbondata issue #1593: [CARBONDATA-1837] Reusing origin row to reduce memor...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1593
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1665/



---

[GitHub] carbondata issue #1593: [CARBONDATA-1837] Reusing origin row to reduce memor...

Posted by xuchuanyin <gi...@git.apache.org>.
Github user xuchuanyin commented on the issue:

    https://github.com/apache/carbondata/pull/1593
  
    retest this please


---

[GitHub] carbondata issue #1593: [CARBONDATA-1837] Reusing origin row to reduce memor...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1593
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1581/



---

[GitHub] carbondata issue #1593: [CARBONDATA-1837] Reusing origin row to reduce memor...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1593
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1755/



---

[GitHub] carbondata pull request #1593: [CARBONDATA-1837] Reusing origin row to reduc...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---

[GitHub] carbondata issue #1593: [CARBONDATA-1837] Reusing origin row to reduce memor...

Posted by xuchuanyin <gi...@git.apache.org>.
Github user xuchuanyin commented on the issue:

    https://github.com/apache/carbondata/pull/1593
  
    retest this please


---

[GitHub] carbondata issue #1593: [CARBONDATA-1837] Reusing origin row to reduce memor...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1593
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1979/



---

[GitHub] carbondata issue #1593: [CARBONDATA-1837] Reusing origin row to reduce memor...

Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on the issue:

    https://github.com/apache/carbondata/pull/1593
  
    LGTM, thanks for working on this


---

[GitHub] carbondata issue #1593: [CARBONDATA-1837] Reusing origin row to reduce memor...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1593
  
    Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/492/



---

[GitHub] carbondata pull request #1593: [CARBONDATA-1837] Reusing origin row to reduc...

Posted by xuchuanyin <gi...@git.apache.org>.
Github user xuchuanyin commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1593#discussion_r155154423
  
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/loading/row/CarbonRowBatch.java ---
    @@ -61,4 +61,19 @@ public CarbonRow next() throws NoSuchElementException {
       @Override public void remove() {
     
       }
    +
    +  /**
    +   * set current row, this can be used to set value for the RowBatch while iterating it
    +   * @param row
    +   */
    +  public void setCurrentRow(CarbonRow row) {
    +    rowBatch[index - 1] = row;
    --- End diff --
    
    When we interator the RowBatch, the internal `index` will increase by 1.
    
    Here, we firstly get the value by iterating and then reset the value, so the correct index should be `index-1`
    
    emm, it will be better to rename the method to `setPreviosRow`


---