Skip to content

Commit

Permalink
[CARBONDATA-304] Fixed data loading failure when set table_blocksize=…
Browse files Browse the repository at this point in the history
…2048. This closes apache#227
  • Loading branch information
gvramana committed Oct 17, 2016
2 parents 4d564ad + 5a4549c commit c693001
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (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));
Expand Down

0 comments on commit c693001

Please sign in to comment.