Skip to content

Thrift 0.5 upgrade + Cassandra 0.7.0 #52

Open
loretoparisi opened this Issue Jan 22, 2011 · 1 comment

1 participant

@loretoparisi

I successfully upgraded Pandra 0.2.1 to the new Thrift 0.5.
It works with Cassandra 0.6.5.

Cassandra 0.7.0 comes with a framed transport, so it's not compatible with Thrift < 0.5.
I tried to upgrade Cassandra as-it-is with Pandra 0.2.1 + Thrift 0.5, but it hangs on.

I'm not sure what's happing inside Pandra, because I have no error log fro my side apparently.

Before upgrading Thrift to 0.5, I had this error:

  ERROR [pool-1-thread-1] 2011-01-19 18:27:05,188 CustomTThreadPoolServer.java (line 175) Thrift error occurred during processing of message.
   org.apache.thrift.protocol.TProtocolException: Missing version in readMessageBegin, old client?
    at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:213)
    at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2543)
    at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)

telling us that the client was too old (Thrift <0.5).

PS.
I just realized that downgrading to Cassandra 0.6.5 I have also an error on Cassandra startup, that prevents server to start:

Gemini:~ loretoparisi$ java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1937)
at org.apache.cassandra.dht.RandomPartitioner.convertFromDiskFormat(RandomPartitioner.java:50)
at org.apache.cassandra.io.SSTableReader.loadIndexFile(SSTableReader.java:259)
at org.apache.cassandra.io.SSTableReader.open(SSTableReader.java:121)
at org.apache.cassandra.io.SSTableReader.open(SSTableReader.java:110)
at org.apache.cassandra.db.ColumnFamilyStore.(ColumnFamilyStore.java:178)
at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:248)
at org.apache.cassandra.db.Table.(Table.java:338)
at org.apache.cassandra.db.Table.open(Table.java:199)
at org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:124)
at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:97)
at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:214)

I'm reporting this strange behavior to guys at Cassandra.

I guess that PandraCore and some other classes are involved in calling the Socket transport as I did some modifications to PandraCore calling the Socket before.
Am I right?
Anyone know a possible point of failure of Pandra with Thrift 0.5 connecting to Cassandra 0.7.0?

@loretoparisi

I just realized that the problem is in the interface also:

In 0.6 you have

ColumnOrSuperColumn get(1:required string keyspace,
2:required string key,
3:required ColumnPath column_path,
4:required ConsistencyLevel consistency_level=ONE)
throws (1:InvalidRequestException ire,
2:NotFoundException nfe,
3:UnavailableException ue,
4:TimedOutException te),

In 0.7 you have

ColumnOrSuperColumn get(1:required binary key,
2:required ColumnPath column_path,
3:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
throws (1:InvalidRequestException ire,
2:NotFoundException nfe,
3:UnavailableException ue,
4:TimedOutExceptionte),

Anyway it's possible to test Cassandra 0.7.0 with Pandra 0.2.1 using the unframed transport:

 thrift_framed_transport_size_in_mb: 0 // cassandra.yaml, default was 15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.