我正在尝试通过http将Hue连接到Hiveserver2。我使用Hue 3.7(github版本)和Hive 0.13.1。
这是我的hive-site.xml配置:
<property>
<name>hive.server2.transport.mode</name>
<value>http</value>
<description>Server transport mode. "binary" or "http".</description>
</property>
<property>
<name>hive.server2.thrift.http.port</name>
<value>10001</value>
<description>Port number when in HTTP mode.</description>
</property>
<property>
<name>hive.server2.thrift.http.path</name>
<value>cliservice</value>
<description>Path component of URL endpoint when in HTTP mode.</description>
</property>
<property>
<name>hive.server2.thrift.http.min.worker.threads</name>
<value>5</value>
<description>Minimum number of worker threads when in HTTP mode.</description>
</property>
<property>
<name>hive.server2.thrift.http.max.worker.threads</name>
<value>500</value>
<description>Maximum number of worker threads when in HTTP mode.</description>
</property>
我用过这个指令: https://groups.google.com/a/cloudera.org/forum/#!topic/hue-user/ghdFwSuUDfE 但它不起作用。当我启动Hue并单击Metastore Table时,我收到一条错误消息:
TSocket read 0 bytes
这是追溯:
[15/Jan/2015 11:53:32 +0100] middleware INFO Processing exception: TSocket read 0 bytes (code THRIFTTRANSPORT): TTransportException('TSocket read 0 bytes',): Traceback (most recent call last):
File "/opt/hue_3.7/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/opt/hue_3.7/apps/metastore/src/metastore/views.py", line 108, in show_tables
databases = db.get_databases()
File "/opt/hue_3.7/apps/beeswax/src/beeswax/server/dbms.py", line 123, in get_databases
return self.client.get_databases()
File "/opt/hue_3.7/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 813, in get_databases
return [table[col] for table in self._client.get_databases()]
File "/opt/hue_3.7/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 480, in get_databases
res = self.call(self._client.GetSchemas, req)
File "/opt/hue_3.7/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 443, in call
session = self.open_session(self.user)
File "/opt/hue_3.7/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 417, in open_session
res = self._client.OpenSession(req)
File "/opt/hue_3.7/desktop/core/src/desktop/lib/thrift_util.py", line 340, in wrapper
raise StructuredThriftTransportException(e, error_code=502)
StructuredThriftTransportException: TSocket read 0 bytes (code THRIFTTRANSPORT): TTransportException('TSocket read 0 bytes',)
检查Hue返回的配置:
Hive Editor The application won't work without a running HiveServer2.
但我可以通过Beeline连接到Hiveserver2。
我该怎么办?