hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Trivial Update of "Hbase/ThriftApi" by JoelNothman
Date Tue, 07 Jul 2009 05:30:58 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The following page has been changed by JoelNothman:
http://wiki.apache.org/hadoop/Hbase/ThriftApi

The comment on the change is:
Clean up python

------------------------------------------------------------------------------
  
  To acquire a Thrift client instance:
  {{{
- from thrift.transport import TSocket, TTransport
+ from thrift.transport.TSocket import TSocket
+ from thrift.transport.TTransport import TBufferedTransport
  from thrift.protocol import TBinaryProtocol
-  
  from hbase import Hbase
- from hbase.ttypes import *
  
+ transport = TBufferedTransport(TSocket(host, port))
- transport = TSocket.TSocket('localhost', 9090)
- transport = TTransport.TBufferedTransport(transport)
  transport.open()
  protocol = TBinaryProtocol.TBinaryProtocol(transport)
  

Mime
View raw message