[GitHub] incubator-carbondata pull request #504: [CARBONDATA-606] Add Flink example t...

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

[GitHub] incubator-carbondata pull request #504: [CARBONDATA-606] Add Flink example t...

qiuchenjian-2
GitHub user jackylk opened a pull request:

    https://github.com/apache/incubator-carbondata/pull/504

    [CARBONDATA-606] Add Flink example to read CarbonData files

    A new example module is added for Flink. The example is to show how to use Flink to read CarbonData files written by Spark

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

    $ git pull https://github.com/jackylk/incubator-carbondata ff

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

    https://github.com/apache/incubator-carbondata/pull/504.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 #504
   
----
commit b8e047ddfbbbcdd2b4464556b7dd1af7550acd84
Author: jackylk <[hidden email]>
Date:   2017-01-07T16:13:06Z

    add Flink example

----


---
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.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #504: [CARBONDATA-606] Add Flink example to read ...

qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/504
 
    Build Success with Spark 1.5.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/497/



---
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.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #504: [CARBONDATA-606] Add Flink example t...

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

    https://github.com/apache/incubator-carbondata/pull/504#discussion_r95092470
 
    --- Diff: examples/flink/pom.xml ---
    @@ -0,0 +1,76 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!--
    +    Licensed to the Apache Software Foundation (ASF) under one or more
    +    contributor license agreements.  See the NOTICE file distributed with
    +    this work for additional information regarding copyright ownership.
    +    The ASF licenses this file to You under the Apache License, Version 2.0
    +    (the "License"); you may not use this file except in compliance with
    +    the License.  You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing, software
    +    distributed under the License is distributed on an "AS IS" BASIS,
    +    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +    See the License for the specific language governing permissions and
    +    limitations under the License.
    +-->
    +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    +
    +  <modelVersion>4.0.0</modelVersion>
    +
    +  <parent>
    +    <groupId>org.apache.carbondata</groupId>
    +    <artifactId>carbondata-parent</artifactId>
    +    <version>1.0.0-incubating-SNAPSHOT</version>
    +    <relativePath>../../pom.xml</relativePath>
    +  </parent>
    +
    +  <artifactId>carbondata-examples-flink</artifactId>
    +  <name>Apache CarbonData :: Flink Examples</name>
    +
    +  <properties>
    +    <dev.path>${basedir}/../../dev</dev.path>
    +  </properties>
    +
    +  <dependencies>
    +    <dependency>
    +      <groupId>org.apache.flink</groupId>
    +      <artifactId>flink-java</artifactId>
    +      <version>${flink.version}</version>
    +    </dependency>
    +    <dependency>
    +      <groupId>org.apache.flink</groupId>
    +      <artifactId>flink-clients_${scala.binary.version}</artifactId>
    +      <version>${flink.version}</version>
    +    </dependency>
    +    <dependency>
    +      <groupId>org.apache.carbondata</groupId>
    +      <artifactId>carbondata-hadoop</artifactId>
    +      <version>${project.version}</version>
    +    </dependency>
    +    <dependency>
    +      <groupId>org.apache.carbondata</groupId>
    +      <artifactId>carbondata-spark</artifactId>
    +      <version>${project.version}</version>
    +    </dependency>
    +    <dependency>
    +      <groupId>org.apache.carbondata</groupId>
    +      <artifactId>carbondata-examples-spark</artifactId>
    +      <version>${project.version}</version>
    +    </dependency>
    +  </dependencies>
    +
    +  <build>
    +    <plugins>
    --- End diff --
   
    Please add the "source code directory" definition:
    <sourceDirectory>src/main/scala</sourceDirectory>


---
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.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #504: [CARBONDATA-606] Add Flink example t...

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

    https://github.com/apache/incubator-carbondata/pull/504#discussion_r95092523
 
    --- Diff: examples/spark/src/main/scala/org/apache/carbondata/examples/util/ExampleUtils.scala ---
    @@ -81,15 +85,6 @@ object ExampleUtils {
             .map(x => ("a", "b", x))
             .toDF("c1", "c2", "c3")
     
    -    // save dataframe to carbon file:(df->csv->carbon file)
    -    df.write
    -        .format("carbondata")
    -        .option("tableName", tableName)
    -        .option("compress", "true")
    --- End diff --
   
    Why delete this part :  from dataframe to csv to carbonfile?


---
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.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #504: [CARBONDATA-606] Add Flink example t...

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

    https://github.com/apache/incubator-carbondata/pull/504#discussion_r95092537
 
    --- Diff: pom.xml ---
    @@ -347,6 +347,16 @@
           </modules>
         </profile>
         <profile>
    +      <id>flink</id>
    +      <properties>
    +        <flink.version>1.1.3</flink.version>
    --- End diff --
   
    The latest flink version is 1.1.4


---
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.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #504: [CARBONDATA-606] Add Flink example t...

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

    https://github.com/apache/incubator-carbondata/pull/504#discussion_r95092681
 
    --- Diff: examples/spark/src/main/scala/org/apache/carbondata/examples/DatasourceExample.scala ---
    @@ -37,5 +37,8 @@ object DatasourceExample {
             | OPTIONS (path '${cc.storePath}/default/table1')
           """.stripMargin)
         sqlContext.sql("SELECT c1, c2, count(*) FROM source WHERE c3 > 100 GROUP BY c1, c2").show
    +
    +    // delete carbondata file
    +    ExampleUtils.cleanSampleCarbonFile(cc, "table1")
    --- End diff --
   
    all examples are using the below command to delete carbondata files, suggest adding consistent:
    cc.sql("DROP TABLE IF EXISTS tablename")


---
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.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #504: [CARBONDATA-606] Add Flink example t...

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

    https://github.com/apache/incubator-carbondata/pull/504#discussion_r95095010
 
    --- Diff: examples/spark/src/main/scala/org/apache/carbondata/examples/util/ExampleUtils.scala ---
    @@ -81,15 +85,6 @@ object ExampleUtils {
             .map(x => ("a", "b", x))
             .toDF("c1", "c2", "c3")
     
    -    // save dataframe to carbon file:(df->csv->carbon file)
    -    df.write
    -        .format("carbondata")
    -        .option("tableName", tableName)
    -        .option("compress", "true")
    --- End diff --
   
    This function is supposed to write only once. It is also used in `appendSampleCarbonFile`, if this function writes twice, it is wrong.


---
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.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #504: [CARBONDATA-606] Add Flink example t...

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

    https://github.com/apache/incubator-carbondata/pull/504#discussion_r95095179
 
    --- Diff: pom.xml ---
    @@ -347,6 +347,16 @@
           </modules>
         </profile>
         <profile>
    +      <id>flink</id>
    +      <properties>
    +        <flink.version>1.1.3</flink.version>
    --- End diff --
   
    ok


---
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.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #504: [CARBONDATA-606] Add Flink example t...

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

    https://github.com/apache/incubator-carbondata/pull/504#discussion_r95095272
 
    --- Diff: examples/spark/src/main/scala/org/apache/carbondata/examples/DatasourceExample.scala ---
    @@ -37,5 +37,8 @@ object DatasourceExample {
             | OPTIONS (path '${cc.storePath}/default/table1')
           """.stripMargin)
         sqlContext.sql("SELECT c1, c2, count(*) FROM source WHERE c3 > 100 GROUP BY c1, c2").show
    +
    +    // delete carbondata file
    +    ExampleUtils.cleanSampleCarbonFile(cc, "table1")
    --- End diff --
   
    Because this table is created by ExampleUtils, so it is more reasonable ExampleUtils expose function to delete it instead of the caller does


---
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.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #504: [CARBONDATA-606] Add Flink example t...

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

    https://github.com/apache/incubator-carbondata/pull/504#discussion_r95095323
 
    --- Diff: examples/flink/pom.xml ---
    @@ -0,0 +1,76 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!--
    +    Licensed to the Apache Software Foundation (ASF) under one or more
    +    contributor license agreements.  See the NOTICE file distributed with
    +    this work for additional information regarding copyright ownership.
    +    The ASF licenses this file to You under the Apache License, Version 2.0
    +    (the "License"); you may not use this file except in compliance with
    +    the License.  You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing, software
    +    distributed under the License is distributed on an "AS IS" BASIS,
    +    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +    See the License for the specific language governing permissions and
    +    limitations under the License.
    +-->
    +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    +
    +  <modelVersion>4.0.0</modelVersion>
    +
    +  <parent>
    +    <groupId>org.apache.carbondata</groupId>
    +    <artifactId>carbondata-parent</artifactId>
    +    <version>1.0.0-incubating-SNAPSHOT</version>
    +    <relativePath>../../pom.xml</relativePath>
    +  </parent>
    +
    +  <artifactId>carbondata-examples-flink</artifactId>
    +  <name>Apache CarbonData :: Flink Examples</name>
    +
    +  <properties>
    +    <dev.path>${basedir}/../../dev</dev.path>
    +  </properties>
    +
    +  <dependencies>
    +    <dependency>
    +      <groupId>org.apache.flink</groupId>
    +      <artifactId>flink-java</artifactId>
    +      <version>${flink.version}</version>
    +    </dependency>
    +    <dependency>
    +      <groupId>org.apache.flink</groupId>
    +      <artifactId>flink-clients_${scala.binary.version}</artifactId>
    +      <version>${flink.version}</version>
    +    </dependency>
    +    <dependency>
    +      <groupId>org.apache.carbondata</groupId>
    +      <artifactId>carbondata-hadoop</artifactId>
    +      <version>${project.version}</version>
    +    </dependency>
    +    <dependency>
    +      <groupId>org.apache.carbondata</groupId>
    +      <artifactId>carbondata-spark</artifactId>
    +      <version>${project.version}</version>
    +    </dependency>
    +    <dependency>
    +      <groupId>org.apache.carbondata</groupId>
    +      <artifactId>carbondata-examples-spark</artifactId>
    +      <version>${project.version}</version>
    +    </dependency>
    +  </dependencies>
    +
    +  <build>
    +    <plugins>
    --- End diff --
   
    ok


---
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.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #504: [CARBONDATA-606] Add Flink example to read ...

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

    https://github.com/apache/incubator-carbondata/pull/504
 
    Build Success with Spark 1.5.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/512/



---
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.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #504: [CARBONDATA-606] Add Flink example to read ...

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

    https://github.com/apache/incubator-carbondata/pull/504
 
    LGTM


---
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.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #504: [CARBONDATA-606] Add Flink example t...

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

    https://github.com/apache/incubator-carbondata/pull/504


---
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.
---