Re: admin console ?

2009-11-19 Thread TuxRacer69

Igor,

Writing your own JMX client is not that difficult.

The natural language to write JMX clients is Java, but if you prefer to 
use your favourite language like Python or Ruby, there is a 'natural' 
way too.


For python, you could use 'jython' http://jython.org

You can then look at sample Java clients and adapts them to jython.

For Cassandra, here is a sample JMX client I wrote to give you an idea 
(sample output follows)

Writing a pure python JMX client seems on the other hand really difficult ;)

Alex

==


# This is a jython JMX dumper
# to install jython on debian:
# apt-get install jython

# see 
http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java?view=markuppathrev=822791

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.openmbean.CompositeDataSupport;
import javax.management.openmbean.CompositeType;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;

from array import array

import getopt
import sys

def get_connection(url,username,password):
   ad=array(java.lang.String,[username,password])
   n = java.util.HashMap()
   n.put (javax.management.remote.JMXConnector.CREDENTIALS, ad);
   jmxurl = javax.management.remote.JMXServiceURL(url)
   testme = javax.management.remote.JMXConnectorFactory.connect(jmxurl,n)
   connection = testme.getMBeanServerConnection();
   # could also return the testme to allow closing the connection (but 
jython will close it at exit time)

   # testme.close()
   return connection

def dump_object(connection,objectName):
   Dumps an object based on its name (string)
   
mymbeaninfo=connection.getMBeanInfo(javax.management.ObjectName(objectName))

   out=[]
   for attribute in mymbeaninfo.attributes:
   
atvalue=connection.getAttribute(javax.management.ObjectName(objectName),attribute.name)

   out.append(%s: %s % (attribute.name,atvalue))
   return \n.join(out)

def query_objects(connection,queryString):
   Dumps lists of objects based on a query (string)
   out=[]
   out.append(doing queryString=%s  % queryString)
   query=javax.management.ObjectName(queryString)
   result = connection.queryNames(query,None)
   # print result
   for objectName in result:
   out.append(* %s * % objectName)
   out.append(dump_object(connection,%s % objectName))
   return \n.join(out)



if __name__ == __main__:
   # defaults:
   url=service:jmx:rmi:///jndi/rmi://localhost:8080/jmxrmi
   username=controlRole
   password=change_asap
   
objectname=org.apache.cassandra.db:type=ColumnFamilyStores,name=Keyspace1,columnfamily=Super1

   # defaults can be changed using command line options:
   optlist, list = getopt.getopt(sys.argv[1:], 'c:u:p:o:')
   # print optlist =, optlist
   # print list =, list
   for option in optlist:
   # print option
   if option[0] == '-c':
   url=option[1]
   print connection= +url
   if option[0] == '-u':
   username=option[1]
   print username= +username
   if option[0] == '-p':
   password=option[1]
   print password= +password
   if option[0] == '-o':
   objectname=option[1]
   print objectname= +objectname


   # connect
   connection=get_connection(url,username,password)
   # dump the default object
   print dump_object(connection,objectname)

   # now test queries:
   queryString=org.apache.cassandra.db:type=ColumnFamilyStores,*
   print query_objects(connection,queryString)

== sample output =

jython cassandra_jmx.py
PendingTasks: 0
ColumnFamilyName: Super1
MemtableColumnsCount: 0
MemtableDataSize: 0
MemtableSwitchCount: 0
ReadCount: 0
ReadLatency: NaN
WriteCount: 0
WriteLatency: NaN
doing queryString=org.apache.cassandra.db:type=ColumnFamilyStores,*
* 
org.apache.cassandra.db:type=ColumnFamilyStores,name=system,columnfamily=LocationInfo 
*

PendingTasks: 0
ColumnFamilyName: LocationInfo
MemtableColumnsCount: 2
MemtableDataSize: 56
MemtableSwitchCount: 0
ReadCount: 0
ReadLatency: NaN
WriteCount: 0
WriteLatency: NaN
* 
org.apache.cassandra.db:type=ColumnFamilyStores,name=Keyspace1,columnfamily=Standard1 
*

PendingTasks: 0
ColumnFamilyName: Standard1
MemtableColumnsCount: 0
MemtableDataSize: 0
MemtableSwitchCount: 0
ReadCount: 0
ReadLatency: NaN
WriteCount: 0
WriteLatency: NaN
* 
org.apache.cassandra.db:type=ColumnFamilyStores,name=Keyspace1,columnfamily=Super1 
*

PendingTasks: 0
ColumnFamilyName: Super1
MemtableColumnsCount: 0
MemtableDataSize: 0
MemtableSwitchCount: 0
ReadCount: 0
ReadLatency: NaN
WriteCount: 0
WriteLatency: NaN
* 

cassandra slow write

2009-11-19 Thread ROGER PUIG GANZA
Hello, I' doing some tests with Cassandra, but I get a very slow performance, 
it does 100.000 inserts in 215 seconds while mysql takes 79 secs
The code below is the one I'm using, is there anything wrong with my Cassandra 
or java understanding?
The configuration-file params are the default ones.
Thank you!

cassandraInserter(){
long ini = System.currentTimeMillis();
TTransport tr = new TSocket(ip, port);
TBinaryProtocol proto = new TBinaryProtocol(tr);
Client client = new Client(proto);

try {
  tr.open();
} catch (TTransportException e1) {
  e1.printStackTrace();
}

for (int i = 0; i  N; i++) {
  try {
long timestamp = System.currentTimeMillis();
ListColumnOrSuperColumn columns = new 
ArrayListColumnOrSuperColumn();
MapString, ListColumnOrSuperColumn map = new 
HashMapString, ListColumnOrSuperColumn();

columns.add(new ColumnOrSuperColumn(new Column(col1, 
data, timestamp), null));
columns.add(new ColumnOrSuperColumn(new Column(col2, 
data, timestamp), null));
columns.add(new ColumnOrSuperColumn(new Column(col3, 
data, timestamp), null));
columns.add(new ColumnOrSuperColumn(new Column(col4, 
data, timestamp), null));
columns.add(new ColumnOrSuperColumn(new Column(col4, 
data, timestamp), null));
columns.add(new ColumnOrSuperColumn(new Column(col5, 
data, timestamp), null));
columns.add(new ColumnOrSuperColumn(new Column(col6, 
data, timestamp), null));
columns.add(new ColumnOrSuperColumn(new Column(col7, 
data, timestamp), null));
columns.add(new ColumnOrSuperColumn(new Column(col8, 
data, timestamp), null));
acl.put(colfamily, columns);
client.batch_insert(keyspace, key, map, 
ConsistencyLevel.ONE);
  } catch (TTransportException e) {
e.printStackTrace();
  } catch (UnsupportedEncodingException e) {
e.printStackTrace();
  } catch (InvalidRequestException e) {
e.printStackTrace();
  } catch (UnavailableException e) {
e.printStackTrace();
  } catch (TException e) {
e.printStackTrace();
  }
}
tr.close();
  }

Roger Puig Ganza



Re: cassandra slow write

2009-11-19 Thread Tim Underwood
I had the same issue using a single thread but now I multi-thread the
batch_insert calls using a java.util.concurrent.ThreadPoolExecutor (wrapped
in some Scala syntactic sugar) and get good write performance.

-Tim

On Thu, Nov 19, 2009 at 5:34 AM, Jonathan Ellis jbel...@gmail.com wrote:

 your biggest problem is you are only using one client thread.

 you should also set log level to INFO.

 On Thu, Nov 19, 2009 at 6:01 AM, ROGER PUIG GANZA rp...@tid.es wrote:
  Hello, I’ doing some tests with Cassandra, but I get a very slow
  performance, it does 100.000 inserts in 215 seconds while mysql takes 79
  secs
 
  The code below is the one I’m using, is there anything wrong with my
  Cassandra or java understanding?
 
  The configuration-file params are the default ones.
 
  Thank you!
 
 
 
  cassandraInserter(){
 
  long ini = System.currentTimeMillis();
 
  TTransport tr = new TSocket(ip, port);
 
  TBinaryProtocol proto = new TBinaryProtocol(tr);
 
  Client client = new Client(proto);
 
 
 
  try {
 
tr.open();
 
  } catch (TTransportException e1) {
 
e1.printStackTrace();
 
  }
 
 
 
  for (int i = 0; i  N; i++) {
 
try {
 
  long timestamp = System.currentTimeMillis();
 
  ListColumnOrSuperColumn columns = new
  ArrayListColumnOrSuperColumn();
 
  MapString, ListColumnOrSuperColumn map = new
  HashMapString, ListColumnOrSuperColumn();
 
 
 
  columns.add(new ColumnOrSuperColumn(new
 Column(col1,
  data, timestamp), null));
 
  columns.add(new ColumnOrSuperColumn(new
 Column(col2,
  data, timestamp), null));
 
  columns.add(new ColumnOrSuperColumn(new
 Column(col3,
  data, timestamp), null));
 
  columns.add(new ColumnOrSuperColumn(new
 Column(col4,
  data, timestamp), null));
 
  columns.add(new ColumnOrSuperColumn(new
 Column(col4,
  data, timestamp), null));
 
  columns.add(new ColumnOrSuperColumn(new
 Column(col5,
  data, timestamp), null));
 
  columns.add(new ColumnOrSuperColumn(new
 Column(col6,
  data, timestamp), null));
 
  columns.add(new ColumnOrSuperColumn(new
 Column(col7,
  data, timestamp), null));
 
  columns.add(new ColumnOrSuperColumn(new
 Column(col8,
  data, timestamp), null));
 
  acl.put(colfamily, columns);
 
  client.batch_insert(keyspace, key, map,
  ConsistencyLevel.ONE);
 
} catch (TTransportException e) {
 
  e.printStackTrace();
 
} catch (UnsupportedEncodingException e) {
 
  e.printStackTrace();
 
} catch (InvalidRequestException e) {
 
  e.printStackTrace();
 
} catch (UnavailableException e) {
 
  e.printStackTrace();
 
} catch (TException e) {
 
  e.printStackTrace();
 
}
 
  }
 
  tr.close();
 
}
 
 
 
  Roger Puig Ganza
 
 



Re: java.util.concurrent.TimeoutException: Operation timed out - received only 0 responses from .

2009-11-19 Thread Tim Underwood
I've seen also.  Sometimes it seems random and retrying the call works (I
think it might have happened during a compaction).  If I try doing a
batch_insert on a key with more than 200,000 columns (or so) I always get
this exception and have to break the inserts into smaller chunks.

-Tim

On Wed, Nov 18, 2009 at 11:25 PM, mobiledream...@gmail.com wrote:

 Can you plase tell what this error is ?

 ERROR - error writing key ruske
 *java.util.concurrent.TimeoutException: Operation timed out - received
 only 0 responses from  .*
 at
 org.apache.cassandra.service.QuorumResponseHandler.get(QuorumResponseHandler.java:88)
 at
 org.apache.cassandra.service.StorageProxy.insertBlocking(StorageProxy.java:164)
 at
 org.apache.cassandra.service.CassandraServer.doInsert(CassandraServer.java:468)
 at
 org.apache.cassandra.service.CassandraServer.batch_insert(CassandraServer.java:448)
 at
 org.apache.cassandra.service.Cassandra$Processor$batch_insert.process(Cassandra.java:854)
 at
 org.apache.cassandra.service.Cassandra$Processor.process(Cassandra.java:627)
 at
 org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:619)


 Errors



Re: java.util.concurrent.TimeoutException: Operation timed out - received only 0 responses from .

2009-11-19 Thread mobiledreamers
can you share code on how to split columns in cassdict or batch_insert?
thanks

On Thu, Nov 19, 2009 at 8:15 AM, Tim Underwood timunderw...@gmail.comwrote:

 I've seen also.  Sometimes it seems random and retrying the call works (I
 think it might have happened during a compaction).  If I try doing a
 batch_insert on a key with more than 200,000 columns (or so) I always get
 this exception and have to break the inserts into smaller chunks.

 -Tim


 On Wed, Nov 18, 2009 at 11:25 PM, mobiledream...@gmail.com wrote:

 Can you plase tell what this error is ?

 ERROR - error writing key ruske
 *java.util.concurrent.TimeoutException: Operation timed out - received
 only 0 responses from  .*
 at
 org.apache.cassandra.service.QuorumResponseHandler.get(QuorumResponseHandler.java:88)
 at
 org.apache.cassandra.service.StorageProxy.insertBlocking(StorageProxy.java:164)
 at
 org.apache.cassandra.service.CassandraServer.doInsert(CassandraServer.java:468)
 at
 org.apache.cassandra.service.CassandraServer.batch_insert(CassandraServer.java:448)
 at
 org.apache.cassandra.service.Cassandra$Processor$batch_insert.process(Cassandra.java:854)
 at
 org.apache.cassandra.service.Cassandra$Processor.process(Cassandra.java:627)
 at
 org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:619)


 Errors





-- 
Bidegg worlds best auction site
http://bidegg.com


RE: thrift example for batch_insert

2009-11-19 Thread Mike Roberts
There's an example on http://wiki.apache.org/cassandra/ClientExamples for PHP. 
Python shouldn't be too different.

From: mobiledream...@gmail.com [mailto:mobiledream...@gmail.com]
Sent: Thursday, November 19, 2009 11:41 AM
To: cassandra-user@incubator.apache.org
Subject: thrift example for batch_insert

Hey there
Can you share an example on how to do batch_insert on supercolumns in thrift 
python

Is there a place where thrift python examples are shared?

thanks


Re: java.util.concurrent.TimeoutException: Operation timed out - received only 0 responses from .

2009-11-19 Thread Tim Underwood
I'm using Scala with my own Cassandra client and the splitting code was
hacked in to get around the exception.  So I'm not sure if my code will help
or not but it's basically:

===
var row = TheColumnFamily(key)
var count = 0

// dataToInsert is a map of column names to values
dataToInsert.foreach { case (name,value) =
row(name) = value
count += 1

// Flush every 10,000 columns
if(count % 1 == 0) {
row.save
row = TheColumnFamily(key)
}
}

// Flush anything that's left over
row.save
===

When I get around to it I'll push the logic down to either my Row class and
have it auto-flush when it hits a column limit or modify my batchInsert
method to split the data into multiple batch_insert calls.

-Tim

On Thu, Nov 19, 2009 at 8:39 AM, mobiledream...@gmail.com wrote:

 can you share code on how to split columns in cassdict or batch_insert?
 thanks


 On Thu, Nov 19, 2009 at 8:15 AM, Tim Underwood timunderw...@gmail.comwrote:

 I've seen also.  Sometimes it seems random and retrying the call works (I
 think it might have happened during a compaction).  If I try doing a
 batch_insert on a key with more than 200,000 columns (or so) I always get
 this exception and have to break the inserts into smaller chunks.

 -Tim


 On Wed, Nov 18, 2009 at 11:25 PM, mobiledream...@gmail.com wrote:

 Can you plase tell what this error is ?

 ERROR - error writing key ruske
 *java.util.concurrent.TimeoutException: Operation timed out - received
 only 0 responses from  .*
  at
 org.apache.cassandra.service.QuorumResponseHandler.get(QuorumResponseHandler.java:88)
 at
 org.apache.cassandra.service.StorageProxy.insertBlocking(StorageProxy.java:164)
 at
 org.apache.cassandra.service.CassandraServer.doInsert(CassandraServer.java:468)
 at
 org.apache.cassandra.service.CassandraServer.batch_insert(CassandraServer.java:448)
 at
 org.apache.cassandra.service.Cassandra$Processor$batch_insert.process(Cassandra.java:854)
 at
 org.apache.cassandra.service.Cassandra$Processor.process(Cassandra.java:627)
 at
 org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:619)


 Errors





 --
 Bidegg worlds best auction site
 http://bidegg.com



Re: Cassandra backup and restore procedures

2009-11-19 Thread Ramzi Rabah
oh interesting, it uses IP for hinted hand off? which brings up
another interesting question, if the node that went down never came up
again, how long will the hinted handoff keep going? Indefinitely?

On the first topic of backup/restore, you suggested copying the
sstable files over from the 2 neighboring nodes. But what if the file
names that you copy over from the nodes are identical. Will that cause
a problem? Can we rename the sstable file names when we copy them
over?

On Wed, Nov 18, 2009 at 11:03 AM, Jonathan Ellis jbel...@gmail.com wrote:
 Tokens can change, so IP is used for node identification, e.g. for
 hinted handoff.

 On Wed, Nov 18, 2009 at 1:00 PM, Ramzi Rabah rra...@playdom.com wrote:
 Hey Jonathan, why should a replacement node keep the same IP
 address/DNS name as the original node? Wouldn't having the same token
 as the node that went down be sufficient (provided that you did the
 steps above of copying the data from the 2 neighboring nodes)?

 On Wed, Nov 18, 2009 at 10:30 AM, Jonathan Ellis jbel...@gmail.com wrote:
 On Wed, Nov 18, 2009 at 12:05 PM, Jon Graham sjclou...@gmail.com wrote:
 Hello Everyone,

 Is there a recommended backup/restore procedure to be able to recover a
 failed node?

 Until tickets 193 and 520 are done, the easiest thing is to copy all
 the sstables from the other nodes that have replicas for the ranges it
 is responsible for (e.g. for replication factor of 3 on rack unaware
 partitioner, the nodes before it and the node after it on the right
 would suffice), and then run nodeprobe cleanup to clear out the
 excess.

 How does Cassandra keep track of a node's identity?

 It stores it in the system table.

 Should a replacement node keep the same IP address/DNS name as the original
 node?

 Yes.

 Does a node still receive data while a nodeprobe snapshot command runs?

 Yes.

 -Jonathan





Re: Cassandra backup and restore procedures

2009-11-19 Thread Anthony Molinaro
So, is there anyway to recover if you can't guarantee the same IP address?
Since we are running on EC2 (as I'm sure are others on the list), and there
is no way to make this guarantee.

Is this sort of recoverability on the roadmap anywhere?

Thanks,

-Anthony

On Wed, Nov 18, 2009 at 01:50:20PM -0600, Jonathan Ellis wrote:
 No, bootstrap is currently only for adding new nodes, not replacing dead ones.
 
 On Wed, Nov 18, 2009 at 1:47 PM, Simon Smith simongsm...@gmail.com wrote:
  I'm sorry if this was covered before, but if you lose a node and
  cannot bring it (or a replacement) back with the same IP address or
  DNS name, is your only option to restart the entire cluster?  E.g. if
  I have nodes 1, 2, and 3 with replication factor 3, and then I lose
  node 3, is it possible to bring up a new node 3 with a new IP (and a
  Seed of either node 1 or node 2) and bootstrap it?
 
  Thanks,
 
  Simon
 
  On Wed, Nov 18, 2009 at 2:03 PM, Jonathan Ellis jbel...@gmail.com wrote:
  Tokens can change, so IP is used for node identification, e.g. for
  hinted handoff.
 
  On Wed, Nov 18, 2009 at 1:00 PM, Ramzi Rabah rra...@playdom.com wrote:
  Hey Jonathan, why should a replacement node keep the same IP
  address/DNS name as the original node? Wouldn't having the same token
  as the node that went down be sufficient (provided that you did the
  steps above of copying the data from the 2 neighboring nodes)?
 
 

-- 

Anthony Molinaro   antho...@alumni.caltech.edu


Re: Cassandra backup and restore procedures

2009-11-19 Thread Jonathan Ellis
Currently, no.  Feel free to open a ticket.  It would be fairly easy
to make the decommission code in trunk handle this.

On Thu, Nov 19, 2009 at 1:13 PM, Anthony Molinaro
antho...@alumni.caltech.edu wrote:
 So, is there anyway to recover if you can't guarantee the same IP address?
 Since we are running on EC2 (as I'm sure are others on the list), and there
 is no way to make this guarantee.

 Is this sort of recoverability on the roadmap anywhere?

 Thanks,

 -Anthony

 On Wed, Nov 18, 2009 at 01:50:20PM -0600, Jonathan Ellis wrote:
 No, bootstrap is currently only for adding new nodes, not replacing dead 
 ones.

 On Wed, Nov 18, 2009 at 1:47 PM, Simon Smith simongsm...@gmail.com wrote:
  I'm sorry if this was covered before, but if you lose a node and
  cannot bring it (or a replacement) back with the same IP address or
  DNS name, is your only option to restart the entire cluster?  E.g. if
  I have nodes 1, 2, and 3 with replication factor 3, and then I lose
  node 3, is it possible to bring up a new node 3 with a new IP (and a
  Seed of either node 1 or node 2) and bootstrap it?
 
  Thanks,
 
  Simon
 
  On Wed, Nov 18, 2009 at 2:03 PM, Jonathan Ellis jbel...@gmail.com wrote:
  Tokens can change, so IP is used for node identification, e.g. for
  hinted handoff.
 
  On Wed, Nov 18, 2009 at 1:00 PM, Ramzi Rabah rra...@playdom.com wrote:
  Hey Jonathan, why should a replacement node keep the same IP
  address/DNS name as the original node? Wouldn't having the same token
  as the node that went down be sufficient (provided that you did the
  steps above of copying the data from the 2 neighboring nodes)?
 
 

 --
 
 Anthony Molinaro                           antho...@alumni.caltech.edu



RE: Cassandra backup and restore procedures

2009-11-19 Thread Freeman, Tim
I'm not going to be on Amazon, but I'm planning to use hostnames instead of 
IP's and a dynamically generated /etc/hosts file and I think that would deal 
with this problem.  I'm sure a private DNS server would be just as good.

My real motive in saying this is so someone will scream at me if I'm wrong and 
save me the time of exploring the bad solution.  :-).
 
Tim Freeman
Email: tim.free...@hp.com
Desk in Palo Alto: (650) 857-2581
Home: (408) 774-1298
Cell: (408) 348-7536 (No reception business hours Monday, Tuesday, and 
Thursday; call my desk instead.)


-Original Message-
From: Anthony Molinaro [mailto:antho...@alumni.caltech.edu] 
Sent: Thursday, November 19, 2009 11:14 AM
To: cassandra-user@incubator.apache.org
Subject: Re: Cassandra backup and restore procedures

So, is there anyway to recover if you can't guarantee the same IP address?
Since we are running on EC2 (as I'm sure are others on the list), and there
is no way to make this guarantee.

Is this sort of recoverability on the roadmap anywhere?

Thanks,

-Anthony

On Wed, Nov 18, 2009 at 01:50:20PM -0600, Jonathan Ellis wrote:
 No, bootstrap is currently only for adding new nodes, not replacing dead ones.
 
 On Wed, Nov 18, 2009 at 1:47 PM, Simon Smith simongsm...@gmail.com wrote:
  I'm sorry if this was covered before, but if you lose a node and
  cannot bring it (or a replacement) back with the same IP address or
  DNS name, is your only option to restart the entire cluster?  E.g. if
  I have nodes 1, 2, and 3 with replication factor 3, and then I lose
  node 3, is it possible to bring up a new node 3 with a new IP (and a
  Seed of either node 1 or node 2) and bootstrap it?
 
  Thanks,
 
  Simon
 
  On Wed, Nov 18, 2009 at 2:03 PM, Jonathan Ellis jbel...@gmail.com wrote:
  Tokens can change, so IP is used for node identification, e.g. for
  hinted handoff.
 
  On Wed, Nov 18, 2009 at 1:00 PM, Ramzi Rabah rra...@playdom.com wrote:
  Hey Jonathan, why should a replacement node keep the same IP
  address/DNS name as the original node? Wouldn't having the same token
  as the node that went down be sufficient (provided that you did the
  steps above of copying the data from the 2 neighboring nodes)?
 
 

-- 

Anthony Molinaro   antho...@alumni.caltech.edu


Re: Cassandra backup and restore procedures

2009-11-19 Thread Brandon Williams
On Thu, Nov 19, 2009 at 1:18 PM, Freeman, Tim tim.free...@hp.com wrote:

 I'm not going to be on Amazon, but I'm planning to use hostnames instead of
 IP's and a dynamically generated /etc/hosts file and I think that would deal
 with this problem.  I'm sure a private DNS server would be just as good.

 My real motive in saying this is so someone will scream at me if I'm wrong
 and save me the time of exploring the bad solution.  :-).


This is exactly what I do and it has worked great for me.

-Brandon


Re: Cassandra backup and restore procedures

2009-11-19 Thread Anthony Molinaro
Done, https://issues.apache.org/jira/browse/CASSANDRA-564

On Thu, Nov 19, 2009 at 01:17:16PM -0600, Jonathan Ellis wrote:
 Currently, no.  Feel free to open a ticket.  It would be fairly easy
 to make the decommission code in trunk handle this.
 
 On Thu, Nov 19, 2009 at 1:13 PM, Anthony Molinaro
 antho...@alumni.caltech.edu wrote:
  So, is there anyway to recover if you can't guarantee the same IP address?
  Since we are running on EC2 (as I'm sure are others on the list), and there
  is no way to make this guarantee.
 
  Is this sort of recoverability on the roadmap anywhere?
 
  Thanks,
 
  -Anthony
 
  On Wed, Nov 18, 2009 at 01:50:20PM -0600, Jonathan Ellis wrote:
  No, bootstrap is currently only for adding new nodes, not replacing dead 
  ones.
 
  On Wed, Nov 18, 2009 at 1:47 PM, Simon Smith simongsm...@gmail.com wrote:
   I'm sorry if this was covered before, but if you lose a node and
   cannot bring it (or a replacement) back with the same IP address or
   DNS name, is your only option to restart the entire cluster?  E.g. if
   I have nodes 1, 2, and 3 with replication factor 3, and then I lose
   node 3, is it possible to bring up a new node 3 with a new IP (and a
   Seed of either node 1 or node 2) and bootstrap it?
  
   Thanks,
  
   Simon
  
   On Wed, Nov 18, 2009 at 2:03 PM, Jonathan Ellis jbel...@gmail.com 
   wrote:
   Tokens can change, so IP is used for node identification, e.g. for
   hinted handoff.
  
   On Wed, Nov 18, 2009 at 1:00 PM, Ramzi Rabah rra...@playdom.com wrote:
   Hey Jonathan, why should a replacement node keep the same IP
   address/DNS name as the original node? Wouldn't having the same token
   as the node that went down be sufficient (provided that you did the
   steps above of copying the data from the 2 neighboring nodes)?
  
  
 
  --
  
  Anthony Molinaro                           antho...@alumni.caltech.edu
 

-- 

Anthony Molinaro   antho...@alumni.caltech.edu


Nov 19 12:28:33 server kernel: possible SYN flooding on port 9160. Sending cookies.

2009-11-19 Thread mobiledreamers
I am getting a syn flooding warning - is this something that anyone else has
encountered

 tail -f /var/log/messages
Nov 19 12:28:33 server kernel: possible SYN flooding on port 9160. Sending
cookies.
Nov 19 12:29:34 server kernel: possible SYN flooding on port 9160. Sending
cookies.
Nov 19 12:30:45 server kernel: possible SYN flooding on port 9160. Sending
cookies.
Nov 19 12:31:45 server kernel: possible SYN flooding on port 9160. Sending
cookies.
Nov 19 12:32:56 server kernel: possible SYN flooding on port 9160. Sending
cookies.
Nov 19 12:34:00 server kernel: possible SYN flooding on port 9160. Sending
cookies.
Nov 19 12:35:01 server kernel: possible SYN flooding on port 9160. Sending
cookies.
Nov 19 12:36:28 server kernel: possible SYN flooding on port 9160. Sending
cookies.
Nov 19 12:37:28 server kernel: possible SYN flooding on port 9160. Sending
cookies.
Nov 19 12:45:31 server kernel: possible SYN flooding on port 9160. Sending
cookies.


Re: [jira] Assigned: (CASSANDRA-293) remove_key_range operation

2009-11-19 Thread Jonathan Ellis
Thanks!

On Thu, Nov 19, 2009 at 3:51 PM, Mark Robson mar...@gmail.com wrote:
 Hi All,

 I have been quite amazed at the rate of development of Cassandra - only a
 few months ago I was playing with the (relatively) limited 0.3 version, now
 a lot of the bugs - even the really tricky ones have been fixed and loads of
 good stuff is being done all the time.

 This is definitely an example of open source software moving forward at an
 incredible rate. Just now I still can't use Cassandra in production, but by
 the time I'm ready for it, it may be ready for me, at this rate!

 Keep the good work up chaps,

 Mark

 (NB: this is a feature request I added some time ago)

 2009/11/19 Jonathan Ellis (JIRA) j...@apache.org

     [
 https://issues.apache.org/jira/browse/CASSANDRA-293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

 Jonathan Ellis reassigned CASSANDRA-293:
 

    Assignee: Gary Dusbabek

 like get_range_slice, we want remove_range_slice taking similar parameters
 w/ a timestamp for the delete op

  remove_key_range operation
  --
 
                  Key: CASSANDRA-293
                  URL: https://issues.apache.org/jira/browse/CASSANDRA-293
              Project: Cassandra
           Issue Type: New Feature
           Components: Core
             Reporter: Mark Robson
             Assignee: Gary Dusbabek
             Priority: Minor
              Fix For: 0.9
 
 
  For cleaning up old data on a rotating basis, a removal operation which
  operates on key ranges would be very handy, currently we have to remove
  every single column individually.

 --
 This message is automatically generated by JIRA.
 -
 You can reply to this email to add a comment to the issue online.





quorum / hinted handoff

2009-11-19 Thread B. Todd Burruss
I'm doing some testing with build 881977.  I have setup a 3 node cluster
with ReplicationFactor = 2, reads using ConsistencyLevel.ONE, and writes
using ConsistencyLevel.QUORUM.  If I take one node out of the cluster,
then do some writes I would expect that all the writes would succeed
because I still have 2 nodes in the cluster, so I have a quorum.  My
guess is that since one of the nodes the quorum write should use is
down, the write fails.

Is this the expected behavior?  Is hinted handoff in the future?

If not, this seems to make quorum kinda useless since some writes will
fail if ANY node becomes unavailable for whatever reason.

thx!




Re: quorum / hinted handoff

2009-11-19 Thread Jonathan Ellis
This sounds like a bug that was fixed in trunk.  Could you retest with
that code?

-Jonathan

On Thu, Nov 19, 2009 at 4:49 PM, B. Todd Burruss bburr...@real.com wrote:
 I'm doing some testing with build 881977.  I have setup a 3 node cluster
 with ReplicationFactor = 2, reads using ConsistencyLevel.ONE, and writes
 using ConsistencyLevel.QUORUM.  If I take one node out of the cluster,
 then do some writes I would expect that all the writes would succeed
 because I still have 2 nodes in the cluster, so I have a quorum.  My
 guess is that since one of the nodes the quorum write should use is
 down, the write fails.

 Is this the expected behavior?  Is hinted handoff in the future?

 If not, this seems to make quorum kinda useless since some writes will
 fail if ANY node becomes unavailable for whatever reason.

 thx!





Re: quorum / hinted handoff

2009-11-19 Thread B. Todd Burruss
still happens.  i just downloaded 882359 from subversion.

thx!

On Thu, 2009-11-19 at 16:58 -0600, Jonathan Ellis wrote:
 This sounds like a bug that was fixed in trunk.  Could you retest with
 that code?
 
 -Jonathan
 
 On Thu, Nov 19, 2009 at 4:49 PM, B. Todd Burruss bburr...@real.com wrote:
  I'm doing some testing with build 881977.  I have setup a 3 node cluster
  with ReplicationFactor = 2, reads using ConsistencyLevel.ONE, and writes
  using ConsistencyLevel.QUORUM.  If I take one node out of the cluster,
  then do some writes I would expect that all the writes would succeed
  because I still have 2 nodes in the cluster, so I have a quorum.  My
  guess is that since one of the nodes the quorum write should use is
  down, the write fails.
 
  Is this the expected behavior?  Is hinted handoff in the future?
 
  If not, this seems to make quorum kinda useless since some writes will
  fail if ANY node becomes unavailable for whatever reason.
 
  thx!
 
 
 




Re: quorum / hinted handoff

2009-11-19 Thread Jonathan Ellis
Oh, sorry -- I didn't read your description closely at first.  Yes,
with RF=2, quorum (RF/2 + 1) is still 2.  That is why 3 is really the
minimum RF for quorum to be useful.

On Thu, Nov 19, 2009 at 6:46 PM, B. Todd Burruss bburr...@real.com wrote:
 still happens.  i just downloaded 882359 from subversion.

 thx!

 On Thu, 2009-11-19 at 16:58 -0600, Jonathan Ellis wrote:
 This sounds like a bug that was fixed in trunk.  Could you retest with
 that code?

 -Jonathan

 On Thu, Nov 19, 2009 at 4:49 PM, B. Todd Burruss bburr...@real.com wrote:
  I'm doing some testing with build 881977.  I have setup a 3 node cluster
  with ReplicationFactor = 2, reads using ConsistencyLevel.ONE, and writes
  using ConsistencyLevel.QUORUM.  If I take one node out of the cluster,
  then do some writes I would expect that all the writes would succeed
  because I still have 2 nodes in the cluster, so I have a quorum.  My
  guess is that since one of the nodes the quorum write should use is
  down, the write fails.
 
  Is this the expected behavior?  Is hinted handoff in the future?
 
  If not, this seems to make quorum kinda useless since some writes will
  fail if ANY node becomes unavailable for whatever reason.
 
  thx!