Re: data model advice needed

2013-02-28 Thread Michal Michalski
I can't suggest you any book, but you might be interested in this: http://www.ebaytechblog.com/2012/07/16/cassandra-data-modeling-best-practices-part-1/ http://www.ebaytechblog.com/2012/08/14/cassandra-data-modeling-best-practices-part-2/ M. W dniu 28.02.2013 08:44, Sloot, Hans-Peter pisze: Wh

COPY FROM on counters

2013-02-28 Thread Marco Matarazzo
Is there a way to use COPY FROM on a column family with a counter type column ? -- Marco Matarazzo == Hex Keep == W: http://www.hexkeep.com M: +39 347 8798528 E: marco.matara...@hexkeep.com "You can learn more about a man in one hour of play than in one year of conversation.” - Plato

Only keys in a column family

2013-02-28 Thread Andrea Gazzarini
Hi, I'm using Cassandra 1.1.8 and today I saw in my keyspace a column family with the following content > SELECT * FROM challenge; KEY 49feb200010a556522ed68 49feb200010a556522ed74 49feb200010a556522ed7a 49feb200010a556522ed72 49feb200010a5

Re: Adding new nodes in a cluster with virtual nodes

2013-02-28 Thread Jean-Armel Luce
Hi Aaron, I tried again to add a node in the cluster. This time, I added the new node in the seeds list after the bootstrap (the first time, I added the new node in the seeds list before the bootstrap). And it works !!! Thanks Aaron. Regards. Jean Armel. 2013/2/22 Jean-Armel Luce > Thanks

Re: Only keys in a column family

2013-02-28 Thread Víctor Hugo Oliveira Molinar
Let me know if it help you, http://www.datastax.com/docs/1.0/dml/about_writes#about-deletes On Thu, Feb 28, 2013 at 5:35 AM, Andrea Gazzarini < andrea.gazzar...@gmail.com> wrote: > Hi, > I'm using Cassandra 1.1.8 and today I saw in my keyspace a column family > with the following content > > >

Re: Only keys in a column family

2013-02-28 Thread Andrea Gazzarini
That's great! The 3rd point seems exactly what happened on my column family. As supposed it was a matter of ignorance :D Many many thanks Andrea On 02/28/2013 01:39 PM, Víctor Hugo Oliveira Molinar wrote: Let me know if it help you, http://www.datastax.com/docs/1.0/dml/about_writes#about-delet

Problem with CQL

2013-02-28 Thread Everton Lima
Hello, I was using cql 2. I have the following query: SELECT * FROM users WHERE age > 20 AND age < 25; The table was created as follow: CREATE TABLE users (name PRIMARY KEY, age float); After create table and insert some data I create the Secondary Index: CREATE INDEX age_index ON users

Re: Problem with CQL

2013-02-28 Thread Jason Wee
You need an equal operator in your query. For instance, SELECT * FROM users WHERE country = 'malaysia' age > 20 On Thu, Feb 28, 2013 at 10:04 PM, Everton Lima wrote: > Hello, > I was using cql 2. I have the following query: >SELECT * FROM users WHERE age > 20 AND age < 25; > > The table wa

nodetool compactionstats doesn't work for repair status?

2013-02-28 Thread Hiller, Dean
I am running a repair, but I can't figure out how to find out what percent done it is. How do I know if it is hung? When I run "nodetool compactionstats" it shows nothing like so [cassandra@a4 ~]$ nodetool compactionstats pending tasks: 0 Active compaction remaining time :n/a [cassandr

Re: is upgradesstables required for 1.1.4 to 1.2.2? (I don't think it is)

2013-02-28 Thread Michael Kjellman
You won't be able to stream them. You need to run upgradesstables between majors. Best, Michael On Feb 27, 2013, at 11:15 PM, "Michal Michalski" wrote: > I'm currently migrating 1.1.0 to 1.2.1 and on our small CI cluster, that > I was testing some stuff on, it seems that it's not required to

Re: nodetool compactionstats doesn't work for repair status?

2013-02-28 Thread Michael Kjellman
There is no overall repair progress currently. You can use some awk/grep hackery to try and figure it out from the logs. (This works best for a cleanup, less so for a repair because ranges are skipped and merkel trees take a long time to compare/generate/validate) Remember, things might be str

Re: nodetool compactionstats doesn't work for repair status?

2013-02-28 Thread Alain RODRIGUEZ
I read this recently: 1.1.9 (also 1.2.1) * ... * nodetool repair command now prints progress (CASSANDRA-4767) * ... Not sure how it works, I am still using the 1.1.6 version of C* but you might be interested in reading this. https://github.com/apache/cassandra/blob/trunk/CHANGES.txt https

Re: nodetool compactionstats doesn't work for repair status?

2013-02-28 Thread Michael Kjellman
It reports what keyspace it is working on to stdout and when the ranges for that keyspace are all in sync. It is a very welcome feature but doesn't really give an accurate status other than when it started and finished repairing the keyspace in question. On Feb 28, 2013, at 8:08 AM, "Alain RODR

Re: Problem with CQL

2013-02-28 Thread Everton Lima
Thanks. Thats work. Why an Equal restriction is required? 2013/2/28 Jason Wee > You need an equal operator in your query. For instance, SELECT * FROM > users WHERE country = 'malaysia' age > 20 > > > On Thu, Feb 28, 2013 at 10:04 PM, Everton Lima wrote: > >> Hello, >> I was using cql 2. I have

Re: disabling bloomfilter not working? memory numbers don't add up?

2013-02-28 Thread aaron morton
> 1. Can I stop the node, delete the *Filter.db files and restart the node(is > this safe)??? No. > 2. Why do I have 5 gig being eaten up by cassandra? "nodetool info" memory > 5.2Gig, key cache:11 meg and row cache 0 bytes. All bloomfilters are also > small <1meg. If this is the Heap memo

Re: Retrieving local data

2013-02-28 Thread aaron morton
Take a look at the token function with the select statement http://www.datastax.com/docs/1.2/cql_cli/cql/SELECT Cheers - Aaron Morton Freelance Cassandra Developer New Zealand @aaronmorton http://www.thelastpickle.com On 25/02/2013, at 10:06 AM, Everton Lima wrote: > Hi peopl

Re: cluster with cross data center and local

2013-02-28 Thread aaron morton
> I assume my only options are to create another cluster or to create another > keyspace using LocalStrategy strategy? You do need another key space, but you can still use the NetworkTopologyStrategy. Just set the strategy options to be dc1: 2 and dc2: 0. (check the docs for CLI and CQL for ex

Re: "Heap is N.N full." Immediately on startup

2013-02-28 Thread aaron morton
> - still getting 1-2 sstable reads with LCS That's bang in the wheel house http://www.datastax.com/dev/blog/when-to-use-leveled-compaction > However at startup I see a 5GB old gen ( that seems to be very stable at > around 5.5GB under moderate 90:10 read:write load - couple hundred q/s ) At 300

Re: please explain read path when key not in database

2013-02-28 Thread aaron morton
> This is my understanding from using cassandra for probably around 2 years Sounds about right. Cheers - Aaron Morton Freelance Cassandra Developer New Zealand @aaronmorton http://www.thelastpickle.com On 26/02/2013, at 7:43 AM, "Hiller, Dean" wrote: > This is my understandin

Re: disabling bloomfilter not working? memory numbers don't add up?

2013-02-28 Thread Hiller, Dean
H so "nodetool info" heap memory only reports what JVM has allocated. I had mistakingly assumed it was using some of the JVM memory calls, no? Thanks, Dean From: aaron morton mailto:aa...@thelastpickle.com>> Reply-To: "user@cassandra.apache.org" mailto:use

can we wipe CF data dir and run repair(is this safe?)

2013-02-28 Thread Hiller, Dean
Title says it all. Anyone know? Thanks, Dean

Re: can we wipe CF data dir and run repair(is this safe?)

2013-02-28 Thread Michael Kjellman
Is your goal to rebuild a cf from scratch? On Feb 28, 2013, at 11:24 AM, "Hiller, Dean" wrote: > Title says it all. Anyone know? > > Thanks, > Dean Copy, by Barracuda, helps you store, protect, and share all your amazing things. Start today: www.copy.com.

Re: can we wipe CF data dir and run repair(is this safe?)

2013-02-28 Thread Hiller, Dean
My goal is tweaking the bloomfilter down and needing to run upgradesstables is really not working out and I figure wipe the CF on one node and then run repair to get all his data back with the new bloomfilter. We backed up one node and tried this and it seems to workŠis this ok or will I have issu

Re: "Heap is N.N full." Immediately on startup

2013-02-28 Thread Andras Szerdahelyi
INFO [ScheduledTasks:1] 2013-02-28 14:48:59,335 GCInspector.java (line 122) GC for ConcurrentMarkSweep: 1315 ms for 1 collections, 6558662864 used; max is 8422162432 INFO [ScheduledTasks:1] 2013-02-28 14:49:22,530 GCInspector.java (line 122) GC for ConcurrentMarkSweep: 661 ms for 1 collections,

Native LZ4 compressor installation

2013-02-28 Thread Jabbar
Hello, I am experimenting with cassandra 1.2.2 and are interested in using the native LZ4 compressor in linux. I have built the linux library but aren't sure how to tell tell cassandra to use it. Do I just drop it in the cassandra lib directory and change the compression for my column family? How

Re: Problem with CQL

2013-02-28 Thread Jabbar
Because your name field is a primary key. You must specify the primary key for the query to be valid. On 28 February 2013 17:51, Everton Lima wrote: > Thanks. Thats work. > Why an Equal restriction is required? > > > 2013/2/28 Jason Wee > >> You need an equal operator in your query. For instan

Re: Retrieving local data

2013-02-28 Thread Everton Lima
Ok aaron. But the problem is that I am running Cassandra 1.1.8. I am using it for the compatibility with Astyanax 1.56. So, it is possible in Cassandra 1.1.8, too? 2013/2/28 aaron morton > Take a look at the token function with the select statement > http://www.datastax.com/docs/1.2/cql_cli/cql/

-pr vs. no -pr

2013-02-28 Thread Hiller, Dean
Isn't it true if I have 6 nodes, I could run nodetool repair on just 2 nodes(RF=3) instead of using nodetool repair –pr??? What is the advantage of –pr then? I mean a repair involves all three nodes and pushes and pulls data, right? Thanks, Dean

Query data in a CF within a timestamp range

2013-02-28 Thread Kasun Weranga
Hi all, I have a column family with some data + timestamp values and I want to query the column family to fetch data within a timestamp range. AFAIK it is not better to use secondary index for timestamp due to high cardinality. Is there a way to achieve this functionality? Thanks, Kasun.

Re: Query data in a CF within a timestamp range

2013-02-28 Thread Edward Capriolo
Pseudo code : GregorianCalendar gc = new GregorianCalendar(); DateFormat df = new SimpleDateFormat( "MMddhhmm'); String reversekey = df.format(gc); set mycolumnfamily['myrow']['mycolumn'] = 'myvalue'; set myreverseindex['$reversekey]['myrow'] = ''; Under rapid insertion this makes hot-spots.

backing up and restoring from only 1 replica?

2013-02-28 Thread Mike Koh
It has been suggested to me that we could save a fair amount of time and money by taking a snapshot of only 1 replica (so every third node for most column families). Assuming that we are okay with not having the absolute latest data, does this have any possibility of working? I feel like it s

Re: Native LZ4 compressor installation

2013-02-28 Thread Jabbar
lz4-1.1.0.jar is used by Cassandra. I've just found the native library embedded in the jar file. I'll check in the morning if some sort confirmation is shown. On 28 February 2013 20:42, Jabbar wrote: > Hello, > > I am

Re: can we wipe CF data dir and run repair(is this safe?)

2013-02-28 Thread Edward Capriolo
If you are reading at quorum you are ok. However if your reading at one you suffer a chance of getting an empty return until repair is complete. On Thursday, February 28, 2013, Hiller, Dean wrote: > My goal is tweaking the bloomfilter down and needing to run > upgradesstables is really not working

Re: can we wipe CF data dir and run repair(is this safe?)

2013-02-28 Thread Michael Kjellman
Only thing I'm worried with on this is that repair tends to be slower for me than upgradesstables in practice whenever I've tried to do something similar. And you still will need to do a cleanup afterwards anyways. Sometimes just leaving it alone and not poking every two seconds might be the be

Re: best way to clean up a column family? 60Gig of dangling data

2013-02-28 Thread Erik Forkalsud
Have you tried to (via jmx) call org.apache.cassandra.db.CompactionManager.forceUserDefinedCompaction() and give it the name of your SSTable file. It's a trick I use to aggressively get rid of expired data, i.e. if I have a column family where all data is written with a TTL of 30 days, any

Re: -pr vs. no -pr

2013-02-28 Thread Takenori Sato(Cloudian)
Hi, Please note that I confirmed on v1.0.7. > I mean a repair involves all three nodes and pushes and pulls data, right? Yes, but that's how -pr works. A repair without -pr does more. For example, suppose you have a ring with RF=3 like this. A - B - C - D - E - F Then, a repair on A withou

Re: Reading old data problem

2013-02-28 Thread Víctor Hugo Oliveira Molinar
Ok guys let me try to ask it in a different way: Will repair totally ensure a data synchronism among nodes? Extra question: Once I write at CL=All, will C* ensure that I can read from ANY node without an inconsistency? The reverse state, writing at CL=One but reading at CL=All will also ensure th

Re: Reading old data problem

2013-02-28 Thread Bryan Talbot
On Thu, Feb 28, 2013 at 5:08 PM, Víctor Hugo Oliveira Molinar < vhmoli...@gmail.com> wrote: > Ok guys let me try to ask it in a different way: > > Will repair totally ensure a data synchronism among nodes? If there are no writes happening on the cluster then yes. Otherwise, the answer is "it de

NetworkTopology

2013-02-28 Thread Kanwar Sangha
Hi - Quick question. When specifying the replication across 2 DCs, can we have 1 replication factor across 2 Data centres ? Does the below mean that there will be 2 copies of the data , 1 in DC1 and 1 in DC2 ? [default@unknown] CREATE KEYSPACE test WITH placement_strategy = 'NetworkTopolog

Re: -pr vs. no -pr

2013-02-28 Thread Hiller, Dean
Isn't there more to it than that. You really have nodes responsible for token ranges like so(using describe ring) What we see is this from our describe ringŠ(1 to 6 are token ranges while A to F are servers)Š. A - 1, 2, 3 B - 2, 3, 4 C - 3, 4, 5 D - 4, 5, 6 E - 5, 6, 1 F - 6, 1, 2 With -pr, only

Re: best way to clean up a column family? 60Gig of dangling data

2013-02-28 Thread Hiller, Dean
Cool, thanks for the trick. Dean On 2/28/13 5:55 PM, "Erik Forkalsud" wrote: > >Have you tried to (via jmx) call >org.apache.cassandra.db.CompactionManager.forceUserDefinedCompaction() >and give it the name of your SSTable file. > >It's a trick I use to aggressively get rid of expired data, i.e.

Re: can we wipe CF data dir and run repair(is this safe?)

2013-02-28 Thread Hiller, Dean
Yeah, we are not sure how upgradesstables is doing as it keeps startign back at 0%…..is it percentage complete on just one file(I thought it would add up all the files and give me percent complete on all). At the very least, repair gives me way better info on percent complete with a simple disk

Re: can we wipe CF data dir and run repair(is this safe?)

2013-02-28 Thread Hiller, Dean
PERFECT, thanks!!! Dean From: Edward Capriolo mailto:edlinuxg...@gmail.com>> Reply-To: "user@cassandra.apache.org" mailto:user@cassandra.apache.org>> Date: Thursday, February 28, 2013 5:41 PM To: "user@cassandra.apache.org" mail

Re: -pr vs. no -pr

2013-02-28 Thread Michael Theroux
The way I've always thought about it is that -pr will make sure the information that specific node originates is consistent with its replicas. So, we know that a node is responsible for a specific token range, and the next nodes in the ring will hold its replicas. The -pr will make sure that a