Thanks for the reply. It makes sense to me, but one of our other
developers has created a table with the following script and he seems
to be mixing super and standard columns. Also, when I use the CLI to
query the data, the columns marked as super has hashes for their
values. What am I missing?
Here's the script:
create column family users
with comparator = UTF8T
and key_validation_class=UTF8TYpe
and compression_options = { sstable_compression:SnappyCompressor,
chunk_length_kb:64}
and column_metadata = [
{ column_name: FirstName, validation_class : UTF8Type},
{ column_name: LastName, validation_class : UTF8Type},
{ column_name: FavStore, validation_class : IntegerType},
{ column_type: super, column_name: HomeAddress
, column_metadata = [
{ column_name: Street, validation_class : UTF8Type},
{ column_name: State, validation_class : UTF8Type},
{ column_name: Zip, validation_class : LongType} ] },
{ column_type: super, column_name: WorkAddress
, column_metadata = [
{ column_name: Street, validation_class : UTF8Type},
{ column_name: State, validation_class : UTF8Type},
{ column_name: Zip, validation_class : LongType} ] },
{ column_type: super, column_name: Favorites }
];
And here's the CLI output:
list users;
Using default limit of 100
-------------------
RowKey: bobjones
=> (column=FavStore, value=59580595188280, timestamp=1330696438)
=> (column=Favorites, value=HASH(0x3618bc0), timestamp=1330696438)
=> (column=FirstName, value=Bob, timestamp=1330696438)
=> (column=HomeAddress, value=HASH(0x3618b30), timestamp=1330696438)
=> (column=LastName, value=Jones, timestamp=1330696438)
=> (column=WorkAddress, value=HASH(0x3619688), timestamp=1330696438)
If this is just a standard column family, how do I write to and read
from the "super" columns with the hash values?
Thanks!
cb
On Mar 1, 5:06 pm, Andrew Swan <
andrew.i.s...@gmail.com> wrote:
> A given Cassandra column family can either contain standard columns or
> super columns, but not a mixture of the two. This is nothing to do with
> Pelops or any client library, it's a feature of Cassandra. I can see how
> the doco was ambiguous in its use of the word "or" in this case.
>
> Cheers,
>
> Andrew
>
> On 2 March 2012 08:52, wingleberry <
cbowl...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> > I have not been able to figure out how to get the Pelops client to
> > write to a super column that is in a column family with a type of
> > Standard.
>
> > I am successfully writing standard columns that are in a column family
> > with a type of Standard. I am also successfully writing to super
> > columns that are in a column family with a type of Super.
>
> > My code throws the following exception: Exception in thread "main"
> > org.scale7.cassandra.pelops.exceptions.InvalidRequestException:
> > supercolumn parameter is invalid for standard CF .
>
> > In the 1.0 documentation here,
> >
http://www.datastax.com/docs/1.0/ddl/column_family,
> > it says that "A Cassandra column family can contain either regular
> > columns or super columns, which adds another level of nesting to the
> > regular column family structure" so it looks like it should be
> > possible, but the Mutator.writeSubColumns() method does not seem to
> > work and throws the exception above.
>
> > What am I doing wrong?
>
> > Thanks!
>
> > cb
>
> --
> *"If I have not seen as far as others, it is because giants were standing
> on my shoulders."
> ***