You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Suhas Satish <su...@gmail.com> on 2014/02/21 22:50:14 UTC
thrift exception , client_protocol being reset to null
I am using thrift to communicate between apache hive 0.12 ( thrift server
code in java) and hue3.5.0 (thrift client code in python )
I have the same TCLIProtocol.thrift file on server and client side.
But the ttypes.py file on server has an extra CHAR_TYPE=19 which is missing
on the client side.
The protocol handshake fails due to the following exception when both the
sides try to use thrift protocol_V5 which is defined on both sides
TApplicationException: Required field 'client_protocol' is unset!
Struct:TOpenSessionReq(client_protocol:null, username:hue,
configuration:{hive.server2.proxy.user=mapr})
[20/Feb/2014 14:29:57 +0000] thrift_util ERROR Thrift saw exception
(this may be expected).
Traceback (most recent call last):
File
"/opt/mapr/hue/hue-3.5.0/desktop/core/src/desktop/lib/thrift_util.py", line
364, in wrapper
ret = res(*args, **kwargs)
File
"/opt/mapr/hue/hue-3.5.0/apps/beeswax/src/beeswax/../../gen-py/TCLIService/TCLIService.py",
line 175, in OpenSession
return self.recv_OpenSession()
File
"/opt/mapr/hue/hue-3.5.0/apps/beeswax/src/beeswax/../../gen-py/TCLIService/TCLIService.py",
line 191, in recv_OpenSession
raise x
TApplicationException: Required field 'client_protocol' is unset!
Struct:TOpenSessionReq(client_protocol:null, username:hue,
configuration:{hive.server2.proxy.user=mapr})
-----------------------------------------------------------------------------
[20/Feb/2014 15:26:10 +0000] thrift_util DEBUG Thrift call: <class
'TCLIService.TCLIService.Client'>.OpenSession(args=(TOpenSessionReq(username=u'mapr',
password=None,*client_protocol=4*,
configuration={'hive.server2.proxy.user': u'mapr'}),), kwargs={})
TApplicationException: Required field 'client_protocol' is unset!
Struct:TOpenSessionReq(*client_protocol:null*, username:mapr,
configuration:{hive.server2.proxy.user=mapr})
---------------------------------------------------
TCLIService.py:
class OpenSession_args(object):
"""
Attributes:
- req
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'req', (TOpenSessionReq,
TOpenSessionReq.thrift_spec), None, ), # 1
)
How do I fix this?
Cheers,
Suhas.