Re: too many open files - maybe a fd leak in indexslicequeries

2011-03-31 Thread Jonathan Ellis
Index queries (ColumnFamilyStore.scan) don't do any low-level i/o
themselves, they go through CFS.getColumnFamily, which is what normal
row fetches also go through.  So if there is a leak there it's
unlikely to be specific to indexes.

What is your open-file limit (remember that sockets count towards
this), thread count, sstable count?

On Thu, Mar 31, 2011 at 4:15 PM, Roland Gude  wrote:
> I experience something that looks exactly like
> https://issues.apache.org/jira/browse/CASSANDRA-1178
>
> On cassandra 0.7.3 when using index slice queries (lots of them)
>
> Crashing multiple nodes and rendering the cluster useless. But I have no
> clue where to look if index queries still leak fd
>
>
>
> Does anybody know about it?
>
> Where could I look?
>
>
>
> Greetings,
>
> roland
>
>
>
> --
>
> YOOCHOOSE GmbH
>
>
>
> Roland Gude
>
> Software Engineer
>
>
>
> Im Mediapark 8, 50670 Köln
>
>
>
> +49 221 4544151 (Tel)
>
> +49 221 4544159 (Fax)
>
> +49 171 7894057 (Mobil)
>
>
>
>
>
> Email: roland.g...@yoochoose.com
>
> WWW: www.yoochoose.com
>
>
>
> YOOCHOOSE GmbH
>
> Geschäftsführer: Dr. Uwe Alkemper, Michael Friedmann
>
> Handelsregister: Amtsgericht Köln HRB 65275
>
> Ust-Ident-Nr: DE 264 773 520
>
> Sitz der Gesellschaft: Köln
>
>



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


Re: Requests stuck on production cluster

2011-03-31 Thread Jonathan Ellis
What's going on in the logs?  CPU?  i/o?

On Thu, Mar 31, 2011 at 4:20 AM, Or Yanay  wrote:

> Hi all,
>
>
>
> My production cluster reads got stuck.
>
> The ring gives:
>
>
>
> Address Status State   LoadOwns
> Token
>
>
> 146231632500721020374621781629360107476
>
>
> 10.39.21.7  Up Normal  118.86 GB   18.15%
> 6968792681466807915334918525105891681
>
> 10.39.21.2  Up Normal  170.37 GB   33.20%
> 63458945745812644657648926377562798568
>
> 10.39.21.4  Up Normal  129.49 GB   2.09%
> 67020233994527804731783987345291668992
>
> 10.39.21.3  Up Normal  118.57 GB   31.26%
> 120208618942813734646032022699594259441
>
> 10.39.21.6  Up Normal  171.03 GB   15.29%
> 146231632500721020374621781629360107476
>
>
>
> The 2% bit struck me as odd, so I ran tpstats on 10.39.21.4 and got:
>
> Pool Name
>
> Active
>
> Pending
>
> Completed
>
> ReadStage
>
> 0
>
> 0
>
> 143370
>
> *RequestResponseStage*
>
> *8*
>
> *1231283*
>
> *414467*
>
> MutationStage
>
> 0
>
> 0
>
> 1772203
>
> ReadRepair
>
> 0
>
> 0
>
> 7678
>
> GossipStage
>
> 0
>
> 0
>
> 204797
>
> AntiEntropyStage
>
> 0
>
> 0
>
> 0
>
> MigrationStage
>
> 0
>
> 0
>
> 0
>
> MemtablePostFlusher
>
> 0
>
> 0
>
> 48
>
> StreamStage
>
> 0
>
> 0
>
> 0
>
> FlushWriter
>
> 0
>
> 0
>
> 48
>
> FILEUTILS-DELETE-POOL
>
> 0
>
> 0
>
> 46
>
> MiscStage
>
> 0
>
> 0
>
> 0
>
> FlushSorter
>
> 0
>
> 0
>
> 0
>
> InternalResponseStage
>
> 0
>
> 0
>
> 0
>
> HintedHandoff
>
> 0
>
> 0
>
> 6
>
>
>
> So… something got terribly wrong.
>
> Can anyone suggest what should do next to fix this?
>
>
>
> Thanks.
>
> -Orr
>



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


Endless minor compactions after heavy inserts

2011-03-31 Thread Sheng Chen
I've got a single node of cassandra 0.7.4, and I used the java stress tool
to insert about 100 million records.
The inserts took about 6 hours (45k inserts/sec) but the following minor
compactions last for 2 days and the pending compaction jobs are still
increasing.

>From jconsole I can read the MemtableThroughputInMB=1499,
MemtableOperationsInMillions=7.0
But in my data directory, I got hundreds of 438MB data files, which should
be the cause of the minor compactions.

I tried to set compaction threshold by nodetool, but it didn't seem to take
effects (no change in pending compaction tasks).
After restarting the node, my setting is lost.

I want to distribute the read load in my disks (10 disks in xfs, LVM), so I
don't want to do a major compaction.
So, what can I do to keep the sstable file in a reasonable size, or to make
the minor compactions faster?

Thank you in advance.
Sheng


Re: Node added, no performance boost -- are the tokens correct?

2011-03-31 Thread buddhasystem
Yup, I screwed up the token setting, my bad.

Now, I moved the tokens. I still observe that read latency deteriorated with
3 machines vs original one. Replication factor is 1, Cassandra version 0.7.2
(didn't have time to upgrade as I need results by this weekend).

Key and row caching was disabled to get the worse case scenario test
results.


--
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Node-added-no-performance-boost-are-the-tokens-correct-tp6228872p6229564.html
Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
Nabble.com.


Re: nodetool cfstathistogram error

2011-03-31 Thread Edward Capriolo
On Thu, Mar 31, 2011 at 8:25 PM, mcasandra  wrote:
> It looks like if I use system schema it fails. Is it because of
> LocalPartitioner?
>
> I ran with other keyspace and got following output.
>
> Offset SSTables Write Latency Read Latency Row Size Column Count
> 1 0 0 0 0 0
> 2 0 0 0 0 0
> 179 0 0 0 320 320
>
>
> Can someone please help me understand the output in first 2 columns? Why are
> SSTables always "0"?
>
> I am writing shell/awk scripts to parse this data and send it out to
> monitoring tool.
>
> So far I am planning to monitor output of netstat, tpstat and cfhistograms.
> Is there anything else I should monitor that might be helpful?
>
> --
> View this message in context: 
> http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/nodetool-cfstathistogram-error-tp6228995p6229038.html
> Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
> Nabble.com.
>

The system schema would does not work, and probably would not produce
any interesting output if it did.


A Simple scenario, Help needed

2011-03-31 Thread Prasanna Rajaperumal
Hi All,

I am trying out a very simple scenario and I dont seem to get it working. It 
would be great if I am pointed to some things here.

I have set up a 2 node cluster, cassandra.yaml being the default and same for 
each other than the seed: being each other and I have set the Thrift RPC 
address and listen_address to publicly available hostnames. Replication factory 
is set to 1

I have a client (using Hector) to do some basic operations like write, read, 
delete.

CassandraHostConfigurator config = new 
CassandraHostConfigurator("arti-dev-logger-2:9160,arti-dev-logger-1:9160");
config.setAutoDiscoverHosts(true);
Cluster cluster = HFactory.createCluster("dev_cluster", config);
Keyspace artiKeyspace = 
HFactory.createKeyspace(this.getArti_persistence_cassandra_keyspace(), cluster, 
new ConsistencyLevelPolicy(){
@Override
public HConsistencyLevel get(OperationType op) {
return HConsistencyLevel.ONE;
}
@Override
public HConsistencyLevel get(OperationType op, String 
cfName) {
return HConsistencyLevel.ONE;
}
});

Nodetool show the ring fine.

[root@arti-dev-logger-1 bin]# ./nodetool -host arti-dev-logger-1 ring
Address Status State   LoadOwnsToken
   
   
140881507882391765636814029248607183802 
171.71.189.47   Up Normal  54.3 KB 60.79%  
74161420796139335783812688622390550898  
171.71.189.48   Up Normal  66.96 KB39.21%  
140881507882391765636814029248607183802

[root@arti-dev-logger-1 bin]# ./nodetool -host arti-dev-logger-2 ring
Address Status State   LoadOwnsToken
   
   
140881507882391765636814029248607183802 
171.71.189.47   Up Normal  54.3 KB 60.79%  
74161420796139335783812688622390550898  
171.71.189.48   Up Normal  66.96 KB39.21%  
140881507882391765636814029248607183802 

I observe, If I have arti-dev-logger-1 down and run my test against against the 
cluster, my test is successful.
If I bring up the arti-dev-logger-1 and take down arti-dev-logger-2, My test 
complains 

com.cisco.step.arti.persistence.CassandraException: : May not be enough 
replicas present to handle consistency level.

I would imagine I am doing something very fundamental here, I have not attached 
any test case hoping that any experienced person looking at might be able to 
figure out what is going on right away.

Thanks
Prasanna



Re: Ditching Cassandra

2011-03-31 Thread Edward Capriolo
Gregori,
Congrats on writing the fud-liest post of the month award. Firstly if
you don't like updates give up on computers and software. Especally
give up on anything that has to do with nosql because it is fast
evolving.

If you think you have a problem with the cassandra api, then what you
really have a problem with the data model. You should have done more
research nine months ago.

I can not understand from rant exactly what you think is better about
the mongo api. I see the complaint "lots of code" I suggest "books on
design patterns".

It is hardly the fault of cassandra that it works with so many
languages and people create higher level clients and abstractions for
it.

I believe it is a testament to cassandra that many places that are
historically non java shops can pick up ruby or php clients and dive
in.

Also I do not see exactly what is so hard about the api thrift
generates. To me it looks like the memcache api except the value is a
map. I do not see what needs to be wrapped around it to make it
easier... Maybe a factory method to one liner things?


On Wednesday, March 30, 2011, Ashlee Saunders
 wrote:
> Thanks for the feedback Grgori,
> We in Australia are only concerned with solutions as we are a solutions 
> focused organization. With respect to your feedback, you and your team seem 
> to have identified no solutions other than jumping ship. When we subscribed 
> to the 50 or so emails per day, we wanted to contribute solutions to the 
> Cassandra community rather than dwell on problems.
>
> I have enjoyed following the team on this project, and they have been very 
> solutions focused. Please refrain from contributing negatively. Find 
> solutions to the Cassandra project.
>
> To the rest, please keep up the great work.
>
> Ashlee Saunders
>
> On 31/03/2011, at 7:19 AM, Ed Anuff  wrote:
>
>> My concern when I see something like this is it might cause developers
>> on the project to get worried and start to try to solve the wrong
>> problems.  Cassandra is not going to be as easy as Mongo, certainly
>> not any time soon.  CQL won't do it, although it will help.  This
>> isn't a criticism of Cassandra or CQL though.  Cassandra isn't here to
>> compete with Mongo on ease of use, it's here to compete on
>> scalability.  Secondly, the client libraries are not a mess.  Some
>> might be, some are not - Hector, which is the one I contribute to, is
>> pretty good.  Client libraries aren't going away.  People are still
>> building "client libraries" on top of SQL four decades later, we just
>> call them ORM or middleware.  Cassandra's data model is by necessity
>> somewhat complicated, and most of the client libraries are going to
>> have to be more than wrappers around Thrift or easy ways to send CQL.
>> There's where Hector is going, it has a lightweight JPA implementation
>> and it's going to have a very robust implementation soon.  Honestly,
>> the only criticism by the OP that should be taken to heart is
>> stability.  Cassandra can be the hardest database in the world to use
>> and still succeed, but it has to be rock solid at all levels of scale,
>> and that has to be the focus in the near term.
>>
>> On Tue, Mar 29, 2011 at 5:11 PM, Gregori Schmidt  wrote:
>>> hi,
>>> After using Cassandra during development for the past 8 months my team and I
>>> made the decision to switch from Cassandra to MongoDB this morning.  I
>>> thought I'd share some thoughts on why we did this and where Cassandra might
>>> benefit from improvement.
>


Re: Does anyone build 0.7.4 on IDEA?

2011-03-31 Thread Maki Watanabe
ant on my command line had completed without error.
Next I tried to build cassandra 0.7.4 in eclipse, and had luck.
So I'll explore cassandra code with eclipse, rather than IDEA.

maki

2011/3/31 Maki Watanabe :
> Not yet. I'll try.
>
> maki
>
> 2011/3/31 Tommy Tynjä :
>> Have you assured you are able to build Cassandra outside
>> of IDEA, e.g. on command line?
>>
>> Best regards,
>> Tommy
>> @tommysdk
>>
>> On Thu, Mar 31, 2011 at 3:56 AM, Maki Watanabe  
>> wrote:
>>> Hello,
>>>
>>> I'm trying to build and run cassandra 0.7.4-src on IntelliJ IDEA 10 CE
>>> on OSX with reading
>>> http://wiki.apache.org/cassandra/RunningCassandraInIDEA.
>>> Though I need to omit interface/avro/gen-java, exclude
>>> java/org/apache/cassandra/hadoop, and
>>> download&add jna.jar into library path, I could kill most of errors.
>>>
>>> However, now it complains on compiling
>>> java/org/apache/cassandra/db/ReadResponse.java, because of:
>>>  Error:(93, 27) can't access to org.apache.cassandra.db.RowSerializer
>>>                      can't find class file of
>>> org.apache.cassandra.db.RowSerializer
>>>
>>> I found the class RowSerializer in Row.java, as package
>>> org.apache.cassandra.db scope,
>>> But ReadResponse.java is in the package also. Then I can't understand
>>> why IDEA can't find the class.
>>>
>>> Any suggestion?
>>>
>>> maki
>>>
>>
>



-- 
w3m


Re: nodetool cfstathistogram error

2011-03-31 Thread mcasandra
It looks like if I use system schema it fails. Is it because of
LocalPartitioner?

I ran with other keyspace and got following output.

Offset SSTables Write Latency Read Latency Row Size Column Count
1 0 0 0 0 0
2 0 0 0 0 0
179 0 0 0 320 320


Can someone please help me understand the output in first 2 columns? Why are
SSTables always "0"?

I am writing shell/awk scripts to parse this data and send it out to
monitoring tool. 

So far I am planning to monitor output of netstat, tpstat and cfhistograms.
Is there anything else I should monitor that might be helpful?

--
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/nodetool-cfstathistogram-error-tp6228995p6229038.html
Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
Nabble.com.


nodetool cfstathistogram error

2011-03-31 Thread mcasandra
Cassandra 7.4:

nodetool -h `hostname` cfhistograms system schema
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
at $Proxy5.getRecentReadLatencyHistogramMicros(Unknown Source)
at
org.apache.cassandra.tools.NodeCmd.printCfHistograms(NodeCmd.java:452)
at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:605)
Caused by: javax.management.InstanceNotFoundException:
org.apache.cassandra.db:type=ColumnFamilies,keyspace=system,columnfamily=schema
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:662)
at
com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638)
at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1404)
at
javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265)
at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1360)
at
javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:600)
at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
at
javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(Unknown
Source)
at
javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:878)
at
javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:263)


Am I doing something wrong?

--
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/nodetool-cfstathistogram-error-tp6228995p6228995.html
Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
Nabble.com.


Re: RTG/MRTG/Cricket replacement using Cassandra?

2011-03-31 Thread Aaron Turner
On Thu, Mar 31, 2011 at 4:19 PM, Ryan King  wrote:
> We have a solution for time series data on cassandra at Twitter that
> we'd like to open source, but it requires 0.8/trunk so we're not going
> to release it until that's stable.
>
> See 
> http://www.slideshare.net/kevinweil/rainbird-realtime-analytics-at-twitter-strata-2011
>

Yeah, having high performance hierarchical aggregation would be
awesome for this kind of application.  I hate to re-invent the wheel,
but it's not something I can really wait a long time either.   I was
planning on just manually inserting the same value into multiple rows
rather then trying to build the aggregates off 5min data for
weekly/monthly/yearly at query time.

Other then: http://blog.insidesystems.net/basic-time-series-with-cassandra#more

any other good references for storing time series data?

On a side note: looks like the Perl API isn't being maintained well...
how's the ruby API overall?  stable?  performance?

Thanks!

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


Re: Node added, no performance boost -- are the tokens correct?

2011-03-31 Thread Edward Capriolo
On Thu, Mar 31, 2011 at 6:15 PM, Eric Gilmore  wrote:
> A script that I have says the following:
>
> $ python ctokens.py
> How many nodes are in your cluster? 2
> node 0: 0
> node 1: 85070591730234615865843651857942052864
>
> The first token should be zero, for the reasons discussed here:
> http://www.datastax.com/dev/tutorials/getting_started_0_7/configuring#initial-token-values
>
> More details are available in
> http://www.datastax.com/docs/0.7/operations/clustering#adding-capacity
>
> The DS docs have some weak areas, but these two pages have been pretty well
> vetted over the past months :)
>
>
>
> On Thu, Mar 31, 2011 at 3:06 PM, buddhasystem  wrote:
>>
>> I just configured a cluster of two nodes -- do these token values make
>> sense?
>> The reason I'm asking that so far I don't see load balancing to be
>> happening, judging from performance.
>>
>> Address         Status State   Load            Owns    Token
>>
>> 170141183460469231731687303715884105728
>> 130.199.185.194 Up     Normal  153.52 GB       50.00%
>> 85070591730234615865843651857942052864
>> 130.199.185.193 Up     Normal  199.82 GB       50.00%
>> 170141183460469231731687303715884105728
>>
>>
>> --
>> View this message in context:
>> http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Node-added-no-performance-boost-are-the-tokens-correct-tp6228872p6228872.html
>> Sent from the cassandra-u...@incubator.apache.org mailing list archive at
>> Nabble.com.
>
>

The first token does not "really" have to be zero. They just have been
spread evenly across the token space.


Re: RTG/MRTG/Cricket replacement using Cassandra?

2011-03-31 Thread Paul Choi
Just finished looking at the slides. It looks awesome!

On 3/31/11 4:19 PM, "Ryan King"  wrote:

>We have a solution for time series data on cassandra at Twitter that
>we'd like to open source, but it requires 0.8/trunk so we're not going
>to release it until that's stable.
>
>See 
>http://www.slideshare.net/kevinweil/rainbird-realtime-analytics-at-twitter
>-strata-2011
>
>-ryan
>
>On Thu, Mar 31, 2011 at 3:56 PM, Aaron Turner 
>wrote:
>> I've been looking at replacing our PostgreSQL backend for RTG (a SNMP
>> based polling and graphing solution for network traffic/ports) with
>> something using Cassandra in order to solve our scalability and
>> redundancy requirements.  Based on a lot of what I've read, Cassandra
>> is an ideal data store for this  time series data.  In fact, Eric
>> Evans in his presentation on the Cassandra home page suggests that
>> this kind of use case is perfect for Cassandra.
>>
>> So this got me wondering if someone had already come up with a CF
>> model for this kind of data, including daily/weekly/monthly/yearly
>> rollups.  Perhaps there's even an open source project or two
>> implementing this sorta thing?  I've found flewton
>> (https://github.com/flewton/flewton), which is possibly relevant, but
>> my Java skills are pretty non-existent so I'm having a hard time
>> figuring it out.
>>
>> Thanks,
>> Aaron
>>
>> --
>> Aaron Turner
>> http://synfin.net/ Twitter: @synfinatic
>> http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix &
>>Windows
>> Those who would give up essential Liberty, to purchase a little
>>temporary
>> Safety, deserve neither Liberty nor Safety.
>> -- Benjamin Franklin
>> "carpe diem quam minimum credula postero"
>>



Re: newbie question: how do I know the total number of rows of a cf?

2011-03-31 Thread aaron morton
It iterates over all the SSTables and disk and estimates the number of keys by 
looking at how big the index is. It does not count the actual keys. 

aaron


On 31 Mar 2011, at 17:46, Sheng Chen wrote:

> I just found an estmateKeys() method of the ColumnFamilyStoreMBean.
> Is there any indication about how it works?
> 
> Sheng
> 
> 2011/3/28 Sheng Chen 
> Hi all,
> I want to know how many records I am holding in Cassandra, just like count(*) 
> in sql.
> What can I do ? Thank you.
> 
> Sheng
> 
> 
> 



Re: RTG/MRTG/Cricket replacement using Cassandra?

2011-03-31 Thread Ryan King
We have a solution for time series data on cassandra at Twitter that
we'd like to open source, but it requires 0.8/trunk so we're not going
to release it until that's stable.

See 
http://www.slideshare.net/kevinweil/rainbird-realtime-analytics-at-twitter-strata-2011

-ryan

On Thu, Mar 31, 2011 at 3:56 PM, Aaron Turner  wrote:
> I've been looking at replacing our PostgreSQL backend for RTG (a SNMP
> based polling and graphing solution for network traffic/ports) with
> something using Cassandra in order to solve our scalability and
> redundancy requirements.  Based on a lot of what I've read, Cassandra
> is an ideal data store for this  time series data.  In fact, Eric
> Evans in his presentation on the Cassandra home page suggests that
> this kind of use case is perfect for Cassandra.
>
> So this got me wondering if someone had already come up with a CF
> model for this kind of data, including daily/weekly/monthly/yearly
> rollups.  Perhaps there's even an open source project or two
> implementing this sorta thing?  I've found flewton
> (https://github.com/flewton/flewton), which is possibly relevant, but
> my Java skills are pretty non-existent so I'm having a hard time
> figuring it out.
>
> Thanks,
> Aaron
>
> --
> Aaron Turner
> http://synfin.net/         Twitter: @synfinatic
> http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & 
> Windows
> Those who would give up essential Liberty, to purchase a little temporary
> Safety, deserve neither Liberty nor Safety.
>     -- Benjamin Franklin
> "carpe diem quam minimum credula postero"
>


Re: Cassandra error Insufficient space to compact

2011-03-31 Thread aaron morton
Where are the connection refused messages ? Are they client side ? Can you 
cannot to the cluster with nodetool and run the ring command ? 

Aaron
On 31 Mar 2011, at 11:44, Anurag Gujral wrote:

> I restarted the cassandra node with more disks when I try to connect to 
> cassandra i get connection refused errors.
> I see the following in the logs
> INFO [HintedHandoff:1] 2011-03-30 19:37:42,189 HintedHandOffManager.java 
> (line 304) Started hinted handoff for endpoint /10.97.145.35
>  INFO [HintedHandoff:1] 2011-03-30 19:37:42,190 HintedHandOffManager.java 
> (line 360) Finished hinted handoff of 0 rows to endpoint /10.97.145.35
>  INFO [ScheduledTasks:1] 2011-03-30 19:39:03,500 Gossiper.java (line 224) 
> InetAddress /10.97.145.35 is now dead.
>  INFO [COMMIT-LOG-WRITER] 2011-03-30 19:39:27,695 CommitLogSegment.java (line 
> 50) Creating new commitlog segment 
> /var/lib/cassandra/commitlog/CommitLog-1301531967695.log
>  INFO [HintedHandoff:1] 2011-03-30 19:39:34,588 HintedHandOffManager.java 
> (line 284) Checking remote schema before delivering hints
>  INFO [GossipStage:1] 2011-03-30 19:39:34,588 Gossiper.java (line 600) 
> InetAddress  *.*/.*.*is now UP
>  INFO [HintedHandoff:1] 2011-03-30 19:39:34,588 HintedHandOffManager.java 
> (line 290) Sleeping 3601ms to stagger hint delivery
>  INFO [HintedHandoff:1] 2011-03-30 19:39:38,190 HintedHandOffManager.java 
> (line 304) Started hinted handoff for endpoint /10.97.145.35
>  INFO [HintedHandoff:1] 2011-03-30 19:39:38,190 HintedHandOffManager.java 
> (line 360) Finished hinted handoff of 0 rows to endpoint /10.97.145.35
> 
> Does this imply cassandra is  not going to respond when it is coming up
> 
> Please Sugest
> 
> Thanks
> Anurag
> 
> On Wed, Mar 30, 2011 at 4:59 PM, Narendra Sharma  
> wrote
> :
> 
> 
> The space referred in the log message is disk space and not heap. So check if 
> you are running low on disk space. 
> 
> Thanks,
> Naren
> 
> 
> On Wed, Mar 30, 2011 at 4:55 PM, Anurag Gujral  
> wrote:
> Hi All,
>   I am getting following message from cassandra
> 
>  WARN [CompactionExecutor:1] 2011-03-30 18:46:33,272 CompactionManager.java 
> (line 406) insufficient space to compact all requested files SSTableReader(
> 
> I am using 16G of java heap space ,please let me know should I consider this 
> as a sign of  something which I need to worry about.
> Thanks
> Anurag
> 
> 
> 
> -- 
> Narendra Sharma
> Solution Architect
> http://www.persistentsys.com
> http://narendrasharma.blogspot.com/
> 
> 
> 



Re: RTG/MRTG/Cricket replacement using Cassandra?

2011-03-31 Thread David Hawthorne
I know cloudkick is doing something like this, and we're developing our own 
in-house method, but it would be nice for there to be a generically-available 
package that would do this.  Lately I've been wishing that someone would take 
graphite (written in python) and put the frontend on top of cassandra instead 
of their proprietary whisper databases.  The counter support in 0.8 should help 
with keeping the rollups up-to-date.

On Mar 31, 2011, at 3:56 PM, Aaron Turner wrote:

> I've been looking at replacing our PostgreSQL backend for RTG (a SNMP
> based polling and graphing solution for network traffic/ports) with
> something using Cassandra in order to solve our scalability and
> redundancy requirements.  Based on a lot of what I've read, Cassandra
> is an ideal data store for this  time series data.  In fact, Eric
> Evans in his presentation on the Cassandra home page suggests that
> this kind of use case is perfect for Cassandra.
> 
> So this got me wondering if someone had already come up with a CF
> model for this kind of data, including daily/weekly/monthly/yearly
> rollups.  Perhaps there's even an open source project or two
> implementing this sorta thing?  I've found flewton
> (https://github.com/flewton/flewton), which is possibly relevant, but
> my Java skills are pretty non-existent so I'm having a hard time
> figuring it out.
> 
> Thanks,
> Aaron
> 
> -- 
> Aaron Turner
> http://synfin.net/ Twitter: @synfinatic
> http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & 
> Windows
> Those who would give up essential Liberty, to purchase a little temporary
> Safety, deserve neither Liberty nor Safety.
> -- Benjamin Franklin
> "carpe diem quam minimum credula postero"



Re: Attempt to assign id to existing column family.

2011-03-31 Thread aaron morton
There is no reason to change the RF on the system keyspace, it should probably 
not be allowed.

The system keyspace uses a LocalPartitioner and it's data is not replicated 
through the same mechanism as a user keyspace. 
 
Aaron
 
On 31 Mar 2011, at 10:22, Jeremy Stribling wrote:

> On 03/30/2011 02:54 PM, Jeremy Stribling wrote:
>> After restarting a Cassandra 0.7.2 node, the node catches an exception 
>> during initialization and refuses to start:
>> 
>> Caused by: org.apache.cassandra.config.ConfigurationException: Attempt to 
>> assign id to existing column family.
>>at org.apache.cassandra.config.CFMetaData.map(CFMetaData.java:222)
>>at 
>> org.apache.cassandra.config.DatabaseDescriptor.loadSchemas(DatabaseDescriptor.java:477)
>>  
>>... 2 more
>> 
>> Unlike a previous thread about this topic 
>> (http://www.mail-archive.com/user@cassandra.apache.org/msg09024.html), we 
>> are not trying to preserve the JVM across restarts.  The restart comes up in 
>> an entirely fresh JVM.  We are, however, embedding Cassandra in our 
>> application, but we're using the same steps used by AbstractCassandraDaemon 
>> to bring it up.
>> 
>> Looking briefly through the code, the only way I see that this can happen is 
>> if loadSchemas tries to load information about the system table from storage 
>> (because the system table can be created in CFMetaData from the earlier 
>> DatabaseDescriptor.getTableMetaData(Table.SYSTEM_TABLE).values() call).  Or 
>> I guess the data on disk could have multiple entries under the same key, but 
>> the system table issue seems more likely to me.  Unfortunately the logging 
>> is not specific enough for me to tell which key it is failing with, and I 
>> haven't been able to reproduce this yet.
>> 
>> One relevant piece of information might be that, before the restart, our 
>> application changed the replication factor of all the tables, including the 
>> system table:
>> 
>> 2011-03-29 23:09:39,194 291146 [MigrationStage:1] INFO 
>> org.apache.cassandra.db.migration.Migration  - Applying migration 
>> 9f371026-5a59-11e0-b23f-65ed1eced995 Update keyspace systemrep factor:1rep  
>> strategy:LocalStrategy{...} to systemrep factor:3rep 
>> strategy:LocalStrategy{...}
>> 
>> We're doing this in order to dynamically change the replication factor as 
>> new nodes are being added to the cluster (e.g., it starts off with one node 
>> and a repfactor of 1, and once there are three nodes, it increases the 
>> repfactor on all tables to 3).  Is it possible that migrations over the 
>> system table get written to disk in a way that would cause loadSchemas() 
>> during a restart to hit this exception?  Are we even allowed to change the 
>> replication factor of the system table?
>> 
> 
> I've confirmed that this happens when loading column family "IndexInfo" from 
> the table "system" during the loadSchemas() call.  Does anyone know if 
> there's a way to get around this?  Perhaps, like I theorized, it's not legit 
> to change the replication factor on the system table.
> 
> 



RTG/MRTG/Cricket replacement using Cassandra?

2011-03-31 Thread Aaron Turner
I've been looking at replacing our PostgreSQL backend for RTG (a SNMP
based polling and graphing solution for network traffic/ports) with
something using Cassandra in order to solve our scalability and
redundancy requirements.  Based on a lot of what I've read, Cassandra
is an ideal data store for this  time series data.  In fact, Eric
Evans in his presentation on the Cassandra home page suggests that
this kind of use case is perfect for Cassandra.

So this got me wondering if someone had already come up with a CF
model for this kind of data, including daily/weekly/monthly/yearly
rollups.  Perhaps there's even an open source project or two
implementing this sorta thing?  I've found flewton
(https://github.com/flewton/flewton), which is possibly relevant, but
my Java skills are pretty non-existent so I'm having a hard time
figuring it out.

Thanks,
Aaron

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


Re: Revised: Data Modeling advise for Cassandra 0.8 (added #8)

2011-03-31 Thread aaron morton
It does not have a yaml file, so am assuming it's the default Random 
Partitioner. 

Aaron

On 1 Apr 2011, at 04:51, Drew Kutcharian wrote:

> Thanks Aaron,
> 
> I have already checked out Twissandra. I was mainly looking to see how 
> Secondary Indexes can be used and how they effect Data Modeling. There 
> doesn't seem to be a lot of coverage on them.
> 
> In addition, I couldn't tell what kind of Partitioner is Twissandra using and 
> why.
> 
> cheers,
> 
> Drew
> 
> 
> On Mar 31, 2011, at 5:53 AM, aaron morton wrote:
> 
>> Drew, 
>>  The Twissandra project is a twitter clone in cassandra, it may give you 
>> some insight into how things can be modelled 
>> https://github.com/thobbs/twissandra
>> 
>>  If you are just starting then consider something like...
>> 
>>  - CF to hold the user, their data and their network links  
>>  - standard CF to hold a blog entry, key is a timestamp 
>>  - standard CF to hold blog comments, each comment as a single column 
>> where the name is a long timestamp 
>>  - standard CF to hold the blogs for a user, key is the user id and each 
>> column is the blog key 
>> 
>> Thats not a great schema but it's a simple starting point you can build on 
>> and refine using things like secondary indexes and doing more/less in the 
>> same CF. 
>> 
>> Good luck. 
>> Aaron
>> 
>> On 30 Mar 2011, at 15:13, Drew Kutcharian wrote:
>> 
>>> I'm pretty new to Cassandra and I would like to get your advice on 
>>> modeling. The object model of the project that I'm working on will be 
>>> pretty close to Blogger, Tumblr, etc. (or any other blogging website).
>>> Where you have Users, that each can have many Blogs and each Blog can have 
>>> many comments. How would you model this efficiently considering:
>>> 
>>> 1) Be able to directly link to a User
>>> 2) Be able to directly link to a Blog
>>> 3) Be able to query and get all the Blogs for a User ordered by time 
>>> created descending (new blogs first)
>>> 4) Be able to query and get all the Comments for each Blog ordered by time 
>>> created ascending (old comments first)
>>> 5) Be able to link different Users to each other, as a network.
>>> 6) Have a well distributed hash so we don't end up with "hot" nodes, while 
>>> the rest of the nodes are idle
>>> 7) It would be nice to show a User how many Blogs they have or how many 
>>> comments are on a Blog, without iterating thru the whole dataset.
>>> NEW: 8) Be able to query for the most recently added Blogs. For example, 
>>> Blogs added today, this week, this month, etc.
>>> 
>>> The target Cassandra version is 0.8 to use the Secondary Indexes. The goal 
>>> is to be very efficient, so no Text keys. We were thinking of using Time 
>>> Based 64bit ids, using Snowflake.
>>> 
>>> Thanks,
>>> 
>>> Drew
>> 
> 



Re: How to determine if repair need to be run

2011-03-31 Thread Eric Gilmore
Peter, I want to join everyone else thanking you for helping out so much
with this thread, and especially for pointing out the problems with the DS
docs on this topic.  We have some corrections posted today, and will keep
looking to improve the information.

On Thu, Mar 31, 2011 at 3:11 PM, Peter Schuller  wrote:

> > Thanks a lot for elaborating on repairs.Still, it's a bit fuzzy to me
> why it is so important to run a repair before the GCGraceSeconds kicks in.
> Does this mean a delete does not get "replicated" ?   In other words when I
> delete something on a node, doesn't cassandra set tombstones on its replica
> copies?
>
> Deletes are replicated, but deletes are special in that unlike actual
> data, you're wanting to *remove* something, but the information that
> says "stuff is gone" is information in and of itself. Clearly you
> don't want to forever and ever keep track of anything ever removed in
> the cluster, so this has to expire somehow. For that reason, there is
> a requirement that tombstones are replicated prior to their expiry.
> See:
>
>  http://wiki.apache.org/cassandra/DistributedDeletes
>
> > And technically, isn't repair only needed for cases where things weren't
> properly propogated in the cluster?  If all writes are written to the right
> replicas, and all deletes are written to all the replicas, and all nodes
> were available at all times, then everything should work as designed -
>  without manual intervention, right?
>
> Yes, but you can assume that doesn't happen in real life for extended
> periods of time. It doesn't take a lot at all for a *few* writes not
> getting replicated (for example, just restarting a Cassandra node will
> cause some writes to be dropped - hinted handoff is not a guarantee,
> only an optimization).
>
> --
> / Peter Schuller
>


Re: Node added, no performance boost -- are the tokens correct?

2011-03-31 Thread Eric Gilmore
A script that I have says the following:

$ python ctokens.py
How many nodes are in your cluster? 2
node 0: 0
node 1: 85070591730234615865843651857942052864

The first token should be zero, for the reasons discussed here:
http://www.datastax.com/dev/tutorials/getting_started_0_7/configuring#initial-token-values

More details are available in
http://www.datastax.com/docs/0.7/operations/clustering#adding-capacity

The DS docs have some weak areas, but these two pages have been pretty well
vetted over the past months :)



On Thu, Mar 31, 2011 at 3:06 PM, buddhasystem  wrote:

> I just configured a cluster of two nodes -- do these token values make
> sense?
> The reason I'm asking that so far I don't see load balancing to be
> happening, judging from performance.
>
> Address Status State   LoadOwnsToken
>
> 170141183460469231731687303715884105728
> 130.199.185.194 Up Normal  153.52 GB   50.00%
> 85070591730234615865843651857942052864
> 130.199.185.193 Up Normal  199.82 GB   50.00%
> 170141183460469231731687303715884105728
>
>
> --
> View this message in context:
> http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Node-added-no-performance-boost-are-the-tokens-correct-tp6228872p6228872.html
> Sent from the cassandra-u...@incubator.apache.org mailing list archive at
> Nabble.com.
>


too many open files - maybe a fd leak in indexslicequeries

2011-03-31 Thread Roland Gude
I experience something that looks exactly like 
https://issues.apache.org/jira/browse/CASSANDRA-1178
On cassandra 0.7.3 when using index slice queries (lots of them)
Crashing multiple nodes and rendering the cluster useless. But I have no clue 
where to look if index queries still leak fd

Does anybody know about it?
Where could I look?

Greetings,
roland

--
YOOCHOOSE GmbH

Roland Gude
Software Engineer

Im Mediapark 8, 50670 Köln

+49 221 4544151 (Tel)
+49 221 4544159 (Fax)
+49 171 7894057 (Mobil)


Email: roland.g...@yoochoose.com
WWW: www.yoochoose.com

YOOCHOOSE GmbH
Geschäftsführer: Dr. Uwe Alkemper, Michael Friedmann
Handelsregister: Amtsgericht Köln HRB 65275
Ust-Ident-Nr: DE 264 773 520
Sitz der Gesellschaft: Köln



Re: How to determine if repair need to be run

2011-03-31 Thread Peter Schuller
> Thanks a lot for elaborating on repairs.    Still, it's a bit fuzzy to me why 
> it is so important to run a repair before the GCGraceSeconds kicks in.   Does 
> this mean a delete does not get "replicated" ?   In other words when I delete 
> something on a node, doesn't cassandra set tombstones on its replica copies?

Deletes are replicated, but deletes are special in that unlike actual
data, you're wanting to *remove* something, but the information that
says "stuff is gone" is information in and of itself. Clearly you
don't want to forever and ever keep track of anything ever removed in
the cluster, so this has to expire somehow. For that reason, there is
a requirement that tombstones are replicated prior to their expiry.
See:

  http://wiki.apache.org/cassandra/DistributedDeletes

> And technically, isn't repair only needed for cases where things weren't 
> properly propogated in the cluster?  If all writes are written to the right 
> replicas, and all deletes are written to all the replicas, and all nodes were 
> available at all times, then everything should work as designed -  without 
> manual intervention, right?

Yes, but you can assume that doesn't happen in real life for extended
periods of time. It doesn't take a lot at all for a *few* writes not
getting replicated (for example, just restarting a Cassandra node will
cause some writes to be dropped - hinted handoff is not a guarantee,
only an optimization).

-- 
/ Peter Schuller


Node added, no performance boost -- are the tokens correct?

2011-03-31 Thread buddhasystem
I just configured a cluster of two nodes -- do these token values make sense?
The reason I'm asking that so far I don't see load balancing to be
happening, judging from performance.

Address Status State   LoadOwnsToken
  
170141183460469231731687303715884105728
130.199.185.194 Up Normal  153.52 GB   50.00% 
85070591730234615865843651857942052864
130.199.185.193 Up Normal  199.82 GB   50.00% 
170141183460469231731687303715884105728


--
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Node-added-no-performance-boost-are-the-tokens-correct-tp6228872p6228872.html
Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
Nabble.com.


Re: How to determine if repair need to be run

2011-03-31 Thread Jonathan Colby
Peter -

Thanks a lot for elaborating on repairs.Still, it's a bit fuzzy to me why 
it is so important to run a repair before the GCGraceSeconds kicks in.   Does 
this mean a delete does not get "replicated" ?   In other words when I delete 
something on a node, doesn't cassandra set tombstones on its replica copies?

And technically, isn't repair only needed for cases where things weren't 
properly propogated in the cluster?  If all writes are written to the right 
replicas, and all deletes are written to all the replicas, and all nodes were 
available at all times, then everything should work as designed -  without 
manual intervention, right?

Thanks again.



On Mar 31, 2011, at 6:17 PM, Peter Schuller wrote:

>> silly question, would every cassandra installation need to have manual 
>> repairs done on it?
>> 
>> It would seem cassandra's "read repair" and regular compaction would take 
>> care of keeping the data clean.
>> 
>> Am I missing something?
> 
> See my previous posts in this thread for the distinct reasons to run
> repair. Except in special circumstances where you know exactly what
> you're doing (mainly that no deletes are performed), you are
> *required* to run repair often enough for GGraceSeconds:
> 
>   http://wiki.apache.org/cassandra/Operations#Frequency_of_nodetool_repair
> 
> It seems that there needs to be some more elaborate documentation
> about this somewhere to point to since there seems to be confusion.
> 
> Regular compaction does *not* imply repair. Read repair only works if
> (1) you touch all data within GCGraceSeconds, and (2) you touch it in
> such a way that read repair is enabled (e.g., not range scans), and
> (3) no node ever happens to be down, flap, or drop a request when you
> touch the data in question.
> 
> Basically, unless you are really sure what you're doing - run repair.
> 
> -- 
> / Peter Schuller



Re: Not able to set ZERO consistency level

2011-03-31 Thread Edward Capriolo
On Thu, Mar 31, 2011 at 2:53 PM, Peter Schuller
 wrote:
>> Only the following Levels are provided, I am wondering if the ZERO
>> consistency level is removed in Cassandra 0.7.X ?
>
> Yes, it's gone.
>
>> If so, Could you please explain why was it removed and what is the best
>> option I have given my context.
>
> https://issues.apache.org/jira/browse/CASSANDRA-1607
>
> Are you *sure* you want it? :)
>
> --
> / Peter Schuller
>

ANY would be the next step up. Beware though of the "eventually
consistent boogie man!"


Re: Not able to set ZERO consistency level

2011-03-31 Thread Peter Schuller
> Only the following Levels are provided, I am wondering if the ZERO
> consistency level is removed in Cassandra 0.7.X ?

Yes, it's gone.

> If so, Could you please explain why was it removed and what is the best
> option I have given my context.

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

Are you *sure* you want it? :)

-- 
/ Peter Schuller


Not able to set ZERO consistency level

2011-03-31 Thread Prasanna Rajaperumal
Hi,

I am dealing with reporting with not so important data and I am okay with data 
being lost.
I would like to minimize the time taken for the actual data insert.
I am using Cassandra 0.7.4
If it matter, using Hector to connect to Cassandra

cZERO consistency level in Thrift Generated code
org.apache.cassandra.thrift.ConsistencyLevel

Only the following Levels are provided, I am wondering if the ZERO consistency 
level is removed in Cassandra 0.7.X ?
ANY
ONE
QUORUM
LOCAL_QUORUM
EACH_QUORUM
ALL

If so, Could you please explain why was it removed and what is the best option 
I have given my context.

Thanks
Prasanna Rajaperumal



Re: Revised: Data Modeling advise for Cassandra 0.8 (added #8)

2011-03-31 Thread Drew Kutcharian
Thanks Aaron,

I have already checked out Twissandra. I was mainly looking to see how 
Secondary Indexes can be used and how they effect Data Modeling. There doesn't 
seem to be a lot of coverage on them.

In addition, I couldn't tell what kind of Partitioner is Twissandra using and 
why.

cheers,

Drew


On Mar 31, 2011, at 5:53 AM, aaron morton wrote:

> Drew, 
>   The Twissandra project is a twitter clone in cassandra, it may give you 
> some insight into how things can be modelled 
> https://github.com/thobbs/twissandra
> 
>   If you are just starting then consider something like...
> 
>   - CF to hold the user, their data and their network links  
>   - standard CF to hold a blog entry, key is a timestamp 
>   - standard CF to hold blog comments, each comment as a single column 
> where the name is a long timestamp 
>   - standard CF to hold the blogs for a user, key is the user id and each 
> column is the blog key 
> 
> Thats not a great schema but it's a simple starting point you can build on 
> and refine using things like secondary indexes and doing more/less in the 
> same CF. 
> 
> Good luck. 
> Aaron
> 
> On 30 Mar 2011, at 15:13, Drew Kutcharian wrote:
> 
>> I'm pretty new to Cassandra and I would like to get your advice on modeling. 
>> The object model of the project that I'm working on will be pretty close to 
>> Blogger, Tumblr, etc. (or any other blogging website).
>> Where you have Users, that each can have many Blogs and each Blog can have 
>> many comments. How would you model this efficiently considering:
>> 
>> 1) Be able to directly link to a User
>> 2) Be able to directly link to a Blog
>> 3) Be able to query and get all the Blogs for a User ordered by time created 
>> descending (new blogs first)
>> 4) Be able to query and get all the Comments for each Blog ordered by time 
>> created ascending (old comments first)
>> 5) Be able to link different Users to each other, as a network.
>> 6) Have a well distributed hash so we don't end up with "hot" nodes, while 
>> the rest of the nodes are idle
>> 7) It would be nice to show a User how many Blogs they have or how many 
>> comments are on a Blog, without iterating thru the whole dataset.
>> NEW: 8) Be able to query for the most recently added Blogs. For example, 
>> Blogs added today, this week, this month, etc.
>> 
>> The target Cassandra version is 0.8 to use the Secondary Indexes. The goal 
>> is to be very efficient, so no Text keys. We were thinking of using Time 
>> Based 64bit ids, using Snowflake.
>> 
>> Thanks,
>> 
>> Drew
> 



Re: pycassa refresh server_list

2011-03-31 Thread Tyler Hobbs
ConnectionPool has a set_server_list() method that you can use to update the
list of servers.  (It appears this method did not make it into the docs;
I'll make sure it gets in there.)  Pycassa doesn't make any attempt to
update the server list automatically right now.

By the way, there is a pycassa specific ML at
pycassa-disc...@googlegroups.com

On Thu, Mar 31, 2011 at 12:10 PM, A J  wrote:

> In the pycassa.pool.ConnectionPool class, I can specify all the nodes
> in server_list parameter.
> But overtime, when nodes get decomissioned and new nodes with new IPs
> get added, how can the server_list parameter be refereshed ?
> Do I have to modify it manually, or is there a way to update the list
> automatically ?
>



-- 
Tyler Hobbs
Software Engineer, DataStax 
Maintainer of the pycassa  Cassandra
Python client library


Netstats out of sync?

2011-03-31 Thread buddhasystem
I'm rebalancing a cluster of 2 nodes at this point. Netstats on the "source"
node reports progress of the stream, whereas on the receving end netstats
states that progress = 0. Did anyone see that?

Do I need both nodes listed as seeds in cassandra.yaml?

TIA/


--
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Netstats-out-of-sync-tp6227986p6227986.html
Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
Nabble.com.


pycassa refresh server_list

2011-03-31 Thread A J
In the pycassa.pool.ConnectionPool class, I can specify all the nodes
in server_list parameter.
But overtime, when nodes get decomissioned and new nodes with new IPs
get added, how can the server_list parameter be refereshed ?
Do I have to modify it manually, or is there a way to update the list
automatically ?


Re: How to determine if repair need to be run

2011-03-31 Thread mcasandra
If I am not wrong node repair need to be run on all the nodes in staggerred
manner. It is required to take care of tombstones. Please correct me team if
I am wrong :)

See Distributed Deletes:

http://wiki.apache.org/cassandra/Operations



--
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/How-to-determine-if-repair-need-to-be-run-tp6220005p6227778.html
Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
Nabble.com.


Re: How to determine if repair need to be run

2011-03-31 Thread Peter Schuller
> silly question, would every cassandra installation need to have manual 
> repairs done on it?
>
> It would seem cassandra's "read repair" and regular compaction would take 
> care of keeping the data clean.
>
> Am I missing something?

See my previous posts in this thread for the distinct reasons to run
repair. Except in special circumstances where you know exactly what
you're doing (mainly that no deletes are performed), you are
*required* to run repair often enough for GGraceSeconds:

   http://wiki.apache.org/cassandra/Operations#Frequency_of_nodetool_repair

It seems that there needs to be some more elaborate documentation
about this somewhere to point to since there seems to be confusion.

Regular compaction does *not* imply repair. Read repair only works if
(1) you touch all data within GCGraceSeconds, and (2) you touch it in
such a way that read repair is enabled (e.g., not range scans), and
(3) no node ever happens to be down, flap, or drop a request when you
touch the data in question.

Basically, unless you are really sure what you're doing - run repair.

-- 
/ Peter Schuller


Re: Working backwards from production to staging/dev

2011-03-31 Thread ian douglas

Thanks Edward,

Anyone able to provide some answers for the other questions?


On 03/26/2011 07:25 AM, Edward Capriolo wrote:

On Fri, Mar 25, 2011 at 2:11 PM, ian douglas  wrote:

On 03/25/2011 10:12 AM, Jonathan Ellis wrote:

On Fri, Mar 25, 2011 at 11:59 AM, ian douglaswrote:

(we're running v0.60)

I don't know if you could hear that from where you are, but our whole
office just yelled, "WTF!" :)

Ah, that's what that noise was... And yeah, we know we're way behind. Our
initial delay in upgrading was waiting for 0.7 to come out and then we
learned we needed a whole new Thrift client for our PHP code base, and then
we got busy on other things, but we're at a point where we have some time to
take care of Cassandra and get it upgraded.

  Our planned path, now, is:

(our nodes' tokens are numbered using the python code (0, 1/3 and 2/3 times
2^127), and called node 1 through 3, respectively; our RF is set to 2 right
now)

1. remove node 1 from our software
2. bring node 1 offline after a flush/repair/cleanup
3. run a cleanup on node 2 and then on node 3 so they have a full copy of
all data from the old node 1 and each other.
4. bring up a new Large 64-bit instance, install 0.6.12, assign a Token
value of 0 (node 1), RF:2, on a new gossip ring, and copy all data from the
32-bit nodes 2 and 3 and run a repair/cleanup to remove any duplicated data
5. remove node 3 from our software
6. point our code to the new 64-bit node 1
7. bring node 3 offline after a flush/repair/cleanup so node 2 has the last
fresh copy of everything
8. bring node 2 offline after a flush/repair/cleanup
9. bring up another Large instance, get a copy of all data from our old node
2, assign a Token value of (1/2 * 2^127), RF:2, on the new gossip ring, run
a repair to remove duplicate data, and then a cleanup so it gets replicated
data from the new node 1
10. add the new node 2 to our software
11. run a final cleanup on the new node 1 and then on node 2 to make sure
all data is replicated evenly on both nodes

... at this point, we should have two 64-bit Large instances, with RF:2, on
a new gossip ring, replacing three 32-bit systems, with minimal down time
and no data loss (just a data delay between steps 6 and 10 above).

Questions:
1. Does it appear that we've missed any steps, or doing something out of
order?
2. Is the flush/repair/cleanup overkill when bringing the old nodes offline,
or is that the correct sequence to follow?
3. Will the difference in compute units (lower on Large instances than
Medium instances) make any noticeable difference, or will the fact that the
machine is 64-bit handle things efficiently enough such that a Large
instance works harder than a Medium instance? (never did figure out their
how their compute units work)
4. Can we follow similar steps when we're ready to upgrade to 0.7x and have
our new Thrift client for PHP all squared away?


Thanks again for the help!!!



If you have a node with an old column family you are not using
anymore...Stop node...delete data...start node.

Edward


Re: How to determine if repair need to be run

2011-03-31 Thread Jonathan Colby
silly question, would every cassandra installation need to have manual repairs 
done on it?

It would seem cassandra's "read repair" and regular compaction would take care 
of keeping the data clean. 

Am I missing something?
 

On Mar 30, 2011, at 7:46 PM, Peter Schuller wrote:

>> I just wanted to chime in here and say some people NEVER run repair.
> 
> Just so long as the OP is understanding that this implies taking an
> explicit decision to accept the "misbehavior" you will see as a
> result. I.e., the reason people survive not doing repairs in some
> cases is, as in your case, that they can actually live with the
> consequences such as old data "magically" re-appearing permanently.
> 
>> as it really increased on disk data. I have followed some threads and
>> there are some conditions that I read repair can't handle. The
> 
> For one thing, RR will only touch data that is read. And not even all
> data that is read at that (e.g. range slices don't imply repair).
> 
> -- 
> / Peter Schuller



Re: Two column families or One super column family?

2011-03-31 Thread Edward Capriolo
On Thu, Mar 31, 2011 at 3:52 AM, T Akhayo  wrote:
> Hi Aaron,
>
> Thank you for your reply, i appreciate the suggestions you made.
>
> Yesterday i managed to get everything (our main read) in one CF, with the
> use of a structure in a value like you suggested.
>
> Designing a new data model is different from what i'm used to, but if you
> keep in mind that you designing for performance instead of flexibility then
> everything gets a bit easier.
>
> Kind regards,
> T. Akhayo
>
> 2011/3/30 aaron morton 
>>
>> I would go with the solution that means you only have to make one request
>> to serve your reads, so consider the super CF approach.
>> There are some downsides to super columns
>> see http://wiki.apache.org/cassandra/CassandraLimitations and they tend to
>> have a love-them-hate-them reputation.
>> One thing to consider is that you do not need to model every attribute of
>> your entity as a column in cassandra. Especially if you are always going to
>> pull back all the attributes. So you could do your super CF approach with a
>> standard CF, just pack the columns into some sort of structure such as JSON
>> and store them as a blob.
>> Or you can use a naming scheme in the column names with a standard CF,
>> e.g. uuid1.text and uuid2.text
>> Hope that helps.
>> Aaron
>> On 30 Mar 2011, at 01:05, T Akhayo wrote:
>>
>> Good afternoon,
>>
>> I'm making my data model from scratch for cassandra, this means i can tune
>> and fine tune it for performance.
>>
>> At this time i'm having problems choosing between a 2 column families or 1
>> super column family. I will illustrate with a example.
>>
>> Sector, this defines a place, this is one or two properties.
>> Entry, a entry that is bound to a sector, this is simply some text and a
>> few properties.
>>
>> I can model this with a super column family:
>>
>> sectors{ //super column family
>> sector1{
>> uid1{
>> text: a text
>> user: joop
>> }
>> uid2{
>> text: more text
>> user: piet
>> }
>> }
>> sector2{
>> uid10{
>> text: even more text
>> user: marie
>> }
>> }
>> }
>>
>> But i can also model this with 2 column families:
>>
>> sectors{ // column family
>> sector1{
>> textid1: null
>> textid2: null
>> }
>> sector2{
>> textid4: null
>> }
>> }
>>
>> texts{ //column family
>> textid1{
>> text: a text
>> user: joop
>> }
>> textid2{
>> text: more text
>> user: piet
>> }
>> }
>>
>> With the super column family i can retrieve a list of texts for a specific
>> sector with only 1 request to cassandra.
>>
>> With the 2 column families i need to send 2 requests to cassandra:
>> 1. give me all textids from sector x. (returns x, y, z)
>> 2. give me all texts that have id x, y, z.
>>
>> In my final application it is likely that there will be a bit more writes
>> compared to reads.
>>
>> I was wondering what the best approach is when it comes to performance. I
>> suspect that using super column families is slower compared the using column
>> families, but is it stil slower when using 2 column families and with 2
>> request to cassandra instead of 1 (with super column family).
>>
>> Kind regards,
>> T. Akhayo
>>
>
>

I decided to write this as a general guide to the topic of
denormalizing things into multiple CF's or not.
 
http://www.edwardcapriolo.com/roller/edwardcapriolo/entry/whytf_would_i_need_with


changing replication strategy and effects on replica nodes

2011-03-31 Thread Jonathan Colby

From my understanding of replica copies,  cassandra picks which nodes to 
replicate the data based on replication strategy, and those same "replica 
partner" nodes are always used according to token ring distribution.

If you change the replication strategy,  does cassandra pick new nodes to 
replicate to?   (for example if you went from simple strategy to a 
networkTopology strategy where copies are to be sent to another datacenter)

If so,  do you now have unused replica data on the "old" replica nodes that you 
need to clean up manually?

Re: Cassandra take a snapshot after a column family update

2011-03-31 Thread Roberto Bentivoglio
Ok, we'll do it for sure!

Thanks,
Roberto

On 31 March 2011 14:56, aaron morton  wrote:

> Next time it happens take a note of the snapshot folder, different
> processes name the folder differently. It may help track down what created
> the snapshot.
>
> Cheers
> Aaron
>
> On 31 Mar 2011, at 01:13, Roberto Bentivoglio wrote:
>
> Hi Aaron,
> I already deleted the snapshot folder unfortunately.
> We upgraded to 0.7.4.
>
> Thanks,
> Roberto
>
> On 30 March 2011 12:57, aaron morton  wrote:
>
>> AFAIK snapshots are taken for drop CF, drop KS and truncate CF also during
>> compaction if enabled via yaml. Cannot see anything in the code for 0.7 to
>> snapshot during CF update.
>>
>> What was the name of the snapshot folder ?
>>
>> btw it's a really good idea to upgrade to 0.7.4 if possible
>>
>> Aaron
>>
>> On 30 Mar 2011, at 20:55, Roberto Bentivoglio wrote:
>>
>> > Hi all,
>> > I've executed from cassandra-cli on a production server (0.7.0) the
>> following instruction:
>> >
>> > update column family CFName with gc_grace=0;
>> >
>> > I'm really surprise that Cassandra take a snapshots of the data for
>> every update that I executed.
>> > Is this a normal behaviour?
>> >
>> > Thanks,
>> > Roberto Bentivoglio
>>
>>
>
>


unsuscribe

2011-03-31 Thread Dario Bravo
-- 
Darío Bravo


Re: add new data directory to cassandra

2011-03-31 Thread aaron morton
AFAIK Cassandra will just pick the directory with the most space.

Also AFAIK using multiple directories should only be considered a safety valve 
to fix problems such as the one you describe see 
http://www.mail-archive.com/user@cassandra.apache.org/msg07874.html 

Aaron

 
On 31 Mar 2011, at 15:14, Anurag Gujral wrote:

> Hi All,
>   I had a single directory designated as data file directory in 
> cassandra ,but it ran out of space .I am adding a new data directory in 
> addition to the one I have .What should I do so that cassandra  balance the 
> space on both of them.
> 
> Thanks
> Anurag



Re: Using RowMutations with super columns

2011-03-31 Thread aaron morton
The CassandraBulkLoader example is written to use Super Columns, so seems odd.  

Do you have the rest of the error stack ? 

Aaron


On 31 Mar 2011, at 04:54, George Ciubotaru wrote:

> Hello,
>  
> I’m using CassandraBulkLoader.java 
> (https://svn.apache.org/repos/asf/cassandra/trunk/contrib/bmt_example/CassandraBulkLoader.java)
>  as base to build a bulk loader. Everything works fine for standard column 
> families but it fails when trying to insert data in super columns throwing 
> this exception:
>  
> Exception in thread "main" java.lang.UnsupportedOperationException: This 
> operation is not supported for Super Columns.
> at 
> org.apache.cassandra.db.SuperColumn.timestamp(SuperColumn.java:143)
> at 
> org.apache.cassandra.db.ColumnSerializer.serialize(ColumnSerializer.java:55)
> at 
> org.apache.cassandra.db.ColumnSerializer.serialize(ColumnSerializer.java:35)
> at 
> org.apache.cassandra.db.ColumnFamilySerializer.serializeForSSTable(ColumnFamilySerializer.java:87)
> at 
> org.apache.cassandra.db.ColumnFamilySerializer.serializeWithIndexes(ColumnFamilySerializer.java:106)
>  
> Any idea here?
>  
> Thank you,
> George



Re: Cassandra take a snapshot after a column family update

2011-03-31 Thread aaron morton
Next time it happens take a note of the snapshot folder, different processes 
name the folder differently. It may help track down what created the snapshot. 

Cheers
Aaron

On 31 Mar 2011, at 01:13, Roberto Bentivoglio wrote:

> Hi Aaron,
> I already deleted the snapshot folder unfortunately.
> We upgraded to 0.7.4.
> 
> Thanks,
> Roberto
> 
> On 30 March 2011 12:57, aaron morton  wrote:
> AFAIK snapshots are taken for drop CF, drop KS and truncate CF also during 
> compaction if enabled via yaml. Cannot see anything in the code for 0.7 to 
> snapshot during CF update.
> 
> What was the name of the snapshot folder ?
> 
> btw it's a really good idea to upgrade to 0.7.4 if possible
> 
> Aaron
> 
> On 30 Mar 2011, at 20:55, Roberto Bentivoglio wrote:
> 
> > Hi all,
> > I've executed from cassandra-cli on a production server (0.7.0) the 
> > following instruction:
> >
> > update column family CFName with gc_grace=0;
> >
> > I'm really surprise that Cassandra take a snapshots of the data for every 
> > update that I executed.
> > Is this a normal behaviour?
> >
> > Thanks,
> > Roberto Bentivoglio
> 
> 



Re: Revised: Data Modeling advise for Cassandra 0.8 (added #8)

2011-03-31 Thread aaron morton
Drew, 
The Twissandra project is a twitter clone in cassandra, it may give you 
some insight into how things can be modelled 
https://github.com/thobbs/twissandra

If you are just starting then consider something like...

- CF to hold the user, their data and their network links  
- standard CF to hold a blog entry, key is a timestamp 
- standard CF to hold blog comments, each comment as a single column 
where the name is a long timestamp 
- standard CF to hold the blogs for a user, key is the user id and each 
column is the blog key 

Thats not a great schema but it's a simple starting point you can build on and 
refine using things like secondary indexes and doing more/less in the same CF. 

Good luck. 
Aaron

On 30 Mar 2011, at 15:13, Drew Kutcharian wrote:

> I'm pretty new to Cassandra and I would like to get your advice on modeling. 
> The object model of the project that I'm working on will be pretty close to 
> Blogger, Tumblr, etc. (or any other blogging website).
> Where you have Users, that each can have many Blogs and each Blog can have 
> many comments. How would you model this efficiently considering:
> 
> 1) Be able to directly link to a User
> 2) Be able to directly link to a Blog
> 3) Be able to query and get all the Blogs for a User ordered by time created 
> descending (new blogs first)
> 4) Be able to query and get all the Comments for each Blog ordered by time 
> created ascending (old comments first)
> 5) Be able to link different Users to each other, as a network.
> 6) Have a well distributed hash so we don't end up with "hot" nodes, while 
> the rest of the nodes are idle
> 7) It would be nice to show a User how many Blogs they have or how many 
> comments are on a Blog, without iterating thru the whole dataset.
> NEW: 8) Be able to query for the most recently added Blogs. For example, 
> Blogs added today, this week, this month, etc.
> 
> The target Cassandra version is 0.8 to use the Secondary Indexes. The goal is 
> to be very efficient, so no Text keys. We were thinking of using Time Based 
> 64bit ids, using Snowflake.
> 
> Thanks,
> 
> Drew



Re: Does anyone build 0.7.4 on IDEA?

2011-03-31 Thread Maki Watanabe
Not yet. I'll try.

maki

2011/3/31 Tommy Tynjä :
> Have you assured you are able to build Cassandra outside
> of IDEA, e.g. on command line?
>
> Best regards,
> Tommy
> @tommysdk
>
> On Thu, Mar 31, 2011 at 3:56 AM, Maki Watanabe  
> wrote:
>> Hello,
>>
>> I'm trying to build and run cassandra 0.7.4-src on IntelliJ IDEA 10 CE
>> on OSX with reading
>> http://wiki.apache.org/cassandra/RunningCassandraInIDEA.
>> Though I need to omit interface/avro/gen-java, exclude
>> java/org/apache/cassandra/hadoop, and
>> download&add jna.jar into library path, I could kill most of errors.
>>
>> However, now it complains on compiling
>> java/org/apache/cassandra/db/ReadResponse.java, because of:
>>  Error:(93, 27) can't access to org.apache.cassandra.db.RowSerializer
>>                      can't find class file of
>> org.apache.cassandra.db.RowSerializer
>>
>> I found the class RowSerializer in Row.java, as package
>> org.apache.cassandra.db scope,
>> But ReadResponse.java is in the package also. Then I can't understand
>> why IDEA can't find the class.
>>
>> Any suggestion?
>>
>> maki
>>
>


Re: Does anyone build 0.7.4 on IDEA?

2011-03-31 Thread Tommy Tynjä
I had troubles setting up my Cassandra IDE on IntelliJ IDEA 10 as
well. The problems were related to IDEA not finding all the libraries
necessary so I had to make sure all necessary libraries were
downloaded and that hadoop directories etc were marked as
source-folders in the project. I don't recognize the RowSerializer
error though. Have you assured you are able to build Cassandra outside
of IDEA, e.g. on command line?

Best regards,
Tommy
@tommysdk

On Thu, Mar 31, 2011 at 3:56 AM, Maki Watanabe  wrote:
> Hello,
>
> I'm trying to build and run cassandra 0.7.4-src on IntelliJ IDEA 10 CE
> on OSX with reading
> http://wiki.apache.org/cassandra/RunningCassandraInIDEA.
> Though I need to omit interface/avro/gen-java, exclude
> java/org/apache/cassandra/hadoop, and
> download&add jna.jar into library path, I could kill most of errors.
>
> However, now it complains on compiling
> java/org/apache/cassandra/db/ReadResponse.java, because of:
>  Error:(93, 27) can't access to org.apache.cassandra.db.RowSerializer
>                      can't find class file of
> org.apache.cassandra.db.RowSerializer
>
> I found the class RowSerializer in Row.java, as package
> org.apache.cassandra.db scope,
> But ReadResponse.java is in the package also. Then I can't understand
> why IDEA can't find the class.
>
> Any suggestion?
>
> maki
>


Re: memtable_threshold

2011-03-31 Thread ruslan usifov
Fo all who reply on this topic, thanks, for you patience and explanations


Inconsistent results in queries with secondary index and index expression

2011-03-31 Thread Muga Nishizawa
Hi,

When I iteratively get data with secondary index and index clause,
result of data acquired by consistency level "one" is different from
the one by consistency level "quorum".  The one by consistecy level "one"
is correct result.  But the one by consistecy level "quorum" is incorrect
and some data is missing from result.

You can reproduce this problem using attached scripts on following URL.
https://issues.apache.org/jira/browse/CASSANDRA-2406

Could do anyone look at this problem?

Best regards,

Muga Nishizawa


Re: Any way to get different unique time UUIDs for the same time value?

2011-03-31 Thread Roshan Dawrani
Thanks a lot for sharing your inputs, guys...

On Thu, Mar 31, 2011 at 6:47 AM, Drew Kutcharian  wrote:

> Hi Ed,
>
> Cool, I guess we both read/interpreted his post differently and gave two
> valid answers ;)
>
> - Drew
>
> On Mar 30, 2011, at 5:40 PM, Ed Anuff wrote:
>
> > Hey Drew, I'm somewhat familiar with Snowflake, and it's certainly a
> > good option, but, my impression was that the main reason to use it is
> > because you find the 128-bits for a UUID overkill, not because it's
> > doing anything you can't do with UUID's.  The difference in time
> > resolution between UUIDs and Snowflake ids is actually greater than
> > the size of the sequence value that Snowflake uses to differentiate
> > duplicated timestamps, so the easiest thing would be just to round to
> > milliseconds unless your goal was to save the extra 64 bits per UUID.
> > I was just over-reading into Roshan's question that he wanted the full
> > time resolution of a UUID and on top of that be able to have a number
> > of duplicate timestamps.
> >
> > On Wed, Mar 30, 2011 at 4:24 PM, Drew Kutcharian 
> wrote:
> >> Hi Ed,
> >>
> >> There's no need to re-invent the wheel that's pretty much what Twitter
> Snowflake does. The way it works is it creates a 64 bit long id which is
> formatted as such
> >>
> >> time_bits : data_center_id : machine_id : sequence
> >>
> >> Where time_bits are the milliseconds since a custom epoch.
> >>
> >> So If you see, you would get ids that are unique and ordered by time up
> to 1ms (if two ids were created during the same millisecond, then the
> ordering is not preserved)
> >>
> >> - Drew
> >>
> >>
> >> On Mar 30, 2011, at 4:13 PM, Ed Anuff wrote:
> >>
> >>> If I understand the question, it's not that
> >>> UUIDGen.makeType1UUIDFromHost(InetAddress.getLocalHost()) is returning
> >>> duplicate UUID's.  It should always be giving unique time-based uuids
> >>> and has checks to make sure it does.  The question was whether it was
> >>> possible to get multiple unique time-based UUID's with the exact same
> >>> timestamp component, rather than avoiding duplicates in the timestamp
> >>> the way UUIDGen currently does.  The answer to that is that you could
> >>> take a look at the code for the UUIDGen class and create your own
> >>> version that perhaps generated the clock sequence in a different way,
> >>> such as leaving a certain number of low order bits of the clock
> >>> sequence empty and then incrementing those when duplicate timestamps
> >>> were generated rather than incrementing the timestamp the way UUIDGen
> >>> currently does.
> >>>
> >>> On Wed, Mar 30, 2011 at 10:08 AM, Drew Kutcharian 
> wrote:
>  Hi Roshan,
>  You probably want to look at Twitter's
>  Snowflake: https://github.com/twitter/snowflake
>  There's also another Java variant: https://github.com/earnstone/eid
>  - Drew
> 
>  On Mar 30, 2011, at 6:08 AM, Roshan Dawrani wrote:
> 
>  Hi,
>  Is there any way I can get multiple unique time UUIDs for the same
> timestamp
>  value - I mean, the UUIDs that are same in their time (most
> significant
>  bits), but differ in their least significant bits?
>  The least significant bits added by
>  me.prettyprint.cassandra.utils.TimeUUIDUtils seem to be a fixed value
> based
>  on mac/ip address, which makes sure that I get the same UUID for a
> timestamp
>  value, everytime I ask.
>  I need the "(timestamp): " kind of columns that need to be
>  sorted by time, and I wanted to use TimeUUID to use column sorting
> that
>  comes out-of-the-box, but the problem is that I can get multiple
> values for
>  the same timestamp.
>  So, I am looking for some way where the time portion is same, but the
> other
>  UUID half is different so that I can safely store "1 time UUID: 1
> value".
>  Any help there is appreciated.
>  --
>  Roshan
>  Blog: http://roshandawrani.wordpress.com/
>  Twitter: @roshandawrani
>  Skype: roshandawrani
> 
> 
> 
> >>
> >>
>
>


RE: Requests stuck on production cluster

2011-03-31 Thread Or Yanay
I am using Cassandra 0.7.0 and Random Partitioner.

From: Or Yanay [mailto:o...@peer39.com]
Sent: Thursday, March 31, 2011 12:20 PM
To: user@cassandra.apache.org
Subject: Requests stuck on production cluster

Hi all,

My production cluster reads got stuck.
The ring gives:

Address Status State   LoadOwnsToken
   
146231632500721020374621781629360107476
10.39.21.7  Up Normal  118.86 GB   18.15%  
6968792681466807915334918525105891681
10.39.21.2  Up Normal  170.37 GB   33.20%  
63458945745812644657648926377562798568
10.39.21.4  Up Normal  129.49 GB   2.09%   
67020233994527804731783987345291668992
10.39.21.3  Up Normal  118.57 GB   31.26%  
120208618942813734646032022699594259441
10.39.21.6  Up Normal  171.03 GB   15.29%  
146231632500721020374621781629360107476

The 2% bit struck me as odd, so I ran tpstats on 10.39.21.4 and got:
Pool Name

Active

Pending

Completed

ReadStage

0

0

143370

RequestResponseStage

8

1231283

414467

MutationStage

0

0

1772203

ReadRepair

0

0

7678

GossipStage

0

0

204797

AntiEntropyStage

0

0

0

MigrationStage

0

0

0

MemtablePostFlusher

0

0

48

StreamStage

0

0

0

FlushWriter

0

0

48

FILEUTILS-DELETE-POOL

0

0

46

MiscStage

0

0

0

FlushSorter

0

0

0

InternalResponseStage

0

0

0

HintedHandoff

0

0

6


So... something got terribly wrong.
Can anyone suggest what should do next to fix this?

Thanks.
-Orr


Requests stuck on production cluster

2011-03-31 Thread Or Yanay
Hi all,

My production cluster reads got stuck.
The ring gives:

Address Status State   LoadOwnsToken
   
146231632500721020374621781629360107476
10.39.21.7  Up Normal  118.86 GB   18.15%  
6968792681466807915334918525105891681
10.39.21.2  Up Normal  170.37 GB   33.20%  
63458945745812644657648926377562798568
10.39.21.4  Up Normal  129.49 GB   2.09%   
67020233994527804731783987345291668992
10.39.21.3  Up Normal  118.57 GB   31.26%  
120208618942813734646032022699594259441
10.39.21.6  Up Normal  171.03 GB   15.29%  
146231632500721020374621781629360107476

The 2% bit struck me as odd, so I ran tpstats on 10.39.21.4 and got:
Pool Name

Active

Pending

Completed

ReadStage

0

0

143370

RequestResponseStage

8

1231283

414467

MutationStage

0

0

1772203

ReadRepair

0

0

7678

GossipStage

0

0

204797

AntiEntropyStage

0

0

0

MigrationStage

0

0

0

MemtablePostFlusher

0

0

48

StreamStage

0

0

0

FlushWriter

0

0

48

FILEUTILS-DELETE-POOL

0

0

46

MiscStage

0

0

0

FlushSorter

0

0

0

InternalResponseStage

0

0

0

HintedHandoff

0

0

6


So... something got terribly wrong.
Can anyone suggest what should do next to fix this?

Thanks.
-Orr


Re: Two column families or One super column family?

2011-03-31 Thread T Akhayo
Hi Aaron,

Thank you for your reply, i appreciate the suggestions you made.

Yesterday i managed to get everything (our main read) in one CF, with the
use of a structure in a value like you suggested.

Designing a new data model is different from what i'm used to, but if you
keep in mind that you designing for performance instead of flexibility then
everything gets a bit easier.

Kind regards,
T. Akhayo

2011/3/30 aaron morton 

> I would go with the solution that means you only have to make one request
> to serve your reads, so consider the super CF approach.
>
> There are some downsides to super columns see
> http://wiki.apache.org/cassandra/CassandraLimitations and they tend to
> have a love-them-hate-them reputation.
>
> One thing to consider is that you do not need to model every attribute of
> your entity as a column in cassandra. Especially if you are always going to
> pull back all the attributes. So you could do your super CF approach with a
> standard CF, just pack the columns into some sort of structure such as JSON
> and store them as a blob.
>
> Or you can use a naming scheme in the column names with a standard CF, e.g.
> uuid1.text and uuid2.text
>
> Hope that helps.
> Aaron
>
> On 30 Mar 2011, at 01:05, T Akhayo wrote:
>
> Good afternoon,
>
> I'm making my data model from scratch for cassandra, this means i can tune
> and fine tune it for performance.
>
> At this time i'm having problems choosing between a 2 column families or 1
> super column family. I will illustrate with a example.
>
> Sector, this defines a place, this is one or two properties.
> Entry, a entry that is bound to a sector, this is simply some text and a
> few properties.
>
> I can model this with a super column family:
>
> sectors{ //super column family
> sector1{
> uid1{
> text: a text
> user: joop
> }
> uid2{
> text: more text
> user: piet
> }
> }
> sector2{
> uid10{
> text: even more text
> user: marie
> }
> }
> }
>
> But i can also model this with 2 column families:
>
> sectors{ // column family
> sector1{
> textid1: null
> textid2: null
> }
> sector2{
> textid4: null
> }
> }
>
> texts{ //column family
> textid1{
> text: a text
> user: joop
> }
> textid2{
> text: more text
> user: piet
> }
> }
>
> With the super column family i can retrieve a list of texts for a specific
> sector with only 1 request to cassandra.
>
> With the 2 column families i need to send 2 requests to cassandra:
> 1. give me all textids from sector x. (returns x, y, z)
> 2. give me all texts that have id x, y, z.
>
> In my final application it is likely that there will be a bit more writes
> compared to reads.
>
> I was wondering what the best approach is when it comes to performance. I
> suspect that using super column families is slower compared the using column
> families, but is it stil slower when using 2 column families and with 2
> request to cassandra instead of 1 (with super column family).
>
> Kind regards,
> T. Akhayo
>
>
>


Re: Naming "issue" on nodetool repair command

2011-03-31 Thread Peter Schuller
> Woud you cassandra team think to add an alias name for nodetool
> "repair" command?

That thought has crossed my mind lately too; particularly in one of
the recent threads.

The problem seems analogous to 'fsck', and the distinction between
fully expected by-design behavior needing fsck/repair is often
conflated with fsck/repair in the sense of trying to fix something
unexpected/buggy/broken

Maybe "nodetool aes" or "nodetool antientropy"?

-- 
/ Peter Schuller