技术标签: apache-spark-sql Datagrip
我跟着 火花说明 为了启动节俭JDBC服务器:
$ ./spark-2.1.1-bin-hadoop2.7/sbin/start-thriftserver.sh
我可以从Beeline连接到OK:
$ ./spark-2.1.1-bin-hadoop2.7/bin/beeline -u 'jdbc:hive2://localhost:10000' Connecting to jdbc:hive2://localhost:10000 log4j:WARN No appenders could be found for logger (org.apache.hive.jdbc.Utils). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Connected to: Spark SQL (version 2.1.1) Driver: Hive JDBC (version 1.2.1.spark2) Transaction isolation: TRANSACTION_REPEATABLE_READ Beeline version 1.2.1.spark2 by Apache Hive 0: jdbc:hive2://localhost:10000>
但是,尝试使用JDBC和相同的连接字符串从Datagrip连接,我会发现一个错误:
[2017-07-07 16:46:57] java.lang.ClassNotFoundException: org.apache.thrift.transport.TTransportException [2017-07-07 16:46:57] at java.net.URLClassLoader.findClass(URLClassLoader.java:381) [2017-07-07 16:46:57] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) [2017-07-07 16:46:57] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) [2017-07-07 16:46:57] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [2017-07-07 16:46:57] at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105) [2017-07-07 16:46:57] at com.intellij.database.remote.jdbc.impl.RemoteDriverImpl.connect(RemoteDriverImpl.java:27) [2017-07-07 16:46:57] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [2017-07-07 16:46:57] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [2017-07-07 16:46:57] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [2017-07-07 16:46:57] at java.lang.reflect.Method.invoke(Method.java:498) [2017-07-07 16:46:57] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324) [2017-07-07 16:46:57] at sun.rmi.transport.Transport$1.run(Transport.java:200) [2017-07-07 16:46:57] at sun.rmi.transport.Transport$1.run(Transport.java:197) [2017-07-07 16:46:57] at java.security.AccessController.doPrivileged(Native Method) [2017-07-07 16:46:57] at sun.rmi.transport.Transport.serviceCall(Transport.java:196) [2017-07-07 16:46:57] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) [2017-07-07 16:46:57] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) [2017-07-07 16:46:57] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683) [2017-07-07 16:46:57] at java.security.AccessController.doPrivileged(Native Method) [2017-07-07 16:46:57] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) [2017-07-07 16:46:57] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [2017-07-07 16:46:57] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [2017-07-07 16:46:57] at java.lang.Thread.run(Thread.java:745) (no stack trace)
我配置了DataGrip以使用JDBC库 hive-jdbc-1.2.1.spark2.jar 从火花安装文件夹中。
从Spark 2.2.1分发中,您需要以下罐子:
commons-logging-1.1.3.jar
hadoop-common-2.7.3.jar
hive-exec-1.2.1.spark2.jar
hive-jdbc-1.2.1.spark2.jar
hive-metastore-1.2.1.spark2.jar
httpclient-4.5.2.jar
httpcore-4.4.4.jar
libthrift-0.9.3.jar
slf4j-api-1.7.16.jar
spark-hive-thriftserver_2.11-2.2.1.jar
spark-network-common_2.11-2.2.1.jar
在Datagrip中选择类 org.apache.hive.jdbc.HiveDriver 并将TX(交易控制)设置为 Manual (SPARK不支持自动加入)。
您现在应该能够使用URL连接 jdbc:hive2://hostname:10000/
项目之前用cloudera manager配好了spark on yarn集群,要求连接JDBC,markdown一下 既然是要jdbc连接mysql,必然少不了jar包,下载好jar包:mysql-connector-java-5.1.41-bin.jar 位置随大家喜欢,我放到了spark下的lib路径:/opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1....
根据Spark官网所述,Spark SQL实现了Thrift JDBC/ODBC server: The Thrift JDBC/ODBC server implemented here corresponds to the HiveServer2 in Hive 1.2.1 You can test the JDBC server with the beeline script t...
在datastage 9.12版本之后开始支持jdbc connector stage连接数据库,配置及使用方式如下 1.配置驱动配置文件(IS_HOME/Server/DSEngine目录下,IS_HOME是 InfoSphere Information Server 的home目录) 2.上传oracle的驱动到/opt/drivers目录下 3.新建测试作业,数...
步骤: 1、在项目里面配置驱动(右击项目->built path->configure built path->libraries->add External JARs...),添加数据库的驱动jar包(本例mysql驱动包v5.0.8)网上下载驱动包 2、加载数据驱动 驱动名:com.mysql.jdbc.Driver 驱动方式:Class.forName() 3、连接,...
摄像头的8种颜色:橙、黄、绿、紫、灰、蓝、棕、白 分别对应双绞线的8种颜色:橙白、橙、绿白、蓝、蓝白、绿、棕白、棕 简化一点用网线的568B顺序分别对接就是:橙白(接橙色)、橙(接黄色)、绿白(接绿色)、蓝(接紫色)、蓝白(接灰色)、绿(接蓝色)、棕白(接棕色)、棕(接白色) 568A标准:绿白,绿,橙白,蓝,蓝白,橙,棕白,棕 橙绿蓝棕 排列好,先4-6交叉,再1-3、2-6 RJ-4...
静态资源访问失效,是应为其地址无法自动添加项目路径 以下model.html 以下index.html 以下index_1.html 以下controller.java 结果...
配置日志并测试 进入到hive目录修改日志文件名称 在hive目录下创建logs目录 修改hive-log4j.properties配置文件hive.log.dir 把hive.log.dir=${java.io.tmpdir}/${user.name} 修改为 /opt/modules/hive-0.13.1/logs 退出hive 进入hive进行测试 进入 日志文件产生 在hive控制台打印...
最近用beeline替代hive cli,发现之前在hive-site.xml 的 Hive 客户端高级配置代码段(安全阀)的配置项,beeline居然不生效,如下图所示,而hive cli是生效的 查看了执行机器上/etc/hive/conf/hive-site.xml文件,发现配置确实是修改了,一直以为是环境变量的原因,找了几个小时,网上也没相关解释,最后在hive-site.xml 的 Hi...
在座的各位应该都知道,Git 作为居家必备、团队协作之利器,打从 Linus Torvalds 发布这款工具时起,便一直受到各路开发者的喜爱。 不过,尽管如此, Git 里面太多干巴巴,看起来非常枯燥无味的命令行,一旦几天没用,就很容易就忘得一干二净,希望 能出一些与 Git 相关的辅助教程,或者比较有趣、对小白比较友好的学习方式。 emmm.. 尽可能满足大家的一切要求啦。 几天前,偶然在 Tw...
写这篇入门文也算是给自己巩固一下知识,现目前自己也在自学webpack,很多地方还有不懂得地方感谢各位提出意见。 目的:了解webpack五大核心概念中的loader属性(让webpack能够去处理那些非javaScript文件)。 注:webpack能处理js、json资源。(可自行测试)。 开始搭建webpack项目: 一、我们先创建一个项目文件夹webpack-two-css,然后在项目文件...
I'm trying to suppress IE's default handling of Ctrl+O. I've got a onKeyDown handler which get's called, but even though I call event.cancelBubble and return false, the default File|Open command still...
Recently i've picked up Oracle SQL, Right now i'm trying to write a function that later will be used in a view to generate a list. but for now im stuck on the function itself... The function makes use...
I have a problem regarding of creating table. I want to do this: But I got this: I have tried everything and I'm realize that I have problem with the looping. I've tried to put @endforeach before <...
I have a WPF 3D application (C# .NET 4.0) that has a lot of 3D geometries. Now I need to color these geometries by applying a texture. The source for the texture is one large .PNG file like the follow...
after filling the inputs in the view and clicking the submit button, the records gets saved just fine if I use Firefox. The same goes for IE if I'm quick enough. But when I wait 10 seconds, the POST d...