moving to framed transport (client breakage inevitable)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

moving to framed transport (client breakage inevitable)

Eric Evans-4

As explained in CASSANDRA-241[1], the daemon process, which is currently
using a non-framed thrift transport is incompatible with (some?)
non-blocking client implementations. The solution is to standardize on a
framed transport which is compatible with all client implementations.

[1] https://issues.apache.org/jira/browse/CASSANDRA-241

Unfortunately this is going to break everyone's client apps. Fortunately
the fix is trivial.

For Java clients that look something like ...

    socket = new TSocket(hostname, port);
    TProtocol protocol = new TBinaryProtocol(socket);
    client = new Cassandra.Client(protocol);

... changing them to look like ...


    socket = new TSocket(hostname, port);
    TTransport transport = new TFramedTransport(socket)
    TProtocol protocol = new TBinaryProtocol(transport);
    client = new Cassandra.Client(protocol);

... should do the trick.

For a Python client that looks something like ...

    socket = TSocket.TSocket(host, port)
    transport = TTransport.TBufferedTransport(socket)
    protocol = TBinaryProtocol.TBinaryProtocol(transport)
    client = Cassandra.Client(protocol)

... change it to look like ...

    socket = TSocket.TSocket(host, port)
    transport = TTransport.TFramedTransport(socket)
    protocol = TBinaryProtocol.TBinaryProtocol(transport)
    client = Cassandra.Client(protocol)


Unless confronted with compelling arguments, Jonathan has agreed to
commit this change on Monday, so speak soon or forever hold your
peace. :)

--
Eric Evans
[hidden email]