Re: Installing Thrift with Solandra

2011-06-06 Thread Jean-Nicolas Boulay Desjardins
I just saw a post you made on Stackoverflow, where you said:

"The Solandra project which is replacing Lucandra no longer uses thrift,
only Solr."

So I use Solr to access my data in Cassandra?

Thanks again...

On Tue, Jun 7, 2011 at 1:39 AM, Jean-Nicolas Boulay Desjardins <
jnbdzjn...@gmail.com> wrote:

> Thanks again :)
>
> Ok... But in the tutorial it says that I need to build a Thrift interface
> for Cassandra:
>
> ./compiler/cpp/thrift -gen php ../PATH-TO-CASSANDRA/interface/cassandra.thrift
>
>
> How do I do this?
>
> Where is the interface folder?
>
> Again, tjake thanks allot for your time and help.
>
> On Mon, Jun 6, 2011 at 11:13 PM, Jake Luciani  wrote:
>
>> To access Cassandra in Solandra it's the same as regular cassandra.  To
>> access Solr you use one of the Php Solr libraries
>> http://wiki.apache.org/solr/SolPHP
>>
>>
>>
>> On Mon, Jun 6, 2011 at 11:04 PM, Jean-Nicolas Boulay Desjardins <
>> jnbdzjn...@gmail.com> wrote:
>>
>>>  I am trying to install Thrift with Solandra.
>>>
>>> Normally when I just want to install Thrift with Cassandra, I followed
>>> this tutorial:
>>> https://wiki.fourkitchens.com/display/PF/Using+Cassandra+with+PHP
>>>
>>> But how can I do the same for Solandra?
>>>
>>> Thrift with PHP...
>>>
>>> Using Ubuntu Server.
>>>
>>> Thanks in advance!
>>>
>>
>>
>>
>> --
>> http://twitter.com/tjake
>>
>
>


-- 
Name / Nom: Boulay Desjardins, Jean-Nicolas
Website / Site Web: www.jeannicolas.com


Re: Installing Thrift with Solandra

2011-06-06 Thread Jean-Nicolas Boulay Desjardins
Thanks again :)

Ok... But in the tutorial it says that I need to build a Thrift interface
for Cassandra:

./compiler/cpp/thrift -gen php ../PATH-TO-CASSANDRA/interface/cassandra.thrift


How do I do this?

Where is the interface folder?

Again, tjake thanks allot for your time and help.

On Mon, Jun 6, 2011 at 11:13 PM, Jake Luciani  wrote:

> To access Cassandra in Solandra it's the same as regular cassandra.  To
> access Solr you use one of the Php Solr libraries
> http://wiki.apache.org/solr/SolPHP
>
>
>
> On Mon, Jun 6, 2011 at 11:04 PM, Jean-Nicolas Boulay Desjardins <
> jnbdzjn...@gmail.com> wrote:
>
>>  I am trying to install Thrift with Solandra.
>>
>> Normally when I just want to install Thrift with Cassandra, I followed
>> this tutorial:
>> https://wiki.fourkitchens.com/display/PF/Using+Cassandra+with+PHP
>>
>> But how can I do the same for Solandra?
>>
>> Thrift with PHP...
>>
>> Using Ubuntu Server.
>>
>> Thanks in advance!
>>
>
>
>
> --
> http://twitter.com/tjake
>


Re: Backups, Snapshots, SSTable Data Files, Compaction

2011-06-06 Thread Benjamin Coverston

Hi AJ,

inline:

On 6/6/11 11:03 PM, AJ wrote:

Hi,

I am working on a backup strategy and am trying to understand what is 
going on in the data directory.


I notice that after a write to a CF and then flush, a new set of data 
files are created with an index number incremented in their names, 
such as:


Initially:
Users-e-1-Filter.db
Users-e-1-Index.db
Users-e-1-Statistics.db

Then, after a write to the Users CF, followed by a flush:
Users-e-2-Filter.db
Users-e-2-Index.db
Users-e-2-Statistics.db

Currently, my data dir has about 16 sets.  I thought that compaction 
(with nodetool) would clean-up these files, but it doesn't.  Neither 
does cleanup or repair.
You're not even talking about snapshots using nodetool snapshot yet. 
Also nodetool compact does compact all of the live files, however the 
compacted SSTables will not be cleaned up until a garbage collection is 
triggered, or a capacity threshold is met.
Q1: Should the files with the lower index #'s (under the 
data/{keyspace} directory) be manually deleted?  Or, do ALL of the 
files in this directory need to be backed-up?
Do not ever delete files in your data directory if you care about data 
on that replica, unless they are from a column family that no longer 
exists on that server. There may be some duplicate data in the files, 
but if the files are in the data directory, as a general rule, they are 
there because they contain some set of data that is in none of the other 
SSTables.
Q2: Can someone elaborate on the structure of these files and if they 
are interrelated?  I'm guessing that maybe each incremental set is 
like an incremental or differential backup of the SSTable, but I'm not 
sure.  The reason I ask is because I hope that each set isn't a full 
copy of the data, eg, if my data set size for a given CF is 1 TB, I 
will not end up with 16 TB worth of data files after 16 calls to 
flush... I suspect not, but I'm just double-checking ;o)


The are interrelated only in the sense that they contain data associated 
with the same column family. Each set may contain a complete, partial, 
or entirely independent set of the data depending on your write pattern 
and the frequency of minor compactions.

Q3: When and how are these extra files removed or reduced?

A GC or a threshold.


Thanks!


--
Ben Coverston
Director of Operations
DataStax -- The Apache Cassandra Company
http://www.datastax.com/



Backups, Snapshots, SSTable Data Files, Compaction

2011-06-06 Thread AJ

Hi,

I am working on a backup strategy and am trying to understand what is 
going on in the data directory.


I notice that after a write to a CF and then flush, a new set of data 
files are created with an index number incremented in their names, such as:


Initially:
Users-e-1-Filter.db
Users-e-1-Index.db
Users-e-1-Statistics.db

Then, after a write to the Users CF, followed by a flush:
Users-e-2-Filter.db
Users-e-2-Index.db
Users-e-2-Statistics.db

Currently, my data dir has about 16 sets.  I thought that compaction 
(with nodetool) would clean-up these files, but it doesn't.  Neither 
does cleanup or repair.


Q1: Should the files with the lower index #'s (under the data/{keyspace} 
directory) be manually deleted?  Or, do ALL of the files in this 
directory need to be backed-up?


Q2: Can someone elaborate on the structure of these files and if they 
are interrelated?  I'm guessing that maybe each incremental set is like 
an incremental or differential backup of the SSTable, but I'm not sure.  
The reason I ask is because I hope that each set isn't a full copy of 
the data, eg, if my data set size for a given CF is 1 TB, I will not end 
up with 16 TB worth of data files after 16 calls to flush... I suspect 
not, but I'm just double-checking ;o)


Q3: When and how are these extra files removed or reduced?

Thanks!


Re: Installing Thrift with Solandra

2011-06-06 Thread Jake Luciani
To access Cassandra in Solandra it's the same as regular cassandra.  To
access Solr you use one of the Php Solr libraries
http://wiki.apache.org/solr/SolPHP



On Mon, Jun 6, 2011 at 11:04 PM, Jean-Nicolas Boulay Desjardins <
jnbdzjn...@gmail.com> wrote:

> I am trying to install Thrift with Solandra.
>
> Normally when I just want to install Thrift with Cassandra, I followed this
> tutorial:https://wiki.fourkitchens.com/display/PF/Using+Cassandra+with+PHP
>
> But how can I do the same for Solandra?
>
> Thrift with PHP...
>
> Using Ubuntu Server.
>
> Thanks in advance!
>



-- 
http://twitter.com/tjake


Installing Thrift with Solandra

2011-06-06 Thread Jean-Nicolas Boulay Desjardins
I am trying to install Thrift with Solandra.

Normally when I just want to install Thrift with Cassandra, I followed this
tutorial:https://wiki.fourkitchens.com/display/PF/Using+Cassandra+with+PHP

But how can I do the same for Solandra?

Thrift with PHP...

Using Ubuntu Server.

Thanks in advance!


Re: Troubleshooting IO performance ?

2011-06-06 Thread aaron morton
There is a big IO queue and reads are spending a lot of time in the queue. 

Some more questions:
- what version are you on ? 
-  what is the concurrent_reads config setting ? 
- what is nodetool tpstats showing during the slow down ? 
- exactly how much data are you asking for ? how many rows and what sort of 
slice 
- has their been a lot of deletes or TTL columns used ? 

Hope that helps. 
Aaron
 
-
Aaron Morton
Freelance Cassandra Developer
@aaronmorton
http://www.thelastpickle.com

On 7 Jun 2011, at 10:09, Philippe wrote:

> Ok, here it goes again... No swapping at all...
> 
> procs ---memory-- ---swap-- -io -system-- cpu
>  r  b   swpd   free   buff  cache   si   sobibo   in   cs us sy id wa
>  1 63  32044  88736  37996 711652400 227156 0 18314 5607 30  5 11 
> 53
>  1 63  32044  90844  37996 710390400 233524   202 17418 4977 29  4  9 
> 58
>  0 42  32044  91304  37996 712388400 249736 0 16197 5433 19  6  3 
> 72
>  3 25  32044  89864  37996 713598000 22314016 18135 7567 32  5 11 
> 52
>  1  1  32044  88664  37996 715072800 229416   128 19168 7554 36  4 10 
> 51
>  4  0  32044  89464  37996 714942800 21385218 21041 8819 45  5 12 
> 38
>  4  0  32044  90372  37996 714943200 233086   142 19909 7041 43  5 10 
> 41
>  7  1  32044  89752  37996 714952000 206906 0 19350 6875 50  4 11 
> 35
> 
> Lots and lots of disk activity
> iostat -dmx 2
> Device: rrqm/s   wrqm/s r/s w/srMB/swMB/s avgrq-sz 
> avgqu-sz   await r_await w_await  svctm  %util
> sda  52.50 0.00 7813.000.00   108.01 0.0028.31   
> 117.15   14.89   14.890.00   0.11  83.00
> sdb  56.00 0.00 7755.500.00   108.51 0.0028.66   
> 118.67   15.18   15.180.00   0.11  82.80
> md1   0.00 0.000.000.00 0.00 0.00 0.00
>  0.000.000.000.00   0.00   0.00
> md5   0.00 0.00 15796.500.00   219.21 0.0028.42   
>   0.000.000.000.00   0.00   0.00
> dm-0  0.00 0.00 15796.500.00   219.21 0.0028.42   
> 273.42   17.03   17.030.00   0.05  83.40
> dm-1  0.00 0.000.000.00 0.00 0.00 0.00
>  0.000.000.000.00   0.00   0.00
> 
> More info : 
> - all the data directory containing the data I'm querying into is  9.7GB and 
> this is a server with 16GB 
> - I'm hitting the server with 6 concurrent multigetsuperslicequeries on 
> multiple keys, some of them can bring back quite a number of data
> - I'm reading all the keys for one column, pretty much sequentially
> 
> This is a query in a rollup table that was originally in MySQL and it doesn't 
> look like the performance to query by key is better. So I'm betting I'm doing 
> something wrong here... but what ?
> 
> Any ideas ?
> Thanks
> 
> 2011/6/6 Philippe 
> hum..no, it wasn't swapping. cassandra was the only thing running on that 
> server
> and i was querying the same keys over and over
> 
> i restarted Cassandra and doing the same thing, io is now down to zero while 
> cpu is up which dosen't surprise me as much.
> 
> I'll report if it happens again.
> 
> Le 5 juin 2011 16:55, "Jonathan Ellis"  a écrit :
> 
> > You may be swapping.
> > 
> > http://spyced.blogspot.com/2010/01/linux-performance-basics.html
> > explains how to check this as well as how to see what threads are busy
> > in the Java process.
> > 
> > On Sat, Jun 4, 2011 at 5:34 PM, Philippe  wrote:
> >> Hello,
> >> I am evaluating using cassandra and I'm running into some strange IO
> >> behavior that I can't explain, I'd like some help/ideas to troubleshoot it.
> >> I am running a 1 node cluster with a keyspace consisting of two columns
> >> families, one of which has dozens of supercolumns itself containing dozens
> >> of columns.
> >> All in all, this is a couple gigabytes of data, 12GB on the hard drive.
> >> The hardware is pretty good : 16GB memory + RAID-0 SSD drives with LVM and
> >> an i5 processor (4 cores).
> >> Keyspace: xxx
> >> Read Count: 460754852
> >> Read Latency: 1.108205793092766 ms.
> >> Write Count: 30620665
> >> Write Latency: 0.01411020877567486 ms.
> >> Pending Tasks: 0
> >> Column Family: xx
> >> SSTable count: 5
> >> Space used (live): 548700725
> >> Space used (total): 548700725
> >> Memtable Columns Count: 0
> >> Memtable Data Size: 0
> >> Memtable Switch Count: 11
> >> Read Count: 2891192
> >> Read Latency: NaN ms.
> >> Write Count: 3157547
> >> Write Latency: NaN ms.
> >> Pending Tasks: 0
> >> Key cache capacity: 367396
> >> Key cache si

Re: [RELEASE] 0.8.0

2011-06-06 Thread Terje Marthinussen
Yes, I am aware of it but it was not an alternative for this project which
will face production soon.

The patch I have is fairly non-intrusive (especially vs. 674) so I think it
can be interesting depending on how quickly 674 will be integrated into
cassandra releases.

I plan to take a closer look at 674 soon to see if I can add something
there.

Terje

On Tue, Jun 7, 2011 at 1:59 AM, Ryan King  wrote:

>
> You might want to watch
> https://issues.apache.org/jira/browse/CASSANDRA-674 which should be
> ready for testing soon.
>
> -ryan
>


Re: multiple clusters communicating

2011-06-06 Thread Jonathan Ellis
Set the internal port to be different.

On Mon, Jun 6, 2011 at 7:01 PM, Jeffrey Wang  wrote:
> Hey all,
>
>
>
> We’re seeing a strange issue in which two completely separate clusters
> (0.7.3) on the same subnet (X.X.X.146 through X.X.X.150) with 3 machines
> (146-148) and 2 machines (149-150). Both of them are seeded with the
> respective machines in their cluster, yet when we run them they end up
> gossiping with each other. They have different cluster names so they don’t
> merge, but this is quite annoying as schema changes don’t actually go
> through. Anyone have any ideas about this? Thanks.
>
>
>
> -Jeffrey
>
>



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


multiple clusters communicating

2011-06-06 Thread Jeffrey Wang
Hey all,

 

We're seeing a strange issue in which two completely separate clusters
(0.7.3) on the same subnet (X.X.X.146 through X.X.X.150) with 3 machines
(146-148) and 2 machines (149-150). Both of them are seeded with the
respective machines in their cluster, yet when we run them they end up
gossiping with each other. They have different cluster names so they don't
merge, but this is quite annoying as schema changes don't actually go
through. Anyone have any ideas about this? Thanks.

 

-Jeffrey

 



smime.p7s
Description: S/MIME cryptographic signature


Re: CQL How to do

2011-06-06 Thread Nate McCall
It is specific to the Hector client API, but I just started on a guide
that may be of some help, particularly in regards to column
configuration and query encoding:
https://github.com/rantav/hector/wiki/Using-CQL

2011/6/4 Yonder :
> Hi,
>
> In Cassandra 0.8, CQL become the primary client interface, but I don't know
> how to use it in a non-command line env. I could not find out any how-to do
> docs in Wiki or DataStax's website.
>
> Thanks
>


Re: hector-jpa

2011-06-06 Thread Nate McCall
All tests pass and everything compiles on a clean checkout of
hector-jpa for me.

I'm not sure how you got that error from hector-jpa, there is no
reference in that project to
me.prettyprint.hom.CassandraPersistenceProvider. Are you sure you
don't have a reference to hector-object-mapper (which is a completely
different codebase from jpa) somewhere in your configuration?
me.prettyprint.hom.CassandraPersistenceProvider was just removed in
hector src tree which why I'm suspicious.

I'm posting the initial reply here, but anything additional should
probably be confined to hector-users.

On Mon, Jun 6, 2011 at 5:54 PM, Patrick Julien  wrote:
> yeah, I saw that one, I was more interested in hector-jpa because I
> don't think this one supports @OneToMany.
>
> Was hoping the test failures were a temporary thing
>
> On Mon, Jun 6, 2011 at 6:41 PM, Ed Anuff  wrote:
>> I'd recommend looking into Hector Object Mapper, it provides
>> annotation-based mapping of Java object fields to columns:
>>
>> https://github.com/rantav/hector/wiki/Hector-Object-Mapper-%28HOM%29
>>
>> On Mon, Jun 6, 2011 at 3:27 PM, Patrick Julien  wrote:
>>>
>>> So what's recommended for right now?  The data nucleus plugin?  I
>>> don't need the query parts or anything, I just don't want to do have
>>> to translate columns to java fields and vice versa
>>>
>>>
>>> On Mon, Jun 6, 2011 at 6:25 PM, Ed Anuff  wrote:
>>> > That's a work in progress and actually represents the next generation of
>>> > JPA
>>> > in Hector.  There is a more lightweight version present in the release
>>> > version of Hector called Hector Object Mapper.  I'm sure Nate or Todd
>>> > who've
>>> > worked more on hector-jpa can elaborate.
>>> >
>>> > Ed
>>> >
>>> > On Mon, Jun 6, 2011 at 2:58 PM, Patrick Julien 
>>> > wrote:
>>> >>
>>> >> It also doesn't run, I get
>>> >>
>>> >> Exception in thread "main" javax.persistence.PersistenceException:
>>> >> Failed to load provider from META-INF/services
>>> >>        at
>>> >>
>>> >> javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.getPersistenceProviders(PersistenceProviderResolverHolder.java:115)
>>> >>        at
>>> >>
>>> >> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:91)
>>> >>
>>> >> Caused by: java.lang.ClassNotFoundException:
>>> >> me.prettyprint.hom.CassandraPersistenceProvider
>>> >>
>>> >> Which I believe was from the previous attempt at supporting jpa in
>>> >> hector
>>> >>
>>> >>
>>> >> On Mon, Jun 6, 2011 at 5:55 PM, Patrick Julien 
>>> >> wrote:
>>> >> > https://github.com/riptano/hector-jpa
>>> >> >
>>> >> > Is this solution usable?
>>> >> >
>>> >> > I had problems building it, now tests won't pass.
>>> >> >
>>> >
>>> >
>>
>>
>


Re: hector-jpa

2011-06-06 Thread Patrick Julien
yeah, I saw that one, I was more interested in hector-jpa because I
don't think this one supports @OneToMany.

Was hoping the test failures were a temporary thing

On Mon, Jun 6, 2011 at 6:41 PM, Ed Anuff  wrote:
> I'd recommend looking into Hector Object Mapper, it provides
> annotation-based mapping of Java object fields to columns:
>
> https://github.com/rantav/hector/wiki/Hector-Object-Mapper-%28HOM%29
>
> On Mon, Jun 6, 2011 at 3:27 PM, Patrick Julien  wrote:
>>
>> So what's recommended for right now?  The data nucleus plugin?  I
>> don't need the query parts or anything, I just don't want to do have
>> to translate columns to java fields and vice versa
>>
>>
>> On Mon, Jun 6, 2011 at 6:25 PM, Ed Anuff  wrote:
>> > That's a work in progress and actually represents the next generation of
>> > JPA
>> > in Hector.  There is a more lightweight version present in the release
>> > version of Hector called Hector Object Mapper.  I'm sure Nate or Todd
>> > who've
>> > worked more on hector-jpa can elaborate.
>> >
>> > Ed
>> >
>> > On Mon, Jun 6, 2011 at 2:58 PM, Patrick Julien 
>> > wrote:
>> >>
>> >> It also doesn't run, I get
>> >>
>> >> Exception in thread "main" javax.persistence.PersistenceException:
>> >> Failed to load provider from META-INF/services
>> >>        at
>> >>
>> >> javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.getPersistenceProviders(PersistenceProviderResolverHolder.java:115)
>> >>        at
>> >>
>> >> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:91)
>> >>
>> >> Caused by: java.lang.ClassNotFoundException:
>> >> me.prettyprint.hom.CassandraPersistenceProvider
>> >>
>> >> Which I believe was from the previous attempt at supporting jpa in
>> >> hector
>> >>
>> >>
>> >> On Mon, Jun 6, 2011 at 5:55 PM, Patrick Julien 
>> >> wrote:
>> >> > https://github.com/riptano/hector-jpa
>> >> >
>> >> > Is this solution usable?
>> >> >
>> >> > I had problems building it, now tests won't pass.
>> >> >
>> >
>> >
>
>


Re: hector-jpa

2011-06-06 Thread Ed Anuff
I'd recommend looking into Hector Object Mapper, it provides
annotation-based mapping of Java object fields to columns:

https://github.com/rantav/hector/wiki/Hector-Object-Mapper-%28HOM%29

On Mon, Jun 6, 2011 at 3:27 PM, Patrick Julien  wrote:

> So what's recommended for right now?  The data nucleus plugin?  I
> don't need the query parts or anything, I just don't want to do have
> to translate columns to java fields and vice versa
>
>
> On Mon, Jun 6, 2011 at 6:25 PM, Ed Anuff  wrote:
> > That's a work in progress and actually represents the next generation of
> JPA
> > in Hector.  There is a more lightweight version present in the release
> > version of Hector called Hector Object Mapper.  I'm sure Nate or Todd
> who've
> > worked more on hector-jpa can elaborate.
> >
> > Ed
> >
> > On Mon, Jun 6, 2011 at 2:58 PM, Patrick Julien 
> wrote:
> >>
> >> It also doesn't run, I get
> >>
> >> Exception in thread "main" javax.persistence.PersistenceException:
> >> Failed to load provider from META-INF/services
> >>at
> >>
> javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.getPersistenceProviders(PersistenceProviderResolverHolder.java:115)
> >>at
> >>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:91)
> >>
> >> Caused by: java.lang.ClassNotFoundException:
> >> me.prettyprint.hom.CassandraPersistenceProvider
> >>
> >> Which I believe was from the previous attempt at supporting jpa in
> hector
> >>
> >>
> >> On Mon, Jun 6, 2011 at 5:55 PM, Patrick Julien 
> wrote:
> >> > https://github.com/riptano/hector-jpa
> >> >
> >> > Is this solution usable?
> >> >
> >> > I had problems building it, now tests won't pass.
> >> >
> >
> >
>


Re: hector-jpa

2011-06-06 Thread Patrick Julien
So what's recommended for right now?  The data nucleus plugin?  I
don't need the query parts or anything, I just don't want to do have
to translate columns to java fields and vice versa


On Mon, Jun 6, 2011 at 6:25 PM, Ed Anuff  wrote:
> That's a work in progress and actually represents the next generation of JPA
> in Hector.  There is a more lightweight version present in the release
> version of Hector called Hector Object Mapper.  I'm sure Nate or Todd who've
> worked more on hector-jpa can elaborate.
>
> Ed
>
> On Mon, Jun 6, 2011 at 2:58 PM, Patrick Julien  wrote:
>>
>> It also doesn't run, I get
>>
>> Exception in thread "main" javax.persistence.PersistenceException:
>> Failed to load provider from META-INF/services
>>        at
>> javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.getPersistenceProviders(PersistenceProviderResolverHolder.java:115)
>>        at
>> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:91)
>>
>> Caused by: java.lang.ClassNotFoundException:
>> me.prettyprint.hom.CassandraPersistenceProvider
>>
>> Which I believe was from the previous attempt at supporting jpa in hector
>>
>>
>> On Mon, Jun 6, 2011 at 5:55 PM, Patrick Julien  wrote:
>> > https://github.com/riptano/hector-jpa
>> >
>> > Is this solution usable?
>> >
>> > I had problems building it, now tests won't pass.
>> >
>
>


Re: hector-jpa

2011-06-06 Thread Ed Anuff
That's a work in progress and actually represents the next generation of JPA
in Hector.  There is a more lightweight version present in the release
version of Hector called Hector Object Mapper.  I'm sure Nate or Todd who've
worked more on hector-jpa can elaborate.

Ed

On Mon, Jun 6, 2011 at 2:58 PM, Patrick Julien  wrote:

> It also doesn't run, I get
>
> Exception in thread "main" javax.persistence.PersistenceException:
> Failed to load provider from META-INF/services
>at
> javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.getPersistenceProviders(PersistenceProviderResolverHolder.java:115)
>at
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:91)
>
> Caused by: java.lang.ClassNotFoundException:
> me.prettyprint.hom.CassandraPersistenceProvider
>
> Which I believe was from the previous attempt at supporting jpa in hector
>
>
> On Mon, Jun 6, 2011 at 5:55 PM, Patrick Julien  wrote:
> > https://github.com/riptano/hector-jpa
> >
> > Is this solution usable?
> >
> > I had problems building it, now tests won't pass.
> >
>


Re: Troubleshooting IO performance ?

2011-06-06 Thread Philippe
Ok, here it goes again... No swapping at all...

procs ---memory-- ---swap-- -io -system--
cpu
 r  b   swpd   free   buff  cache   si   sobibo   in   cs us sy id
wa
 1 63  32044  88736  37996 711652400 227156 0 18314 5607 30  5
11 53
 1 63  32044  90844  37996 710390400 233524   202 17418 4977 29  4
 9 58
 0 42  32044  91304  37996 712388400 249736 0 16197 5433 19  6
 3 72
 3 25  32044  89864  37996 713598000 22314016 18135 7567 32  5
11 52
 1  1  32044  88664  37996 715072800 229416   128 19168 7554 36  4
10 51
 4  0  32044  89464  37996 714942800 21385218 21041 8819 45  5
12 38
 4  0  32044  90372  37996 714943200 233086   142 19909 7041 43  5
10 41
 7  1  32044  89752  37996 714952000 206906 0 19350 6875 50  4
11 35

Lots and lots of disk activity
iostat -dmx 2
Device: rrqm/s   wrqm/s r/s w/srMB/swMB/s avgrq-sz
avgqu-sz   await r_await w_await  svctm  %util
sda  52.50 0.00 7813.000.00   108.01 0.0028.31
117.15   14.89   14.890.00   0.11  83.00
sdb  56.00 0.00 7755.500.00   108.51 0.0028.66
118.67   15.18   15.180.00   0.11  82.80
md1   0.00 0.000.000.00 0.00 0.00 0.00
  0.000.000.000.00   0.00   0.00
md5   0.00 0.00 15796.500.00   219.21 0.0028.42
0.000.000.000.00   0.00   0.00
dm-0  0.00 0.00 15796.500.00   219.21 0.0028.42
  273.42   17.03   17.030.00   0.05  83.40
dm-1  0.00 0.000.000.00 0.00 0.00 0.00
  0.000.000.000.00   0.00   0.00

More info :
- all the data directory containing the data I'm querying into is  9.7GB and
this is a server with 16GB
- I'm hitting the server with 6 concurrent multigetsuperslicequeries on
multiple keys, some of them can bring back quite a number of data
- I'm reading all the keys for one column, pretty much sequentially

This is a query in a rollup table that was originally in MySQL and it
doesn't look like the performance to query by key is better. So I'm betting
I'm doing something wrong here... but what ?

Any ideas ?
Thanks

2011/6/6 Philippe 

> hum..no, it wasn't swapping. cassandra was the only thing running on that
> server
> and i was querying the same keys over and over
>
> i restarted Cassandra and doing the same thing, io is now down to zero
> while cpu is up which dosen't surprise me as much.
>
> I'll report if it happens again.
> Le 5 juin 2011 16:55, "Jonathan Ellis"  a écrit :
>
> > You may be swapping.
> >
> > http://spyced.blogspot.com/2010/01/linux-performance-basics.html
> > explains how to check this as well as how to see what threads are busy
> > in the Java process.
> >
> > On Sat, Jun 4, 2011 at 5:34 PM, Philippe  wrote:
> >> Hello,
> >> I am evaluating using cassandra and I'm running into some strange IO
> >> behavior that I can't explain, I'd like some help/ideas to troubleshoot
> it.
> >> I am running a 1 node cluster with a keyspace consisting of two columns
> >> families, one of which has dozens of supercolumns itself containing
> dozens
> >> of columns.
> >> All in all, this is a couple gigabytes of data, 12GB on the hard drive.
> >> The hardware is pretty good : 16GB memory + RAID-0 SSD drives with LVM
> and
> >> an i5 processor (4 cores).
> >> Keyspace: xxx
> >> Read Count: 460754852
> >> Read Latency: 1.108205793092766 ms.
> >> Write Count: 30620665
> >> Write Latency: 0.01411020877567486 ms.
> >> Pending Tasks: 0
> >> Column Family: xx
> >> SSTable count: 5
> >> Space used (live): 548700725
> >> Space used (total): 548700725
> >> Memtable Columns Count: 0
> >> Memtable Data Size: 0
> >> Memtable Switch Count: 11
> >> Read Count: 2891192
> >> Read Latency: NaN ms.
> >> Write Count: 3157547
> >> Write Latency: NaN ms.
> >> Pending Tasks: 0
> >> Key cache capacity: 367396
> >> Key cache size: 367396
> >> Key cache hit rate: NaN
> >> Row cache capacity: 112683
> >> Row cache size: 112683
> >> Row cache hit rate: NaN
> >> Compacted row minimum size: 125
> >> Compacted row maximum size: 924
> >> Compacted row mean size: 172
> >> Column Family: y
> >> SSTable count: 7
> >> Space used (live): 8707538781
> >> Space used (total): 8707538781
> >> Memtable Columns Count: 0
> >> Memtable Data Size: 0
> >> Memtable Swit

Re: hector-jpa

2011-06-06 Thread Patrick Julien
It also doesn't run, I get

Exception in thread "main" javax.persistence.PersistenceException:
Failed to load provider from META-INF/services
at 
javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.getPersistenceProviders(PersistenceProviderResolverHolder.java:115)
at 
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:91)

Caused by: java.lang.ClassNotFoundException:
me.prettyprint.hom.CassandraPersistenceProvider

Which I believe was from the previous attempt at supporting jpa in hector


On Mon, Jun 6, 2011 at 5:55 PM, Patrick Julien  wrote:
> https://github.com/riptano/hector-jpa
>
> Is this solution usable?
>
> I had problems building it, now tests won't pass.
>


hector-jpa

2011-06-06 Thread Patrick Julien
https://github.com/riptano/hector-jpa

Is this solution usable?

I had problems building it, now tests won't pass.


Re: problems with many columns on a row

2011-06-06 Thread aaron morton
Can you upgrade to the official 0.8 release and try again with logging set to 
DEBUG ? 

Cheers

-
Aaron Morton
Freelance Cassandra Developer
@aaronmorton
http://www.thelastpickle.com

On 6 Jun 2011, at 23:41, Mario Micklisch wrote:

> :-)
> 
> There are several data Files:
> 
> # ls -al *-Data.db
> 
> 
> -rw-r--r-- 1 cassandra cassandra  53785327 2011-06-05 14:44 
> CFTest-g-21-Data.db
> -rw-r--r-- 1 cassandra cassandra  56474656 2011-06-05 18:04 
> CFTest-g-38-Data.db
> -rw-r--r-- 1 cassandra cassandra  21705904 2011-06-05 20:02 
> CFTest-g-45-Data.db
> -rw--- 1 cassandra cassandra   3720201 2011-06-05 20:13 
> CFTest-g-46-Data.db
> -rw-r--r-- 1 cassandra cassandra 135684874 2011-06-05 20:14 
> CFTest-g-47-Data.db
> -rw-r--r-- 1 cassandra cassandra   4347351 2011-06-05 20:35 
> CFTest-g-48-Data.db
> -rw-r--r-- 1 cassandra cassandra   4341698 2011-06-05 20:56 
> CFTest-g-49-Data.db
> -rw-r--r-- 1 cassandra cassandra   4350949 2011-06-05 21:17 
> CFTest-g-50-Data.db
> -rw-r--r-- 1 cassandra cassandra   4346066 2011-06-05 21:38 
> CFTest-g-51-Data.db
> -rw-r--r-- 1 cassandra cassandra  17384858 2011-06-05 21:39 
> CFTest-g-52-Data.db
> -rw-r--r-- 1 cassandra cassandra   4342983 2011-06-05 21:59 
> CFTest-g-53-Data.db
> -rw-r--r-- 1 cassandra cassandra   4339771 2011-06-05 22:21 
> CFTest-g-54-Data.db
> -rw-r--r-- 1 cassandra cassandra   4349165 2011-06-05 22:42 
> CFTest-g-55-Data.db
> -rw-r--r-- 1 cassandra cassandra  30415571 2011-06-05 22:42 
> CFTest-g-56-Data.db
> 
> 
> Cheers,
>  Mario
> 
> 
> 
> 
> 2011/6/6 aaron morton 
> Ops, I misread "150 GB" in one of your earlier emails as "150 MB" so forget 
> what I said before. You have loads of free space :)
> 
> How many files do you have in your data directory ? If it's 1 then that log 
> message was a small bug, that has been fixed.
> 
> Cheers
>  
> -
> Aaron Morton
> Freelance Cassandra Developer
> @aaronmorton
> http://www.thelastpickle.com
> 
> On 5 Jun 2011, at 23:51, Mario Micklisch wrote:
> 
>> I found a patch for the php extension here:
>> 
>> https://issues.apache.org/jira/browse/THRIFT-1067
>> 
>> … this seemed to fix the issue. Thank you Jonathan and Aaron for taking time 
>> to provide me with some help!
>> 
>> Regarding the compaction I would still love to hear your feedback on how to 
>> configure Cassandra accordingly.
>> 
>> Here are my facts again:
>> 
>> Data size on disk: ~1GB
>> Data Volume: ~150GB free storage
>> OS Volume: ~3GB free storage
>> 
>> Tried:
>> nodetool --host localhost compact
>> 
>> The logfiles said:
>> ERROR [CompactionExecutor:2] 2011-06-05 11:44:39,346 CompactionManager.java 
>> (line 510) insufficient space to compact even the two smallest files, 
>> aborting
>> ERROR [CompactionExecutor:2] 2011-06-05 11:44:39,348 CompactionManager.java 
>> (line 510) insufficient space to compact even the two smallest files, 
>> aborting
>> ERROR [CompactionExecutor:2] 2011-06-05 11:44:39,349 CompactionManager.java 
>> (line 510) insufficient space to compact even the two smallest files, 
>> aborting
>>  INFO [CompactionExecutor:2] 2011-06-05 11:44:39,366 CompactionManager.java 
>> (line 539) Compacting Major: 
>> [SSTableReader(path='/mnt/cassandra/data/system/LocationInfo-g-81-Data.db'), 
>> SSTableReader(path='/mnt/cassandra/data/system/LocationInfo-g-80-Data.db'), 
>> SSTableReader(path='/mnt/cassandra/data/system/LocationInfo-g-79-Data.db')]
>>  INFO [CompactionExecutor:2] 2011-06-05 11:44:39,502 CompactionIterator.java 
>> (line 186) Major@23231510(system, LocationInfo, 386/689) now compacting at 
>> 16777 bytes/ms.
>>  INFO [CompactionExecutor:2] 2011-06-05 11:44:39,713 CompactionManager.java 
>> (line 603) Compacted to 
>> /mnt/cassandra/data/system/LocationInfo-tmp-g-82-Data.db.  689 to 446 (~64% 
>> of original) bytes for 3 keys.  Time: 346ms.
>> ERROR [CompactionExecutor:2] 2011-06-05 11:44:39,726 CompactionManager.java 
>> (line 510) insufficient space to compact even the two smallest files, 
>> aborting
>> ERROR [CompactionExecutor:2] 2011-06-05 11:44:39,726 CompactionManager.java 
>> (line 510) insufficient space to compact even the two smallest files, 
>> aborting
>> 
>> # du -hs /mnt/cassandra/
>> 886M /mnt/cassandra/
>> 
>> # df -H
>> Filesystem Size   Used  Avail Use% Mounted on
>> /dev/sda1  8.5G   4.9G   3.6G  49% /
>> /dev/sda2  158G   1.2G   149G   1% /mnt
>> 
>> 
>> # nodetool --host localhost info
>> 130915841875673808436922706546793999597
>> Gossip active: true
>> Load : 1.48 MB
>> Generation No: 1307273982
>> Uptime (seconds) : 383
>> Heap Memory (MB) : 89.59 / 822.00
>> 
>> 
>> Thank you,
>>  Mario
>> 
>> 
>> 
>> 2011/6/5 Mario Micklisch 
>> I tracked down the timestamp submission and everything was fine within the 
>> PHP Libraries.
>> 
>> The thrift php extension however seems to have an overflow, because it was 
>> now setting now timestamps with also negative values ( -1242277493 ). I 
>> disabled the php ex

Re: Replication-aware compaction

2011-06-06 Thread aaron morton
You should consider upgrading to 0.7.6 to get a fix to Gossip. Earlier 0.7 
releases were prone to marking nodes up and down when they should not have 
been. See https://github.com/apache/cassandra/blob/cassandra-0.7/CHANGES.txt#L22

Are the TimedOutExceptions to the client for read or write requests ? During 
the burst times which stages are backing up  nodetool tpstats ? Compaction 
should not affect writes too much (assuming different log and data spindles). 

You could also take a look at the read and write latency stats for a particular 
CF using nodetool cfstats or JConsole. These will give you the stats for the 
local operations. You could also take a look at the iostats on the box 
http://spyced.blogspot.com/2010/01/linux-performance-basics.html

Hope that helps.

-
Aaron Morton
Freelance Cassandra Developer
@aaronmorton
http://www.thelastpickle.com

On 7 Jun 2011, at 00:30, David Boxenhorn wrote:

> Version 0.7.3.
> 
> Yes, I am talking about minor compactions. I have three nodes, RF=3.
> 3G data (before replication). Not many users (yet). It seems like 3
> nodes should be plenty. But when all 3 nodes are compacting, I
> sometimes get timeouts on the client, and I see in my logs that each
> one is full of notifications that the other nodes have died (and come
> back to life after about a second). My cluster can tolerate one node
> being out of commission, so I would rather have longer compactions one
> at a time than shorter compactions all at the same time.
> 
> I think that our usage pattern of bursty writes causes the three nodes
> to decide to compact at the same time. These bursts are followed by
> periods of relative quiet, so there should be time for the other two
> nodes to compact one at a time.
> 
> 
> On Mon, Jun 6, 2011 at 3:27 PM, David Boxenhorn  wrote:
>> 
>> Version 0.7.3.
>> 
>> Yes, I am talking about minor compactions. I have three nodes, RF=3. 3G data 
>> (before replication). Not many users (yet). It seems like 3 nodes should be 
>> plenty. But when all 3 nodes are compacting, I sometimes get timeouts on the 
>> client, and I see in my logs that each one is full of notifications that the 
>> other nodes have died (and come back to life after about a second). My 
>> cluster can tolerate one node being out of commission, so I would rather 
>> have longer compactions one at a time than shorter compactions all at the 
>> same time.
>> 
>> I think that our usage pattern of bursty writes causes the three nodes to 
>> decide to compact at the same time. These bursts are followed by periods of 
>> relative quiet, so there should be time for the other two nodes to compact 
>> one at a time.
>> 
>> 
>> On Mon, Jun 6, 2011 at 2:36 PM, aaron morton  wrote:
>>> 
>>> Are you talking about minor (automatic) compactions ? Can you provide some 
>>> more information on what's happening to make the node unusable and what 
>>> version you are using? It's not lightweight process, but it should not hurt 
>>> the node that badly. It is considered an online operation.
>>> 
>>> Delaying compaction will only make it run for longer and take more 
>>> resources.
>>> 
>>> Cheers
>>> 
>>> -
>>> Aaron Morton
>>> Freelance Cassandra Developer
>>> @aaronmorton
>>> http://www.thelastpickle.com
>>> 
>>> On 6 Jun 2011, at 20:14, David Boxenhorn wrote:
>>> 
 Is there some deep architectural reason why compaction can't be
 replication-aware?
 
 What I mean is, if one node is doing compaction, its replicas
 shouldn't be doing compaction at the same time. Or, at least a quorum
 of nodes should be available at all times.
 
 For example, if RF=3, and one node is doing compaction, the nodes to
 its right and left in the ring should wait on compaction until that
 node is done.
 
 Of course, my real problem is that compaction makes a node pretty much
 unavailable. If we can fix that problem then this is not necessary.
>>> 
>> 



Re: [RELEASE] 0.8.0

2011-06-06 Thread Ryan King
On Mon, Jun 6, 2011 at 6:09 AM, Terje Marthinussen
 wrote:
> Of course I talked too soon.
> I saw a corrupted commitlog some days back after killing cassandra and I
> just came across a committed hints file after a cluster restart for some
> config changes :(
> Will look into that.
> Otherwise, not defaults, but close.
> The dataset is fed from scratch so yes, memtable_total_space is there.
>
> Some option tuning here and there and a few extra GC options and a
> relatively large patch which makes more compact serialization (this may help
> a bit...)
> Most of the tuning dates back to cassandra 0.6/0.7. It could be an
> interesting experiment to see if things got worse without them on 0.8.
> Hopefully I can submit the serialization patch soon.

You might want to watch
https://issues.apache.org/jira/browse/CASSANDRA-674 which should be
ready for testing soon.

-ryan


Re: working with time uuid

2011-06-06 Thread Patrick Julien
thanks

On Mon, Jun 6, 2011 at 11:52 AM, Paul Loy  wrote:
> private static int compareTimestampBytes(ByteBuffer o1, ByteBuffer o2)
> {
> int o1Pos = o1.position();
> int o2Pos = o2.position();
>
> int d = (o1.get(o1Pos+6) & 0xF) - (o2.get(o2Pos+6) & 0xF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos+7) & 0xFF) - (o2.get(o2Pos+7) & 0xFF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos+4) & 0xFF) - (o2.get(o2Pos+4) & 0xFF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos+5) & 0xFF) - (o2.get(o2Pos+5) & 0xFF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos) & 0xFF) - (o2.get(o2Pos) & 0xFF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos+1) & 0xFF) - (o2.get(o2Pos+1) & 0xFF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos+2) & 0xFF) - (o2.get(o2Pos+2) & 0xFF);
> if (d != 0) return d;
>
> return (o1.get(o1Pos+3) & 0xFF) - (o2.get(o2Pos+3) & 0xFF);
> }
>
> Looks like it's only comparing the timestamp bytes.
>
> On Mon, Jun 6, 2011 at 4:06 PM, Patrick Julien  wrote:
>>
>> How does this work exactly?  If you're using generation 1 time uuids
>> for your keys to get ordering, doesn't this mean the keys need to be
>> generated all on the same host when you either query or insert?  Or
>> does cassandra only inspect the bits that represent the time stamp of
>> the UUID when performing a lookup?
>
>
>
> --
> -
> Paul Loy
> p...@keteracel.com
> http://uk.linkedin.com/in/paulloy
>


Re: working with time uuid

2011-06-06 Thread Jonathan Ellis
... although it does break "ties" by comparing the other bytes.

On Mon, Jun 6, 2011 at 10:52 AM, Paul Loy  wrote:
> private static int compareTimestampBytes(ByteBuffer o1, ByteBuffer o2)
> {
> int o1Pos = o1.position();
> int o2Pos = o2.position();
>
> int d = (o1.get(o1Pos+6) & 0xF) - (o2.get(o2Pos+6) & 0xF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos+7) & 0xFF) - (o2.get(o2Pos+7) & 0xFF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos+4) & 0xFF) - (o2.get(o2Pos+4) & 0xFF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos+5) & 0xFF) - (o2.get(o2Pos+5) & 0xFF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos) & 0xFF) - (o2.get(o2Pos) & 0xFF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos+1) & 0xFF) - (o2.get(o2Pos+1) & 0xFF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos+2) & 0xFF) - (o2.get(o2Pos+2) & 0xFF);
> if (d != 0) return d;
>
> return (o1.get(o1Pos+3) & 0xFF) - (o2.get(o2Pos+3) & 0xFF);
> }
>
> Looks like it's only comparing the timestamp bytes.
>
> On Mon, Jun 6, 2011 at 4:06 PM, Patrick Julien  wrote:
>>
>> How does this work exactly?  If you're using generation 1 time uuids
>> for your keys to get ordering, doesn't this mean the keys need to be
>> generated all on the same host when you either query or insert?  Or
>> does cassandra only inspect the bits that represent the time stamp of
>> the UUID when performing a lookup?
>
>
>
> --
> -
> Paul Loy
> p...@keteracel.com
> http://uk.linkedin.com/in/paulloy
>



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


Re: working with time uuid

2011-06-06 Thread Paul Loy
well, to clarify, it first checks the timestamp bytes, then the rest so it
doesn;t say they're the same if they came from 2 different servers.


On Mon, Jun 6, 2011 at 4:52 PM, Paul Loy  wrote:

> private static int compareTimestampBytes(ByteBuffer o1, ByteBuffer o2)
> {
> int o1Pos = o1.position();
> int o2Pos = o2.position();
>
> int d = (o1.get(o1Pos+6) & 0xF) - (o2.get(o2Pos+6) & 0xF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos+7) & 0xFF) - (o2.get(o2Pos+7) & 0xFF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos+4) & 0xFF) - (o2.get(o2Pos+4) & 0xFF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos+5) & 0xFF) - (o2.get(o2Pos+5) & 0xFF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos) & 0xFF) - (o2.get(o2Pos) & 0xFF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos+1) & 0xFF) - (o2.get(o2Pos+1) & 0xFF);
> if (d != 0) return d;
>
> d = (o1.get(o1Pos+2) & 0xFF) - (o2.get(o2Pos+2) & 0xFF);
> if (d != 0) return d;
>
> return (o1.get(o1Pos+3) & 0xFF) - (o2.get(o2Pos+3) & 0xFF);
> }
>
>
> Looks like it's only comparing the timestamp bytes.
>
>
> On Mon, Jun 6, 2011 at 4:06 PM, Patrick Julien  wrote:
>
>> How does this work exactly?  If you're using generation 1 time uuids
>> for your keys to get ordering, doesn't this mean the keys need to be
>> generated all on the same host when you either query or insert?  Or
>> does cassandra only inspect the bits that represent the time stamp of
>> the UUID when performing a lookup?
>>
>
>
>
> --
> -
> Paul Loy
> p...@keteracel.com
> http://uk.linkedin.com/in/paulloy
>



-- 
-
Paul Loy
p...@keteracel.com
http://uk.linkedin.com/in/paulloy


Re: working with time uuid

2011-06-06 Thread Paul Loy
private static int compareTimestampBytes(ByteBuffer o1, ByteBuffer o2)
{
int o1Pos = o1.position();
int o2Pos = o2.position();

int d = (o1.get(o1Pos+6) & 0xF) - (o2.get(o2Pos+6) & 0xF);
if (d != 0) return d;

d = (o1.get(o1Pos+7) & 0xFF) - (o2.get(o2Pos+7) & 0xFF);
if (d != 0) return d;

d = (o1.get(o1Pos+4) & 0xFF) - (o2.get(o2Pos+4) & 0xFF);
if (d != 0) return d;

d = (o1.get(o1Pos+5) & 0xFF) - (o2.get(o2Pos+5) & 0xFF);
if (d != 0) return d;

d = (o1.get(o1Pos) & 0xFF) - (o2.get(o2Pos) & 0xFF);
if (d != 0) return d;

d = (o1.get(o1Pos+1) & 0xFF) - (o2.get(o2Pos+1) & 0xFF);
if (d != 0) return d;

d = (o1.get(o1Pos+2) & 0xFF) - (o2.get(o2Pos+2) & 0xFF);
if (d != 0) return d;

return (o1.get(o1Pos+3) & 0xFF) - (o2.get(o2Pos+3) & 0xFF);
}


Looks like it's only comparing the timestamp bytes.

On Mon, Jun 6, 2011 at 4:06 PM, Patrick Julien  wrote:

> How does this work exactly?  If you're using generation 1 time uuids
> for your keys to get ordering, doesn't this mean the keys need to be
> generated all on the same host when you either query or insert?  Or
> does cassandra only inspect the bits that represent the time stamp of
> the UUID when performing a lookup?
>



-- 
-
Paul Loy
p...@keteracel.com
http://uk.linkedin.com/in/paulloy


Re: [RELEASE] 0.8.0

2011-06-06 Thread Sylvain Lebresne
On Mon, Jun 6, 2011 at 4:17 PM, Terje Marthinussen
 wrote:
> How did that typo happen...
> "across a committed hints file"
> should be
> "across a corrupted hints file"
> Seems like the last supercolumn in the hints file has 0 subcolumns.
> This actually seem to be correctly serialized, but my code has a bug and
> fail to read it.
> When that is said, I wonder why the hint has 0 subcolumns in the first
> place?
> Is that expected behaviour?

If it is a superColumn tombstone, yes, that's expected.

--
Sylvain

> Regards,
> Terje
>
> On Mon, Jun 6, 2011 at 10:09 PM, Terje Marthinussen
>  wrote:
>>
>> Of course I talked too soon.
>> I saw a corrupted commitlog some days back after killing cassandra and I
>> just came across a committed hints file after a cluster restart for some
>> config changes :(
>> Will look into that.
>> Otherwise, not defaults, but close.
>> The dataset is fed from scratch so yes, memtable_total_space is there.
>>
>> Some option tuning here and there and a few extra GC options and a
>> relatively large patch which makes more compact serialization (this may help
>> a bit...)
>> Most of the tuning dates back to cassandra 0.6/0.7. It could be an
>> interesting experiment to see if things got worse without them on 0.8.
>> Hopefully I can submit the serialization patch soon.
>> Regards,
>> Terje
>> On Mon, Jun 6, 2011 at 9:12 PM, Jonathan Ellis  wrote:
>>>
>>> Has this been running w/ default settings (i.e. relying on the new
>>> memtable_total_space_in_mb) or was this an upgrade from 0.7 (or
>>> otherwise had the per-CF memtable settings applied?)
>>>
>>> On Mon, Jun 6, 2011 at 12:00 AM, Terje Marthinussen
>>>  wrote:
>>> > 0.8 under load may turn out to be more stable and well behaving than
>>> > any
>>> > release so far
>>> > Been doing a few test runs stuffing more than 1 billion records into a
>>> > 12
>>> > node cluster and thing looks better than ever.
>>> > VM's stable and nice at 11GB. No data corruptions, dead nodes, full
>>> > GC's or
>>> > any of the other trouble that plagued early 0.7 releases.
>>> > Still have to test more nasty stuff like rebalancing or recovering
>>> > failed
>>> > nodes, but so far I would recommend anyone to consider  0.8 over 0.7.x
>>> > if
>>> > setting up a new system
>>> > Terje
>>> >
>>> > On Fri, Jun 3, 2011 at 5:25 PM, Stephen Connolly
>>> >  wrote:
>>> >>
>>> >> Great work!
>>> >>
>>> >> -Stephen
>>> >>
>>> >> P.S.
>>> >>  As the release of artifacts to Maven Central is now part of the
>>> >> release process, the artifacts are all available from Maven Central
>>> >> already (for people who use Maven/ANT+Ivy/Gradle/Buildr/etc)
>>> >>
>>> >> On 3 June 2011 00:36, Eric Evans  wrote:
>>> >> >
>>> >> > I am very pleased to announce the official release of Cassandra
>>> >> > 0.8.0.
>>> >> >
>>> >> > If you haven't been paying attention to this release, this is your
>>> >> > last
>>> >> > chance, because by this time tomorrow all your friends are going to
>>> >> > be
>>> >> > raving, and you don't want to look silly.
>>> >> >
>>> >> > So why am I resorting to hyperbole?  Well, for one because this is
>>> >> > the
>>> >> > release that debuts the Cassandra Query Language (CQL).  In one fell
>>> >> > swoop Cassandra has become more than NoSQL, it's MoSQL.
>>> >> >
>>> >> > Cassandra also has distributed counters now.  With counters, you can
>>> >> > count stuff, and counting stuff rocks.
>>> >> >
>>> >> > A kickass use-case for Cassandra is spanning data-centers for
>>> >> > fault-tolerance and locality, but doing so has always meant sending
>>> >> > data
>>> >> > in the clear, or tunneling over a VPN.   New for 0.8.0, encryption
>>> >> > of
>>> >> > intranode traffic.
>>> >> >
>>> >> > If you're not motivated to go upgrade your clusters right now,
>>> >> > you're
>>> >> > either not easily impressed, or you're very lazy.  If it's the
>>> >> > latter,
>>> >> > would it help knowing that rolling upgrades between releases is now
>>> >> > supported?  Yeah.  You can upgrade your 0.7 cluster to 0.8 without
>>> >> > shutting it down.
>>> >> >
>>> >> > You see what I mean?  Then go read the release notes[1] to learn
>>> >> > about
>>> >> > the full range of awesomeness, then grab a copy[2] and become a
>>> >> > (fashionably )early adopter.
>>> >> >
>>> >> > Drivers for CQL are available in Python[3], Java[3], and Node.js[4].
>>> >> >
>>> >> > As usual, a Debian package is available from the project's APT
>>> >> > repository[5].
>>> >> >
>>> >> > Enjoy!
>>> >> >
>>> >> >
>>> >> > [1]: http://goo.gl/CrJqJ (NEWS.txt)
>>> >> > [2]: http://cassandra.debian.org/download
>>> >> > [3]: http://www.apache.org/dist/cassandra/drivers
>>> >> > [4]: https://github.com/racker/node-cassandra-client
>>> >> > [5]: http://wiki.apache.org/cassandra/DebianPackaging
>>> >> >
>>> >> > --
>>> >> > Eric Evans
>>> >> > eev...@rackspace.com
>>> >> >
>>> >> >
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Jonathan Ellis
>>> Project Chair, Apache Cassandra
>>> co-founder of DataStax, the source for profe

working with time uuid

2011-06-06 Thread Patrick Julien
How does this work exactly?  If you're using generation 1 time uuids
for your keys to get ordering, doesn't this mean the keys need to be
generated all on the same host when you either query or insert?  Or
does cassandra only inspect the bits that represent the time stamp of
the UUID when performing a lookup?


Re: [RELEASE] 0.8.0

2011-06-06 Thread Terje Marthinussen
How did that typo happen...
"across a committed hints file"
should be
"across a corrupted hints file"

Seems like the last supercolumn in the hints file has 0 subcolumns.
This actually seem to be correctly serialized, but my code has a bug and
fail to read it.

When that is said, I wonder why the hint has 0 subcolumns in the first
place?
Is that expected behaviour?

Regards,
Terje


On Mon, Jun 6, 2011 at 10:09 PM, Terje Marthinussen  wrote:

> Of course I talked too soon.
> I saw a corrupted commitlog some days back after killing cassandra and I
> just came across a committed hints file after a cluster restart for some
> config changes :(
> Will look into that.
>
> Otherwise, not defaults, but close.
> The dataset is fed from scratch so yes, memtable_total_space is there.
>
> Some option tuning here and there and a few extra GC options and a
> relatively large patch which makes more compact serialization (this may help
> a bit...)
>
> Most of the tuning dates back to cassandra 0.6/0.7. It could be an
> interesting experiment to see if things got worse without them on 0.8.
>
> Hopefully I can submit the serialization patch soon.
>
> Regards,
> Terje
>
> On Mon, Jun 6, 2011 at 9:12 PM, Jonathan Ellis  wrote:
>
>> Has this been running w/ default settings (i.e. relying on the new
>> memtable_total_space_in_mb) or was this an upgrade from 0.7 (or
>> otherwise had the per-CF memtable settings applied?)
>>
>> On Mon, Jun 6, 2011 at 12:00 AM, Terje Marthinussen
>>  wrote:
>> > 0.8 under load may turn out to be more stable and well behaving than any
>> > release so far
>> > Been doing a few test runs stuffing more than 1 billion records into a
>> 12
>> > node cluster and thing looks better than ever.
>> > VM's stable and nice at 11GB. No data corruptions, dead nodes, full GC's
>> or
>> > any of the other trouble that plagued early 0.7 releases.
>> > Still have to test more nasty stuff like rebalancing or recovering
>> failed
>> > nodes, but so far I would recommend anyone to consider  0.8 over 0.7.x
>> if
>> > setting up a new system
>> > Terje
>> >
>> > On Fri, Jun 3, 2011 at 5:25 PM, Stephen Connolly
>> >  wrote:
>> >>
>> >> Great work!
>> >>
>> >> -Stephen
>> >>
>> >> P.S.
>> >>  As the release of artifacts to Maven Central is now part of the
>> >> release process, the artifacts are all available from Maven Central
>> >> already (for people who use Maven/ANT+Ivy/Gradle/Buildr/etc)
>> >>
>> >> On 3 June 2011 00:36, Eric Evans  wrote:
>> >> >
>> >> > I am very pleased to announce the official release of Cassandra
>> 0.8.0.
>> >> >
>> >> > If you haven't been paying attention to this release, this is your
>> last
>> >> > chance, because by this time tomorrow all your friends are going to
>> be
>> >> > raving, and you don't want to look silly.
>> >> >
>> >> > So why am I resorting to hyperbole?  Well, for one because this is
>> the
>> >> > release that debuts the Cassandra Query Language (CQL).  In one fell
>> >> > swoop Cassandra has become more than NoSQL, it's MoSQL.
>> >> >
>> >> > Cassandra also has distributed counters now.  With counters, you can
>> >> > count stuff, and counting stuff rocks.
>> >> >
>> >> > A kickass use-case for Cassandra is spanning data-centers for
>> >> > fault-tolerance and locality, but doing so has always meant sending
>> data
>> >> > in the clear, or tunneling over a VPN.   New for 0.8.0, encryption of
>> >> > intranode traffic.
>> >> >
>> >> > If you're not motivated to go upgrade your clusters right now, you're
>> >> > either not easily impressed, or you're very lazy.  If it's the
>> latter,
>> >> > would it help knowing that rolling upgrades between releases is now
>> >> > supported?  Yeah.  You can upgrade your 0.7 cluster to 0.8 without
>> >> > shutting it down.
>> >> >
>> >> > You see what I mean?  Then go read the release notes[1] to learn
>> about
>> >> > the full range of awesomeness, then grab a copy[2] and become a
>> >> > (fashionably )early adopter.
>> >> >
>> >> > Drivers for CQL are available in Python[3], Java[3], and Node.js[4].
>> >> >
>> >> > As usual, a Debian package is available from the project's APT
>> >> > repository[5].
>> >> >
>> >> > Enjoy!
>> >> >
>> >> >
>> >> > [1]: http://goo.gl/CrJqJ (NEWS.txt)
>> >> > [2]: http://cassandra.debian.org/download
>> >> > [3]: http://www.apache.org/dist/cassandra/drivers
>> >> > [4]: https://github.com/racker/node-cassandra-client
>> >> > [5]: http://wiki.apache.org/cassandra/DebianPackaging
>> >> >
>> >> > --
>> >> > Eric Evans
>> >> > eev...@rackspace.com
>> >> >
>> >> >
>> >
>> >
>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of DataStax, the source for professional Cassandra support
>> http://www.datastax.com
>>
>
>


Re: Troubleshooting IO performance ?

2011-06-06 Thread Philippe
hum..no, it wasn't swapping. cassandra was the only thing running on that
server
and i was querying the same keys over and over

i restarted Cassandra and doing the same thing, io is now down to zero while
cpu is up which dosen't surprise me as much.

I'll report if it happens again.
Le 5 juin 2011 16:55, "Jonathan Ellis"  a écrit :
> You may be swapping.
>
> http://spyced.blogspot.com/2010/01/linux-performance-basics.html
> explains how to check this as well as how to see what threads are busy
> in the Java process.
>
> On Sat, Jun 4, 2011 at 5:34 PM, Philippe  wrote:
>> Hello,
>> I am evaluating using cassandra and I'm running into some strange IO
>> behavior that I can't explain, I'd like some help/ideas to troubleshoot
it.
>> I am running a 1 node cluster with a keyspace consisting of two columns
>> families, one of which has dozens of supercolumns itself containing
dozens
>> of columns.
>> All in all, this is a couple gigabytes of data, 12GB on the hard drive.
>> The hardware is pretty good : 16GB memory + RAID-0 SSD drives with LVM
and
>> an i5 processor (4 cores).
>> Keyspace: xxx
>> Read Count: 460754852
>> Read Latency: 1.108205793092766 ms.
>> Write Count: 30620665
>> Write Latency: 0.01411020877567486 ms.
>> Pending Tasks: 0
>> Column Family: xx
>> SSTable count: 5
>> Space used (live): 548700725
>> Space used (total): 548700725
>> Memtable Columns Count: 0
>> Memtable Data Size: 0
>> Memtable Switch Count: 11
>> Read Count: 2891192
>> Read Latency: NaN ms.
>> Write Count: 3157547
>> Write Latency: NaN ms.
>> Pending Tasks: 0
>> Key cache capacity: 367396
>> Key cache size: 367396
>> Key cache hit rate: NaN
>> Row cache capacity: 112683
>> Row cache size: 112683
>> Row cache hit rate: NaN
>> Compacted row minimum size: 125
>> Compacted row maximum size: 924
>> Compacted row mean size: 172
>> Column Family: y
>> SSTable count: 7
>> Space used (live): 8707538781
>> Space used (total): 8707538781
>> Memtable Columns Count: 0
>> Memtable Data Size: 0
>> Memtable Switch Count: 30
>> Read Count: 457863660
>> Read Latency: 2.381 ms.
>> Write Count: 27463118
>> Write Latency: NaN ms.
>> Pending Tasks: 0
>> Key cache capacity: 4518387
>> Key cache size: 4518387
>> Key cache hit rate: 0.9247881700850826
>> Row cache capacity: 1349682
>> Row cache size: 1349682
>> Row cache hit rate: 0.39400533823415573
>> Compacted row minimum size: 125
>> Compacted row maximum size: 6866
>> Compacted row mean size: 165
>> My app makes a bunch of requests using a MultigetSuperSliceQuery for a
set
>> of keys, typically a couple dozen at most. It also selects a subset of
the
>> supercolumns. I am running 8 requests in parallel at most.
>>
>> Two days, I ran a 1.5 hour process that basically read every key. The
server
>> had no IOwaits and everything was humming along. However, right at the
end
>> of the process, there was a huge spike in IOs. I didn't think much of it.
>> Today, after two days of inactivity, any query I run raises the IOs to
80%
>> utilization of the SSD drives even though I'm running the same query over
>> and over (no cache??)
>> Any ideas on how to troubleshoot this, or better, how to solve this ?
>> thanks
>> Philippe
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com


Re: [RELEASE] 0.8.0

2011-06-06 Thread Marcos Ortiz

El 6/6/2011 1:00 AM, Terje Marthinussen escribió:
0.8 under load may turn out to be more stable and well behaving than 
any release so far


Been doing a few test runs stuffing more than 1 billion records into a 
12 node cluster and thing looks better than ever.
VM's stable and nice at 11GB. No data corruptions, dead nodes, full 
GC's or any of the other trouble that plagued early 0.7 releases.


Still have to test more nasty stuff like rebalancing or recovering 
failed nodes, but so far I would recommend anyone to consider  0.8 
over 0.7.x if setting up a new system
Regards, Terje, Can you share with us a blog post or something like that 
your tests?

Thanks


Terje

On Fri, Jun 3, 2011 at 5:25 PM, Stephen Connolly 
> wrote:


Great work!

-Stephen

P.S.
 As the release of artifacts to Maven Central is now part of the
release process, the artifacts are all available from Maven Central
already (for people who use Maven/ANT+Ivy/Gradle/Buildr/etc)

On 3 June 2011 00:36, Eric Evans mailto:eev...@rackspace.com>> wrote:
>
> I am very pleased to announce the official release of Cassandra
0.8.0.
>
> If you haven't been paying attention to this release, this is
your last
> chance, because by this time tomorrow all your friends are going
to be
> raving, and you don't want to look silly.
>
> So why am I resorting to hyperbole?  Well, for one because this
is the
> release that debuts the Cassandra Query Language (CQL).  In one fell
> swoop Cassandra has become more than NoSQL, it's MoSQL.
>
> Cassandra also has distributed counters now.  With counters, you can
> count stuff, and counting stuff rocks.
>
> A kickass use-case for Cassandra is spanning data-centers for
> fault-tolerance and locality, but doing so has always meant
sending data
> in the clear, or tunneling over a VPN.   New for 0.8.0,
encryption of
> intranode traffic.
>
> If you're not motivated to go upgrade your clusters right now,
you're
> either not easily impressed, or you're very lazy.  If it's the
latter,
> would it help knowing that rolling upgrades between releases is now
> supported?  Yeah.  You can upgrade your 0.7 cluster to 0.8 without
> shutting it down.
>
> You see what I mean?  Then go read the release notes[1] to learn
about
> the full range of awesomeness, then grab a copy[2] and become a
> (fashionably )early adopter.
>
> Drivers for CQL are available in Python[3], Java[3], and Node.js[4].
>
> As usual, a Debian package is available from the project's APT
> repository[5].
>
> Enjoy!
>
>
> [1]: http://goo.gl/CrJqJ (NEWS.txt)
> [2]: http://cassandra.debian.org/download
> [3]: http://www.apache.org/dist/cassandra/drivers
> [4]: https://github.com/racker/node-cassandra-client
> [5]: http://wiki.apache.org/cassandra/DebianPackaging
>
> --
> Eric Evans
> eev...@rackspace.com 
>
>





--
Marcos Luís Ortíz Valmaseda
 Software Engineer (UCI)
 http://marcosluis2186.posterous.com
 http://twitter.com/marcosluis2186
  



Re: [RELEASE] 0.8.0

2011-06-06 Thread Terje Marthinussen
Of course I talked too soon.
I saw a corrupted commitlog some days back after killing cassandra and I
just came across a committed hints file after a cluster restart for some
config changes :(
Will look into that.

Otherwise, not defaults, but close.
The dataset is fed from scratch so yes, memtable_total_space is there.

Some option tuning here and there and a few extra GC options and a
relatively large patch which makes more compact serialization (this may help
a bit...)

Most of the tuning dates back to cassandra 0.6/0.7. It could be an
interesting experiment to see if things got worse without them on 0.8.

Hopefully I can submit the serialization patch soon.

Regards,
Terje

On Mon, Jun 6, 2011 at 9:12 PM, Jonathan Ellis  wrote:

> Has this been running w/ default settings (i.e. relying on the new
> memtable_total_space_in_mb) or was this an upgrade from 0.7 (or
> otherwise had the per-CF memtable settings applied?)
>
> On Mon, Jun 6, 2011 at 12:00 AM, Terje Marthinussen
>  wrote:
> > 0.8 under load may turn out to be more stable and well behaving than any
> > release so far
> > Been doing a few test runs stuffing more than 1 billion records into a 12
> > node cluster and thing looks better than ever.
> > VM's stable and nice at 11GB. No data corruptions, dead nodes, full GC's
> or
> > any of the other trouble that plagued early 0.7 releases.
> > Still have to test more nasty stuff like rebalancing or recovering failed
> > nodes, but so far I would recommend anyone to consider  0.8 over 0.7.x if
> > setting up a new system
> > Terje
> >
> > On Fri, Jun 3, 2011 at 5:25 PM, Stephen Connolly
> >  wrote:
> >>
> >> Great work!
> >>
> >> -Stephen
> >>
> >> P.S.
> >>  As the release of artifacts to Maven Central is now part of the
> >> release process, the artifacts are all available from Maven Central
> >> already (for people who use Maven/ANT+Ivy/Gradle/Buildr/etc)
> >>
> >> On 3 June 2011 00:36, Eric Evans  wrote:
> >> >
> >> > I am very pleased to announce the official release of Cassandra 0.8.0.
> >> >
> >> > If you haven't been paying attention to this release, this is your
> last
> >> > chance, because by this time tomorrow all your friends are going to be
> >> > raving, and you don't want to look silly.
> >> >
> >> > So why am I resorting to hyperbole?  Well, for one because this is the
> >> > release that debuts the Cassandra Query Language (CQL).  In one fell
> >> > swoop Cassandra has become more than NoSQL, it's MoSQL.
> >> >
> >> > Cassandra also has distributed counters now.  With counters, you can
> >> > count stuff, and counting stuff rocks.
> >> >
> >> > A kickass use-case for Cassandra is spanning data-centers for
> >> > fault-tolerance and locality, but doing so has always meant sending
> data
> >> > in the clear, or tunneling over a VPN.   New for 0.8.0, encryption of
> >> > intranode traffic.
> >> >
> >> > If you're not motivated to go upgrade your clusters right now, you're
> >> > either not easily impressed, or you're very lazy.  If it's the latter,
> >> > would it help knowing that rolling upgrades between releases is now
> >> > supported?  Yeah.  You can upgrade your 0.7 cluster to 0.8 without
> >> > shutting it down.
> >> >
> >> > You see what I mean?  Then go read the release notes[1] to learn about
> >> > the full range of awesomeness, then grab a copy[2] and become a
> >> > (fashionably )early adopter.
> >> >
> >> > Drivers for CQL are available in Python[3], Java[3], and Node.js[4].
> >> >
> >> > As usual, a Debian package is available from the project's APT
> >> > repository[5].
> >> >
> >> > Enjoy!
> >> >
> >> >
> >> > [1]: http://goo.gl/CrJqJ (NEWS.txt)
> >> > [2]: http://cassandra.debian.org/download
> >> > [3]: http://www.apache.org/dist/cassandra/drivers
> >> > [4]: https://github.com/racker/node-cassandra-client
> >> > [5]: http://wiki.apache.org/cassandra/DebianPackaging
> >> >
> >> > --
> >> > Eric Evans
> >> > eev...@rackspace.com
> >> >
> >> >
> >
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>


Re: [SPAM] Re: [SPAM] Re: slow insertion rate with secondary index

2011-06-06 Thread Donal Zang

On 06/06/2011 14:29, David Boxenhorn wrote:

Jonathan, are Donal Zang's results (10x slowdown) typical?

On Mon, Jun 6, 2011 at 3:14 PM, Jonathan Ellis > wrote:


On Mon, Jun 6, 2011 at 6:28 AM, Donal Zang mailto:zan...@ihep.ac.cn>> wrote:
> Another thing I noticed is : if you first do insertion, and then
build the
> secondary index use "update column family ...", and then do
select based on
> the index, the result is not right (seems the index is still
being built
> though the "update" commands returns quickly).

That is correct. "describe keyspace" from the cli tells you when an
index has finished building.

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



seems similar to this https://issues.apache.org/jira/browse/CASSANDRA-2470

--
Donal Zang
Computing Center, IHEP
19B YuquanLu, Shijingshan District,Beijing, 100049
zan...@ihep.ac.cn
86 010 8823 6018



Re: [SPAM] Re: slow insertion rate with secondary index

2011-06-06 Thread Jonathan Ellis
If the rows you are updating are not cached, yes.  (Otherwise maybe 10% slower.)

On Mon, Jun 6, 2011 at 7:29 AM, David Boxenhorn  wrote:
> Jonathan, are Donal Zang's results (10x slowdown) typical?
>
> On Mon, Jun 6, 2011 at 3:14 PM, Jonathan Ellis  wrote:
>>
>> On Mon, Jun 6, 2011 at 6:28 AM, Donal Zang  wrote:
>> > Another thing I noticed is : if you first do insertion, and then build
>> > the
>> > secondary index use "update column family ...", and then do select based
>> > on
>> > the index, the result is not right (seems the index is still being built
>> > though the "update" commands returns quickly).
>>
>> That is correct. "describe keyspace" from the cli tells you when an
>> index has finished building.
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of DataStax, the source for professional Cassandra support
>> http://www.datastax.com
>
>



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


Re: Replication-aware compaction

2011-06-06 Thread David Boxenhorn
Version 0.7.3.

Yes, I am talking about minor compactions. I have three nodes, RF=3.
3G data (before replication). Not many users (yet). It seems like 3
nodes should be plenty. But when all 3 nodes are compacting, I
sometimes get timeouts on the client, and I see in my logs that each
one is full of notifications that the other nodes have died (and come
back to life after about a second). My cluster can tolerate one node
being out of commission, so I would rather have longer compactions one
at a time than shorter compactions all at the same time.

I think that our usage pattern of bursty writes causes the three nodes
to decide to compact at the same time. These bursts are followed by
periods of relative quiet, so there should be time for the other two
nodes to compact one at a time.


On Mon, Jun 6, 2011 at 3:27 PM, David Boxenhorn  wrote:
>
> Version 0.7.3.
>
> Yes, I am talking about minor compactions. I have three nodes, RF=3. 3G data 
> (before replication). Not many users (yet). It seems like 3 nodes should be 
> plenty. But when all 3 nodes are compacting, I sometimes get timeouts on the 
> client, and I see in my logs that each one is full of notifications that the 
> other nodes have died (and come back to life after about a second). My 
> cluster can tolerate one node being out of commission, so I would rather have 
> longer compactions one at a time than shorter compactions all at the same 
> time.
>
> I think that our usage pattern of bursty writes causes the three nodes to 
> decide to compact at the same time. These bursts are followed by periods of 
> relative quiet, so there should be time for the other two nodes to compact 
> one at a time.
>
>
> On Mon, Jun 6, 2011 at 2:36 PM, aaron morton  wrote:
>>
>> Are you talking about minor (automatic) compactions ? Can you provide some 
>> more information on what's happening to make the node unusable and what 
>> version you are using? It's not lightweight process, but it should not hurt 
>> the node that badly. It is considered an online operation.
>>
>> Delaying compaction will only make it run for longer and take more resources.
>>
>> Cheers
>>
>> -
>> Aaron Morton
>> Freelance Cassandra Developer
>> @aaronmorton
>> http://www.thelastpickle.com
>>
>> On 6 Jun 2011, at 20:14, David Boxenhorn wrote:
>>
>> > Is there some deep architectural reason why compaction can't be
>> > replication-aware?
>> >
>> > What I mean is, if one node is doing compaction, its replicas
>> > shouldn't be doing compaction at the same time. Or, at least a quorum
>> > of nodes should be available at all times.
>> >
>> > For example, if RF=3, and one node is doing compaction, the nodes to
>> > its right and left in the ring should wait on compaction until that
>> > node is done.
>> >
>> > Of course, my real problem is that compaction makes a node pretty much
>> > unavailable. If we can fix that problem then this is not necessary.
>>
>


Re: [SPAM] Re: slow insertion rate with secondary index

2011-06-06 Thread David Boxenhorn
Jonathan, are Donal Zang's results (10x slowdown) typical?

On Mon, Jun 6, 2011 at 3:14 PM, Jonathan Ellis  wrote:

> On Mon, Jun 6, 2011 at 6:28 AM, Donal Zang  wrote:
> > Another thing I noticed is : if you first do insertion, and then build
> the
> > secondary index use "update column family ...", and then do select based
> on
> > the index, the result is not right (seems the index is still being built
> > though the "update" commands returns quickly).
>
> That is correct. "describe keyspace" from the cli tells you when an
> index has finished building.
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>


Re: [SPAM] Re: slow insertion rate with secondary index

2011-06-06 Thread Jonathan Ellis
On Mon, Jun 6, 2011 at 6:28 AM, Donal Zang  wrote:
> Another thing I noticed is : if you first do insertion, and then build the
> secondary index use "update column family ...", and then do select based on
> the index, the result is not right (seems the index is still being built
> though the "update" commands returns quickly).

That is correct. "describe keyspace" from the cli tells you when an
index has finished building.

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


Re: [RELEASE] 0.8.0

2011-06-06 Thread Jonathan Ellis
Has this been running w/ default settings (i.e. relying on the new
memtable_total_space_in_mb) or was this an upgrade from 0.7 (or
otherwise had the per-CF memtable settings applied?)

On Mon, Jun 6, 2011 at 12:00 AM, Terje Marthinussen
 wrote:
> 0.8 under load may turn out to be more stable and well behaving than any
> release so far
> Been doing a few test runs stuffing more than 1 billion records into a 12
> node cluster and thing looks better than ever.
> VM's stable and nice at 11GB. No data corruptions, dead nodes, full GC's or
> any of the other trouble that plagued early 0.7 releases.
> Still have to test more nasty stuff like rebalancing or recovering failed
> nodes, but so far I would recommend anyone to consider  0.8 over 0.7.x if
> setting up a new system
> Terje
>
> On Fri, Jun 3, 2011 at 5:25 PM, Stephen Connolly
>  wrote:
>>
>> Great work!
>>
>> -Stephen
>>
>> P.S.
>>  As the release of artifacts to Maven Central is now part of the
>> release process, the artifacts are all available from Maven Central
>> already (for people who use Maven/ANT+Ivy/Gradle/Buildr/etc)
>>
>> On 3 June 2011 00:36, Eric Evans  wrote:
>> >
>> > I am very pleased to announce the official release of Cassandra 0.8.0.
>> >
>> > If you haven't been paying attention to this release, this is your last
>> > chance, because by this time tomorrow all your friends are going to be
>> > raving, and you don't want to look silly.
>> >
>> > So why am I resorting to hyperbole?  Well, for one because this is the
>> > release that debuts the Cassandra Query Language (CQL).  In one fell
>> > swoop Cassandra has become more than NoSQL, it's MoSQL.
>> >
>> > Cassandra also has distributed counters now.  With counters, you can
>> > count stuff, and counting stuff rocks.
>> >
>> > A kickass use-case for Cassandra is spanning data-centers for
>> > fault-tolerance and locality, but doing so has always meant sending data
>> > in the clear, or tunneling over a VPN.   New for 0.8.0, encryption of
>> > intranode traffic.
>> >
>> > If you're not motivated to go upgrade your clusters right now, you're
>> > either not easily impressed, or you're very lazy.  If it's the latter,
>> > would it help knowing that rolling upgrades between releases is now
>> > supported?  Yeah.  You can upgrade your 0.7 cluster to 0.8 without
>> > shutting it down.
>> >
>> > You see what I mean?  Then go read the release notes[1] to learn about
>> > the full range of awesomeness, then grab a copy[2] and become a
>> > (fashionably )early adopter.
>> >
>> > Drivers for CQL are available in Python[3], Java[3], and Node.js[4].
>> >
>> > As usual, a Debian package is available from the project's APT
>> > repository[5].
>> >
>> > Enjoy!
>> >
>> >
>> > [1]: http://goo.gl/CrJqJ (NEWS.txt)
>> > [2]: http://cassandra.debian.org/download
>> > [3]: http://www.apache.org/dist/cassandra/drivers
>> > [4]: https://github.com/racker/node-cassandra-client
>> > [5]: http://wiki.apache.org/cassandra/DebianPackaging
>> >
>> > --
>> > Eric Evans
>> > eev...@rackspace.com
>> >
>> >
>
>



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


Re: Setting up cluster and nodetool ring in 0.8.0

2011-06-06 Thread David McNelis
Just to close this out, in case anyone was interested...  my problem was
firewall related, in that I didn't have my messaging/data port (7000) open
on my seed node.  Allowing traffic on this port resolved my issues.


On Fri, Jun 3, 2011 at 1:43 PM, David McNelis wrote:

> Thanks, Jonathan.   Both machines do have the exact same seed list.
>
>
> On Fri, Jun 3, 2011 at 1:39 PM, Jonathan Ellis  wrote:
>
>> On Fri, Jun 3, 2011 at 11:21 AM, David McNelis
>>  wrote:
>> > I want to make sure I'm not seeing things from a weird perspective.  I
>> have
>> > two Cassandra instances where one is set to be the seed, with
>> autobootstap
>> > disabled and its seed being 127.0.0.1.
>> > The second instance has autobootstrap enabled and the seed IP set to the
>> IP
>> > of the first node.
>>
>> Seed lists should _always_ be identical on each machine (which implies
>> they should _never_ be localhost, in a multinode configuration).
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of DataStax, the source for professional Cassandra support
>> http://www.datastax.com
>>
>
>
>
> --
> *David McNelis*
> Lead Software Engineer
> Agentis Energy
> www.agentisenergy.com
> o: 630.359.6395
> c: 219.384.5143
>
> *A Smart Grid technology company focused on helping consumers of energy
> control an often under-managed resource.*
>
>
>


-- 
*David McNelis*
Lead Software Engineer
Agentis Energy
www.agentisenergy.com
o: 630.359.6395
c: 219.384.5143

*A Smart Grid technology company focused on helping consumers of energy
control an often under-managed resource.*


Re: Migration question

2011-06-06 Thread aaron morton
Sounds like you are OK to turn off the existing cluster first. 

Assuming so, deliver any hints using JMX then do a nodetool flush to write out 
all the memtables and checkpoint the commit logs. You can then copy the data 
directories. 

The System data directory contains the nodes token and the schema, you will 
want to copy this directory. You may also want to copy the cassandra.yaml or 
create new ones with the correct initial tokens. 

The nodes will sort themselves out when they start up and get new IP's, the 
important thing to them is the token. 

Cheers

-
Aaron Morton
Freelance Cassandra Developer
@aaronmorton
http://www.thelastpickle.com

On 6 Jun 2011, at 23:25, Eric Czech wrote:

> Hi, I have a quick question about migrating a cluster.
> 
> We have a cassandra cluster with 10 nodes that we'd like to move to a new DC 
> and what I was hoping to do is just copy the SSTables for each node to a 
> corresponding node in the new DC (the new cluster will also have 10 nodes).  
> Is there any reason that a straight file copy like this wouldn't work?  Do 
> any system tables need to be moved as well or is there anything else that 
> needs to be done?
> 
> Thanks!



Re: problems with many columns on a row

2011-06-06 Thread Mario Micklisch
:-)

There are several data Files:

# ls -al *-Data.db

-rw-r--r-- 1 cassandra cassandra  53785327 2011-06-05 14:44
CFTest-g-21-Data.db
-rw-r--r-- 1 cassandra cassandra  56474656 2011-06-05 18:04
CFTest-g-38-Data.db
-rw-r--r-- 1 cassandra cassandra  21705904 2011-06-05 20:02
CFTest-g-45-Data.db
-rw--- 1 cassandra cassandra   3720201 2011-06-05 20:13
CFTest-g-46-Data.db
-rw-r--r-- 1 cassandra cassandra 135684874 2011-06-05 20:14
CFTest-g-47-Data.db
-rw-r--r-- 1 cassandra cassandra   4347351 2011-06-05 20:35
CFTest-g-48-Data.db
-rw-r--r-- 1 cassandra cassandra   4341698 2011-06-05 20:56
CFTest-g-49-Data.db
-rw-r--r-- 1 cassandra cassandra   4350949 2011-06-05 21:17
CFTest-g-50-Data.db
-rw-r--r-- 1 cassandra cassandra   4346066 2011-06-05 21:38
CFTest-g-51-Data.db
-rw-r--r-- 1 cassandra cassandra  17384858 2011-06-05 21:39
CFTest-g-52-Data.db
-rw-r--r-- 1 cassandra cassandra   4342983 2011-06-05 21:59
CFTest-g-53-Data.db
-rw-r--r-- 1 cassandra cassandra   4339771 2011-06-05 22:21
CFTest-g-54-Data.db
-rw-r--r-- 1 cassandra cassandra   4349165 2011-06-05 22:42
CFTest-g-55-Data.db
-rw-r--r-- 1 cassandra cassandra  30415571 2011-06-05 22:42
CFTest-g-56-Data.db

Cheers,
 Mario




2011/6/6 aaron morton 

> Ops, I misread "150 GB" in one of your earlier emails as "150 MB" so forget
> what I said before. You have loads of free space :)
>
> How many files do you have in your data directory ? If it's 1 then that log
> message was a small bug, that has been fixed.
>
> Cheers
>
>  -
> Aaron Morton
> Freelance Cassandra Developer
> @aaronmorton
> http://www.thelastpickle.com
>
> On 5 Jun 2011, at 23:51, Mario Micklisch wrote:
>
> I found a patch for the php extension here:
>
> https://issues.apache.org/jira/browse/THRIFT-1067
>
> … this seemed to fix the issue. Thank you Jonathan and Aaron for taking
> time to provide me with some help!
> Regarding the compaction I would still love to hear your feedback on how to
> configure Cassandra accordingly.
>
> Here are my facts again:
>
> Data size on disk: ~1GB
> Data Volume: ~150GB free storage
> OS Volume: ~3GB free storage
>
> Tried:
> nodetool --host localhost compact
>
> The logfiles said:
> ERROR [CompactionExecutor:2] 2011-06-05 11:44:39,346 CompactionManager.java
> (line 510) insufficient space to compact even the two smallest files,
> aborting
> ERROR [CompactionExecutor:2] 2011-06-05 11:44:39,348 CompactionManager.java
> (line 510) insufficient space to compact even the two smallest files,
> aborting
> ERROR [CompactionExecutor:2] 2011-06-05 11:44:39,349 CompactionManager.java
> (line 510) insufficient space to compact even the two smallest files,
> aborting
>  INFO [CompactionExecutor:2] 2011-06-05 11:44:39,366 CompactionManager.java
> (line 539) Compacting Major:
> [SSTableReader(path='/mnt/cassandra/data/system/LocationInfo-g-81-Data.db'),
> SSTableReader(path='/mnt/cassandra/data/system/LocationInfo-g-80-Data.db'),
> SSTableReader(path='/mnt/cassandra/data/system/LocationInfo-g-79-Data.db')]
>  INFO [CompactionExecutor:2] 2011-06-05 11:44:39,502
> CompactionIterator.java (line 186) Major@23231510(system, LocationInfo,
> 386/689) now compacting at 16777 bytes/ms.
>  INFO [CompactionExecutor:2] 2011-06-05 11:44:39,713 CompactionManager.java
> (line 603) Compacted to
> /mnt/cassandra/data/system/LocationInfo-tmp-g-82-Data.db.  689 to 446 (~64%
> of original) bytes for 3 keys.  Time: 346ms.
> ERROR [CompactionExecutor:2] 2011-06-05 11:44:39,726 CompactionManager.java
> (line 510) insufficient space to compact even the two smallest files,
> aborting
> ERROR [CompactionExecutor:2] 2011-06-05 11:44:39,726 CompactionManager.java
> (line 510) insufficient space to compact even the two smallest files,
> aborting
>
> # du -hs /mnt/cassandra/
> 886M /mnt/cassandra/
>
> # df -H
> Filesystem Size   Used  Avail Use% Mounted on
> /dev/sda1  8.5G   4.9G   3.6G  49% /
> /dev/sda2  158G   1.2G   149G   1% /mnt
>
>
> # nodetool --host localhost info
> 130915841875673808436922706546793999597
> Gossip active: true
> Load : 1.48 MB
> Generation No: 1307273982
> Uptime (seconds) : 383
> Heap Memory (MB) : 89.59 / 822.00
>
>
> Thank you,
>  Mario
>
>
>
> 2011/6/5 Mario Micklisch 
>
>> I tracked down the timestamp submission and everything was fine within the
>> PHP Libraries.
>>
>> The thrift php extension however seems to have an overflow, because it was
>> now setting now timestamps with also negative values ( -1242277493 ). I
>> disabled the php extension and as a result I now got correct microsecond
>> timestamps: 1307270937122897
>>
>> I was using the latest version from
>> http://www.apache.org/dist/thrift/0.6.1/ to build the extension without
>> using any special parameters (just ./configure --enable-gen-php=yes and
>> make install).
>>
>> Downloaded and re-compiled it, without any change. I can also  see no
>> compile parameters to set which might help.
>>
>>
>> Any advise where to go from here?
>>
>>
>> Th

Re: Replication-aware compaction

2011-06-06 Thread aaron morton
Are you talking about minor (automatic) compactions ? Can you provide some more 
information on what's happening to make the node unusable and what version you 
are using? It's not lightweight process, but it should not hurt the node that 
badly. It is considered an online operation. 
 
Delaying compaction will only make it run for longer and take more resources. 
 
Cheers

-
Aaron Morton
Freelance Cassandra Developer
@aaronmorton
http://www.thelastpickle.com

On 6 Jun 2011, at 20:14, David Boxenhorn wrote:

> Is there some deep architectural reason why compaction can't be
> replication-aware?
> 
> What I mean is, if one node is doing compaction, its replicas
> shouldn't be doing compaction at the same time. Or, at least a quorum
> of nodes should be available at all times.
> 
> For example, if RF=3, and one node is doing compaction, the nodes to
> its right and left in the ring should wait on compaction until that
> node is done.
> 
> Of course, my real problem is that compaction makes a node pretty much
> unavailable. If we can fix that problem then this is not necessary.



Migration question

2011-06-06 Thread Eric Czech
Hi, I have a quick question about migrating a cluster.

We have a cassandra cluster with 10 nodes that we'd like to move to a new DC
and what I was hoping to do is just copy the SSTables for each node to a
corresponding node in the new DC (the new cluster will also have 10 nodes).
Is there any reason that a straight file copy like this wouldn't work?  Do
any system tables need to be moved as well or is there anything else that
needs to be done?

Thanks!


Re: [SPAM] Re: slow insertion rate with secondary index

2011-06-06 Thread Donal Zang

On 06/06/2011 10:15, David Boxenhorn wrote:
Is there really a 10x difference between indexed CFs and non-indexed CFs? 

Well, as for my test, it is!
I'm using 0.7.6-2, 9 nodes, 3 replicas, write_consistency_level QUORUM, 
about 90,000,000 rows (~ 1K per row)

I use 20 process, 20rows for each insertion.
the insertion time for the whole row is about 0.02 seconds without index
and then I add a secondary index, and update every row with the indexed 
column, the insertion time is about 2 seconds

and if I remove the index, and update the column, the time is about 0.002

Another thing I noticed is : if you first do insertion, and then build 
the secondary index use "update column family ...", and then do select 
based on the index, the result is not right (seems the index is still 
being built though the "update" commands returns quickly). And after a 
while, the get_indexed_slices() goes time out from time to time (with 
pycassa.ConnectionPool('keyspace1', ['host1','host2'], timeout=600, 
pool_size=1) ).


Does some one else have some same experiences using the secondary indexes?

--
Donal Zang
Computing Center, IHEP
19B YuquanLu, Shijingshan District,Beijing, 100049
zan...@ihep.ac.cn
86 010 8823 6018




Re: [SPAM] Re: slow insertion rate with secondary index

2011-06-06 Thread David Boxenhorn
Is there really a 10x difference between indexed CFs and non-indexed CFs?

On Mon, Jun 6, 2011 at 11:05 AM, Donal Zang  wrote:

> On 06/06/2011 05:38, Jonathan Ellis wrote:
>
>> Index updates require read-before-write (to find out what the prior
>> version was, if any, and update the index accordingly).  This is
>> random i/o.
>>
>> Index creation on the other hand is a lot of sequential i/o, hence
>> more efficient.
>>
>> So, the classic bulk load advice to ingest data prior to creating
>> indexes applies.
>>
> Thanks for the explanation!
>
> --
> Donal Zang
> Computing Center, IHEP
> 19B YuquanLu, Shijingshan District,Beijing, 100049
> zan...@ihep.ac.cn
> 86 010 8823 6018
>
>
>


Replication-aware compaction

2011-06-06 Thread David Boxenhorn
Is there some deep architectural reason why compaction can't be
replication-aware?

What I mean is, if one node is doing compaction, its replicas
shouldn't be doing compaction at the same time. Or, at least a quorum
of nodes should be available at all times.

For example, if RF=3, and one node is doing compaction, the nodes to
its right and left in the ring should wait on compaction until that
node is done.

Of course, my real problem is that compaction makes a node pretty much
unavailable. If we can fix that problem then this is not necessary.


Re: [SPAM] Re: slow insertion rate with secondary index

2011-06-06 Thread Donal Zang

On 06/06/2011 05:38, Jonathan Ellis wrote:

Index updates require read-before-write (to find out what the prior
version was, if any, and update the index accordingly).  This is
random i/o.

Index creation on the other hand is a lot of sequential i/o, hence
more efficient.

So, the classic bulk load advice to ingest data prior to creating
indexes applies.

Thanks for the explanation!

--
Donal Zang
Computing Center, IHEP
19B YuquanLu, Shijingshan District,Beijing, 100049
zan...@ihep.ac.cn
86 010 8823 6018