thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suhas Satish <suhas.sat...@gmail.com>
Subject thrift exception , client_protocol being reset to null
Date Fri, 21 Feb 2014 21:50:14 GMT
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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message