You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Gurminder Gill <gu...@hotmail.com> on 2013/04/10 06:22:15 UTC
CDH4 + Cassandra 1.2 Integration Issue
I was able to start a MR job after patching Cassandra.Hadoop as per
CASSANDRA-5201 <https://issues.apache.org/jira/browse/CASSANDRA-5201>.
But then, ColumnFamilyRecordReader pukes within the MapTask. It is unable
to read CF definition in the sample keyspace. The CF "user" does exist.
*How can "cf_defs" below be possibly empty? Any pointers?*
*KsDef.toString() during Read Operation from within the MapTask :-*
*
*
KsDef(name:wordcount,
strategy_class:org.apache.cassandra.locator.SimpleStrategy,
strategy_options:{replication_factor=1}, *cf_defs:[]*, durable_writes:true)
*Output from cqlsh :-
*
cqlsh> describe keyspace wordcount;
CREATE KEYSPACE wordcount WITH replication = {
'class': 'SimpleStrategy',
'replication_factor': '1'
};
USE wordcount;
CREATE TABLE user (
id int PRIMARY KEY,
age int,
fname text,
lname text
) WITH
bloom_filter_fp_chance=0.010000 AND
caching='KEYS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.000000 AND
gc_grace_seconds=864000 AND
read_repair_chance=0.100000 AND
replicate_on_write='true' AND
compaction={'class': 'SizeTieredCompactionStrategy'} AND
compression={'sstable_compression': 'SnappyCompressor'};
Re: CDH4 + Cassandra 1.2 Integration Issue
Posted by aaron morton <aa...@thelastpickle.com>.
cqlsh in cassandra 1.2 defaults to cql 3.
-----------------
Aaron Morton
Freelance Cassandra Consultant
New Zealand
@aaronmorton
http://www.thelastpickle.com
On 10/04/2013, at 6:55 PM, Gurminder Gill <gu...@hotmail.com> wrote:
> Ah ha. So, the client defaults to CQL 2. Anyway of changing that? I tired libthrift 0.9 as well but it doesn't work.
>
> Thanks.
>
>
> On Tue, Apr 9, 2013 at 11:29 PM, Shamim <sr...@yandex.ru> wrote:
> Hello,
> if you created your table <user> with cql then you have to add COMPACT STORAGE as follows:
> CREATE TABLE user (
> id int PRIMARY KEY,
> age int,
> fname text,
> lname text
> ) WITH COMPACT STORAGE
>
>
>
>
> --
> Best regards
> Shamim A.
>
>
>
> 10.04.2013, 08:22, "Gurminder Gill" <gu...@hotmail.com>:
> > I was able to start a MR job after patching Cassandra.Hadoop as per CASSANDRA-5201.
> >
> > But then, ColumnFamilyRecordReader pukes within the MapTask. It is unable to read CF definition in the sample keyspace. The CF "user" does exist.
> > How can "cf_defs" below be possibly empty? Any pointers?
> >
> > KsDef.toString() during Read Operation from within the MapTask :-
> >
> > KsDef(name:wordcount, strategy_class:org.apache.cassandra.locator.SimpleStrategy, strategy_options:{replication_factor=1}, cf_defs:[], durable_writes:true)
> >
> > Output from cqlsh :-
> >
> > cqlsh> describe keyspace wordcount;
> >
> > CREATE KEYSPACE wordcount WITH replication = {
> > 'class': 'SimpleStrategy',
> > 'replication_factor': '1'
> > };
> >
> > USE wordcount;
> >
> > CREATE TABLE user (
> > id int PRIMARY KEY,
> > age int,
> > fname text,
> > lname text
> > ) WITH
> > bloom_filter_fp_chance=0.010000 AND
> > caching='KEYS_ONLY' AND
> > comment='' AND
> > dclocal_read_repair_chance=0.000000 AND
> > gc_grace_seconds=864000 AND
> > read_repair_chance=0.100000 AND
> > replicate_on_write='true' AND
> > compaction={'class': 'SizeTieredCompactionStrategy'} AND
> > compression={'sstable_compression': 'SnappyCompressor'};
>
>
>
Re: CDH4 + Cassandra 1.2 Integration Issue
Posted by Gurminder Gill <gu...@hotmail.com>.
Ah ha. So, the client defaults to CQL 2. Anyway of changing that? I tired
libthrift 0.9 as well but it doesn't work.
Thanks.
On Tue, Apr 9, 2013 at 11:29 PM, Shamim <sr...@yandex.ru> wrote:
> Hello,
> if you created your table <user> with cql then you have to add COMPACT
> STORAGE as follows:
> CREATE TABLE user (
> id int PRIMARY KEY,
> age int,
> fname text,
> lname text
> ) WITH COMPACT STORAGE
>
>
>
>
> --
> Best regards
> Shamim A.
>
>
>
> 10.04.2013, 08:22, "Gurminder Gill" <gu...@hotmail.com>:
> > I was able to start a MR job after patching Cassandra.Hadoop as
> per CASSANDRA-5201.
> >
> > But then, ColumnFamilyRecordReader pukes within the MapTask. It is
> unable to read CF definition in the sample keyspace. The CF "user" does
> exist.
> > How can "cf_defs" below be possibly empty? Any pointers?
> >
> > KsDef.toString() during Read Operation from within the MapTask :-
> >
> > KsDef(name:wordcount,
> strategy_class:org.apache.cassandra.locator.SimpleStrategy,
> strategy_options:{replication_factor=1}, cf_defs:[], durable_writes:true)
> >
> > Output from cqlsh :-
> >
> > cqlsh> describe keyspace wordcount;
> >
> > CREATE KEYSPACE wordcount WITH replication = {
> > 'class': 'SimpleStrategy',
> > 'replication_factor': '1'
> > };
> >
> > USE wordcount;
> >
> > CREATE TABLE user (
> > id int PRIMARY KEY,
> > age int,
> > fname text,
> > lname text
> > ) WITH
> > bloom_filter_fp_chance=0.010000 AND
> > caching='KEYS_ONLY' AND
> > comment='' AND
> > dclocal_read_repair_chance=0.000000 AND
> > gc_grace_seconds=864000 AND
> > read_repair_chance=0.100000 AND
> > replicate_on_write='true' AND
> > compaction={'class': 'SizeTieredCompactionStrategy'} AND
> > compression={'sstable_compression': 'SnappyCompressor'};
>
Re: CDH4 + Cassandra 1.2 Integration Issue
Posted by Shamim <sr...@yandex.ru>.
Hello,
if you created your table <user> with cql then you have to add COMPACT STORAGE as follows:
CREATE TABLE user (
id int PRIMARY KEY,
age int,
fname text,
lname text
) WITH COMPACT STORAGE
--
Best regards
Shamim A.
10.04.2013, 08:22, "Gurminder Gill" <gu...@hotmail.com>:
> I was able to start a MR job after patching Cassandra.Hadoop as per CASSANDRA-5201.
>
> But then, ColumnFamilyRecordReader pukes within the MapTask. It is unable to read CF definition in the sample keyspace. The CF "user" does exist.
> How can "cf_defs" below be possibly empty? Any pointers?
>
> KsDef.toString() during Read Operation from within the MapTask :-
>
> KsDef(name:wordcount, strategy_class:org.apache.cassandra.locator.SimpleStrategy, strategy_options:{replication_factor=1}, cf_defs:[], durable_writes:true)
>
> Output from cqlsh :-
>
> cqlsh> describe keyspace wordcount;
>
> CREATE KEYSPACE wordcount WITH replication = {
> 'class': 'SimpleStrategy',
> 'replication_factor': '1'
> };
>
> USE wordcount;
>
> CREATE TABLE user (
> id int PRIMARY KEY,
> age int,
> fname text,
> lname text
> ) WITH
> bloom_filter_fp_chance=0.010000 AND
> caching='KEYS_ONLY' AND
> comment='' AND
> dclocal_read_repair_chance=0.000000 AND
> gc_grace_seconds=864000 AND
> read_repair_chance=0.100000 AND
> replicate_on_write='true' AND
> compaction={'class': 'SizeTieredCompactionStrategy'} AND
> compression={'sstable_compression': 'SnappyCompressor'};