如何解决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 举报,一经查实,本站将立刻删除。