You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@carbondata.apache.org by foryou2030 <gi...@git.apache.org> on 2016/10/11 10:11:19 UTC

[GitHub] incubator-carbondata pull request #227: [CARBONDATA-304] Fixed data loading ...

GitHub user foryou2030 opened a pull request:

    https://github.com/apache/incubator-carbondata/pull/227

    [CARBONDATA-304] Fixed data loading failure when set table_blocksize=2048

    # Why raise this pr?
    Load data failure when set table_blocksize=2048
    # How to solve?
    if blocksize=2048, then 2048*1024*1024 will beyond the range of Int, so use long

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

    $ git pull https://github.com/foryou2030/incubator-carbondata size1L

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

    https://github.com/apache/incubator-carbondata/pull/227.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 #227
    
----
commit c9644bc21501341aac03fce7ad85118eca118ab8
Author: foryou2030 <fo...@126.com>
Date:   2016-10-11T10:00:54Z

    fix out of Int range

----


---
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.
---

[GitHub] incubator-carbondata pull request #227: [CARBONDATA-304] Fixed data loading ...

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

    https://github.com/apache/incubator-carbondata/pull/227#discussion_r83012391
  
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java ---
    @@ -197,8 +197,9 @@ public AbstractFactDataWriter(String storeLocation, int measureCount, int mdKeyL
         blockIndexInfoList = new ArrayList<>();
         // get max file size;
         CarbonProperties propInstance = CarbonProperties.getInstance();
    -    this.fileSizeInBytes = blocksize * CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR
    -        * CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR * 1L;
    +    // if blocksize=2048, then 2048*1024*1024 will beyond the range of Int
    +    this.fileSizeInBytes = 1L * blocksize * CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR
    --- End diff --
    
    instead of multiple by `1L`, you can just convert `blocksize` to `(long)blocksize` instead


---
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.
---

[GitHub] incubator-carbondata pull request #227: [CARBONDATA-304] Fixed data loading ...

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

    https://github.com/apache/incubator-carbondata/pull/227


---
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.
---

[GitHub] incubator-carbondata pull request #227: [CARBONDATA-304] Fixed data loading ...

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

    https://github.com/apache/incubator-carbondata/pull/227#discussion_r83132187
  
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java ---
    @@ -197,8 +197,9 @@ public AbstractFactDataWriter(String storeLocation, int measureCount, int mdKeyL
         blockIndexInfoList = new ArrayList<>();
         // get max file size;
         CarbonProperties propInstance = CarbonProperties.getInstance();
    -    this.fileSizeInBytes = blocksize * CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR
    -        * CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR * 1L;
    +    // if blocksize=2048, then 2048*1024*1024 will beyond the range of Int
    +    this.fileSizeInBytes = 1L * blocksize * CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR
    --- End diff --
    
    fixed


---
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.
---