[GitHub] incubator-carbondata pull request #265: [CARBONDATA-458]Improving First time...

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #265: [CARBONDATA-458]Improving First time...

qiuchenjian-2
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/265#discussion_r90399780
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java ---
    @@ -236,29 +236,57 @@ private void validateHighCardinalityThreshold() {
       }
     
       private void validateHighCardinalityInRowCountPercentage() {
    -    String highcardPercentageStr = carbonProperties.getProperty(
    -        CarbonCommonConstants.HIGH_CARDINALITY_IN_ROW_COUNT_PERCENTAGE,
    -        CarbonCommonConstants.HIGH_CARDINALITY_IN_ROW_COUNT_PERCENTAGE_DEFAULT);
    +    String highcardPercentageStr = carbonProperties
    +        .getProperty(CarbonCommonConstants.HIGH_CARDINALITY_IN_ROW_COUNT_PERCENTAGE,
    +            CarbonCommonConstants.HIGH_CARDINALITY_IN_ROW_COUNT_PERCENTAGE_DEFAULT);
         try {
           double highcardPercentage = Double.parseDouble(highcardPercentageStr);
    -      if(highcardPercentage <= 0){
    -        LOGGER.info("The percentage of high cardinality in row count value \""
    -            + highcardPercentageStr + "\" is invalid. Using the default value \""
    -            + CarbonCommonConstants.HIGH_CARDINALITY_IN_ROW_COUNT_PERCENTAGE_DEFAULT);
    -        carbonProperties.setProperty(
    -            CarbonCommonConstants.HIGH_CARDINALITY_IN_ROW_COUNT_PERCENTAGE,
    +      if (highcardPercentage <= 0) {
    +        LOGGER.info(
    +            "The percentage of high cardinality in row count value \"" + highcardPercentageStr
    +                + "\" is invalid. Using the default value \""
    +                + CarbonCommonConstants.HIGH_CARDINALITY_IN_ROW_COUNT_PERCENTAGE_DEFAULT);
    +        carbonProperties.setProperty(CarbonCommonConstants.HIGH_CARDINALITY_IN_ROW_COUNT_PERCENTAGE,
                 CarbonCommonConstants.HIGH_CARDINALITY_IN_ROW_COUNT_PERCENTAGE_DEFAULT);
           }
         } catch (NumberFormatException e) {
    -      LOGGER.info("The percentage of high cardinality in row count value \""
    -          + highcardPercentageStr + "\" is invalid. Using the default value \""
    +      LOGGER.info("The percentage of high cardinality in row count value \"" + highcardPercentageStr
    +          + "\" is invalid. Using the default value \""
               + CarbonCommonConstants.HIGH_CARDINALITY_IN_ROW_COUNT_PERCENTAGE_DEFAULT);
           carbonProperties.setProperty(CarbonCommonConstants.HIGH_CARDINALITY_IN_ROW_COUNT_PERCENTAGE,
               CarbonCommonConstants.HIGH_CARDINALITY_IN_ROW_COUNT_PERCENTAGE_DEFAULT);
         }
       }
     
       /**
    +   * Below method will be used to validate the data file version parameter
    +   * if parameter is invalid current version will be set
    +   */
    +  private void validateCarbonDataFileVersion() {
    +    short carbondataFileVersion = CarbonCommonConstants.CARBON_DATA_FILE_CURRENT_VERSION;
    --- End diff --
   
    this initial value is of no use


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---