Re: UDF and DevCenter

2015-01-23 Thread Andrew Cobley (Staff)
Thanks Alex.

Andy

On 22 Jan 2015, at 16:54, Alex Popescu 
al...@datastax.commailto:al...@datastax.com wrote:

Thanks for the feedback Andy. I'll forward this to the DevCenter team.

Currently we have an email for sending feedback our way: 
devcenter-feedb...@datastax.commailto:devcenter-feedb...@datastax.com. And 
the good news is that in the next release there will be an integrated feedback 
form directly in DevCenter.

On Thu, Jan 22, 2015 at 8:15 AM, Andrew Cobley (Staff) 
a.e.cob...@dundee.ac.ukmailto:a.e.cob...@dundee.ac.uk wrote:

I’m not sure where to send “faults” for the DataStax Devcenter so I’ll send 
them here.  If I define a UDT such as:

CREATE TYPE if not exists sensorsync.SensorReading (

fValue float,
sValue text,
iValue  int
);

and a table

Create table if not exists sensorsync.Sensors(
name uuid,
insertion_time timestamp,
reading map text,frozenSensorReading,
Primary Key (name,insertion_time)
)

If I now want to insert data  but not use all the fields in the UDT DevCenter 
flags it as a fault.  So:

insert into sensorsync.Sensors (name,insertion_time,reading) values 
(7500e917-04b0-4697-ae7e-dbcdbf7415cb,'2015-01-01 
02:10:05',{'sensor':{iValue:101},'sensor1':{fValue:30.5}});

Works ok (rund in devcenter and cqlsh)  but dev centre flags the missing values 
with an error.  Minor, but may throw people a curve.

Andy



The University of Dundee is a registered Scottish Charity, No: SC015096



--

[:-a)

Alex Popescu
Sen. Product Manager @ DataStax
@al3xandru


The University of Dundee is a registered Scottish Charity, No: SC015096


UDF and DevCenter

2015-01-22 Thread Andrew Cobley (Staff)

I’m not sure where to send “faults” for the DataStax Devcenter so I’ll send 
them here.  If I define a UDT such as:

CREATE TYPE if not exists sensorsync.SensorReading (

fValue float,
sValue text,
iValue  int
);

and a table

Create table if not exists sensorsync.Sensors(
name uuid,
insertion_time timestamp,
reading map text,frozenSensorReading,
Primary Key (name,insertion_time)
)

If I now want to insert data  but not use all the fields in the UDT DevCenter 
flags it as a fault.  So:

insert into sensorsync.Sensors (name,insertion_time,reading) values 
(7500e917-04b0-4697-ae7e-dbcdbf7415cb,'2015-01-01 
02:10:05',{'sensor':{iValue:101},'sensor1':{fValue:30.5}});

Works ok (rund in devcenter and cqlsh)  but dev centre flags the missing values 
with an error.  Minor, but may throw people a curve.

Andy



The University of Dundee is a registered Scottish Charity, No: SC015096


Re: Saving file content to ByteBuffer and to column does not retrieve the same size of data

2014-09-30 Thread Andrew Cobley
I too have saved images in blobs (in development environment admittedly) .  
Sample code can be seen here:

https://github.com/acobley/instagrim/blob/master/src/main/java/uk/ac/dundee/computing/aec/instagrim/models/PicModel.java

Note this code uses the org.imgscalr.Scalr to resize and process  images, which 
might not be what you want.  It also uses temporary files to store the images 
for processing which i *know* is not best practice.

Andy

On 30 Sep 2014, at 08:53, Sylvain Lebresne 
sylv...@datastax.commailto:sylv...@datastax.com wrote:

On Tue, Sep 30, 2014 at 2:25 AM, Robert Coli 
rc...@eventbrite.commailto:rc...@eventbrite.com wrote:
On Mon, Sep 22, 2014 at 3:50 AM, Carlos Scheidecker 
nando@gmail.commailto:nando@gmail.com wrote:
I can successfully read a file to a ByteBuffer and then write to a Cassandra 
blob column. However, when I retrieve the value of the column, the size of the 
ByteBuffer retrieved is bigger than the original ByteBuffer where the file was 
read from. Writing to the disk, corrupts the image.

Probably don't write binary blobs like images into a database, use a 
distributed filesystem?

I've very successfully stored lots of small images into Cassandra so I have to 
disagree with that far too quick conclusion. Cassandra always read blobs in 
their entirety, so it's definitively not very good with very large blobs, but 
there is many cases where images are known to be pretty small (I was personally 
storing thumbnails) and in those cases, it is my experience that Cassandra is a 
very viable solution.


But I agree that this behavior sounds like a bug, I would probably file it as a 
JIRA on http://issues.apache.orghttp://issues.apache.org/ and then tell the 
list the URL of the JIRA you filed.

I actually doubt it is a bug, and it's almost certainly not a Cassandra bug (so 
please, do *no* open a JIRA on 
http://issues.apache.orghttp://issues.apache.org/). I suspect a bad use of 
the ByteBuffer API (which is definitively a very confusing API, but that's what 
Java gives us). Typically, in your snippet of code above, the line:
byte[] data = new byte[buffer.limit()];
is incorrect. 'buffer.limit()' is not the number of valid bytes in the buffer, 
you should use 'buffer.remaining()' for that. You should also be careful with 
messing with 'arrayOffset', a line that
buf.position(buf.arrayOffset());
(also from one of you snippet above) is almost surely wrong.

--
Sylvain


The University of Dundee is a registered Scottish Charity, No: SC015096


Re: DSE install interfering with apache Cassandra 2.1.0

2014-09-30 Thread Andrew Cobley
HI Ben,

yeah, that was it, recovered from the Cassandra summit ?


Andy

On 30 Sep 2014, at 08:19, Ben Bromhead 
b...@instaclustr.commailto:b...@instaclustr.com wrote:

check your cqlshrc file (sometimes in ~/.cassandra) ?

I've been caught out before when playing with a RC of 2.1

On 30 September 2014 01:25, Andrew Cobley 
a.e.cob...@dundee.ac.ukmailto:a.e.cob...@dundee.ac.uk wrote:
Without the apache cassandra running I ran jps -l on this machine ,the only 
result was

338 sun.tool.jps.Jps

The Mac didn’t like the netstat command so I ran

netstat -atp tcp |  grep 9160

no result

Also  for the native port:

netstat-atp tcp | grep 9042

gave no result (command may be wrong)

So I ran port scan using the network utility (between 0 and 1).  Results as 
shown:


Port Scan has started…

Port Scanning host: 127.0.0.1

 Open TCP Port: 631ipp
Port Scan has completed…


Hope this helps.

Andy


On 29 Sep 2014, at 15:09, Sumod Pawgi 
spa...@gmail.commailto:spa...@gmail.com wrote:

Please run jps to check which Java services are still running and to make sure 
if c* is running. Then please check if 9160 port is in use. netstat -nltp | 
grep 9160

This will confirm what is happening in your case.

Sent from my iPhone

On 29-Sep-2014, at 7:15 pm, Andrew Cobley 
a.e.cob...@dundee.ac.ukmailto:a.e.cob...@dundee.ac.uk wrote:

Hi All,

Just come across this one, I’m at a bit of a loss on how to fix it.

A user here did the following steps

On a MAC
Install Datastax Enterprise (DSE) using the dmg file
test he can connect using the DSE cqlsh window
Unistall DSE (full uninstall which stops the services)

download apache cassandra 2.1.0
unzip
change to the non directory run sudo ./cassandra

Now when he tries to connect using cqlsh from apache cassandra 2.1.0 bin   he 
gets

Connection error: ('Unable to connect to any servers', {'127.0.0.1': 
ConnectionShutdown('Connection AsyncoreConnection(4528514448) 
127.0.0.1:9160http://127.0.0.1:9160/ (closed) is already closed',)})

This is probably related to
http://mail-archives.apache.org/mod_mbox/incubator-cassandra-user/201409.mbox/%3CCALHCZd7RGSahJUbK32WoTr9JRoA+4K=mrfocmxuk0nbzoqq...@mail.gmail.com%3E

but I can’t see why the uninstall of DSE is leaving the apache cassandra 
release cqlsh unable to attach to the apache cassandra runtime.

Ta
Andy



The University of Dundee is a registered Scottish Charity, No: SC015096


The University of Dundee is a registered Scottish Charity, No: SC015096



--

Ben Bromhead

Instaclustr | www.instaclustr.comhttps://www.instaclustr.com/ | 
@instaclustrhttp://twitter.com/instaclustr | +61 415 936 359


The University of Dundee is a registered Scottish Charity, No: SC015096


DSE install interfering with apache Cassandra 2.1.0

2014-09-29 Thread Andrew Cobley
Hi All,

Just come across this one, I’m at a bit of a loss on how to fix it.

A user here did the following steps

On a MAC
Install Datastax Enterprise (DSE) using the dmg file
test he can connect using the DSE cqlsh window
Unistall DSE (full uninstall which stops the services)

download apache cassandra 2.1.0
unzip
change to the non directory run sudo ./cassandra

Now when he tries to connect using cqlsh from apache cassandra 2.1.0 bin   he 
gets

Connection error: ('Unable to connect to any servers', {'127.0.0.1': 
ConnectionShutdown('Connection AsyncoreConnection(4528514448) 127.0.0.1:9160 
(closed) is already closed',)})

This is probably related to
http://mail-archives.apache.org/mod_mbox/incubator-cassandra-user/201409.mbox/%3CCALHCZd7RGSahJUbK32WoTr9JRoA+4K=mrfocmxuk0nbzoqq...@mail.gmail.com%3E

but I can’t see why the uninstall of DSE is leaving the apache cassandra 
release cqlsh unable to attach to the apache cassandra runtime.

Ta
Andy



The University of Dundee is a registered Scottish Charity, No: SC015096


Re: DSE install interfering with apache Cassandra 2.1.0

2014-09-29 Thread Andrew Cobley
Without the apache cassandra running I ran jps -l on this machine ,the only 
result was

338 sun.tool.jps.Jps

The Mac didn’t like the netstat command so I ran

netstat -atp tcp |  grep 9160

no result

Also  for the native port:

netstat-atp tcp | grep 9042

gave no result (command may be wrong)

So I ran port scan using the network utility (between 0 and 1).  Results as 
shown:


Port Scan has started…

Port Scanning host: 127.0.0.1

 Open TCP Port: 631ipp
Port Scan has completed…


Hope this helps.

Andy


On 29 Sep 2014, at 15:09, Sumod Pawgi 
spa...@gmail.commailto:spa...@gmail.com wrote:

Please run jps to check which Java services are still running and to make sure 
if c* is running. Then please check if 9160 port is in use. netstat -nltp | 
grep 9160

This will confirm what is happening in your case.

Sent from my iPhone

On 29-Sep-2014, at 7:15 pm, Andrew Cobley 
a.e.cob...@dundee.ac.ukmailto:a.e.cob...@dundee.ac.uk wrote:

Hi All,

Just come across this one, I’m at a bit of a loss on how to fix it.

A user here did the following steps

On a MAC
Install Datastax Enterprise (DSE) using the dmg file
test he can connect using the DSE cqlsh window
Unistall DSE (full uninstall which stops the services)

download apache cassandra 2.1.0
unzip
change to the non directory run sudo ./cassandra

Now when he tries to connect using cqlsh from apache cassandra 2.1.0 bin   he 
gets

Connection error: ('Unable to connect to any servers', {'127.0.0.1': 
ConnectionShutdown('Connection AsyncoreConnection(4528514448) 127.0.0.1:9160 
(closed) is already closed',)})

This is probably related to
http://mail-archives.apache.org/mod_mbox/incubator-cassandra-user/201409.mbox/%3CCALHCZd7RGSahJUbK32WoTr9JRoA+4K=mrfocmxuk0nbzoqq...@mail.gmail.com%3E

but I can’t see why the uninstall of DSE is leaving the apache cassandra 
release cqlsh unable to attach to the apache cassandra runtime.

Ta
Andy



The University of Dundee is a registered Scottish Charity, No: SC015096


The University of Dundee is a registered Scottish Charity, No: SC015096


Re: using dynamic cell names in CQL 3

2014-09-29 Thread Andrew Cobley
Isn’t the correct way to do this in CQL3 to use sets and user defined types (in 
C* 2.1) ?:

create type sensorreading( date timestamp, name text, value int);
CREATE TABLE sensordata (
name text,
data setfrozen sensorreading,
PRIMARY KEY (name)
);

insert into keyspace2.sensordata (name, data) values ('1234', {{date:'2012-10-2 
12:10',name:'temp',value:4}});
update sensordata set data = data+{{date:'2012-10-2 
12:10',name:'humidity',value:30}} where name='1234';
update sensordata set data = data+{{date:'2012-10-2 
12:12:30',name:'temp',value:5}} where name='1234';
update sensordata set data = data+{{date:'2012-10-2 
12:12:30',name:'humidity',value:31}} where name='1234';

select * from sensordata;


Perhaps not what you are after, but may be a start ?

Andy



On 29 Sep 2014, at 20:56, Robert Coli 
rc...@eventbrite.commailto:rc...@eventbrite.com wrote:

On Thu, Sep 25, 2014 at 6:13 AM, shahab 
shahab.mok...@gmail.commailto:shahab.mok...@gmail.com wrote:
It seems that I was not clear in my question, I would like to store values in 
the column name, for example column.namehttp://column.name/ would be 
event_name (temperature) and column-content would be the respective value 
(e.g. 40.5) . And I need to know how the schema should look like in CQL 3

You cannot have dynamic column names, in the exact storage way you are thinking 
of them, in CQL3.

You can have a simple E-A-V scheme which works more or less the same way. It is 
less storage efficient, but you get the CQL interface. In the opinion of the 
developers, this was an acceptable tradeoff. In most cases, it probably is.

In other cases, I would recommend using thrift and actual dynamic columns... 
except that I logically presume Thrift will be eventually be deprecated. I am 
unable to recommend the use of a feature which I believe will eventually be 
removed from the product.

=Rob


The University of Dundee is a registered Scottish Charity, No: SC015096


DevCenter and Cassandra 2.1

2014-09-26 Thread Andrew Cobley
Hi all,

I notice that descanter 1.1.1doesn’t support User defined types (as far as I 
can see).  Is it just a matter of importing a template or will we need to wait 
for full 2.1 support in descanter ?

Andy


The University of Dundee is a registered Scottish Charity, No: SC015096


Issue retrieving blobs with CQL

2014-03-19 Thread Andrew Cobley
Cassandra 2.0.4

I’m using blobs to save and retrieve images in cassanda.   However the  blob I 
get back is not the blob I saved !

I’m saving to CQL like this:

byte[] b= {(byte)10,(byte)20,(byte)30};
int length=b.length;
ByteBuffer buffer =ByteBuffer.wrap(b);
Session session = cluster.connect(keyspace2);
PreparedStatement ps = session.prepare(insert into tweets ( image, user, 
interaction_time,imagelength) values(?,?,?,?));
BoundStatement boundStatement = new BoundStatement(ps);
session.execute( boundStatement.bind( buffer, majed,  
convertor.getTimeUUID(),length));

and retrieving like this:

Session session = cluster.connect(keyspace2);
PreparedStatement ps = session.prepare(select image,user,imagelength from 
tweets where user =?);
BoundStatement boundStatement = new BoundStatement(ps);
ResultSet rs =session.execute(boundStatement.bind( majed));
ByteBuffer bImage=null;
for (Row row : rs) {
   bImage = row.getBytes(image) ;
   System.out.println (Image );
   for (int i=0; i 40;i++){
  System.out.print(String.format(%x ,bImage.get(i)));
   if ((i+1)%16 ==0) System.out.println();
   }
   System.out.println();
}
session.close();

So, I should be saving byte array of 3 long, and the  buffer in the save 
section is correct.  However when I run the retrieve section I’m getting back 
the following:

82 0 0 8 0 0 0 28 0 0 0 2 0 0 0 5
0 0 0 3 0 0 0 1 0 0 0 3 a 14 1e

You can see the saved bytes are the last three and there is extra padding at 
the front.

Worse if I change the Select statement to:
PreparedStatement ps = session.prepare(select user,image,imagelength from 
tweets where user =?”);

I get back:

82 0 0 8 0 0 0 28 0 0 0 2 0 0 0 5
0 0 0 3 0 0 0 1 0 0 0 5 6d 61 6a 65
64 0 0 0 3 a 14 1e

If you look you can see the username “majed” in the returned blob (6d 61 6a 65 
64).

any ideas whats going on here ?

Many thanks

Andy

The University of Dundee is a registered Scottish Charity, No: SC015096


Re: Issue retrieving blobs with CQL

2014-03-19 Thread Andrew Cobley
Apologies,

this seems to be addressed in the thread :

https://groups.google.com/a/lists.datastax.com/forum/#!searchin/java-driver-user/blob$20ByteBuffer/java-driver-user/4_KegVX0teo/2OOZ8YOwtBcJ

Andy

On 19 Mar 2014, at 11:55, Andrew Cobley 
a.e.cob...@dundee.ac.ukmailto:a.e.cob...@dundee.ac.uk wrote:

Cassandra 2.0.4

I’m using blobs to save and retrieve images in cassanda.   However the  blob I 
get back is not the blob I saved !

I’m saving to CQL like this:

byte[] b= {(byte)10,(byte)20,(byte)30};
int length=b.length;
ByteBuffer buffer =ByteBuffer.wrap(b);
Session session = cluster.connect(keyspace2);
PreparedStatement ps = session.prepare(insert into tweets ( image, user, 
interaction_time,imagelength) values(?,?,?,?));
BoundStatement boundStatement = new BoundStatement(ps);
session.execute( boundStatement.bind( buffer, majed,  
convertor.getTimeUUID(),length));

and retrieving like this:

Session session = cluster.connect(keyspace2);
PreparedStatement ps = session.prepare(select image,user,imagelength from 
tweets where user =?);
BoundStatement boundStatement = new BoundStatement(ps);
ResultSet rs =session.execute(boundStatement.bind( majed));
ByteBuffer bImage=null;
for (Row row : rs) {
   bImage = row.getBytes(image) ;
   System.out.println (Image );
   for (int i=0; i 40;i++){
  System.out.print(String.format(%x ,bImage.get(i)));
   if ((i+1)%16 ==0) System.out.println();
   }
   System.out.println();
}
session.close();

So, I should be saving byte array of 3 long, and the  buffer in the save 
section is correct.  However when I run the retrieve section I’m getting back 
the following:

82 0 0 8 0 0 0 28 0 0 0 2 0 0 0 5
0 0 0 3 0 0 0 1 0 0 0 3 a 14 1e

You can see the saved bytes are the last three and there is extra padding at 
the front.

Worse if I change the Select statement to:
PreparedStatement ps = session.prepare(select user,image,imagelength from 
tweets where user =?”);

I get back:

82 0 0 8 0 0 0 28 0 0 0 2 0 0 0 5
0 0 0 3 0 0 0 1 0 0 0 5 6d 61 6a 65
64 0 0 0 3 a 14 1e

If you look you can see the username “majed” in the returned blob (6d 61 6a 65 
64).

any ideas whats going on here ?

Many thanks

Andy

The University of Dundee is a registered Scottish Charity, No: SC015096


The University of Dundee is a registered Scottish Charity, No: SC015096


CQLException ?

2014-02-24 Thread Andrew Cobley
I’m just converting some code from SQL to CQL.  The code can throw a 
SQLException.  however I note that there is no equivalent in CQL, I’m just 
wondering whys this is the case ?

Regards
Andy


The University of Dundee is a registered Scottish Charity, No: SC015096


CQL get unique row keys ?

2014-02-15 Thread Andrew Cobley
I may be missing something here, but is there a way in cql to get all unique 
row keys in a column family(table) ?

I’ve created a table like this:

CREATE TABLE totp (
artist varchar,
track varchar,
 appearance_type varchar,
 PRIMARY KEY ((artist),track)
) WITH CLUSTERING ORDER BY (track asc);

and populated it with data.  As you can imagine, each artist can have multiple 
tracks .  Doing:

Select * from totp; will produce something like (with more artists of course)

   The Tony Rich Project | Nobody 
Knows | P/A
Telly Savalas | 
  If |   PROMO
 Alice Cooper |  
Elected |DISC
 Alice Cooper | Hello 
Hooray |   PROMO
 Alice Cooper |   Hey 
Stupid |   Promo
 Alice Cooper |  Lost In 
America | P/A
 Alice Cooper |  No More 
Mr.Nice Guy |DISC
 Alice Cooper |   
Poison |   Promo
 Alice Cooper | 
School's Out | P/A V/T
 Alice Cooper |  
Schools Out | P/A
 Alice Cooper |   Teenage 
Lament '74 |DISC
  Blackstreet Feat Dr.Dre |   No 
Diggity | P/A
 Nena |   99 
Luftballons |   Promo
 Nena |  99 Red 
Balloons | P/A
and Select artist from totp; would produce:

The Tony Rich Project
Telly Savalas
 Alice Cooper
 Alice Cooper
 Alice Cooper
 Alice Cooper
 Alice Cooper
 Alice Cooper
 Alice Cooper
 Alice Cooper
 Alice Cooper
  Blackstreet Feat Dr.Dre
 Nena
 Nena

But of course what I really want is just the row keys
The Tony Rich Project
Telly Savalas
 Alice Cooper
  Blackstreet Feat Dr.Dre
 Nena

Any idea if I can do this in CQL ?

Andy


The University of Dundee is a registered Scottish Charity, No: SC015096


RE: CQL get unique row keys ?

2014-02-15 Thread Andrew Cobley
Thanks,


worked a treat !

Andy



From: DuyHai Doan doanduy...@gmail.com
Sent: 15 February 2014 18:51
To: user@cassandra.apache.org
Subject: Re: CQL get unique row keys ?

Hello Andy

 Since C* 2.0.1 it is possible to list all distinct partition keys (not 
clustering keys) with: SELECT DISTINCT pk FROM 

 More info on the feature here: 
https://issues.apache.org/jira/browse/CASSANDRA-4536

 This query is quite efficient because the key cache is used most of the time.

 Regards

 Duy Hai DOAN



On Sat, Feb 15, 2014 at 6:05 PM, Andrew Cobley 
a.e.cob...@dundee.ac.ukmailto:a.e.cob...@dundee.ac.uk wrote:
I may be missing something here, but is there a way in cql to get all unique 
row keys in a column family(table) ?

I've created a table like this:

CREATE TABLE totp (
artist varchar,
track varchar,
 appearance_type varchar,
 PRIMARY KEY ((artist),track)
) WITH CLUSTERING ORDER BY (track asc);

and populated it with data.  As you can imagine, each artist can have multiple 
tracks .  Doing:

Select * from totp; will produce something like (with more artists of course)

   The Tony Rich Project | Nobody 
Knows | P/A
Telly Savalas | 
  If |   PROMO
 Alice Cooper |  
Elected |DISC
 Alice Cooper | Hello 
Hooray |   PROMO
 Alice Cooper |   Hey 
Stupid |   Promo
 Alice Cooper |  Lost In 
America | P/A
 Alice Cooper |  No More 
Mr.Nice Guy |DISC
 Alice Cooper |   
Poison |   Promo
 Alice Cooper | 
School's Out | P/A V/T
 Alice Cooper |  
Schools Out | P/A
 Alice Cooper |   Teenage 
Lament '74 |DISC
  Blackstreet Feat Dr.Dre |   No 
Diggity | P/A
 Nena |   99 
Luftballons |   Promo
 Nena |  99 Red 
Balloons | P/A
and Select artist from totp; would produce:

The Tony Rich Project
Telly Savalas
 Alice Cooper
 Alice Cooper
 Alice Cooper
 Alice Cooper
 Alice Cooper
 Alice Cooper
 Alice Cooper
 Alice Cooper
 Alice Cooper
  Blackstreet Feat Dr.Dre
 Nena
 Nena

But of course what I really want is just the row keys
The Tony Rich Project
Telly Savalas
 Alice Cooper
  Blackstreet Feat Dr.Dre
 Nena

Any idea if I can do this in CQL ?

Andy


The University of Dundee is a registered Scottish Charity, No: SC015096


The University of Dundee is a registered Scottish Charity, No: SC015096


CQL list command

2014-02-06 Thread Andrew Cobley
TL;DR

Is there a CQL equivalent of the CLI List command ?  yes or No?

Long version

I often use the CLI command LIST for debugging or when teaching students 
showing them what’s going on under the hood of CQL.  I see that CLI swill be 
removed in Cassandra 3 and we will lose this ability.  It would be nice if CQL 
retained it, or something like it for debugging and etching purposes.

Any ideas ?
Andy



The University of Dundee is a registered Scottish Charity, No: SC015096


NetworkTopologyStrategy and nodes ?

2013-10-12 Thread Andrew Cobley
Reading this explanation of NetworkTopologyStrategy  in 1.1:

http://www.datastax.com/docs/1.1/cluster_architecture/replication

Is there a suitable explanation of how it will work with Vnodes ?  I notice 
this line in the explanation:

In the following graphic, notice the tokens are assigned to alternating racks. 
For more information, see Generating 
Tokenshttp://www.datastax.com/docs/1.1/initialize/token_generation#token-gen-cassandra.

Seems to imply that the strategy relies on placing tokens on different racks 
which won't happen with nodes ?

Regards
Andy C


The University of Dundee is a registered Scottish Charity, No: SC015096


C* 2.0 reduce_cache_sizes_at ?

2013-09-08 Thread Andrew Cobley
I'm following John Berryman's blog Building the Perfect Cassandra Test 
Environment concerning running C* in a very small amount of memory.  he 
recommends theses settings in cassandra.yaml

reduce_cache_sizes_at: 0
reduce_cache_capacity_to: 0

(Blog is at 
http://www.opensourceconnections.com/2013/08/31/building-the-perfect-cassandra-test-environment/)

I'm assuming the blog must be talking about C* prior to version 2.0 because 
these settings do not appear in 2.0's  .yaml file.

Why where they removed and what's the alternative ?

Andy

reduce_cache_sizes_at: 0 reduce_cache_capacity_to: 0 - See more at: 
http://www.opensourceconnections.com/2013/08/31/building-the-perfect-cassandra-test-environment/#sthash.T7wBs9Yv.dpuf

The University of Dundee is a registered Scottish Charity, No: SC015096



Re: Setting up a multi-node cluster

2013-08-29 Thread Andrew Cobley
Have you tried setting rpc_address to the same as listen_address ?


Andy

On 29 Aug 2013, at 07:47, Dinesh 
dinesh.gad...@gmail.commailto:dinesh.gad...@gmail.com wrote:

My first node is running and second node is not running in this case

I tried telnet from second node to first node. Following is the stdout
# telnet 10.96.10.207 7000
Trying 10.96.10.207...
Connected to 10.96.10.207.
Escape character is '^]'.
quit
Connection closed by foreign host.

I see the same output for 7199  9160 ports. is this correct. I am not seeing 
the telnet session as something like telnet
--
But when I tried with 7001. I am seeing the below output
# telnet 10.96.10.207 7001
Trying 10.96.10.207...
telnet: connect to address 10.96.10.207http://10.96.10.207/: Connection 
refused

I see the same output for 61620  61621 ports
--

Please suggest



On Thu, Aug 29, 2013 at 11:23 AM, Andrey Ilinykh 
ailin...@gmail.commailto:ailin...@gmail.com wrote:
To be sure ports are open try to connect from one node to  another:

telnet node ip 7000

try all ports.

Andrey


On Wed, Aug 28, 2013 at 10:41 PM, Dinesh 
dinesh.gad...@gmail.commailto:dinesh.gad...@gmail.com wrote:
Hi John,

I had my firewall disabled in both the nodes
To make sure. I checked it
# rcSuSEfirewall2 status
Checking the status of SuSEfirewall2
unused

if it's, on it says running

Please suggest the further steps, where to look and troubleshoot, if you have 
any idea






On Thu, Aug 29, 2013 at 2:34 AM, John Pyeatt 
john.pye...@singlewire.commailto:john.pye...@singlewire.com wrote:
Have you verified that your firewall is configured for the cassandra traffic. 
At the very least you need to make certain the following ports are open between 
nodes: 7000, 7001, 7199, 9160, 61620 and 61621.


On Wed, Aug 28, 2013 at 12:36 AM, Dinesh 
dinesh.gad...@gmail.commailto:dinesh.gad...@gmail.com wrote:
In my case rpc_address in both the nodes is set to 0.0.0.0 which means it 
listens on all interfaces. it has a larger scope (to listen on all localhost, 
ipv4, hostnames, ipv6 addresses) than providing just the hostname/ipv4 addresses

anyway I initially checked that, but it's the same exception I got in this case 
also




On Wed, Aug 28, 2013 at 10:40 AM, Naresh Yadav 
nyadav@gmail.commailto:nyadav@gmail.com wrote:

You would need to configure rpc_address also with hostname/ips on both the 
nodes.

Naresh

On Wed, Aug 28, 2013 at 10:15 AM, Dinesh 
dinesh.gad...@gmail.commailto:dinesh.gad...@gmail.com wrote:
Hi,

I am trying to setup a two node Cassandra cluster

Able to start the first node, but not seeing the following exception while 
starting the second node

ERROR 17:31:34,315 Exception encountered during startup
java.lang.IllegalStateException: Unable to contact any seeds!
at 
org.apache.cassandra.service.StorageService.bootstrap(StorageService.java:947)
at 
org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:716)
at 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:554)
at 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:451)
at 
org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:348)
at 
org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:447)
at 
org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:490)
java.lang.IllegalStateException: Unable to contact any seeds!
at 
org.apache.cassandra.service.StorageService.bootstrap(StorageService.java:947)
at 
org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:716)
at 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:554)
at 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:451)
at 
org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:348)
at 
org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:447)
at 
org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:490)
Exception encountered during startup: Unable to contact any seeds!
ERROR 17:31:34,322 Exception in thread Thread[StorageServiceShutdownHook,5,main]
java.lang.NullPointerException
at 
org.apache.cassandra.service.StorageService.stopRPCServer(StorageService.java:321)
at 
org.apache.cassandra.service.StorageService.shutdownClientServers(StorageService.java:370)
at 
org.apache.cassandra.service.StorageService.access$000(StorageService.java:88)




=
My yaml configuration files have these modified


first node yaml
---
initial_token: -9223372036854775808 # generated this using tokengen tool
seeds: 10.96.19.207 # which is the IP of first node
listen_address: 10.96.19.207 # which is the IP of first node itself

Vnodes, adding a node ?

2013-08-14 Thread Andrew Cobley
I have  small test cluster of 2 nodes.  I ran a stress test on it and with 
nodetool status received the following:

/usr/local/bin/apache-cassandra-2.0.0-rc1/log $ ../bin/nodetool status
Datacenter: datacenter1
===
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address   Load   Tokens  Owns (effective)  Host ID  
 Rack
UN  192.168.0.11  141.13 MB  256 49.2% 
4d281e2e-efd9-4abf-bb70-ebdf8e2b4fc3  rack1
UN  192.168.0.10  145.59 MB  256 50.8% 
7fc5795a-bd1b-4e42-88d6-024c5216a893  rack1

I then added a third node with no machines writing to the system.  Using 
nodetool status I got the following:

/usr/local/bin/apache-cassandra-2.0.0-rc1/log $ ../bin/nodetool status
Datacenter: datacenter1
===
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address   Load   Tokens  Owns (effective)  Host ID  
 Rack
UN  192.168.0.11  141.12 MB  256 32.2% 
4d281e2e-efd9-4abf-bb70-ebdf8e2b4fc3  rack1
UN  192.168.0.10  145.59 MB  256 35.3% 
7fc5795a-bd1b-4e42-88d6-024c5216a893  rack1
UN  192.168.0.12  111.9 KB   256 32.5% 
e5e6d8bd-c652-4c18-8fa3-3d71471eee65  rack1

Is this correct ?  I was under the impression that adding a node to an existing 
cluster would distribute the load around the cluster. Am I perhaps missing a 
step or have a config error perhaps ?


Ta
Andy


The University of Dundee is a registered Scottish Charity, No: SC015096



RE: Vnodes, adding a node ?

2013-08-14 Thread Andrew Cobley
That looks like the problem.  I added the node  with that machine as a seed, 
realized my mistake and restarted the machine with the correct seed. it joined 
the ring but without streaming.  Nodetool rebuild however doesn't seem to be 
fixing the situation.

I'll remove the node and try re-adding it after cleaning /var/lib/cassandra.

Andy




From: Richard Low [rich...@wentnet.com]
Sent: 14 August 2013 20:11
To: user@cassandra.apache.org
Subject: Re: Vnodes, adding a node ?

On 14 August 2013 20:02, Andrew Cobley 
a.e.cob...@dundee.ac.ukmailto:a.e.cob...@dundee.ac.uk wrote:
I have  small test cluster of 2 nodes.  I ran a stress test on it and with 
nodetool status received the following:

/usr/local/bin/apache-cassandra-2.0.0-rc1/log $ ../bin/nodetool status
Datacenter: datacenter1
===
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address   Load   Tokens  Owns (effective)  Host ID  
 Rack
UN  192.168.0.11  141.13 MB  256 49.2% 
4d281e2e-efd9-4abf-bb70-ebdf8e2b4fc3  rack1
UN  192.168.0.10  145.59 MB  256 50.8% 
7fc5795a-bd1b-4e42-88d6-024c5216a893  rack1

I then added a third node with no machines writing to the system.  Using 
nodetool status I got the following:

/usr/local/bin/apache-cassandra-2.0.0-rc1/log $ ../bin/nodetool status
Datacenter: datacenter1
===
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address   Load   Tokens  Owns (effective)  Host ID  
 Rack
UN  192.168.0.11  141.12 MB  256 32.2% 
4d281e2e-efd9-4abf-bb70-ebdf8e2b4fc3  rack1
UN  192.168.0.10  145.59 MB  256 35.3% 
7fc5795a-bd1b-4e42-88d6-024c5216a893  rack1
UN  192.168.0.12  111.9 KB   256 32.5% 
e5e6d8bd-c652-4c18-8fa3-3d71471eee65  rack1

Is this correct ?  I was under the impression that adding a node to an existing 
cluster would distribute the load around the cluster. Am I perhaps missing a 
step or have a config error perhaps ?

How did you add the node?  It looks like it didn't bootstrap but just joined 
the ring.  You need to make sure the node is not set as a seed and that 
auto_bootstrap is true (the default).

Alternatively, you could run 'nodetool rebuild' to stream data from the other 
nodes.

Richard.

The University of Dundee is a registered Scottish Charity, No: SC015096


Re: Cassandra HANGS after some writes

2013-08-13 Thread Andrew Cobley
Agreed with Alain,

There are a number of reasons that he may be running on windows, a development 
environment comes to mind,or simply to learn about C*

BTW
Has anyone ever done any performance comparisons of linux vs a headless windows 
server ?

Andy

On 13 Aug 2013, at 17:07, Alain RODRIGUEZ 
arodr...@gmail.commailto:arodr...@gmail.com wrote:

@Kanwar Sangha

Cassandra on windows ? Please install Linux !

Useful comment, please spare your time and stop that troll.

He surely have his reason to use windows (I suppose it is a dev constraint or 
choice). Anyway, C* is available in windows so it should work. Comments like 
windows sucks, go linux or macOS, are not going to solve his issue. If 
Cassandra can't be run on windows, just don't package Cassandra for windows.

We just can recommend Naresh *not* to use Windows as the OS for your production 
nodes.

Alain


2013/8/13 Kanwar Sangha kan...@mavenir.commailto:kan...@mavenir.com
Cassandra on windows ? Please install Linux !


From: Romain HARDOUIN 
[mailto:romain.hardo...@urssaf.frmailto:romain.hardo...@urssaf.fr]
Sent: 13 August 2013 10:17
To: user@cassandra.apache.orgmailto:user@cassandra.apache.org
Subject: Re: Cassandra HANGS after some writes

Naresh,

My two cents is that you should run Cassandra on a Linux VM.
Issues are more easy to diagnose/pinpoint. Windows is a bit obscure to many 
people here.

Cheers

Alexis Rodríguez 
arodrig...@inconcertcc.commailto:arodrig...@inconcertcc.com a écrit sur 
13/08/2013 16:50:42 :

 De : Alexis Rodríguez 
 arodrig...@inconcertcc.commailto:arodrig...@inconcertcc.com
 A : user@cassandra.apache.orgmailto:user@cassandra.apache.org,
 Date : 13/08/2013 16:51
 Objet : Re: Cassandra HANGS after some writes

 Naresh,

 Windows is not my cup of tea. May be someone else has more
 experience using the Redmond's prodigy child.

 cheers, and good luck



The University of Dundee is a registered Scottish Charity, No: SC015096


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

2013-08-12 Thread Andrew Cobley
Actually, is that true ?  Certainly I guess most versions of C* run on Linux, 
but do most C* db admins use linux on the desktop ?  Or ar they connecting form 
Mac/PC for management purposes ?

Andy

On 9 Aug 2013, at 21:11, Keith Freeman 8fo...@gmail.comhttp://gmail.com 
wrote:

Sounds like a good tool, but isn't it odd to only have Windows  Mac versions?  
My impression has been that most users run Cassandra on Linux.  Is a Linux 
version coming (please!)?

On 08/09/2013 01:27 PM, Alex Popescu wrote:

On Fri, Aug 9, 2013 at 10:12 AM, David McNelis 
dmcne...@gmail.commailto:dmcne...@gmail.com 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



The University of Dundee is a registered Scottish Charity, No: SC015096


Re: Choosing Java Driver for using Cassandra with Java EE7

2013-08-03 Thread Andrew Cobley
I've used most of the java drivers under Glashfish without a problem.  IMHO 
it's really down to the functionality you require in your application.  The 
Java Driver form datastax has the lowest learning curve  for any java 
programmer familiar with JDBC and I believe deals with pool management.

Just my .2 cents worth

Andy


On 3 Aug 2013, at 08:28, Jan Algermissen jan.algermis...@nordsc.com wrote:

 Hi,

 I plan on using Cassandra in a Java EE7 (Glassfish) project and I wonder 
 which driver I should pick.

 Can anyone make a recommendation which of the available drivers fits best 
 into a Java EE environment?

 (I looking for avoiding thread pool management issues mostly. I am not so 
 interested in a JPA integration)

 Jan


The University of Dundee is a registered Scottish Charity, No: SC015096



Re: Choosing Java Driver for using Cassandra with Java EE7

2013-08-03 Thread Andrew Cobley
Im referring to the core driver from datastax:

https://github.com/datastax/java-driver

You should be able to build it with maven.

Andy

On 3 Aug 2013, at 16:35, Jan Algermissen jan.algermis...@nordsc.com wrote:

 Hi Andrew,

 On 03.08.2013, at 14:30, Andrew Cobley a.e.cob...@dundee.ac.uk wrote:

 I've used most of the java drivers under Glashfish without a problem.  IMHO 
 it's really down to the functionality you require in your application.  The 
 Java Driver form datastax has the lowest learning curve  for any java 
 programmer familiar with JDBC and I believe deals with pool management.

 With The Java Driver form datastax are you referring to cassandra-jdbc? Or 
 the 'core' dirver available at https://github.com/datastax/java-driver?

 I tried building cassandra-jdbc from SVN like the Wiki[1] says, but got 
 compile errors. Do you know what the quality of cassandra-jdbc is?

 Jan





 Just my .2 cents worth

 Andy


 On 3 Aug 2013, at 08:28, Jan Algermissen jan.algermis...@nordsc.com wrote:

 Hi,

 I plan on using Cassandra in a Java EE7 (Glassfish) project and I wonder 
 which driver I should pick.

 Can anyone make a recommendation which of the available drivers fits best 
 into a Java EE environment?

 (I looking for avoiding thread pool management issues mostly. I am not so 
 interested in a JPA integration)

 Jan


 The University of Dundee is a registered Scottish Charity, No: SC015096





The University of Dundee is a registered Scottish Charity, No: SC015096



Re: Strange cassandra-stress results with 2.0.0 beta1

2013-07-25 Thread Andrew Cobley
I'm getting something similar for beta 2, you can see here it's dropping from 
12000 to 400 quite quickly.   The output from cassandra is available n dropbox 
here:

https://dl.dropboxusercontent.com/u/1638201/output.txt (184kBytes)

I'm wondering if it's a GC issue ?

 ./cassandra-stress -d 134.36.36.218 -n 3000
Unable to create stress keyspace: Keyspace names must be case-insensitively 
unique (Keyspace1 conflicts with Keyspace1)
total,interval_op_rate,interval_key_rate,latency/95th/99th,elapsed_time
73761,7376,7376,2.1,7.6,181.0,10
199159,12539,12539,2.4,7.5,102.4,20
316978,11781,11781,2.4,7.8,172.7,30
434060,11708,11708,2.4,8.1,170.6,40
552650,11859,11859,2.5,7.3,170.8,50
602432,4978,4978,2.5,7.3,170.8,60
614364,1193,1193,2.5,7.5,5490.4,71
634199,1983,1983,2.5,8.1,5490.4,81
653293,1909,1909,2.5,8.9,5490.4,91
658398,510,510,2.5,8.7,5490.4,101
671805,1340,1340,2.6,8.7,5490.4,111
678677,687,687,2.6,9.1,5490.4,121
685247,657,657,2.6,10.2,5626.8,131
691519,627,627,2.6,10.7,5626.8,141
693682,216,216,2.6,10.7,5626.8,151
700082,640,640,2.7,11.9,6460.1,161
703952,387,387,2.7,12.5,6460.1,172
706007,205,205,2.7,12.5,6460.1,182
709988,398,398,2.7,12.7,6647.0,192
^Cmacaroon:bin administrator$

Andy C

On 25 Jul 2013, at 15:28, Sávio Teles 
savio.te...@lupa.inf.ufg.brmailto:savio.te...@lupa.inf.ufg.br wrote:

Some bug was fixed in 2.0.0-beta2 by C* developers. Try it!


2013/7/22 Andrew Cobley 
a.e.cob...@dundee.ac.ukmailto:a.e.cob...@dundee.ac.uk
I've been noticing some strange casandra-stress results with 2.0.0 beta 1.  
I've set up a single node on a Mac (4 gig ram, 2.8Ghz core 2 duo) and installed 
2.0.0 beta1.

When I run ./cassandra-stress  -d 134.36.36.218 I'm seeing the interval-op-rate 
drop from a peek of 11562 at the start to 0 -20 after about 358 seconds.  
Here's the output:




The University of Dundee is a registered Scottish Charity, No: SC015096


Re: Strange cassandra-stress results with 2.0.0 beta1

2013-07-25 Thread Andrew Cobley
So is that in Cassandra somewhere ? Any idea on how I can go about  pinpointing 
the problem to raise a JIRA issue  ?

Andy

On 25 Jul 2013, at 17:50, Radim Kolar h...@filez.com wrote:


 I'm wondering if it's a GC issue ?
 yes it is:

 1039280992 used; max is 1052770304

 most likely memory leak.




The University of Dundee is a registered Scottish Charity, No: SC015096



Re: Cassandra and RAIDs

2013-07-24 Thread Andrew Cobley
From:

http://www.datastax.com/docs/1.2/cluster_architecture/cluster_planning

  *   RAID on data disks: It is generally not necessary to use RAID for the 
following reasons:

  *   Data is replicated across the cluster based on the replication factor 
you've chosen.
  *   Starting in version 1.2, Cassandra includes takes care of disk management 
with the JBOD (Just a bunch of disks) support feature. Because Cassandra 
properly reacts to a disk failure, based on your availability/consistency 
requirements, either by stopping the affected node or by blacklisting the 
failed drive, this allows you to deploy Cassandra nodes with large disk arrays 
without the overhead of RAID 10.

  *   RAID on the commit log disk: Generally RAID is not needed for the commit 
log disk. Replication adequately prevents data loss. If you need the extra 
redundancy, use RAID 1.


Andy

On 24 Jul 2013, at 15:36, Jan Algermissen 
jan.algermis...@nordsc.commailto:jan.algermis...@nordsc.com wrote:

Hi,

second question:

is it recommended to set up Cassandra using 'RAID-ed' disks for per-node 
reliability or do people usually just rely on having the multiple nodes anyway 
- why bother with replicated disks?

Jan


The University of Dundee is a registered Scottish Charity, No: SC015096


Cassandra 2 vs Java 1.6

2013-07-22 Thread Andrew Cobley
I know it was decided to drop the requirement for Java 1.6 for cassandra some 
time ago, but my question is should 
2.0.0-beta1http://www.apache.org/dyn/closer.cgi?path=/cassandra/2.0.0/apache-cassandra-2.0.0-beta1-bin.tar.gz
 run under java 1.6 at all ?  I tried and got the following error:


macaroon:bin administrator$ Exception in thread main 
java.lang.UnsupportedClassVersionError: 
org/apache/cassandra/service/CassandraDaemon : Unsupported major.minor version 
51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

macaroon:bin administrator$ java -version
java version 1.6.0_43
Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-10M4203)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode)
macaroon:bin administrator$

It's fine by me if thats the case !

Andy


The University of Dundee is a registered Scottish Charity, No: SC015096


RE: Cassandra 2 vs Java 1.6

2013-07-22 Thread Andrew Cobley
Actually, it looks like it may not compile under 1.6 either.   build.xml has 
the following:

property name=source.version value=1.7/
property name=target.version value=1.7/


BTW this came because I'm setting up a little test cluster on three spare mac 
computers in our labs. They haven't been updated for sometime and are running 
MacOs 10.6.8. Trying to install JDK 7u25 is a no go, only supported on 10.7.3.

It's not a major issue, just a  warning that older Mac users may find this a 
problem.

Andy



From: Michał Michalski [mich...@opera.com]
Sent: 22 July 2013 09:14
To: user@cassandra.apache.org
Subject: Re: Cassandra 2 vs Java 1.6

I believe it won't run on 1.6. Java 1.7 is required to compile C* 2.0+
and once it's done, you cannot run it using Java 1.6 (this is what
Unsupported major.minor version error tells you about; java version 50
is 1.6 and 51 is 1.7).

M.

W dniu 22.07.2013 10:06, Andrew Cobley pisze:
 I know it was decided to drop the requirement for Java 1.6 for cassandra some 
 time ago, but my question is should 
 2.0.0-beta1http://www.apache.org/dyn/closer.cgi?path=/cassandra/2.0.0/apache-cassandra-2.0.0-beta1-bin.tar.gz
  run under java 1.6 at all ?  I tried and got the following error:


 macaroon:bin administrator$ Exception in thread main 
 java.lang.UnsupportedClassVersionError: 
 org/apache/cassandra/service/CassandraDaemon : Unsupported major.minor 
 version 51.0
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
  at 
 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
  at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
  at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

 macaroon:bin administrator$ java -version
 java version 1.6.0_43
 Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-10M4203)
 Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode)
 macaroon:bin administrator$

 It's fine by me if thats the case !

 Andy


 The University of Dundee is a registered Scottish Charity, No: SC015096




The University of Dundee is a registered Scottish Charity, No: SC015096



Strange cassandra-stress results with 2.0.0 beta1

2013-07-22 Thread Andrew Cobley
I've been noticing some strange casandra-stress results with 2.0.0 beta 1.  
I've set up a single node on a Mac (4 gig ram, 2.8Ghz core 2 duo) and installed 
2.0.0 beta1.

When I run ./cassandra-stress  -d 134.36.36.218 I'm seeing the interval-op-rate 
drop from a peek of 11562 at the start to 0 -20 after about 358 seconds.  
Here's the output:

./cassandra-stress  -d 134.36.36.218
Created keyspaces. Sleeping 1s for propagation.
total,interval_op_rate,interval_key_rate,latency,95th,99th,elapsed_time
13629,1362,1362,15.3,117.6,531.1,10
37545,2391,2391,9.4,74.0,438.4,20
105410,6786,6786,3.3,38.0,216.4,30
209014,10360,10360,2.7,26.2,216.5,41
320024,11101,11101,2.5,14.5,216.5,51
430216,11019,11019,2.4,10.5,215.4,61
531905,10168,10168,2.4,8.3,177.1,72
619672,8776,8776,2.4,6.2,145.8,82
653977,3430,3430,2.4,5.9,145.4,92
682648,2867,2867,2.4,6.1,145.4,102
692771,1012,1012,2.4,6.1,145.4,113
712163,1939,1939,2.4,6.0,4461.7,123
723761,1159,1159,2.4,6.0,4461.7,133
731115,735,735,2.4,6.1,4461.7,143
737627,651,651,2.4,6.2,4461.7,153
743853,622,622,2.4,7.0,5056.1,164
747345,349,349,2.4,7.0,5056.1,174
755501,815,815,2.5,6.9,6351.7,184
758692,319,319,2.5,6.9,5056.1,195
763960,526,526,2.5,7.3,5292.6,205
767966,400,400,2.5,7.4,5292.6,215
769514,154,154,2.5,7.4,5292.6,225
773492,397,397,2.5,7.2,6435.7,236
775374,188,188,2.5,7.4,5292.6,246
776035,66,66,2.6,7.5,5347.1,256
777896,186,186,2.6,7.9,6407.3,266
778791,89,89,2.6,8.0,6438.9,276
779646,85,85,2.6,8.0,6523.2,287
780785,113,113,2.6,11.1,6523.2,297
781336,55,55,2.6,11.7,6523.2,307
781684,34,34,2.6,13.3,16734.0,317
781818,13,13,2.7,13.9,16764.2,328
781952,13,13,2.7,13.9,16900.1,338
782195,24,24,2.7,15.3,16900.1,348
782294,9,9,2.7,15.3,16900.1,358
782362,6,6,2.7,15.5,21487.3,368
782589,22,22,2.7,20.1,21487.3,379
782775,18,18,2.7,28.8,21487.3,389
783012,23,23,2.8,29.4,21487.3,399
783248,23,23,2.8,68.2,21487.3,409
783270,2,2,2.8,68.2,21487.3,419
783283,1,1,2.8,68.2,21487.3,430
783283,0,0,2.8,68.2,21487.3,440
783337,5,5,2.8,198.6,42477.2,450
783492,15,15,2.9,5057.6,52687.3,460
783581,8,8,2.9,5349.0,59306.9,471
783807,22,22,3.0,6429.1,59306.9,481
783816,0,0,3.0,6438.3,59306.9,491
783945,12,12,3.2,11566.9,59306.9,501
783962,1,1,3.2,11612.0,59306.9,512
783962,0,0,3.2,11612.0,59306.9,522


I installed 1.2.6 for comparision and that gave  expected results:

./cassandra-stress  -d 134.36.36.218
Unable to create stress keyspace: Keyspace names must be case-insensitively 
unique (Keyspace1 conflicts with Keyspace1)
total,interval_op_rate,interval_key_rate,latency/95th/99th,elapsed_time
22158,2215,2215,0.8,8.9,549.0,10
64192,4203,4203,1.0,7.0,486.2,20
114236,5004,5004,1.3,6.5,411.9,30
178407,6417,6417,1.4,5.5,411.9,40
281714,10330,10330,2.2,5.1,409.6,51
371684,8997,8997,2.4,5.1,407.5,61
464401,9271,9271,2.5,5.0,236.7,72
562797,9839,9839,2.6,5.2,87.5,82
655755,9295,9295,2.6,5.2,87.5,92
751560,9580,9580,2.6,4.7,179.9,103
848022,9646,9646,2.6,4.5,826.0,113
914539,6651,6651,2.6,4.7,823.2,123
100,8546,8546,2.6,5.1,1048.5,133

Any ideas whats causing the slow down ?

Andy


The University of Dundee is a registered Scottish Charity, No: SC015096


Re: Cassandra 2.0 : Ant build issue

2013-07-22 Thread Andrew Cobley
Are you using JDK 1.6.  If so you'll need to get the 1.7 jdk (Java SE 7u25) 
from oracle to do the compile.  See my message thread earlier today subject 
Cassandra 2 vs Java 1.6 for a few more details.

Andy


On 22 Jul 2013, at 20:16, Soumava Ghosh 
soum...@cs.utexas.edumailto:soum...@cs.utexas.edu wrote:

Hi,

I'm working on a Mac OS 10.8 and trying to build the cassandra trunk using ant. 
I am getting the error as below. I can see a related bug that fixed a similar 
issue for debian (https://issues.apache.org/jira/browse/CASSANDRA-5688), but I 
can still repro this on Mac.

Thanks,
Soumava

soumava$ git describe
cassandra-2.0.0-beta1-100-ge0eacd2
...
soumava$ ant
...
gen-cql3-grammar:
 [echo] Building Grammar 
/Users/soumava/Documents/src/git-cassandra/src/java/org/apache/cassandra/cql3/Cql.g
  ...

build-project:
 [echo] apache-cassandra: 
/Users/soumava/Documents/src/git-cassandra/build.xml
[javac] Compiling 17 source files to 
/Users/soumava/Documents/src/git-cassandra/build/classes/thrift
[javac] javac: invalid target release: 1.7
[javac] Usage: javac options source files
[javac] use -help for a list of possible options

BUILD FAILED
/Users/soumava/Documents/src/git-cassandra/build.xml:636: Compile failed; see 
the compiler error output for details.

Total time: 7 seconds



The University of Dundee is a registered Scottish Charity, No: SC015096


RE: Cassandra 2.0 : Ant build issue

2013-07-22 Thread Andrew Cobley
What version do you get with

javac -version

?
Andy


From: soum...@utexas.edu [soum...@utexas.edu] on behalf of Soumava Ghosh 
[soum...@cs.utexas.edu]
Sent: 22 July 2013 21:09
To: user@cassandra.apache.org
Subject: Re: Cassandra 2.0 : Ant build issue

I'm using 1.7.0_21 (not 25 though)..

soumava$ java -version
java version 1.7.0_21
Java(TM) SE Runtime Environment (build 1.7.0_21-b12)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

Thanks,
Soumava


On Mon, Jul 22, 2013 at 1:06 PM, Andrew Cobley 
a.e.cob...@dundee.ac.ukmailto:a.e.cob...@dundee.ac.uk wrote:
Are you using JDK 1.6.  If so you'll need to get the 1.7 jdk (Java SE 7u25) 
from oracle to do the compile.  See my message thread earlier today subject 
Cassandra 2 vs Java 1.6 for a few more details.

Andy


On 22 Jul 2013, at 20:16, Soumava Ghosh 
soum...@cs.utexas.edumailto:soum...@cs.utexas.edu wrote:

Hi,

I'm working on a Mac OS 10.8 and trying to build the cassandra trunk using ant. 
I am getting the error as below. I can see a related bug that fixed a similar 
issue for debian (https://issues.apache.org/jira/browse/CASSANDRA-5688), but I 
can still repro this on Mac.

Thanks,
Soumava

soumava$ git describe
cassandra-2.0.0-beta1-100-ge0eacd2
...
soumava$ ant
...
gen-cql3-grammar:
 [echo] Building Grammar 
/Users/soumava/Documents/src/git-cassandra/src/java/org/apache/cassandra/cql3/Cql.g
  ...

build-project:
 [echo] apache-cassandra: 
/Users/soumava/Documents/src/git-cassandra/build.xml
[javac] Compiling 17 source files to 
/Users/soumava/Documents/src/git-cassandra/build/classes/thrift
[javac] javac: invalid target release: 1.7
[javac] Usage: javac options source files
[javac] use -help for a list of possible options

BUILD FAILED
/Users/soumava/Documents/src/git-cassandra/build.xml:636: Compile failed; see 
the compiler error output for details.

Total time: 7 seconds



The University of Dundee is a registered Scottish Charity, No: SC015096


The University of Dundee is a registered Scottish Charity, No: SC015096


RE: Cassandra 2.0 : Ant build issue

2013-07-22 Thread Andrew Cobley
Hmm,

I'm not sure then, I built 2.0 beta 1 earlier today with 1.7.0_25.  One last 
thing, what have you got JAVA_HOME set to ?

Andy


From: soum...@utexas.edu [soum...@utexas.edu] on behalf of Soumava Ghosh 
[soum...@cs.utexas.edu]
Sent: 22 July 2013 21:21
To: user
Subject: Re: Cassandra 2.0 : Ant build issue

There you go:

soumava$ javac -version
javac 1.7.0_25

Thanks,
Soumava



On Mon, Jul 22, 2013 at 1:19 PM, Andrew Cobley 
a.e.cob...@dundee.ac.ukmailto:a.e.cob...@dundee.ac.uk wrote:
What version do you get with

javac -version

?
Andy


From: soum...@utexas.edumailto:soum...@utexas.edu 
[soum...@utexas.edumailto:soum...@utexas.edu] on behalf of Soumava Ghosh 
[soum...@cs.utexas.edumailto:soum...@cs.utexas.edu]
Sent: 22 July 2013 21:09
To: user@cassandra.apache.orgmailto:user@cassandra.apache.org
Subject: Re: Cassandra 2.0 : Ant build issue

I'm using 1.7.0_21 (not 25 though)..

soumava$ java -version
java version 1.7.0_21
Java(TM) SE Runtime Environment (build 1.7.0_21-b12)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

Thanks,
Soumava


On Mon, Jul 22, 2013 at 1:06 PM, Andrew Cobley 
a.e.cob...@dundee.ac.ukmailto:a.e.cob...@dundee.ac.uk wrote:
Are you using JDK 1.6.  If so you'll need to get the 1.7 jdk (Java SE 7u25) 
from oracle to do the compile.  See my message thread earlier today subject 
Cassandra 2 vs Java 1.6 for a few more details.

Andy


On 22 Jul 2013, at 20:16, Soumava Ghosh 
soum...@cs.utexas.edumailto:soum...@cs.utexas.edu wrote:

Hi,

I'm working on a Mac OS 10.8 and trying to build the cassandra trunk using ant. 
I am getting the error as below. I can see a related bug that fixed a similar 
issue for debian (https://issues.apache.org/jira/browse/CASSANDRA-5688), but I 
can still repro this on Mac.

Thanks,
Soumava

soumava$ git describe
cassandra-2.0.0-beta1-100-ge0eacd2
...
soumava$ ant
...
gen-cql3-grammar:
 [echo] Building Grammar 
/Users/soumava/Documents/src/git-cassandra/src/java/org/apache/cassandra/cql3/Cql.g
  ...

build-project:
 [echo] apache-cassandra: 
/Users/soumava/Documents/src/git-cassandra/build.xml
[javac] Compiling 17 source files to 
/Users/soumava/Documents/src/git-cassandra/build/classes/thrift
[javac] javac: invalid target release: 1.7
[javac] Usage: javac options source files
[javac] use -help for a list of possible options

BUILD FAILED
/Users/soumava/Documents/src/git-cassandra/build.xml:636: Compile failed; see 
the compiler error output for details.

Total time: 7 seconds



The University of Dundee is a registered Scottish Charity, No: SC015096


The University of Dundee is a registered Scottish Charity, No: SC015096


The University of Dundee is a registered Scottish Charity, No: SC015096


RE: Cassandra 2.0 : Ant build issue

2013-07-22 Thread Andrew Cobley
If I may ask, isn't the Java setup supposed to update the environment 
variable?

Sadly I don't think it does!

Andy


From: soum...@utexas.edu [soum...@utexas.edu] on behalf of Soumava Ghosh 
[soum...@cs.utexas.edu]
Sent: 22 July 2013 21:31
To: user
Subject: Re: Cassandra 2.0 : Ant build issue

Thanks Andrew!

JAVA_HOME was the issue. It was not set, and I think that's why the build was 
somehow defaulting to /Library/Java/Home which was a 1.6 JDK. It should have 
been /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home. Setting 
JAVA_HOME to this path unblocked the build.

If I may ask, isn't the Java setup supposed to update the environment variable?


On Mon, Jul 22, 2013 at 1:25 PM, Andrew Cobley 
a.e.cob...@dundee.ac.ukmailto:a.e.cob...@dundee.ac.uk wrote:
Hmm,

I'm not sure then, I built 2.0 beta 1 earlier today with 1.7.0_25.  One last 
thing, what have you got JAVA_HOME set to ?

Andy


From: soum...@utexas.edumailto:soum...@utexas.edu 
[soum...@utexas.edumailto:soum...@utexas.edu] on behalf of Soumava Ghosh 
[soum...@cs.utexas.edumailto:soum...@cs.utexas.edu]
Sent: 22 July 2013 21:21
To: user

Subject: Re: Cassandra 2.0 : Ant build issue

There you go:

soumava$ javac -version
javac 1.7.0_25

Thanks,
Soumava



On Mon, Jul 22, 2013 at 1:19 PM, Andrew Cobley 
a.e.cob...@dundee.ac.ukmailto:a.e.cob...@dundee.ac.uk wrote:
What version do you get with

javac -version

?
Andy


From: soum...@utexas.edumailto:soum...@utexas.edu 
[soum...@utexas.edumailto:soum...@utexas.edu] on behalf of Soumava Ghosh 
[soum...@cs.utexas.edumailto:soum...@cs.utexas.edu]
Sent: 22 July 2013 21:09
To: user@cassandra.apache.orgmailto:user@cassandra.apache.org
Subject: Re: Cassandra 2.0 : Ant build issue

I'm using 1.7.0_21 (not 25 though)..

soumava$ java -version
java version 1.7.0_21
Java(TM) SE Runtime Environment (build 1.7.0_21-b12)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

Thanks,
Soumava


On Mon, Jul 22, 2013 at 1:06 PM, Andrew Cobley 
a.e.cob...@dundee.ac.ukmailto:a.e.cob...@dundee.ac.uk wrote:
Are you using JDK 1.6.  If so you'll need to get the 1.7 jdk (Java SE 7u25) 
from oracle to do the compile.  See my message thread earlier today subject 
Cassandra 2 vs Java 1.6 for a few more details.

Andy


On 22 Jul 2013, at 20:16, Soumava Ghosh 
soum...@cs.utexas.edumailto:soum...@cs.utexas.edu wrote:

Hi,

I'm working on a Mac OS 10.8 and trying to build the cassandra trunk using ant. 
I am getting the error as below. I can see a related bug that fixed a similar 
issue for debian (https://issues.apache.org/jira/browse/CASSANDRA-5688), but I 
can still repro this on Mac.

Thanks,
Soumava

soumava$ git describe
cassandra-2.0.0-beta1-100-ge0eacd2
...
soumava$ ant
...
gen-cql3-grammar:
 [echo] Building Grammar 
/Users/soumava/Documents/src/git-cassandra/src/java/org/apache/cassandra/cql3/Cql.g
  ...

build-project:
 [echo] apache-cassandra: 
/Users/soumava/Documents/src/git-cassandra/build.xml
[javac] Compiling 17 source files to 
/Users/soumava/Documents/src/git-cassandra/build/classes/thrift
[javac] javac: invalid target release: 1.7
[javac] Usage: javac options source files
[javac] use -help for a list of possible options

BUILD FAILED
/Users/soumava/Documents/src/git-cassandra/build.xml:636: Compile failed; see 
the compiler error output for details.

Total time: 7 seconds



The University of Dundee is a registered Scottish Charity, No: SC015096


The University of Dundee is a registered Scottish Charity, No: SC015096


The University of Dundee is a registered Scottish Charity, No: SC015096


The University of Dundee is a registered Scottish Charity, No: SC015096


Re: V2 Beta 1 bootstrap behaviour ?

2013-07-16 Thread Andrew Cobley
Righto !

Will do a JIRA report..

Many thanks

Andy

On 16 Jul 2013, at 18:50, Robert Coli 
rc...@eventbrite.commailto:rc...@eventbrite.com
 wrote:

On Tue, Jul 16, 2013 at 1:16 AM, Andrew Cobley 
a.e.cob...@dundee.ac.ukmailto:a.e.cob...@dundee.ac.uk wrote:
I'm setting up a new test cluster using  2.0.0-beta1 and I noticed the 
following behaviour with vnodes turned on.  I bring up one node all well and 
good.  however if I bring up a second node, that can't contact the first (the 
first being the seed for the second) after a short period of time, the second 
goes ahead and assumes it's the only node and bootstraps with all tokens.  Is 
this correct behaviour? I'd have thought it would halt with a Can't contact 
seed message to avoid the  node starting in a possibly mis-confgured state ?

It should do this, but currently does not. Obviously if you have defined a seed 
and cannot contact it, the node should not start as a cluster of one. I have a 
to-do list item to file a JIRA on the subject, but if you wanted to file and 
link us, that'd be super. :)

=Rob



The University of Dundee is a registered Scottish Charity, No: SC015096


Re: How to do a CAS UPDATE on single column CF?

2013-07-01 Thread Andrew Cobley
According to Jonathan Ellis talk at Cassandra 13 it does use Paxos:

http://www.youtube.com/watch?v=PcUpPR4nSr4list=PLqcm6qE9lgKJzVvwHprow9h7KMpb5hcUU

http://www.slideshare.net/jbellis/cassandra-summit-2013-keynote

Andy

On 1 Jul 2013, at 19:40, Francisco Andrades Grassi 
bigjoc...@gmail.commailto:bigjoc...@gmail.com wrote:

http://en.wikipedia.org/wiki/Compare-and-swap

I believe C* uses Paxos for CAS but not completely sure?

--
Francisco Andrades Grassi
www.bigjocker.comhttp://www.bigjocker.com/
@bigjocker

On Jul 1, 2013, at 1:49 PM, Hiller, Dean 
dean.hil...@nrel.govmailto:dean.hil...@nrel.gov wrote:

What does CAS stand for? And is that the row locking feature like hbase's
setAndReadWinner that you give the previous val and next val and your next
val is returned if you won otherwise the current result is returned and
you know some other node won?



The University of Dundee is a registered Scottish Charity, No: SC015096


Re: How to configure linux service for Cassandra

2013-03-19 Thread Andrew Cobley
Does this help you ?

https://github.com/acobley/CassandraStartup

it was built for Raspbian, but might help you.

Andy

On 19 Mar 2013, at 11:10, Roshan 
codeva...@gmail.commailto:codeva...@gmail.com wrote:

Hi

I want to start the cassandra as a service. At the moment it is starting as
a background task.

Cassandra version: 1.0.11
OS: CentOS 5.X

Any help is much appreciated.

Thanks.



--
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/How-to-configure-linux-service-for-Cassandra-tp7586474.html
Sent from the 
cassandra-u...@incubator.apache.orgmailto:cassandra-u...@incubator.apache.org 
mailing list archive at Nabble.comhttp://Nabble.com.



The University of Dundee is a registered Scottish Charity, No: SC015096


Cassandra as a service on Windows

2013-02-14 Thread Andrew Cobley
Hi all,\
According to

http://www.datastax.com/dev/blog/whats-new-in-cassandra-1-0-windows-service-new-cql-clients-and-more

running cassandra.bat install should make cassandra run on a service on a 
windows box.  However I'm getting the following when I try:

C:\apache-cassandra-1.2.1\bincassandra.bat install
trying to delete service if it has been created already
The system cannot find the path specified.

Installing cassandra. If you get registry warnings, re-run as an Administrator

The system cannot find the path specified.
Setting the parameters for cassandra
The system cannot find the path specified.
Installation of cassandra is complete

no service is installed.  Digging into cassandra.bat I notice:

:doInstallOperation
set SERVICE_JVM=cassandra
rem location of Prunsrv
set PATH_PRUNSRV=%CASSANDRA_HOME%\bin\daemon\
set PR_LOGPATH=%PATH_PRUNSRV%

\bin\daemon does not exist.  Is this a bug that it's missing ?

Andy


The University of Dundee is a registered Scottish Charity, No: SC015096