2016-11-23 93 views
0

我需要连接火花与powerbi。我不知道相同的驱动程序。而且我在没有安装Apache配置单元的情况下在本地模式下运行spark。所以我没有hive-site.xml配置节俭服务器的文件。开始节俭服务器后,我开始$ SPARK_HOME \ BIN \ beeline.cmd,并用命令!connect jdbc:hive2://localhost:10000连接节俭服务器并使用用户ID作为管理员(同我的本地机器)和空密码输出功率为:连接火花与BI工具,如电源bi和画面

beeline> !connect jdbc:hive2://localhost:10000 
Connecting to jdbc:hive2://localhost:10000 
Enter username for jdbc:hive2://localhost:10000: Administrator 
Enter password for 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.0.1) 
Driver: Hive JDBC (version 1.2.1.spark2) 
Transaction isolation: TRANSACTION_REPEATABLE_READ 

看来,在建立连接,但查询有关使用命令数据库时:show databases;,它显示错误(直线):

Error: org.apache.thrift.transport.TTransportException: java.net.SocketException: Software caused connection abort: socket write error (state=08S01,code=0)` and error(in thrift server cmd):`Exception in thread "HiveServer2-Handler-Pool: Thread-XXX" 
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "HiveServer2-Handler-Pool: Thread-XXX" 

我不明白这个错误。请帮我解决这个问题,并且我想将它与本地机器上安装的powerbi桌面连接起来。有人可以提供一些链接来读取进行连接吗?

回答

0

@Birla,它看起来像问题here中提到的TCP错误。

不建议在本地计算机上使用Thrift,因为Thrift服务器需要使用专门的Metastore服务器进行相当好的处理以处理认证和并行处理。

推荐:安装Horton Works/Cloudera准备工作虚拟机,然后从Power BI访问这些虚拟机。

Image Explains it all

Connecting Spark Thrift User is very straight forward

+0

谢谢您的答复。我现在只是测试连接。完成后,我将使用专用的Metastore服务器处理群集模式。我无法确定错误的确切补救方法。你可以更具体一些解决方案。 –

+0

@JustCoder ...另外我对是否使用hive-site.xml感到困惑。如果我不使用它,那么我的凭证是什么,以及将在我的BI工具中访问的spark-warehouse目录是什么? –

+0

默认情况下,spark会使用这个文件夹/ usr/hive/warehouse /作为所有配置单元相关查询和/ usr/hive/warehouse/records用于存储稍后将查询的文件。建议将hive-ste.xml设置为本地存储,作为文件系统和单个进程模式执行。 – JustCoder