PyHive连接错误-无法启动SASL

问题描述

我正在尝试使用PyHive连接到Hive服务器。 到目前为止,我有这个:

//get all the users from the database (in your controller)
//you need to create a new array so as to easily include the role in the returned results
return Usuario::with('Usuario')->get()->map(function($role) {
            return [
                'field1' => $role->field1,'field2' => $role->field2,'field3' => $role->field3,'field4' => $role->field4,'field5' => $role->field5,'rol' => $role->Usuario->desc_role
            ];
        });

在我的hive-site.xml配置中,我有这个:

from pyhive import hive
import pandas as pd

# Create Hive connection
conn = hive.Connection(host="*********",port=10000,auth='NONE')

df = pd.read_sql("select max_temperature_f from `201402_weather_data` LIMIT 10",conn)
print(df.head())

<property>
<name>hive.server2.authentication</name>
<value>NONE</value>
<final>false</final>
<source>programmatically</source>
<source>org.apache.hadoop.hive.conf.LoopingByteArrayInputStream@56f71edb</source>
</property>

从我阅读的内容来看,这些是可以连接到配置单元服务器的正确设置(假设我不希望进行身份验证)。 执行脚本时出现错误

<property>
<name>hive.server2.transport.mode</name>
<value>binary</value>
<final>false</final>
<source>programmatically</source>
<source>org.apache.hadoop.hive.conf.LoopingByteArrayInputStream@56f71edb</source>
</property>

我正在使用Windows,所以我不得不手动下载并安装SASL-sasl-0.2.1-cp37-cp37m-win32.whl

我正在使用:

PyHive-0.6.3, sasl-0.2.1, 节俭-0.13.0, 节俭sasl-0.4.2, thriftpy2-0.4.11(不确定来自何处)

我看到了很多问题,并且尝试了几件事,但无法成功运行脚本。您能指出我正确的解决方案吗?导致问题的是sasl软件包吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)