Hi Folks,

Managed to solve this problem to an extent. I used the thrift api just for this client and did a thread sleep until the schema comes into agreement.

The addColumnFamily(CF, boolean) is not available in the Hector I use. Anyway, I checked the code in Hector trunk. The approach is almost identical, so it should be good.

Sometimes still the schema does not come into agreement... I wonder whether this issue is solved the newer versions?

Anyway, Aaron has given a workaround in another thread for this problem.

Thanks for all the help folks.

On Tue, Mar 6, 2012 at 11:32 PM, Tamar Fraenkel <tamar@tok-media.com> wrote:
Maybe I didn't understand, but if you use Hector's
addColumnFamily(CF, true);
it should wait for schema agreement.
Will that solve your problem?


Tamar Fraenkel†
Senior Software Engineer, TOK Media†

Inline image 1

Tel:†††+972 2 6409736
Mob:††+972 54 8356490
Fax:†††+972 2 5612956

On Tue, Mar 6, 2012 at 7:55 PM, Jeremiah Jordan <jeremiah.jordan@morningstar.com> wrote:
That is the best one I have found.

On 03/01/2012 03:12 PM, Tharindu Mathew wrote:
There are 2. I'd like to wait till there are one, when I insert the value.

Going through the code, calling client.describe_schema_versions() seems to give a good answer to this. And I discovered that if I wait till there is only 1 version, I will not get this error.

Is this the best practice if I want to check this programatically?

On Thu, Mar 1, 2012 at 11:15 PM, aaron morton <aaron@thelastpickle.com> wrote:
use describe cluster in the CLI to see how many schema versions there are.†


Aaron Morton
Freelance Developer

On 2/03/2012, at 12:25 AM, Tharindu Mathew wrote:

On Thu, Mar 1, 2012 at 11:47 AM, Tharindu Mathew <mccloud35@gmail.com> wrote:

Thanks for the reply.

This is what we have been doing, but it's not reliable as we don't know a definite time that the schema would get replicated. Is there any way I can know for sure that changes have propagated?
[Edit: corrected to a question]

Then I can block the insertion of data until then.

On Thu, Mar 1, 2012 at 4:33 AM, Jeremiah Jordan <JEREMIAH.JORDAN@morningstar.com> wrote:

The error is that the specified colum family doesnít exist.† If you connect with the CLI and describe the keyspace does it show up?† Also, after adding a new column family programmatically you canít use it immediately, you have to wait for it to propagate.† You can use calls to describe schema to do so, keep calling it until every node is on the same schema.


From: Tharindu Mathew [mailto:mccloud35@gmail.com]
Sent: Wednesday, February 29, 2012 8:27 AM
To: user
Subject: Schema change causes exception when adding data


I have a 3 node cluster and I'm dynamically updating a keyspace with a new column family. Then, when I try to write records to it I get the following exception shown at [1].

How do I avoid this. I'm using Hector and the default consistency level of QUORUM is used. Cassandra version 0.7.8. Replication Factor is 1.

How can I solve my problem?

[1] -
me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:unconfigured columnfamily proxySummary)

at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:42)

at me.prettyprint.cassandra.service.KeyspaceServiceImpl$10.execute(KeyspaceServiceImpl.java:397)

at me.prettyprint.cassandra.service.KeyspaceServiceImpl$10.execute(KeyspaceServiceImpl.java:383)

at me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:101)

at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:156)

at me.prettyprint.cassandra.service.KeyspaceServiceImpl.operateWithFailover(KeyspaceServiceImpl.java:129)

at me.prettyprint.cassandra.service.KeyspaceServiceImpl.multigetSlice(KeyspaceServiceImpl.java:401)

at me.prettyprint.cassandra.model.thrift.ThriftMultigetSliceQuery$1.doInKeyspace(ThriftMultigetSliceQuery.java:67)

at me.prettyprint.cassandra.model.thrift.ThriftMultigetSliceQuery$1.doInKeyspace(ThriftMultigetSliceQuery.java:59)

at me.prettyprint.cassandra.model.KeyspaceOperationCallback.doInKeyspaceAndMeasure(KeyspaceOperationCallback.java:20)

at me.prettyprint.cassandra.model.ExecutingKeyspace.doExecute(ExecutingKeyspace.java:72)

at me.prettyprint.cassandra.model.thrift.ThriftMultigetSliceQuery.execute(ThriftMultigetSliceQuery.java:58)