How is the underlying CQL native binary protocol implemented?

2014-12-22 Thread 孔嘉林
Hi, I am curious about the underlying implementation of the CQL native binary protocol. It is also a RPC protocol, right? But how can it outperform thrift as they are both RPC protocol? The Cassandra driver has already implemented this native binary protocol, could anyone tell me which part of the

Re: CQL3 vs Thrift

2014-12-22 Thread Ryan Svihla
Don't static columns get you what you want? http://www.datastax.com/documentation/cql/3.1/cql/cql_reference/refStaticCol.html On Dec 22, 2014 10:50 PM, "David Broyles" wrote: > Although I used Cassandra 1.0.X extensively, I'm new to CQL3. Pages such > as http://wiki.apache.org/cassandra/Client

CQL3 vs Thrift

2014-12-22 Thread David Broyles
Although I used Cassandra 1.0.X extensively, I'm new to CQL3. Pages such as http://wiki.apache.org/cassandra/ClientOptionsThrift suggest new projects should use CQL3. I'm wondering, however, if there are certain use cases not well covered by CQL3. Consider the standard timeseries example: CREAT

Re: Store counter with non-counter column in the same column family?

2014-12-22 Thread Ryan Svihla
Spark can count a regular table. Spark sql would be the easiest thing to get started with most likely. https://github.com/datastax/spark-cassandra-connector/blob/master/doc/2_loading.md Go down to the spark sql section to get some idea of the ease of use. On Dec 22, 2014 10:00 PM, "ziju feng" wr

Re: Store counter with non-counter column in the same column family?

2014-12-22 Thread ziju feng
Thanks for the advise, I'll definitely take a look at how Spark works and how it can help with counting. One last question: My current implementation of counting is 1) increment counter 2) read counter immediately after the write 3) write counts to multiple tables for different query paths and sol

Re: Store counter with non-counter column in the same column family?

2014-12-22 Thread Ryan Svihla
increment wouldn't be idempotent from the client unless you knew the count at the time of the update (which you could do with LWT but that has pretty harsh performance), that particular jira is about how they're laid out and avoiding race conditions between nodes, which was resolved in 2.1 beta 1 (

Re: Store counter with non-counter column in the same column family?

2014-12-22 Thread ziju feng
I just skimmed through JIRA and it seems there has been some effort to make update idempotent. Perhaps the problem can be fixed in the near future? Anyway, what is the current best practice for such use case? (Counting and displaying counts in

Re: Connect to C* instance inside virtualbox

2014-12-22 Thread Ryan Svihla
so what is the IP address of that interface? attempt to use cqlsh with whatever that address is, otherwise it will default to localhost. On Mon, Dec 22, 2014 at 8:55 PM, Kai Wang wrote: > I might misread the comment but I thought I could only set rpc_interface > or rpc_address but not both. So I

Re: Connect to C* instance inside virtualbox

2014-12-22 Thread Kai Wang
I might misread the comment but I thought I could only set rpc_interface or rpc_address but not both. So I didn't set rpc_addresa. Will double check tomorrow. Thanks. On Dec 22, 2014 9:17 PM, "Ryan Svihla" wrote: > if this helps..what did you change rpc_address to? > > On Mon, Dec 22, 2014 at 8:1

Re: Connect to C* instance inside virtualbox

2014-12-22 Thread Ryan Svihla
right that's localhost, you have to change it to match the ip of whatever you changed rpc_address too On Mon, Dec 22, 2014 at 8:07 PM, Kai Wang wrote: > on the guest where C* is installed, I run cqlsh without any argument. When > I enabled rpc_interface, cqlsh returned can't connect 127.0.0.1:90

Re: Connect to C* instance inside virtualbox

2014-12-22 Thread Ryan Svihla
if this helps..what did you change rpc_address to? On Mon, Dec 22, 2014 at 8:15 PM, Ryan Svihla wrote: > right that's localhost, you have to change it to match the ip of whatever > you changed rpc_address too > > On Mon, Dec 22, 2014 at 8:07 PM, Kai Wang wrote: > >> on the guest where C* is ins

Re: Connect to C* instance inside virtualbox

2014-12-22 Thread Kai Wang
on the guest where C* is installed, I run cqlsh without any argument. When I enabled rpc_interface, cqlsh returned can't connect 127.0.0.1:9042. On Mon, Dec 22, 2014 at 9:01 PM, Ryan Svihla wrote: > totally depends on how the implementation is handled in virtualbox, I'm > assuming you're connect

Re: Connect to C* instance inside virtualbox

2014-12-22 Thread Ryan Svihla
totally depends on how the implementation is handled in virtualbox, I'm assuming you're connecting to an IP that makes sense on the guest (ie nodetool -h 192.168.1.100 and cqlsh 192.168.1.100, replace that ip with whatever what you expect)? On Mon, Dec 22, 2014 at 7:58 PM, Kai Wang wrote: > Ryan

Re: Connect to C* instance inside virtualbox

2014-12-22 Thread Kai Wang
Ryan, Actually after I made the change, I was able to connect to C* from host but not from guest anymore. Is this expected? On Mon, Dec 22, 2014 at 8:53 PM, Kai Wang wrote: > Ryan, > > it works! I saw this new config mentioned in Cassandra summit 2014 but > didn't realize it applied in my case.

Re: Connect to C* instance inside virtualbox

2014-12-22 Thread Kai Wang
Ryan, it works! I saw this new config mentioned in Cassandra summit 2014 but didn't realize it applied in my case. Thanks. On Mon, Dec 22, 2014 at 4:43 PM, Ryan Svihla wrote: > what is rpc_address set to in cassandra.yaml? my gut is localhost, set it > to the interface that communicates betwee

Re: Connect to C* instance inside virtualbox

2014-12-22 Thread Ryan Svihla
what is rpc_address set to in cassandra.yaml? my gut is localhost, set it to the interface that communicates between host and guest. On Mon, Dec 22, 2014 at 3:38 PM, Kai Wang wrote: > I installed C* in virtualbox via vagrant. Both 9160 and 9042 ports are > forwarded from guest to host. I can tel

Connect to C* instance inside virtualbox

2014-12-22 Thread Kai Wang
I installed C* in virtualbox via vagrant. Both 9160 and 9042 ports are forwarded from guest to host. I can telnet to those two ports from host to guest. But from my host, I can't connect to C* using cassandra-cli or cqlsh. My host is Windows 7 64bit and guest is CentOS 6.5. Is there anything speci

Cassandra Data Model for supporting queries in multiple columns

2014-12-22 Thread klsateesh
Hi All, We are in the process of testing Cassandra for our App and currently our data is in Oracle. Currently we support where and group by clauses on multiple columns. Once i import the data into Cassandra i can only include the columns in where clause if that column is either part of primar

Repair failing with Lost Notification

2014-12-22 Thread Allan Carroll
Hi all,  Since upgrading from 1.2.13 to 2.0.10 last week, we’ve been having trouble with repairs. nodetool repair keeps returning "Lost notification. You should check server log for repair status of keyspace.” It usually happens in the middle of the repair. Yet, the logs on the node show the re

Re: CF performance suddenly degraded

2014-12-22 Thread Ryan Svihla
There can be many root causes. Would need a lot more information such as node hardware specs, cf histograms on the table, tpstats,GC settings (Max heap, parnew, JVM version) and logs with specifically any ERROR, WARN, or GCInspector messages As a start a simple trace of the query in question is pr

CF performance suddenly degraded

2014-12-22 Thread Paolo Crosato
Hi, I declared this CF: CREATE TABLE timesliceunitstate ( day timestamp, unitbuckets text, PRIMARY KEY (day) ); unitbuckets is a text column holding a fairly big amount of data, around 30 MB of json text per row. The table is holding 30 rows, I'm running cassandra 2.0.8 on a 3 nodes c

Re: Multi DC informations (sync)

2014-12-22 Thread Ryan Svihla
In effect you're saying "I require data centers to be consistent at write time except when they can't". Basically you've gotten the worst of both worlds and bad performance during healthy times and less than desired consistency during unhealthy times. I believe you may have some misconceptions abo

Re: Replacing nodes disks

2014-12-22 Thread Jan Kesten
Hi, even if recovery like a dead node would work - backup and restore (like my way with an usb docking station) will be much faster and produce less IO and CPU impact on your cluster. Keep that in Mind :-) Cheers, Jan Am 22.12.2014 um 10:58 schrieb Or Sher: Great. replace_address works gre

Re: Multi DC informations (sync)

2014-12-22 Thread Alain RODRIGUEZ
@Jonathan. I read my previous message. GC grace period is 10 days (default) not 10 sec, my bad. Repairs are run every 7 days. I should be fine regarding this. @Ryan Indeed I might want to use Each_Quorum with a customised fallback to local_quorum + alerting in case of partition (like a whole clus

Re: installing cassandra

2014-12-22 Thread Ryan Svihla
TLDR Can I suggest as a good middle road to at least use something like csshx https://code.google.com/p/csshx/ ? Details Having worked with a huge variety of skill sets and cluster sizes, I'd argue "it depends" a lot on team skills, especially when problems occur. Point being even with small clu

Re: installing cassandra

2014-12-22 Thread Eric Stevens
If you're just trying to get your feet wet with distributed software, and your node count is going to be reasonably low and won't grow any time soon, it's probably easier to just install it yourself rather than trying to also learn how to use software deployment technologies like puppet or chef. Th

Re: Replacing nodes disks

2014-12-22 Thread Eric Stevens
You should be able to use Cassandra's built in tooling for sure. But just be aware that restoring from a backup of the data will be a lot faster and won't introduce any stress on the existing cluster. Repair and replace operations aren't free to the other nodes, so an offline backup and restore is

Re: Store counter with non-counter column in the same column family?

2014-12-22 Thread Ryan Svihla
You can cheat it by using the non counter column as part of your primary key (clustering column specifically) but the cases where this could work are limited and the places this is a good idea are even more rare. As for using counters in batches are already a not well regarded concept and counter

Re: Store counter with non-counter column in the same column family?

2014-12-22 Thread DuyHai Doan
It's not possible to mix counter and non counter columns because currently the semantic of counter is only increment/decrement (thus NOT idempotent) and requires some special handling compared to other C* columns. On Mon, Dec 22, 2014 at 11:33 AM, ziju feng wrote: > ​I was wondering if there is

Store counter with non-counter column in the same column family?

2014-12-22 Thread ziju feng
​I was wondering if there is plan to allow ​creating counter column and standard column in the same table. Here is my use case: I want to use counter to count how many users like a given item in my application. The like count needs to be returned along with details of item in query. To support que

Re: Replacing nodes disks

2014-12-22 Thread Or Sher
Great. replace_address works great. >From some reason I thought it won't work with the same IP. On Sun, Dec 21, 2014 at 5:14 PM, Ryan Svihla wrote: > Cassandra is designed to rebuild a node from other nodes, whether a node > is dead by your hand because you killed it or fate is irrelevant, the