[ 
https://issues.apache.org/jira/browse/CARBONDATA-267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15535068#comment-15535068
 ] 

ASF GitHub Bot commented on CARBONDATA-267:
-------------------------------------------

Github user manishgupta88 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/189#discussion_r81279628
  
    --- Diff: 
processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java
 ---
    @@ -196,11 +197,22 @@ public AbstractFactDataWriter(String storeLocation, 
int measureCount, int mdKeyL
         blockIndexInfoList = new ArrayList<>();
         // get max file size;
         CarbonProperties propInstance = CarbonProperties.getInstance();
    -    this.fileSizeInBytes = Long.parseLong(propInstance
    -        .getProperty(CarbonCommonConstants.MAX_FILE_SIZE,
    -            CarbonCommonConstants.MAX_FILE_SIZE_DEFAULT_VAL))
    -        * CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR
    -        * CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR * 1L;
    +    // If blocksize is defined by create table ddl, then use this value 
otherwise
    +    // use system level property
    +    if (blocksize >= 
CarbonCommonConstants.MAX_FILE_SIZE_DEFAULT_VAL_MIN_VAL &&
    +        blocksize <= 
CarbonCommonConstants.MAX_FILE_SIZE_DEFAULT_VAL_MAX_VAL) {
    +      LOGGER.audit("The max file size is set in table level. ");
    +      this.fileSizeInBytes = blocksize * 
CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR
    +          * CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR * 1L;
    +    } else {
    +      LOGGER.audit("The max file size in create table ddl is not set or is 
invalid, " +
    +          "so here use " + CarbonCommonConstants.MAX_FILE_SIZE + "to set. 
");
    --- End diff --
    
    @Zhangshunyu ...I am thinking instead of validating block size here 
specified by the user, we can validate at the time of creating the table and in 
error message we can display the range of allowed block size so that user is 
not confused.
    If user does not specify the block size the consider the default value and 
update in the schema


> Set block_size for table on table level
> ---------------------------------------
>
>                 Key: CARBONDATA-267
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-267
>             Project: CarbonData
>          Issue Type: New Feature
>    Affects Versions: 0.1.0-incubating
>            Reporter: zhangshunyu
>            Assignee: zhangshunyu
>             Fix For: 0.2.0-incubating
>
>
> Set block_size for table on table level



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to