cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Cassandra Wiki] Update of "ClientExamples" by Chris Goffinet
Date Thu, 27 Aug 2009 01:15:56 GMT
Dear Wiki user,

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

The following page has been changed by Chris Goffinet:
http://wiki.apache.org/cassandra/ClientExamples

The comment on the change is:
Updated TBinaryProtocol to TBinaryProtocolAccelerated (fast c-version)

------------------------------------------------------------------------------
  from thrift import Thrift
  from thrift.transport import TTransport
  from thrift.transport import TSocket
- from thrift.protocol import TBinaryProtocol
+ from thrift.protocol.TBinaryProtocol import TBinaryProtocolAccelerated
  from cassandra import Cassandra
  from cassandra.ttypes import *
  import time, pprint
@@ -181, +181 @@

  def main():
      socket = TSocket.TSocket("localhost", 9160)
      transport = TTransport.TBufferedTransport(socket)
-     protocol = TBinaryProtocol.TBinaryProtocol(transport)
+     protocol = TBinaryProtocol.TBinaryProtocolAccelerated(transport)
      client = Cassandra.Client(protocol)
      pp = pprint.PrettyPrinter(indent = 2)
  

Mime
View raw message