[GitHub] carbondata pull request #2337: [CARBONDATA-2519] Add document for CarbonRead...

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

[GitHub] carbondata pull request #2337: [CARBONDATA-2519] Add document for CarbonRead...

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

    https://github.com/apache/carbondata/pull/2337#discussion_r190826231
 
    --- Diff: docs/sdk-guide.md ---
    @@ -398,3 +399,160 @@ Reference : [list of carbon properties](http://carbondata.apache.org/configurati
     */
     public static org.apache.carbondata.sdk.file.Schema getCarbonSchemaFromAvroSchema(String avroSchemaString);
     ```
    +# SDK Reader
    +This SDK reader reads CarbonData file and carbonindex file at a given path.
    +External client can make use of this reader to read CarbonData files without CarbonSession.
    +## Quick example
    +```
    +    // 1. Create carbon reader
    +    String path = "./testWriteFiles";
    +    CarbonReader reader = CarbonReader
    +        .builder(path, "_temp")
    +        .projection(new String[]{"name", "age"})
    +        .build();
    +
    +    // 2. Read data
    +    int i = 0;
    +    while (reader.hasNext()) {
    +      Object[] row = (Object[]) reader.readNextRow();
    +      System.out.println(row[0] + "\t" + row[1]);
    +      i++;
    +    }
    +    
    +    // 3. Close this reader
    +    reader.close();
    +```
    +
    +Find example code at [CarbonReaderExample](https://github.com/apache/carbondata/blob/master/examples/spark2/src/main/java/org/apache/carbondata/examples/sdk/CarbonReaderExample.java) in the CarbonData repo.
    +
    +## API List
    +
    +### org.apache.carbondata.sdk.file.CarbonReader
    --- End diff --
   
    ok, added


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

[GitHub] carbondata issue #2337: [CARBONDATA-2519] Add document for CarbonReader

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

    https://github.com/apache/carbondata/pull/2337
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6102/



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

[GitHub] carbondata issue #2337: [CARBONDATA-2519] Add document for CarbonReader

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

    https://github.com/apache/carbondata/pull/2337
 
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/4940/



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

[GitHub] carbondata issue #2337: [CARBONDATA-2519] Add document for CarbonReader

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

    https://github.com/apache/carbondata/pull/2337
 
    @ajantha-bhat CI pass, please review it


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

[GitHub] carbondata pull request #2337: [CARBONDATA-2519] Add document for CarbonRead...

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

    https://github.com/apache/carbondata/pull/2337#discussion_r190850065
 
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReaderBuilder.java ---
    @@ -50,26 +50,50 @@
       private String tableName;
       private boolean isTransactionalTable = true;
     
    +  /**
    +   * Construct a CarbonReaderBuilder with table path and table name
    +   *
    +   * @param tablePath table path
    +   * @param tableName table name
    +   */
       CarbonReaderBuilder(String tablePath, String tableName) {
         this.tablePath = tablePath;
         this.tableName = tableName;
       }
     
    +  /**
    +   * Configure the projection column names of carbon reader
    +   *
    +   * @param projectionColumnNames projection column names
    +   * @return CarbonReaderBuilder
    +   */
       public CarbonReaderBuilder projection(String[] projectionColumnNames) {
         Objects.requireNonNull(projectionColumnNames);
         this.projectionColumns = projectionColumnNames;
         return this;
       }
     
    +  /**
    +   * Configure the transactional status of table
    +   *
    +   * @param isTransactionalTable whether is transactional table or not
    --- End diff --
   
    update the default value and mention that if false, read from flat folder.
   
    Else user will not know what is this API for.


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

[GitHub] carbondata issue #2337: [CARBONDATA-2519] Add document for CarbonReader

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

    https://github.com/apache/carbondata/pull/2337
 
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5096/



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

[GitHub] carbondata pull request #2337: [CARBONDATA-2519] Add document for CarbonRead...

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/2337#discussion_r191036327
 
    --- Diff: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReaderBuilder.java ---
    @@ -50,26 +50,50 @@
       private String tableName;
       private boolean isTransactionalTable = true;
     
    +  /**
    +   * Construct a CarbonReaderBuilder with table path and table name
    +   *
    +   * @param tablePath table path
    +   * @param tableName table name
    +   */
       CarbonReaderBuilder(String tablePath, String tableName) {
         this.tablePath = tablePath;
         this.tableName = tableName;
       }
     
    +  /**
    +   * Configure the projection column names of carbon reader
    +   *
    +   * @param projectionColumnNames projection column names
    +   * @return CarbonReaderBuilder
    +   */
       public CarbonReaderBuilder projection(String[] projectionColumnNames) {
         Objects.requireNonNull(projectionColumnNames);
         this.projectionColumns = projectionColumnNames;
         return this;
       }
     
    +  /**
    +   * Configure the transactional status of table
    +   *
    +   * @param isTransactionalTable whether is transactional table or not
    --- End diff --
   
    ok, Done


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

[GitHub] carbondata issue #2337: [CARBONDATA-2519] Add document for CarbonReader

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

    https://github.com/apache/carbondata/pull/2337
 
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5102/



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

[GitHub] carbondata issue #2337: [CARBONDATA-2519] Add document for CarbonReader

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

    https://github.com/apache/carbondata/pull/2337
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6108/



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

[GitHub] carbondata issue #2337: [CARBONDATA-2519] Add document for CarbonReader

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

    https://github.com/apache/carbondata/pull/2337
 
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/4946/



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

[GitHub] carbondata issue #2337: [CARBONDATA-2519] Add document for CarbonReader

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

    https://github.com/apache/carbondata/pull/2337
 
    @ajantha-bhat CI pass, pease check


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

[GitHub] carbondata issue #2337: [CARBONDATA-2519] Add document for CarbonReader

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

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


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

[GitHub] carbondata issue #2337: [CARBONDATA-2519] Add document for CarbonReader

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

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


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

[GitHub] carbondata pull request #2337: [CARBONDATA-2519] Add document for CarbonRead...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user asfgit closed the pull request at:

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


---
12