[GitHub] carbondata pull request #2931: [CARBONDATA-2999] support read schema from S3

classic Classic list List threaded Threaded
31 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
GitHub user xubo245 opened a pull request:

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

    [CARBONDATA-2999] support read schema from S3

    [CARBONDATA-2999] support read schema from S3
    SDK and CSDK both support it.
   
    Be sure to do all of the following checklist to help us incorporate
    your contribution quickly and easily:
   
     - [ ] Any interfaces changed?
     add
     - [ ] Any backward compatibility impacted?
     No
     - [ ] Document update required?
    Yes
     - [ ] Testing done
          add test case
     - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
    JIRA2951

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

    $ git pull https://github.com/xubo245/carbondata CARBONDATA-2999_readSchemaFromS3

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

    https://github.com/apache/carbondata/pull/2931.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 #2931
   
----
commit 1d5246dd33b743de68aae6ef872623aca8bcd964
Author: xubo245 <xubo29@...>
Date:   2018-11-20T07:36:43Z

    [CARBONDATA-2999] support read schema from S3

----


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2931
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1457/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

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



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2931
 
    Build Failed  with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9715/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

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



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2931
 
    Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9716/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xubo245 commented on the issue:

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


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

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



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

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



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2931
 
    Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9759/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xubo245 commented on the issue:

    https://github.com/apache/carbondata/pull/2931
 
    @KanakaKumar @jackylk @QiangCai @ajantha-bhat @kunal642 Rebased, Please review it.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

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



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2931
 
    Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9874/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

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



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xubo245 commented on the issue:

    https://github.com/apache/carbondata/pull/2931
 
    @KanakaKumar @jackylk @QiangCai @ajantha-bhat @kunal642 Rebased, Please review it.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user KanakaKumar commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2931#discussion_r242034641
 
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonSchemaReader.java ---
    @@ -147,34 +170,55 @@ public static Schema readSchema(String path, boolean validateSchema) throws IOEx
             throw new CarbonDataLoadingException("No carbonindex file in this path.");
           }
         } else {
    -      String indexFilePath = getCarbonFile(path, INDEX_FILE_EXT)[0].getAbsolutePath();
    -      return readSchemaFromIndexFile(indexFilePath);
    +      String indexFilePath = getCarbonFile(path, INDEX_FILE_EXT, conf)[0].getAbsolutePath();
    +      return readSchemaFromIndexFile(indexFilePath, conf);
         }
       }
     
    +  /**
    +   * read schema from path,
    +   * path can be folder path, carbonindex file path, and carbondata file path
    +   * and user can decide whether check all files schema
    +   *
    +   * @param path           file/folder path
    +   * @param validateSchema whether check all files schema
    +   * @return schema
    +   * @throws IOException
    +   */
    +  public static Schema readSchema(String path, boolean validateSchema) throws IOException {
    +    Configuration conf = new Configuration();
    +    return readSchema(path, validateSchema, conf);
    +  }
    +
       /**
        * Read carbondata file and return the schema
        * This interface will be removed,
        * please use readSchema instead of this interface
        *
        * @param dataFilePath carbondata file store path
    +   * @param conf         hadoop configuration support, can set s3a AK,SK,
    +   *                     end point and other conf with this
        * @return Schema object
        * @throws IOException
        */
       @Deprecated
    -  public static Schema readSchemaInDataFile(String dataFilePath) throws IOException {
    -    return readSchema(dataFilePath, false);
    +  public static Schema readSchemaInDataFile(String dataFilePath, Configuration conf)
    --- End diff --
   
    No need to change the deprecated old method.  Keep as it is.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2931#discussion_r242387341
 
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonSchemaReader.java ---
    @@ -147,34 +170,55 @@ public static Schema readSchema(String path, boolean validateSchema) throws IOEx
             throw new CarbonDataLoadingException("No carbonindex file in this path.");
           }
         } else {
    -      String indexFilePath = getCarbonFile(path, INDEX_FILE_EXT)[0].getAbsolutePath();
    -      return readSchemaFromIndexFile(indexFilePath);
    +      String indexFilePath = getCarbonFile(path, INDEX_FILE_EXT, conf)[0].getAbsolutePath();
    +      return readSchemaFromIndexFile(indexFilePath, conf);
         }
       }
     
    +  /**
    +   * read schema from path,
    +   * path can be folder path, carbonindex file path, and carbondata file path
    +   * and user can decide whether check all files schema
    +   *
    +   * @param path           file/folder path
    +   * @param validateSchema whether check all files schema
    +   * @return schema
    +   * @throws IOException
    +   */
    +  public static Schema readSchema(String path, boolean validateSchema) throws IOException {
    +    Configuration conf = new Configuration();
    +    return readSchema(path, validateSchema, conf);
    +  }
    +
       /**
        * Read carbondata file and return the schema
        * This interface will be removed,
        * please use readSchema instead of this interface
        *
        * @param dataFilePath carbondata file store path
    +   * @param conf         hadoop configuration support, can set s3a AK,SK,
    +   *                     end point and other conf with this
        * @return Schema object
        * @throws IOException
        */
       @Deprecated
    -  public static Schema readSchemaInDataFile(String dataFilePath) throws IOException {
    -    return readSchema(dataFilePath, false);
    +  public static Schema readSchemaInDataFile(String dataFilePath, Configuration conf)
    --- End diff --
   
    ok, done


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

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



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

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



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2931: [CARBONDATA-2999] support read schema from S3

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

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



---
12