Re: help required to resolve super column family problems

2012-08-26 Thread Aaron Turner
On Sun, Aug 26, 2012 at 9:28 PM, Amit Handa  wrote:
> Hi,
>
> i basically want to do hands-on on Super Column family concept, making some
> examples using hector api, and manually adding the data.
> I explored hector-example project, but only got very starting level of super
> column family example.
> i am in search of more super column family examples using hector api. can i
> get some link and references related to it?

Is there a specific reason you want to use SuperColumns?  Basically,
it's a "feature" that the developers say you shouldn't use.  Most
people don't use them because of the rather poor performance
characteristics SC's have.

-- 
Aaron Turner
http://synfin.net/ Twitter: @synfinatic
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
-- Benjamin Franklin
"carpe diem quam minimum credula postero"


Re: help required to resolve super column family problems

2012-08-26 Thread Amit Handa
Hi,

i basically want to do hands-on on Super Column family concept, making some
examples using hector api, and manually adding the data.
I explored hector-example project, but only got very starting level of
super column family example.
i am in search of more super column family examples using hector api. can i
get some link and references related to it?


Regards,
Amit


On Sat, Aug 25, 2012 at 3:20 AM, Mohit Anchlia wrote:

> If you are starting out new use composite column names/values or you could
> also use JSON style doc as a column value.
>
>
> On Fri, Aug 24, 2012 at 2:31 PM, Rob Coli  wrote:
>
>> On Fri, Aug 24, 2012 at 4:33 AM, Amit Handa 
>> wrote:
>> > kindly help in resolving the following problem with respect to super
>> column
>> > family.
>> > i am using cassandra version 1.1.3
>>
>> Well, THERE's your problem... ;D
>>
>> But seriously.. as I understand project intent, super columns will
>> ultimately be a weird API wrapper around composite keys. Also,  super
>> column families have not been well supported for years. You probably
>> just want to use composite keys if you are just starting out in 1.1.x.
>>
>> https://issues.apache.org/jira/browse/CASSANDRA-3237
>>
>> =Rob
>>
>> --
>> =Robert Coli
>> AIM>ALK - rc...@palominodb.com
>> YAHOO - rcoli.palominob
>> SKYPE - rcoli_palominodb
>>
>
>


Re: help required to resolve super column family problems

2012-08-24 Thread Mohit Anchlia
If you are starting out new use composite column names/values or you could
also use JSON style doc as a column value.

On Fri, Aug 24, 2012 at 2:31 PM, Rob Coli  wrote:

> On Fri, Aug 24, 2012 at 4:33 AM, Amit Handa  wrote:
> > kindly help in resolving the following problem with respect to super
> column
> > family.
> > i am using cassandra version 1.1.3
>
> Well, THERE's your problem... ;D
>
> But seriously.. as I understand project intent, super columns will
> ultimately be a weird API wrapper around composite keys. Also,  super
> column families have not been well supported for years. You probably
> just want to use composite keys if you are just starting out in 1.1.x.
>
> https://issues.apache.org/jira/browse/CASSANDRA-3237
>
> =Rob
>
> --
> =Robert Coli
> AIM>ALK - rc...@palominodb.com
> YAHOO - rcoli.palominob
> SKYPE - rcoli_palominodb
>


Re: help required to resolve super column family problems

2012-08-24 Thread Rob Coli
On Fri, Aug 24, 2012 at 4:33 AM, Amit Handa  wrote:
> kindly help in resolving the following problem with respect to super column
> family.
> i am using cassandra version 1.1.3

Well, THERE's your problem... ;D

But seriously.. as I understand project intent, super columns will
ultimately be a weird API wrapper around composite keys. Also,  super
column families have not been well supported for years. You probably
just want to use composite keys if you are just starting out in 1.1.x.

https://issues.apache.org/jira/browse/CASSANDRA-3237

=Rob

-- 
=Robert Coli
AIM>ALK - rc...@palominodb.com
YAHOO - rcoli.palominob
SKYPE - rcoli_palominodb


Re: help required to resolve super column family problems

2012-08-24 Thread Guillermo Winkler
Hi Amit,


> 1) how to manually add data into it using cassandra-cli. i tried this
> type, but got the error:
>  set UserMovies['user1']['userid'] = 'USER-1';
> but got error message: *Column family movieconsumed may only contain
> SuperColumns*
>

I can't really see why you need a SC here since your example is not
representative, it would be better if you exemplify with accurate or
meaningful data.

In this case the error is because you have one element missing in the
column path, you are doing this:

UserMovies : {
   user1 : {
  userid:USER-1
   }
}

That is:
- Column family = UserMovies
- Row Key = user1
- Column name = userid
- Column value = USER-1

As you see you have the super column missing in your update sentence.

Given this example


> USER-1(userid) -- MOVIEABCD (movie) -- 9 (rating)
>

I think you don't need a SC, make the user the row key, movie the column
name and rating the column value.


>
> 2) as i want to make query to fetch peer movies name for particular
> UserMovie(column name movie) for user(userid: user-1).
> How i can perform this query using Hector api (from two super column
> families UserMovies and movieSimilarity).
>
>
Didn't understand your query.


Best,
Guille