Re: Backporting Data Center Shard Strategy

2010-09-22 Thread Benjamin Black
You might be confusing the RackAware strategy (which puts 1 replica in
a remote DC) and the DatacenterShard strategy (which puts M of N
replicas in remote DCs).  Both are in 0.6.5.

https://svn.apache.org/repos/asf/cassandra/tags/cassandra-0.6.5/src/java/org/apache/cassandra/locator/DatacenterShardStategy.java

On Tue, Sep 21, 2010 at 10:23 PM, rbukshin rbukshin  wrote:
> The one in 0.6 doesn't allow controlling number of replicas to place in
> other DC. Atmost 1 copy of data can be placed in other DC.
>
> What are other differences between the implementation in 0.6 vs 0.7?
>
>
>
> On Tue, Sep 21, 2010 at 10:03 PM, Benjamin Black  wrote:
>>
>> DCShard is in 0.6.  It has been rewritten in 0.7.
>>
>> On Tue, Sep 21, 2010 at 10:02 PM, rbukshin rbukshin 
>> wrote:
>> > Is there any plan to backport DataCenterShardStrategy to 0.6.x from 0.7?
>> > It
>> > will be very useful for those who don't want to make drastic changes in
>> > their code and get the benefits of this replica placement strategy.
>> >
>> > --
>> > Thanks,
>> > -rbukshin
>> >
>> >
>
>
>
> --
> Thanks,
> -rbukshin
>
>


Thrift gen problem with cassandra.thrift

2010-09-22 Thread Shashank Tiwari
I installed thrift successfully on Snow Leaopard. However, when I run
*thrift -gen java interface/cassandra.thrift* with Cassandra 0.6.5, I get an
error which reads as follows:
apache-cassandra-0.6.5/interface/cassandra.thrift:303] error: identifier
ONE is unqualified!
Line 303 of cassandra.thrift is highlighted in the text below:

296   /**
297 Get the Column or SuperColumn at the given column_path. If no value
is present, NotFoundException is thrown. (This is
298 the only method that can throw an exception under non-failure
conditions.)
299*/
300   ColumnOrSuperColumn get(1:required string keyspace,
301   2:required string key,
302   3:required ColumnPath column_path,
*303   4:required ConsistencyLevel
consistency_level=ONE)*
304   throws (1:InvalidRequestException ire,
2:NotFoundException nfe, 3:UnavailableException ue, 4:TimedOutException
te),
305

Could somebody please help resolve this problem and also explain what's
going on here.

Thanks, Shashank


Re: Running out of heap

2010-09-22 Thread Matthias L. Jugel
We had similar problems. It may help to read this: 
http://blog.mikiobraun.de/ (Tuning GC for Cassandra)

Regards,

Leo.

On 22.09.2010, at 09:27, Chris Jansen wrote:

> Hi all,
>  
> I have written a test application that does a write, read and delete on one 
> of the sample column families that ship with Cassandra, and for some reason 
> when I leave it going for an extended period of time I see Cassandra crash 
> with out of heap exceptions. I don’t understand why this should be as I am 
> deleting the data almost as soon as I have read it.
>  
> Also I am seeing the data files grow for Keyspace1, again with apparently no 
> reason as I am deleting the data as I read it, which eventually causes the 
> disk space to completely fill up.
>  
> How can this be, am I using Cassandra in the wrong way or is this a bug?
>  
> Any help or advice would be greatly appreciated.
>  
> Thanks in advance,
>  
> Chris
>  
>  
> PS To give a better idea of what I am doing I’ve included some of the source 
> from my Java test app, typically I have 20 threads running in parallel 
> performing this operation:
>  
> while(true)
> {
> long startTime = System.currentTimeMillis();
> key = UUID.randomUUID().toString();
> long timestamp = System.currentTimeMillis();
> ColumnPath colPathFdl = new ColumnPath(columnFamily);
> colPathFdl.setColumn(("345345345354"+key).getBytes(UTF8));
>  
> boolean broken = true;
>  
> while(broken)
> {
> try
> {
> client.insert(keyspace, key, colPathFdl, 
> getBytesFromFile(new 
> File("/opt/java/apache-cassandra/conf/storage-conf.xml")),timestamp, 
> ConsistencyLevel.QUORUM);
> broken = false;
> }
> catch(Exception e)
> {
> System.out.println("Cannot write: "+key+" 
> RETRYING");
> broken=true;
> e.printStackTrace();
> }
> }
>
> try
> {
> Column col = client1.get(keyspace, key, 
> colPathFdl,ConsistencyLevel.QUORUM).getColumn();
> System.out.println(key +" column name: " + new 
> String(col.name, UTF8));
> //System.out.println("column value: " + new 
> String(col.value, UTF8));
> System.out.println(key +" column timestamp: " + new 
> Date(col.timestamp));
>
> }
> catch(Exception e)
> {
> System.out.println("Cannot read: "+key);
> e.printStackTrace();   
> }
>
> try
> {
> System.out.println(key +" delete column:: "+key);
> client.remove(keyspace, key, colPathFdl, timestamp, 
> ConsistencyLevel.QUORUM);
> }
> catch(Exception e)
> {
> System.out.println("Cannot delete: "+key);
> e.printStackTrace();   
> }
>
> long stopTime = System.currentTimeMillis();
> long timeTaken = stopTime -startTime;
> System.err.println(Thread.currentThread().getName() +  " 
> " +key+ " Last operation took "+ timeTaken+"ms" );
> }
>  
> 
> 
> 
> NOTICE: Cognito Limited. Benham Valence, Newbury, Berkshire, RG20 8LU. UK. 
> Company number 02723032. This e-mail message and any attachment is 
> confidential. It may not be disclosed to or used by anyone other than the 
> intended recipient. If you have received this e-mail in error please notify 
> the sender immediately then delete it from your system. Whilst every effort 
> has been made to check this mail is virus free we accept no responsibility 
> for software viruses and you should check for viruses before opening any 
> attachments. Opinions, conclusions and other information in this email and 
> any attachments which do not relate to the official business of the company 
> are neither given by the company nor endorsed by it.
> 
> This email message has been scanned for viruses by Mimecast
> 



Re: Running out of heap

2010-09-22 Thread Dan Washusen
http://wiki.apache.org/cassandra/FAQ#i_deleted_what_gives

That help?

On Wed, Sep 22, 2010 at 5:27 PM, Chris Jansen <
chris.jan...@cognitomobile.com> wrote:

> Hi all,
>
>
>
> I have written a test application that does a write, read and delete on one
> of the sample column families that ship with Cassandra, and for some reason
> when I leave it going for an extended period of time I see Cassandra crash
> with out of heap exceptions. I don’t understand why this should be as I am
> deleting the data almost as soon as I have read it.
>
>
>
> Also I am seeing the data files grow for Keyspace1, again with apparently
> no reason as I am deleting the data as I read it, which eventually causes
> the disk space to completely fill up.
>
>
>
> How can this be, am I using Cassandra in the wrong way or is this a bug?
>
>
>
> Any help or advice would be greatly appreciated.
>
>
>
> Thanks in advance,
>
>
>
> Chris
>
>
>
>
>
> PS To give a better idea of what I am doing I’ve included some of the
> source from my Java test app, typically I have 20 threads running in
> parallel performing this operation:
>
>
>
> while(true)
>
> {
>
> long startTime = System.currentTimeMillis();
>
> key = UUID.randomUUID().toString();
>
> long timestamp = System.currentTimeMillis();
>
> ColumnPath colPathFdl = new ColumnPath(columnFamily);
>
>
> colPathFdl.setColumn(("345345345354"+key).getBytes(UTF8));
>
>
>
> boolean broken = true;
>
>
>
> while(broken)
>
> {
>
> try
>
> {
>
> client.insert(keyspace, key, colPathFdl,
> getBytesFromFile(new
> File("/opt/java/apache-cassandra/conf/storage-conf.xml")),timestamp,
> ConsistencyLevel.QUORUM);
>
> broken = false;
>
> }
>
> catch(Exception e)
>
> {
>
> System.out.println("Cannot write: "+key+"
> RETRYING");
>
> broken=true;
>
> e.printStackTrace();
>
> }
>
> }
>
>
>
> try
>
> {
>
> Column col = client1.get(keyspace, key,
> colPathFdl,ConsistencyLevel.QUORUM).getColumn();
>
> System.out.println(key +" column name: " + new
> String(col.name, UTF8));
>
> //System.out.println("column value: " + new
> String(col.value, UTF8));
>
> System.out.println(key +" column timestamp: " + new
> Date(col.timestamp));
>
>
>
> }
>
> catch(Exception e)
>
> {
>
> System.out.println("Cannot read: "+key);
>
> e.printStackTrace();
>
> }
>
>
>
> try
>
> {
>
> System.out.println(key +" delete column:: "+key);
>
> client.remove(keyspace, key, colPathFdl, timestamp,
> ConsistencyLevel.QUORUM);
>
> }
>
> catch(Exception e)
>
> {
>
> System.out.println("Cannot delete: "+key);
>
> e.printStackTrace();
>
> }
>
>
>
> long stopTime = System.currentTimeMillis();
>
> long timeTaken = stopTime -startTime;
>
> System.err.println(Thread.currentThread().getName() +
> " " +key+ " Last operation took "+ timeTaken+"ms" );
>
> }
>
>
>
>
>
>  NOTICE: Cognito Limited. Benham Valence, Newbury, Berkshire, RG20 8LU. UK.
> Company number 02723032. This e-mail message and any attachment is
> confidential. It may not be disclosed to or used by anyone other than the
> intended recipient. If you have received this e-mail in error please notify
> the sender immediately then delete it from your system. Whilst every effort
> has been made to check this mail is virus free we accept no responsibility
> for software viruses and you should check for viruses before opening any
> attachments. Opinions, conclusions and other information in this email and
> any attachments which do not relate to the official business of the company
> are neither given by the company nor endorsed by it.
>
>   This email message has been scanned for viruses by 
> Mimecast
>


RE: Running out of heap

2010-09-22 Thread Chris Jansen
Thanks Leo, I'll have a read.

 

Regards,

 

Chris

 

From: Matthias L. Jugel [mailto:l...@thinkberg.com] 
Sent: 22 September 2010 08:39
To: user@cassandra.apache.org
Subject: Re: Running out of heap

 

We had similar problems. It may help to read this: 
http://blog.mikiobraun.de/ (Tuning GC for Cassandra)

Regards,

Leo.

 

On 22.09.2010, at 09:27, Chris Jansen wrote:





Hi all,

 

I have written a test application that does a write, read and delete on
one of the sample column families that ship with Cassandra, and for some
reason when I leave it going for an extended period of time I see
Cassandra crash with out of heap exceptions. I don't understand why this
should be as I am deleting the data almost as soon as I have read it.

 

Also I am seeing the data files grow for Keyspace1, again with
apparently no reason as I am deleting the data as I read it, which
eventually causes the disk space to completely fill up.

 

How can this be, am I using Cassandra in the wrong way or is this a bug?

 

Any help or advice would be greatly appreciated.

 

Thanks in advance,

 

Chris

 

 

PS To give a better idea of what I am doing I've included some of the
source from my Java test app, typically I have 20 threads running in
parallel performing this operation:

 

while(true)

{

long startTime = System.currentTimeMillis();

key = UUID.randomUUID().toString();

long timestamp = System.currentTimeMillis();

ColumnPath colPathFdl = new
ColumnPath(columnFamily);

 
colPathFdl.setColumn(("345345345354"+key).getBytes(UTF8));

 

boolean broken = true;

 

while(broken)

{

try

{

client.insert(keyspace, key, colPathFdl,
getBytesFromFile(new
File("/opt/java/apache-cassandra/conf/storage-conf.xml")),timestamp,
ConsistencyLevel.QUORUM);

broken = false;

}

catch(Exception e)

{

System.out.println("Cannot write: "+key+"
RETRYING");

broken=true;

e.printStackTrace();

}

}

   

try

{

Column col = client1.get(keyspace, key,
colPathFdl,ConsistencyLevel.QUORUM).getColumn();

System.out.println(key +" column name: " + new
String(col.name  , UTF8));

//System.out.println("column value: " + new
String(col.value, UTF8));

System.out.println(key +" column timestamp: " +
new Date(col.timestamp));

   

}

catch(Exception e)

{

System.out.println("Cannot read: "+key);

e.printStackTrace();   

}

   

try

{

System.out.println(key +" delete column::
"+key);

client.remove(keyspace, key, colPathFdl,
timestamp, ConsistencyLevel.QUORUM);

}

catch(Exception e)

{

System.out.println("Cannot delete: "+key);

e.printStackTrace();   

}

   

long stopTime = System.currentTimeMillis();

long timeTaken = stopTime -startTime;

System.err.println(Thread.currentThread().getName()
+  " " +key+ " Last operation took "+ timeTaken+"ms" );

}

 




NOTICE: Cognito Limited. Benham Valence, Newbury, Berkshire, RG20 8LU.
UK. Company number 02723032. This e-mail message and any attachment is
confidential. It may not be disclosed to or used by anyone other than
the intended recipient. If you have received this e-mail in error please
notify the sender immediately then delete it from your system. Whilst
every effort has been made to check this mail is virus free we accept no
responsibility for software viruses and you should check for viruses
before opening any attachments. Opinions, conclusions and other
information in this email and any attachments which do not relate to the
official business of the company are neither given by the company nor
endorsed by it.

This email message has been scanned for viruses by Mimecast
 

 


RE: Running out of heap

2010-09-22 Thread Chris Jansen
Hi Dan,

 

I do see compaction happen, I keep a close eye on the disk usage and
what I see is the usage grow then shrink, but it despite the periodic
compaction the overall result is a slow but steady growth.

 

Regards,

 

Chris

 

From: Dan Washusen [mailto:d...@reactive.org] 
Sent: 22 September 2010 08:39
To: user@cassandra.apache.org
Subject: Re: Running out of heap

 

http://wiki.apache.org/cassandra/FAQ#i_deleted_what_gives

 

That help?

On Wed, Sep 22, 2010 at 5:27 PM, Chris Jansen
 wrote:

Hi all,

 

I have written a test application that does a write, read and delete on
one of the sample column families that ship with Cassandra, and for some
reason when I leave it going for an extended period of time I see
Cassandra crash with out of heap exceptions. I don't understand why this
should be as I am deleting the data almost as soon as I have read it. 

 

Also I am seeing the data files grow for Keyspace1, again with
apparently no reason as I am deleting the data as I read it, which
eventually causes the disk space to completely fill up.

 

How can this be, am I using Cassandra in the wrong way or is this a bug?

 

Any help or advice would be greatly appreciated.

 

Thanks in advance,

 

Chris

 

 

PS To give a better idea of what I am doing I've included some of the
source from my Java test app, typically I have 20 threads running in
parallel performing this operation: 

 

while(true)

{

long startTime = System.currentTimeMillis();

key = UUID.randomUUID().toString();

long timestamp = System.currentTimeMillis();

ColumnPath colPathFdl = new
ColumnPath(columnFamily);

 
colPathFdl.setColumn(("345345345354"+key).getBytes(UTF8));

 

boolean broken = true;

 

while(broken)

{

try

{

client.insert(keyspace, key, colPathFdl,
getBytesFromFile(new
File("/opt/java/apache-cassandra/conf/storage-conf.xml")),timestamp,
ConsistencyLevel.QUORUM);

broken = false;

}

catch(Exception e)

{

System.out.println("Cannot write: "+key+"
RETRYING");

broken=true;

e.printStackTrace();

}

}



try

{

Column col = client1.get(keyspace, key,
colPathFdl,ConsistencyLevel.QUORUM).getColumn();

System.out.println(key +" column name: " + new
String(col.name, UTF8));

//System.out.println("column value: " + new
String(col.value, UTF8));

System.out.println(key +" column timestamp: " +
new Date(col.timestamp));



}

catch(Exception e)

{

System.out.println("Cannot read: "+key);

e.printStackTrace();

}



try

{

System.out.println(key +" delete column::
"+key);

client.remove(keyspace, key, colPathFdl,
timestamp, ConsistencyLevel.QUORUM);

}

catch(Exception e)

{

System.out.println("Cannot delete: "+key);

e.printStackTrace();

}



long stopTime = System.currentTimeMillis();

long timeTaken = stopTime -startTime;

System.err.println(Thread.currentThread().getName()
+  " " +key+ " Last operation took "+ timeTaken+"ms" );

}

 




NOTICE: Cognito Limited. Benham Valence, Newbury, Berkshire, RG20 8LU.
UK. Company number 02723032. This e-mail message and any attachment is
confidential. It may not be disclosed to or used by anyone other than
the intended recipient. If you have received this e-mail in error please
notify the sender immediately then delete it from your system. Whilst
every effort has been made to check this mail is virus free we accept no
responsibility for software viruses and you should check for viruses
before opening any attachments. Opinions, conclusions and other
information in this email and any attachments which do not relate to the
official business of the company are neither given by the company nor
endorsed by it.

This email message has been scanned for viruses by Mimecast
  

 


Re: Running out of heap

2010-09-22 Thread Dan Washusen
A key point in that FAQ entry is that the deletes don't occur until after
the configured GCGraceSeconds (10 days is the default I believe).

This (http://wiki.apache.org/cassandra/FAQ#slows_down_after_lotso_inserts)
FAQ entry mentions your scenario and suggests either increasing the memory
allocation to the JVM or decreasing the insert threshold before Cassandra
flushes its memtables...

On Wed, Sep 22, 2010 at 5:51 PM, Chris Jansen <
chris.jan...@cognitomobile.com> wrote:

> Hi Dan,
>
>
>
> I do see compaction happen, I keep a close eye on the disk usage and what I
> see is the usage grow then shrink, but it despite the periodic compaction
> the overall result is a slow but steady growth.
>
>
>
> Regards,
>
>
>
> Chris
>
>
>
> *From:* Dan Washusen [mailto:d...@reactive.org]
> *Sent:* 22 September 2010 08:39
> *To:* user@cassandra.apache.org
> *Subject:* Re: Running out of heap
>
>
>
> http://wiki.apache.org/cassandra/FAQ#i_deleted_what_gives
>
>
>
> That help?
>
> On Wed, Sep 22, 2010 at 5:27 PM, Chris Jansen <
> chris.jan...@cognitomobile.com> wrote:
>
> Hi all,
>
>
>
> I have written a test application that does a write, read and delete on one
> of the sample column families that ship with Cassandra, and for some reason
> when I leave it going for an extended period of time I see Cassandra crash
> with out of heap exceptions. I don’t understand why this should be as I am
> deleting the data almost as soon as I have read it.
>
>
>
> Also I am seeing the data files grow for Keyspace1, again with apparently
> no reason as I am deleting the data as I read it, which eventually causes
> the disk space to completely fill up.
>
>
>
> How can this be, am I using Cassandra in the wrong way or is this a bug?
>
>
>
> Any help or advice would be greatly appreciated.
>
>
>
> Thanks in advance,
>
>
>
> Chris
>
>
>
>
>
> PS To give a better idea of what I am doing I’ve included some of the
> source from my Java test app, typically I have 20 threads running in
> parallel performing this operation:
>
>
>
> while(true)
>
> {
>
> long startTime = System.currentTimeMillis();
>
> key = UUID.randomUUID().toString();
>
> long timestamp = System.currentTimeMillis();
>
> ColumnPath colPathFdl = new ColumnPath(columnFamily);
>
>
> colPathFdl.setColumn(("345345345354"+key).getBytes(UTF8));
>
>
>
> boolean broken = true;
>
>
>
> while(broken)
>
> {
>
> try
>
> {
>
> client.insert(keyspace, key, colPathFdl,
> getBytesFromFile(new
> File("/opt/java/apache-cassandra/conf/storage-conf.xml")),timestamp,
> ConsistencyLevel.QUORUM);
>
> broken = false;
>
> }
>
> catch(Exception e)
>
> {
>
> System.out.println("Cannot write: "+key+"
> RETRYING");
>
> broken=true;
>
> e.printStackTrace();
>
> }
>
> }
>
>
>
> try
>
> {
>
> Column col = client1.get(keyspace, key,
> colPathFdl,ConsistencyLevel.QUORUM).getColumn();
>
> System.out.println(key +" column name: " + new
> String(col.name, UTF8));
>
> //System.out.println("column value: " + new
> String(col.value, UTF8));
>
> System.out.println(key +" column timestamp: " + new
> Date(col.timestamp));
>
>
>
> }
>
> catch(Exception e)
>
> {
>
> System.out.println("Cannot read: "+key);
>
> e.printStackTrace();
>
> }
>
>
>
> try
>
> {
>
> System.out.println(key +" delete column:: "+key);
>
> client.remove(keyspace, key, colPathFdl, timestamp,
> ConsistencyLevel.QUORUM);
>
> }
>
> catch(Exception e)
>
> {
>
> System.out.println("Cannot delete: "+key);
>
> e.printStackTrace();
>
> }
>
>
>
> long stopTime = System.currentTimeMillis();
>
> long timeTaken = stopTime -startTime;
>
> System.err.println(Thread.currentThread().getName() +
> " " +key+ " Last operation took "+ timeTaken+"ms" );
>
> }
>
>
>
>
>
>
> NOTICE: Cognito Limited. Benham Valence, Newbury, Berkshire, RG20 8LU. UK.
> Company number 02723032. This e-mail message and any attachment is
> confidential. It may not be disclosed to or used by anyone other than the
> intended recipient. If you have received this e-mail in error please not

Moving from 0.7.0-beta1 to nightly build

2010-09-22 Thread andy C
I'm running a test cluster for development and evaluation of Cassandra.  In 
order to use the latest build of Hector (the 0.7.0 branch) I've need to move 
from 0.6.5 first to  0.7.0-beta1 of Cassandra and then to the latest nightly 
build (actually 2010-09-20_14-20-20).  In order to move over I've followed the 
following procedure:

1: get 0.7.0 running on all nodes, use schematool to update schema
2: confirm with cassandra-cli that the schema looks OK
3: Take down all nodes
4: on one node install nightly build
5:use config-converter to create config from 0.6.5 to nightly config
6: Change RackUnawareStrategy to SimpleStrategy in cassandra.yaml
7: start Cassandra

However I am still getting RackUnawareStrategy exceptions (output below). 

Any ideas on the proper procedure ?
Ta
Andy

 Using adaptive heap size:  1002M
 INFO 09:12:15,962 JNA not found. Native methods will be disabled.
 INFO 09:12:16,200 DiskAccessMode 'auto' determined to be standard, 
indexAccessMode is standard
 INFO 09:12:16,368 Sampling index for 
/var/lib/cassandra/data/system/Schema-e-2-<>
 INFO 09:12:16,393 Sampling index for 
/var/lib/cassandra/data/system/Schema-e-1-<>
 INFO 09:12:16,425 Sampling index for 
/var/lib/cassandra/data/system/Migrations-e-2-<>
 INFO 09:12:16,427 Sampling index for 
/var/lib/cassandra/data/system/Migrations-e-1-<>
 INFO 09:12:16,436 Sampling index for 
/var/lib/cassandra/data/system/LocationInfo-e-9-<>
 INFO 09:12:16,513 Loading schema version 6821232f-c248-11df-bad6-869ef8d6f292
ERROR 09:12:16,866 Exception encountered during startup.
java.lang.RuntimeException: Could not create ReplicationStrategy of type 
org.apache.cassandra.locator.RackUnawareStrategy
at org.apache.cassandra.config.KSMetaData.inflate(KSMetaData.java:103)
at org.apache.cassandra.db.DefsTable.loadFromStorage(DefsTable.java:106)
at 
org.apache.cassandra.config.DatabaseDescriptor.loadSchemas(DatabaseDescriptor.java:441)
at 
org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:109)
at 
org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:54)
at 
org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:199)
at 
org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:133)
Caused by: java.lang.ClassNotFoundException: 
org.apache.cassandra.locator.RackUnawareStrategy
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.apache.cassandra.config.KSMetaData.inflate(KSMetaData.java:99)
... 6 more
Exception encountered during startup.
java.lang.RuntimeException: Could not create ReplicationStrategy of type 
org.apache.cassandra.locator.RackUnawareStrategy
at org.apache.cassandra.config.KSMetaData.inflate(KSMetaData.java:103)
at org.apache.cassandra.db.DefsTable.loadFromStorage(DefsTable.java:106)
at 
org.apache.cassandra.config.DatabaseDescriptor.loadSchemas(DatabaseDescriptor.java:441)
at 
org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:109)
at 
org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:54)
at 
org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:199)
at 
org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:133)
Caused by: java.lang.ClassNotFoundException: 
org.apache.cassandra.locator.RackUnawareStrategy
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.apache.cassandra.config.KSMetaData.inflate(KSMetaData.java:99)
... 6 more
The University of Dundee is a Scottish Registered Charity, No. SC015096.




Re: nodetool repair

2010-09-22 Thread Daniel Doubleday
Hi all,
just wanted to make sure that I get this right:
What this means is that I have to schedule repairs only on every RFs node?
So with 4 nodes and RF=2 I would repair nodes 1 and 3
and with 6 nodes and RF=3 I would repair nodes 1 and 4
and that would lead to a synched cluster?

> On Thu, Jul 15, 2010 at 1:54 PM, B. Todd Burruss  wrote:
> > if i have N=3 and run nodetool repair on node X.  i assume that merkle
> > trees (at a minimum) are calculated on nodes X, X+1, and X+2 (since
> > N=3).  when the repair is finished are nodes X, X+1, and X+2 all in sync
> > with respect to node X's data?
> 
> yes.
> 
> -- 
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com



Re: Thrift gen problem with cassandra.thrift

2010-09-22 Thread Jeremy Hanna
Did you build thrift with the specific subversion revision that Cassandra uses?
http://wiki.apache.org/cassandra/InstallThrift

On Sep 22, 2010, at 2:35 AM, Shashank Tiwari wrote:

> I installed thrift successfully on Snow Leaopard. However, when I run 
> thrift -gen java interface/cassandra.thrift with Cassandra 0.6.5, I get an 
> error which reads as follows:
> apache-cassandra-0.6.5/interface/cassandra.thrift:303] error: identifier 
> ONE is unqualified!
> Line 303 of cassandra.thrift is highlighted in the text below:
> 
> 296   /**
> 297 Get the Column or SuperColumn at the given column_path. If no value 
> is present, NotFoundException is thrown. (This is
> 298 the only method that can throw an exception under non-failure 
> conditions.)
> 299*/
> 300   ColumnOrSuperColumn get(1:required string keyspace,
> 301   2:required string key,
> 302   3:required ColumnPath column_path,
> 303   4:required ConsistencyLevel 
> consistency_level=ONE)
> 304   throws (1:InvalidRequestException ire, 
> 2:NotFoundException nfe, 3:UnavailableException ue, 4:TimedOutException 
> te),
> 305 
> 
> Could somebody please help resolve this problem and also explain what's going 
> on here.
> 
> Thanks, Shashank



RE: Running out of heap

2010-09-22 Thread Chris Jansen
Thanks Dan, I've reduced the GCGraceSeconds to a number of hours for my
testing, and Cassandra is now removing the old records.

 

The link provided by Leo helped a lot also, I've been able to tune the
garbage collector to better suit the rapid creation and removal of data.

 

Thanks again,

 

Chris

 

From: Dan Washusen [mailto:d...@reactive.org] 
Sent: 22 September 2010 09:11
To: user@cassandra.apache.org
Subject: Re: Running out of heap

 

A key point in that FAQ entry is that the deletes don't occur until
after the configured GCGraceSeconds (10 days is the default I believe).


 

This
(http://wiki.apache.org/cassandra/FAQ#slows_down_after_lotso_inserts)
FAQ entry mentions your scenario and suggests either increasing the
memory allocation to the JVM or decreasing the insert threshold before
Cassandra flushes its memtables...

 

On Wed, Sep 22, 2010 at 5:51 PM, Chris Jansen
 wrote:

Hi Dan,

 

I do see compaction happen, I keep a close eye on the disk usage and
what I see is the usage grow then shrink, but it despite the periodic
compaction the overall result is a slow but steady growth.

 

Regards,

 

Chris

 

From: Dan Washusen [mailto:d...@reactive.org] 

Sent: 22 September 2010 08:39
To: user@cassandra.apache.org
Subject: Re: Running out of heap

 

http://wiki.apache.org/cassandra/FAQ#i_deleted_what_gives

 

That help?

On Wed, Sep 22, 2010 at 5:27 PM, Chris Jansen
 wrote:

Hi all,

 

I have written a test application that does a write, read and delete on
one of the sample column families that ship with Cassandra, and for some
reason when I leave it going for an extended period of time I see
Cassandra crash with out of heap exceptions. I don't understand why this
should be as I am deleting the data almost as soon as I have read it. 

 

Also I am seeing the data files grow for Keyspace1, again with
apparently no reason as I am deleting the data as I read it, which
eventually causes the disk space to completely fill up.

 

How can this be, am I using Cassandra in the wrong way or is this a bug?

 

Any help or advice would be greatly appreciated.

 

Thanks in advance,

 

Chris

 

 

PS To give a better idea of what I am doing I've included some of the
source from my Java test app, typically I have 20 threads running in
parallel performing this operation: 

 

while(true)

{

long startTime = System.currentTimeMillis();

key = UUID.randomUUID().toString();

long timestamp = System.currentTimeMillis();

ColumnPath colPathFdl = new
ColumnPath(columnFamily);

 
colPathFdl.setColumn(("345345345354"+key).getBytes(UTF8));

 

boolean broken = true;

 

while(broken)

{

try

{

client.insert(keyspace, key, colPathFdl,
getBytesFromFile(new
File("/opt/java/apache-cassandra/conf/storage-conf.xml")),timestamp,
ConsistencyLevel.QUORUM);

broken = false;

}

catch(Exception e)

{

System.out.println("Cannot write: "+key+"
RETRYING");

broken=true;

e.printStackTrace();

}

}



try

{

Column col = client1.get(keyspace, key,
colPathFdl,ConsistencyLevel.QUORUM).getColumn();

System.out.println(key +" column name: " + new
String(col.name, UTF8));

//System.out.println("column value: " + new
String(col.value, UTF8));

System.out.println(key +" column timestamp: " +
new Date(col.timestamp));



}

catch(Exception e)

{

System.out.println("Cannot read: "+key);

e.printStackTrace();

}



try

{

System.out.println(key +" delete column::
"+key);

client.remove(keyspace, key, colPathFdl,
timestamp, ConsistencyLevel.QUORUM);

}

catch(Exception e)

{

System.out.println("Cannot delete: "+key);

e.printStackTrace();

}



long stopTime = System.currentTimeMillis();

long timeTaken = stopTime -startTime;

System.err.println(Thread.currentThread().getName()
+  " " +key+ " Last operation took "+ timeTaken+"ms" );

}

 




NOTICE: Cognito Limited. Benham Valence, Newbury, B

Re: Backporting Data Center Shard Strategy

2010-09-22 Thread Jonathan Ellis
DSS is broken in 0.6 and was removed from 0.6.6 to make it (even more)
clear that you shouldn't be using it.

On Wed, Sep 22, 2010 at 12:23 AM, rbukshin rbukshin  wrote:
> The one in 0.6 doesn't allow controlling number of replicas to place in
> other DC. Atmost 1 copy of data can be placed in other DC.
>
> What are other differences between the implementation in 0.6 vs 0.7?
>
>
>
> On Tue, Sep 21, 2010 at 10:03 PM, Benjamin Black  wrote:
>>
>> DCShard is in 0.6.  It has been rewritten in 0.7.
>>
>> On Tue, Sep 21, 2010 at 10:02 PM, rbukshin rbukshin 
>> wrote:
>> > Is there any plan to backport DataCenterShardStrategy to 0.6.x from 0.7?
>> > It
>> > will be very useful for those who don't want to make drastic changes in
>> > their code and get the benefits of this replica placement strategy.
>> >
>> > --
>> > Thanks,
>> > -rbukshin
>> >
>> >
>
>
>
> --
> Thanks,
> -rbukshin
>
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com


Re: Moving from 0.7.0-beta1 to nightly build

2010-09-22 Thread Jonathan Ellis
the strategy is saved as part of your schema.  install the new build
before loading it.

On Wed, Sep 22, 2010 at 3:35 AM, andy C  wrote:
> I'm running a test cluster for development and evaluation of Cassandra.  In
> order to use the latest build of Hector (the 0.7.0 branch) I've need to move
> from 0.6.5 first to  0.7.0-beta1 of Cassandra and then to the latest nightly
> build (actually 2010-09-20_14-20-20).  In order to move over I've followed
> the following procedure:
> 1: get 0.7.0 running on all nodes, use schematool to update schema
> 2: confirm with cassandra-cli that the schema looks OK
> 3: Take down all nodes
> 4: on one node install nightly build
> 5:use config-converter to create config from 0.6.5 to nightly config
> 6: Change RackUnawareStrategy to SimpleStrategy in cassandra.yaml
> 7: start Cassandra
> However I am still getting RackUnawareStrategy exceptions (output below).
> Any ideas on the proper procedure ?
> Ta
> Andy
>  Using adaptive heap size:  1002M
>  INFO 09:12:15,962 JNA not found. Native methods will be disabled.
>  INFO 09:12:16,200 DiskAccessMode 'auto' determined to be standard,
> indexAccessMode is standard
>  INFO 09:12:16,368 Sampling index for
> /var/lib/cassandra/data/system/Schema-e-2-<>
>  INFO 09:12:16,393 Sampling index for
> /var/lib/cassandra/data/system/Schema-e-1-<>
>  INFO 09:12:16,425 Sampling index for
> /var/lib/cassandra/data/system/Migrations-e-2-<>
>  INFO 09:12:16,427 Sampling index for
> /var/lib/cassandra/data/system/Migrations-e-1-<>
>  INFO 09:12:16,436 Sampling index for
> /var/lib/cassandra/data/system/LocationInfo-e-9-<>
>  INFO 09:12:16,513 Loading schema version
> 6821232f-c248-11df-bad6-869ef8d6f292
> ERROR 09:12:16,866 Exception encountered during startup.
> java.lang.RuntimeException: Could not create ReplicationStrategy of type
> org.apache.cassandra.locator.RackUnawareStrategy
>     at
> org.apache.cassandra.config.KSMetaData.inflate(KSMetaData.java:103)
>     at
> org.apache.cassandra.db.DefsTable.loadFromStorage(DefsTable.java:106)
>     at
> org.apache.cassandra.config.DatabaseDescriptor.loadSchemas(DatabaseDescriptor.java:441)
>     at
> org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:109)
>     at
> org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:54)
>     at
> org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:199)
>     at
> org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:133)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.cassandra.locator.RackUnawareStrategy
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>     at java.lang.Class.forName0(Native Method)
>     at java.lang.Class.forName(Class.java:169)
>     at
> org.apache.cassandra.config.KSMetaData.inflate(KSMetaData.java:99)
>     ... 6 more
> Exception encountered during startup.
> java.lang.RuntimeException: Could not create ReplicationStrategy of type
> org.apache.cassandra.locator.RackUnawareStrategy
>     at
> org.apache.cassandra.config.KSMetaData.inflate(KSMetaData.java:103)
>     at
> org.apache.cassandra.db.DefsTable.loadFromStorage(DefsTable.java:106)
>     at
> org.apache.cassandra.config.DatabaseDescriptor.loadSchemas(DatabaseDescriptor.java:441)
>     at
> org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:109)
>     at
> org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:54)
>     at
> org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:199)
>     at
> org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:133)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.cassandra.locator.RackUnawareStrategy
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>     at java.lang.Class.forName0(Native Method)
>     at java.lang.Class.forName(Class.java:169)
>     at
> org.apache.cassandra.config.KSMetaData.inflate(KSMetaData.java:99)
>     ... 6 more
> The University of Dundee is a Scottish Registered Charity, No. SC015096.



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source

Re: nodetool repair

2010-09-22 Thread Jonathan Ellis
if you're using RackUnawareStrategy that should work.

On Wed, Sep 22, 2010 at 5:27 AM, Daniel Doubleday
 wrote:
> Hi all,
>
> just wanted to make sure that I get this right:
>
> What this means is that I have to schedule repairs only on every RFs node?
>
> So with 4 nodes and RF=2 I would repair nodes 1 and 3
>
> and with 6 nodes and RF=3 I would repair nodes 1 and 4
>
> and that would lead to a synched cluster?
>
> On Thu, Jul 15, 2010 at 1:54 PM, B. Todd Burruss  wrote:
>> if i have N=3 and run nodetool repair on node X.  i assume that merkle
>> trees (at a minimum) are calculated on nodes X, X+1, and X+2 (since
>> N=3).  when the repair is finished are nodes X, X+1, and X+2 all in sync
>> with respect to node X's data?
>
> yes.
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com


Re: Moving from 0.7.0-beta1 to nightly build

2010-09-22 Thread AeC

Sorry Jonathan, not quite getting you

I'd gathered the strategy is stored in the schema.  However I'm not quite
getting what you mean, "Install the new build before loading it"  Are you
saying I should load the new build on a clean machine and use schematool to
import the schema from the beta1 cluster ?

Andy

On 22/09/2010 15:28, "Jonathan Ellis"  wrote:

> the strategy is saved as part of your schema.  install the new build
> before loading it.
> 
> On Wed, Sep 22, 2010 at 3:35 AM, andy C 
> wrote:
>> I'm running a test cluster for development and evaluation of Cassandra.  In
>> order to use the latest build of Hector (the 0.7.0 branch) I've need to move
>> from 0.6.5 first to  0.7.0-beta1 of Cassandra and then to the latest nightly
>> build (actually 2010-09-20_14-20-20).  In order to move over I've followed
>> the following procedure:
>> 1: get 0.7.0 running on all nodes, use schematool to update schema
>> 2: confirm with cassandra-cli that the schema looks OK
>> 3: Take down all nodes
>> 4: on one node install nightly build
>> 5:use config-converter to create config from 0.6.5 to nightly config
>> 6: Change RackUnawareStrategy to SimpleStrategy in cassandra.yaml
>> 7: start Cassandra
>> However I am still getting RackUnawareStrategy exceptions (output below).
>


The University of Dundee is a Scottish Registered Charity, No. SC015096.




Riptano Cassandra training in Seattle

2010-09-22 Thread Jonathan Ellis
Riptano is going to be in Seattle on Oct 8 for a full-day Cassandra
training, taught by Ben Black, who many of you know from IRC and this
list. The training is broken into two parts: the first covers
application design and modeling in Cassandra, with exercises using the
Pycassa library; the second covers operations, troubleshooting, and
performance tuning.  We're also hosting a happy hour the night before
at http://cassandrahappyhour.eventbrite.com/.

For more details or to register for the training, see
http://www.eventbrite.com/event/756085472

-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com


Re: Riptano Cassandra training in Seattle

2010-09-22 Thread Jonathan Ellis
Oops, correct link for Seattle: http://www.eventbrite.com/event/763062340

On Wed, Sep 22, 2010 at 11:26 AM, Jonathan Ellis  wrote:
> Riptano is going to be in Seattle on Oct 8 for a full-day Cassandra
> training, taught by Ben Black, who many of you know from IRC and this
> list. The training is broken into two parts: the first covers
> application design and modeling in Cassandra, with exercises using the
> Pycassa library; the second covers operations, troubleshooting, and
> performance tuning.  We're also hosting a happy hour the night before
> at http://cassandrahappyhour.eventbrite.com/.
>
> For more details or to register for the training, see
> http://www.eventbrite.com/event/756085472
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com


RE: Riptano Cassandra training in Seattle

2010-09-22 Thread Parsacala Jr, Nazario R. [Tech]
Any training in the East Coast ..?

-Original Message-
From: Jonathan Ellis [mailto:jbel...@gmail.com] 
Sent: Wednesday, September 22, 2010 12:41 PM
To: user
Subject: Re: Riptano Cassandra training in Seattle

Oops, correct link for Seattle: http://www.eventbrite.com/event/763062340

On Wed, Sep 22, 2010 at 11:26 AM, Jonathan Ellis  wrote:
> Riptano is going to be in Seattle on Oct 8 for a full-day Cassandra
> training, taught by Ben Black, who many of you know from IRC and this
> list. The training is broken into two parts: the first covers
> application design and modeling in Cassandra, with exercises using the
> Pycassa library; the second covers operations, troubleshooting, and
> performance tuning.  We're also hosting a happy hour the night before
> at http://cassandrahappyhour.eventbrite.com/.
>
> For more details or to register for the training, see
> http://www.eventbrite.com/event/756085472
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com


Re: nodetool repair

2010-09-22 Thread Gurpreet Singh
Is this also true for RackAware with alternating nodes from 2 datacenters on
the ring?

On Wed, Sep 22, 2010 at 7:28 AM, Jonathan Ellis  wrote:

> if you're using RackUnawareStrategy that should work.
>
> On Wed, Sep 22, 2010 at 5:27 AM, Daniel Doubleday
>  wrote:
> > Hi all,
> >
> > just wanted to make sure that I get this right:
> >
> > What this means is that I have to schedule repairs only on every RFs
> node?
> >
> > So with 4 nodes and RF=2 I would repair nodes 1 and 3
> >
> > and with 6 nodes and RF=3 I would repair nodes 1 and 4
> >
> > and that would lead to a synched cluster?
> >
> > On Thu, Jul 15, 2010 at 1:54 PM, B. Todd Burruss 
> wrote:
> >> if i have N=3 and run nodetool repair on node X.  i assume that merkle
> >> trees (at a minimum) are calculated on nodes X, X+1, and X+2 (since
> >> N=3).  when the repair is finished are nodes X, X+1, and X+2 all in sync
> >> with respect to node X's data?
> >
> > yes.
> >
> > --
> > Jonathan Ellis
> > Project Chair, Apache Cassandra
> > co-founder of Riptano, the source for professional Cassandra support
> > http://riptano.com
> >
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>


Re: Riptano Cassandra training in Seattle

2010-09-22 Thread Jonathan Ellis
We had one in NYC in August. We're lining up another East coast location soon.

On Wed, Sep 22, 2010 at 11:51 AM, Parsacala Jr, Nazario R. [Tech]
 wrote:
> Any training in the East Coast ..?
>
> -Original Message-
> From: Jonathan Ellis [mailto:jbel...@gmail.com]
> Sent: Wednesday, September 22, 2010 12:41 PM
> To: user
> Subject: Re: Riptano Cassandra training in Seattle
>
> Oops, correct link for Seattle: http://www.eventbrite.com/event/763062340
>
> On Wed, Sep 22, 2010 at 11:26 AM, Jonathan Ellis  wrote:
>> Riptano is going to be in Seattle on Oct 8 for a full-day Cassandra
>> training, taught by Ben Black, who many of you know from IRC and this
>> list. The training is broken into two parts: the first covers
>> application design and modeling in Cassandra, with exercises using the
>> Pycassa library; the second covers operations, troubleshooting, and
>> performance tuning.  We're also hosting a happy hour the night before
>> at http://cassandrahappyhour.eventbrite.com/.
>>
>> For more details or to register for the training, see
>> http://www.eventbrite.com/event/756085472
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of Riptano, the source for professional Cassandra support
>> http://riptano.com
>>
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com


Re: Thrift gen problem with cassandra.thrift

2010-09-22 Thread Aaron Morton
I normally get the source download, then run ant gen-thrift-py Is there a reason you want to build it manually?Aaron On 22 Sep, 2010,at 07:35 PM, Shashank Tiwari  wrote:I installed thrift successfully on Snow Leaopard. However, when I run thrift -gen java interface/cassandra.thrift with Cassandra 0.6.5, I get an error which reads as follows:apache-cassandra-0.6.5/interface/cassandra.thrift:303] error: identifier ONE is unqualified!


Line 303 of cassandra.thrift is highlighted in the text below:296   /**297     Get the Column or SuperColumn at the given column_path. If no value is present, NotFoundException is thrown    . (This is


298     the only method that can throw an exception under non-failure conditions)299    */300   ColumnOrSuperColumn get(1:required string keyspace,301                           2:required string key,


302                           3:required ColumnPath column_path,303                           4:required ConsistencyLevel consistency_level=ONE)304                       throws (1:InvalidRequestException ire, 2:NotFoundException nfe, 3:UnavailableException ue    , 4:TimedOutException te),


305 Could somebody please help resolve this problem and also explain what's going on here.Thanks, Shashank


column expiration and rows in 0.7

2010-09-22 Thread Alaa Zubaidi

 Hi,
I am expecting my data size to be around nGB. However, it keeps growing 
and growing.


I am setting the gc_grace_seconds for the CF to 5 hours, and I am also 
setting "ttl" for all columns on a row and expecting that these columns 
will be "deleted" after the ttl time, and will be "removed" after 
gc_grace_seonds, and I was told that the if ALL columns are deleted the 
whole row will be deleted as well? is this true or not?


Thanks,

Alaa Zubaidi

PDF Solutions, Inc.
333 West San Carlos Street, Suite 700
San Jose, CA 95110  USA
Tel: 408-283-5639 (or 408-280-7900 x5639)
fax: 408-938-6479
email: alaa.zuba...@pdf.com




Re: column expiration and rows in 0.7

2010-09-22 Thread Aaron Morton
The data will only be physically deleted when a major compaction runs and the 
GCGraceSeconds has passed. You need to trigger the compaction using node tool.
 
http://wiki.apache.org/cassandra/DistributedDeletes

Aaron
On 23 Sep 2010, at 12:14, Alaa Zubaidi  wrote:

> Hi,
> I am expecting my data size to be around nGB. However, it keeps growing and 
> growing.
> 
> I am setting the gc_grace_seconds for the CF to 5 hours, and I am also 
> setting "ttl" for all columns on a row and expecting that these columns will 
> be "deleted" after the ttl time, and will be "removed" after gc_grace_seonds, 
> and I was told that the if ALL columns are deleted the whole row will be 
> deleted as well? is this true or not?
> 
> Thanks,
> 
> Alaa Zubaidi
> 
> PDF Solutions, Inc.
> 333 West San Carlos Street, Suite 700
> San Jose, CA 95110  USA
> Tel: 408-283-5639 (or 408-280-7900 x5639)
> fax: 408-938-6479
> email: alaa.zuba...@pdf.com
> 
> 


unsubscribe

2010-09-22 Thread Colin

unsubscribe

-Original Message-
From: Aaron Morton [mailto:aa...@thelastpickle.com] 
Sent: Wednesday, September 22, 2010 7:47 PM
To: user@cassandra.apache.org
Subject: Re: column expiration and rows in 0.7

The data will only be physically deleted when a major compaction runs and
the GCGraceSeconds has passed. You need to trigger the compaction using node
tool.
 
http://wiki.apache.org/cassandra/DistributedDeletes

Aaron
On 23 Sep 2010, at 12:14, Alaa Zubaidi  wrote:

> Hi,
> I am expecting my data size to be around nGB. However, it keeps growing
and growing.
> 
> I am setting the gc_grace_seconds for the CF to 5 hours, and I am also
setting "ttl" for all columns on a row and expecting that these columns will
be "deleted" after the ttl time, and will be "removed" after
gc_grace_seonds, and I was told that the if ALL columns are deleted the
whole row will be deleted as well? is this true or not?
> 
> Thanks,
> 
> Alaa Zubaidi
> 
> PDF Solutions, Inc.
> 333 West San Carlos Street, Suite 700
> San Jose, CA 95110  USA
> Tel: 408-283-5639 (or 408-280-7900 x5639)
> fax: 408-938-6479
> email: alaa.zuba...@pdf.com
> 
> 



Re: Thrift gen problem with cassandra.thrift

2010-09-22 Thread Shashank Tiwari
Jeremy and Aaron,
Thanks for your help.

I had already installed Thrift on my Snow Leopard so I thought running  *thrift
-gen cassandra.thrift* file would work. However as the wiki suggests it
appears only a specific version of Thrift work with a particular Cassandra
version. So I checked out the matching version of Thrift. Even after getting
the exact version of Thrift though, getting it to work wasn't straight
forward and in fact its still throwing errors.

Aaron's suggestions of using the ant task (*ant gen-thrift-py*) seemed much
smoother but then that task does not generate the python thrift module, it
only generates the cassandra module.

So I used a mix and match of both methods and finally have both the thrift
and the cassandra modules. However, it now seems there is a mismatch in the
API. I ran the python example from
http://wiki.apache.org/cassandra/ThriftExamples#Python and ended up with the
following errors:

Traceback (most recent call last):
  File "cassandra_client.py", line 52, in 
main()
  File "cassandra_client.py", line 35, in main
ConsistencyLevel.ZERO)
TypeError: insert() takes exactly 5 arguments (7 given)

--
Line 35 of cassandra_client.py is the same as line 35 of the python example
on the Cassandra wiki Thrift Examples page. Its the line in bold in the code
snippet below:

try:
transport.open()
#Insert the data into Keyspace 1
*client.insert(keyspace,*
*  key,*
*  column_path,*
*  value,*
*  timestamp,*
*  ConsistencyLevel.ZERO)*
#Query for data
column_parent = ColumnParent(column_family="Standard1")
slice_range = SliceRange(start="", finish="")
predicate = SlicePredicate(slice_range=slice_range)
result = client.get_slice(keyspace,
  key,
  column_parent,
  predicate,
  ConsistencyLevel.ONE)
pp.pprint(result)
except Thrift.TException, tx:
print 'Thrift: %s' % tx.message
finally:

Can somebody please help and make sense of this. Isn't there a more simple
and straightforward way getting Thrift to work with Cassandra? If not, why
not?

Thanks, Shashank


On Wed, Sep 22, 2010 at 1:16 PM, Aaron Morton wrote:

> I normally get the source download, then run ant gen-thrift-py
>
> Is there a reason you want to build it manually?
>
> Aaron
>
>
> On 22 Sep, 2010,at 07:35 PM, Shashank Tiwari  wrote:
>
> I installed thrift successfully on Snow Leaopard. However, when I run
> *thrift -gen java interface/cassandra.thrift* with Cassandra 0.6.5, I get
> an error which reads as follows:
> apache-cassandra-0.6.5/interface/cassandra.thrift:303] error:
> identifier ONE is unqualified!
> Line 303 of cassandra.thrift is highlighted in the text below:
>
> 296   /**
> 297 Get the Column or SuperColumn at the given column_path. If no value
> is present, NotFoundException is thrown. (This is
> 298 the only method that can throw an exception under non-failure
> conditions)
> 299*/
> 300   ColumnOrSuperColumn get(1:required string keyspace,
> 301   2:required string key,
> 302   3:required ColumnPath column_path,
> *303   4:required ConsistencyLevel
> consistency_level=ONE)*
> 304   throws (1:InvalidRequestException ire,
> 2:NotFoundException nfe, 3:UnavailableException ue, 4:TimedOutException
> te),
> 305
>
> Could somebody please help resolve this problem and also explain what's
> going on here.
>
> Thanks, Shashank
>
>


Re: column expiration and rows in 0.7

2010-09-22 Thread Stu Hood
Minor compactions will often be able to perform this garbage collection as well 
in 0.6.6 and 0.7.0 due to a great optimization implemented by Sylvain:

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

-Original Message-
From: "Aaron Morton" 
Sent: Wednesday, September 22, 2010 7:47pm
To: "user@cassandra.apache.org" 
Subject: Re: column expiration and rows in 0.7

The data will only be physically deleted when a major compaction runs and the 
GCGraceSeconds has passed. You need to trigger the compaction using node tool.
 
http://wiki.apache.org/cassandra/DistributedDeletes

Aaron
On 23 Sep 2010, at 12:14, Alaa Zubaidi  wrote:

> Hi,
> I am expecting my data size to be around nGB. However, it keeps growing and 
> growing.
> 
> I am setting the gc_grace_seconds for the CF to 5 hours, and I am also 
> setting "ttl" for all columns on a row and expecting that these columns will 
> be "deleted" after the ttl time, and will be "removed" after gc_grace_seonds, 
> and I was told that the if ALL columns are deleted the whole row will be 
> deleted as well? is this true or not?
> 
> Thanks,
> 
> Alaa Zubaidi
> 
> PDF Solutions, Inc.
> 333 West San Carlos Street, Suite 700
> San Jose, CA 95110  USA
> Tel: 408-283-5639 (or 408-280-7900 x5639)
> fax: 408-938-6479
> email: alaa.zuba...@pdf.com
> 
> 




"Internal error processing get" in get after insert ttl

2010-09-22 Thread Michal Augustýn
Hello,

I tried to use Column.Ttl property but I was not successful. My simple test:

1) insert column with ttl = 3
2) get column - all is ok
3) wait for 2 seconds
4) get column - all is ok
5) wait again for 2 seconds (so column should disappear)
6) get column - I got "Thrift.TApplicationException" of type 6 with message
"Internal error processing get"

Do I have to change some Cassandra configuration in order to get ttl
working? Or am I doing anything in bad way?

Thank you!

Augi