[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 anubhav100 opened a pull request:

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

    [CARBONDATA-816]  Added Example for Hive Integration

    Added Example For HIve Carbon Integration
   


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

    $ git pull https://github.com/anubhav100/incubator-carbondata CARBONDATA-816

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

    https://github.com/apache/incubator-carbondata/pull/751.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 #751
   
----
commit 22777620df18b1e9d98a9ec7e15674c0e50f6334
Author: anubhav100 <[hidden email]>
Date:   2017-04-06T12:17:35Z

    added example for hive carbon integration

----


---
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
Github user anubhav100 commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/751
 
    @chenliang613 can you please have a look?


---
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/1490/



---
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/1495/



---
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 QiangCai commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/751#discussion_r110371730
 
    --- Diff: integration/hive/pom.xml ---
    @@ -95,7 +168,9 @@
                     <!-- Note config is repeated in scalatest config -->
                     <configuration>
                         <includes>
    -                        <include>**/Test*.java</include>
    --- End diff --
   
    add maven-scala-plugin, like spark2 module


---
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 QiangCai commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/751#discussion_r110371979
 
    --- Diff: integration/hive/src/main/scala/org/apache/carbondata/hiveexample/HiveExample.scala ---
    @@ -0,0 +1,146 @@
    +/*
    + * 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 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._
    +
    +    val carbon = SparkSession
    +      .builder()
    +      .master("local")
    +      .appName("HiveExample")
    +      .config("carbon.sql.warehouse.dir", warehouse).enableHiveSupport()
    +      .getOrCreateCarbonSession(
    +        "hdfs://localhost:54310/opt/carbonStore", metaStore_Db)
    +
    +    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
    +          |'carbondata' """
    +          .stripMargin)
    +
    +    carbon.sql(
    +      s"""
    +           LOAD DATA LOCAL INPATH '$rootPath/integration/hive/src/main/resources/data.csv' into
    +           table
    +         hive_carbon_example
    +           """)
    +    carbon.sql("select * from hive_carbon_example").show()
    +
    +    carbon.stop()
    +
    +    try {
    +      Class.forName(driverName)
    +    }
    +    catch {
    +      case classNotFoundException: ClassNotFoundException =>
    +        classNotFoundException.printStackTrace()
    +    }
    +
    +    val hiveEmbeddedServer2 = new HiveEmbeddedServer2()
    +    hiveEmbeddedServer2.start()
    +    val port = hiveEmbeddedServer2.getFreePort
    +    val con = DriverManager.getConnection(s"jdbc:hive2://localhost:$port/default", "", "")
    +    val stmt: Statement = con.createStatement
    +
    +    logger.info(s"============HIVE CLI IS STARTED ON PORT $port ==============")
    +
    +    stmt
    +      .execute(s"ADD JAR $rootPath/assembly/target/scala-2.11/carbondata_2.11-1.1" +
    --- End diff --
   
    check whether jar file is exists or not


---
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 QiangCai commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/751#discussion_r110371806
 
    --- Diff: integration/hive/src/main/scala/org/apache/carbondata/hiveexample/HiveExample.scala ---
    @@ -0,0 +1,146 @@
    +/*
    + * 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 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._
    +
    +    val carbon = SparkSession
    +      .builder()
    +      .master("local")
    +      .appName("HiveExample")
    +      .config("carbon.sql.warehouse.dir", warehouse).enableHiveSupport()
    +      .getOrCreateCarbonSession(
    +        "hdfs://localhost:54310/opt/carbonStore", metaStore_Db)
    --- End diff --
   
    change to use local dir


---
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_r110524192
 
    --- Diff: integration/hive/pom.xml ---
    @@ -95,7 +168,9 @@
                     <!-- Note config is repeated in scalatest config -->
                     <configuration>
                         <includes>
    -                        <include>**/Test*.java</include>
    --- End diff --
   
    changes 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_r110524207
 
    --- Diff: integration/hive/src/main/scala/org/apache/carbondata/hiveexample/HiveExample.scala ---
    @@ -0,0 +1,146 @@
    +/*
    + * 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 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._
    +
    +    val carbon = SparkSession
    +      .builder()
    +      .master("local")
    +      .appName("HiveExample")
    +      .config("carbon.sql.warehouse.dir", warehouse).enableHiveSupport()
    +      .getOrCreateCarbonSession(
    +        "hdfs://localhost:54310/opt/carbonStore", metaStore_Db)
    --- End diff --
   
    @QiangCai changes 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_r110524213
 
    --- Diff: integration/hive/src/main/scala/org/apache/carbondata/hiveexample/HiveExample.scala ---
    @@ -0,0 +1,146 @@
    +/*
    + * 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 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._
    +
    +    val carbon = SparkSession
    +      .builder()
    +      .master("local")
    +      .appName("HiveExample")
    +      .config("carbon.sql.warehouse.dir", warehouse).enableHiveSupport()
    +      .getOrCreateCarbonSession(
    +        "hdfs://localhost:54310/opt/carbonStore", metaStore_Db)
    +
    +    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
    +          |'carbondata' """
    +          .stripMargin)
    +
    +    carbon.sql(
    +      s"""
    +           LOAD DATA LOCAL INPATH '$rootPath/integration/hive/src/main/resources/data.csv' into
    +           table
    +         hive_carbon_example
    +           """)
    +    carbon.sql("select * from hive_carbon_example").show()
    +
    +    carbon.stop()
    +
    +    try {
    +      Class.forName(driverName)
    +    }
    +    catch {
    +      case classNotFoundException: ClassNotFoundException =>
    +        classNotFoundException.printStackTrace()
    +    }
    +
    +    val hiveEmbeddedServer2 = new HiveEmbeddedServer2()
    +    hiveEmbeddedServer2.start()
    +    val port = hiveEmbeddedServer2.getFreePort
    +    val con = DriverManager.getConnection(s"jdbc:hive2://localhost:$port/default", "", "")
    +    val stmt: Statement = con.createStatement
    +
    +    logger.info(s"============HIVE CLI IS STARTED ON PORT $port ==============")
    +
    +    stmt
    +      .execute(s"ADD JAR $rootPath/assembly/target/scala-2.11/carbondata_2.11-1.1" +
    --- End diff --
   
    @QiangCai  changes 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 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/1518/



---
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 @QiangCai changes done can you have a look?


---
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_r110533556
 
    --- Diff: integration/hive/src/main/scala/org/apache/carbondata/hiveexample/HiveExample.scala ---
    @@ -0,0 +1,166 @@
    +/*
    + * 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 carbonJarPath = s"$rootPath/assembly/target/scala-2.11/carbondata_2.11-1.1" +
    +                        s".0-incubating-SNAPSHOT-shade-hadoop2.7.2.jar"
    --- End diff --
   
    For hadoop version of assembly jar , please don't give the fixed version number(2.7.2), how about using 2.* ?


---
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_r110546718
 
    --- Diff: integration/hive/src/main/scala/org/apache/carbondata/hiveexample/HiveExample.scala ---
    @@ -0,0 +1,166 @@
    +/*
    + * 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 carbonJarPath = s"$rootPath/assembly/target/scala-2.11/carbondata_2.11-1.1" +
    +                        s".0-incubating-SNAPSHOT-shade-hadoop2.7.2.jar"
    --- End diff --
   
    @chenliang613  Wildcards are not supported in both hive.aux.jars.path and add jar.
   
    i solved this problem by specifying both version of hadoop
   
    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"
   
    first i tried to add jar with 2.7.2 version if it fails then i tried with hadoop 2.2.0 version
   
     try {
          stmt
            .execute(s"ADD JAR $carbonHadoopJarPath")
        }
        catch {
          case exception: Exception =>
            logger.warn(s"Jar Not Found $carbonHadoopJarPath"+"Looking For hadoop 2.2.0 version jar")
            try {
              stmt
                .execute(s"ADD JAR $carbon_DefaultHadoopVersion_JarPath")
            }
            catch {
              case exception: Exception => logger
                .error(s"Exception Occurs:Neither One of Jar is Found $carbon_DefaultHadoopVersion_JarPath,$carbonHadoopJarPath"+"Atleast One Should Be Build")
                hiveEmbeddedServer2.stop()
            }
        }


---
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/1529/



---
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
 
    @anubhav100 can you create a new project under examples and move these codes?
    examples
    ------flink
    ------spark
    ------spark2
    ------hive
    ---------your codes


---
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 cenyuhai commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/751#discussion_r110684928
 
    --- 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 --
   
    hadoop-client already contains hadoop-hdfs and hadoop-common, what hadoop version do you want?


---
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
 
    @cenyuhai  HiveExample can more to examples/ later once hive integration module be completely moved into master.


---
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 cenyuhai commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/751#discussion_r110718139
 
    --- 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 --
   
    carbondata-spark2 has already included this dependency


---
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 cenyuhai commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/751#discussion_r110718342
 
    --- 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 --
   
    it is already included in carbondata-hadoop


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