carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gvram...@apache.org
Subject [1/2] incubator-carbondata git commit: fix blocksize out of Int range
Date Mon, 17 Oct 2016 17:25:58 GMT
Repository: incubator-carbondata
Updated Branches:
  refs/heads/master 4d564ad4e -> c693001ef


fix blocksize out of Int range


Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/5a4549cc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/5a4549cc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/5a4549cc

Branch: refs/heads/master
Commit: 5a4549ccb42ded64cc0ed7a7e9ac3bd69d83f1a4
Parents: 4d564ad
Author: foryou2030 <foryou2030@126.com>
Authored: Tue Oct 11 18:00:54 2016 +0800
Committer: Venkata Ramana G <ramana.gollamudi@huawei.com>
Committed: Mon Oct 17 12:50:27 2016 +0530

----------------------------------------------------------------------
 .../processing/store/writer/AbstractFactDataWriter.java         | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/5a4549cc/processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java
b/processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java
index 8ffbcf9..56134d5 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java
@@ -197,8 +197,9 @@ public abstract class AbstractFactDataWriter<T> implements CarbonFactDataWriter<
     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 = (long) blocksize * CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR
+        * CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR;
     this.spaceReservedForBlockMetaSize = Integer.parseInt(propInstance
         .getProperty(CarbonCommonConstants.CARBON_BLOCK_META_RESERVED_SPACE,
             CarbonCommonConstants.CARBON_BLOCK_META_RESERVED_SPACE_DEFAULT));


Mime
View raw message