spark running thrift server
1 启动 thrift server
cd $SPARK_HOME/
sh sbin/start-thriftserver.sh --hiveconf hive.server2.thrift.port=10000 --hiveconf hive.server2.thrift.bind.host=yf-hive01 --master spark://testnode:7077 --driver-class-path /home/test/hadoop/spark-1.2.0-bin-1.0.3/lib/mysql-connector-java-5.1.32-bin.jar --executor-memory 10g
其实也也可以直接 sh sbin/start-thriftserver.sh 默认端口10000
或直接配置一个端口号
sh sbin/start-thriftserver.sh --hiveconf hive.server2.thrift.port=8000
2 JDBC 连接
Class.forName("org.apache.hive.jdbc.HiveDriver").newInstance(); Connection conn = DriverManager.getConnection(url, name, pwd); Statement stat = con.createStatement(); stat.executeQuery("select * from test");
需引入包
<dependency> <groupId>org.spark-project.hive</groupId> <artifactId>hive-exec</artifactId> </dependency> <dependency> <groupId>org.spark-project.hive</groupId> <artifactId>hive-jdbc</artifactId> </dependency> <dependency> <groupId>org.spark-project.hive</groupId> <artifactId>hive-service</artifactId> < </dependency> <dependency> <groupId>org.spark-project.hive</groupId> <artifactId>hive-common</artifactId> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-common</artifactId> </dependency>
参考
http://blog.csdn.net/wind520/article/details/44061563
相关推荐
spark-hive-thriftserver_2.11-2.1.spark-hive-thrift
spark-hive_2.11-2.3.0...spark-hive-thriftserver_2.11-2.3.0.jar log4j-2.15.0.jar slf4j-api-1.7.7.jar slf4j-log4j12-1.7.25.jar curator-client-2.4.0.jar curator-framework-2.4.0.jar curator-recipes-2.4.0.jar
本设计源码提供了一个基于Scala的Spark Thrift Server。项目包含12731个文件,主要使用Scala、Java、Python、Shell、JavaScript、CSS、HTML、Ruby和C编程语言。文件类型包括3539个Scala源代码文件、1559个Q文件、...
支持mysql8.x,使用utf8mb4编码。
spark和hive结合依赖,如何使用请看我博客https://blog.csdn.net/z1987865446/article/details/109372818
SparkSQL的分布式执行引擎(Spark ThriftServer)
戈欣spark-thriftserver 的 go 客户端库
thrift特性、不支持的特性、对各个语言的支持情况、语法参考、Thrift 架构、协议、传输层、服务端类型、各种thriftServer实现的比较、Thrift对多接口服务的支持
该包可以启动spark的thriftserver。可以解决报错failed load org.apache.spark.sql.hive.thriftserver.HiveThriftServer2的报错。
蜜蜂用于R的Hive客户端,它也与Spark的ThriftServer兼容。 与其他此类库不同,Bee不需要运行rJava,客户端JVM或任何其他服务。 Bee通过C ++节俭库与HiveServer交互,从而使客户端依赖性最小化,并且处理速度很快。...
一组用thrift写的Java RPC框架,是两个maven项目,直接可以用,可以传字符串。 方便初学者了解thrift RPC各部分的原理,如果想自己加功能,就要新建XX.thrift文件,定义好接口,用用thrift生成
modified thrift server , support rest , http protocol with json content . support multi oracle db
thrift-server 最简单的测试案例
必须在 HBase 服务中配置 Thrift Server 角色以使用 Hue HBase Browser 应用程序。 【解决办法】 解决办法就是在HBase中配置Thrift Server服务,具体操作如下: (1)点击进入HBase详细界面 (2)操作-->...
1.Spark及其生态圈简介.pdf 2.Spark编译与部署(上)--基础环境搭建.pdf 2.Spark编译与部署(下)--Spark编译安装.pdf 2.Spark编译与部署(中)--Hadoop编译安装.pdf 3.Spark编程模型(上)--概念及SparkShell实战....
Chapter 3: Running Your First Apache Thrift Service and Client Chapter 4: Understanding How Apache Thrift Works Chapter 5: Generating and Running Code in Different Languages Chapter 6: Handling Errors...
NULL 博文链接:https://shift-alt-ctrl.iteye.com/blog/1990026
spark和hive结合依赖,如何使用请看我博客https://blog.csdn.net/z1987865446/article/details/109372818
使用Apache thrift通信框架编写的一个实例,以及提供开发中使用thrift所需的jar包
pyhs2是一个python连接hive server/spark thrift server的客户端。