Re: Connected file list in Cassandra

2012-07-11 Thread David McNelis
I would use something other than the page itself as the key.  Maybe a
filename, something smaller.

Then you could use a LongType comparator for the columns and use the page
number for the column name, the value being the contents of the files.

On Wed, Jul 11, 2012 at 1:34 PM, Tomek Hankus  wrote:

> Hi,
> at the moment I'm doing research about keeping "linked/connected file
> list" in Cassandra- e.g. PDF file cut into pages (multiple PDFs) where
> first page is connected to second, second to third etc.
> This "files connection/link" is not specified. Main goal is to be able to
> get all "linked files" (the whole PDF/ all pages) while having only key to
> first file (page).
>
> Is there any Cassandra tool/feature which could help me to do that or the
> only way is to create some wrapper holding keys relations?
>
>
> Tom H
>
>
>


Secondary index impact on write performance

2012-08-04 Thread David McNelis
Morning,

Was reading up on secondary indexes and on the Datastax post about them, it
mentions the additional management overhead, and also that if you alter an
existing column family, that data will be updated in the background.  But
how do secondary indexes affect write performance?

If the answer is "it doesn't", then how do brand new records get located by
a subsequent indexed query?

If someone has a link to a post with some of this info, that would be
awesome.

David


Re: Secondary index impact on write performance

2012-08-04 Thread David McNelis
Thanks. That was what I expected, but wanted to confirm.
On Aug 4, 2012 11:24 AM, "Dave Brosius"  wrote:

> There is a second (system managed) column family for each secondary index,
> so any write to a field that is indexed causes two writes, one to the main
> column family, and another to the index column family, where in this index
> column family the key is the value of the secondary column, and the value
> is the key of the original row.
>
>
>
> On 08/04/2012 11:40 AM, David McNelis wrote:
>
>> Morning,
>>
>> Was reading up on secondary indexes and on the Datastax post about them,
>> it mentions the additional management overhead, and also that if you alter
>> an existing column family, that data will be updated in the background.
>>  But how do secondary indexes affect write performance?
>>
>> If the answer is "it doesn't", then how do brand new records get located
>> by a subsequent indexed query?
>>
>> If someone has a link to a post with some of this info, that would be
>> awesome.
>>
>> David
>>
>
>


CQL connections

2012-08-10 Thread David McNelis
In using CQL (the python library, at least), I didn't see a way to pass in
multiple nodes as hosts.  With other libraries (like Hector and Pycassa) I
can set multiple hosts and my app will work with anyone on that list.  Is
there something similar going on in the background with CQL?

If not, then is anyone aware of plans to do so?


Cleanup and old files

2013-12-29 Thread David McNelis
I am currently running a cluster with 1.2.8.  One of my larger column
families on one of my nodes has keyspace-tablename-ic--Data.db with a
modify date in August.

Since august we have added several nodes (with vnodes), with the same
number of vnodes as all the existing nodes.

As a result, (we've since gone from 15 to 21 nodes), then ~32% of my data
of the original 15 nodes should have been essentially balanced out to the 6
new nodes.  (1/15 + 1/16 +  1/21).

When I run a cleanup, however, the old data files never get updated, and I
can't believe that they all should have remained the same.

The only recently updated files in that data directory are secondary index
sstable files.  Am I doing something wrong here?  Am I thinking about this
wrong?

David


Re: Cleanup and old files

2013-12-30 Thread David McNelis
I see the SSTable in this log statement:   Stream context metadata (along
with a bunch of other files)but I do not see it in the list of files
"Opening" (which I see quite a bit of, as expected).

Safe to try moving that file off server (to a backup location)?  If I tried
this, would I want to shut down the node first and monitor startup to see
if it all of a sudden is 'missing' something / throws an error then?


On Mon, Dec 30, 2013 at 9:26 PM, Aaron Morton wrote:

> Check the SSTable is actually in use by cassandra, if it’s missing a
> component or otherwise corrupt it will not be opened at run time and so not
> included in all the fun games the other SSTables get to play.
>
> If you have the last startup in the logs check for an “Opening… “ message
> or an ERROR about the file.
>
> Cheers
>
> -
> Aaron Morton
> New Zealand
> @aaronmorton
>
> Co-Founder & Principal Consultant
> Apache Cassandra Consulting
> http://www.thelastpickle.com
>
> On 30/12/2013, at 1:28 pm, David McNelis  wrote:
>
> I am currently running a cluster with 1.2.8.  One of my larger column
> families on one of my nodes has keyspace-tablename-ic--Data.db with a
> modify date in August.
>
> Since august we have added several nodes (with vnodes), with the same
> number of vnodes as all the existing nodes.
>
> As a result, (we've since gone from 15 to 21 nodes), then ~32% of my data
> of the original 15 nodes should have been essentially balanced out to the 6
> new nodes.  (1/15 + 1/16 +  1/21).
>
> When I run a cleanup, however, the old data files never get updated, and I
> can't believe that they all should have remained the same.
>
> The only recently updated files in that data directory are secondary index
> sstable files.  Am I doing something wrong here?  Am I thinking about this
> wrong?
>
> David
>
>
>


Re:

2014-03-12 Thread David McNelis
Not knowing anything about your data structure (to expand on what Edward
said), you could be running into something where you've got some hot keys
that are getting the majority of writes during those heavily loads more
specifically I might look for a single key that you're writing, since
you're RF=3 and you have 3 nodes specifically that are causing problems.



On Wed, Mar 12, 2014 at 7:28 PM, Russ Bradberry wrote:

> I wouldn't go above 8G unless you have a very powerful machine that can
> keep the GC pauses low.
>
> Sent from my iPhone
>
> On Mar 12, 2014, at 7:11 PM, Edward Capriolo 
> wrote:
>
> That is too much ram for cassandra make that 6g to 10g.
>
> The uneven perf could be because your requests do not shard evenly.
>
> On Wednesday, March 12, 2014, Batranut Bogdan  wrote:
> > Hello all,
> >
> > The environment:
> >
> > I have a 6 node Cassandra cluster. On each node I have:
> > - 32 G RAM
> > - 24 G RAM for cassa
> > - ~150 - 200 MB/s disk speed
> > - tomcat 6 with axis2 webservice that uses the datastax java driver to
> make
> > asynch reads / writes
> > - replication factor for the keyspace is 3
> >
> > All nodes in the same data center
> > The clients that read / write are in the same datacenter so network is
> > Gigabit.
> >
> > Writes are performed via exposed methods from Axis2 WS . The Cassandra
> Java
> > driver uses the round robin load balancing policy so all the nodes in the
> > cluster should be hit with write requests under heavy write or read load
> > from multiple clients.
> >
> > I am monitoring all nodes with JConsole from another box.
> >
> > The problem:
> >
> > When wrinting to a particular column family, only 3 nodes have high CPU
> load
> > ~ 80 - 99 %. The remaining 3 are at ~2 - 10 % CPU. During writes, reads
> > timeout.
> >
> > I need more speed for both writes of reads. Due to the fact that 3 nodes
> > barely have CPU activity leads me to think that the whole potential for
> C*
> > is not touched.
> >
> > I am running out of ideas...
> >
> > If further details about the environment I can provide them.
> >
> >
> > Thank you very much.
>
> --
> Sorry this was sent from mobile. Will do less grammar and spell check than
> usual.
>
>


Re: VPC AWS

2014-06-05 Thread David McNelis
A general thought, if you're using AWS for this, I'd strongly recommend you
consider using OpsWorks and custom chef recipes for your node deployment if
its an option for you.  The easy of provisioning new nodes without the need
for snapshotting is certainly worth the hassle, and there are already
several Cassandra chef recipes available with a little searching.

David


On Thu, Jun 5, 2014 at 9:26 AM, William Oberman 
wrote:

> I was making assumptions (sorry!), namely the goal to switching to vpc
> was getting "backend resources" (like cassandra) off the public internet.
>
> Will
>
> On Thursday, June 5, 2014, Alain RODRIGUEZ  wrote:
>
>> I think you can define VPC subnet to be public (to have public + private
>> IPs) or private only.
>>
>> Any insight regarding snitches ? What snitch do you guys use ?
>>
>>
>> 2014-06-05 15:06 GMT+02:00 William Oberman :
>>
>>> I don't think traffic will flow between "classic" ec2 and vpc directly.
>>> There is some kind of gateway bridge instance that sits between, acting as
>>> a NAT.   I would think that would cause new challenges for:
>>> -transitions
>>> -clients
>>>
>>> Sorry this response isn't heavy on content!  I'm curious how this thread
>>> goes...
>>>
>>> Will
>>>
>>> On Thursday, June 5, 2014, Alain RODRIGUEZ  wrote:
>>>
 Hi guys,

 We are going to move from a cluster made of simple Amazon EC2 servers
 to a VPC cluster. We are using Cassandra 1.2.11 and I have some questions
 regarding this switch and the Cassandra configuration inside a VPC.

 Actually I found no documentation on this topic, but I am quite sure
 that some people are already using VPC. If you can point me to any
 documentation regarding VPC / Cassandra, it would be very nice of you. We
 have only one DC for now, but we need to remain multi DC compatible, since
 we will add DC very soon.

 Else, I would like to know if I should keep using EC2MultiRegionSnitch
 or change the snitch to anything else.

 What about broadcast/listen ip, seeds...?

 We currently use public ip as for broadcast address and for seeds. We
 use private ones for listen address. Machines inside the VPC will only have
 private IP AFAIK. Should I keep using a broadcast address ?

  Is there any other incidence when switching to a VPC ?

 Sorry if the topic was already discussed, I was unable to find any
 useful information...

>>>
>>>
>>> --
>>> Will Oberman
>>> Civic Science, Inc.
>>> 6101 Penn Avenue, Fifth Floor
>>> Pittsburgh, PA 15206
>>> (M) 412-480-7835
>>> (E) ober...@civicscience.com
>>>
>>
>>
>
> --
> Will Oberman
> Civic Science, Inc.
> 6101 Penn Avenue, Fifth Floor
> Pittsburgh, PA 15206
> (M) 412-480-7835
> (E) ober...@civicscience.com
>


Setting up cluster and nodetool ring in 0.8.0

2011-06-03 Thread David McNelis
I want to make sure I'm not seeing things from a weird perspective.  I have
two Cassandra instances where one is set to be the seed, with autobootstap
disabled and its seed being 127.0.0.1.

The second instance has autobootstrap enabled and the seed IP set to the IP
of the first node.

I start the first node, then the second, with no errors.  However, when I
run:

bin/nodetool -h localhost ring

My output shows me only the local machine in my ring.  When I run:

bin/nodetool -h localhost join seedNodeIP

It tells me I'm already a part of the ring.

My question is which is correct?  I thought, from the documentation, that
both of my nodes would show up in the ring if I ran 'ring' in nodetool.

This is a new cluster.

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

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


Re: Setting up cluster and nodetool ring in 0.8.0

2011-06-03 Thread David McNelis
Edward,

I change my seed node to use its route-able IP address as its own seed
instead of 127.0.0.1.  I still, however, still see the same results when
running nodetool.

On Fri, Jun 3, 2011 at 11:37 AM, Edward Capriolo wrote:

>
>
> On Fri, Jun 3, 2011 at 12:21 PM, David McNelis  > wrote:
>
>> I want to make sure I'm not seeing things from a weird perspective.  I
>> have two Cassandra instances where one is set to be the seed, with
>> autobootstap disabled and its seed being 127.0.0.1.
>>
>> The second instance has autobootstrap enabled and the seed IP set to the
>> IP of the first node.
>>
>> I start the first node, then the second, with no errors.  However, when I
>> run:
>>
>> bin/nodetool -h localhost ring
>>
>> My output shows me only the local machine in my ring.  When I run:
>>
>> bin/nodetool -h localhost join seedNodeIP
>>
>> It tells me I'm already a part of the ring.
>>
>> My question is which is correct?  I thought, from the documentation, that
>> both of my nodes would show up in the ring if I ran 'ring' in nodetool.
>>
>> This is a new cluster.
>>
>> --
>> *David McNelis*
>> Lead Software Engineer
>> Agentis Energy
>> www.agentisenergy.com
>> o: 630.359.6395
>> c: 219.384.5143
>>
>> *A Smart Grid technology company focused on helping consumers of energy
>> control an often under-managed resource.*
>>
>>
>>
> Do use 127.0.0.1 as a seed (except for single node test clusters) Use a
> route-able ip that other cluster nodes can use to reach that node.
>
>


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

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


Re: Setting up cluster and nodetool ring in 0.8.0

2011-06-03 Thread David McNelis
I might not have set the tokens to 'A' and 'B' respectively, and it didn't
change the results.  Of course, if I'm thinking of the token definitions
incorrectly I wouldn't be surprised.

On Fri, Jun 3, 2011 at 12:14 PM, Konstantin Naryshkin
wrote:

> Did you set the token values for you nodes? I remember having similar
> symptoms when I had a token conflict.
>
> ------
> *From: *"David McNelis" 
> *To: *user@cassandra.apache.org
> *Sent: *Friday, June 3, 2011 5:06:10 PM
> *Subject: *Re: Setting up cluster and nodetool ring in 0.8.0
>
>
> Edward,
>
> I change my seed node to use its route-able IP address as its own seed
> instead of 127.0.0.1.  I still, however, still see the same results when
> running nodetool.
>
> On Fri, Jun 3, 2011 at 11:37 AM, Edward Capriolo wrote:
>
>>
>>
>> On Fri, Jun 3, 2011 at 12:21 PM, David McNelis <
>> dmcne...@agentisenergy.com> wrote:
>>
>>> I want to make sure I'm not seeing things from a weird perspective.  I
>>> have two Cassandra instances where one is set to be the seed, with
>>> autobootstap disabled and its seed being 127.0.0.1.
>>>
>>> The second instance has autobootstrap enabled and the seed IP set to the
>>> IP of the first node.
>>>
>>> I start the first node, then the second, with no errors.  However, when I
>>> run:
>>>
>>> bin/nodetool -h localhost ring
>>>
>>> My output shows me only the local machine in my ring.  When I run:
>>>
>>> bin/nodetool -h localhost join seedNodeIP
>>>
>>> It tells me I'm already a part of the ring.
>>>
>>> My question is which is correct?  I thought, from the documentation, that
>>> both of my nodes would show up in the ring if I ran 'ring' in nodetool.
>>>
>>> This is a new cluster.
>>>
>>> --
>>> *David McNelis*
>>> Lead Software Engineer
>>> Agentis Energy
>>> www.agentisenergy.com
>>> o: 630.359.6395
>>> c: 219.384.5143
>>>
>>> *A Smart Grid technology company focused on helping consumers of energy
>>> control an often under-managed resource.*
>>>
>>>
>>>
>> Do use 127.0.0.1 as a seed (except for single node test clusters) Use a
>> route-able ip that other cluster nodes can use to reach that node.
>>
>>
>
>
> --
> *David McNelis*
> Lead Software Engineer
> Agentis Energy
> www.agentisenergy.com
> o: 630.359.6395
> c: 219.384.5143
>
> *A Smart Grid technology company focused on helping consumers of energy
> control an often under-managed resource.*
>
>
>


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

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


Re: Setting up cluster and nodetool ring in 0.8.0

2011-06-03 Thread David McNelis
Thanks, Jonathan.   Both machines do have the exact same seed list.

On Fri, Jun 3, 2011 at 1:39 PM, Jonathan Ellis  wrote:

> On Fri, Jun 3, 2011 at 11:21 AM, David McNelis
>  wrote:
> > I want to make sure I'm not seeing things from a weird perspective.  I
> have
> > two Cassandra instances where one is set to be the seed, with
> autobootstap
> > disabled and its seed being 127.0.0.1.
> > The second instance has autobootstrap enabled and the seed IP set to the
> IP
> > of the first node.
>
> Seed lists should _always_ be identical on each machine (which implies
> they should _never_ be localhost, in a multinode configuration).
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>



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

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


Re: Setting up cluster and nodetool ring in 0.8.0

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


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

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


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

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


Restarting cluster

2011-06-24 Thread David McNelis
I am running 0.8.0 on CentOS.  I have a 2 nodes in my cluster, one is a
seed, the other is autobootstrapped.

After having an unexpected shutdown of both of the physical machines I am
trying to restart the cluster.  I first started the seed node, it went
through the normal startup process and finished without error.  Once that
was complete I started the second node, again no errors in the log as it was
starting, it started the gossip server, ect.

However when I look at the ring using nodetool, both machines  show their
own status as up, then show the other machine as Down with a state of Normal
and a load of ?.  I have tried restarting the individual nodes in different
orders, waiting a while after restarting a node, but still the 'other' node
always has a status of "down".  nodetool repair [keyspace] did not make any
difference either and nodetool join just told me that the nodes were already
a part of the ring.

I can't imagine this is how it *should* be behaving... is there a piece I'm
missing in terms of getting one node to recognize the other as being Up?

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

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


Re: Restarting cluster

2011-06-24 Thread David McNelis
Running on Centos.

We had a massive power failure and our UPS wasn't up to 48 hours without
power...

In this situation the IP addresses have all stayed the same.  I can still
connect to the "other" node from cli, so I don't think its an issue where
the iptables settings weren't saved and started blocking traffic.

In terms of the log files, the only related line from the log files is
saying:

 INFO [main] 2011-06-24 07:48:44,750 StorageService.java (line 382) Loading
persisted ring state
 INFO [main] 2011-06-24 07:48:44,757 StorageService.java (line 418) Starting
up server gossip

When I turn on debugging and restart the non-seed node I get this line:
DEBUG [WRITE-/192.168.80.XXX] 2011-06-24 08:04:48,798
OutboundTcpConnection.java (line 161) attempting to connect to
/192.168.80.XXX

But no errors after it.


On Fri, Jun 24, 2011 at 7:58 AM, Sasha Dolgy  wrote:

> Normally, no.  What you've done is fine.  What is the environment?
>
> On amazon EC2 for example, the instance could have crashed, a new one
> is brought online and has a different internal IP ...
>
> in the cassandra/logs/system.log are there any messages on the 2nd
> node and how it relates to the seed node?
>
> On Fri, Jun 24, 2011 at 2:49 PM, David McNelis
>  wrote:
> > I am running 0.8.0 on CentOS.  I have a 2 nodes in my cluster, one is a
> > seed, the other is autobootstrapped.
> > After having an unexpected shutdown of both of the physical machines I am
> > trying to restart the cluster.  I first started the seed node, it went
> > through the normal startup process and finished without error.  Once that
> > was complete I started the second node, again no errors in the log as it
> was
> > starting, it started the gossip server, ect.
> > However when I look at the ring using nodetool, both machines  show their
> > own status as up, then show the other machine as Down with a state of
> Normal
> > and a load of ?.  I have tried restarting the individual nodes in
> different
> > orders, waiting a while after restarting a node, but still the 'other'
> node
> > always has a status of "down".  nodetool repair [keyspace] did not make
> any
> > difference either and nodetool join just told me that the nodes were
> already
> > a part of the ring.
> > I can't imagine this is how it *should* be behaving... is there a piece
> I'm
> > missing in terms of getting one node to recognize the other as being Up?
>



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

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


Re: Restarting cluster

2011-06-24 Thread David McNelis
It was port 7000 that was my issue.  I was thinking everything was going off
9160, and hadn't made sure that port was open.

Thanks Sasha and Jonathan.

On Fri, Jun 24, 2011 at 8:42 AM, Jonathan Ellis  wrote:

> Did you try netcat to verify that you can get to the internal port on
> machine X from machine Y?
>
> On Fri, Jun 24, 2011 at 8:20 AM, David McNelis
>  wrote:
> > Running on Centos.
> > We had a massive power failure and our UPS wasn't up to 48 hours without
> > power...
> > In this situation the IP addresses have all stayed the same.  I can still
> > connect to the "other" node from cli, so I don't think its an issue where
> > the iptables settings weren't saved and started blocking traffic.
> > In terms of the log files, the only related line from the log files is
> > saying:
> >  INFO [main] 2011-06-24 07:48:44,750 StorageService.java (line 382)
> Loading
> > persisted ring state
> >  INFO [main] 2011-06-24 07:48:44,757 StorageService.java (line 418)
> Starting
> > up server gossip
> > When I turn on debugging and restart the non-seed node I get this line:
> > DEBUG [WRITE-/192.168.80.XXX] 2011-06-24 08:04:48,798
> > OutboundTcpConnection.java (line 161) attempting to connect to
> > /192.168.80.XXX
> > But no errors after it.
> >
> > On Fri, Jun 24, 2011 at 7:58 AM, Sasha Dolgy  wrote:
> >>
> >> Normally, no.  What you've done is fine.  What is the environment?
> >>
> >> On amazon EC2 for example, the instance could have crashed, a new one
> >> is brought online and has a different internal IP ...
> >>
> >> in the cassandra/logs/system.log are there any messages on the 2nd
> >> node and how it relates to the seed node?
> >>
> >> On Fri, Jun 24, 2011 at 2:49 PM, David McNelis
> >>  wrote:
> >> > I am running 0.8.0 on CentOS.  I have a 2 nodes in my cluster, one is
> a
> >> > seed, the other is autobootstrapped.
> >> > After having an unexpected shutdown of both of the physical machines I
> >> > am
> >> > trying to restart the cluster.  I first started the seed node, it went
> >> > through the normal startup process and finished without error.  Once
> >> > that
> >> > was complete I started the second node, again no errors in the log as
> it
> >> > was
> >> > starting, it started the gossip server, ect.
> >> > However when I look at the ring using nodetool, both machines  show
> >> > their
> >> > own status as up, then show the other machine as Down with a state of
> >> > Normal
> >> > and a load of ?.  I have tried restarting the individual nodes in
> >> > different
> >> > orders, waiting a while after restarting a node, but still the 'other'
> >> > node
> >> > always has a status of "down".  nodetool repair [keyspace] did not
> make
> >> > any
> >> > difference either and nodetool join just told me that the nodes were
> >> > already
> >> > a part of the ring.
> >> > I can't imagine this is how it *should* be behaving... is there a
> piece
> >> > I'm
> >> > missing in terms of getting one node to recognize the other as being
> Up?
> >
> >
> >
> > --
> > David McNelis
> > Lead Software Engineer
> > Agentis Energy
> > www.agentisenergy.com
> > o: 630.359.6395
> > c: 219.384.5143
> > A Smart Grid technology company focused on helping consumers of energy
> > control an often under-managed resource.
> >
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>



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

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


Running cassandra on a Blades + SAN

2011-08-11 Thread David McNelis
Hey folks,

I was wondering if anyone has a cassandra cluster running on a server setup
using blades, with a SAN appliance as the data file storage medium.

I would expect that there would be performance  let-downs  if the SAN was
connected with anything other than a fiber channel, but are there other
drawbacks?  Imagine a system with something along the lines of 12 600G 10k
SAS drives in a single SAN, with a bunch of dual proc, quad core blades as
the hosts.  I would think that we'd have the commitlog live on the blade's
internal drives would allow us to write data with sufficient throughput.

Anyone have any thoughts on a Blade v. Rackable solution for spinning up a
cassandra cluster?

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

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


Partitioning, tokens, and sequential keys

2011-08-16 Thread David McNelis
We are currently running a three node cluster where we assigned the initial
tokens using the Python script that is in the Wiki, and we're currently
using the Random Partitioner, RF=1, Cassandra 0.8 from the Riptano RPM
however we're seeing one node taken on over 60% of the data as we load
data.

Our keys are sequential, and can range from 0 to 2^64, though in practice
we're between 1 and 2,000,000,000, with the current  max around 50,000.   In
order to balance out the  load would we be best served changing our tokens
to make the top and bottom 1/3rd of the node go to the previous and next
nodes respectively, then running nodetool move?

Even if we do that, it would seem that we'd likely continue to run into this
sort of issue as  we  add  additionally data... would we be better served
with a different Partitioner strategy?  Or will we need to very actively
manage our tokens to avoid getting into an unbalanced situation?

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

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


Re: Partitioning, tokens, and sequential keys

2011-08-16 Thread David McNelis
Currently we have the initial_token for the seed node blank, and then the
three tokens we ended  up with are:
56713727820156410577229101238628035242
61396109050359754194262152792166260437
113427455640312821154458202477256070485

I would assume that we'd want to take the node that
is 61396109050359754194262152792166260437 and move it to 0, yes?

In theory that should largely balance out our data... or am I missing
something there?

On Tue, Aug 16, 2011 at 1:54 PM, Jonathan Ellis  wrote:

> what tokens did you end up using?
>
> are you sure it's actually due to different amounts of rows?  have you
> run cleanup and compact to make sure it's not unused data / obsolete
> replicas taking up the space?
>
> On Tue, Aug 16, 2011 at 1:41 PM, David McNelis
>  wrote:
> > We are currently running a three node cluster where we assigned the
> initial
> > tokens using the Python script that is in the Wiki, and we're currently
> > using the Random Partitioner, RF=1, Cassandra 0.8 from the Riptano RPM
> > however we're seeing one node taken on over 60% of the data as we
> load
> > data.
> > Our keys are sequential, and can range from 0 to 2^64, though in practice
> > we're between 1 and 2,000,000,000, with the current  max around 50,000.
> In
> > order to balance out the  load would we be best served changing our
> tokens
> > to make the top and bottom 1/3rd of the node go to the previous and next
> > nodes respectively, then running nodetool move?
> > Even if we do that, it would seem that we'd likely continue to run into
> this
> > sort of issue as  we  add  additionally data... would we be better served
> > with a different Partitioner strategy?  Or will we need to very actively
> > manage our tokens to avoid getting into an unbalanced situation?
> >
> > --
> > David McNelis
> > Lead Software Engineer
> > Agentis Energy
> > www.agentisenergy.com
> > o: 630.359.6395
> > c: 219.384.5143
> > A Smart Grid technology company focused on helping consumers of energy
> > control an often under-managed resource.
> >
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>



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

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


Re: Partitioning, tokens, and sequential keys

2011-08-17 Thread David McNelis
Well, I think what  happened was that we had three tokens generated, 0,
567x, and 1134x... but the way that we read the comments in the yaml file,
we just set the second two nodes with the initial token and left the token
for the seed node  blank.  Then we started the seed node, started the other
 two, and then the seed node took on the 613x token.

One question on nodetool ring, the "owns" refers to how many of the possible
keys each node owns, not the actual node size correct?  So you could
technically have a load of 15gb, 60gb, and 15gb on a three node cluster, but
if you have the tokens set correctly each would own 33.33%.

Thanks.

On Tue, Aug 16, 2011 at 3:33 PM, Jonathan Ellis  wrote:

> Yes, that looks about right.
>
> Totally baffled how the wiki script could spit out those tokens for a
> 3-node cluster.
>
> On Tue, Aug 16, 2011 at 2:04 PM, David McNelis
>  wrote:
> > Currently we have the initial_token for the seed node blank, and then the
> > three tokens we ended  up with are:
> > 56713727820156410577229101238628035242
> > 61396109050359754194262152792166260437
> > 113427455640312821154458202477256070485
> > I would assume that we'd want to take the node that
> > is 61396109050359754194262152792166260437 and move it to 0, yes?
> > In theory that should largely balance out our data... or am I missing
> > something there?
> > On Tue, Aug 16, 2011 at 1:54 PM, Jonathan Ellis 
> wrote:
> >>
> >> what tokens did you end up using?
> >>
> >> are you sure it's actually due to different amounts of rows?  have you
> >> run cleanup and compact to make sure it's not unused data / obsolete
> >> replicas taking up the space?
> >>
> >> On Tue, Aug 16, 2011 at 1:41 PM, David McNelis
> >>  wrote:
> >> > We are currently running a three node cluster where we assigned the
> >> > initial
> >> > tokens using the Python script that is in the Wiki, and we're
> currently
> >> > using the Random Partitioner, RF=1, Cassandra 0.8 from the Riptano RPM
> >> > however we're seeing one node taken on over 60% of the data as we
> >> > load
> >> > data.
> >> > Our keys are sequential, and can range from 0 to 2^64, though in
> >> > practice
> >> > we're between 1 and 2,000,000,000, with the current  max around
> 50,000.
> >> >   In
> >> > order to balance out the  load would we be best served changing our
> >> > tokens
> >> > to make the top and bottom 1/3rd of the node go to the previous and
> next
> >> > nodes respectively, then running nodetool move?
> >> > Even if we do that, it would seem that we'd likely continue to run
> into
> >> > this
> >> > sort of issue as  we  add  additionally data... would we be better
> >> > served
> >> > with a different Partitioner strategy?  Or will we need to very
> actively
> >> > manage our tokens to avoid getting into an unbalanced situation?
> >> >
> >> > --
> >> > David McNelis
> >> > Lead Software Engineer
> >> > Agentis Energy
> >> > www.agentisenergy.com
> >> > o: 630.359.6395
> >> > c: 219.384.5143
> >> > A Smart Grid technology company focused on helping consumers of energy
> >> > control an often under-managed resource.
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Jonathan Ellis
> >> Project Chair, Apache Cassandra
> >> co-founder of DataStax, the source for professional Cassandra support
> >> http://www.datastax.com
> >
> >
> >
> > --
> > David McNelis
> > Lead Software Engineer
> > Agentis Energy
> > www.agentisenergy.com
> > o: 630.359.6395
> > c: 219.384.5143
> > A Smart Grid technology company focused on helping consumers of energy
> > control an often under-managed resource.
> >
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>



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

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


cleanup / move

2011-09-12 Thread David McNelis
While it would certainly be preferable to not run a cleanup and a move  at
the same time on the same node, is there a techincal problem with running a
nodetool move  on a node while a cleanup is running?  Or if its possible to
gracefully kill a cleanup, so that a move can  be run and then cleanup run
after?

We have a node that is almost full and need to move it so that we can shift
its  loadbut it already has a cleanup process running which, instead of
causing less data usage as expected, is  actually growing the amount of
space taken at a pretty fast rate.

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

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


balancing issue with Random partitioner

2011-09-12 Thread David McNelis
We are running the datastax .8 rpm distro.  We have a situation where we
have 4 nodes and each owns 25% of the keys.  However the last node in the
ring does not seem to be  getting much of a load at all.

We are using the random partitioner, we have a total of about 20k keys that
are sequential...

Our nodetool ring  output is currently:

Address DC  RackStatus State   LoadOwns
   Token

   127605887595351923798765477786913079296
10.181.138.167  datacenter1 rack1   Up Normal  99.37 GB
 25.00%  0
192.168.100.6   datacenter1 rack1   Up Normal  106.25 GB
25.00%  42535295865117307932921825928971026432
10.181.137.37   datacenter1 rack1   Up Normal  77.7 GB
25.00%  85070591730234615865843651857942052863
192.168.100.5   datacenter1 rack1   Up Normal  494.67 KB
25.00%  127605887595351923798765477786913079296


Nothing is running on netstats on .37 or .5.

I understand that the nature of the beast would cause the load to differ
between the nodes...but I wouldn't expect it to be so drastic.  We had the
token for .37 set to 85070591730234615865843651857942052864, and I
decremented and moved it to try to kickstart some streaming on the thought
that something may have failed, but that didn't yield any appreciable
results.

Are we seeing completely abnormal behavior?  Should I consider making the
token for the fourth node considerably smaller?  We calculated the node's
tokens using the standard python script.

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

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


Re: balancing issue with Random partitioner

2011-09-12 Thread David McNelis
Auto-bootstrapping is turned on and the node had  been started several hours
ago.   Since the node already shows up as part of the ring I would imagine
that nodetool join wouldn't do anything.Is there a command to jumpstart
bootstrapping?

On Mon, Sep 12, 2011 at 4:22 PM, Jonathan Ellis  wrote:

> Looks kind of like the 4th node was added to the cluster w/o bootstrapping.
>
> On Mon, Sep 12, 2011 at 3:59 PM, David McNelis
>  wrote:
> > We are running the datastax .8 rpm distro.  We have a situation where we
> > have 4 nodes and each owns 25% of the keys.  However the last node in the
> > ring does not seem to be  getting much of a load at all.
> > We are using the random partitioner, we have a total of about 20k keys
> that
> > are sequential...
> > Our nodetool ring  output is currently:
> > Address DC  RackStatus State   Load
>  Owns
> >Token
> >
> >127605887595351923798765477786913079296
> > 10.181.138.167  datacenter1 rack1   Up Normal  99.37 GB
> >  25.00%  0
> > 192.168.100.6   datacenter1 rack1   Up Normal  106.25 GB
> > 25.00%  42535295865117307932921825928971026432
> > 10.181.137.37   datacenter1 rack1   Up Normal  77.7 GB
> > 25.00%  85070591730234615865843651857942052863
> > 192.168.100.5   datacenter1 rack1   Up Normal  494.67 KB
> > 25.00%  127605887595351923798765477786913079296
> >
> > Nothing is running on netstats on .37 or .5.
> > I understand that the nature of the beast would cause the load to differ
> > between the nodes...but I wouldn't expect it to be so drastic.  We had
> the
> > token for .37 set to 85070591730234615865843651857942052864, and I
> > decremented and moved it to try to kickstart some streaming on the
> thought
> > that something may have failed, but that didn't yield any appreciable
> > results.
> > Are we seeing completely abnormal behavior?  Should I consider making the
> > token for the fourth node considerably smaller?  We calculated the node's
> > tokens using the standard python script.
> > --
> > David McNelis
> > Lead Software Engineer
> > Agentis Energy
> > www.agentisenergy.com
> > o: 630.359.6395
> > c: 219.384.5143
> > A Smart Grid technology company focused on helping consumers of energy
> > control an often under-managed resource.
> >
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>



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

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


Re: balancing issue with Random partitioner

2011-09-13 Thread David McNelis
I ran a repair on 100.5.  It returned back almost immediately and netstats
and tpstats don't show any additional activity.  Nor does the Java process
start using more juice.

When I look at the cfstats for the main keyspace, number of keys is 0 in all
cases.  When I look at other nodes in the cluster there is a more realistic
distribution.


On Mon, Sep 12, 2011 at 7:18 PM, aaron morton wrote:

> Try a reapir on 100.5 , it will then request the data from the existing
> nodes.
>
> You will then need to clean on the existing three nodes once the repair has
> completed.
>
> Cheers
>
> -
> Aaron Morton
> Freelance Cassandra Developer
> @aaronmorton
> http://www.thelastpickle.com
>
> On 13/09/2011, at 9:32 AM, David McNelis wrote:
>
> Auto-bootstrapping is turned on and the node had  been started several
> hours ago.   Since the node already shows up as part of the ring I would
> imagine that nodetool join wouldn't do anything.Is there a command to
> jumpstart bootstrapping?
>
> On Mon, Sep 12, 2011 at 4:22 PM, Jonathan Ellis  wrote:
>
>> Looks kind of like the 4th node was added to the cluster w/o
>> bootstrapping.
>>
>> On Mon, Sep 12, 2011 at 3:59 PM, David McNelis
>>  wrote:
>> > We are running the datastax .8 rpm distro.  We have a situation where we
>> > have 4 nodes and each owns 25% of the keys.  However the last node in
>> the
>> > ring does not seem to be  getting much of a load at all.
>> > We are using the random partitioner, we have a total of about 20k keys
>> that
>> > are sequential...
>> > Our nodetool ring  output is currently:
>> > Address DC  RackStatus State   Load
>>  Owns
>> >Token
>> >
>> >127605887595351923798765477786913079296
>> > 10.181.138.167  datacenter1 rack1   Up Normal  99.37 GB
>> >  25.00%  0
>> > 192.168.100.6   datacenter1 rack1   Up Normal  106.25 GB
>> > 25.00%  42535295865117307932921825928971026432
>> > 10.181.137.37   datacenter1 rack1   Up Normal  77.7 GB
>> > 25.00%  85070591730234615865843651857942052863
>> > 192.168.100.5   datacenter1 rack1   Up Normal  494.67 KB
>> > 25.00%  127605887595351923798765477786913079296
>> >
>> > Nothing is running on netstats on .37 or .5.
>> > I understand that the nature of the beast would cause the load to differ
>> > between the nodes...but I wouldn't expect it to be so drastic.  We had
>> the
>> > token for .37 set to 85070591730234615865843651857942052864, and I
>> > decremented and moved it to try to kickstart some streaming on the
>> thought
>> > that something may have failed, but that didn't yield any appreciable
>> > results.
>> > Are we seeing completely abnormal behavior?  Should I consider making
>> the
>> > token for the fourth node considerably smaller?  We calculated the
>> node's
>> > tokens using the standard python script.
>> > --
>> > David McNelis
>> > Lead Software Engineer
>> > Agentis Energy
>> > www.agentisenergy.com
>> > o: 630.359.6395
>> > c: 219.384.5143
>> > A Smart Grid technology company focused on helping consumers of energy
>> > control an often under-managed resource.
>> >
>> >
>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of DataStax, the source for professional Cassandra support
>> http://www.datastax.com
>>
>
>
>
> --
> *David McNelis*
> Lead Software Engineer
> Agentis Energy
> www.agentisenergy.com
> o: 630.359.6395
> c: 219.384.5143
>
> *A Smart Grid technology company focused on helping consumers of energy
> control an often under-managed resource.*
>
>
>
>


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

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


Re: balancing issue with Random partitioner

2011-09-13 Thread David McNelis
So we tried decommissionning the 100.5 node, then re added it to the ring.
 It now  appears to be  streaming data properly to that node.

On Tue, Sep 13, 2011 at 6:56 AM, David McNelis
wrote:

> I ran a repair on 100.5.  It returned back almost immediately and netstats
> and tpstats don't show any additional activity.  Nor does the Java process
> start using more juice.
>
> When I look at the cfstats for the main keyspace, number of keys is 0 in
> all cases.  When I look at other nodes in the cluster there is a more
> realistic distribution.
>
>
> On Mon, Sep 12, 2011 at 7:18 PM, aaron morton wrote:
>
>> Try a reapir on 100.5 , it will then request the data from the existing
>> nodes.
>>
>> You will then need to clean on the existing three nodes once the repair
>> has completed.
>>
>> Cheers
>>
>>  -
>> Aaron Morton
>> Freelance Cassandra Developer
>> @aaronmorton
>> http://www.thelastpickle.com
>>
>> On 13/09/2011, at 9:32 AM, David McNelis wrote:
>>
>> Auto-bootstrapping is turned on and the node had  been started several
>> hours ago.   Since the node already shows up as part of the ring I would
>> imagine that nodetool join wouldn't do anything.Is there a command to
>> jumpstart bootstrapping?
>>
>> On Mon, Sep 12, 2011 at 4:22 PM, Jonathan Ellis wrote:
>>
>>> Looks kind of like the 4th node was added to the cluster w/o
>>> bootstrapping.
>>>
>>> On Mon, Sep 12, 2011 at 3:59 PM, David McNelis
>>>  wrote:
>>> > We are running the datastax .8 rpm distro.  We have a situation where
>>> we
>>> > have 4 nodes and each owns 25% of the keys.  However the last node in
>>> the
>>> > ring does not seem to be  getting much of a load at all.
>>> > We are using the random partitioner, we have a total of about 20k keys
>>> that
>>> > are sequential...
>>> > Our nodetool ring  output is currently:
>>> > Address DC  RackStatus State   Load
>>>  Owns
>>> >Token
>>> >
>>> >127605887595351923798765477786913079296
>>> > 10.181.138.167  datacenter1 rack1   Up Normal  99.37 GB
>>> >  25.00%  0
>>> > 192.168.100.6   datacenter1 rack1   Up Normal  106.25 GB
>>> > 25.00%  42535295865117307932921825928971026432
>>> > 10.181.137.37   datacenter1 rack1   Up Normal  77.7 GB
>>> > 25.00%  85070591730234615865843651857942052863
>>> > 192.168.100.5   datacenter1 rack1   Up Normal  494.67 KB
>>> > 25.00%  127605887595351923798765477786913079296
>>> >
>>> > Nothing is running on netstats on .37 or .5.
>>> > I understand that the nature of the beast would cause the load to
>>> differ
>>> > between the nodes...but I wouldn't expect it to be so drastic.  We had
>>> the
>>> > token for .37 set to 85070591730234615865843651857942052864, and I
>>> > decremented and moved it to try to kickstart some streaming on the
>>> thought
>>> > that something may have failed, but that didn't yield any appreciable
>>> > results.
>>> > Are we seeing completely abnormal behavior?  Should I consider making
>>> the
>>> > token for the fourth node considerably smaller?  We calculated the
>>> node's
>>> > tokens using the standard python script.
>>> > --
>>> > David McNelis
>>> > Lead Software Engineer
>>> > Agentis Energy
>>> > www.agentisenergy.com
>>> > o: 630.359.6395
>>> > c: 219.384.5143
>>> > A Smart Grid technology company focused on helping consumers of energy
>>> > control an often under-managed resource.
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Jonathan Ellis
>>> Project Chair, Apache Cassandra
>>> co-founder of DataStax, the source for professional Cassandra support
>>> http://www.datastax.com
>>>
>>
>>
>>
>> --
>> *David McNelis*
>> Lead Software Engineer
>> Agentis Energy
>> www.agentisenergy.com
>> o: 630.359.6395
>>  c: 219.384.5143
>>
>> *A Smart Grid technology company focused on helping consumers of energy
>> control an often under-managed resource.*
>>
>>
>>
>>
>
>
> --
> *David McNelis*
> Lead Software Engineer
> Agentis Energy
> www.agentisenergy.com
> o: 630.359.6395
> c: 219.384.5143
>
> *A Smart Grid technology company focused on helping consumers of energy
> control an often under-managed resource.*
>
>
>


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

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


Snapshots V. SSTables2Json

2011-09-21 Thread David McNelis
When planning a DR strategy, which option is going to, most consistently,
take the least amount of disk space, be fastest to recover from, least
complicated recovery, ect?

I've read through the Operations documents and my take is this so far.  If I
have specific column families I want to snapshot across the cluster, then
sstables2json would make the most sense.  However, if I want to back  up an
individual node(s), so that I can better and more quickly recover from a
node failure then snapshots would make more sense?

Regularly backing up the data on a large cluster with a high replication
factor is redundant, but in a situation where you have an RF <= 2, and are
located in a single rack / datacenter, then it might make sense to implement
something like this to backup and store data offsite, and I'm trying to
figure out  what a good, viable, and storage efficient plan would look like.

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

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


Compression in v1.0

2011-09-23 Thread David McNelis
I just read through the DataStax compression post (
http://www.datastax.com/dev/blog/whats-new-in-cassandra-1-0-compression).

My question is around good use cases for enabling compression.  In my
scenario I have very wide rows with many thousands of columns where its
essentially time-series information where the column names are all utc
timestamps.  There is significant overlap between rows, but there is wide
variance at times between the # of columns in each row.  I would imagine
(based on what I'd read) that because there are a significant number of
columns in common that compression would be useful.  At the same time, there
is a lot of variance, and right now there are more columns than rows (though
that will change over time), and that suggests compression might not be
useful.

Does anyone have any thoughts on what would make the most sense?  It would
be awesome if we could cut our storage needs consistently.

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

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


Re: For multi-tenant, is it good to have a key space for each tenant?

2011-10-07 Thread David McNelis
Reviving this thread...

Say you want to enable potentially thousands of tenants with their own sets
of column families?  In this situation a keyspace for each tenant wouldn't
work it would seem...what issues would we likely see if we were to build out
thousands of column families (where a column family name contains a unique
identifier to the tenant)?  In some documentation I've read it says that
keyspace's take up the majority of the resources, in a couple of older
threads they talked about getting the number of column families down.

At the end of the day the best part of cassandra is not having to
shard...but in this  instance, it seems like multiple clusters would make
the most sense, where you'd need to find the keyspace/column family sweet
spot for your application.

Ideally I'd think you'd want to be able to have a keyspace for each tenant,
then as many column families as that tenant required, and be able to do it
on a single cluster.

Has anyone come up with a rule of thumb regarding number of keyspaces /
column families?

On Thu, Aug 25, 2011 at 1:13 PM, Nate McCall  wrote:

> We have a 'virtual keyspaces' feature baked into the Hector client
> that might be of interest:
> https://github.com/rantav/hector/wiki/Virtual-Keyspaces
>
> On Thu, Aug 25, 2011 at 8:23 AM, Terje Marthinussen
>  wrote:
> >
> > Depends of course a lot on how many tenants you have.
> > Hopefully the new off heap memtables is 1.0 may help as well as java gc
> on large heaps is getting a much bigger issue than memory cost.
> > Regards,
> > Terje
> > On 25 Aug 2011, at 14:20, Himanshi Sharma 
> wrote:
> >
> >
> > I am working on similar sort of stuff. As per my knowledge, creating
> keyspace for each tenant would impose lot of memory constraints.
> >
> > Following Shared Keyspace and Shared Column families would be a better
> approach. And each row in CF could be referred by tenant_id as row key.
> > And again it depends on the type of application.
> >
> > Hey this is just a suggestion, m not completely sure.. :)
> >
> >
> > Himanshi Sharma
> >
> >
> >
> >
> > From: Guofeng Zhang 
> > To: user@cassandra.apache.org
> > Date: 08/25/2011 10:38 AM
> > Subject: For multi-tenant, is it good to have a key space for each
> tenant?
> > 
> >
> >
> > I wonder if it is a good practice to create a key space for each tenant.
> Any advice is appreciated.
> >
> > Thanks
> >
> >
> > =-=-=
> > 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
> >
> >
>



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

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


Re: For multi-tenant, is it good to have a key space for each tenant?

2011-10-07 Thread David McNelis
So at the end of the day its going to be limited by available memory then?
 Going by this line:

Do note that a minimum of 1MB per memtable is used by the per-memtable arena
allocator <https://issues.apache.org/jira/browse/CASSANDRA-2252> also
introduced in 1.0, which is worth keeping in mind if you are looking at
going from thousands to tens of thousands of ColumnFamilies.

  Then you'd be looking at a requirement of 1gig  memory for each  1024
column families had on your cluster, regardless of number of keyspaces those
lived in.  So in order to have 10s of thousands of CFs, one would need 10s
of gigs of ram on each node just to handle that overhead...at least as  of
 v1.

On Fri, Oct 7, 2011 at 9:40 AM, Jonathan Ellis  wrote:

> On Fri, Oct 7, 2011 at 9:36 AM, David McNelis
>  wrote:
> > In some documentation I've read it says that
> > keyspace's take up the majority of the resources
>
> This has never been the case.
>
> > in a couple of older
> > threads they talked about getting the number of column families down.
>
> This was good advice pre-0.8.
>
> I covered the state of 0.8 and 1.0 here:
>
> http://www.datastax.com/dev/blog/whats-new-in-cassandra-1-0-improved-memory-and-disk-space-management
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>



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

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


Re: A good key for data distribution over nodes

2011-10-10 Thread David McNelis
You should be ok, depending on the partitioner strategy you use.  The keys
end up created as a hash (which is why when you're setting up your nodes you
can give them a specific key.  Then, whatever your key is will be used to
create an MD5 hash, that hash will then determine what node your data will
live on.

So while your distribution won't necessarily be completely balanced, it
should at least be in the right ballpark.

To give you an idea of this in practice, we've got consecutive integer
values as our keys and we're using the random partitioner...we have VERY
close to the same number of keys on each of our nodes.  Then the bigger
question about balancing your load is how big each record is...if they are
consistent in size, vary widely, ect, as that is just as likely to impact
how balanced your loads are.

On Mon, Oct 10, 2011 at 9:09 AM, Laurent Aufrechter <
laurent.aufrech...@yahoo.fr> wrote:

> Hi,
>
> I am planing to make tests on Cassandra with a few nodes. I want to create
> a column family where the key will be the date down to the second (like
> 2011/10/10-16:07:53). Doing so, my keys will be very similar from each
> others. Is it ok to use such keys if I want my data to be evenly distributed
> across my nodes or do I have to "do something" ?
>
> Thanks in advance.
>
> L. Aufrechter
>



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

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


Re: Monitoring....

2011-10-12 Thread David McNelis
Brian,

Have you looked at Datastax OpsCenter?  I think it would do a lot of what
 you're looking for.

On Wed, Oct 12, 2011 at 11:27 AM, Brian Fleming
wrote:

> Hi,
>
> ** **
>
> Has anybody used any solutions for harvesting and storing Cassandra JMX
> metrics for monitoring, trend analysis, etc.?
>
> ** **
>
> **JConsole is useful for single node monitoring/etc but not scalable &
> data obviously doesn't persist between sessions...**
>
> **
> **
>
> Many thanks,
>
>
> Brian
>
>


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

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


Re: Storing pre-sorted data

2011-10-12 Thread David McNelis
Is it an option to not convert the data to binary prior to inserting into
Cassandra?  Also, how large are the strings you're sorting?  If its viable
to not convert to binary before writing to Cassandra, and you use one of the
string based column ordering techniques (utf8, ascii, for example), then the
data would be sorted without you  needing to specifically worry about that.
 Of course, if the strings are lengthy you could run into  additional
issues.

On Wed, Oct 12, 2011 at 11:34 AM, Matthias Pfau  wrote:

> Hi there,
> we are currently building a prototype based on cassandra and came into
> problems on implementing sorted lists containing millions of items.
>
> The special thing about the items of our lists is, that cassandra is not
> able to sort them as the data is stored in a binary format which is not
> sortable. However, we are able to sort the data before the plain data gets
> encoded (our application is responsible for the order).
>
> First Approach: Storing Lists in ColumnFamilies
> ***
> We first tried to map the list to a single row of a ColumnFamily in a way
> that the index of the list is mapped to the column names and the items of
> the list to the column values. The column names are increasing numbers which
> define the sort order.
> This has the major drawback that big parts of the list have to be rewritten
> on inserts (because the column names are numbered by their index), which are
> quite common.
>
>
> Second Approach: Storing the whole List as Binary Data:
> ***
> We tried to store the compressed list in a single column. However, this is
> only feasible for smaller lists. Our lists are far to big leading to multi
> megabyte reads and writes. As we need to read and update the lists quite
> often, this would put our Cassandra cluster under a lot of pressure.
>
> Ideal Solution: Native support for storing lists
> ***
> We would be very happy with a way to store a list of sorted values without
> making improper use of column names for the list index. This implies that we
> would need a possibility to insert values at defined positions. We know that
> this could lead to problems with concurrent inserts in a distributed
> environment, but this is handled by our application logic.
>
>
> What are your ideas on that?
>
> Thanks
> Matthias
>



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

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


Re: data agility

2011-11-20 Thread David McNelis
Dotan,

I think that if you're in the early stages you have a basic idea of what
your product is going to be, architecturally speaking.  While you may
change your business model, or features at the display layer, I would think
the data models itself would remain relatively similar
throughout...otherwise you'd have another product on your hands, no?

But, even if your requirements radically shift, Cassandra is schemaless, so
you'd be able to make 'structural' changes to your data without as much
risk as in a traditional RDBMS, i.e. MySql.

At the end of the day, I don't think you've given enough information about
your proposed data models for anyone to say, "Yes, Cassandra would or would
not be the right choice for your startup."  If well administered, depending
on the services offered, MySQL or Oracle  could support a site with 200M
users, and a poorly designed Cassandra data store could work very poorly
for a site supporting 200 users.

I will say that I think it makes a lot of  sense  to use tradional RDBMS
systems for relational data and a Cassandra-like system when there is a
need  for larger data storage, or something that lends itself well to a
structureless design.  If you are using a framework that supports a good
ORM layer (i.e. Hibernate for Java), you can have  your build process
update your database  schema as you build out your application.  I haven't
done much work in Rails or Django, but I understand those support the
transparent schema updating as well.  That sort of setup can work very
effectively in early development...but that is more a discussion for other
communities.

If you're interested in doing Map/Reduce jobs with Cassandra, look into
Brisk, the system created by DataStax (which is also open source) that
allows you to run Hadoop on top of your Cassandra cluster.  This may not be
exactly what you're looking for when asking this question...but it might
give you the insights you're looking for.

Hope this has been at least somewhat helpful.

David

On Sun, Nov 20, 2011 at 1:06 PM, Dotan N.  wrote:

> Hi all,
> my question may be more philosophical than related technically
> to Cassandra, but please bear with me.
>
> Given that a young startup may not know its product full at the early
> stages, but that it definitely points to ~200M users,
> would Cassandra will be the right way to go?
>
> That is, the requirement is for a large data store, that can move with
> product changes and requirements swiftly.
>
> Given that in Cassandra one thinks hard about the queries, and then builds
> a model to suit it best, I was thinking of
> this situation as problematic.
>
> So here are some questions:
>
> - would it be wiser to start with a more agile data store (such as
> mongodb) and then progress onto Cassandra, when the product itself
> solidifies?
> - given that we start with Cassandra from the get go, what is a common
> (and quick in terms of development) way or practice to change data, change
> schemas, as the product evolves?
> - is it even smart to start with Cassandra? would only startups whose core
> business is big data start with it from the get go?
> - how would you do map/reduce with Cassandra? how agile is that? (for
> example, can you run map/reduce _very_ frequently?)
>
> Thanks!
>
> --
> Dotan, @jondot <http://twitter.com/jondot>
>
>


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

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


Issues with JMX monitoring -- v0.8.7

2011-11-22 Thread David McNelis
Good morning,

I'm trying to set up a simple monitoring application (that is a plugin to
Nagios), code can be found here:
https://github.com/so-net-developer/Cassandra/blob/master/nagios/CheckNode.java

However, when I try to run the CheckNode.java program I get an error that:
Exception in thread "main" javax.management.InstanceNotFoundException:
org.apache.cassandra.service:type=StorageService

According to the docs on Cassandra and JMX this should be a valid Instance
to create.  I've tried running this from both on the cassandra node and
remotely, with no difference in outcome.

I don't know if it matters, but these are the domains listed as available
when I make a JMX getDomains call:
org.apache.cassandra.internal
JMImplementation
com.sun.management
org.apache.cassandra.request
org.apache.cassandra.net
java.lang
java.util.logging
org.apache.cassandra.db

Because I get a  response when iterating over
MBeanServerConection.getDomains():

JMXConnector connector = JMXConnectorFactory.connect(new
JMXServiceURL(JMXURL));
MBeanServerConnection connection = connector.getMBeanServerConnection();

for(String d : connection.getDomains())
 System.out.println(d);

I am disinclined to think its an issue with not being able to connect to
JMX in general.

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

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


Re: Issues with JMX monitoring -- v0.8.7

2011-11-22 Thread David McNelis
Would there be a better bean to look at to ascertain the status that would
be created when the server starts up?

On Tue, Nov 22, 2011 at 11:47 AM, Nick Bailey  wrote:

> The StorageServiceMBean is only created once some reads/writes
> actually go to that node. Do a couple reads/writes from the CLI and
> you should see the MBean afterwards.
>
> This also means your monitoring application should handle this error
> in the case of nodes restarting.
>
> On Tue, Nov 22, 2011 at 7:51 AM, David McNelis
>  wrote:
> > Good morning,
> > I'm trying to set up a simple monitoring application (that is a plugin to
> > Nagios), code can be found
> > here:
> https://github.com/so-net-developer/Cassandra/blob/master/nagios/CheckNode.java
> > However, when I try to run the CheckNode.java program I get an error
> that:
> > Exception in thread "main" javax.management.InstanceNotFoundException:
> > org.apache.cassandra.service:type=StorageService
> > According to the docs on Cassandra and JMX this should be a valid
> Instance
> > to create.  I've tried running this from both on the cassandra node and
> > remotely, with no difference in outcome.
> > I don't know if it matters, but these are the domains listed as available
> > when I make a JMX getDomains call:
> > org.apache.cassandra.internal
> > JMImplementation
> > com.sun.management
> > org.apache.cassandra.request
> > org.apache.cassandra.net
> > java.lang
> > java.util.logging
> > org.apache.cassandra.db
> > Because I get a  response when iterating over
> > MBeanServerConection.getDomains():
> > JMXConnector connector = JMXConnectorFactory.connect(new
> > JMXServiceURL(JMXURL));
> > MBeanServerConnection connection = connector.getMBeanServerConnection();
> > for(String d : connection.getDomains())
> >  System.out.println(d);
> > I am disinclined to think its an issue with not being able to connect to
> JMX
> > in general.
> > --
> > David McNelis
> > Lead Software Engineer
> > Agentis Energy
> > www.agentisenergy.com
> > c: 219.384.5143
> > A Smart Grid technology company focused on helping consumers of energy
> > control an often under-managed resource.
> >
> >
>



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

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


Re: Issues with JMX monitoring -- v0.8.7

2011-11-23 Thread David McNelis
But if the StorageService bean is only created once a transaction has
occurred, is there another location, i.e. the CommitLog, that I could check
just to see if the node is 'live'.  Or do you think I'd be better served
trying to execute something on the node (i.e. read a record using Hector)?

Ideally this would be as low cost an operation on the Cassandra node as
possible, since it is just monitoring statuses (stati?).

On Tue, Nov 22, 2011 at 1:15 PM, Nick Bailey  wrote:

> There are quite a few attributes in the
> org.apace.cassandra.db.StorageServiceMBean that could serve that
> purpose.
>
> Initialized, RPCServerRunning, OperationMode, Joined, and perhaps others
>
> Note that some of those may not exist depending on your version of
> cassandra, pick one appropriate for your version.
>
> On Tue, Nov 22, 2011 at 1:02 PM, David McNelis
>  wrote:
> > Would there be a better bean to look at to ascertain the status that
> would
> > be created when the server starts up?
> >
> > On Tue, Nov 22, 2011 at 11:47 AM, Nick Bailey  wrote:
> >>
> >> The StorageServiceMBean is only created once some reads/writes
> >> actually go to that node. Do a couple reads/writes from the CLI and
> >> you should see the MBean afterwards.
> >>
> >> This also means your monitoring application should handle this error
> >> in the case of nodes restarting.
> >>
> >> On Tue, Nov 22, 2011 at 7:51 AM, David McNelis
> >>  wrote:
> >> > Good morning,
> >> > I'm trying to set up a simple monitoring application (that is a plugin
> >> > to
> >> > Nagios), code can be found
> >> >
> >> > here:
> https://github.com/so-net-developer/Cassandra/blob/master/nagios/CheckNode.java
> >> > However, when I try to run the CheckNode.java program I get an error
> >> > that:
> >> > Exception in thread "main" javax.management.InstanceNotFoundException:
> >> > org.apache.cassandra.service:type=StorageService
> >> > According to the docs on Cassandra and JMX this should be a valid
> >> > Instance
> >> > to create.  I've tried running this from both on the cassandra node
> and
> >> > remotely, with no difference in outcome.
> >> > I don't know if it matters, but these are the domains listed as
> >> > available
> >> > when I make a JMX getDomains call:
> >> > org.apache.cassandra.internal
> >> > JMImplementation
> >> > com.sun.management
> >> > org.apache.cassandra.request
> >> > org.apache.cassandra.net
> >> > java.lang
> >> > java.util.logging
> >> > org.apache.cassandra.db
> >> > Because I get a  response when iterating over
> >> > MBeanServerConection.getDomains():
> >> > JMXConnector connector = JMXConnectorFactory.connect(new
> >> > JMXServiceURL(JMXURL));
> >> > MBeanServerConnection connection =
> connector.getMBeanServerConnection();
> >> > for(String d : connection.getDomains())
> >> >  System.out.println(d);
> >> > I am disinclined to think its an issue with not being able to connect
> to
> >> > JMX
> >> > in general.
> >> > --
> >> > David McNelis
> >> > Lead Software Engineer
> >> > Agentis Energy
> >> > www.agentisenergy.com
> >> > c: 219.384.5143
> >> > A Smart Grid technology company focused on helping consumers of energy
> >> > control an often under-managed resource.
> >> >
> >> >
> >
> >
> >
> > --
> > David McNelis
> > Lead Software Engineer
> > Agentis Energy
> > www.agentisenergy.com
> > c: 219.384.5143
> > A Smart Grid technology company focused on helping consumers of energy
> > control an often under-managed resource.
> >
> >
>



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

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


JMX monitoring

2011-11-23 Thread David McNelis
Ok.  in that case I think the Docs are wrong.

http://wiki.apache.org/cassandra/JmxInterface has StorageService as part of
org.apache.cassandra.service.

Also, once I executed a CLI command, I started getting the expected output
(output being that it  was able to return the live nodes).

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

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


Issues with JMX monitoring -- v0.8.7

2011-11-23 Thread David McNelis
In that case, I think that the documentation is incorrect, as it has
Service listed as the package related to the StorageService.

I apologize for the lack of the rest of the thread, everything is getting
bounced when I try to send it for some reason.

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

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


Monitoring your cluster

2011-11-27 Thread David McNelis
Hey folks,

If anyone is using Nagios to do any of your network monitoring, I just
finished the initial version of a Cassandra monitoring plugin that is a
fork of a much simpler version.  Hope someone finds it useful.  Right now I
know it works  with the 0.8 build of Cassandra, I'll update it to v1 once
we migrate there (I don't know what JMX calls have changed at this
point)...if someone wants to send me a list of updates to the JMX calls,
I'll add them in and update it to handle multiple versions.

https://github.com/dmcnelis/NagiosCassandraMonitor

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

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


RE: Monitoring your cluster

2011-11-28 Thread David McNelis
**
>
> [INFO]
> **
> **
>
> [ERROR] No plugin found for prefix 'assemble' in the current project and
> in the
>
> plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from
> the r
>
> epositories [local (C:\Users\michael\.m2\repository), archiva.default (
> http://19
>
> 2.168.80.20:8080/archiva/repository/ProxyGroup/)] -> [Help 1]
>
> [ERROR]
>
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e swit
>
> ch.
>
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>
> [ERROR]
>
> [ERROR] For more information about the errors and possible solutions,
> please rea
>
> d the following articles:
>
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundF
>
> orPrefixException
>
> ** **
>
> c:\Temp\dmcnelis-NagiosCassandraMonitor-840010d>mvn assemble:single
>
> [INFO] Scanning for projects...
>
> Downloading:
> http://192.168.80.20:8080/archiva/repository/ProxyGroup/org/apache/
>
> maven/plugins/maven-metadata.xml
>
> Downloading:
> http://192.168.80.20:8080/archiva/repository/ProxyGroup/org/codehau
>
> s/mojo/maven-metadata.xml
>
> Downloaded:
> http://192.168.80.20:8080/archiva/repository/ProxyGroup/org/apache/m
>
> aven/plugins/maven-metadata.xml (9 KB at 7.4 KB/sec)
>
> Downloaded:
> http://192.168.80.20:8080/archiva/repository/ProxyGroup/org/codehaus
>
> /mojo/maven-metadata.xml (18 KB at 12.9 KB/sec)
>
> [INFO]
> **
> **
>
> [INFO] BUILD FAILURE
>
> [INFO]
> **
> **
>
> [INFO] Total time: 1.872s
>
> [INFO] Finished at: Mon Nov 28 11:19:38 IST 2011
>
> [INFO] Final Memory: 2M/6M
>
> [INFO]
> **
> **
>
> [ERROR] No plugin found for prefix 'assemble' in the current project and
> in the
>
> plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from
> the r
>
> epositories [local (C:\Users\michael\.m2\repository), archiva.default (
> http://19
>
> 2.168.80.20:8080/archiva/repository/ProxyGroup/)] -> [Help 1]
>
> [ERROR]
>
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e swit
>
> ch.
>
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>
> [ERROR]
>
> [ERROR] For more information about the errors and possible solutions,
> please rea
>
> d the following articles:
>
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundF
>
> orPrefixException
>
> ** **
>
> c:\Temp\dmcnelis-NagiosCassandraMonitor-840010d>
>
> ** **
>
> *From:* David McNelis [mailto:dmcne...@agentisenergy.com]
> *Sent:* Sunday, November 27, 2011 9:43 PM
> *To:* user@cassandra.apache.org
> *Subject:* Monitoring your cluster
>
> ** **
>
> Hey folks,
>
> ** **
>
> If anyone is using Nagios to do any of your network monitoring, I just
> finished the initial version of a Cassandra monitoring plugin that is a
> fork of a much simpler version.  Hope someone finds it useful.  Right now I
> know it works  with the 0.8 build of Cassandra, I'll update it to v1 once
> we migrate there (I don't know what JMX calls have changed at this
> point)...if someone wants to send me a list of updates to the JMX calls,
> I'll add them in and update it to handle multiple versions.
>
> ** **
>
> https://github.com/dmcnelis/NagiosCassandraMonitor
> 
>
> ** **
>
> --
> *David McNelis*
>
> Lead Software Engineer
>
> Agentis Energy
>
> www.agentisenergy.com
>
> c: 219.384.5143
>
> ** **
>
> *A Smart Grid technology company focused on helping consumers of energy
> control an often under-managed resource.*
>
> ** **
>
> ** **
>


Cleanup in a write-only environment

2011-11-30 Thread David McNelis
In my understanding Cleanup is meant to help clear out data that has  been
removed.  If you have an environment where data is only ever added (the
case for the production system I'm working with), is there a point to
automating cleanup?   I understand that if we were to ever purge a segment
of data from our cluster we'd certainly want to run it, or after added a
new node and adjusting the tokens.

So I want to make sure I'm not missing something here and that there  would
be other  reasons to run cleanup regularly?

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

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


Re: data modeling question

2011-11-30 Thread David McNelis
Personally I would create a separate column family for each basic area.
 For example

To organize my sectors and symbols I would create a column family where the
key is the sector name and the column names are the symbols for that
sector, i.e.:

sector : {
key: sector name
Column names: symbols
Column values: null
}

Then I would have a column family for quotes where I have the key as the
symbol, the column name as the timestamp, the value as the quote:

quote : {
key: symbol
column names:  timeuuid
column values:  quote at that time for that symbol
}

I would then use the same basic structure for your other column families,
ticks and fundamentals.  In general people tend to stay away from super
column families when possible for several reasons, but the most commonly
sited one is that when you get a SCF, the entire SCF must be deserialized
in order to access it.  So if you have a bunch of SCF, you're running a
risk of ending up needing to read in a lot more data than is necessary to
get the information you are looking for.

On Wed, Nov 30, 2011 at 2:57 PM, Deno Vichas  wrote:

>  hey all!
>
> i'm started my first project using cassandra and some data model
> questions.  i'm working on an app that fetches stock market data.  i need
> to keep track of when i fetch a set of data for any given stock in any
> sector;  here's what i think my model should look like;
>
> fetches : {
>  : {
>  quote : {
> : {
>  : ---
> }
> }
> ticks : {
> : {
>  : ---
> }
> }
> fundamentals : {
> : {
>  : ---
> }
> }
> }
> }
>
>
> is there anything that less an ideal doing it this way versus creating
> separate CF per sector?how do you create Super CF inside of Super CF
> via the CLI?
>
>
>
> thanks,
> deno
>
>
>


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

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


Re: data modeling question

2011-11-30 Thread David McNelis
You wouldn't query for all the keys that have a column name x exactly.
 Instead what you would do is for sector x grab your list of symbols S.
 Then you would get the last column for each of those symbols (which you do
in different ways depending on the API), and then test if that date is
within your threshold.  If not, it goes into your list of symbols to fetch.


Alternatively, you could iterate over the symbols grabbing data where the
date is between range A and B, if you get an empty set / no columns
returned, then you need to re-pull for that symbol.  Does that make sense?

Either way you end up hitting on each of the individual symbols.  Maybe
someone else has a better idea of how to structure the data for that
particular use case.

On Wed, Nov 30, 2011 at 3:45 PM, Deno Vichas  wrote:

> with the quote CF below how would one query for all keys that have a
> column name value that have a timeuuid of later than x minutes?  i need to
> be able to find all symbols that have not been fetch in x minutes by
> sector.  i know i get list of symbol by sector from my sector CF.
>
> thanks,
> deno
>
>
> On 11/30/2011 1:07 PM, David McNelis wrote:
>
>>
>> Then I would have a column family for quotes where I have the key as the
>> symbol, the column name as the timestamp, the value as the quote:
>>
>> quote : {
>>key: symbol
>>column names:  timeuuid
>>column values:  quote at that time for that symbol
>> }
>>
>>
>>
>


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

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


Re: Cleanup in a write-only environment

2011-11-30 Thread David McNelis
Thanks, folks.

I think I must have read compaction, thought cleanup, and gotten muddled
from there.

David
On Nov 30, 2011 6:45 PM, "Edward Capriolo"  wrote:

> Your understanding of nodetool cleanup is not correct. cleanup is used
> only after cluster balancing like adding or removing nodes. It removes data
> that does not belong on the node anymore (in older versions it removed
> hints as well)
>
> Your debate is needing to run companion . In a write only workload you
> should let cassandra do its normal connection.(in most cases)
>
> On Wednesday, November 30, 2011, David McNelis 
> wrote:
> > In my understanding Cleanup is meant to help clear out data that has
>  been removed.  If you have an environment where data is only ever added
> (the case for the production system I'm working with), is there a point to
> automating cleanup?   I understand that if we were to ever purge a segment
> of data from our cluster we'd certainly want to run it, or after added a
> new node and adjusting the tokens.
> > So I want to make sure I'm not missing something here and that there
>  would be other  reasons to run cleanup regularly?
> >
> > --
> > David McNelis
> > Lead Software Engineer
> > Agentis Energy
> > www.agentisenergy.com
> > c: 219.384.5143
> > A Smart Grid technology company focused on helping consumers of energy
> control an often under-managed resource.
> >
> >


Syncing across environments

2012-01-10 Thread David McNelis
Is anyone familiar with any tools that are already available to allow for
configurable synchronization of different clusters?

Specifically for purposes of development, i.e. Dev, staging, test, and
production cassandra environments, so that you can easily plug in the
information that you want to filter back down to your 'lower level'
environments...

If not, I'm interested in starting working on something like that, so if
you have specific thoughts about features/requirements for something
extendable that you'd like to share I'm all ears.

In general the main pieces that I know I would like to have on a column
family basis:

1) Synchronize the schema
2) Specify keys or a range of keys to sync for that CF
3) Support full CF sync
4) Entirely configurable by either maven properties, basic properties, or
xml file
5) Basic reporting about what was synchronized
6) Allow plugin development  for mutating keys as you move to different
 environments (in case your keys in one environment need to be a different
value in another environment, for example, you have a client_id based on an
account number.  The account number exists on dev and prod, but the
client_id is different.  Want to let a dev write a mutator plugin to
 update the key prior to it writing to the destination.
7) Support multiple destinations

Any thoughts on this, folks?  I'd wager this is an issue just about all of
 us deal with, and we're probably all doing it in a little different way.

David


Re: Rebalance cluster

2012-01-11 Thread David McNelis
Daning,

You can see how to do this basic sort of thing on the Wiki's operations
page ( http://wiki.apache.org/cassandra/Operations )

In short, you'll want to run:
nodetool -h hostname move newtoken

Then, once you've update each of your tokens that you want to move, you'll
want to run
nodetool -h hostname cleanup

That will remove the no-longer necessary tokens from your smaller machines.

Please note that someone else may have some better insights than I into
whether or not  your strategy is going to be effective.  On the surface I
think what you are doing is logical, but I'm unsure of the  actual
performance gains you'll see.

David

On Wed, Jan 11, 2012 at 1:32 PM, Daning Wang  wrote:

> Hi All,
>
> We have 5 nodes cluster(on 0.8.6), but two machines are slower and have
> less memory, so the performance was not good  on those two machines for
> large volume traffic.I want to move some data from slower machine to faster
> machine to ease some load, the token ring will not be equally balanced.
>
> I am thinking the following steps,
>
> 1. modify cassandra.yaml to change the initial token.
> 2. restart cassandra(don't need to auto-bootstrap, right?)
> 3. then run nodetool repair,(or nodetool move?, not sure which one to use)
>
>
> Is there any doc that has detailed steps about how to do this?
>
> Thanks in advance,
>
> Daning
>
>


Re: Syncing across environments

2012-01-11 Thread David McNelis
Not currently using any of those tools (though certainly an option, just
never looked into them).

Those tools seem more based around configuration of your
environments...where I'm more concerned with backfilling data from
production to early-stage environments to help facilitate development.
 Still DevOps at the end of the day...just don't know if those would be the
appropriate tools for the job.

David

On Wed, Jan 11, 2012 at 1:37 PM, aaron morton wrote:

> Nothing Cassandra specific that I am aware of. Do you have any ops
> automation such as chef or puppet ?
>
> Data Stax make their chef cook books available here
> https://github.com/riptano/chef
>
> Cheers
>
> -
> Aaron Morton
> Freelance Developer
> @aaronmorton
> http://www.thelastpickle.com
>
> On 11/01/2012, at 9:53 AM, David McNelis wrote:
>
> Is anyone familiar with any tools that are already available to allow for
> configurable synchronization of different clusters?
>
> Specifically for purposes of development, i.e. Dev, staging, test, and
> production cassandra environments, so that you can easily plug in the
> information that you want to filter back down to your 'lower level'
> environments...
>
> If not, I'm interested in starting working on something like that, so if
> you have specific thoughts about features/requirements for something
> extendable that you'd like to share I'm all ears.
>
> In general the main pieces that I know I would like to have on a column
> family basis:
>
> 1) Synchronize the schema
> 2) Specify keys or a range of keys to sync for that CF
> 3) Support full CF sync
> 4) Entirely configurable by either maven properties, basic properties, or
> xml file
> 5) Basic reporting about what was synchronized
> 6) Allow plugin development  for mutating keys as you move to different
>  environments (in case your keys in one environment need to be a different
> value in another environment, for example, you have a client_id based on an
> account number.  The account number exists on dev and prod, but the
> client_id is different.  Want to let a dev write a mutator plugin to
>  update the key prior to it writing to the destination.
> 7) Support multiple destinations
>
> Any thoughts on this, folks?  I'd wager this is an issue just about all of
>  us deal with, and we're probably all doing it in a little different way.
>
> David
>
>
>


Re: Syncing across environments

2012-01-11 Thread David McNelis
Right.

One of the  challenges though is if the key's wouldn't necessarily directly
translate.  Say I've got a MySQL instance in my Dev VM and my keys are
based on PKs  in that database...but my MySQL instance  by nature of what
 I'm working on has some different IDs...so in some way I'd need to mutate
the keys as they come into my local environment.  Additionally, I wouldn't
want my entire Prod cluster in dev either...since generally speaking I'd
only need a limited set of data in Dev compared to prod.

Does that make sense?  Kind of rambling response.

David

On Wed, Jan 11, 2012 at 2:03 PM, aaron morton wrote:

> You can use chef for setting up the cluster and pull snapshots down for
> the data. That will require a 1 to 1 mapping between the prod and dev / QA
> clusters.
>
> That way you can also test the DevOps processes for deployment and
> disaster recovery.
>
> Cheers
>
> -
> Aaron Morton
> Freelance Developer
> @aaronmorton
> http://www.thelastpickle.com
>
> On 12/01/2012, at 8:47 AM, David McNelis wrote:
>
> Not currently using any of those tools (though certainly an option, just
> never looked into them).
>
> Those tools seem more based around configuration of your
> environments...where I'm more concerned with backfilling data from
> production to early-stage environments to help facilitate development.
>  Still DevOps at the end of the day...just don't know if those would be the
> appropriate tools for the job.
>
> David
>
> On Wed, Jan 11, 2012 at 1:37 PM, aaron morton wrote:
>
>> Nothing Cassandra specific that I am aware of. Do you have any ops
>> automation such as chef or puppet ?
>>
>> Data Stax make their chef cook books available here
>> https://github.com/riptano/chef
>>
>> Cheers
>>
>>   -
>> Aaron Morton
>> Freelance Developer
>> @aaronmorton
>> http://www.thelastpickle.com
>>
>> On 11/01/2012, at 9:53 AM, David McNelis wrote:
>>
>> Is anyone familiar with any tools that are already available to allow for
>> configurable synchronization of different clusters?
>>
>> Specifically for purposes of development, i.e. Dev, staging, test, and
>> production cassandra environments, so that you can easily plug in the
>> information that you want to filter back down to your 'lower level'
>> environments...
>>
>> If not, I'm interested in starting working on something like that, so if
>> you have specific thoughts about features/requirements for something
>> extendable that you'd like to share I'm all ears.
>>
>> In general the main pieces that I know I would like to have on a column
>> family basis:
>>
>> 1) Synchronize the schema
>> 2) Specify keys or a range of keys to sync for that CF
>> 3) Support full CF sync
>> 4) Entirely configurable by either maven properties, basic properties, or
>> xml file
>> 5) Basic reporting about what was synchronized
>> 6) Allow plugin development  for mutating keys as you move to different
>>  environments (in case your keys in one environment need to be a different
>> value in another environment, for example, you have a client_id based on an
>> account number.  The account number exists on dev and prod, but the
>> client_id is different.  Want to let a dev write a mutator plugin to
>>  update the key prior to it writing to the destination.
>> 7) Support multiple destinations
>>
>> Any thoughts on this, folks?  I'd wager this is an issue just about all
>> of  us deal with, and we're probably all doing it in a little different way.
>>
>> David
>>
>>
>>
>
>


Re: About initial token, autobootstraping and load balance

2012-01-13 Thread David McNelis
The documentation for that section needs to be updated...

What happens is that if you just autobootstrap without setting a token it
will by default bisect the range of the largest node.

So if you go through several iterations of adding nodes, then this is what
you would see:

Gen 1:
Node A:  100% of tokens, token range 1-10 (for example)

Gen 2:
Node A: 50% of tokens  (1-5)
Node B: 50% of tokens (6-10)

Gen 3:
Node A: 25% of tokens (1-2.5)
Node B: 50% of tokens (6-10)
Node C: 25% of tokens (2.6-5)

In reality, what you'd want in gen 3 is every node to be 33%, but it would
not be the case without setting the tokens to begin with.

You'll notice that there are a couple of scripts available to generate a
list of  initial tokens for your particular cluster size, then ever time
you add a node you'll need to update all the nodes with new tokens in order
to properly load balance.

Does this make sense?

Other folks, am I explaining this correctly?

David

2012/1/13 Carlos Pérez Miguel 

> Hello,
>
> I have a doubt about how initial token is determined. In Cassandra's
> documentation it is said that it is better to manually configure the
> initial token to each node in the system but also is said that if
> initial token is not defined and autobootstrap is true, new nodes
> choose initial token in order to better the load balance of the
> cluster. But what happens if no initial token is chosen and
> autobootstrap is not activated? How each node selects its initial
> token to balance the ring?
>
> I ask this because I am making tests with a 20 nodes cassandra cluster
> with cassandra 0.7.9. Any node has initial token, nor
> autobootstraping. I restart the cluster with each test I want to make
> and in the end the cluster is always well balanced.
>
> Thanks
>
> Carlos Pérez Miguel
>


Re: Integration Testing for Cassandra

2012-06-04 Thread David McNelis
That article is a good starting point.  To make your life a bit easier,
consider checking out CassandraUnit that provides facilities to load
example data in a variety of ways.

https://github.com/jsevellec/cassandra-unit

Then you just need to be able to pass in which cassandra instance to
connect to before you execute your code (embedded versus external
environment).

On Mon, Jun 4, 2012 at 12:10 AM, Eran Chinthaka Withana <
eran.chinth...@gmail.com> wrote:

> Hi,
>
> I want to write integration tests related to my cassandra code where
> instead of accessing production clusters I should be able to start an
> embedded cassandra instance, within my unit test code, populate some data
> and run test cases.
>
> I found this[1]  as the closest to what I'm looking for (I prefer to use
> thrift API so didn't even think about using storage proxy API). I'm using
> Hector 1.0.x as my client to connect my cassandra 1.0.x clusters. Before I
> go ahead and use it, is this the recommended way to test Cassandra related
> client code? Are there any test utils already in Cassandra code base? I
> really appreciate if someone can shed some light here.
>
> [1]
> http://prettyprint.me/2010/02/14/running-cassandra-as-an-embedded-service/
>
> Thanks,
> Eran Chinthaka Withana
>


CQL queries timing out (and had worked)

2013-03-29 Thread David McNelis
I'm running 1.2.3 and have both CQL3 tabels and old school style CFs in my
cluster.

I'd had a large insert job running the last several days which just
ended it had been inserting using cql3 insert statements in a cql3
table.

Now, I show no compactions going on in my cluster but for some reason any
cql3 query I try to execute, insert, select, through cqlsh or through
external library, all time out with an rpc_timeout.

If I use cassandra-cli, I can do "list tablename limit 10" and immediately
get my 10 rows back.

However, if I do "select * from tablename limit 10" I get the rpc timeout
error.  Same table, same server.  It doesn't seem to matter if I'm hitting
a cql3 definited table or older style.

Load on the nodes is relatively low at the moment.

Any suggestions short of restarting nodes?  This is a pretty major issue
for us right now.


Re: CQL queries timing out (and had worked)

2013-03-29 Thread David McNelis
Appears that restarting a node makes CQL available on that node again, but
only that node.

Looks like I'll be doing a rolling restart.


On Fri, Mar 29, 2013 at 10:26 AM, David McNelis  wrote:

> I'm running 1.2.3 and have both CQL3 tabels and old school style CFs in my
> cluster.
>
> I'd had a large insert job running the last several days which just
> ended it had been inserting using cql3 insert statements in a cql3
> table.
>
> Now, I show no compactions going on in my cluster but for some reason any
> cql3 query I try to execute, insert, select, through cqlsh or through
> external library, all time out with an rpc_timeout.
>
> If I use cassandra-cli, I can do "list tablename limit 10" and immediately
> get my 10 rows back.
>
> However, if I do "select * from tablename limit 10" I get the rpc timeout
> error.  Same table, same server.  It doesn't seem to matter if I'm hitting
> a cql3 definited table or older style.
>
> Load on the nodes is relatively low at the moment.
>
> Any suggestions short of restarting nodes?  This is a pretty major issue
> for us right now.
>


Re: CQL queries timing out (and had worked)

2013-03-29 Thread David McNelis
Final reason for problem:

We'd had one node's config for rpc type changed from sync to hsha...

So that mismatch can break rpc across the cluster, apparently.

It would be nice if there was a good way to set that in a single spot for
the cluster or handle the mismatch differently.  Otherwise, if you wanted
to change from sync to hsha in a cluster you'd have to entirely restart the
cluster (not a big deal), but CQL would apparently not work at all until
all of your nodes had been restarted.


On Fri, Mar 29, 2013 at 10:35 AM, David McNelis  wrote:

> Appears that restarting a node makes CQL available on that node again, but
> only that node.
>
> Looks like I'll be doing a rolling restart.
>
>
> On Fri, Mar 29, 2013 at 10:26 AM, David McNelis wrote:
>
>> I'm running 1.2.3 and have both CQL3 tabels and old school style CFs in
>> my cluster.
>>
>> I'd had a large insert job running the last several days which just
>> ended it had been inserting using cql3 insert statements in a cql3
>> table.
>>
>> Now, I show no compactions going on in my cluster but for some reason any
>> cql3 query I try to execute, insert, select, through cqlsh or through
>> external library, all time out with an rpc_timeout.
>>
>> If I use cassandra-cli, I can do "list tablename limit 10" and
>> immediately get my 10 rows back.
>>
>> However, if I do "select * from tablename limit 10" I get the rpc timeout
>> error.  Same table, same server.  It doesn't seem to matter if I'm hitting
>> a cql3 definited table or older style.
>>
>> Load on the nodes is relatively low at the moment.
>>
>> Any suggestions short of restarting nodes?  This is a pretty major issue
>> for us right now.
>>
>
>


Failed shuffle

2013-04-17 Thread David McNelis
I had a situation earlier where my shuffle failed after a hard disk drive
filled up.  I went through and disabled shuffle on the machines while
trying to get the situation resolved.  Now, while I can re-enable shuffle
on the machines, when trying to do an ls, I get a timeout.

Looking at the cassandra-shuffle code, it is trying execute this query:

SELECT token_bytes,requested_at FROM system.range_xfers

which is throwing the following error in my logs:

java.lang.AssertionError: [min(-1),max(-219851097003960625)]
at org.apache.cassandra.dht.Bounds.(Bounds.java:41)
at org.apache.cassandra.dht.Bounds.(Bounds.java:34)
at org.apache.cassandra.dht.Bounds.withNewRight(Bounds.java:121)
at
org.apache.cassandra.service.StorageProxy.getRangeSlice(StorageProxy.java:1172)
at
org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:132)
at
org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:62)
at
org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132)
at
org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:143)
at
org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1726)
at
org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074)
at
org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062)
at
org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
at
org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)


So this causes me two major issues, first, I can't restart my dead node
because it ends up with a Concurrency exception while trying to find
relocating tokens during StorageService initialization, and I can't clear
the moves because nothing is able to read what is in that range_xfers table
(at least, I also was not able to read it through cqlsh).

I thought I could recreate the table, but system is a restricted keyspace
and it looks like I can't drop and recreate that table, and cql requires a
key for delete... and since you can't get the key without getting an
error

Is there something simple I can do that I'm just missing right now?  Right
now I can't restart nodes because of this, nor sucessfully add new nodes to
my ring.


Re: CQL

2013-04-19 Thread David McNelis
In order to do a query like that you'll need to have a timestamp/date as
the second portion of the primary key.

You'll only be able to do queries where you already know the key.  Unless
you're using an OrderPreservingPartitioner, there is no way to get a
continuous set of information back based on the key for the row (the first
key if you have a multi-column primary key).

I suggest you take a read of this DataStax post about time series data:
http://www.datastax.com/dev/blog/advanced-time-series-with-cassandra

Last, this is definitely a message better served by the user list and not
the dev list (which is primarily for communication about development
efforts of cassandra).

Good luck.


On Fri, Apr 19, 2013 at 1:06 PM, Sri Ramya  wrote:

> Please can any body help me to solve the above problem. I stuck with that
> problem in my project. help me
>


Building SSTables using SSTableSimpleUnsortedWriter (v. 1.2.3)

2013-04-19 Thread David McNelis
Was trying to do a test of writing SSTs for a CQL3 table.  So I created the
following table:

CREATE TABLE test_sst_load (
  mykey1 ascii,
  mykey2 ascii,
  value1 ascii,
  PRIMARY KEY (mykey1, mykey2)
)

I then set up my writer like so: (moved to gist:
https://gist.github.com/dmcnelis/5424756 )

This created my SST files ok and they imported without throwing any sorts
of errors (had -v and --debug on) when using sstableloader.

When I went to query my data in cqlsh, I got an rpc error.  In my
system.log I saw an exception: java.lang.RuntimeException:
java.lang.IllegalArgumentException
 (also at the gist above).

I had a feeling that it wouldn't work.. but I can't see a way with the
SSTableSimpleUnsortedWriter (or in the AbstractSSTableWriter) to create an
sstable file that is going to work with the CQL3 tables.  I know its got to
be possible, I can import SSTs with the sstableloader from one cluster to
another, where the tables are CQL3.

What am I missing here?


Re: Building SSTables using SSTableSimpleUnsortedWriter (v. 1.2.3)

2013-04-21 Thread David McNelis
I figured that the primary key and how to define it was the issue.

What I don't get is how to structure my
SSTableSimpleUnsortedWriter.newRow() call to support the CQL3 style
composite primary keys.  It takes only a ByteBuffer as an argument...

I guess I'm looking for some kind of example of a newRow() through
addColumns() example of how to write an SSTable that can be imported to a
CQL3 table using the sstableloader.

For example, should I convert both to a string, concat them with a : and
then bytebuffer that string, as if I were inserting a composite column from
cassandra-cli?


On Sun, Apr 21, 2013 at 3:55 PM, aaron morton wrote:

> The key to your problem is likely the row key.
>
> Take a look in at the table schema / sample data in the cassandra-cli to
> see how CQL uses composites also
> http://thelastpickle.com/2013/01/11/primary-keys-in-cql/
>
> The simple thing to do is use COMPACT STORAGE but that may not suite all
> use cases http://www.datastax.com/docs/1.2/cql_cli/cql/CREATE_TABLE
>
> Cheers
>
> -
> Aaron Morton
> Freelance Cassandra Consultant
> New Zealand
>
> @aaronmorton
> http://www.thelastpickle.com
>
> On 20/04/2013, at 4:36 PM, David McNelis  wrote:
>
> Was trying to do a test of writing SSTs for a CQL3 table.  So I created
> the following table:
>
> CREATE TABLE test_sst_load (
>   mykey1 ascii,
>   mykey2 ascii,
>   value1 ascii,
>   PRIMARY KEY (mykey1, mykey2)
> )
>
> I then set up my writer like so: (moved to gist:
> https://gist.github.com/dmcnelis/5424756 )
>
> This created my SST files ok and they imported without throwing any sorts
> of errors (had -v and --debug on) when using sstableloader.
>
> When I went to query my data in cqlsh, I got an rpc error.  In my
> system.log I saw an exception: java.lang.RuntimeException:
> java.lang.IllegalArgumentException
>  (also at the gist above).
>
> I had a feeling that it wouldn't work.. but I can't see a way with the
> SSTableSimpleUnsortedWriter (or in the AbstractSSTableWriter) to create an
> sstable file that is going to work with the CQL3 tables.  I know its got to
> be possible, I can import SSTs with the sstableloader from one cluster to
> another, where the tables are CQL3.
>
> What am I missing here?
>
>
>
>
>
>


vnodes and load balancing - 1.2.4

2013-04-25 Thread David McNelis
So, I had 7 nodes that I set up using vnodes, 256 tokens each, no problem.

I added two 512 token nodes, no problem, things seemed to balance.

The next 3 nodes I added, all at 256 tokens, and they have a cumulative
load of 116mb (where as the other nodes are at ~100GB and ~200GB (256 and
512 respectively).

Anyone else seen this is 1.2.4?

The nodes seem to join the cluster ok, and I have num_tokens set and have
tried both an empty initial_token and a commented out initial token, with
no change.

I see nothing streaming with netstats either, though these nodes were added
days apart.  At first I thought I must have a hot key or something, but
that doesn't seem to be the case, since the node I thought that one was on
has evened out over the past couple of days with no new nodes added.

I really *DON'T* want to deal with another shufflebut what options do I
have, since vnodes "make it unneeded to balance the cluster"?  (which, at
the moment, seems like a load of bullshit).


Re: vnodes and load balancing - 1.2.4

2013-04-26 Thread David McNelis
Decommissioning those nodes isn't a problem.  When you say remove all the
data, I assume you mean rm -rf my data directory (the default
/var/lib/cassandra/data

I'd done this prior to starting up the nodes, because they were installed
with from the apt-get repo, which automatically starts cassandra (bad form,
on that, as a side not).  But the first time I tried to start the node
after setting my config, I got an error that System.Users didn't exist and
exited out.  Second time I tried to start the nodes, they started.

Outside of clearing the data, having no value for initial token, having
num_tokens set, is there anything else I need to do to bring them in and
bootstrap them?

Note, this isn't the first nodes that I've added to the cluster, but they
are giving me fits.  Additionally, this morning, my seed nodes were all
flipping out with an error like:
https://gist.github.com/dmcnelis/5467636  (AssertionError, when trying to
determine ranges for nodes)

Once I decommissioned the new nodes, I had no more errors in my seed node
logs.


On Fri, Apr 26, 2013 at 5:48 AM, Sam Overton  wrote:

> Some extra information you could provide which will help debug this: the
> logs from those 3 nodes which have no data and the output of "nodetool ring"
>
> Before seeing those I can only guess, but my guess would be that in the
> logs on those 3 nodes you will see this: "Calculating new tokens" and this:
> "Split previous range (blah, blah] into "
>
> If that is the case then it means you accidentally started those three
> nodes with the default configuration (single-token) and then subsequently
> changed (num_tokens) and then joined them into the cluster. What happens
> when you do this is that the node thinks it used to be responsible for a
> single range and is being migrated to vnodes, so it splits its single range
> (now a very small part of the keyspace) into 256 smaller ranges, and ends
> up with just a tiny portion of the ring assigned to it.
>
> To fix this you'll need to decommission those 3 nodes, remove all data
> from them, then bootstrap them in again with the correct configuration from
> the start.
>
>  Sam
>
>
>
> On 26 April 2013 06:07, David McNelis  wrote:
>
>> So, I had 7 nodes that I set up using vnodes, 256 tokens each, no problem.
>>
>> I added two 512 token nodes, no problem, things seemed to balance.
>>
>> The next 3 nodes I added, all at 256 tokens, and they have a cumulative
>> load of 116mb (where as the other nodes are at ~100GB and ~200GB (256 and
>> 512 respectively).
>>
>> Anyone else seen this is 1.2.4?
>>
>> The nodes seem to join the cluster ok, and I have num_tokens set and have
>> tried both an empty initial_token and a commented out initial token, with
>> no change.
>>
>> I see nothing streaming with netstats either, though these nodes were
>> added days apart.  At first I thought I must have a hot key or something,
>> but that doesn't seem to be the case, since the node I thought that one was
>> on has evened out over the past couple of days with no new nodes added.
>>
>> I really *DON'T* want to deal with another shufflebut what options do
>> I have, since vnodes "make it unneeded to balance the cluster"?  (which, at
>> the moment, seems like a load of bullshit).
>>
>
>
>
> --
> Sam Overton
> Acunu | http://www.acunu.com | @acunu
>


Re: Iterating through large numbers of rows with JDBC

2013-05-14 Thread David McNelis
Another thing to keep in mind when doing this with CQL is to take into
account the ordering partitioner you may or may not be using.  If you're
using one you'll need to make sure that if you have a larger number of rows
for the partitioner key than your query limit, then you can end up in a
situation where you're stuck in a loop.


On Tue, May 14, 2013 at 1:39 PM, aaron morton wrote:

> You can iterate over them, just make sure to set a sensible row count to
> chunk things up.
> See
> http://www.datastax.com/docs/1.2/cql_cli/using/paging#non-ordered-partitioner-paging
>
> You can also break up the processing so only one worker reads the token
> ranges for a node. That allows you to
> process the rows in parallel and avoid workers processing the same rows.
>
> Cheers
>
> -
> Aaron Morton
> Freelance Cassandra Consultant
> New Zealand
>
> @aaronmorton
> http://www.thelastpickle.com
>
> On 13/05/2013, at 2:51 AM, Robert Wille  wrote:
>
> Iterating through lots of records is not a primary use of my data.
> However, there are a number scenarios where scanning the entire contents
> of a column family is an interesting and useful exercise. Here are a few:
> removal of orphaned records, checking the integrity a data set, and
> analytics.
>
> On 5/12/13 3:41 AM, "Oleg Dulin"  wrote:
>
> On 2013-05-11 14:42:32 +, Robert Wille said:
>
> I'm using the JDBC driver to access Cassandra. I'm wondering if its
> possible to iterate through a large number of records (e.g. to perform
> maintenance on a large column family). I tried calling
> Connection.createStatement(ResultSet.TYPE_FORWARD_ONLY,
> ResultSet.CONCUR_READ_ONLY), but it times out, so I'm guessing that
> cursors aren't supported. Is there another way to do this, or do I need
> to
> use a different API?
>
> Thanks in advance
>
> Robert
>
>
> If you feel that you need to iterate through a large number of rows
> then you are probably not using a correct data model.
>
> Can you describe your use case ?
>
> --
> Regards,
> Oleg Dulin
> NYC Java Big Data Engineer
> http://www.olegdulin.com/
>
>
>
>
>
>


Node failing to decomission (vnodes and 1.2.5)

2013-06-17 Thread David McNelis
I have a node in my ring (1.2.5) that when it was set up, had the wrong
number of vnodes assigned (double the amount it should have had).

As  a result, and because we can't reduce the number of vnodes on a machine
(at least at this point), I need to decommission the node.

The problem is that we've tried running decommission several times.  In
each instance we'll have a lot of streams to other nodes for a period, and
then eventually, netstats will tell us:

nodetool -h localhost netstats
Mode: LEAVING
 Nothing streaming to /10.x.x.1
 Nothing streaming to /10.x.x.2
 Nothing streaming to /10.x.x.3
Not receiving any streams.
Pool NameActive   Pending  Completed
Commandsn/a 0 955991
Responses   n/a 02947860

I also am not seeing anything in the nodes log files to suggest errors
during streaming or leaving.

Then the node will stay in this leaving state for... well, we gave up after
several days of no more activity and retried several times.  Each time we
"gave up" on it, we restarted the service and it was no longer listed as
Leaving, just active.  Even when in a "leaving" state, the size of data on
the node continued to grow.

What suggestions does anyone have on getting this node removed from my ring
so I can rebuild it with the correct number of tokens, before I end up with
a disk space issue from too many vnodes.


Re: Node failing to decomission (vnodes and 1.2.5)

2013-06-18 Thread David McNelis
Never saw "decommissioned" in the logs, status continues to says "UL" on
status.

Removenode sounds like its likely to get the job done for us at this point.

Thanks.

David


On Tue, Jun 18, 2013 at 3:10 AM, aaron morton wrote:

> I also am not seeing anything in the nodes log files to suggest errors
> during streaming or leaving.
>
> You should see a log message saying "DECOMMISSIONED" when the process
> completes.
>
> What does nodetool status say?
>
> What suggestions does anyone have on getting this node removed from my
> ring so I can rebuild it with the correct number of tokens, before I end up
> with a disk space issue from too many vnodes.
>
> If you really want to get the node out of there shut it down and run
> nodetool removenode on one of the remaining nodes.
>
> Cheers
>
>
> -
> Aaron Morton
> Freelance Cassandra Consultant
> New Zealand
>
> @aaronmorton
> http://www.thelastpickle.com
>
> On 18/06/2013, at 2:59 PM, David McNelis  wrote:
>
> I have a node in my ring (1.2.5) that when it was set up, had the wrong
> number of vnodes assigned (double the amount it should have had).
>
> As  a result, and because we can't reduce the number of vnodes on a
> machine (at least at this point), I need to decommission the node.
>
> The problem is that we've tried running decommission several times.  In
> each instance we'll have a lot of streams to other nodes for a period, and
> then eventually, netstats will tell us:
>
> nodetool -h localhost netstats
> Mode: LEAVING
>  Nothing streaming to /10.x.x.1
>  Nothing streaming to /10.x.x.2
>  Nothing streaming to /10.x.x.3
> Not receiving any streams.
> Pool NameActive   Pending  Completed
> Commandsn/a 0 955991
> Responses   n/a 02947860
>
> I also am not seeing anything in the nodes log files to suggest errors
> during streaming or leaving.
>
> Then the node will stay in this leaving state for... well, we gave up
> after several days of no more activity and retried several times.  Each
> time we "gave up" on it, we restarted the service and it was no longer
> listed as Leaving, just active.  Even when in a "leaving" state, the size
> of data on the node continued to grow.
>
> What suggestions does anyone have on getting this node removed from my
> ring so I can rebuild it with the correct number of tokens, before I end up
> with a disk space issue from too many vnodes.
>
>
>


Re: Date range queries

2013-06-19 Thread David McNelis
I think you'd just be better served with just a little different primary
key.

If your primary key was (user_id, created_at)  or (user_id, created_at,
question_id), then you'd be able to run the above query without a problem.

This will mean that the entire pantheon of a specific user_id will be
stored as a 'row' (in the old style C* vernacular), and then the
information would be ordered by the 2nd piece of the primary key (or 2nd,
then 3rd if you included question_id).

You would certainly want to include any field that makes a record unique in
the primary key.  Another thing to note is that if a field is part of the
primary key you can not create a secondary index on that field.  You can
work around that by storing the field twice, but you might want to rethink
your structure if you find yourself doing that often.


On Wed, Jun 19, 2013 at 12:05 PM, Christopher J. Bottaro <
cjbott...@academicworks.com> wrote:

> Hello,
>
> We are considering using Cassandra and I want to make sure our use case
> fits Cassandra's strengths.  We have the table like:
>
> answers
> ---
> user_id | question_id | result | created_at
>
> Where our most common query will be something like:
>
> SELECT * FROM answers WHERE user_id = 123 AND created_at > '01/01/2012'
> AND created_at < '01/01/2013'
>
> Sometimes we will also limit by a question_id or a list of question_ids.
>
> Secondary indexes will be created on user_id and question_id.  We expect
> the upper bound of number of answers for a given user to be around 10,000.
>
> Now my understanding of how Cassandra will run the aforementioned query is
> that it will load all the answers for a given user into memory using the
> secondary index, then scan over that set filtering based on the dates.
>
> Considering that that will be our most used query and it will happen very
> often, is this a bad use case for Cassandra?
>
> Thanks for the help.
>


Re: Date range queries

2013-06-19 Thread David McNelis
So, if you want to grab by the created_at and occasionally limit by
question id, that is why you'd use created_at.

The way the primary keys work is the first part of the primary key is the
Partioner key, that field is what essentially is the single cassandra row.
 The second key is the order preserving key, so you can sort by that key.
 If you have a third piece, then that is the secondary order preserving key.

The reason you'd want to do (user_id, created_at, question_id) is because
when you do a query on the keys, if you MUST use the preceding pieces of
the primary key.  So in your case, you could not do a query with just
user_id and question_id with the user-created-question key.  Alternatively
if you went with (user_id, question_id, created_at), you would not be able
to include a range of created_at unless you were also filtering on the
question_id.

Does that make sense?

As for the large rows, 10k is unlikely to cause you too many issues (unless
the answer is potentially a big blob of text).  Newer versions of cassandra
deal with a lot of things in far, far, superior ways to < 1.0.

For a really good primary on keys in cql and how to potentially avoid hot
rows, a really good article to read is this one:
http://thelastpickle.com/2013/01/11/primary-keys-in-cql/  Aaron did a great
job of laying out the subtleties of primary keys in CQL.


On Wed, Jun 19, 2013 at 2:21 PM, Christopher J. Bottaro <
cjbott...@academicworks.com> wrote:

> Interesting, thank you for the reply.
>
> Two questions though...
>
> Why should created_at come before question_id in the primary key?  In
> other words, why (user_id, created_at, question_id) instead of (user_id,
> question_id, created_at)?
>
> Given this setup, all a user's answers (all 10k) will be stored in a
> single C* (internal, not cql) row?  I thought having "fat" or "big" rows
> was bad.  I worked with Cassandra 0.6 at my previous job and given the
> nature of our work, we would sometimes generate these "fat" rows... at
> which point Cassandra would basically shit the bed.
>
> Thanks for the help.
>
>
> On Wed, Jun 19, 2013 at 12:26 PM, David McNelis wrote:
>
>> I think you'd just be better served with just a little different primary
>> key.
>>
>> If your primary key was (user_id, created_at)  or (user_id, created_at,
>> question_id), then you'd be able to run the above query without a problem.
>>
>> This will mean that the entire pantheon of a specific user_id will be
>> stored as a 'row' (in the old style C* vernacular), and then the
>> information would be ordered by the 2nd piece of the primary key (or 2nd,
>> then 3rd if you included question_id).
>>
>> You would certainly want to include any field that makes a record unique
>> in the primary key.  Another thing to note is that if a field is part of
>> the primary key you can not create a secondary index on that field.  You
>> can work around that by storing the field twice, but you might want to
>> rethink your structure if you find yourself doing that often.
>>
>>
>> On Wed, Jun 19, 2013 at 12:05 PM, Christopher J. Bottaro <
>> cjbott...@academicworks.com> wrote:
>>
>>> Hello,
>>>
>>> We are considering using Cassandra and I want to make sure our use case
>>> fits Cassandra's strengths.  We have the table like:
>>>
>>> answers
>>> ---
>>> user_id | question_id | result | created_at
>>>
>>> Where our most common query will be something like:
>>>
>>> SELECT * FROM answers WHERE user_id = 123 AND created_at > '01/01/2012'
>>> AND created_at < '01/01/2013'
>>>
>>> Sometimes we will also limit by a question_id or a list of question_ids.
>>>
>>> Secondary indexes will be created on user_id and question_id.  We expect
>>> the upper bound of number of answers for a given user to be around 10,000.
>>>
>>> Now my understanding of how Cassandra will run the aforementioned query
>>> is that it will load all the answers for a given user into memory using the
>>> secondary index, then scan over that set filtering based on the dates.
>>>
>>> Considering that that will be our most used query and it will happen
>>> very often, is this a bad use case for Cassandra?
>>>
>>> Thanks for the help.
>>>
>>
>>
>


Re: Node tokens / data move

2013-07-16 Thread David McNelis
Eric,

Unfortunately if you've got a non-vnode cluster and are trying to convert,
you are likely going to at least want, if not have to, run shuffle.  It
isn't a pleasant situation when you run into that because in order for the
shuffle to execute safely and successfully you need to have essentially
2x's the disk space as the size of your data at a minimum because no nodes
are removed from the original node until a cleanup is called.

This also means that other cass operations that cause disk usage to ballon
are competing for space with the shuffle process and boom, like that, out
of disk space.

David


On Tue, Jul 16, 2013 at 8:35 AM, Eric Stevens  wrote:

> vnodes currently do not brings any noticeable benefits to outweight trouble
>
>
> The main advantage of vnodes is that it lets you have flexibility with
> respect to adding and removing nodes from your cluster without having to
> rebalance your cluster (issuing a lot of moves).  A shuffle is a lot of
> moves too, so the only reason to do this is if you've discovered that the
> random allocation of vnodes has managed to leave an unbalanced cluster (one
> node either has an unusually large load, or an unusually small one).
>
> Shuffling isn't something you should be doing as a matter of course, and
> with 256 vnodes per server and 3+ servers, the chances of a brokenly
> unbalanced cluster is more likely the cause of bad data partitioning
> (extremely unbalanced row sizes) than of vnode token placement.  With
> unbalanced rows, nothing will solve balance problems except finding a
> different way to partition your data across rows.
>
>
>
> On Mon, Jul 15, 2013 at 7:10 AM, Radim Kolar  wrote:
>
>>
>>  My understanding is that it is not possible to change the number of
>>> tokens after the node has been initialized.
>>>
>> that was my conclusion too. vnodes currently do not brings any noticeable
>> benefits to outweight trouble. shuffle is very slow in large cluster.
>> Recovery is faster with vnodes but i have very few node failures per year.
>>
>
>


Re: cassandra 1.2.5- virtual nodes (num_token) pros/cons?

2013-07-26 Thread David McNelis
I second Romain, do the upgrade and make sure the health is good first.

If you have or plan to have a large number of nodes, you might consider
using fewer than 256 as your initial vnodes amount.  I think that number is
inflated from reasonable in the docs, as we've had some people talk about
potential performance degradation if you have a large number of nodes and a
very high number of vnodes, if I had it to do over again, I'd have done 64
vnodes as my default (across 20 nodes).

Another thing to be very cognizant of before shuffle is disk space.  You
*must* have less than 50% used in order to do the shuffle successfully
because no data is removed (cleaned) from a node during the shuffle process
and the shuffle process essentially doubles the amount of data until you're
able to run a clean.


On Fri, Jul 26, 2013 at 11:25 AM, Romain HARDOUIN  wrote:

> Vnodes are a great feature. More nodes are involved during operations such
> as bootstrap, decommission, etc.
> DataStax documentation is definitely a must read.
> That said, If I were you, I'd wait somewhat before to shuffle the ring.
> I'd focus on cluster upgrade and monitoring the nodes. (number of files
> handles, memory usage, latency, etc).
> Upgrading from 0.8 to 1.2 can be tricky, there are so many changes since
> then. Be careful about compaction strategies you choose and double check
> the options.
>
> Regards,
> Romain
>
> rash aroskar  a écrit sur 25/07/2013 23:25:11 :
>
> > De : rash aroskar 
> > A : user@cassandra.apache.org,
> > Date : 25/07/2013 23:25
> > Objet : cassandra 1.2.5- virtual nodes (num_token) pros/cons?
> >
> > Hi,
> > I am upgrading my cassandra cluster from 0.8 to 1.2.5.
> > In cassandra 1.2.5 the 'num_token' attribute confuses me.
> > I understand that it distributes multiple tokens per node but I am
> > not clear how that is helpful for performance or load balancing. Can
> > anyone elaborate? has anyone used this feature  and knows its
> > advantages/disadvantages?
> >
> > Thanks,
> > Rashmi
>


deb packages (and older versions)

2013-08-01 Thread David McNelis
Hey folks,

Because 1.2.8 hasn't been pushed to the repo yet, I see that I can pick
up the package at http://people.apache.org/~eevans/ and install it
manually.  This is great.  I'm wondering though, is there a place where
I can pick up Debian packages for older releases?  I definitely prefer
the package install, but sometimes when we add new nodes to our ring the
only package available is the newest one, which doesn't match the rest
of our nodes.


Re: deb packages (and older versions)

2013-08-01 Thread David McNelis
Thanks, fwiw, did I just blatantly miss some documentation saying those
existed there?


On Thu, Aug 1, 2013 at 3:32 PM, Blair Zajac  wrote:

> On 08/01/2013 12:27 PM, David McNelis wrote:
>
>> Hey folks,
>>
>> Because 1.2.8 hasn't been pushed to the repo yet, I see that I can pick
>> up the package at 
>> http://people.apache.org/~**eevans/<http://people.apache.org/~eevans/>and 
>> install it
>> manually.  This is great.  I'm wondering though, is there a place where
>> I can pick up Debian packages for older releases?  I definitely prefer
>> the package install, but sometimes when we add new nodes to our ring the
>> only package available is the newest one, which doesn't match the rest
>> of our nodes.
>>
>
> DataStax maintains a repo that has old versions:
>
> http://debian.datastax.com/**community/pool/<http://debian.datastax.com/community/pool/>
>
> Blair
>
>
>


System hints compaction stuck

2013-08-07 Thread David McNelis
Morning folks,

For the last couple of days all of my nodes (17, all running 1.2.8) have
been stuck at various percentages of completion for compacting
system.hints.  I've tried restarting the nodes (including a full rolling
restart of the cluster) to no avail.

When I turn on Debugging I am seeing this error on all of the nodes
constantly:

DEBUG 09:03:21,999 Thrift transport error occurred during processing of
message.
org.apache.thrift.transport.TTransportException
at
org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
at
org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at
org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129)
at
org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)
at
org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at
org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
at
org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
at
org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:22)
at
org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)


When I turn on tracing, I see that shortly after this error there is a
message similar to:
TRACE 09:03:22,000 ClientState removed for socket addr /10.55.56.211:35431

The IP in this message is sometimes a client machine, sometimes another
cassandra node with no processes other than C* running on it (which I think
rules out an issue with a particular client library doing something funny
with Thrift).

While I wouldn't expect a Thrift issue to cause problems with compaction,
I'm out of other ideas at the moment.  Anyone have any thoughts they could
share?

Thanks,
David


Re: System hints compaction stuck

2013-08-07 Thread David McNelis
Nate,

We had a node that was flaking on us last week and had a lot of handoffs
fail to that node.  We ended up decommissioning that node entirely.  I
can't find the actual error we were getting at the time (logs have been
rotated out), but currently we're not seeing any errors there.

We haven't had any schema updates recently and we are using the sync rpc
server.  We had hsha turned on for a while, but we were getting a bunch of
transport frame size errors.


On Wed, Aug 7, 2013 at 1:55 PM, Nate McCall  wrote:

> Thrift and ClientState are both unrelated to hints.
>
> What do you see in the logs after "Started hinted handoff for
> host:..." from HintedHandoffManager?
>
> It should either have an error message or something along the lines of
> "Finished hinted handoff of:..."
>
> Where there any schema updates that preceded this happening?
>
> As for the thrift stuff, which rpc_server_type are you using?
>
>
>
> On Wed, Aug 7, 2013 at 6:14 AM, David McNelis  wrote:
> > Morning folks,
> >
> > For the last couple of days all of my nodes (17, all running 1.2.8) have
> > been stuck at various percentages of completion for compacting
> system.hints.
> > I've tried restarting the nodes (including a full rolling restart of the
> > cluster) to no avail.
> >
> > When I turn on Debugging I am seeing this error on all of the nodes
> > constantly:
> >
> > DEBUG 09:03:21,999 Thrift transport error occurred during processing of
> > message.
> > org.apache.thrift.transport.TTransportException
> > at
> >
> org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
> > at
> > org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
> > at
> >
> org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129)
> > at
> >
> org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)
> > at
> > org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
> > at
> >
> org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
> > at
> >
> org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
> > at
> >
> org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
> > at
> org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:22)
> > at
> >
> org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> > at java.lang.Thread.run(Thread.java:724)
> >
> >
> > When I turn on tracing, I see that shortly after this error there is a
> > message similar to:
> > TRACE 09:03:22,000 ClientState removed for socket addr /
> 10.55.56.211:35431
> >
> > The IP in this message is sometimes a client machine, sometimes another
> > cassandra node with no processes other than C* running on it (which I
> think
> > rules out an issue with a particular client library doing something funny
> > with Thrift).
> >
> > While I wouldn't expect a Thrift issue to cause problems with compaction,
> > I'm out of other ideas at the moment.  Anyone have any thoughts they
> could
> > share?
> >
> > Thanks,
> > David
>


Re: System hints compaction stuck

2013-08-07 Thread David McNelis
Fwiw, similar to another issue of stuck compaction that was on the list
several days ago, if I cleared out the hints, either by removing files
while node was down, or running a scrub on system.hints during node
startup, I was able to get these compactions cleared, an the nodes are
starting to get caught up on tasks that had been blocked.

Nate, there are definiately a number of things that could be hitting the
9160 port... but I was seeing the transport size error even between nodes
(and there was nothing runnining on any node other than C*)... switching
back to sync and no longer get that error.


On Wed, Aug 7, 2013 at 2:58 PM, Nate McCall  wrote:

> Is there anything else on the network that could be attempting to
> connect to 9160?
>
> That is the exact error you would get when someone initiates a
> connection and sends a null byte. You can reproduce it thusly:
> echo -n 'm' | nc localhost 9160
>
>
> On Wed, Aug 7, 2013 at 11:11 AM, David McNelis  wrote:
> > Nate,
> >
> > We had a node that was flaking on us last week and had a lot of handoffs
> > fail to that node.  We ended up decommissioning that node entirely.  I
> can't
> > find the actual error we were getting at the time (logs have been rotated
> > out), but currently we're not seeing any errors there.
> >
> > We haven't had any schema updates recently and we are using the sync rpc
> > server.  We had hsha turned on for a while, but we were getting a bunch
> of
> > transport frame size errors.
> >
> >
> > On Wed, Aug 7, 2013 at 1:55 PM, Nate McCall  wrote:
> >>
> >> Thrift and ClientState are both unrelated to hints.
> >>
> >> What do you see in the logs after "Started hinted handoff for
> >> host:..." from HintedHandoffManager?
> >>
> >> It should either have an error message or something along the lines of
> >> "Finished hinted handoff of:..."
> >>
> >> Where there any schema updates that preceded this happening?
> >>
> >> As for the thrift stuff, which rpc_server_type are you using?
> >>
> >>
> >>
> >> On Wed, Aug 7, 2013 at 6:14 AM, David McNelis 
> wrote:
> >> > Morning folks,
> >> >
> >> > For the last couple of days all of my nodes (17, all running 1.2.8)
> have
> >> > been stuck at various percentages of completion for compacting
> >> > system.hints.
> >> > I've tried restarting the nodes (including a full rolling restart of
> the
> >> > cluster) to no avail.
> >> >
> >> > When I turn on Debugging I am seeing this error on all of the nodes
> >> > constantly:
> >> >
> >> > DEBUG 09:03:21,999 Thrift transport error occurred during processing
> of
> >> > message.
> >> > org.apache.thrift.transport.TTransportException
> >> > at
> >> >
> >> >
> org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
> >> > at
> >> > org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
> >> > at
> >> >
> >> >
> org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129)
> >> > at
> >> >
> >> >
> org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)
> >> > at
> >> > org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
> >> > at
> >> >
> >> >
> org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
> >> > at
> >> >
> >> >
> org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
> >> > at
> >> >
> >> >
> org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
> >> > at
> >> > org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:22)
> >> > at
> >> >
> >> >
> org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199)
> >> > at
> >> >
> >> >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> >> > at
> >> >
> >> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> >> > at java.lang.Thread.run(Thread.java:724)
> >> >
> >> >
> >> > When I turn on tracing, I see that shortly after this error there is a
> >> > message similar to:
> >> > TRACE 09:03:22,000 ClientState removed for socket addr
> >> > /10.55.56.211:35431
> >> >
> >> > The IP in this message is sometimes a client machine, sometimes
> another
> >> > cassandra node with no processes other than C* running on it (which I
> >> > think
> >> > rules out an issue with a particular client library doing something
> >> > funny
> >> > with Thrift).
> >> >
> >> > While I wouldn't expect a Thrift issue to cause problems with
> >> > compaction,
> >> > I'm out of other ideas at the moment.  Anyone have any thoughts they
> >> > could
> >> > share?
> >> >
> >> > Thanks,
> >> > David
> >
> >
>


Re: Any good GUI based tool to manage data in Casandra?

2013-08-09 Thread David McNelis
Is DevCenter a project that might end up open sourced?  The original blog
post calls it free, and if its destined to stay so, I'd think that would be
a benefit (being OSS) to the community at large.


On Fri, Aug 9, 2013 at 1:02 PM, Rahul Gupta  wrote:

>  Hello,
>
> ** **
>
> Is there backward compatibility planned for DataStax DevCenter.
>
> I am using DSE 3.0.1 and Cassandra 1.1.9.7
>
> ** **
>
> Currently no plan to upgrade to C* 1.2.
>
> ** **
>
> Thanks,
>
> *Rahul Gupta*
> *DEKA* *Research & Development* 
>
> 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:* Alex Popescu [mailto:al...@datastax.com]
> *Sent:* Friday, August 09, 2013 12:47 AM
> *To:* user@cassandra.apache.org; Tony Anecito
>
> *Subject:* Re: Any good GUI based tool to manage data in Casandra?
>
>  ** **
>
> I've seen your email last week and saved it to ping you about DevCenter:
> http://www.datastax.com/dev/blog/introducing-datastax-devcenter. Please
> keep in mind that this is just the first version and we need
> suggestions/bug reports/etc.
>
> ** **
>
> :- a)
>
> ** **
>
> On Wed, Aug 7, 2013 at 11:18 AM, Tony Anecito  wrote:
> 
>
> Thanks Nick for your reply. Good to know that. I knew OpsCenter was mainly
> schema management.
>
> Best Regards,
> -Tony
>
> ** **
>
> ** **
>--
>
> *From:* Nick Bailey 
> *To:* user@cassandra.apache.org
> *Sent:* Wednesday, August 7, 2013 12:04 PM
>
>
> *Subject:* Re: Any good GUI based tool to manage data in Casandra?
>
> ** **
>
> OpsCenter allows CRUD of column families  themselves (although not CQL3
> column families). It only allows viewing the data inside column families
> though, no support for writing or updating.
>
> ** **
>
> On Wed, Aug 7, 2013 at 12:54 PM, Aaron Morton 
> wrote:
>
> I think on of the versions of ops centre has the feature
> http://www.datastax.com/what-we-offer/products-services/datastax-opscenter
> 
>
> ** **
>
> otherwise people use the cassandra-cli or cqlsh. 
>
> ** **
>
> Cheers
>
> ** **
>
> -
>
> Aaron Morton
>
> Cassandra Consultant
>
> New Zealand
>
> ** **
>
> @aaronmorton
>
> http://www.thelastpickle.com
>
> ** **
>
> On 7/08/2013, at 1:28 AM, Tony Anecito  wrote:
>
>
>
> 
>
> Thanks Aaron. I found that before I asked the question and Helenos seems
> the closest but it does not allow you to easily use CRUD like say SQL
> Server Management tools where you can get a list of say 1,000 records in a
> grid control and select rows for deletion or insert or update.
>
>  
>
> I will look closer at that one since this is the reply from the team but
> if users on this email list have other suggestions please do not hesitate
> to reply.
>
>  
>
> Many Thanks,
>
> -Tony
>
> ** **
>
> *From:* Aaron Morton 
> *To:* Cassandra User 
> *Sent:* Tuesday, August 6, 2013 1:38 AM
> *Subject:* Re: Any good GUI based tool to manage data in Casandra?
>
> ** **
>
> There is a list here.  
>
> ** **
>
> http://wiki.apache.org/cassandra/Administration%20Tools
>
> ** **
>
> Cheers
>
> ** **
>
> -
>
> Aaron Morton
>
> Cassandra Consultant
>
> New Zealand
>
> ** **
>
> @aaronmorton
>
> http://www.thelastpickle.com/
>
> ** **
>
> On 3/08/2013, at 6:19 AM, Tony Anecito  wrote:
>
>
>
> 
>
> Hi All,
>
> ** **
>
> Is there a GUI tool for managing data in Cassandra database? I have google
> and seen tools but they seem to be schema management or explorer to just
> view data. IT would be great to delete/inset rows or update values for a
> column via GUI.
>
>
> Thanks,
>
> -Tony
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
>
>
> 
>
> ** **
>
> -- 
>
> ** **
>
> :- a)
>
> ** **
>
> ** **
>
> Alex Popescu
>
> Sen. Product Manager @ DataStax
>
> @al3xandru
>
> ** **
>
> Click 
> hereto
>  report this email as spam.
> 
>
> --
> 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 th

Re: Any good GUI based tool to manage data in Casandra?

2013-08-09 Thread David McNelis
Completely understandable.  Thank you for all this work, Alex, et. al.


On Fri, Aug 9, 2013 at 3:27 PM, Alex Popescu  wrote:

>
> On Fri, Aug 9, 2013 at 10:12 AM, David McNelis  wrote:
>
>> Is DevCenter a project that might end up open sourced?  The original blog
>> post calls it free, and if its destined to stay so, I'd think that would be
>> a benefit (being OSS) to the community at large.
>>
>>
>>
> We haven't figured this part yet. DevCenter is still in its infancy and
> we'll be experimenting with different approaches/technologies to allow us
> to build the features we imagined for it. Having the code in the open right
> now doesn't make too much sense.
>
> --
>
> :- a)
>
>
> Alex Popescu
> Sen. Product Manager @ DataStax
> @al3xandru
>


Re: Truncate question

2013-08-29 Thread David McNelis
You would, however, want to clear the snapshot folder afterword, right?  I
thought that truncate, like drop table, created a snapshot (unless that
feature had been disabled in your yaml.


On Thu, Aug 29, 2013 at 6:51 PM, Robert Coli  wrote:

> On Thu, Aug 29, 2013 at 3:48 PM, S C  wrote:
>
>> Do we have to run "nodetool repair" or "nodetool cleanup" after
>> Truncating a Column Family?
>>
>
> No. Why would you?
>
> =Rob
>
>


FSReadError

2013-09-09 Thread David McNelis
Morning,

I'm getting the following error (21 node cluster running 1.2.8)

FSReadError in 
/var/cassandra/data/et/http_request/ks-mycql3table-ic-1799-Data.db
  at 
org.apache.cassandra.io.compress.CompressedRandomAccessReader.reBuffer(CompressedRandomAccessReader.java:93)
at 
org.apache.cassandra.io.util.RandomAccessReader.seek(RandomAccessReader.java:312)
at 
org.apache.cassandra.io.sstable.SSTableScanner.seekTo(SSTableScanner.java:98)
at 
org.apache.cassandra.db.RowIteratorFactory.getIterator(RowIteratorFactory.java:73)
at 
org.apache.cassandra.db.ColumnFamilyStore.getSequentialIterator(ColumnFamilyStore.java:1424)
at 
org.apache.cassandra.db.ColumnFamilyStore.getRangeSlice(ColumnFamilyStore.java:1476)
at 
org.apache.cassandra.service.RangeSliceVerbHandler.executeLocally(RangeSliceVerbHandler.java:46)
at 
org.apache.cassandra.service.RangeSliceVerbHandler.doVerb(RangeSliceVerbHandler.java:58)
at 
org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:56)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.io.IOException: Input/output error
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.FileDispatcherImpl.read(FileDispatcherImpl.java:46)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:225)
at sun.nio.ch.IOUtil.read(IOUtil.java:198)
at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:143)
at 
org.apache.cassandra.io.compress.CompressedRandomAccessReader.decompressChunk(CompressedRandomAccessReader.java:108)
at 
org.apache.cassandra.io.compress.CompressedRandomAccessReader.reBuffer(CompressedRandomAccessReader.java:85)
... 11 more

This starts during compaction and compaction ends up stuck, the node
eventually winds up locked up with this error repeating throughout the
logs, and requires a restart.

On restart I tried running a nodetool scrub against the offending
column family, which itself failed.

Any suggestions on taking care of this? Should I just delete the
sstable and repair? The node keeps starting compactions and running
into this after a period of time.


David


Re: FSReadError

2013-09-09 Thread David McNelis
Looks to be the case, getting an IO error when trying to cp the file.  That
is unfortunate.  On the bright side, now we at least have a more narrow
scope of the problem's source.


On Mon, Sep 9, 2013 at 12:54 PM, Robert Coli  wrote:

> On Mon, Sep 9, 2013 at 6:15 AM, David McNelis  wrote:
>
>> FSReadError in 
>> /var/cassandra/data/et/http_request/ks-mycql3table-ic-1799-Data.db
>>
>>
>
>> Any suggestions on taking care of this? Should I just delete the sstable and 
>> repair? The node keeps starting compactions and running into this after a 
>> period of time.
>>
>>
> Can you interact with the SSTable not-via-Cassandra?
>
> Given that FSReadError very lightly extends FSError which itself is a very
> light extension of the Java builtin IOError, my hunch is that you have disk
> or filesystem level issues.
>
> =Rob
>
>


Re: I don't understand shuffle progress

2013-09-17 Thread David McNelis
Stable loader is the way to go to load up the new cluster.

On Tuesday, September 17, 2013, Juan Manuel Formoso wrote:

> > If your shuffle succeeds, you will be the first reported case of
> shuffle succeeding on a non-test cluster.
>
> Awesome! :O
>
> I'll try to migrate to a new cluster then.
>
> Any better alternatives than creating a small application that reads from
> one cluster and inserts in the new one that anybody can suggest?
>
> On Tuesday, September 17, 2013, Robert Coli wrote:
>
>> On Tue, Sep 17, 2013 at 12:13 PM, Juan Manuel Formoso > >wrote:
>>
>> > I am running shuffle on a cluster after upgrading to 1.2.X, and I don't
>> > understand how to check progress.
>> >
>>
>> If your shuffle succeeds, you will be the first reported case of shuffle
>> succeeding on a non-test cluster. Until I hear a report of someone having
>> real world success, I recommend against using shuffle.
>>
>> If you want to enable vnodes on a cluster with existing data, IMO you
>> should fork writes and bulk load a replacement cluster.
>>
>>
>> > I'm counting the lines of cassandra-shuffle ls, and it decreases VERY
>> > slowly. Sometimes not at all after 24 hours of processing.
>> >
>>
>> I have heard reports of shuffle taking an insanely long amount of time,
>> such as this, as well.
>>
>>
>> > Is that value accurate?
>> >
>>
>> Probably.
>>
>>
>> > Does the shuffle operation supports disabling/re-enabling (or restarting
>> > the cluster) and resuming from the last position? Or does it start over?
>> >
>>
>> Yes, via the arguments "enable" and "disable". "clear" is what you use if
>> you want to clear the queue and start over.
>>
>> Note that once you have started shuffle, you don't want to add/remove a
>> node until the shuffle is complete.
>>
>> https://issues.apache.org/jira/browse/CASSANDRA-5525
>>
>> =Rob
>>
>
>
> --
> *Juan Manuel Formoso
> *Senior Geek
> http://twitter.com/juanformoso
> http://seniorgeek.com.ar
> LLAP
>


Re: I don't understand shuffle progress

2013-09-17 Thread David McNelis
As Rob mentioned, no one (myself included) has successfully used shuffle in
the wild (that I've heard of).

Shuffle is *supposed* to be a transparent background process... and is
designed, in theory, to take a long time to run (weeks is the right way to
think of it).

Be sure to keep an eye on your drive space if you are going to wait it out.
 Unless you have < 1/2 of your drives in use you are going to need to run
cleanup periodically to avoid running out of disk space, because shuffle
NEVER removes data, only makes copies of the data on the new destination
nodes.

I think that is the area that people tend to see the most failures, because
the newer versions of cassandra can survive OK with more than 1/2 the disk
in use, more and more people are using > 50% of their disks.


On Tue, Sep 17, 2013 at 9:41 PM, Paulo Motta wrote:

> That is very disappointing to hear. Vnodes support is one of the main
> reasons we're upgrading from 1.1.X to 1.2.X.
>
> So you're saying the only feasible way of enabling VNodes on an upgraded
> C* 1.2 is by doing fork writes to a brand new cluster + bulk load of
> sstables from the old cluster? Or is it possible to succeed on shuffling,
> even if that means waiting some weeks for the shuffle to complete?
>
>
> 2013/9/17 Robert Coli 
>
>> On Tue, Sep 17, 2013 at 4:00 PM, Juan Manuel Formoso > >wrote:
>>
>> > Any better alternatives than creating a small application that reads
>> from
>> > one cluster and inserts in the new one that anybody can suggest?
>> >
>> >
>> http://www.palominodb.com/blog/2012/09/25/bulk-loading-options-cassandra
>>
>> In theory if you wanted to do the "copy-the-files" method while enabling
>> vnodes on the target cluster, you could :
>>
>> 1) create new target cluster with vnodes enabled
>> 2) fork writes so they go to both source and target cluster
>> 3) copy 100% of sstables from all source nodes to all target nodes (being
>> sure to ensure non-collision of sstables of names, probably by adding a
>> few
>> hundreds/thousands to the sequence of various nodes in a predictable
>> fashion)
>> 4) be certain that you did not accidentally resurrect data from purged
>> source sstables in 3)
>> 5) run cleanup compaction on all nodes in target cluster
>> 6) turn off writes to old source cluster
>>
>> =Rob
>> * notes that this process would make a good blog post.. :D
>>
>
>
>
> --
> Paulo Ricardo
>
> --
> European Master in Distributed Computing***
> Royal Institute of Technology - KTH
> *
> *Instituto Superior Técnico - IST*
> *http://paulormg.com*
>


Re: cassandra not responding, log full of gc invocations

2013-09-18 Thread David McNelis
It is a little more involved than just changing the heap size.  Every
cluster is different, so there isn't much of a set formula.  Some areas to
look into, though:

**Caveat, we're still running in the 1.2 branch and 2.0 has some
differences in what is on versus off heap memory usage, but the basic ideas
should remain the same.**

1) What do you have your memtables set to flush, default, I believe, is 75%
of heap space, lowering this amount is a safety valve, but not a silver
bullet. (From the yaml docs:  Setting this lower than
CMSInitiatingOccupancyFraction is not likely to be useful)
2) Second emergency valve (also from the yaml docs) is the defaults of
reduce_cache_sizes_at: 0.85
reduce_cache_capacity_to: 0.6
Similar to flushing memtables, setting it lower than your CMSIOF is likely
not going to give you much gains.

3) Version of java and the garbage collector you are using can make a
pretty big difference.
  a)  Be sure to use Sun's JDK, not OpenJDK
  b)  Some people have had better experience using Java 7 (we are using it
and are pretty happy with the results so far), but it is not officially
supported yet
  c) You can try using GarbageFirst as your GC... We tried this and while
it didn't cause us problems, it didn't end up being the solution
  d) Play with the GC params in cassandra-env.sh on a single node or test
node and see what happens.  For our installation, we've found a sweet spot
of:

VM_OPTS="$JVM_OPTS -XX:+UseParNewGC"
JVM_OPTS="$JVM_OPTS -XX:+UseConcMarkSweepGC"
JVM_OPTS="$JVM_OPTS -XX:+CMSParallelRemarkEnabled"
JVM_OPTS="$JVM_OPTS -XX:SurvivorRatio=8"
JVM_OPTS="$JVM_OPTS -XX:MaxTenuringThreshold=1"
JVM_OPTS="$JVM_OPTS -XX:CMSInitiatingOccupancyFraction=50"
JVM_OPTS="$JVM_OPTS -XX:+UseCMSInitiatingOccupancyOnly"
JVM_OPTS="$JVM_OPTS -XX:+CMSIncrementalMode"
JVM_OPTS="$JVM_OPTS -XX:+CMSIncrementalPacing"
JVM_OPTS="$JVM_OPTS -XX:CMSIncrementalDutyCycleMin=0"
JVM_OPTS="$JVM_OPTS -XX:+CMSIncrementalDutyCycle=10"

with an 8gb heap size on 16gb ram.

One thing to keep in mind before setting a high heap size is that you are,
in many cases, delaying your problem... it will just take longer before you
get stuck in GC hell. The nice thing about smaller heaps is that there
isn't as much GC to be done because there isn't as much ram to be collected.

Last, prior to G1 in Java 7, its been pretty widely documented that GC
performance starts to drop dramatically when the heap is > 8gb.   The
algorithm in G1 is supposed to be much better at handling this than the
other options, so if you've got a shit-ton of ram available, that might be
something worth looking into.


On Wed, Sep 18, 2013 at 8:10 AM, Alexander Shutyaev wrote:

> Hi all!
>
> We have a problem with cassandra 2.0. We have installed cassandra from
> datastax community respository. We haven't changed any java options from
> the default ones. De-facto Xmx is 1GB. Recently we have encountered a
> couple of cases when cassandra stopped responding and the log was showing
> some constant gc activity. My assumption is that the reason we are having
> this is because of low Xmx. Although we don't have much load on this server
> we do have a lot of column families (cql tables). If I understand correctly
> each column family takes some memory for service purposes. Is that so? Is
> there any Xmx recommendation formula that takes into account the column
> family count and the read/write ops?
>
> Thanks in advance!
>


Re: Multiple indexes - how does Cassandra handle these internally?

2011-01-23 Thread David McNelis
Silly question, M us thousand or million?  In print, thousand is M, fwiw

Sent from my Droid
On Jan 23, 2011 7:26 PM, "Maxim Potekhin"  wrote:
> Aaron -- thanks!
>
> I don't have examples like Timo.
>
> But,
>
> I'm keen to use multiple indices over a database
> of 300M rows.
>
>
> Maxim
>
>
> On 1/23/2011 3:28 PM, Aaron Morton wrote:
>> Timo / Maxim
>> Could you provide a more concrete example and I'll try to look into it
tonight.
>>
>> Cheers
>> Aaron
>>
>>
>> On 22/01/2011, at 5:01 AM, Maxim Potekhin wrote:
>>
>>> Well it does sound like a bug in Cassandra. Indexes MUST commute.
>>>
>>> I really need this functionality, it's a show stopper for me...
>>>
>>> On 1/21/2011 10:56 AM, Timo Nentwig wrote:
 On Jan 21, 2011, at 16:46, Maxim Potekhin wrote:

> But Timo, this is even more mysterious! If both conditions are met, at
least
> something must be returned in the second query. Have you tried this in
CLI?
> That would allow you to at least alleviate client concerns.
 I did this on the CLI only so far. So value comparison on the index
seems to be done differently than in the nested loop...or something. Don't
know, don't know the code base well enough to debug this down to the very
bottom either. But it's actually only a CF with 2 cols (AsciiType and
IntegerType) and a command in the CLI so not too time-consuming to
reproduce.
>


Re: Multiple indexes - how does Cassandra handle these internally?

2011-01-23 Thread David McNelis
No worries, I am in the states too.

Sent from my Droid
On Jan 23, 2011 8:05 PM, "Maxim Potekhin"  wrote:
> Not silly at all, sorry for eschewing clarity in Latin usage:
>
> millions, not thousands.
>
> Here in the States, we typically use M for millions.
> Anyhow, my system generates 1 million (large) records every three days,
>
> Cheers,
> Maxim
>
>
>
> On 1/23/2011 8:35 PM, David McNelis wrote:
>>
>> Silly question, M us thousand or million? In print, thousand is M, fwiw
>>
>> Sent from my Droid
>>
>> On Jan 23, 2011 7:26 PM, "Maxim Potekhin" > <mailto:potek...@bnl.gov>> wrote:
>> > Aaron -- thanks!
>> >
>> > I don't have examples like Timo.
>> >
>> > But,
>> >
>> > I'm keen to use multiple indices over a database
>> > of 300M rows.
>> >
>> >
>> > Maxim
>> >
>> >
>> > On 1/23/2011 3:28 PM, Aaron Morton wrote:
>> >> Timo / Maxim
>> >> Could you provide a more concrete example and I'll try to look into
>> it tonight.
>> >>
>> >> Cheers
>> >> Aaron
>> >>
>> >>
>> >> On 22/01/2011, at 5:01 AM, Maxim Potekhin> <mailto:potek...@bnl.gov>> wrote:
>> >>
>> >>> Well it does sound like a bug in Cassandra. Indexes MUST commute.
>> >>>
>> >>> I really need this functionality, it's a show stopper for me...
>> >>>
>> >>> On 1/21/2011 10:56 AM, Timo Nentwig wrote:
>> >>>> On Jan 21, 2011, at 16:46, Maxim Potekhin wrote:
>> >>>>
>> >>>>> But Timo, this is even more mysterious! If both conditions are
>> met, at least
>> >>>>> something must be returned in the second query. Have you tried
>> this in CLI?
>> >>>>> That would allow you to at least alleviate client concerns.
>> >>>> I did this on the CLI only so far. So value comparison on the
>> index seems to be done differently than in the nested loop...or
>> something. Don't know, don't know the code base well enough to debug
>> this down to the very bottom either. But it's actually only a CF with
>> 2 cols (AsciiType and IntegerType) and a command in the CLI so not too
>> time-consuming to reproduce.
>> >
>


Re: Schema Question

2011-01-25 Thread David McNelis
oup nor the sender accepts any responsibility for viruses and
> it is the responsibility of the recipient to ensure that the onward
> transmission, opening or use of this message and any attachments will not
> adversely affect its systems or data. Anyone who communicates with us by
> email is taken to accept these risks. Opinions, conclusions and other
> information contained in this message that do not relate to the official
> business of the WorldPay Group shall not be understood as endorsed or given
> by it.
>
>


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

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


Re: Schema Design

2011-01-26 Thread David McNelis
I would say in that case you might want  to try a  single column family
where the key to the column is the system name.

Then, you could name your columns as the timestamp.  Then when retrieving
information from the data store you can can, in your slice request, specify
your start column as  X and end  column as Y.

Then you can use the stored column name to know when an event  occurred.

On Wed, Jan 26, 2011 at 2:56 PM, Bill Speirs  wrote:

> I'm looking to use Cassandra to store log messages from various
> systems. A log message only has a message (UTF8Type) and a data/time.
> My thought is to create a column family for each system. The row key
> will be a TimeUUIDType. Each row will have 7 columns: year, month,
> day, hour, minute, second, and message. I then have indexes setup for
> each of the date/time columns.
>
> I was hoping this would allow me to answer queries like: "What are all
> the log messages that were generated between X & Y?" The problem is
> that I can ONLY use the equals operator on these column values. For
> example, I cannot issuing: get system_x where month > 1; gives me this
> error: "No indexed columns present in index clause with operator EQ."
> The equals operator works as expected though: get system_x where month
> = 1;
>
> What schema would allow me to get date ranges?
>
> Thanks in advance...
>
> Bill-
>
> * ColumnFamily description *
>ColumnFamily: system_x_msg
>  Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
>  Row cache size / save period: 0.0/0
>  Key cache size / save period: 20.0/3600
>  Memtable thresholds: 1.1671875/249/60
>  GC grace seconds: 864000
>  Compaction min/max thresholds: 4/32
>  Read repair chance: 1.0
>  Built indexes: [proj_1_msg.646179, proj_1_msg.686f7572,
> proj_1_msg.6d696e757465, proj_1_msg.6d6f6e7468,
> proj_1_msg.7365636f6e64, proj_1_msg.79656172]
>  Column Metadata:
>Column Name: year (year)
>  Validation Class: org.apache.cassandra.db.marshal.IntegerType
>  Index Type: KEYS
>Column Name: month (month)
>  Validation Class: org.apache.cassandra.db.marshal.IntegerType
>  Index Type: KEYS
>Column Name: second (second)
>  Validation Class: org.apache.cassandra.db.marshal.IntegerType
>  Index Type: KEYS
>Column Name: minute (minute)
>  Validation Class: org.apache.cassandra.db.marshal.IntegerType
>  Index Type: KEYS
>Column Name: hour (hour)
>  Validation Class: org.apache.cassandra.db.marshal.IntegerType
>  Index Type: KEYS
>Column Name: day (day)
>  Validation Class: org.apache.cassandra.db.marshal.IntegerType
>  Index Type: KEYS
>



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

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


Re: Schema Design

2011-01-26 Thread David McNelis
My cli knowledge sucks so far, so I'll leave that  to othersI'm doing
most of my reading/writing through a thrift client (hector/java based)

As for the implications, as of the latest version of Cassandra there is not
theoretical limit to the number of columns that a particular row can hold.
 Over time you've got a couple of different options, if you're concerned
that you end up with too many columns to manage then you'd probably want to
start thinking about a warehousing strategy long-term for your older records
that involves expiring columns that are older than X in your Cassandra
cluster.  But for the most part you shouldn't *need* to do that.



On Wed, Jan 26, 2011 at 3:23 PM, Bill Speirs  wrote:

> I like this approach, but I have 2 questions:
>
> 1) what is the implications of continually adding columns to a single
> row? I'm unsure how Cassandra is able to grow. I realize you can have
> a virtually infinite number of columns, but what are the implications
> of growing the number of columns over time?
>
> 2) maybe it's just a restriction of the CLI, but how do I do issue a
> slice request? Also, what if start (or end) columns don't exist? I'm
> guessing it's smart enough to get the columns in that range.
>
> Thanks!
>
> Bill-
>
> On Wed, Jan 26, 2011 at 4:12 PM, David McNelis
>  wrote:
> > I would say in that case you might want  to try a  single column family
> > where the key to the column is the system name.
> > Then, you could name your columns as the timestamp.  Then when retrieving
> > information from the data store you can can, in your slice request,
> specify
> > your start column as  X and end  column as Y.
> > Then you can use the stored column name to know when an event  occurred.
> >
> > On Wed, Jan 26, 2011 at 2:56 PM, Bill Speirs 
> wrote:
> >>
> >> I'm looking to use Cassandra to store log messages from various
> >> systems. A log message only has a message (UTF8Type) and a data/time.
> >> My thought is to create a column family for each system. The row key
> >> will be a TimeUUIDType. Each row will have 7 columns: year, month,
> >> day, hour, minute, second, and message. I then have indexes setup for
> >> each of the date/time columns.
> >>
> >> I was hoping this would allow me to answer queries like: "What are all
> >> the log messages that were generated between X & Y?" The problem is
> >> that I can ONLY use the equals operator on these column values. For
> >> example, I cannot issuing: get system_x where month > 1; gives me this
> >> error: "No indexed columns present in index clause with operator EQ."
> >> The equals operator works as expected though: get system_x where month
> >> = 1;
> >>
> >> What schema would allow me to get date ranges?
> >>
> >> Thanks in advance...
> >>
> >> Bill-
> >>
> >> * ColumnFamily description *
> >>ColumnFamily: system_x_msg
> >>  Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
> >>  Row cache size / save period: 0.0/0
> >>  Key cache size / save period: 20.0/3600
> >>  Memtable thresholds: 1.1671875/249/60
> >>  GC grace seconds: 864000
> >>  Compaction min/max thresholds: 4/32
> >>  Read repair chance: 1.0
> >>  Built indexes: [proj_1_msg.646179, proj_1_msg.686f7572,
> >> proj_1_msg.6d696e757465, proj_1_msg.6d6f6e7468,
> >> proj_1_msg.7365636f6e64, proj_1_msg.79656172]
> >>  Column Metadata:
> >>Column Name: year (year)
> >>  Validation Class: org.apache.cassandra.db.marshal.IntegerType
> >>  Index Type: KEYS
> >>Column Name: month (month)
> >>  Validation Class: org.apache.cassandra.db.marshal.IntegerType
> >>  Index Type: KEYS
> >>Column Name: second (second)
> >>  Validation Class: org.apache.cassandra.db.marshal.IntegerType
> >>  Index Type: KEYS
> >>Column Name: minute (minute)
> >>  Validation Class: org.apache.cassandra.db.marshal.IntegerType
> >>  Index Type: KEYS
> >>Column Name: hour (hour)
> >>  Validation Class: org.apache.cassandra.db.marshal.IntegerType
> >>  Index Type: KEYS
> >>Column Name: day (day)
> >>  Validation Class: org.apache.cassandra.db.marshal.IntegerType
> >>  Index Type: KEYS
> >
> >
> >
> > --
> > David McNelis
> > Lead Software Engineer
> > Agentis Energy
> > www.agentisenergy.com
> > o: 630.359.6395
> > c: 219.384.5143
> > A Smart Grid technology company focused on helping consumers of energy
> > control an often under-managed resource.
> >
> >
>



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

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


Issues connecting from outside of localhost

2011-03-02 Thread David McNelis
Morning folks,

I'm not sure if this is an issue with my setup of Cassandra, or with
phpCassathere is an open question on StackOverflow that is very similar
to what I am experiencing (1).   In short, I can connect using PHP from the
same machine that Cassandra is running on.  I can connect with cassandra cli
from both the "Cassandra" box and from externally.  However, when I try to
connect using PHP (specifically phpcassa) from an external machine, I get
hit with a Timeout error.

Both machines are running PHP 5.3 on CentOS 5.

In my cassandra.yaml file I tried changing my listen_address to my server's
IP address instead of 127.0.0.1 and that caused me not to be able to connect
in general.  My rpc_address is 0.0.0.0.

Has anyone else experienced this or have an inclination where I'm going
wrong?

Thanks,

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

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


Re: Issues connecting from outside of localhost

2011-03-02 Thread David McNelis
We are able to telnet to port 9160, and didn't have any issues resolving the
target along those lines.  So at this point, I don't think we're looking at
a firewall / network topology issue.

On Wed, Mar 2, 2011 at 8:54 AM, Sasha Dolgy  wrote:

> i had a similar issue on windows and it came down to php not being
> able to resolve the target ... the solution was to add an entry to the
> hosts file ... of course, if there is a firewall blocking ... that's
> your problem.  can you telnet from remote server to cassandra server
> on port 9160?
>
>
> On Wed, Mar 2, 2011 at 3:49 PM, David McNelis
>  wrote:
> > Morning folks,
> > I'm not sure if this is an issue with my setup of Cassandra, or with
> > phpCassathere is an open question on StackOverflow that is very
> similar
> > to what I am experiencing (1).   In short, I can connect using PHP from
> the
> > same machine that Cassandra is running on.  I can connect with cassandra
> cli
> > from both the "Cassandra" box and from externally.  However, when I try
> to
> > connect using PHP (specifically phpcassa) from an external machine, I get
> > hit with a Timeout error.
> > Both machines are running PHP 5.3 on CentOS 5.
> > In my cassandra.yaml file I tried changing my listen_address to my
> server's
> > IP address instead of 127.0.0.1 and that caused me not to be able to
> connect
> > in general.  My rpc_address is 0.0.0.0.
> > Has anyone else experienced this or have an inclination where I'm going
> > wrong?
> > Thanks,
>



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

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


Re: Issues connecting from outside of localhost

2011-03-02 Thread David McNelis
It looks like we are having an issue with the Thrift installation on the
'other' machine.  We spun up a cassandra instance on that machine and were
unable to connect locally through php, but I was able to connect from the
original cassandra machine with PHP.  That sounds convoluted...but in short,
it looks like our main problem is with the Thrift PHP module.

On Wed, Mar 2, 2011 at 9:04 AM, David McNelis wrote:

> We are able to telnet to port 9160, and didn't have any issues resolving
> the target along those lines.  So at this point, I don't think we're looking
> at a firewall / network topology issue.
>
>
> On Wed, Mar 2, 2011 at 8:54 AM, Sasha Dolgy  wrote:
>
>> i had a similar issue on windows and it came down to php not being
>> able to resolve the target ... the solution was to add an entry to the
>> hosts file ... of course, if there is a firewall blocking ... that's
>> your problem.  can you telnet from remote server to cassandra server
>> on port 9160?
>>
>>
>> On Wed, Mar 2, 2011 at 3:49 PM, David McNelis
>>  wrote:
>> > Morning folks,
>> > I'm not sure if this is an issue with my setup of Cassandra, or with
>> > phpCassathere is an open question on StackOverflow that is very
>> similar
>> > to what I am experiencing (1).   In short, I can connect using PHP from
>> the
>> > same machine that Cassandra is running on.  I can connect with cassandra
>> cli
>> > from both the "Cassandra" box and from externally.  However, when I try
>> to
>> > connect using PHP (specifically phpcassa) from an external machine, I
>> get
>> > hit with a Timeout error.
>> > Both machines are running PHP 5.3 on CentOS 5.
>> > In my cassandra.yaml file I tried changing my listen_address to my
>> server's
>> > IP address instead of 127.0.0.1 and that caused me not to be able to
>> connect
>> > in general.  My rpc_address is 0.0.0.0.
>> > Has anyone else experienced this or have an inclination where I'm going
>> > wrong?
>> > Thanks,
>>
>
>
>
> --
> *David McNelis*
> Lead Software Engineer
> Agentis Energy
> www.agentisenergy.com
> o: 630.359.6395
> c: 219.384.5143
>
> *A Smart Grid technology company focused on helping consumers of energy
> control an often under-managed resource.*
>
>
>


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

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


Re: Issues connecting from outside of localhost

2011-03-02 Thread David McNelis
In case anyone is interested.  Our problem revolved around one machine
having the phpcassa thrift patch, and the other did not.  Its resolved now.

On Wed, Mar 2, 2011 at 10:25 AM, David McNelis
wrote:

> It looks like we are having an issue with the Thrift installation on the
> 'other' machine.  We spun up a cassandra instance on that machine and were
> unable to connect locally through php, but I was able to connect from the
> original cassandra machine with PHP.  That sounds convoluted...but in short,
> it looks like our main problem is with the Thrift PHP module.
>
>
> On Wed, Mar 2, 2011 at 9:04 AM, David McNelis 
> wrote:
>
>> We are able to telnet to port 9160, and didn't have any issues resolving
>> the target along those lines.  So at this point, I don't think we're looking
>> at a firewall / network topology issue.
>>
>>
>> On Wed, Mar 2, 2011 at 8:54 AM, Sasha Dolgy  wrote:
>>
>>> i had a similar issue on windows and it came down to php not being
>>> able to resolve the target ... the solution was to add an entry to the
>>> hosts file ... of course, if there is a firewall blocking ... that's
>>> your problem.  can you telnet from remote server to cassandra server
>>> on port 9160?
>>>
>>>
>>> On Wed, Mar 2, 2011 at 3:49 PM, David McNelis
>>>  wrote:
>>> > Morning folks,
>>> > I'm not sure if this is an issue with my setup of Cassandra, or with
>>> > phpCassathere is an open question on StackOverflow that is very
>>> similar
>>> > to what I am experiencing (1).   In short, I can connect using PHP from
>>> the
>>> > same machine that Cassandra is running on.  I can connect with
>>> cassandra cli
>>> > from both the "Cassandra" box and from externally.  However, when I try
>>> to
>>> > connect using PHP (specifically phpcassa) from an external machine, I
>>> get
>>> > hit with a Timeout error.
>>> > Both machines are running PHP 5.3 on CentOS 5.
>>> > In my cassandra.yaml file I tried changing my listen_address to my
>>> server's
>>> > IP address instead of 127.0.0.1 and that caused me not to be able to
>>> connect
>>> > in general.  My rpc_address is 0.0.0.0.
>>> > Has anyone else experienced this or have an inclination where I'm going
>>> > wrong?
>>> > Thanks,
>>>
>>
>>
>>
>> --
>> *David McNelis*
>> Lead Software Engineer
>> Agentis Energy
>>  www.agentisenergy.com
>> o: 630.359.6395
>> c: 219.384.5143
>>
>> *A Smart Grid technology company focused on helping consumers of energy
>> control an often under-managed resource.*
>>
>>
>>
>
>
> --
> *David McNelis*
> Lead Software Engineer
> Agentis Energy
> www.agentisenergy.com
> o: 630.359.6395
> c: 219.384.5143
>
> *A Smart Grid technology company focused on helping consumers of energy
> control an often under-managed resource.*
>
>
>


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

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


Re: changing ip's ...

2011-03-08 Thread David McNelis
I've run into this issue as well when running a test instance on my laptop.
 In the office (where I set it up) I have no issues, go outside the office
on a different network, different story.  I'll try your suggestion, Aaron.

On Tue, Mar 8, 2011 at 12:43 AM, Sasha Dolgy  wrote:

> One of the issues with ec2 is after a reboot.  the internal ip
> changes.this caused a a big problem for me yesterday.
> On Mar 8, 2011 2:29 AM, "aaron morton"  wrote:
> > Not this fits your problem, but if you pass
> -Dcassandra.load_ring_state=false as a JVM option it will stop the node from
> loading the saved endpoints. It should then rediscover them via gossip.
> >
> > It sounds like you've changed a seed ip is that correct? Not sure there
> are any other implications with that.
> >
> > Can you test passing the JVM option and let me know how it goes? Modify
> conf/cassandre-env.sh .
> >
> > If you're still having problems include some info from nodetool ring
> >
> > Aaron
> >
> > On 8/03/2011, at 9:12 AM, Sasha Dolgy wrote:
> >
> >> hi there,
> >>
> >> is there an easy way to 'un-mess' things when the ip of a server is
> changed? updating the cassandra.yaml didn't help. when the member with the
> changed ip comes up, it's fine ... but other members in the ring don't see
> it and keep the old ip address regardless of the yaml changing 
> >>
> >> -sd
> >
>



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

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


Re: data aggregation in Cassandra

2011-03-25 Thread David McNelis
That kind of aggregation is certainly possible today, programmatically...
but if you want to do it in cassandra only, you are out of luck, today.
But it sounds like the project DataStax just announced might help quite a
bit with a use case like that.

David

Sent from my Droid
On Mar 25, 2011 3:58 AM, "Saurabh Sehgal"  wrote:
> Hi All,
>
> I am evaluating Cassandra as a data store for my application.
>
> This is what the format of the data I want to store looks like:
>
> {
> timestampuuid: unique time stamp
> finite_set_of_values_attribute1: this is a value from a finite set ,
> lets say {a,b,c,d}
> finite_set_of_values_attribute2: this is a value from a finite set, lets
> say {e,f,g}
> randomAttribute: xyz
> randomAttribute: 123
> }
>
> How can I efficiently model this data to answer questions like:
>
> 1. From timestampuuid1 to timestampuuid2 I want all values
> with finite_set_of_values_attribute1 = "a",
> and finite_set_of_values_attribute2 = "e"
> 2. I want all values from timestamp1 to timestamp2 sorted by
> finite_set_of_values_attribute1
>
> Is it possible to do such data aggregations efficiently ? I sense a
> map-reduce approach might work better for this. Is there something similar
> to aggregate data in such a way in Cassandra ?
>
> Thank you,
>
> Saurabh


JDBC Driver issue in 0.8beta1

2011-04-27 Thread David McNelis
I have a feeling that I'm likely doing something dumb.  I have  the
following code compiling without any issues:

String url = null;
try {
 Class.forName("org.apache.cassandra.cql.jdbc.CassandraDriver");
  url = "jdbc:cassandra:username/password@localhost:9160/keyspace";
  Connection conn =  DriverManager.getConnection(url);
} catch (ClassNotFoundException e1) {
   e1.printStackTrace();
}

However, at runtime I get a DriverResolverException at CassandraConnection,
line 103, that "Required Field 'replication_factor' was not found.  I tried
adding a Properties object with a key of "replication_factor" and a value of
0, but that didn't seem to make any difference whatsoever.  When I looked at
the test classes there isn't anything showing up that looks like it is
explicitly setting a rep-factor.  Am I missing something in my attempt to
create the connection?  Or am do I likely have something mis-configured in
my cassandra instance (which is stock, outside of having data upgraded from
0.7.2.

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

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


Re: JDBC Driver issue in 0.8beta1

2011-04-27 Thread David McNelis
Attached:

21 [main] INFO org.apache.cassandra.cql.jdbc.Connection - Connected to
localhost:9160
Exception in thread "main"
org.apache.cassandra.cql.jdbc.DriverResolverException: Required field
'replication_factor' was not found in serialized data! Struct:
KsDef(name:system,
strategy_class:org.apache.cassandra.locator.LocalStrategy,
strategy_options:{replication_factor=1}, replication_factor:0,
cf_defs:[CfDef(keyspace:system, name:NodeIdInfo, column_type:Standard,
comparator_type:org.apache.cassandra.db.marshal.TimeUUIDType, comment:nodeId
and their metadata, row_cache_size:0.0, key_cache_size:0.01,
read_repair_chance:0.0, column_metadata:[], gc_grace_seconds:0,
default_validation_class:org.apache.cassandra.db.marshal.BytesType, id:6,
min_compaction_threshold:4, max_compaction_threshold:32,
row_cache_save_period_in_seconds:0, key_cache_save_period_in_seconds:0,
memtable_flush_after_mins:1440, memtable_throughput_in_mb:8,
memtable_operations_in_millions:0.0375), CfDef(keyspace:system,
name:IndexInfo, column_type:Standard,
comparator_type:org.apache.cassandra.db.marshal.UTF8Type, comment:indexes
that have been completed, row_cache_size:0.0, key_cache_size:0.01,
read_repair_chance:0.0, column_metadata:[], gc_grace_seconds:0,
default_validation_class:org.apache.cassandra.db.marshal.BytesType, id:5,
min_compaction_threshold:4, max_compaction_threshold:32,
row_cache_save_period_in_seconds:0, key_cache_save_period_in_seconds:0,
memtable_flush_after_mins:1440, memtable_throughput_in_mb:8,
memtable_operations_in_millions:0.0375), CfDef(keyspace:system, name:Schema,
column_type:Standard,
comparator_type:org.apache.cassandra.db.marshal.UTF8Type, comment:current
state of the schema, row_cache_size:0.0, key_cache_size:0.01,
read_repair_chance:0.0, column_metadata:[], gc_grace_seconds:0,
default_validation_class:org.apache.cassandra.db.marshal.BytesType, id:3,
min_compaction_threshold:4, max_compaction_threshold:32,
row_cache_save_period_in_seconds:0, key_cache_save_period_in_seconds:0,
memtable_flush_after_mins:1440, memtable_throughput_in_mb:8,
memtable_operations_in_millions:0.0375), CfDef(keyspace:system,
name:Migrations, column_type:Standard,
comparator_type:org.apache.cassandra.db.marshal.TimeUUIDType,
comment:individual schema mutations, row_cache_size:0.0,
key_cache_size:0.01, read_repair_chance:0.0, column_metadata:[],
gc_grace_seconds:0,
default_validation_class:org.apache.cassandra.db.marshal.BytesType, id:2,
min_compaction_threshold:4, max_compaction_threshold:32,
row_cache_save_period_in_seconds:0, key_cache_save_period_in_seconds:0,
memtable_flush_after_mins:1440, memtable_throughput_in_mb:8,
memtable_operations_in_millions:0.0375), CfDef(keyspace:system,
name:LocationInfo, column_type:Standard,
comparator_type:org.apache.cassandra.db.marshal.BytesType,
comment:persistent metadata for the local node, row_cache_size:0.0,
key_cache_size:0.01, read_repair_chance:0.0, column_metadata:[],
gc_grace_seconds:0,
default_validation_class:org.apache.cassandra.db.marshal.BytesType, id:0,
min_compaction_threshold:4, max_compaction_threshold:32,
row_cache_save_period_in_seconds:0, key_cache_save_period_in_seconds:0,
memtable_flush_after_mins:1440, memtable_throughput_in_mb:8,
memtable_operations_in_millions:0.0375), CfDef(keyspace:system,
name:HintsColumnFamily, column_type:Super,
comparator_type:org.apache.cassandra.db.marshal.BytesType,
subcomparator_type:org.apache.cassandra.db.marshal.BytesType, comment:hinted
handoff data, row_cache_size:0.0, key_cache_size:0.01,
read_repair_chance:0.0, column_metadata:[], gc_grace_seconds:0,
default_validation_class:org.apache.cassandra.db.marshal.BytesType, id:1,
min_compaction_threshold:4, max_compaction_threshold:32,
row_cache_save_period_in_seconds:0, key_cache_save_period_in_seconds:0,
memtable_flush_after_mins:1440, memtable_throughput_in_mb:61,
memtable_operations_in_millions:0.2859375)])
at
org.apache.cassandra.cql.jdbc.CassandraConnection.(CassandraConnection.java:103)
at
org.apache.cassandra.cql.jdbc.CassandraDriver.connect(CassandraDriver.java:86)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
at CqlTest.main(CqlTest.java:25)


On Wed, Apr 27, 2011 at 4:27 PM, Jonathan Ellis  wrote:

> What's the stacktrace?
>
> On Wed, Apr 27, 2011 at 9:45 AM, David McNelis
>  wrote:
> > I have a feeling that I'm likely doing something dumb.  I have  the
> > following code compiling without any issues:
> > String url = null;
> > try {
> >  Class.forName("org.apache.cassandra.cql.jdbc.CassandraDriver");
> >   url = "jdbc:cassandra:username/password@localhost:9160/keyspace";
> >   Connection conn =  DriverManager.getConnection(url);
> > } catch (ClassNotFoundException e1) {
> >e1.printStackTrace();
> > }
> > However, at runtime I get a DriverResolverException at

Re: JDBC Driver issue in 0.8beta1

2011-04-27 Thread David McNelis
That was my issue.  As suspected, falls into the "I must be doing something
dumb" category.  Thank you, Jonathon.

On Wed, Apr 27, 2011 at 4:32 PM, Jonathan Ellis  wrote:

> That looks to me like it's using the thrift definitions from the 0.7
> jar, rather than the 0.8.  Are you sure the old Cassandra jar is no
> longer on your classpath?
>
> On Wed, Apr 27, 2011 at 4:29 PM, David McNelis
>  wrote:
> > Attached:
> > 21 [main] INFO org.apache.cassandra.cql.jdbc.Connection - Connected to
> > localhost:9160
> > Exception in thread "main"
> > org.apache.cassandra.cql.jdbc.DriverResolverException: Required field
> > 'replication_factor' was not found in serialized data! Struct:
> > KsDef(name:system,
> > strategy_class:org.apache.cassandra.locator.LocalStrategy,
> > strategy_options:{replication_factor=1}, replication_factor:0,
> > cf_defs:[CfDef(keyspace:system, name:NodeIdInfo, column_type:Standard,
> > comparator_type:org.apache.cassandra.db.marshal.TimeUUIDType,
> comment:nodeId
> > and their metadata, row_cache_size:0.0, key_cache_size:0.01,
> > read_repair_chance:0.0, column_metadata:[], gc_grace_seconds:0,
> > default_validation_class:org.apache.cassandra.db.marshal.BytesType, id:6,
> > min_compaction_threshold:4, max_compaction_threshold:32,
> > row_cache_save_period_in_seconds:0, key_cache_save_period_in_seconds:0,
> > memtable_flush_after_mins:1440, memtable_throughput_in_mb:8,
> > memtable_operations_in_millions:0.0375), CfDef(keyspace:system,
> > name:IndexInfo, column_type:Standard,
> > comparator_type:org.apache.cassandra.db.marshal.UTF8Type, comment:indexes
> > that have been completed, row_cache_size:0.0, key_cache_size:0.01,
> > read_repair_chance:0.0, column_metadata:[], gc_grace_seconds:0,
> > default_validation_class:org.apache.cassandra.db.marshal.BytesType, id:5,
> > min_compaction_threshold:4, max_compaction_threshold:32,
> > row_cache_save_period_in_seconds:0, key_cache_save_period_in_seconds:0,
> > memtable_flush_after_mins:1440, memtable_throughput_in_mb:8,
> > memtable_operations_in_millions:0.0375), CfDef(keyspace:system,
> name:Schema,
> > column_type:Standard,
> > comparator_type:org.apache.cassandra.db.marshal.UTF8Type, comment:current
> > state of the schema, row_cache_size:0.0, key_cache_size:0.01,
> > read_repair_chance:0.0, column_metadata:[], gc_grace_seconds:0,
> > default_validation_class:org.apache.cassandra.db.marshal.BytesType, id:3,
> > min_compaction_threshold:4, max_compaction_threshold:32,
> > row_cache_save_period_in_seconds:0, key_cache_save_period_in_seconds:0,
> > memtable_flush_after_mins:1440, memtable_throughput_in_mb:8,
> > memtable_operations_in_millions:0.0375), CfDef(keyspace:system,
> > name:Migrations, column_type:Standard,
> > comparator_type:org.apache.cassandra.db.marshal.TimeUUIDType,
> > comment:individual schema mutations, row_cache_size:0.0,
> > key_cache_size:0.01, read_repair_chance:0.0, column_metadata:[],
> > gc_grace_seconds:0,
> > default_validation_class:org.apache.cassandra.db.marshal.BytesType, id:2,
> > min_compaction_threshold:4, max_compaction_threshold:32,
> > row_cache_save_period_in_seconds:0, key_cache_save_period_in_seconds:0,
> > memtable_flush_after_mins:1440, memtable_throughput_in_mb:8,
> > memtable_operations_in_millions:0.0375), CfDef(keyspace:system,
> > name:LocationInfo, column_type:Standard,
> > comparator_type:org.apache.cassandra.db.marshal.BytesType,
> > comment:persistent metadata for the local node, row_cache_size:0.0,
> > key_cache_size:0.01, read_repair_chance:0.0, column_metadata:[],
> > gc_grace_seconds:0,
> > default_validation_class:org.apache.cassandra.db.marshal.BytesType, id:0,
> > min_compaction_threshold:4, max_compaction_threshold:32,
> > row_cache_save_period_in_seconds:0, key_cache_save_period_in_seconds:0,
> > memtable_flush_after_mins:1440, memtable_throughput_in_mb:8,
> > memtable_operations_in_millions:0.0375), CfDef(keyspace:system,
> > name:HintsColumnFamily, column_type:Super,
> > comparator_type:org.apache.cassandra.db.marshal.BytesType,
> > subcomparator_type:org.apache.cassandra.db.marshal.BytesType,
> comment:hinted
> > handoff data, row_cache_size:0.0, key_cache_size:0.01,
> > read_repair_chance:0.0, column_metadata:[], gc_grace_seconds:0,
> > default_validation_class:org.apache.cassandra.db.marshal.BytesType, id:1,
> > min_compaction_threshold:4, max_compaction_threshold:32,
> > row_cache_save_period_in_seconds:0, key_cache_save_period_in_seconds:0,
> > memtable_flush_after_mins:1440, memtable_throughput_in_mb:61,
> > memtable_o