Re: Cassandra process exiting mysteriously

2014-08-13 Thread Or Sher
Will do the same!
Thanks,
Or.


On Tue, Aug 12, 2014 at 6:47 PM, Clint Kelly clint.ke...@gmail.com wrote:

 Hi Or,

 For now I removed the test that was failing like this from our suite
 and made a note to revisit it in a couple of weeks.  Unfortunately I
 still don't know what the issue is.  I'll post here if I figure out it
 (please do the same!).  My working hypothesis now is that we had some
 kind of OOM problem.

 Best regards,
 Clint

 On Tue, Aug 12, 2014 at 12:23 AM, Or Sher or.sh...@gmail.com wrote:
  Clint, did you find anything?
  I just noticed it happens to us too on only one node in our CI cluster.
  I don't think there is  a special usage before it happens... The last
 line
  in the log before the shutdown lines in at least an hour before..
  We're using C* 2.0.9.
 
 
  On Thu, Aug 7, 2014 at 12:49 AM, Clint Kelly clint.ke...@gmail.com
 wrote:
 
  Hi Rob,
 
  Thanks for the clarification; this is really useful.  I'll run some
  experiments to see if the problem is a JVM OOM on our build machine.
 
  Best regards,
  Clint
 
  On Wed, Aug 6, 2014 at 1:14 PM, Robert Coli rc...@eventbrite.com
 wrote:
   On Wed, Aug 6, 2014 at 1:12 PM, Robert Coli rc...@eventbrite.com
   wrote:
  
   On Wed, Aug 6, 2014 at 1:11 AM, Duncan Sands duncan.sa...@gmail.com
 
   wrote:
  
   this doesn't look like an OOM to me.  If the kernel OOM kills
   Cassandra
   then Cassandra instantly vaporizes, and there will be nothing in the
   Cassandra logs (you will find information about the OOM in the
 system
   logs
   though, eg in dmesg).  In the log snippet above you see an orderly
   shutdown,
   this is completely different to the instant OOM kill.
  
  
   Not really.
  
   https://issues.apache.org/jira/browse/CASSANDRA-7507
  
  
   To be clear, there's two different OOMs here, I am talking about the
 JVM
   OOM, not system level. As CASSANDRA-7507 indicates, JVM OOM does not
   necessarily result in the cassandra process dying, and can in fact
   trigger
   clean shutdown.
  
   System level OOM will in fact send the equivalent of KILL, which will
   not
   trigger the clean shutdown hook in Cassandra.
  
   =Rob
 
 
 
 
  --
  Or Sher




-- 
Or Sher


Re: Number of columns per row for composite columns?

2014-08-13 Thread hlqv
For more specifically, I declared a column family

create column family Column_Family
with key_validation_class = UTF8Type
and comparator = 'CompositeType(LongType,UTF8Type)'
and default_validation_class = UTF8Type;

Number of columns will depend on only first column name in composite column
or both.
For example,
With row key  = 1, I have data
1 | 20140813, user1 | value1
1 | 20140813, user2 | value2
1 | 20140814, user1 | value3
1 | 20140814, user2 | value4
(1: rowkey, 20140813, user1: composite column, value1 : the value of
column)

So the number of columns of row key 1 will be 2 or 4? (2 for 20140813 and
20140814, 4 for each distinct composite column)

Thank you so much


On 13 August 2014 03:18, Jack Krupansky j...@basetechnology.com wrote:

   Your question is a little too tangled for me... Are you asking about
 rows in a partition (some people call that a “storage row”) or columns per
 row? The latter is simply the number of columns that you have declared in
 your table.

 The total number of columns – or more properly, “cells” – in a partition
 would be the number of rows you have inserted in that partition times the
 number of columns you have declared in the table.

 If you need to review the terminology:
 http://www.datastax.com/dev/blog/does-cql-support-dynamic-columns-wide-rows

 -- Jack Krupansky

  *From:* hlqv hlqvu...@gmail.com
 *Sent:* Tuesday, August 12, 2014 1:13 PM
 *To:* user@cassandra.apache.org
 *Subject:* Number of columns per row for composite columns?

  Hi everyone,
 I'm confused with number of columns in a row of Cassandra, as far as I
 know there is 2 billions columns per row. Like that if I have a composite
 column name in each row, for ex: (timestamp, userid), then number of
 columns per row is the number of distinct 'timestamp' or each distinct
 'timestamp, userid' is a column?



Re: clarification on 100k tombstone limit in indexes

2014-08-13 Thread DuyHai Doan
add an additional integer column to the partition key (making it a
composite partition key if it isn't already).  When inserting, randomly
pick a value between, say, 0 and 10 to use for this column  -- Due to the
low cardinality of bucket (only 10), there is no guarantee that the
partitions would be distributed evenly. But it's better than nothing.

Alternatively, instead of using a random number, you could hash the other
key components and use the lowest bits for the value.  This has the
advantage of being deterministic -- Does it work with VNodes, where
tokens are split in 256 ranges and shuffled in all nodes ?


On Tue, Aug 12, 2014 at 7:39 PM, Tyler Hobbs ty...@datastax.com wrote:


 On Mon, Aug 11, 2014 at 4:17 PM, Ian Rose ianr...@fullstory.com wrote:


 You better off create a manuel reverse-index to track modification
 date, something like this  -- I had considered an approach like this but
 my concern is that for any given minute *all* of the updates will be
 handled by a single node, right?  For example, if the minute_bucket is 2739
 then for that one minute, every single item update will flow to the node at
 HASH(2739).  Assuming I am thinking about that right, that seemed like a
 potential scaling bottleneck, which scared me off that approach.


 If you're concerned about bottlenecking on one node (or set of replicas)
 during the minute, add an additional integer column to the partition key
 (making it a composite partition key if it isn't already).  When inserting,
 randomly pick a value between, say, 0 and 10 to use for this column.  When
 reading, read all 10 partitions and merge them.  (Alternatively, instead of
 using a random number, you could hash the other key components and use the
 lowest bits for the value.  This has the advantage of being deterministic.)


 --
 Tyler Hobbs
 DataStax http://datastax.com/



Re: OOM(Java heap space) on start-up during commit log replaying

2014-08-13 Thread jivko donev
Graham,
Thanks for the reply. As I stated in mine first mail increasing the heap size 
fixes the problem but I'm more interesting in figuring out the right properties 
for commitlog and memtable sizes when we need to keep the heap smaller. 
Also I think we are not seeing CASSANDRA-7546 as I apply your patch but the 
problem still persists. 
What more details do you need? I'll be happy to provide them.


On Wednesday, August 13, 2014 1:05 AM, graham sanderson gra...@vast.com wrote:
 


Agreed need more details; and just start by increasing heap because that may 
wells solve the problem.

I have just observed (which makes sense when you think about it) while testing 
fix for https://issues.apache.org/jira/browse/CASSANDRA-7546, that if you are 
replaying a commit log which has a high level of updates for the same partition 
key, you can hit that issue - excess memory allocation under high contention 
for the same partition key - (this might not cause OOM but will certainly 
massively tax GC and it sounds like you don’t have a lot/any headroom).

On Aug 12, 2014, at 12:31 PM, Robert Coli rc...@eventbrite.com wrote:



On Tue, Aug 12, 2014 at 9:34 AM, jivko donev jivko_...@yahoo.com wrote:

We have a node with commit log director ~4G. During start-up of the node on 
commit log replaying the used heap space is constantly growing ending with OOM 
error. 



The heap size and new heap size properties are - 1G and 256M. We are using 
the default settings for commitlog_sync, commitlog_sync_period_in_ms and 
commitlog_segment_size_in_mb.


What version of Cassandra?


1G is tiny for cassandra heap. There is a direct relationship between the data 
in the commitlog and memtables and in the heap. You almost certainly need more 
heap or less commitlog.


=Rob
  

Re: Number of columns per row for composite columns?

2014-08-13 Thread DuyHai Doan
In your example it will be 4 physical columns


On Wed, Aug 13, 2014 at 8:43 AM, hlqv hlqvu...@gmail.com wrote:

 For more specifically, I declared a column family

 create column family Column_Family
 with key_validation_class = UTF8Type
 and comparator = 'CompositeType(LongType,UTF8Type)'
 and default_validation_class = UTF8Type;

 Number of columns will depend on only first column name in composite
 column or both.
 For example,
 With row key  = 1, I have data
 1 | 20140813, user1 | value1
 1 | 20140813, user2 | value2
 1 | 20140814, user1 | value3
 1 | 20140814, user2 | value4
 (1: rowkey, 20140813, user1: composite column, value1 : the value of
 column)

 So the number of columns of row key 1 will be 2 or 4? (2 for 20140813 and
 20140814, 4 for each distinct composite column)

 Thank you so much


 On 13 August 2014 03:18, Jack Krupansky j...@basetechnology.com wrote:

   Your question is a little too tangled for me... Are you asking about
 rows in a partition (some people call that a “storage row”) or columns per
 row? The latter is simply the number of columns that you have declared in
 your table.

 The total number of columns – or more properly, “cells” – in a partition
 would be the number of rows you have inserted in that partition times the
 number of columns you have declared in the table.

 If you need to review the terminology:

 http://www.datastax.com/dev/blog/does-cql-support-dynamic-columns-wide-rows

 -- Jack Krupansky

  *From:* hlqv hlqvu...@gmail.com
 *Sent:* Tuesday, August 12, 2014 1:13 PM
 *To:* user@cassandra.apache.org
 *Subject:* Number of columns per row for composite columns?

  Hi everyone,
 I'm confused with number of columns in a row of Cassandra, as far as I
 know there is 2 billions columns per row. Like that if I have a composite
 column name in each row, for ex: (timestamp, userid), then number of
 columns per row is the number of distinct 'timestamp' or each distinct
 'timestamp, userid' is a column?





cassandra JDBC driver required

2014-08-13 Thread Akshay Ballarpure
I am using jdbc driver (cassandra-jdbc-1.2.5.jar) for cassandra, i wrote 
sample java code, did compiled it successfully but unable to run. any help 
appreciated.
Any other jar i am missing here ?

[root@CSL-simulation conf]# /usr/java/jdk1.7.0_60/bin/java -cp 
/root/Akshay/Cassandra/apache-cassandra-2.0.8/lib/*:/root/Akshay/Cassandra/apache-cassandra-2.0.8/conf/*:/root/Akshay/Cassandra/apache-cassandra-2.0.8/cassandra-java-driver/*:.
 
CqlConnection
log4j:WARN No appenders could be found for logger 
(org.apache.cassandra.cql.jdbc.CassandraDriver).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for 
more info.
Exception in thread main java.lang.NoClassDefFoundError: 
org/apache/cassandra/cql/jdbc/AbstractJdbcType
at 
org.apache.cassandra.cql.jdbc.CassandraConnection.init(CassandraConnection.java:146)
at 
org.apache.cassandra.cql.jdbc.CassandraDriver.connect(CassandraDriver.java:92)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:233)
at CqlConnection.main(CqlConnection.java:14)
Caused by: java.lang.ClassNotFoundException: 
org.apache.cassandra.cql.jdbc.AbstractJdbcType
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 5 more

Thanks  Regards
Akshay Ballarpure
Tata Consultancy Services
Cell:- 9985084075
Mailto: akshay.ballarp...@tcs.com
Website: http://www.tcs.com

Experience certainty.   IT Services
Business Solutions
Consulting

=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




Secondary indexes not working properly since 2.1.0-rc2 ?

2014-08-13 Thread Fabrice Larcher
Hello,

I have used C* 2.1.0-rc1, 2.1.0-rc2, 2.1.0-rc3 and I currently use
2.1.0-rc5. Since 2.1.0-rc2, it appears that the secondary indexes are not
always working. Just after the INSERT of a row, the index seems to be
there. But after a while (I do not know when or why), SELECT statements
based on any secondary index do not return the corresponding row(s)
anymore. I noticed that a restart of C* may have an impact (the data
inserted before the restart may be seen through the index, even if it was
not returned before the restart).

Here is a use-case example (in order to clarify my request) :

CREATE TABLE IF NOT EXISTS ks.cf ( k int PRIMARY KEY, ind ascii, value
text);
CREATE INDEX IF NOT EXISTS ks_cf_index ON ks.cf(ind);
INSERT INTO ks.cf (k, ind, value) VALUES (1, 'toto', 'Hello');
SELECT * FROM ks.cf WHERE ind = 'toto'; // Returns no result after a while

The last SELECT statement may or may not return a row depending on the
instant of the request. I experienced that with 2.1.0-rc5 through CQLSH
with clusters of one and two nodes. Since it depends on the instant of the
request, I am not able to deliver any way to reproduce that systematically
(It appears to be linked with some scheduled job inside C*).

Is anyone working on this issue ?
Am I possibly missing some configuration that prevent secondary indexes to
return empty result ?
Should I rather create a new table for each secondary index and remove
secondary indexes ?

Many thanks for your support.

​Fabrice​


Compression during bootstrap

2014-08-13 Thread Ruchir Jha
Hello,

We currently are at C* 1.2 and are using the SnappyCompressor for all our
CFs. Total data size is at 24 TB, and its a 12 node cluster. Avg node size
is 2 TB.

We are adding nodes currently and it seems like compression is falling
behind. I judge that by the fact that the new node which has a 4.5T disk
fills up to 100% while its bootstrapping. Can we avoid this problem with
the LZ4 compressor because of better compression or do we just need a
bigger disk?

The reason why we started with 4.5 TB was because we were assuming that
while a new node is bootstrapping it may not need more than 2 times the avg
data size. Is that a weak assumption?

Ruchir.


Re: range query times out (on 1 node, just 1 row in table)

2014-08-13 Thread Ian Rose
Confusingly, it appears to be the presence of an index on int_val that is
causing this timeout.  If I drop that index (leaving only the index on
foo_name) the query works just fine.


On Tue, Aug 12, 2014 at 10:25 PM, Ian Rose ianr...@fullstory.com wrote:

 Hi -

 I am currently running a single Cassandra node on my local dev machine.
  Here is my (test) schema (which is meaningless, I created it just to
 demonstrate the issue I am running into):

 CREATE TABLE foo (
   foo_name ascii,
   foo_shard bigint,
   int_val bigint,
   PRIMARY KEY ((foo_name, foo_shard))
 ) WITH read_repair_chance=0.1;

 CREATE INDEX ON foo (int_val);
 CREATE INDEX ON foo (foo_name);

 I have inserted just a single row into this table:
 insert into foo(foo_name, foo_shard, int_val) values('dave', 27, 100);

 This query works fine:
 select * from foo where foo_name='dave';

 But when I run this query, I get an RPC timeout:
 select * from foo where foo_name='dave' and int_val  0 allow filtering;

 With tracing enabled, here is the trace output:
 http://pastebin.com/raw.php?i=6XMEVUcQ

 (In short, everything looks fine to my untrained eye until 10s elapsed, at
 which time the following event is logged: Timed out; received 0 of 1
 responses for range 257 of 257)

 Can anyone help interpret this error?

 Many thanks!
 Ian




Re: Secondary indexes not working properly since 2.1.0-rc2 ?

2014-08-13 Thread DuyHai Doan
Hello Fabrice.

 A quick hint, try to create your secondary index WITHOUT the IF NOT
EXISTS clause to see if you still have the bug.

Another idea is to activate query tracing on client side to see what's
going on underneath.


On Wed, Aug 13, 2014 at 2:48 PM, Fabrice Larcher fabrice.larc...@level5.fr
wrote:

 Hello,

 I have used C* 2.1.0-rc1, 2.1.0-rc2, 2.1.0-rc3 and I currently use
 2.1.0-rc5. Since 2.1.0-rc2, it appears that the secondary indexes are not
 always working. Just after the INSERT of a row, the index seems to be
 there. But after a while (I do not know when or why), SELECT statements
 based on any secondary index do not return the corresponding row(s)
 anymore. I noticed that a restart of C* may have an impact (the data
 inserted before the restart may be seen through the index, even if it was
 not returned before the restart).

 Here is a use-case example (in order to clarify my request) :

 CREATE TABLE IF NOT EXISTS ks.cf ( k int PRIMARY KEY, ind ascii, value
 text);
 CREATE INDEX IF NOT EXISTS ks_cf_index ON ks.cf(ind);
 INSERT INTO ks.cf (k, ind, value) VALUES (1, 'toto', 'Hello');
 SELECT * FROM ks.cf WHERE ind = 'toto'; // Returns no result after a while

 The last SELECT statement may or may not return a row depending on the
 instant of the request. I experienced that with 2.1.0-rc5 through CQLSH
 with clusters of one and two nodes. Since it depends on the instant of the
 request, I am not able to deliver any way to reproduce that systematically
 (It appears to be linked with some scheduled job inside C*).

 Is anyone working on this issue ?
 Am I possibly missing some configuration that prevent secondary indexes to
 return empty result ?
 Should I rather create a new table for each secondary index and remove
 secondary indexes ?

 Many thanks for your support.

 ​Fabrice​




Re: range query times out (on 1 node, just 1 row in table)

2014-08-13 Thread DuyHai Doan
Hello Ian

 Secondary index performs poorly with inequalities (, ≤, , ≥). Indeed
inequalities forces the server to scan all the cluster to find the
requested range, which is clearly not optimal. That's the reason why you
need to add ALLOW FILTERING for the query to be accepted.

 ALLOW FILTERING means beware of what you're doing, we C* developers do
not give any guarantee about performance of such query.

 As Robert Coli used to say on this list, ALLOW FILTERING is synonym to
PROBABLY TIMEOUT :D


On Wed, Aug 13, 2014 at 2:56 PM, Ian Rose ianr...@fullstory.com wrote:

 Confusingly, it appears to be the presence of an index on int_val that is
 causing this timeout.  If I drop that index (leaving only the index on
 foo_name) the query works just fine.


 On Tue, Aug 12, 2014 at 10:25 PM, Ian Rose ianr...@fullstory.com wrote:

 Hi -

 I am currently running a single Cassandra node on my local dev machine.
  Here is my (test) schema (which is meaningless, I created it just to
 demonstrate the issue I am running into):

 CREATE TABLE foo (
   foo_name ascii,
   foo_shard bigint,
   int_val bigint,
   PRIMARY KEY ((foo_name, foo_shard))
 ) WITH read_repair_chance=0.1;

 CREATE INDEX ON foo (int_val);
 CREATE INDEX ON foo (foo_name);

 I have inserted just a single row into this table:
 insert into foo(foo_name, foo_shard, int_val) values('dave', 27, 100);

 This query works fine:
 select * from foo where foo_name='dave';

 But when I run this query, I get an RPC timeout:
 select * from foo where foo_name='dave' and int_val  0 allow filtering;

 With tracing enabled, here is the trace output:
 http://pastebin.com/raw.php?i=6XMEVUcQ

 (In short, everything looks fine to my untrained eye until 10s elapsed,
 at which time the following event is logged: Timed out; received 0 of 1
 responses for range 257 of 257)

 Can anyone help interpret this error?

 Many thanks!
 Ian





Re: Replacing a dead node in Cassandra 2.0.8

2014-08-13 Thread tsi
OK, now supposing Cassandra is run in a VM that crashes and I restore it from
a snapshot done some time ago. Data is stored redundantly (replication
factor 3) and I'm using consistency level QUORUM for reads and writes. That
means no data should be lost as the latest data will at least be stored on
another node. Now what do I have to do to sync the dead node again after
restoring the VM from the snapshot? Will a nodetool repair command be
sufficient?



--
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Replacing-a-dead-node-in-Cassandra-2-0-8-tp7596245p7596278.html
Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
Nabble.com.


Re: range query times out (on 1 node, just 1 row in table)

2014-08-13 Thread Jack Krupansky
Agreed, but... in this case the table has ONE row, so what exactly could be 
causing this timeout? I mean, it can’t be the row count, right?

-- Jack Krupansky

From: DuyHai Doan 
Sent: Wednesday, August 13, 2014 9:01 AM
To: user@cassandra.apache.org 
Subject: Re: range query times out (on 1 node, just 1 row in table)

Hello Ian 

Secondary index performs poorly with inequalities (, ≤, , ≥). Indeed 
inequalities forces the server to scan all the cluster to find the requested 
range, which is clearly not optimal. That's the reason why you need to add 
ALLOW FILTERING for the query to be accepted.

ALLOW FILTERING means beware of what you're doing, we C* developers do not 
give any guarantee about performance of such query.

As Robert Coli used to say on this list, ALLOW FILTERING is synonym to PROBABLY 
TIMEOUT :D



On Wed, Aug 13, 2014 at 2:56 PM, Ian Rose ianr...@fullstory.com wrote:

  Confusingly, it appears to be the presence of an index on int_val that is 
causing this timeout.  If I drop that index (leaving only the index on 
foo_name) the query works just fine.



  On Tue, Aug 12, 2014 at 10:25 PM, Ian Rose ianr...@fullstory.com wrote:

Hi - 

I am currently running a single Cassandra node on my local dev machine.  
Here is my (test) schema (which is meaningless, I created it just to 
demonstrate the issue I am running into):

CREATE TABLE foo (
  foo_name ascii,
  foo_shard bigint,
  int_val bigint,
  PRIMARY KEY ((foo_name, foo_shard))
) WITH read_repair_chance=0.1;

CREATE INDEX ON foo (int_val);
CREATE INDEX ON foo (foo_name);

I have inserted just a single row into this table:
insert into foo(foo_name, foo_shard, int_val) values('dave', 27, 100);


This query works fine:
select * from foo where foo_name='dave';


But when I run this query, I get an RPC timeout:
select * from foo where foo_name='dave' and int_val  0 allow filtering;


With tracing enabled, here is the trace output:
http://pastebin.com/raw.php?i=6XMEVUcQ


(In short, everything looks fine to my untrained eye until 10s elapsed, at 
which time the following event is logged: Timed out; received 0 of 1 responses 
for range 257 of 257)

Can anyone help interpret this error?

Many thanks!
Ian




RE: Cassandra bootstrap error: java.lang.IllegalStateException: No sources found

2014-08-13 Thread Rahul Gupta
That is the issue. Thanks..!!

The new node runs Spark work load so I changed seed ip to the newly added 
node’s IP. Same with listen address.
Only common link between Cassandra nodes and Spark nodes is the cluster name.

Change seed IP fixed the issue.

Thanks,
Rahul Gupta
DEKA Research  Developmenthttp://www.dekaresearch.com/
340 Commercial St  Manchester, NH  03101
P: 603.666.3908 extn. 6504 | C: 603.718.9676

This e-mail and the information, including any attachments, it contains are 
intended to be a confidential communication only to the person or entity to 
whom it is addressed and may contain information that is privileged. If the 
reader of this message is not the intended recipient, you are hereby notified 
that any dissemination, distribution or copying of this communication is 
strictly prohibited. If you have received this communication in error, please 
immediately notify the sender and destroy the original message.

From: Mark Reddy [mailto:mark.re...@boxever.com]
Sent: Monday, August 11, 2014 5:09 PM
To: user@cassandra.apache.org
Subject: Re: Cassandra bootstrap error: java.lang.IllegalStateException: No 
sources found

Hi,

When you configured the new node, did you correctly configure your seeds and 
listen address?


Mark

On Mon, Aug 11, 2014 at 6:12 PM, Rahul Gupta 
rgu...@dekaresearch.commailto:rgu...@dekaresearch.com wrote:
I have a 3 node Cassandra cluster and I am adding a new node when I get below 
error during bootstrap.
Running DataStax ver 4.5 (Cassandra 2.0.8.39) on all the nodes. Nodes are VMs 
running on VMWare .

Any ideas what might be wrong here?

INFO [main] 2014-08-11 13:01:09,427 StorageService.java (line 1007) JOINING: 
Starting to bootstrap...
ERROR [main] 2014-08-11 13:01:09,443 CassandraDaemon.java (line 513) Exception 
encountered during startup
java.lang.IllegalStateException: No sources found for 
(85070591730234615865843651857942052864,134599085099335834412322738856718602703]
at 
org.apache.cassandra.dht.RangeStreamer.getAllRangesWithSourcesFor(RangeStreamer.java:159)
at 
org.apache.cassandra.dht.RangeStreamer.addRanges(RangeStreamer.java:117)
at 
org.apache.cassandra.dht.BootStrapper.bootstrap(BootStrapper.java:72)
at 
org.apache.cassandra.service.StorageService.bootstrap(StorageService.java:1035)
at 
org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:797)
at 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:614)
at 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:504)
at 
org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:378)
at com.datastax.bdp.server.DseDaemon.setup(DseDaemon.java:394)
at 
org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:496)
at com.datastax.bdp.server.DseDaemon.main(DseDaemon.java:574)
INFO [Thread-1] 2014-08-11 13:01:09,451 DseDaemon.java (line 477) DSE shutting 
down...
INFO [StorageServiceShutdownHook] 2014-08-11 13:01:09,476 Gossiper.java (line 
1279) Announcing shutdown
INFO [Thread-1] 2014-08-11 13:01:09,521 PluginManager.java (line 317) All 
plugins are stopped.
INFO [Thread-1] 2014-08-11 13:01:09,522 CassandraDaemon.java (line 463) 
Cassandra shutting down...
ERROR [Thread-1] 2014-08-11 13:01:09,522 CassandraDaemon.java (line 199) 
Exception in thread Thread[Thread-1,5,main]
java.lang.NullPointerException
at 
org.apache.cassandra.service.CassandraDaemon.stop(CassandraDaemon.java:464)
at com.datastax.bdp.server.DseDaemon.stop(DseDaemon.java:480)
at com.datastax.bdp.server.DseDaemon$1.run(DseDaemon.java:384)
INFO [StorageServiceShutdownHook] 2014-08-11 13:01:11,477 MessagingService.java 
(line 683) Waiting for messaging service to quiesce
INFO [ACCEPT-/172.17.0.122http://172.17.0.122] 2014-08-11 13:01:11,478 
MessagingService.java (line 923) MessagingService has terminated the accept() 
thread

Rahul Gupta
DEKA Research  Developmenthttp://www.dekaresearch.com/
340 Commercial St  Manchester, NH  03101
P: 603.666.3908 extn. 6504tel:603.666.3908%20extn.%206504 | C: 
603.718.9676tel:603.718.9676

This e-mail and the information, including any attachments, it contains are 
intended to be a confidential communication only to the person or entity to 
whom it is addressed and may contain information that is privileged. If the 
reader of this message is not the intended recipient, you are hereby notified 
that any dissemination, distribution or copying of this communication is 
strictly prohibited. If you have received this communication in error, please 
immediately notify the sender and destroy the original message.



This e-mail and the information, including any attachments it contains, are 
intended to be a confidential communication only to the person or 

select * from table in CQLSH

2014-08-13 Thread Tim Dunphy
Hello,

 I am trying to figure out how to do a select * from a table that's stored
in a cassandra database.

[root@beta-new:/home/tiezinteractive/www/cassandra] #cqlsh
Connected to Jokefire Cluster at beta-new.jokefire.com:9160.
[cqlsh 4.1.0 | Cassandra 2.0.6 | CQL spec 3.0.0 | Thrift protocol 19.39.0]
Use HELP for help.
cqlsh describe keyspaces;

system  animals  joke_fire1  game_of_thrones  system_traces  demo

cqlsh use demo;
cqlsh:demo describe tables;

Users

cqlsh:demo select * from Users;
*Bad Request: unconfigured columnfamily users*

Can someone please help me with what I'm doing wrong in using this select
statement?

Thanks
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


Re: range query times out (on 1 node, just 1 row in table)

2014-08-13 Thread DuyHai Doan
It does not matter that this table has one row or n rows. Before fetching
data in the table foo, C* must determine:

1) how many primary keys of table foo match the condition foo_name='dave'
-- read from the 2nd index foo_name where partition key = dave
2) how many primary keys of table foo match the condition int_val0 -- read
from the 2nd index int_val where partition key  0, so basically it is a
range scan

Once it gets all the results from 2nd indices, C* can query the primary
table to return data.

 I've read somewhere that when having multiple conditions in the WHERE
clause, C* should use the most restrictive condition to optimize
performance. In our example, equality condition on foo_name seems to be
the most restrictive.

 My assumption is that C* does use statistics to determine the most
restrictive condition and since here we have only 1 data, statictics are
useless so it ends up doing a range scan on int_val 

 It would be nice if someone can confirm/infirm the assumption. The last
time I sneaked into the source code of 2nd index was more than 6 months ago
so things may have changed since then




On Wed, Aug 13, 2014 at 3:29 PM, Jack Krupansky j...@basetechnology.com
wrote:

   Agreed, but... in this case the table has ONE row, so what exactly
 could be causing this timeout? I mean, it can’t be the row count, right?

 -- Jack Krupansky

  *From:* DuyHai Doan doanduy...@gmail.com
 *Sent:* Wednesday, August 13, 2014 9:01 AM
 *To:* user@cassandra.apache.org
 *Subject:* Re: range query times out (on 1 node, just 1 row in table)

  Hello Ian

 Secondary index performs poorly with inequalities (, ≤, , ≥). Indeed
 inequalities forces the server to scan all the cluster to find the
 requested range, which is clearly not optimal. That's the reason why you
 need to add ALLOW FILTERING for the query to be accepted.

 ALLOW FILTERING means beware of what you're doing, we C* developers do
 not give any guarantee about performance of such query.

 As Robert Coli used to say on this list, ALLOW FILTERING is synonym to
 PROBABLY TIMEOUT :D


 On Wed, Aug 13, 2014 at 2:56 PM, Ian Rose ianr...@fullstory.com wrote:

 Confusingly, it appears to be the presence of an index on int_val that is
 causing this timeout.  If I drop that index (leaving only the index on
 foo_name) the query works just fine.


 On Tue, Aug 12, 2014 at 10:25 PM, Ian Rose ianr...@fullstory.com wrote:

 Hi -

 I am currently running a single Cassandra node on my local dev machine.
 Here is my (test) schema (which is meaningless, I created it just to
 demonstrate the issue I am running into):

  CREATE TABLE foo (
   foo_name ascii,
   foo_shard bigint,
   int_val bigint,
   PRIMARY KEY ((foo_name, foo_shard))
 ) WITH read_repair_chance=0.1;

 CREATE INDEX ON foo (int_val);
 CREATE INDEX ON foo (foo_name);

 I have inserted just a single row into this table:
 insert into foo(foo_name, foo_shard, int_val) values('dave', 27, 100);

 This query works fine:
 select * from foo where foo_name='dave';

 But when I run this query, I get an RPC timeout:
 select * from foo where foo_name='dave' and int_val  0 allow filtering;

 With tracing enabled, here is the trace output:
 http://pastebin.com/raw.php?i=6XMEVUcQ

 (In short, everything looks fine to my untrained eye until 10s elapsed,
 at which time the following event is logged: Timed out; received 0 of 1
 responses for range 257 of 257)

 Can anyone help interpret this error?

 Many thanks!
 Ian








RE: Host ID collision making node disappear

2014-08-13 Thread Rahul Gupta
Found the issue and the solution.
Every node has peers column family in system keyspace.
When a VM is copied over and ran as a new node, peers still have the old data 
(host ids).

Deleting log files and data files do not solve this issue.

There are two solutions to this:


1.   Do not clone existing Cassandra node and use it as additional node. 
Always start with a fresh machine which never had any Cassandra installed in it.

OR

2.   Fix the host id in the peers column family in system keyspace. 
Generate a new UUID and update the row for newly added peer. This need to be 
done on all existing Cassandra nodes.

Thanks,
Rahul Gupta
DEKA Research  Developmenthttp://www.dekaresearch.com/
340 Commercial St  Manchester, NH  03101
P: 603.666.3908 extn. 6504 | C: 603.718.9676

This e-mail and the information, including any attachments, it contains are 
intended to be a confidential communication only to the person or entity to 
whom it is addressed and may contain information that is privileged. If the 
reader of this message is not the intended recipient, you are hereby notified 
that any dissemination, distribution or copying of this communication is 
strictly prohibited. If you have received this communication in error, please 
immediately notify the sender and destroy the original message.

From: Jens Rantil [mailto:jens.ran...@tink.se]
Sent: Friday, August 08, 2014 1:09 PM
To: user@cassandra.apache.org
Cc: user@cassandra.apache.org
Subject: Re: Host ID collision making node disappear

Rahul,

I'm pretty sure it's preferable to clean all files and directories in 
/var/log/cassandra before starting up the new Cassandra node. This will make it 
start on a clean slate resetting all state from previous node.

Cheers,
Jens
—
Sent from Mailboxhttps://www.dropbox.com/mailbox


On Fri, Aug 8, 2014 at 6:21 PM, Rahul Gupta 
rgu...@dekaresearch.commailto:rgu...@dekaresearch.com wrote:
I have a 3 node Cassandra Cluster. Using DataStax Enetrprise v4.5.1 on VMWare.
I am adding 1 new node to this cluster for running Analytics workload.


So I cloned existing one of the Cassandra VMs, changed the hostname, restarted 
VMs, then updated Cassandra.yaml file and restarted Cassandra.
172.17.3.1 – Cassandra Node
172.17.0.173 – Analytics Node, cloned from above node.


Now when this new node join the cluster, the existing node seem to disappear.
I thought it is the issue with tokens, so I moved the new node to a new token, 
still the same problem.


In the log files I see:


INFO [HANDSHAKE-/172.17.3.1] 2014-08-08 11:59:18,847 OutboundTcpConnection.java 
(line 386) Handshaking version with /172.17.3.1
INFO [GossipStage:1] 2014-08-08 11:59:19,094 Gossiper.java (line 910) Node 
/172.17.3.1 is now part of the cluster
WARN [GossipStage:1] 2014-08-08 11:59:19,100 StorageService.java (line 1572) 
Not updating host ID 3ce2cc13-7a3c-45cf-9a14-b29b0b7cfb4e for /172.17.3.1 
because it's mine


When checked through nodetool on the new node, it shows only three nodes, 
172.17.3.1 is not showing up.


# nodetool ring -h 172.17.0.173
Note: Ownership information does not include topology; for complete 
information, specify a keyspace
Datacenter: Analytics
==
Address   RackStatus State   LoadOwns
Token
172.17.0.173  rack1   Up Normal  15.65 GB33.33%  
28356863910078205288614550619314017621
Datacenter: Cassandra
==
Address   RackStatus State   LoadOwns
Token

   
141784319550391026443072753096570088106
172.17.3.2rack1   Up Normal  19.42 GB33.33%  
85070591730234615865843651857942052864
172.17.3.3rack1   Up Normal  18.77 GB33.33%  
141784319550391026443072753096570088106




When checked through nodetool on the old node, it shows only three nodes, 
172.17.0.173 is not showing up.


# nodetool ring -h 172.17.3.1
Note: Ownership information does not include topology; for complete 
information, specify a keyspace
Datacenter: Cassandra
==
Address RackStatus State   LoadOwnsToken
   
141784319550391026443072753096570088106
172.17.3.1  rack1   Up Normal  15.69 GB33.33%  
28356863910078205288614550619314017620
172.17.3.2  rack1   Up Normal  19.43 GB33.33%  
85070591730234615865843651857942052864
172.17.3.3  rack1   Up Normal  18.77 GB33.33%  
141784319550391026443072753096570088106


Thanks,
Rahul Gupta
DEKA Research  Developmenthttp://www.dekaresearch.com/
340 Commercial St  Manchester, NH  03101
P: 603.666.3908 extn. 6504 | C: 603.718.9676


This e-mail and the information, including any attachments, it contains are 
intended to be a 

Re: range query times out (on 1 node, just 1 row in table)

2014-08-13 Thread Ian Rose
Frankly, no matter how inefficient / expensive the query is, surely it
should still work when there is only 1 row and 1 node (which is localhost)!

I'm starting to wonder if range queries on secondary indexes aren't
supported at all (although if that is the case, I would certainly prefer an
error rather than a timeout!).  I've been scouring the web trying to find a
definitive answer on this but all I have come up with is this (old,
non-authoritative) blog post which states Cassandra’s native index  is
like a hashed index, which means you can only do equality query and not
range query.

http://pkghosh.wordpress.com/2011/03/02/cassandra-secondary-index-patterns/




On Wed, Aug 13, 2014 at 10:27 AM, DuyHai Doan doanduy...@gmail.com wrote:

 It does not matter that this table has one row or n rows. Before fetching
 data in the table foo, C* must determine:

 1) how many primary keys of table foo match the condition foo_name='dave'
 -- read from the 2nd index foo_name where partition key = dave
 2) how many primary keys of table foo match the condition int_val0 -- read
 from the 2nd index int_val where partition key  0, so basically it is a
 range scan

 Once it gets all the results from 2nd indices, C* can query the primary
 table to return data.

  I've read somewhere that when having multiple conditions in the WHERE
 clause, C* should use the most restrictive condition to optimize
 performance. In our example, equality condition on foo_name seems to be
 the most restrictive.

  My assumption is that C* does use statistics to determine the most
 restrictive condition and since here we have only 1 data, statictics are
 useless so it ends up doing a range scan on int_val 

  It would be nice if someone can confirm/infirm the assumption. The last
 time I sneaked into the source code of 2nd index was more than 6 months ago
 so things may have changed since then




 On Wed, Aug 13, 2014 at 3:29 PM, Jack Krupansky j...@basetechnology.com
 wrote:

   Agreed, but... in this case the table has ONE row, so what exactly
 could be causing this timeout? I mean, it can’t be the row count, right?

 -- Jack Krupansky

  *From:* DuyHai Doan doanduy...@gmail.com
 *Sent:* Wednesday, August 13, 2014 9:01 AM
 *To:* user@cassandra.apache.org
 *Subject:* Re: range query times out (on 1 node, just 1 row in table)

  Hello Ian

 Secondary index performs poorly with inequalities (, ≤, , ≥). Indeed
 inequalities forces the server to scan all the cluster to find the
 requested range, which is clearly not optimal. That's the reason why you
 need to add ALLOW FILTERING for the query to be accepted.

 ALLOW FILTERING means beware of what you're doing, we C* developers do
 not give any guarantee about performance of such query.

 As Robert Coli used to say on this list, ALLOW FILTERING is synonym to
 PROBABLY TIMEOUT :D


 On Wed, Aug 13, 2014 at 2:56 PM, Ian Rose ianr...@fullstory.com wrote:

 Confusingly, it appears to be the presence of an index on int_val that
 is causing this timeout.  If I drop that index (leaving only the index on
 foo_name) the query works just fine.


 On Tue, Aug 12, 2014 at 10:25 PM, Ian Rose ianr...@fullstory.com
 wrote:

 Hi -

 I am currently running a single Cassandra node on my local dev
 machine.  Here is my (test) schema (which is meaningless, I created it just
 to demonstrate the issue I am running into):

  CREATE TABLE foo (
   foo_name ascii,
   foo_shard bigint,
   int_val bigint,
   PRIMARY KEY ((foo_name, foo_shard))
 ) WITH read_repair_chance=0.1;

 CREATE INDEX ON foo (int_val);
 CREATE INDEX ON foo (foo_name);

 I have inserted just a single row into this table:
 insert into foo(foo_name, foo_shard, int_val) values('dave', 27, 100);

 This query works fine:
 select * from foo where foo_name='dave';

 But when I run this query, I get an RPC timeout:
 select * from foo where foo_name='dave' and int_val  0 allow filtering;

 With tracing enabled, here is the trace output:
 http://pastebin.com/raw.php?i=6XMEVUcQ

 (In short, everything looks fine to my untrained eye until 10s elapsed,
 at which time the following event is logged: Timed out; received 0 of 1
 responses for range 257 of 257)

 Can anyone help interpret this error?

 Many thanks!
 Ian










Re: select * from table in CQLSH

2014-08-13 Thread Adam Holmberg
I think you just need to quote the Users identifier. Without quotes,
identifiers are treated as case-insensitive.
https://cassandra.apache.org/doc/cql3/CQL.html#identifiers

Adam


On Wed, Aug 13, 2014 at 9:27 AM, Tim Dunphy bluethu...@gmail.com wrote:

 Hello,

  I am trying to figure out how to do a select * from a table that's stored
 in a cassandra database.

 [root@beta-new:/home/tiezinteractive/www/cassandra] #cqlsh
 Connected to Jokefire Cluster at beta-new.jokefire.com:9160.
 [cqlsh 4.1.0 | Cassandra 2.0.6 | CQL spec 3.0.0 | Thrift protocol 19.39.0]
 Use HELP for help.
 cqlsh describe keyspaces;

 system  animals  joke_fire1  game_of_thrones  system_traces  demo

 cqlsh use demo;
 cqlsh:demo describe tables;

 Users

 cqlsh:demo select * from Users;
 *Bad Request: unconfigured columnfamily users*

 Can someone please help me with what I'm doing wrong in using this select
 statement?

 Thanks
 Tim

 --
 GPG me!!

 gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B




Re: range query times out (on 1 node, just 1 row in table)

2014-08-13 Thread Sylvain Lebresne
That sounds like a bug (the trace does look fishy). I'm not sure you've
indicated the Cassandra version you use so the first thing might be to
check that this hasn't been fixed in a recent version, but if you are using
a recent release (say 2.0.9), then please do open a JIRA ticket with your
reproduction steps.


On Wed, Aug 13, 2014 at 4:25 AM, Ian Rose ianr...@fullstory.com wrote:

 Hi -

 I am currently running a single Cassandra node on my local dev machine.
  Here is my (test) schema (which is meaningless, I created it just to
 demonstrate the issue I am running into):

 CREATE TABLE foo (
   foo_name ascii,
   foo_shard bigint,
   int_val bigint,
   PRIMARY KEY ((foo_name, foo_shard))
 ) WITH read_repair_chance=0.1;

 CREATE INDEX ON foo (int_val);
 CREATE INDEX ON foo (foo_name);

 I have inserted just a single row into this table:
 insert into foo(foo_name, foo_shard, int_val) values('dave', 27, 100);

 This query works fine:
 select * from foo where foo_name='dave';

 But when I run this query, I get an RPC timeout:
 select * from foo where foo_name='dave' and int_val  0 allow filtering;

 With tracing enabled, here is the trace output:
 http://pastebin.com/raw.php?i=6XMEVUcQ

 (In short, everything looks fine to my untrained eye until 10s elapsed, at
 which time the following event is logged: Timed out; received 0 of 1
 responses for range 257 of 257)

 Can anyone help interpret this error?

 Many thanks!
 Ian




Re: range query times out (on 1 node, just 1 row in table)

2014-08-13 Thread Ian Rose
I'm on 2.0.9 - I'll open a JIRA ticket.

thanks,
Ian


On Wed, Aug 13, 2014 at 10:43 AM, Sylvain Lebresne sylv...@datastax.com
wrote:

 That sounds like a bug (the trace does look fishy). I'm not sure you've
 indicated the Cassandra version you use so the first thing might be to
 check that this hasn't been fixed in a recent version, but if you are using
 a recent release (say 2.0.9), then please do open a JIRA ticket with your
 reproduction steps.


 On Wed, Aug 13, 2014 at 4:25 AM, Ian Rose ianr...@fullstory.com wrote:

 Hi -

 I am currently running a single Cassandra node on my local dev machine.
  Here is my (test) schema (which is meaningless, I created it just to
 demonstrate the issue I am running into):

 CREATE TABLE foo (
   foo_name ascii,
   foo_shard bigint,
   int_val bigint,
   PRIMARY KEY ((foo_name, foo_shard))
 ) WITH read_repair_chance=0.1;

 CREATE INDEX ON foo (int_val);
 CREATE INDEX ON foo (foo_name);

 I have inserted just a single row into this table:
 insert into foo(foo_name, foo_shard, int_val) values('dave', 27, 100);

 This query works fine:
 select * from foo where foo_name='dave';

 But when I run this query, I get an RPC timeout:
 select * from foo where foo_name='dave' and int_val  0 allow filtering;

 With tracing enabled, here is the trace output:
 http://pastebin.com/raw.php?i=6XMEVUcQ

 (In short, everything looks fine to my untrained eye until 10s elapsed,
 at which time the following event is logged: Timed out; received 0 of 1
 responses for range 257 of 257)

 Can anyone help interpret this error?

 Many thanks!
 Ian





Re: select * from table in CQLSH

2014-08-13 Thread Tim Dunphy

 I think you just need to quote the Users identifier. Without quotes,
 identifiers are treated as case-insensitive.
 https://cassandra.apache.org/doc/cql3/CQL.html#identifiers



Hi Adam!

Yes that was it. It's working now.


cqlsh:demo select * from Users;

 key  | column1| value
--++
 0x63686574616e2e7468756d6172407469657a2e6e6c |   0x63726561746564 |
0x323031342d30382d31332030323a34313a3438
 0x63686574616e2e7468756d6172407469657a2e6e6c | 0x6c6f636174696f6e |
0x496e646961
 0x63686574616e2e7468756d6172407469657a2e6e6c | 0x6e616d65 |
  0x63686574616e
 0x63686574616e2e7468756d6172407469657a2e6e6c | 0x70617373776f7264 |
0x30613830623837373338616638633466313761663334636561316135613663386562333730623462
 0x63686574616e2e7468756d6172407469657a2e6e6c | 0x757365726e616d65 |
  0x63686574616e
 0x7269742e727573736f40676d61696c2e636f6d |   0x63726561746564 |
0x323031342d30382d31332030393a33383a3239
 0x7269742e727573736f40676d61696c2e636f6d | 0x6c6f636174696f6e |
0x556e6974656420537461746573
 0x7269742e727573736f40676d61696c2e636f6d | 0x6e616d65 |
0x52697420527573736f
 0x7269742e727573736f40676d61696c2e636f6d | 0x70617373776f7264 |
0x3732383865646430666333636265393361306366303665333536386532383532313638376263
 0x7269742e727573736f40676d61696c2e636f6d | 0x757365726e616d65 |
  0x4461726b776f6c66
   0x7465656e612e73686168407469657a2e6e6c |   0x63726561746564 |
0x323031342d30382d31332030323a33393a3537
   0x7465656e612e73686168407469657a2e6e6c | 0x6c6f636174696f6e |
0x496e646961
   0x7465656e612e73686168407469657a2e6e6c | 0x6e616d65 |
  0x5465656e612053686168
   0x7465656e612e73686168407469657a2e6e6c | 0x70617373776f7264 |
0x34353532356363653733353363373832323032303930343464366438386234326431313430316136
   0x7465656e612e73686168407469657a2e6e6c | 0x757365726e616d65 |
0x7465656e61
   0x6a6a407469657a2e6e6c |   0x63726561746564 |
0x323031342d30382d31332030313a31303a3437
   0x6a6a407469657a2e6e6c | 0x6c6f636174696f6e |
0x496e646961
   0x6a6a407469657a2e6e6c | 0x6e616d65 |
  0x6a6a
   0x6a6a407469657a2e6e6c | 0x70617373776f7264 |
0x3733323361353433316431613037323938336136613562663233373435623635356464663539
   0x6a6a407469657a2e6e6c | 0x757365726e616d65 |
  0x6a6a

(20 rows)

Thanks!

Tim


On Wed, Aug 13, 2014 at 10:37 AM, Adam Holmberg adam.holmb...@datastax.com
wrote:

 I think you just need to quote the Users identifier. Without quotes,
 identifiers are treated as case-insensitive.
 https://cassandra.apache.org/doc/cql3/CQL.html#identifiers

 Adam


 On Wed, Aug 13, 2014 at 9:27 AM, Tim Dunphy bluethu...@gmail.com wrote:

 Hello,

  I am trying to figure out how to do a select * from a table that's
 stored in a cassandra database.

 [root@beta-new:/home/tiezinteractive/www/cassandra] #cqlsh
 Connected to Jokefire Cluster at beta-new.jokefire.com:9160.
 [cqlsh 4.1.0 | Cassandra 2.0.6 | CQL spec 3.0.0 | Thrift protocol 19.39.0]
 Use HELP for help.
 cqlsh describe keyspaces;

 system  animals  joke_fire1  game_of_thrones  system_traces  demo

 cqlsh use demo;
 cqlsh:demo describe tables;

 Users

 cqlsh:demo select * from Users;
 *Bad Request: unconfigured columnfamily users*

 Can someone please help me with what I'm doing wrong in using this select
 statement?

 Thanks
 Tim

 --
 GPG me!!

 gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B





-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


Best practices for frequently updated columns

2014-08-13 Thread Jeremy Jongsma
We are building a historical timeseries database for stocks and futures,
with trade prices aggregated into daily bars (open, high, low, close values
for the day). The latest bar for each instrument needs to be updated as new
trades arrive on the realtime data feeds. Depending on the trading volume
for an instrument, some columns will be updated multiple times per second.

I've read comments about frequent column updates causing compaction issues
with Cassandra. What is the recommended Cassandra configuration / best
practices for usage scenarios like this?


Re: clarification on 100k tombstone limit in indexes

2014-08-13 Thread Tyler Hobbs
On Wed, Aug 13, 2014 at 4:35 AM, DuyHai Doan doanduy...@gmail.com wrote:

 add an additional integer column to the partition key (making it a
 composite partition key if it isn't already).  When inserting, randomly
 pick a value between, say, 0 and 10 to use for this column  -- Due to the
 low cardinality of bucket (only 10), there is no guarantee that the
 partitions would be distributed evenly. But it's better than nothing.


It's important to think about it probablistically, i.e. what is the
probability that all ten partitions belong to the same node?  If you have
a ten node cluster (assume RF=1 for simplicity), there's a 1/10^9 (one in a
billion) chance that a single node is the owner for all partitions.  So
it's quite a bit better than nothing.  If you want to improve your odds,
bump the number up.  But, keep in mind that it's a balance, because reads
become more expensive.



 Alternatively, instead of using a random number, you could hash the
 other key components and use the lowest bits for the value.  This has the
 advantage of being deterministic -- Does it work with VNodes, where
 tokens are split in 256 ranges and shuffled in all nodes ?


Yes, it works perfectly fine with vnodes.


-- 
Tyler Hobbs
DataStax http://datastax.com/


Lightweight transaction (paxos) vs double check.

2014-08-13 Thread Wayne Schroeder
I have to come up with a “event dupe check” system that handles race conditions 
where two requests come in at the same time.  Obviously this can be solved with 
lightweight transactions (if not exists), however I am concerned that there may 
be costs/issues hidden to me for doing significant amounts of LWT such as locks 
or other contention issues.  If it comes down to pure time and operations, 
after doing some analysis with tracing, it appears that is actually cheaper 
(total time and operations wise) to simply do one LWT than implement a 
check/write/double check and or correct style reconciliation system. 

Are there hidden costs to LWT (paxos) that are not represented in the total 
time and number of operations?  For example, are there some under-the-hood 
locks that could cause contention issues when processing significant quantities 
of LWT under load?

Wayne



Re: Lightweight transaction (paxos) vs double check.

2014-08-13 Thread Robert Coli
On Wed, Aug 13, 2014 at 9:16 AM, Wayne Schroeder 
wschroe...@pinsightmedia.com wrote:

 Are there hidden costs to LWT (paxos) that are not represented in the
 total time and number of operations?  For example, are there some
 under-the-hood locks that could cause contention issues when processing
 significant quantities of LWT under load?


Transactions are not the sweet spot of a distributed log structured
database with immutable datafiles, LWT comes at a significant cost compared
to other operations in Cassandra.

Put another way, lunch is still not free. :D

=Rob


Re: Best practices for frequently updated columns

2014-08-13 Thread Robert Coli
On Wed, Aug 13, 2014 at 8:01 AM, Jeremy Jongsma jer...@barchart.com wrote:

 I've read comments about frequent column updates causing compaction issues
 with Cassandra. What is the recommended Cassandra configuration / best
 practices for usage scenarios like this?


If your data is frequently UPDATEd, perhaps a log structured database with
immutable data files is not for you?

=Rob


Re: range query times out (on 1 node, just 1 row in table)

2014-08-13 Thread Robert Coli
On Wed, Aug 13, 2014 at 7:33 AM, Ian Rose ianr...@fullstory.com wrote:

 I'm starting to wonder if range queries on secondary indexes aren't
 supported at all (although if that is the case, I would certainly prefer an
 error rather than a timeout!).  I've been scouring the web trying to find a
 definitive answer on this but all I have come up with is this (old,
 non-authoritative) blog post which states Cassandra’s native index  is
 like a hashed index, which means you can only do equality query and not
 range query.


Somewhere in google I'm pretty sure you can find me on this list explaining
the basic case for why I do not recommend using Secondary Indexes.

An endless trickle of edge cases such as this one where trivial operations
do not work is one of the reasons given. The convenience they provide can
really only be convenience if they actually, you know, work.

=Rob


Re: Host ID collision making node disappear

2014-08-13 Thread Robert Coli
On Wed, Aug 13, 2014 at 7:28 AM, Rahul Gupta rgu...@dekaresearch.com
wrote:

  Found the issue and the solution.



 1.   Do not clone existing Cassandra node and use it as additional
 node. Always start with a fresh machine which never had any Cassandra
 installed in it.




 2.   Fix the host id in the peers column family in system keyspace.
 Generate a new UUID and update the row for newly added peer. This need to
 be done on all existing Cassandra nodes.



3.
https://engineering.eventbrite.com/changing-the-ip-address-of-a-cassandra-node-with-auto_bootstrapfalse/

=Rob


Re: Compression during bootstrap

2014-08-13 Thread Robert Coli
On Wed, Aug 13, 2014 at 5:53 AM, Ruchir Jha ruchir@gmail.com wrote:

 We are adding nodes currently and it seems like compression is falling
 behind. I judge that by the fact that the new node which has a 4.5T disk
 fills up to 100% while its bootstrapping. Can we avoid this problem with
 the LZ4 compressor because of better compression or do we just need a
 bigger disk?


2TB per node is a lot of data. 4.5 would be a huge amount of data.

Do you mean compaction is falling behind? Do you setcompactionthroughput
0 while bootstrapping new nodes?

I don't think compression is involved here? Why do you think it does?

=Rob


Re: Lightweight transaction (paxos) vs double check.

2014-08-13 Thread Wayne Schroeder
Well… I didn’t expect them to be free :)

Knowing the price would help weigh the consequences of using them though.  I 
just don’t want to implement a check/write/double check solution if it ends up 
being actually more expensive in total operations and time than simply using 
LWT.  Any thoughts in that regard?

Wayne


On Aug 13, 2014, at 1:10 PM, Robert Coli 
rc...@eventbrite.commailto:rc...@eventbrite.com wrote:

On Wed, Aug 13, 2014 at 9:16 AM, Wayne Schroeder 
wschroe...@pinsightmedia.commailto:wschroe...@pinsightmedia.com wrote:
Are there hidden costs to LWT (paxos) that are not represented in the total 
time and number of operations?  For example, are there some under-the-hood 
locks that could cause contention issues when processing significant quantities 
of LWT under load?

Transactions are not the sweet spot of a distributed log structured database 
with immutable datafiles, LWT comes at a significant cost compared to other 
operations in Cassandra.

Put another way, lunch is still not free. :D

=Rob



Re: Table not being created but no error.

2014-08-13 Thread DuyHai Doan
Can you just give the C* version and the complete DDL script to reproduce
the issue ?


On Wed, Aug 13, 2014 at 10:08 PM, Kevin Burton bur...@spinn3r.com wrote:

 I'm tracking down a weird bug and was wondering if you guys had any
 feedback.

 I'm trying to create ten tables programatically.. .

 The first one I create, for some reason, isn't created.

 The other 9 are created without a problem.

 Im doing this with the datastax driver's session.execute().

 No exceptions are thrown.

 I read the tables back out, and I have 9 of them, but not the first one.

 I can confirm that the table isn't there because I'm doing a

   select * from foo0 limit 1

 and it gives me an unconfigured column family exception.

 so it looks like cassandra is just silently not creating the table.

 This is just in my junit harness for now.  So it's one cassandra node so
 there shouldn't be an issue with schema disagreement.

 Kind of stumped here so any suggestion would help.

 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




Table not being created but no error.

2014-08-13 Thread Kevin Burton
I'm tracking down a weird bug and was wondering if you guys had any
feedback.

I'm trying to create ten tables programatically.. .

The first one I create, for some reason, isn't created.

The other 9 are created without a problem.

Im doing this with the datastax driver's session.execute().

No exceptions are thrown.

I read the tables back out, and I have 9 of them, but not the first one.

I can confirm that the table isn't there because I'm doing a

  select * from foo0 limit 1

and it gives me an unconfigured column family exception.

so it looks like cassandra is just silently not creating the table.

This is just in my junit harness for now.  So it's one cassandra node so
there shouldn't be an issue with schema disagreement.

Kind of stumped here so any suggestion would help.

-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
https://plus.google.com/102718274791889610666/posts
http://spinn3r.com


Re: Table not being created but no error.

2014-08-13 Thread Kevin Burton
2.0.5… I'm upgrading to 2.0.9 now just to rule this out….

I can give you the full CQL for the table, but I can't seem to reproduce it
without my entire app being included.

If I execute the CQL manually, it works… which is what makes this so weird.


On Wed, Aug 13, 2014 at 1:11 PM, DuyHai Doan doanduy...@gmail.com wrote:

 Can you just give the C* version and the complete DDL script to reproduce
 the issue ?


 On Wed, Aug 13, 2014 at 10:08 PM, Kevin Burton bur...@spinn3r.com wrote:

 I'm tracking down a weird bug and was wondering if you guys had any
 feedback.

 I'm trying to create ten tables programatically.. .

 The first one I create, for some reason, isn't created.

 The other 9 are created without a problem.

 Im doing this with the datastax driver's session.execute().

 No exceptions are thrown.

 I read the tables back out, and I have 9 of them, but not the first one.

 I can confirm that the table isn't there because I'm doing a

   select * from foo0 limit 1

 and it gives me an unconfigured column family exception.

 so it looks like cassandra is just silently not creating the table.

 This is just in my junit harness for now.  So it's one cassandra node so
 there shouldn't be an issue with schema disagreement.

 Kind of stumped here so any suggestion would help.

 --

  Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com





-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
https://plus.google.com/102718274791889610666/posts
http://spinn3r.com


Re: Table not being created but no error.

2014-08-13 Thread Kevin Burton
and I'm certain that the CQL is executing… because I get a ResultSet back
and verified that the CQL is correct.


On Wed, Aug 13, 2014 at 1:26 PM, Kevin Burton bur...@spinn3r.com wrote:

 2.0.5… I'm upgrading to 2.0.9 now just to rule this out….

 I can give you the full CQL for the table, but I can't seem to reproduce
 it without my entire app being included.

 If I execute the CQL manually, it works… which is what makes this so weird.


 On Wed, Aug 13, 2014 at 1:11 PM, DuyHai Doan doanduy...@gmail.com wrote:

 Can you just give the C* version and the complete DDL script to reproduce
 the issue ?


 On Wed, Aug 13, 2014 at 10:08 PM, Kevin Burton bur...@spinn3r.com
 wrote:

 I'm tracking down a weird bug and was wondering if you guys had any
 feedback.

 I'm trying to create ten tables programatically.. .

 The first one I create, for some reason, isn't created.

 The other 9 are created without a problem.

 Im doing this with the datastax driver's session.execute().

 No exceptions are thrown.

 I read the tables back out, and I have 9 of them, but not the first one.

 I can confirm that the table isn't there because I'm doing a

   select * from foo0 limit 1

 and it gives me an unconfigured column family exception.

 so it looks like cassandra is just silently not creating the table.

 This is just in my junit harness for now.  So it's one cassandra node so
 there shouldn't be an issue with schema disagreement.

 Kind of stumped here so any suggestion would help.

 --

  Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com





 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
https://plus.google.com/102718274791889610666/posts
http://spinn3r.com


Re: Table not being created but no error.

2014-08-13 Thread Kevin Burton
yeah… problem still exists on 2.0.9


On Wed, Aug 13, 2014 at 1:26 PM, Kevin Burton bur...@spinn3r.com wrote:

 and I'm certain that the CQL is executing… because I get a ResultSet back
 and verified that the CQL is correct.


 On Wed, Aug 13, 2014 at 1:26 PM, Kevin Burton bur...@spinn3r.com wrote:

 2.0.5… I'm upgrading to 2.0.9 now just to rule this out….

 I can give you the full CQL for the table, but I can't seem to reproduce
 it without my entire app being included.

 If I execute the CQL manually, it works… which is what makes this so
 weird.


 On Wed, Aug 13, 2014 at 1:11 PM, DuyHai Doan doanduy...@gmail.com
 wrote:

 Can you just give the C* version and the complete DDL script to
 reproduce the issue ?


 On Wed, Aug 13, 2014 at 10:08 PM, Kevin Burton bur...@spinn3r.com
 wrote:

 I'm tracking down a weird bug and was wondering if you guys had any
 feedback.

 I'm trying to create ten tables programatically.. .

 The first one I create, for some reason, isn't created.

 The other 9 are created without a problem.

 Im doing this with the datastax driver's session.execute().

 No exceptions are thrown.

 I read the tables back out, and I have 9 of them, but not the first
 one.

 I can confirm that the table isn't there because I'm doing a

   select * from foo0 limit 1

 and it gives me an unconfigured column family exception.

 so it looks like cassandra is just silently not creating the table.

 This is just in my junit harness for now.  So it's one cassandra node
 so there shouldn't be an issue with schema disagreement.

 Kind of stumped here so any suggestion would help.

 --

  Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com





 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
https://plus.google.com/102718274791889610666/posts
http://spinn3r.com


Re: Table not being created but no error.

2014-08-13 Thread DuyHai Doan
Maybe tracing the requests ? (just the one creating the schema of course)


On Wed, Aug 13, 2014 at 10:30 PM, Kevin Burton bur...@spinn3r.com wrote:

 yeah… problem still exists on 2.0.9


 On Wed, Aug 13, 2014 at 1:26 PM, Kevin Burton bur...@spinn3r.com wrote:

 and I'm certain that the CQL is executing… because I get a ResultSet back
 and verified that the CQL is correct.


 On Wed, Aug 13, 2014 at 1:26 PM, Kevin Burton bur...@spinn3r.com wrote:

 2.0.5… I'm upgrading to 2.0.9 now just to rule this out….

 I can give you the full CQL for the table, but I can't seem to reproduce
 it without my entire app being included.

 If I execute the CQL manually, it works… which is what makes this so
 weird.


 On Wed, Aug 13, 2014 at 1:11 PM, DuyHai Doan doanduy...@gmail.com
 wrote:

 Can you just give the C* version and the complete DDL script to
 reproduce the issue ?


 On Wed, Aug 13, 2014 at 10:08 PM, Kevin Burton bur...@spinn3r.com
 wrote:

 I'm tracking down a weird bug and was wondering if you guys had any
 feedback.

 I'm trying to create ten tables programatically.. .

 The first one I create, for some reason, isn't created.

 The other 9 are created without a problem.

 Im doing this with the datastax driver's session.execute().

 No exceptions are thrown.

 I read the tables back out, and I have 9 of them, but not the first
 one.

 I can confirm that the table isn't there because I'm doing a

   select * from foo0 limit 1

 and it gives me an unconfigured column family exception.

 so it looks like cassandra is just silently not creating the table.

 This is just in my junit harness for now.  So it's one cassandra node
 so there shouldn't be an issue with schema disagreement.

 Kind of stumped here so any suggestion would help.

 --

  Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com





 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




Re: Table not being created but no error.

2014-08-13 Thread Kevin Burton
ah.. good idea. I'll try that now.


On Wed, Aug 13, 2014 at 1:36 PM, DuyHai Doan doanduy...@gmail.com wrote:

 Maybe tracing the requests ? (just the one creating the schema of course)


 On Wed, Aug 13, 2014 at 10:30 PM, Kevin Burton bur...@spinn3r.com wrote:

 yeah… problem still exists on 2.0.9


 On Wed, Aug 13, 2014 at 1:26 PM, Kevin Burton bur...@spinn3r.com wrote:

 and I'm certain that the CQL is executing… because I get a ResultSet
 back and verified that the CQL is correct.


 On Wed, Aug 13, 2014 at 1:26 PM, Kevin Burton bur...@spinn3r.com
 wrote:

 2.0.5… I'm upgrading to 2.0.9 now just to rule this out….

 I can give you the full CQL for the table, but I can't seem to
 reproduce it without my entire app being included.

 If I execute the CQL manually, it works… which is what makes this so
 weird.


 On Wed, Aug 13, 2014 at 1:11 PM, DuyHai Doan doanduy...@gmail.com
 wrote:

 Can you just give the C* version and the complete DDL script to
 reproduce the issue ?


 On Wed, Aug 13, 2014 at 10:08 PM, Kevin Burton bur...@spinn3r.com
 wrote:

 I'm tracking down a weird bug and was wondering if you guys had any
 feedback.

 I'm trying to create ten tables programatically.. .

 The first one I create, for some reason, isn't created.

 The other 9 are created without a problem.

 Im doing this with the datastax driver's session.execute().

 No exceptions are thrown.

 I read the tables back out, and I have 9 of them, but not the first
 one.

 I can confirm that the table isn't there because I'm doing a

   select * from foo0 limit 1

 and it gives me an unconfigured column family exception.

 so it looks like cassandra is just silently not creating the table.

 This is just in my junit harness for now.  So it's one cassandra node
 so there shouldn't be an issue with schema disagreement.

 Kind of stumped here so any suggestion would help.

 --

  Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com





 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com





-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
https://plus.google.com/102718274791889610666/posts
http://spinn3r.com


RE: Number of columns per row for composite columns?

2014-08-13 Thread Mohammed Guller
4


Mohammed

From: hlqv [mailto:hlqvu...@gmail.com]
Sent: Tuesday, August 12, 2014 11:44 PM
To: user@cassandra.apache.org
Subject: Re: Number of columns per row for composite columns?

For more specifically, I declared a column family

create column family Column_Family
with key_validation_class = UTF8Type
and comparator = 'CompositeType(LongType,UTF8Type)'
and default_validation_class = UTF8Type;
Number of columns will depend on only first column name in composite column or 
both.
For example,
With row key  = 1, I have data
1 | 20140813, user1 | value1
1 | 20140813, user2 | value2
1 | 20140814, user1 | value3
1 | 20140814, user2 | value4
(1: rowkey, 20140813, user1: composite column, value1 : the value of column)

So the number of columns of row key 1 will be 2 or 4? (2 for 20140813 and 
20140814, 4 for each distinct composite column)
Thank you so much

On 13 August 2014 03:18, Jack Krupansky 
j...@basetechnology.commailto:j...@basetechnology.com wrote:
Your question is a little too tangled for me... Are you asking about rows in a 
partition (some people call that a “storage row”) or columns per row? The 
latter is simply the number of columns that you have declared in your table.

The total number of columns – or more properly, “cells” – in a partition would 
be the number of rows you have inserted in that partition times the number of 
columns you have declared in the table.

If you need to review the terminology:
http://www.datastax.com/dev/blog/does-cql-support-dynamic-columns-wide-rows

-- Jack Krupansky

From: hlqvmailto:hlqvu...@gmail.com
Sent: Tuesday, August 12, 2014 1:13 PM
To: user@cassandra.apache.orgmailto:user@cassandra.apache.org
Subject: Number of columns per row for composite columns?

Hi everyone,
I'm confused with number of columns in a row of Cassandra, as far as I know 
there is 2 billions columns per row. Like that if I have a composite column 
name in each row, for ex: (timestamp, userid), then number of columns per row 
is the number of distinct 'timestamp' or each distinct 'timestamp, userid' is a 
column?



Re: Table not being created but no error.

2014-08-13 Thread Kevin Burton
It still failed.  Tracing shows that the query is being executed.  Just
that the table isn't created.  I did a diff against the two table names and
the only difference is the table name.

I even reversed their creation to see if that fixes it… but it still fails.
 Very very weird.


On Wed, Aug 13, 2014 at 1:38 PM, Kevin Burton bur...@spinn3r.com wrote:

 ah.. good idea. I'll try that now.


 On Wed, Aug 13, 2014 at 1:36 PM, DuyHai Doan doanduy...@gmail.com wrote:

 Maybe tracing the requests ? (just the one creating the schema of course)


 On Wed, Aug 13, 2014 at 10:30 PM, Kevin Burton bur...@spinn3r.com
 wrote:

 yeah… problem still exists on 2.0.9


 On Wed, Aug 13, 2014 at 1:26 PM, Kevin Burton bur...@spinn3r.com
 wrote:

 and I'm certain that the CQL is executing… because I get a ResultSet
 back and verified that the CQL is correct.


 On Wed, Aug 13, 2014 at 1:26 PM, Kevin Burton bur...@spinn3r.com
 wrote:

 2.0.5… I'm upgrading to 2.0.9 now just to rule this out….

 I can give you the full CQL for the table, but I can't seem to
 reproduce it without my entire app being included.

 If I execute the CQL manually, it works… which is what makes this so
 weird.


 On Wed, Aug 13, 2014 at 1:11 PM, DuyHai Doan doanduy...@gmail.com
 wrote:

 Can you just give the C* version and the complete DDL script to
 reproduce the issue ?


 On Wed, Aug 13, 2014 at 10:08 PM, Kevin Burton bur...@spinn3r.com
 wrote:

 I'm tracking down a weird bug and was wondering if you guys had any
 feedback.

 I'm trying to create ten tables programatically.. .

 The first one I create, for some reason, isn't created.

 The other 9 are created without a problem.

 Im doing this with the datastax driver's session.execute().

 No exceptions are thrown.

 I read the tables back out, and I have 9 of them, but not the first
 one.

 I can confirm that the table isn't there because I'm doing a

   select * from foo0 limit 1

 and it gives me an unconfigured column family exception.

 so it looks like cassandra is just silently not creating the table.

 This is just in my junit harness for now.  So it's one cassandra
 node so there shouldn't be an issue with schema disagreement.

 Kind of stumped here so any suggestion would help.

 --

  Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com





 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com





 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
https://plus.google.com/102718274791889610666/posts
http://spinn3r.com


Re: Table not being created but no error.

2014-08-13 Thread Jonathan Haddad
Can you provide the code that you use to create the table?  This feels like
code error rather than a database bug.


On Wed, Aug 13, 2014 at 1:26 PM, Kevin Burton bur...@spinn3r.com wrote:

 2.0.5… I'm upgrading to 2.0.9 now just to rule this out….

 I can give you the full CQL for the table, but I can't seem to reproduce
 it without my entire app being included.

 If I execute the CQL manually, it works… which is what makes this so weird.


 On Wed, Aug 13, 2014 at 1:11 PM, DuyHai Doan doanduy...@gmail.com wrote:

 Can you just give the C* version and the complete DDL script to reproduce
 the issue ?


 On Wed, Aug 13, 2014 at 10:08 PM, Kevin Burton bur...@spinn3r.com
 wrote:

 I'm tracking down a weird bug and was wondering if you guys had any
 feedback.

 I'm trying to create ten tables programatically.. .

 The first one I create, for some reason, isn't created.

 The other 9 are created without a problem.

 Im doing this with the datastax driver's session.execute().

 No exceptions are thrown.

 I read the tables back out, and I have 9 of them, but not the first one.

 I can confirm that the table isn't there because I'm doing a

   select * from foo0 limit 1

 and it gives me an unconfigured column family exception.

 so it looks like cassandra is just silently not creating the table.

 This is just in my junit harness for now.  So it's one cassandra node so
 there shouldn't be an issue with schema disagreement.

 Kind of stumped here so any suggestion would help.

 --

  Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com





 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




-- 
Jon Haddad
http://www.rustyrazorblade.com
skype: rustyrazorblade


Re: Table not being created but no error.

2014-08-13 Thread Kevin Burton
Looks like C* isn't creating the table with the lowest value integer
suffix.  I created more tables and even if I reverse their order, the one
with the lowest integer suffix isn't being created.

The CQL is being sent to the server, executed (confirmed via the trace),
but when I read the tables back out, or run a SELECT against it, it will
fail.

Hm…


On Wed, Aug 13, 2014 at 1:52 PM, Kevin Burton bur...@spinn3r.com wrote:

 It still failed.  Tracing shows that the query is being executed.  Just
 that the table isn't created.  I did a diff against the two table names and
 the only difference is the table name.

 I even reversed their creation to see if that fixes it… but it still
 fails.  Very very weird.


 On Wed, Aug 13, 2014 at 1:38 PM, Kevin Burton bur...@spinn3r.com wrote:

 ah.. good idea. I'll try that now.


 On Wed, Aug 13, 2014 at 1:36 PM, DuyHai Doan doanduy...@gmail.com
 wrote:

 Maybe tracing the requests ? (just the one creating the schema of course)


 On Wed, Aug 13, 2014 at 10:30 PM, Kevin Burton bur...@spinn3r.com
 wrote:

 yeah… problem still exists on 2.0.9


 On Wed, Aug 13, 2014 at 1:26 PM, Kevin Burton bur...@spinn3r.com
 wrote:

 and I'm certain that the CQL is executing… because I get a ResultSet
 back and verified that the CQL is correct.


 On Wed, Aug 13, 2014 at 1:26 PM, Kevin Burton bur...@spinn3r.com
 wrote:

 2.0.5… I'm upgrading to 2.0.9 now just to rule this out….

 I can give you the full CQL for the table, but I can't seem to
 reproduce it without my entire app being included.

 If I execute the CQL manually, it works… which is what makes this so
 weird.


 On Wed, Aug 13, 2014 at 1:11 PM, DuyHai Doan doanduy...@gmail.com
 wrote:

 Can you just give the C* version and the complete DDL script to
 reproduce the issue ?


 On Wed, Aug 13, 2014 at 10:08 PM, Kevin Burton bur...@spinn3r.com
 wrote:

 I'm tracking down a weird bug and was wondering if you guys had any
 feedback.

 I'm trying to create ten tables programatically.. .

 The first one I create, for some reason, isn't created.

 The other 9 are created without a problem.

 Im doing this with the datastax driver's session.execute().

 No exceptions are thrown.

 I read the tables back out, and I have 9 of them, but not the first
 one.

 I can confirm that the table isn't there because I'm doing a

   select * from foo0 limit 1

 and it gives me an unconfigured column family exception.

 so it looks like cassandra is just silently not creating the table.


 This is just in my junit harness for now.  So it's one cassandra
 node so there shouldn't be an issue with schema disagreement.

 Kind of stumped here so any suggestion would help.

 --

  Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com





 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com





 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
https://plus.google.com/102718274791889610666/posts
http://spinn3r.com


Re: Table not being created but no error.

2014-08-13 Thread Robert Coli
On Wed, Aug 13, 2014 at 1:59 PM, Kevin Burton bur...@spinn3r.com wrote:

 Looks like C* isn't creating the table with the lowest value integer
 suffix.  I created more tables and even if I reverse their order, the one
 with the lowest integer suffix isn't being created.

 The CQL is being sent to the server, executed (confirmed via the trace),
 but when I read the tables back out, or run a SELECT against it, it will
 fail.


File a JIRA, this seems highly likely to be a bug.

=Rob


Re: Table not being created but no error.

2014-08-13 Thread Kevin Burton
Honestly, I'm hoping it's code rather than a database bug (and normally I'd
agree with you).

I'm working on a reduction to see if I can get a basic unit test.




On Wed, Aug 13, 2014 at 1:58 PM, Jonathan Haddad j...@jonhaddad.com wrote:

 Can you provide the code that you use to create the table?  This feels
 like code error rather than a database bug.


 On Wed, Aug 13, 2014 at 1:26 PM, Kevin Burton bur...@spinn3r.com wrote:

 2.0.5… I'm upgrading to 2.0.9 now just to rule this out….

 I can give you the full CQL for the table, but I can't seem to reproduce
 it without my entire app being included.

 If I execute the CQL manually, it works… which is what makes this so
 weird.


 On Wed, Aug 13, 2014 at 1:11 PM, DuyHai Doan doanduy...@gmail.com
 wrote:

 Can you just give the C* version and the complete DDL script to
 reproduce the issue ?


 On Wed, Aug 13, 2014 at 10:08 PM, Kevin Burton bur...@spinn3r.com
 wrote:

 I'm tracking down a weird bug and was wondering if you guys had any
 feedback.

 I'm trying to create ten tables programatically.. .

 The first one I create, for some reason, isn't created.

 The other 9 are created without a problem.

 Im doing this with the datastax driver's session.execute().

 No exceptions are thrown.

 I read the tables back out, and I have 9 of them, but not the first
 one.

 I can confirm that the table isn't there because I'm doing a

   select * from foo0 limit 1

 and it gives me an unconfigured column family exception.

 so it looks like cassandra is just silently not creating the table.

 This is just in my junit harness for now.  So it's one cassandra node
 so there shouldn't be an issue with schema disagreement.

 Kind of stumped here so any suggestion would help.

 --

  Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com





 --

 Founder/CEO Spinn3r.com
 Location: *San Francisco, CA*
 blog: http://burtonator.wordpress.com
 … or check out my Google+ profile
 https://plus.google.com/102718274791889610666/posts
 http://spinn3r.com




 --
 Jon Haddad
 http://www.rustyrazorblade.com
 skype: rustyrazorblade




-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
https://plus.google.com/102718274791889610666/posts
http://spinn3r.com


Re: Lightweight transaction (paxos) vs double check.

2014-08-13 Thread Robert Coli
On Wed, Aug 13, 2014 at 12:28 PM, Wayne Schroeder 
wschroe...@pinsightmedia.com wrote:

  Knowing the price would help weigh the consequences of using them
 though.  I just don’t want to implement a check/write/double check solution
 if it ends up being actually more expensive in total operations and time
 than simply using LWT.  Any thoughts in that regard?


My understanding is that LWT performance currently degrades over time as
the history list is not effectively compacted away :

https://issues.apache.org/jira/browse/CASSANDRA-7753 (Unresolved; ): Level
compaction for Paxos table

This sort of class of issue reflects the general immaturity of LWT,
especially as relates to performance after sustained high volume usage.

My presumption is that LWT will perform in the same order of magnitude as
your check/write/double check solution, but will be slightly less error
prone. Were I in your case and had a hard requirement for this behavior and
to do it in Cassandra, I would performance test LWT robustly and give them
a shot.

=Rob


How to prevent the removed DC comes back automactically?

2014-08-13 Thread Lu, Boying
Hi, All,

We are using Cassandra 2.0.7 in a multi DCs environments.  If a connected DC is 
powered off, we use the 'nodetool removenode' command to remove it from the 
connected DCs.
But we found that once the disconnected DC is powered on, it will connect to 
other DCs automatically.

How can we prevent a disconnected DC from coming back automatically?

Thanks a lot

Boying