You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by xubo245 <gi...@git.apache.org> on 2019/01/03 03:39:39 UTC

[GitHub] carbondata pull request #3048: [CARBONDATA-3224] Support SDK validate the im...

GitHub user xubo245 opened a pull request:

    https://github.com/apache/carbondata/pull/3048

    [CARBONDATA-3224] Support SDK validate the improper value when using withLoadOptions

    
    1. validate BAD_RECORDS_ACTION
    2. validate BAD_RECORDS_LOGGER_ENABLE
    
    Be sure to do all of the following checklist to help us incorporate 
    your contribution quickly and easily:
    
     - [ ] Any interfaces changed?
     No
     - [ ] Any backward compatibility impacted?
     No
     - [ ] Document update required?
    No
     - [ ] Testing done
            Please provide details on 
            - Whether new unit test cases have been added or why no new tests are required?
            - How it is tested? Please attach test report.
            - Is it a performance related change? Please attach the performance test report.
            - Any additional information to help reviewers in testing this change.
           added
     - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. 
    No


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

    $ git pull https://github.com/xubo245/carbondata CARBONDATA-3224_ValidateImproperValue

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

    https://github.com/apache/carbondata/pull/3048.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 #3048
    
----
commit afd9c1b9ae87cca93e05d30fbc09b40926304cc3
Author: xubo245 <xu...@...>
Date:   2019-01-03T03:26:55Z

    [CARBONDATA-3224] Support SDK validate the improper value when using withLoadOptions
    1. validate BAD_RECORDS_ACTION
    2. validate BAD_RECORDS_LOGGER_ENABLE

----


---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by ajantha-bhat <gi...@git.apache.org>.
Github user ajantha-bhat commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    LGTM


---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK validate the improper ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10388/



---

[GitHub] carbondata pull request #3048: [CARBONDATA-3224] Support SDK/CSDK validate t...

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

    https://github.com/apache/carbondata/pull/3048#discussion_r245532720
  
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java ---
    @@ -179,7 +181,8 @@ public CarbonWriterBuilder uniqueIdentifier(long timestamp) {
        *
        * @return updated CarbonWriterBuilder
        */
    -  public CarbonWriterBuilder withLoadOptions(Map<String, String> options) {
    +  public CarbonWriterBuilder withLoadOptions(Map<String, String> options)
    +      throws IllegalArgumentException {
    --- End diff --
    
    IllegalArgumentException is a RuntimeException, In general RuntimExceptions are not listed in throws part of method. It will be added in the javadoc if method like @throws IllegalArgumentException  <in which condition the exception is raised>


---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK validate the improper ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2340/



---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2386/



---

[GitHub] carbondata pull request #3048: [CARBONDATA-3224] Support SDK/CSDK validate t...

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

    https://github.com/apache/carbondata/pull/3048#discussion_r245252822
  
    --- Diff: store/CSDK/test/main.cpp ---
    @@ -526,6 +526,71 @@ void testCarbonProperties(JNIEnv *env) {
         }
     }
     
    +bool testValidateBadRecordsActionWithImproperValue(JNIEnv *env, char *path) {
    --- End diff --
    
    SDK already test enableLocalDictionary with false before, but I  didn't test in in CSDK.
     it throw exception when tester test it. So we should check in CSDK too.


---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK validate the improper ...

Posted by ajantha-bhat <gi...@git.apache.org>.
Github user ajantha-bhat commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    @xubo245 : why we are adding only for SDK ? It should be in a common place ?
    
    a) what is happening now, if I give invalid actions in bad record ?
    b) carbon session also this issue is there ?


---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10400/



---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2356/



---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10395/



---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by KanakaKumar <gi...@git.apache.org>.
Github user KanakaKumar commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    LGTM


---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2142/



---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2173/



---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by ajantha-bhat <gi...@git.apache.org>.
Github user ajantha-bhat commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    LGTM


---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Failed  with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10435/



---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2388/



---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2171/



---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK validate the improper ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2134/



---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2399/



---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2183/



---

[GitHub] carbondata pull request #3048: [CARBONDATA-3224] Support SDK/CSDK validate t...

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

    https://github.com/apache/carbondata/pull/3048#discussion_r245328731
  
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java ---
    @@ -179,7 +182,8 @@ public CarbonWriterBuilder uniqueIdentifier(long timestamp) {
        *
        * @return updated CarbonWriterBuilder
        */
    -  public CarbonWriterBuilder withLoadOptions(Map<String, String> options) {
    +  public CarbonWriterBuilder withLoadOptions(Map<String, String> options)
    --- End diff --
    
    IllegalArgumentException is used already for some validations below.  Better not to change the signature of method for the existing method. It causes compilation errors for existing user code.


---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2145/



---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2179/



---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by xubo245 <gi...@git.apache.org>.
Github user xubo245 commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    retest this please


---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by xubo245 <gi...@git.apache.org>.
Github user xubo245 commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    @ajantha-bhat @KanakaKumar Please review it.


---

[GitHub] carbondata pull request #3048: [CARBONDATA-3224] Support SDK/CSDK validate t...

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

    https://github.com/apache/carbondata/pull/3048#discussion_r245534079
  
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java ---
    @@ -179,7 +181,8 @@ public CarbonWriterBuilder uniqueIdentifier(long timestamp) {
        *
        * @return updated CarbonWriterBuilder
        */
    -  public CarbonWriterBuilder withLoadOptions(Map<String, String> options) {
    +  public CarbonWriterBuilder withLoadOptions(Map<String, String> options)
    +      throws IllegalArgumentException {
    --- End diff --
    
    ok,removed


---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2348/



---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2394/



---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10439/



---

[GitHub] carbondata pull request #3048: [CARBONDATA-3224] Support SDK/CSDK validate t...

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

    https://github.com/apache/carbondata/pull/3048#discussion_r245336706
  
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java ---
    @@ -179,7 +182,8 @@ public CarbonWriterBuilder uniqueIdentifier(long timestamp) {
        *
        * @return updated CarbonWriterBuilder
        */
    -  public CarbonWriterBuilder withLoadOptions(Map<String, String> options) {
    +  public CarbonWriterBuilder withLoadOptions(Map<String, String> options)
    --- End diff --
    
    OK,done


---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by xubo245 <gi...@git.apache.org>.
Github user xubo245 commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    @KanakaKumar Please review it again.


---

[GitHub] carbondata pull request #3048: [CARBONDATA-3224] Support SDK/CSDK validate t...

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

    https://github.com/apache/carbondata/pull/3048


---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10429/



---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by xubo245 <gi...@git.apache.org>.
Github user xubo245 commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    @ajantha-bhat 
    a) It won't throw exception when we give invalid actions in bad record, because SDK didn't validate it.   
    b) CarbonSession hasn't this issue because CarbonSession has validated bad records action in CarbonDDLSqlParser , but don't validate the bad records logger enable
    c) some of load options no need check. I add validate for length of quotechar and escapechar


---

[GitHub] carbondata pull request #3048: [CARBONDATA-3224] Support SDK/CSDK validate t...

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

    https://github.com/apache/carbondata/pull/3048#discussion_r245246228
  
    --- Diff: store/CSDK/test/main.cpp ---
    @@ -526,6 +526,71 @@ void testCarbonProperties(JNIEnv *env) {
         }
     }
     
    +bool testValidateBadRecordsActionWithImproperValue(JNIEnv *env, char *path) {
    --- End diff --
    
    Test case in this file is redundent. Because CarbonReaderTest.java already test same. 
    If SDK throws exception. CSDK will print it. NO need to duplicate test cases


---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by xubo245 <gi...@git.apache.org>.
Github user xubo245 commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    @KanakaKumar Optimized and CI pass,  please check it again.


---

[GitHub] carbondata issue #3048: [CARBONDATA-3224] Support SDK/CSDK validate the impr...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/3048
  
    Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10427/



---