You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Nate McCall <zz...@gmail.com> on 2013/02/01 00:15:51 UTC

Re: too many warnings of Heap is full

>
> There are 4 secondary indexes for users and 3 for messages. I've seen
> something odd here: the index of the CFs is also stored in a column
> AND is also indexed. There isn't any query by that secondary index. I
> should probably erase the index, shouldn't I?

What is the cardinality like on these indexes? Can you provide the
schema creation for these two column families?

Re: too many warnings of Heap is full

Posted by Guillermo Barbero <gu...@spotbros.com>.
> What is the cardinality like on these indexes? Can you provide the
> schema creation for these two column families?

This is the schema of the CFs:

create column family CF_users
                with comparator = UTF8Type
                and column_metadata =
                [
                        {column_name: userSBCode, validation_class:
UTF8Type, index_type: KEYS},
                        {column_name: userEmail, validation_class:
UTF8Type, index_type: KEYS},
                        {column_name: userName, validation_class: UTF8Type},
                        {column_name: userLastName, validation_class: UTF8Type},
                        {column_name: userOwnPhoneKey,
validation_class: UTF8Type, index_type: KEYS},
                        {column_name: userOwnPhone,
validation_class: UTF8Type, index_type: KEYS},
                        {column_name: userPasswordMD5,
validation_class: UTF8Type},
                        {column_name: userDOB, validation_class: UTF8Type},
                        {column_name: userGender, validation_class: UTF8Type},
                        {column_name: userProfilePicMD5,
validation_class: UTF8Type},
                        {column_name: userAbout, validation_class: UTF8Type},
                        {column_name: userLastSession,
validation_class: UTF8Type}
                        {column_name: userMasterKey, validation_class: UTF8Type}
                ];

create column family CF_SBMessages
                with comparator = UTF8Type
                and column_metadata =
                [

                        {column_name: SBMessageId, validation_class:
UTF8Type, index_type: KEYS},
                        {column_name: fromSBCode, validation_class:
UTF8Type, index_type: KEYS},
                        {column_name: SBMessageDate, validation_class:
UTF8Type, index_type: KEYS},
                        {column_name: SBMessageType, validation_class:
UTF8Type},
                        {column_name: SBMessageText, validation_class:
UTF8Type},
                        {column_name: SBMessageAttachments,
validation_class: UTF8Type},
                ];


I've read about the importance of keeping the cardinality of the
secondary indexes low (great article at
http://pkghosh.wordpress.com/2011/03/02/cassandra-secondary-index-patterns/),
and I'm afraid that we did completely the opposite (we did consider
the secondary indexes as alternate indexes).
I guess here is some work to do to create other CFs to store these
secondary indexes.

Anyway, I still don't understand why did appear these peaks (by the
way, last night there wasn't any)