GitHub user ravipesala opened a pull request:
https://github.com/apache/incubator-carbondata/pull/474 [CARBONDATA-574] Added thrift server support to Spark 2.0 integration Added thrift server support to Spark 2.0 integration You can merge this pull request into a Git repository by running: $ git pull https://github.com/ravipesala/incubator-carbondata thriftserver Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-carbondata/pull/474.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 #474 ---- commit 7918e4649a3aebb36501170bb53125ceab9b9e0b Author: ravipesala <[hidden email]> Date: 2016-12-28T04:26:48Z Added thrift server support to Spark 2.0 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. --- |
Github user CarbonDataQA commented on the issue:
https://github.com/apache/incubator-carbondata/pull/474 Build Success with Spark 1.5.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/349/ --- 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. --- |
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/474#discussion_r93998269 --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/thriftserver/CarbonThriftServer.scala --- @@ -0,0 +1,64 @@ +/* + * 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.spark.thriftserver + +import org.apache.spark.SparkConf +import org.apache.spark.sql.SparkSession +import org.apache.spark.sql.hive.thriftserver.HiveThriftServer2 + +import org.apache.carbondata.common.logging.LogServiceFactory +import org.apache.carbondata.core.util.CarbonProperties + +object CarbonThriftServer { + + def main(args: Array[String]): Unit = { + + import org.apache.spark.sql.CarbonSession._ + + val sparkConf = new SparkConf(loadDefaults = true) + val builder = SparkSession + .builder() + .config(sparkConf) + .appName("Carbon Thrift Server") --- End diff -- suggest changing appName to : "Carbon Thrift Server for Spark2.x" to distinguish with Spark1.x --- 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. --- |
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/474#discussion_r93999754 --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/thriftserver/CarbonThriftServer.scala --- @@ -0,0 +1,64 @@ +/* + * 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.spark.thriftserver + +import org.apache.spark.SparkConf +import org.apache.spark.sql.SparkSession +import org.apache.spark.sql.hive.thriftserver.HiveThriftServer2 + +import org.apache.carbondata.common.logging.LogServiceFactory +import org.apache.carbondata.core.util.CarbonProperties + +object CarbonThriftServer { + + def main(args: Array[String]): Unit = { + + import org.apache.spark.sql.CarbonSession._ + + val sparkConf = new SparkConf(loadDefaults = true) + val builder = SparkSession + .builder() + .config(sparkConf) + .appName("Carbon Thrift Server") --- End diff -- I think it should better be "ThriftServer based on CarbonSession" --- 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. --- |
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/474#discussion_r93999814 --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/thriftserver/CarbonThriftServer.scala --- @@ -0,0 +1,64 @@ +/* + * 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.spark.thriftserver + +import org.apache.spark.SparkConf +import org.apache.spark.sql.SparkSession +import org.apache.spark.sql.hive.thriftserver.HiveThriftServer2 + +import org.apache.carbondata.common.logging.LogServiceFactory +import org.apache.carbondata.core.util.CarbonProperties + +object CarbonThriftServer { + + def main(args: Array[String]): Unit = { + + import org.apache.spark.sql.CarbonSession._ + + val sparkConf = new SparkConf(loadDefaults = true) + val builder = SparkSession + .builder() + .config(sparkConf) + .appName("Carbon Thrift Server") + .enableHiveSupport() + + val sparkHome = System.getenv.get("SPARK_HOME") + if (null != sparkHome) { + builder.config("carbon.properties.filepath", + sparkHome + '/' + "conf" + '/' + "carbon.properties") + System.setProperty("carbon.properties.filepath", + sparkHome + '/' + "conf" + '/' + "carbon.properties") + } + CarbonProperties.getInstance().addProperty("carbon.storelocation", args.head) + + val spark = builder.getOrCreateCarbonSession() + val warmUpTime = CarbonProperties.getInstance().getProperty("carbon.spark.warmUpTime", "5000") + try { + Thread.sleep(Integer.parseInt(warmUpTime)) + } catch { + case e: Exception => + val LOG = LogServiceFactory.getLogService(this.getClass.getCanonicalName) + LOG.error(s"Wrong value for carbon.spark.warmUpTime $warmUpTime " + + "Using default Value and proceeding") + Thread.sleep(30000) --- End diff -- default value is 5000, right? --- 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. --- |
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/474#discussion_r94000027 --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/thriftserver/CarbonThriftServer.scala --- @@ -0,0 +1,64 @@ +/* + * 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.spark.thriftserver + +import org.apache.spark.SparkConf +import org.apache.spark.sql.SparkSession +import org.apache.spark.sql.hive.thriftserver.HiveThriftServer2 + +import org.apache.carbondata.common.logging.LogServiceFactory +import org.apache.carbondata.core.util.CarbonProperties + +object CarbonThriftServer { + + def main(args: Array[String]): Unit = { + + import org.apache.spark.sql.CarbonSession._ + + val sparkConf = new SparkConf(loadDefaults = true) + val builder = SparkSession + .builder() + .config(sparkConf) + .appName("Carbon Thrift Server") + .enableHiveSupport() + + val sparkHome = System.getenv.get("SPARK_HOME") + if (null != sparkHome) { + builder.config("carbon.properties.filepath", --- End diff -- In this case, carbon property must be put in SPARK_HOME/conf folder, can user give the path by spark.driver.extraJavaOptions in spark-default.conf? --- 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. --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/474#discussion_r94018328 --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/thriftserver/CarbonThriftServer.scala --- @@ -0,0 +1,64 @@ +/* + * 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.spark.thriftserver + +import org.apache.spark.SparkConf +import org.apache.spark.sql.SparkSession +import org.apache.spark.sql.hive.thriftserver.HiveThriftServer2 + +import org.apache.carbondata.common.logging.LogServiceFactory +import org.apache.carbondata.core.util.CarbonProperties + +object CarbonThriftServer { + + def main(args: Array[String]): Unit = { + + import org.apache.spark.sql.CarbonSession._ + + val sparkConf = new SparkConf(loadDefaults = true) + val builder = SparkSession + .builder() + .config(sparkConf) + .appName("Carbon Thrift Server") + .enableHiveSupport() + + val sparkHome = System.getenv.get("SPARK_HOME") + if (null != sparkHome) { + builder.config("carbon.properties.filepath", --- End diff -- No, it seems hard coded now, It is as per the old thrift server and any changes here require to change another thrift server as well to keep in sync. --- 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. --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/474#discussion_r94018353 --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/thriftserver/CarbonThriftServer.scala --- @@ -0,0 +1,64 @@ +/* + * 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.spark.thriftserver + +import org.apache.spark.SparkConf +import org.apache.spark.sql.SparkSession +import org.apache.spark.sql.hive.thriftserver.HiveThriftServer2 + +import org.apache.carbondata.common.logging.LogServiceFactory +import org.apache.carbondata.core.util.CarbonProperties + +object CarbonThriftServer { + + def main(args: Array[String]): Unit = { + + import org.apache.spark.sql.CarbonSession._ + + val sparkConf = new SparkConf(loadDefaults = true) + val builder = SparkSession + .builder() + .config(sparkConf) + .appName("Carbon Thrift Server") + .enableHiveSupport() + + val sparkHome = System.getenv.get("SPARK_HOME") + if (null != sparkHome) { + builder.config("carbon.properties.filepath", + sparkHome + '/' + "conf" + '/' + "carbon.properties") + System.setProperty("carbon.properties.filepath", + sparkHome + '/' + "conf" + '/' + "carbon.properties") + } + CarbonProperties.getInstance().addProperty("carbon.storelocation", args.head) + + val spark = builder.getOrCreateCarbonSession() + val warmUpTime = CarbonProperties.getInstance().getProperty("carbon.spark.warmUpTime", "5000") + try { + Thread.sleep(Integer.parseInt(warmUpTime)) + } catch { + case e: Exception => + val LOG = LogServiceFactory.getLogService(this.getClass.getCanonicalName) + LOG.error(s"Wrong value for carbon.spark.warmUpTime $warmUpTime " + + "Using default Value and proceeding") + Thread.sleep(30000) --- 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. --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/474#discussion_r94018369 --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/thriftserver/CarbonThriftServer.scala --- @@ -0,0 +1,64 @@ +/* + * 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.spark.thriftserver + +import org.apache.spark.SparkConf +import org.apache.spark.sql.SparkSession +import org.apache.spark.sql.hive.thriftserver.HiveThriftServer2 + +import org.apache.carbondata.common.logging.LogServiceFactory +import org.apache.carbondata.core.util.CarbonProperties + +object CarbonThriftServer { + + def main(args: Array[String]): Unit = { + + import org.apache.spark.sql.CarbonSession._ + + val sparkConf = new SparkConf(loadDefaults = true) + val builder = SparkSession + .builder() + .config(sparkConf) + .appName("Carbon Thrift Server") --- 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. --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/incubator-carbondata/pull/474 Build Success with Spark 1.5.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/357/ --- 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. --- |
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/474#discussion_r94023508 --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/thriftserver/CarbonThriftServer.scala --- @@ -0,0 +1,64 @@ +/* + * 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.spark.thriftserver + +import org.apache.spark.SparkConf +import org.apache.spark.sql.SparkSession +import org.apache.spark.sql.hive.thriftserver.HiveThriftServer2 + +import org.apache.carbondata.common.logging.LogServiceFactory +import org.apache.carbondata.core.util.CarbonProperties + +object CarbonThriftServer { + + def main(args: Array[String]): Unit = { + + import org.apache.spark.sql.CarbonSession._ + + val sparkConf = new SparkConf(loadDefaults = true) + val builder = SparkSession + .builder() + .config(sparkConf) + .appName("Carbon Thrift Server") + .enableHiveSupport() + + val sparkHome = System.getenv.get("SPARK_HOME") + if (null != sparkHome) { + builder.config("carbon.properties.filepath", --- 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. --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on the issue:
https://github.com/apache/incubator-carbondata/pull/474 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. --- |
In reply to this post by qiuchenjian-2
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-carbondata/pull/474 --- 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. --- |
Free forum by Nabble | Edit this page |