Hi -- Sorry for the delay, and thanks for the response.

Debug didn't print any stack traces and none are in the usual
suspected places...but thanks for that hint.  Didn't know that option
existed.  The age column is an Integer ... Updating to IntegerType
worked.  Thanks.



On Mon, Jan 2, 2012 at 11:23 AM, aaron morton <aa...@thelastpickle.com> wrote:
> If you use the --debug flag when you start the CLI it always will print full 
> stack traces.
>
> What is the CF definition ?  I'm guessing the column_metadata specifies that 
> the age column is a Long
>
> Was there existing data in the age column and if so how was it encoded ? Was 
> the existing data was encoded as a variable length integer value? The 
> standard IntegerType is not compatible with the LongType as the the long is 
> fixed width. If this is the case try re-creating the index using an 
> IntegerType.
>
> This worked for me…
>
> [default@dev] create column family User
> ...         with comparator = AsciiType
> ...         and column_metadata =
> ...         [{
> ...             column_name : age,
> ...             validation_class : LongType,
> ...             index_type : 0,
> ...             index_name : IdxAge},
> ...         ];
> 2fd1a5c0-352b-11e1-0000-242d50cf1fb6
> Waiting for schema agreement...
> ... schemas agree across the cluster
> [default@dev]
> [default@dev] get User where age = 1;
>
> 0 Row Returned.
> Elapsed time: 33 msec(s).
> [default@dev]
>
> Hope that helps.

Reply via email to