[GitHub] incubator-carbondata pull request #751: [CARBONDATA-816] Added Example for H...

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

[GitHub] incubator-carbondata pull request #751: [CARBONDATA-816] Added Example for H...

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

    https://github.com/apache/incubator-carbondata/pull/751#discussion_r110718467
 
    --- Diff: integration/hive/pom.xml ---
    @@ -64,6 +64,79 @@
                 <scope>compile</scope>
             </dependency>
             <dependency>
    +            <groupId>org.apache.spark</groupId>
    +            <artifactId>spark-network-common_2.10</artifactId>
    +            <version>2.1.0</version>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.hadoop</groupId>
    +            <artifactId>hadoop-hdfs</artifactId>
    +            <version>2.7.3</version>
    +            <exclusions>
    +                <exclusion>
    +                    <groupId>ch.qos.logback</groupId>
    +                    <artifactId>logback-classic</artifactId>
    +                </exclusion>
    +                <exclusion>
    +                    <groupId>javax.servlet</groupId>
    +                    <artifactId>servlet-api</artifactId>
    +                </exclusion>
    +            </exclusions>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.zookeeper</groupId>
    +            <artifactId>zookeeper</artifactId>
    +            <version>3.4.7</version>
    +            <exclusions>
    +                <exclusion>
    +                    <groupId>jline</groupId>
    +                    <artifactId>jline</artifactId>
    +                </exclusion>
    +            </exclusions>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.carbondata</groupId>
    +            <artifactId>carbondata-spark2</artifactId>
    +            <version>${project.version}</version>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.spark</groupId>
    +            <artifactId>spark-sql_${scala.binary.version}</artifactId>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.spark</groupId>
    +            <artifactId>spark-hive-thriftserver_${scala.binary.version}</artifactId>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.spark</groupId>
    +            <artifactId>spark-repl_${scala.binary.version}</artifactId>
    +        </dependency>
    --- End diff --
   
    it is already included in carbondata-spark2


---
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 #751: [CARBONDATA-816] Added Example for Hive Int...

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

    https://github.com/apache/incubator-carbondata/pull/751
 
    I test this example in my computer, it's very good. But I think you should remove some unnecessary dependencies.


---
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 #751: [CARBONDATA-816] Added Example for H...

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/751#discussion_r110723264
 
    --- Diff: integration/hive/src/main/scala/org/apache/carbondata/hiveexample/HiveExample.scala ---
    @@ -0,0 +1,179 @@
    +/*
    + * 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.
    + */
    +package org.apache.carbondata.hiveexample
    +
    +import java.io.File
    +import java.sql.{DriverManager, ResultSet, SQLException, Statement}
    +
    +import org.apache.spark.sql.SparkSession
    +
    +import org.apache.carbondata.common.logging.LogServiceFactory
    +import org.apache.carbondata.hive.server.HiveEmbeddedServer2
    +
    +object HiveExample {
    +
    +  private val driverName: String = "org.apache.hive.jdbc.HiveDriver"
    +
    +  /**
    +   * @param args
    +   * @throws SQLException
    +   */
    +  @throws[SQLException]
    +  def main(args: Array[String]) {
    +    val rootPath = new File(this.getClass.getResource("/").getPath
    +                            + "../../../..").getCanonicalPath
    +    val store = s"$rootPath/integration/hive/target/store"
    +    val warehouse = s"$rootPath/integration/hive/target/warehouse"
    +    val metaStore_Db = s"$rootPath/integration/hive/target/carbon_metaStore_db"
    +    val logger = LogServiceFactory.getLogService(this.getClass.getCanonicalName)
    +
    +    import org.apache.spark.sql.CarbonSession._
    +
    +    System.setProperty("hadoop.home.dir", "/")
    +
    +    val carbon = SparkSession
    +      .builder()
    +      .master("local")
    +      .appName("HiveExample")
    +      .config("carbon.sql.warehouse.dir", warehouse).enableHiveSupport()
    +      .getOrCreateCarbonSession(
    +        store, metaStore_Db)
    +
    +    val carbonHadoopJarPath = s"$rootPath/assembly/target/scala-2.11/carbondata_2.11-1.1" +
    +                              ".0-incubating-SNAPSHOT-shade-hadoop2.7.2.jar"
    +
    +    val carbon_DefaultHadoopVersion_JarPath =
    +      s"$rootPath/assembly/target/scala-2.11/carbondata_2.11-1.1" +
    +      ".0-incubating-SNAPSHOT-shade-hadoop2.2.0.jar"
    +
    +    val hiveJarPath = s"$rootPath/integration/hive/target/carbondata-hive-1.1" +
    +                      ".0-incubating-SNAPSHOT.jar"
    +
    +    carbon.sql("""drop table if exists hive_carbon_example""".stripMargin)
    +
    +    carbon
    +      .sql(
    +        """create table hive_carbon_example (id int,name string,salary double) stored by
    --- End diff --
   
    Please use uppercase for DDL and DML key words.


---
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 #751: [CARBONDATA-816] Added Example for Hive Int...

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

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



---
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 #751: [CARBONDATA-816] Added Example for H...

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

    https://github.com/apache/incubator-carbondata/pull/751#discussion_r110814192
 
    --- Diff: integration/hive/src/main/scala/org/apache/carbondata/hiveexample/HiveExample.scala ---
    @@ -0,0 +1,179 @@
    +/*
    + * 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.
    + */
    +package org.apache.carbondata.hiveexample
    +
    +import java.io.File
    +import java.sql.{DriverManager, ResultSet, SQLException, Statement}
    +
    +import org.apache.spark.sql.SparkSession
    +
    +import org.apache.carbondata.common.logging.LogServiceFactory
    +import org.apache.carbondata.hive.server.HiveEmbeddedServer2
    +
    +object HiveExample {
    +
    +  private val driverName: String = "org.apache.hive.jdbc.HiveDriver"
    +
    +  /**
    +   * @param args
    +   * @throws SQLException
    +   */
    +  @throws[SQLException]
    +  def main(args: Array[String]) {
    +    val rootPath = new File(this.getClass.getResource("/").getPath
    +                            + "../../../..").getCanonicalPath
    +    val store = s"$rootPath/integration/hive/target/store"
    +    val warehouse = s"$rootPath/integration/hive/target/warehouse"
    +    val metaStore_Db = s"$rootPath/integration/hive/target/carbon_metaStore_db"
    +    val logger = LogServiceFactory.getLogService(this.getClass.getCanonicalName)
    +
    +    import org.apache.spark.sql.CarbonSession._
    +
    +    System.setProperty("hadoop.home.dir", "/")
    +
    +    val carbon = SparkSession
    +      .builder()
    +      .master("local")
    +      .appName("HiveExample")
    +      .config("carbon.sql.warehouse.dir", warehouse).enableHiveSupport()
    +      .getOrCreateCarbonSession(
    +        store, metaStore_Db)
    +
    +    val carbonHadoopJarPath = s"$rootPath/assembly/target/scala-2.11/carbondata_2.11-1.1" +
    +                              ".0-incubating-SNAPSHOT-shade-hadoop2.7.2.jar"
    +
    +    val carbon_DefaultHadoopVersion_JarPath =
    +      s"$rootPath/assembly/target/scala-2.11/carbondata_2.11-1.1" +
    +      ".0-incubating-SNAPSHOT-shade-hadoop2.2.0.jar"
    +
    +    val hiveJarPath = s"$rootPath/integration/hive/target/carbondata-hive-1.1" +
    +                      ".0-incubating-SNAPSHOT.jar"
    +
    +    carbon.sql("""drop table if exists hive_carbon_example""".stripMargin)
    +
    +    carbon
    +      .sql(
    +        """create table hive_carbon_example (id int,name string,salary double) stored by
    --- End diff --
   
    @chenliang613 resolved


---
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 #751: [CARBONDATA-816] Added Example for H...

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

    https://github.com/apache/incubator-carbondata/pull/751#discussion_r110814224
 
    --- Diff: integration/hive/pom.xml ---
    @@ -64,6 +64,79 @@
                 <scope>compile</scope>
             </dependency>
             <dependency>
    +            <groupId>org.apache.spark</groupId>
    +            <artifactId>spark-network-common_2.10</artifactId>
    +            <version>2.1.0</version>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.hadoop</groupId>
    +            <artifactId>hadoop-hdfs</artifactId>
    +            <version>2.7.3</version>
    +            <exclusions>
    +                <exclusion>
    +                    <groupId>ch.qos.logback</groupId>
    +                    <artifactId>logback-classic</artifactId>
    +                </exclusion>
    +                <exclusion>
    +                    <groupId>javax.servlet</groupId>
    +                    <artifactId>servlet-api</artifactId>
    +                </exclusion>
    +            </exclusions>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.zookeeper</groupId>
    +            <artifactId>zookeeper</artifactId>
    +            <version>3.4.7</version>
    +            <exclusions>
    +                <exclusion>
    +                    <groupId>jline</groupId>
    +                    <artifactId>jline</artifactId>
    +                </exclusion>
    +            </exclusions>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.carbondata</groupId>
    +            <artifactId>carbondata-spark2</artifactId>
    +            <version>${project.version}</version>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.spark</groupId>
    +            <artifactId>spark-sql_${scala.binary.version}</artifactId>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.spark</groupId>
    +            <artifactId>spark-hive-thriftserver_${scala.binary.version}</artifactId>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.spark</groupId>
    +            <artifactId>spark-repl_${scala.binary.version}</artifactId>
    +        </dependency>
    --- End diff --
   
    @cenyuhai resolved comments


---
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 #751: [CARBONDATA-816] Added Example for Hive Int...

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

    https://github.com/apache/incubator-carbondata/pull/751
 
    @cenyuhai @chenliang613 i resolved all the comments can please have a look?can it be merged?


---
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 #751: [CARBONDATA-816] Added Example for Hive Int...

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

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



---
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 #751: [CARBONDATA-816] Added Example for H...

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

    https://github.com/apache/incubator-carbondata/pull/751#discussion_r110853283
 
    --- Diff: integration/hive/pom.xml ---
    @@ -64,6 +64,79 @@
                 <scope>compile</scope>
             </dependency>
             <dependency>
    +            <groupId>org.apache.spark</groupId>
    +            <artifactId>spark-network-common_2.10</artifactId>
    +            <version>2.1.0</version>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.hadoop</groupId>
    +            <artifactId>hadoop-hdfs</artifactId>
    +            <version>2.7.3</version>
    +            <exclusions>
    +                <exclusion>
    +                    <groupId>ch.qos.logback</groupId>
    +                    <artifactId>logback-classic</artifactId>
    +                </exclusion>
    +                <exclusion>
    +                    <groupId>javax.servlet</groupId>
    +                    <artifactId>servlet-api</artifactId>
    +                </exclusion>
    +            </exclusions>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.zookeeper</groupId>
    +            <artifactId>zookeeper</artifactId>
    +            <version>3.4.7</version>
    +            <exclusions>
    +                <exclusion>
    +                    <groupId>jline</groupId>
    +                    <artifactId>jline</artifactId>
    +                </exclusion>
    +            </exclusions>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.carbondata</groupId>
    +            <artifactId>carbondata-spark2</artifactId>
    +            <version>${project.version}</version>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.spark</groupId>
    +            <artifactId>spark-sql_${scala.binary.version}</artifactId>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.spark</groupId>
    +            <artifactId>spark-hive-thriftserver_${scala.binary.version}</artifactId>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.spark</groupId>
    +            <artifactId>spark-repl_${scala.binary.version}</artifactId>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.hadoop</groupId>
    +            <artifactId>hadoop-common</artifactId>
    +            <version>2.7.3</version>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.httpcomponents</groupId>
    +            <artifactId>httpclient</artifactId>
    +            <version>4.3.4</version>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.httpcomponents</groupId>
    +            <artifactId>httpcore</artifactId>
    +            <version>4.3-alpha1</version>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.hadoop</groupId>
    --- End diff --
   
    done


---
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 #751: [CARBONDATA-816] Added Example for H...

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

    https://github.com/apache/incubator-carbondata/pull/751#discussion_r110853360
 
    --- Diff: integration/hive/pom.xml ---
    @@ -64,6 +64,79 @@
                 <scope>compile</scope>
             </dependency>
             <dependency>
    +            <groupId>org.apache.spark</groupId>
    +            <artifactId>spark-network-common_2.10</artifactId>
    +            <version>2.1.0</version>
    --- End diff --
   
    resolved


---
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 #751: [CARBONDATA-816] Added Example for H...

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

    https://github.com/apache/incubator-carbondata/pull/751#discussion_r110853402
 
    --- Diff: integration/hive/pom.xml ---
    @@ -64,6 +64,79 @@
                 <scope>compile</scope>
             </dependency>
             <dependency>
    +            <groupId>org.apache.spark</groupId>
    +            <artifactId>spark-network-common_2.10</artifactId>
    +            <version>2.1.0</version>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.apache.hadoop</groupId>
    +            <artifactId>hadoop-hdfs</artifactId>
    +            <version>2.7.3</version>
    --- End diff --
   
    resolved


---
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 #751: [CARBONDATA-816] Added Example for Hive Int...

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

    https://github.com/apache/incubator-carbondata/pull/751
 
    @anubhav100  everything looks good, can you squash all commits into one commit.
   
    When ending the HiveExample, the application can't be automatically stopped, we must to manually stop it:
    <img width="711" alt="2017-04-12 01 20 06" src="https://cloud.githubusercontent.com/assets/8075709/24927980/69846f54-1f1e-11e7-8e3a-b9a64dbec034.png">
   



---
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 #751: [CARBONDATA-816] Added Example for Hive Int...

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

    https://github.com/apache/incubator-carbondata/pull/751
 
    @chenliang613 i added the code for stoping application automatically ,tested it on my system and rebased all commits into one commit can it be merged?


---
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 #751: [CARBONDATA-816] Added Example for Hive Int...

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

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



---
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 #751: [CARBONDATA-816] Added Example for Hive Int...

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

    https://github.com/apache/incubator-carbondata/pull/751
 
    @anubhav100  Thanks for your good contribution.
   
    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 #751: [CARBONDATA-816] Added Example for H...

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

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


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