Re: Cequel is a full-featured Ruby ORM for Cassandra

2014-02-19 Thread Jeffrey Kesselman
why do you call it an ORM when Cassandra is not relational?


On Wed, Feb 19, 2014 at 11:39 AM, Matthew A. Brown mat.a.br...@gmail.comwrote:

 Hi all,

 I recently released version 1.0 of Cequelhttps://github.com/cequel/cequel,
 a high-level Ruby library for Cassandra using CQL3. Version 1.0 provides an
 object-oriented abstraction for CQL3 data modeling, including parent-child
 relationships using compound primary keys, and collection columns with
 atomic updates. Here's a short slideshow demonstrating its 
 usehttp://cequel.github.io
 .

 I'd much appreciate any feedback about the library, as I intend to
 continue developing and extending it. Thank you!

 Mat




-- 
It's always darkest just before you are eaten by a grue.


Re: Recommended OS

2014-02-12 Thread Jeffrey Kesselman
I haven't run Cassandra in production myself, but for other high load Java
based servers I've had really good scaling success with OpenSolaris.  In
particular I've used Joyent's SmartOS which has the additional advantage
of bursting to cover brief periods of exceptional load.


On Tue, Feb 11, 2014 at 9:25 AM, Brust, Corwin [Hollander] 
corwin.br...@hollanderparts.com wrote:

  This /is/ our first cluster.  We've upgraded one-over-one since 2.0.2
 (our initially deployed version), doing rolling updates across the rings.



 No especial resource tuning save turning off SELinux and the usual
 (disabling swap, separate disk for commit logs, data and the OS).



 *From:* Keith Wright [mailto:kwri...@nanigans.com]
 *Sent:* Monday, February 10, 2014 4:35 PM

 *To:* user@cassandra.apache.org
 *Cc:* Don Jackson; Dave Carroll
 *Subject:* RE: Recommended OS



 Is this your first cluster?  Have you run older versions of Cassandra?
 Any specific resource tuning?

 Thanks all.  We are unable to bootstrap nodes and are considering creating
 a fresh cluster in hopes this is some how data related.

 On Feb 10, 2014 5:33 PM, Brust, Corwin [Hollander] 
 corwin.br...@hollanderparts.com wrote:

 We're running C* 2.0.5 under CentOS 6.5 and have not noticed anything like
 you describe.  We have just a couple of pre-production rings (Dev and Test)
 meaning nothing we have has received particularly intense utilization.



 Corwin



 *From:* Keith Wright [mailto:kwri...@nanigans.com kwri...@nanigans.com]
 *Sent:* Monday, February 10, 2014 2:09 PM
 *To:* user@cassandra.apache.org
 *Cc:* Don Jackson; Dave Carroll
 *Subject:* Re: Recommended OS



 We are running on CentOS 6.4 but an upgrade to 6.5 caused packets to
 backup on the net queue causing HUGE load spikes and cluster meltdown.
  Ultimately we reverted.  Have others seen this?  Are others running CentOS
 6.4/6.5?



 Thanks



 *From: *Sholes, Joshua joshua_sho...@cable.comcast.com
 *Reply-To: *user@cassandra.apache.org user@cassandra.apache.org
 *Date: *Monday, February 10, 2014 at 1:56 PM
 *To: *user@cassandra.apache.org user@cassandra.apache.org
 *Cc: *Don Jackson djack...@nanigans.com, Dave Carroll 
 dcarr...@nanigans.com
 *Subject: *Re: Recommended OS



 What issues are you running into with CentOS 6.4/5?  I'm running 1.2.8 on
 CentOS 6.3 and Java 1.7.0-25, and about to test with 1.7.latest.

 --

 Josh Sholes



 *From: *Keith Wright kwri...@nanigans.com
 *Reply-To: *user@cassandra.apache.org user@cassandra.apache.org
 *Date: *Monday, February 10, 2014 at 1:50 PM
 *To: *user@cassandra.apache.org user@cassandra.apache.org
 *Cc: *Don Jackson djack...@nanigans.com, Dave Carroll 
 dcarr...@nanigans.com
 *Subject: *Recommended OS



 Hi all,



 I was wondering what operating systems and versions people are running
 with success in production environments?  We are using C* 1.2.13 and have
 had issues using CentOS 6.4/6.5.  Are others using that OS?  What would
 people recommend?  What about Java 6 vs 7 (specific versions?!)?



 Thanks!!!


  --




 PRIVILEGE AND CONFIDENTIALITY NOTICE
 The information in this electronic mail (and any associated attachments)
 is intended for the named recipient(s) only and may contain privileged and
 confidential information. If you have received this message in error, you
 are hereby notified that any use, disclosure, copying or alteration of this
 message is strictly prohibited. If you are not the intended recipient(s),
 please contact the sender by reply email and destroy all copies of the
 original message. Thank you.



  --




-- 
It's always darkest just before you are eaten by a grue.


Re: Recommended OS

2014-02-12 Thread Jeffrey Kesselman
Its quite possible its well tricked out for Linux.

My major issue with Linux has been that its TCP/IP stack is nowhere near as
scalable as Solaris' for massive numbers of simultaneous connections.  But
thats probably less of an issue with a Cassandra node then it has been with
the game servers I've built.


On Wed, Feb 12, 2014 at 1:52 PM, Robert Coli rc...@eventbrite.com wrote:

 On Wed, Feb 12, 2014 at 8:55 AM, Jeffrey Kesselman jef...@gmail.comwrote:

 I haven't run Cassandra in production myself, but for other high load
 Java based servers I've had really good scaling success with OpenSolaris.
  In particular I've used Joyent's SmartOS which has the additional
 advantage of bursting to cover brief periods of exceptional load.


 There are a significant number of Linux only optimizations in Cassandra.
 Very few people operate production clusters on anything but Linux.

 The most obvious optimization that comes to mind is the use of direct i/o
 to avoid blowing out the page cache under various circumstances.

 My approach towards running Cassandra on anything but Linux would be to
 try to directly compare performance to the same hardware running Linux.

 =Rob





-- 
It's always darkest just before you are eaten by a grue.


Re: force gc?

2012-08-31 Thread Jeffrey Kesselman
Cassandra at least used to do disc cleanup as a side effect of
garbage collection through finalizers.  (This is a mistake for the
reason outlined below.)

It is important to understand that you can *never* force* a gc in java.
Even calling System.gc() is merely a hint to the VM. What you are doing is
telling the VM that you are * willing* to give up some processor time right
now to gc, how much it choses to actually collect or not collect is totally
up to the VM.

The *only* garbage collection guarantee in java is that it will make a
best effort to collect what it can to avoid an out of memory exception at
the time that it runs out of memory.  You are not guaranteed when *if
ever*, a given object will actually be collected.  Since finalizers happen
when an object is collected, and not when it becomes a candidate for
collection, the same is true of the finalizer.  You are
not guaranteed when, if ever, it will run.

On Fri, Aug 31, 2012 at 9:03 AM, Alexander Shutyaev shuty...@gmail.comwrote:

 Hi All!

 I have a problem with using cassandra. Our application does a lot of
 overwrites and deletes. If I understand correctly cassandra does not
 actually delete these objects until gc_grace seconds have passed. I tried
 to force gc by setting gc_grace to 0 on an existing column family and
 running major compaction afterwards. However I did not get disk space back,
 although I'm pretty much sure that my column family should occupy many
 times fewer space. We have also a PostgreSQL db and we duplicate each
 operation with data in both dbs. And the PosgreSQL table is much more
 smaller than the corresponding cassandra's column family. Does anyone have
 any suggestions on how can I analyze my problem? Or maybe I'm doing
 something wrong and there is another way to force gc on an existing column
 family.

 Thanks in advance,
 Alexander




-- 
It's always darkest just before you are eaten by a grue.


Re: Does Cassandra support operations in a transaction?

2012-08-01 Thread Jeffrey Kesselman
Roshni,

Thats not what consistancy in ACID means.  Its not consistancy of reading
the ame data, its referntial integrity between related pecies of data.

Consistency
Data is in a consistent state when a transaction starts and when it ends. For
example, in an application that transfers funds from one account to
another, the consistency property ensures that the total value of funds in
both the accounts is the same at the start and end of each transaction. 
http://publib.boulder.ibm.com/infocenter/cicsts/v3r2/index.jsp?topic=%2Fcom.ibm.cics.ts.productoverview.doc%2Fconcepts%2Facid.html

A lot of people i nthe NoSql wqorld use the term consistancy when what
they mean is durability.

 Durability After a transaction successfully completes, changes to data
persist and are not undone, even in the event of a system failure. 

Many NoSql databses (includiogn Cassandra) are eventuallydurable, in the
sense that a read immediately after a write may noit reflect that write,
but at soem l;ater point, it will.

None p[rovide true consistancy that I am aware of.



:

On Thu, Aug 2, 2012 at 12:24 AM, Roshni Rajagopal 
roshni.rajago...@wal-mart.com wrote:

 Hi Ivan,

 Cassandra supports 'tunable consistency' . If you always read and write at
 a quorum (or local quorum for multi data center) from one , you can
 guarantee that the results will be consistent as in all the data will be
 compared and the latest will be returned, and no data will be out of date.
 This is at a loss of performance- it will be fastest to just read and write
 once rather than check a quorum of nodes.

 What you chose depends on what your application needs are. Is it ok if
 some users receive out of date data (it isn't earth shattering if someone
 doesn't know what you're eating right now), or is it a banking transaction
 system where all entities must be consistently updated.

 So designing in cassandra priortizes de-normalization. You cannot have
 referential integrity that 2 tables (col families in cassandra) are in sync
 because the database has designed it to be so using foreign keys. The
 application needs to ensure that all data in column families are accurate
 and not out of sync, because data elements may be duplicated in different
 col families.


 You cannot have 2 different entities and ensure that changes to both will
 be done and then only be visible to others.


 Regards,


 From: Jeffrey Kesselman jef...@gmail.commailto:jef...@gmail.com
 Reply-To: user@cassandra.apache.orgmailto:user@cassandra.apache.org 
 user@cassandra.apache.orgmailto:user@cassandra.apache.org
 To: user@cassandra.apache.orgmailto:user@cassandra.apache.org 
 user@cassandra.apache.orgmailto:user@cassandra.apache.org
 Subject: Re: Does Cassandra support operations in a transaction?

 Short story is that few if any of the NoSql systems supprot transactions
 natively. Thats oen of the big compromises they make.  What they call
 eventual consistancy is actually eventual Durabiltiy in ACID terms.

 Consistancy, as meant by the C in ACID,  is not gauranteed at all.

 On Wed, Aug 1, 2012 at 6:21 AM, Ivan Jiang wiwi1...@gmail.commailto:
 wiwi1...@gmail.com wrote:
 Hi,
 I am a new guy to Cassandra, I wonder if available to call Cassandra
 in one Transaction such as in Relation-DB.

 Thanks in advance.

 Best Regards,
 Ivan Jiang



 --
 It's always darkest just before you are eaten by a grue.

 This email and any files transmitted with it are confidential and intended
 solely for the individual or entity to whom they are addressed. If you have
 received this email in error destroy it immediately. *** Walmart
 Confidential ***




-- 
It's always darkest just before you are eaten by a grue.


Re: Does Cassandra support operations in a transaction?

2012-08-01 Thread Jeffrey Kesselman
True consistancy, btw,  pretty much is only possible in a transactional
environment.

On Thu, Aug 2, 2012 at 12:56 AM, Jeffrey Kesselman jef...@gmail.com wrote:

 Roshni,

 Thats not what consistancy in ACID means.  Its not consistancy of reading
 the ame data, its referntial integrity between related pecies of data.

 Consistency
 Data is in a consistent state when a transaction starts and when it ends. For
 example, in an application that transfers funds from one account to
 another, the consistency property ensures that the total value of funds in
 both the accounts is the same at the start and end of each transaction. 

 http://publib.boulder.ibm.com/infocenter/cicsts/v3r2/index.jsp?topic=%2Fcom.ibm.cics.ts.productoverview.doc%2Fconcepts%2Facid.html

 A lot of people i nthe NoSql wqorld use the term consistancy when what
 they mean is durability.

  Durability After a transaction successfully completes, changes to data
 persist and are not undone, even in the event of a system failure. 

 Many NoSql databses (includiogn Cassandra) are eventuallydurable, in the
 sense that a read immediately after a write may noit reflect that write,
 but at soem l;ater point, it will.

 None p[rovide true consistancy that I am aware of.



 :

 On Thu, Aug 2, 2012 at 12:24 AM, Roshni Rajagopal 
 roshni.rajago...@wal-mart.com wrote:

 Hi Ivan,

 Cassandra supports 'tunable consistency' . If you always read and write
 at a quorum (or local quorum for multi data center) from one , you can
 guarantee that the results will be consistent as in all the data will be
 compared and the latest will be returned, and no data will be out of date.
 This is at a loss of performance- it will be fastest to just read and write
 once rather than check a quorum of nodes.

 What you chose depends on what your application needs are. Is it ok if
 some users receive out of date data (it isn't earth shattering if someone
 doesn't know what you're eating right now), or is it a banking transaction
 system where all entities must be consistently updated.

 So designing in cassandra priortizes de-normalization. You cannot have
 referential integrity that 2 tables (col families in cassandra) are in sync
 because the database has designed it to be so using foreign keys. The
 application needs to ensure that all data in column families are accurate
 and not out of sync, because data elements may be duplicated in different
 col families.


 You cannot have 2 different entities and ensure that changes to both will
 be done and then only be visible to others.


 Regards,


 From: Jeffrey Kesselman jef...@gmail.commailto:jef...@gmail.com
 Reply-To: user@cassandra.apache.orgmailto:user@cassandra.apache.org 
 user@cassandra.apache.orgmailto:user@cassandra.apache.org
 To: user@cassandra.apache.orgmailto:user@cassandra.apache.org 
 user@cassandra.apache.orgmailto:user@cassandra.apache.org
 Subject: Re: Does Cassandra support operations in a transaction?

 Short story is that few if any of the NoSql systems supprot transactions
 natively. Thats oen of the big compromises they make.  What they call
 eventual consistancy is actually eventual Durabiltiy in ACID terms.

 Consistancy, as meant by the C in ACID,  is not gauranteed at all.

 On Wed, Aug 1, 2012 at 6:21 AM, Ivan Jiang wiwi1...@gmail.commailto:
 wiwi1...@gmail.com wrote:
 Hi,
 I am a new guy to Cassandra, I wonder if available to call Cassandra
 in one Transaction such as in Relation-DB.

 Thanks in advance.

 Best Regards,
 Ivan Jiang



 --
 It's always darkest just before you are eaten by a grue.

 This email and any files transmitted with it are confidential and
 intended solely for the individual or entity to whom they are addressed. If
 you have received this email in error destroy it immediately. *** Walmart
 Confidential ***




 --
 It's always darkest just before you are eaten by a grue.




-- 
It's always darkest just before you are eaten by a grue.


Re: Much more native memory used by Cassandra then the configured JVM heap size

2012-06-11 Thread Jeffrey Kesselman
Btw.  I suggest you spin up JConsole as it will give you much more detai
kon what your VM is actually doing.



On Mon, Jun 11, 2012 at 9:14 PM, Jason Tang ares.t...@gmail.com wrote:

 Hi

 We have some problem with Cassandra memory usage, we configure the JVM
 HEAP 6G, but after runing Cassandra for several hours (insert, update,
 delete). The total memory used by Cassandra go up to 15G, which cause the
 OS low memory.
  So I wonder if it is normal to have so many memory used by cassandra?

 And how to limit the native memory used by Cassandra?


 ===
 Cassandra 1.0.3, 64 bit jdk.

 Memory ocupied by Cassandra 15G
   PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
  9567 casadm20   0 28.3g  15g 9.1g S  269 65.1 385:57.65 java

 =
 -Xms6G -Xmx6G -Xmn1600M

  # ps -ef | grep  9567
 casadm9567 1 55 Jun11 ?05:59:44 /opt/jdk1.6.0_29/bin/java
 -ea -javaagent:/opt/dve/cassandra/bin/../lib/jamm-0.2.5.jar
 -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms6G -Xmx6G
 -Xmn1600M -XX:+HeapDumpOnOutOfMemoryError -Xss128k -XX:+UseParNewGC
 -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=8
 -XX:MaxTenuringThreshold=1 -XX:CMSInitiatingOccupancyFraction=75
 -XX:+UseCMSInitiatingOccupancyOnly -Djava.net.preferIPv4Stack=true
 -Dcom.sun.management.jmxremote.port=6080
 -Dcom.sun.management.jmxremote.ssl=false
 -Dcom.sun.management.jmxremote.authenticate=false
 -Daccess.properties=/opt/dve/cassandra/conf/access.properties
 -Dpasswd.properties=/opt/dve/cassandra/conf/passwd.properties
 -Dpasswd.mode=MD5 -Dlog4j.configuration=log4j-server.properties
 -Dlog4j.defaultInitOverride=true -cp
 /opt/dve/cassandra/bin/../conf:/opt/dve/cassandra/bin/../build/classes/main:/opt/dve/cassandra/bin/../build/classes/thrift:/opt/dve/cassandra/bin/../lib/Cassandra-Extensions-1.0.0.jar:/opt/dve/cassandra/bin/../lib/antlr-3.2.jar:/opt/dve/cassandra/bin/../lib/apache-cassandra-1.0.3.jar:/opt/dve/cassandra/bin/../lib/apache-cassandra-clientutil-1.0.3.jar:/opt/dve/cassandra/bin/../lib/apache-cassandra-thrift-1.0.3.jar:/opt/dve/cassandra/bin/../lib/avro-1.4.0-fixes.jar:/opt/dve/cassandra/bin/../lib/avro-1.4.0-sources-fixes.jar:/opt/dve/cassandra/bin/../lib/commons-cli-1.1.jar:/opt/dve/cassandra/bin/../lib/commons-codec-1.2.jar:/opt/dve/cassandra/bin/../lib/commons-lang-2.4.jar:/opt/dve/cassandra/bin/../lib/compress-lzf-0.8.4.jar:/opt/dve/cassandra/bin/../lib/concurrentlinkedhashmap-lru-1.2.jar:/opt/dve/cassandra/bin/../lib/guava-r08.jar:/opt/dve/cassandra/bin/../lib/high-scale-lib-1.1.2.jar:/opt/dve/cassandra/bin/../lib/jackson-core-asl-1.4.0.jar:/opt/dve/cassandra/bin/../lib/jackson-mapper-asl-1.4.0.jar:/opt/dve/cassandra/bin/../lib/jamm-0.2.5.jar:/opt/dve/cassandra/bin/../lib/jline-0.9.94.jar:/opt/dve/cassandra/bin/../lib/json-simple-1.1.jar:/opt/dve/cassandra/bin/../lib/libthrift-0.6.jar:/opt/dve/cassandra/bin/../lib/log4j-1.2.16.jar:/opt/dve/cassandra/bin/../lib/servlet-api-2.5-20081211.jar:/opt/dve/cassandra/bin/../lib/slf4j-api-1.6.1.jar:/opt/dve/cassandra/bin/../lib/slf4j-log4j12-1.6.1.jar:/opt/dve/cassandra/bin/../lib/snakeyaml-1.6.jar:/opt/dve/cassandra/bin/../lib/snappy-java-1.0.4.1.jar
 org.apache.cassandra.thrift.CassandraDaemon

 ==
 # nodetool -h 127.0.0.1 -p 6080 info
 Token: 85070591730234615865843651857942052864
 Gossip active: true
 Load : 20.59 GB
 Generation No: 1339423322
 Uptime (seconds) : 39626
 Heap Memory (MB) : 3418.42 / 5984.00
 Data Center  : datacenter1
 Rack : rack1
 Exceptions   : 0

 =
 All row cache and key cache are disabled by default

 Key cache: disabled
 Row cache: disabled


 ==

 # pmap 9567
 9567: java
 START   SIZE RSS PSS   DIRTYSWAP PERM MAPPING
 4000 36K 36K 36K  0K  0K r-xp
 /opt/jdk1.6.0_29/bin/java
 40108000  8K  8K  8K  8K  0K rwxp
 /opt/jdk1.6.0_29/bin/java
 4010a000  18040K  17988K  17988K  17988K  0K rwxp [heap]
 00067ae0 6326700K 6258664K 6258664K 6258664K  0K rwxp [anon]
 0007fd06b000  48724K  0K  0K  0K  0K rwxp [anon]
 7fbed153 1331104K  0K  0K  0K  0K r-xs
 /var/cassandra/data/drc/queue-hb-219-Data.db
 7fbf22918000 2097152K  0K  0K  0K  0K r-xs
 /var/cassandra/data/drc/queue-hb-219-Data.db
 7fbfa2918000 2097148K 1124464K 1124462K  0K  0K r-xs
 /var/cassandra/data/drc/queue-hb-219-Data.db
 7fc022917000 2097156K 2096496K 2096492K  0K  0K r-xs
 /var/cassandra/data/drc/queue-hb-219-Data.db
 7fc0a2918000 2097148K 2097148K 2097146K  0K  0K r-xs
 /var/cassandra/data/drc/queue-hb-219-Data.db
 7fc1a2917000 733584K   6444K   6444K  0K  0K r-xs
 /var/cassandra/data/drc/queue-hb-109-Data.db
 

Re: Server Side Logic/Script - Triggers / StoreProc

2012-04-27 Thread Jeffrey Kesselman
It should be noted that, in a distributed storage environment, scripting
*at the node of storage* is much more powerful then higher up at some
broker.  Its easy to do this wrong.


2012/4/27 Data Craftsman database.crafts...@gmail.com

 Howdy,

 Some Polyglot Persistence(NoSQL) products started support server side
 scripting, similar to RDBMS store procedure.
 E.g. Redis Lua scripting.

 I wish it is Python when Cassandra has the server side scripting feature.

 FYI,

 http://antirez.com/post/250


 http://nosql.mypopescu.com/post/19949274021/alchemydb-an-integrated-graphdb-rdbms-kv-store

 server side scripting support is an extremely powerful tool. Having
 processing close to data (i.e. data locality) is a well known
 advantage, ..., it can open the doors to completely new features.

 Thanks,

 Charlie (@mujiang) 一个 木匠
 ===
 Data Architect Developer
 http://mujiang.blogspot.com

 On Sun, Apr 22, 2012 at 9:35 AM, Brian O'Neill boneil...@gmail.com
 wrote:
  Praveen,
 
  We are certainly interested. To get things moving we implemented an
 add-on
  for Cassandra to demonstrate the viability (using AOP):
  https://github.com/hmsonline/cassandra-triggers
 
  Right now the implementation executes triggers asynchronously, allowing
 you
  to implement a java interface and plugin your own java class that will
 get
  called for every insert.
 
  Per the discussion on 1311, we intend to extend our proof of concept to
 be
  able to invoke scripts as well.  (minimally we'll enable javascript, but
  we'll probably allow for ruby and groovy as well)
 
  -brian
 
  On Apr 22, 2012, at 12:23 PM, Praveen Baratam wrote:
 
  I found that Triggers are coming in Cassandra 1.2
  (https://issues.apache.org/jira/browse/CASSANDRA-1311) but no mention
 of any
  StoreProc like pattern.
 
  I know this has been discussed so many times but never met with
  any initiative. Even Groovy was staged out of the trunk.
 
  Cassandra is great for logging and as such will be infinitely more
 useful if
  some logic can be pushed into the Cassandra cluster nearer to the
 location
  of Data to generate a materialized view useful for applications.
 
  Server Side Scripts/Routines in Distributed Databases could soon prove
 to be
  the differentiating factor.
 
  Let me reiterate things with a use case.
 
  In our application we store time series data in wide rows with TTL set on
  each point to prevent data from growing beyond acceptable limits. Still
 the
  data size can be a limiting factor to move all of it from the cluster
 node
  to the querying node and then to the application via thrift for
 processing
  and presentation.
 
  Ideally we should process the data on the residing node and pass only the
  materialized view of the data upstream. This should be trivial if
 Cassandra
  implements some sort of server side scripting and CQL semantics to call
 it.
 
  Is anybody else interested in a similar feature? Is it being worked on?
 Are
  there any alternative strategies to this problem?
 
  Praveen
 
 
 
  --
  Brian ONeill
  Lead Architect, Health Market Science (http://healthmarketscience.com)
  mobile:215.588.6024
  blog: http://weblogs.java.net/blog/boneill42/
  blog: http://brianoneill.blogspot.com/
 



 --
 --
 Thanks,

 Charlie (@mujiang) 一个 木匠
 ===
 Data Architect Developer
 http://mujiang.blogspot.com




-- 
It's always darkest just before you are eaten by a grue.


Re: Disable Nagle algoritm in thrift i.e. TCP_NODELAY

2012-01-26 Thread Jeffrey Kesselman
You know... here aught to be a command line command to set it.  There is in
Solaris and Windows.  But Im having trouble finding it for Linux.

2012/1/26 ruslan usifov ruslan.usi...@gmail.com

 Sorry but you misunderstand me, is ask  is cassandra have any option to
 control TCP_NODELAY behaviour, so we doesn't need patch cassandra or thrift
 code.

 I found this article
 https://wiki.cs.columbia.edu:8443/pages/viewpage.action?pageId=12585536,
 where упоминается mentioned coreTransport.TcpClient.NoDelay, but what is
 this i misunderstand



 2012/1/26 Jeffrey Kesselman jef...@gmail.com

 
   To set or get a TCP socket option, call 
 *getsockopthttp://linux.about.com/library/cmd/blcmdl2_getsockopt.htm
 *(2) to read or 
 *setsockopthttp://linux.about.com/library/cmd/blcmdl2_setsockopt.htm
 *(2) to write the option with the option level argument set to *SOL_TCP.* In
 addition, most *SOL_IP *socket options are valid on TCP sockets. For
 more information see *iphttp://linux.about.com/library/cmd/blcmdl7_ip.htm
 *(7).
...
 *TCP_NODELAY* If set, disable the Nagle algorithm. This means that
 segments are always sent as soon as possible, even if there is only a small
 amount of data. When not set, data is buffered until there is a sufficient
 amount to send out, thereby avoiding the frequent sending of small packets,
 which results in poor utilization of the network. This option cannot be
 used at the same time as the option *TCP_CORK.* *http://bit.ly/zpvLbP*
 *
 *

 On Thu, Jan 26, 2012 at 12:10 PM, ruslan usifov 
 ruslan.usi...@gmail.comwrote:



 2012/1/26 Jeffrey Kesselman jef...@gmail.com

 Most operating systems have a way to do this at the OS level.


 Could you please provide this way for linux?, for particular
 application? Maybe some sysctl?



 On Thu, Jan 26, 2012 at 8:17 AM, ruslan usifov ruslan.usi...@gmail.com
  wrote:

 Hello

 Is it possible set TCP_NODELAY on thrift socket in cassandra?




 --
 It's always darkest just before you are eaten by a grue.





 --
 It's always darkest just before you are eaten by a grue.





-- 
It's always darkest just before you are eaten by a grue.


Re: Force a garbage collection with jmxterm from the shell

2011-08-04 Thread Jeffrey Kesselman
Technically, by the VM spec, you can never *force* a java VM to garbage
collect.  You can request, but thats it.

Rather then open that whole debate again if anyone doubts this, i suggets
they look back in the archives.

JK



On Thu, Aug 4, 2011 at 6:35 PM, Teijo Holzer thol...@wetafx.co.nz wrote:

 Hi,

 The following command line triggers a garbage collection via JMX:

 echo 'run -b java.lang:type=Memory gc' | java -jar
 jmxterm-1.0-alpha-4-uber.jar -l 
 service:jmx:rmi:///jndi/rmi://**hostname:8080/jmxrmi
 -n

 It uses:

 http://wiki.cyclopsgroup.org/**jmxtermhttp://wiki.cyclopsgroup.org/jmxterm

 The GC is necessary after a major compaction to trigger the deletion of
 stale files.

 jmxterm can also be used to query and modify beans exposed via JMX. That
 makes it easy to integrate into any monitoring  maintenance scripts, e.g.:

 echo 'get -b 
 org.apache.cassandra.db:type=**ColumnFamilies,keyspace=KS1,**columnfamily=CF1
 ReadCount' | ...

 You can also perform multiple operations as once:

 echo 'domains\nbeans' | ...

 If you are concerned about the start-up speed of the jar, just unpack it.
 You might need to unpack  shuffle the internal jars around a bit as well.

 Cheers,

T.




-- 
It's always darkest just before you are eaten by a grue.


Re: b-tree

2011-07-20 Thread Jeffrey Kesselman
Im not sure if I have an answer for you, anyway, but I'm curious

A b-tree and a binary tree are not the same thing.  A binary tree is a
basic fundamental data structure,  A b-tree is an approach to storing and
indexing data on disc for a database.

Which do you mean?

On Wed, Jul 20, 2011 at 4:30 PM, Eldad Yamin elda...@gmail.com wrote:

 Hello,
 Is there any good way of storing a binary-tree in Cassandra?
 I wonder if someone already implement something like that and how
 accomplished that without transaction supports (while the tree keep
 evolving)?

 I'm asking that becouse I want to save geospatial-data, and SimpleGeo did
 it using b-tree:
 http://www.readwriteweb.com/cloud/2011/02/video-simplegeo-cassandra.php

 Thanks!




-- 
It's always darkest just before you are eaten by a grue.


Re: Out of memory error in cassandra

2011-07-11 Thread Jeffrey Kesselman
Are you on a 64 bit VM?  A 32 bit vm will basically ignore any setting over
2GB

On Mon, Jul 11, 2011 at 4:55 PM, Anurag Gujral anurag.guj...@gmail.comwrote:

 Hi All,
I am getting following error from cassandra:
 ERROR [ReadStage:23] 2011-07-10 17:19:18,300
 DebuggableThreadPoolExecutor.java (line 103) Error in ThreadPoolExecutor
 java.lang.OutOfMemoryError: Java heap space
 at
 org.apache.cassandra.utils.BloomFilterSerializer.deserialize(BloomFilterSerializer.java:49)
 at
 org.apache.cassandra.utils.BloomFilterSerializer.deserialize(BloomFilterSerializer.java:30)
 at
 org.apache.cassandra.io.sstable.IndexHelper.defreezeBloomFilter(IndexHelper.java:117)
 at
 org.apache.cassandra.io.sstable.IndexHelper.defreezeBloomFilter(IndexHelper.java:94)
 at
 org.apache.cassandra.db.columniterator.SSTableNamesIterator.read(SSTableNamesIterator.java:107)
 at
 org.apache.cassandra.db.columniterator.SSTableNamesIterator.init(SSTableNamesIterator.java:72)
 at
 org.apache.cassandra.db.filter.NamesQueryFilter.getSSTableColumnIterator(NamesQueryFilter.java:59)
 at
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:80)
 at
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1311)
 at
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1203)
 at
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1131)
 at org.apache.cassandra.db.Table.getRow(Table.java:333)
 at
 org.apache.cassandra.db.SliceByNamesReadCommand.getRow(SliceByNamesReadCommand.java:60)
 at
 org.apache.cassandra.db.ReadVerbHandler.doVerb(ReadVerbHandler.java:69)
 at
 org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:72)
 at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
 at java.lang.Thread.run(Thread.java:636)
  INFO [ScheduledTasks:1] 2011-07-10 17:19:18,306 StatusLogger.java (line
 66) RequestResponseStage  0 0
 ERROR [ReadStage:23] 2011-07-10 17:19:18,306 AbstractCassandraDaemon.java
 (line 114) Fatal exception in thread Thread[ReadStage:23,5,main]
 java.lang.OutOfMemoryError: Java heap space
 at
 org.apache.cassandra.utils.BloomFilterSerializer.deserialize(BloomFilterSerializer.java:49)
 at
 org.apache.cassandra.utils.BloomFilterSerializer.deserialize(BloomFilterSerializer.java:30)
 at
 org.apache.cassandra.io.sstable.IndexHelper.defreezeBloomFilter(IndexHelper.java:117)
 at
 org.apache.cassandra.io.sstable.IndexHelper.defreezeBloomFilter(IndexHelper.java:94)
 at
 org.apache.cassandra.db.columniterator.SSTableNamesIterator.read(SSTableNamesIterator.java:107)
 at
 org.apache.cassandra.db.columniterator.SSTableNamesIterator.init(SSTableNamesIterator.java:72)
 at
 org.apache.cassandra.db.filter.NamesQueryFilter.getSSTableColumnIterator(NamesQueryFilter.java:59)
 at
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:80)
 at
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1311)
 at
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1203)
 at
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1131)


 Can someone please help debug this? The maximum heap size is 28G .

 I am not sure why cassandra is giving Out of memory error here.

 Thanks
 Anurag




-- 
It's always darkest just before you are eaten by a grue.


Re: What does a write lock ?

2011-07-08 Thread Jeffrey Kesselman
Not quite, its more limited and specific

The order of operations is all within the Cassandra node server and looks
like this this...

We have one row, A.  Thats the only row being operated on.

Client - submits A'
Server does the following:
(1) Validate function reads current A
(2) Validate function validates A' vs. A
(3) If validation succeeds, allows update to A'.

My fear/concern is that after 1 and before 3, a second update to A'' comes
in and changes the current value of A, therefor invalidating my
validation check, see?

If Cassandra does not guard against this then one possible solution would be
to make my own key-to-mutex map in memory, lock the mutex for A's key as a
precursor to (1) and release it in a post-update function.  But I am always
very nervous about inserting locking into a process that wasn't designed
with it already in mind...


On Fri, Jul 8, 2011 at 8:30 AM, William Oberman ober...@civicscience.comwrote:

 Questions like this seem to come up a lot:

 http://stackoverflow.com/questions/6033888/cassandra-atomicity-isolation-of-column-updates-on-a-single-row-on-on-single-no

 http://stackoverflow.com/questions/2055037/cassandra-atomic-reads-writes-within-a-single-columnfamily
 http://www.mail-archive.com/user@cassandra.apache.org/msg14701.html

 Lets say you read state A (from one key in one CF), you change the data to
 A' in your client, and you write A'.  Are you worried that someone else
 might have changed A to B during this process (making the new state a race
 between A' and B)?  It doesn't sound to me like you are...  It sounds to me
 like you're worried about a set of columns for the key being in a consistent
 state before, during, and after a process.  And A - A' and A - B will each
 be atomic for the key (based on my understanding).  But, if A' and B are
 changes to a different set of columns, I believe that would interleave,
 which itself could be inconsistent from your application's point of view.


 will

 On Thu, Jul 7, 2011 at 11:41 PM, Jeffrey Kesselman jef...@gmail.comwrote:

 Really, as i lay in the bath thinking nabout it, I concluded what I am
 looking for is a very limited form of Consistency.

 Its consistency over a single row on a single node just for the period of
 update.


 On Thu, Jul 7, 2011 at 10:34 PM, Jeffrey Kesselman jef...@gmail.comwrote:

 Its not really isolation, btw, because we
 arent talking about anyone seeing an update mid-update.Rather, we
 are talking about when updates are allowed to occur.

 Atomicity means that all the updates happen together or they don't happen
 at all.
 Isolation means that no results of the update are visible until the
 entire update operation is complete.

 This really lies somewhere in the middle of the two concepts.   Its part
 of the results of the combined effects of ACID


 On Thu, Jul 7, 2011 at 10:27 PM, Jonathan Ellis jbel...@gmail.comwrote:

 Sounds to me like you're confusing atomicity with isolation.

 On Thu, Jul 7, 2011 at 2:54 PM, Jeffrey Kesselman jef...@gmail.com
 wrote:
  Yup, im even more confused.Lets talk about the model, not the
  implementation.
  AIUI updates to a row are atomic across all columns in that row at
 once,
  true?
  If true then the next question is, does the validation happen inside
 or
  outside of that guarantee, and is the row guaranteed not to change
 between
  validation and update?
  If that is *not* the case then it makes a whole class of solutions to
  synchronization problems fail and puts my larger project
  in serious question.
 
  On Thu, Jul 7, 2011 at 3:43 PM, Yang tedd...@gmail.com wrote:
 
  no , the memtable is a concurrentskiplistmap
 
  insertion can happen in parallel
 
  On Jul 7, 2011 9:24 AM, Jeffrey Kesselman jef...@gmail.com
 wrote:
   This has me more confused.
  
   Does this mean that ALL rows on a given node are only updated
   sequentially,
   never in parallel?
  
   On Thu, Jul 7, 2011 at 3:21 PM, Yang tedd...@gmail.com
 wrote:
  
   just to add onto what jonathan said
  
   the columns are immutable . if u overwrite/ reconcile a new obj is
   created and shoved into the memtable
  
   there is a shared lock for all writes though which guard against
 an
   exclusive lock on memtable switching/flushing
   On Jul 7, 2011 7:51 AM, A J s5a...@gmail.com wrote:
Does a write lock:
1. Just the columns in question for the specific row in question
 ?
2. The full row in question ?
3. The full CF ?
   
I doubt read does any locks.
   
Thanks.
  
  
  
  
   --
   It's always darkest just before you are eaten by a grue.
 
 
 
  --
  It's always darkest just before you are eaten by a grue.
 



 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




 --
 It's always darkest just before you are eaten by a grue.




 --
 It's always darkest just before you are eaten by a grue.







-- 
It's always darkest just before you

Re: What does a write lock ?

2011-07-08 Thread Jeffrey Kesselman
I am confused by what you mean by Cassandra client code.  Is this part of
the Cassnadra server?

My architecture is my user talks thrift to Cassandra.


Re: What does a write lock ?

2011-07-08 Thread Jeffrey Kesselman
Where does a custom validation method run?

Given that it is validating a row update, my assumption was that it ran on
the node that owns the row.  That would make sense to me as it would
fulfill the NoSql philosophy of taking computation to data, rather then data
to computation.

I don't follow the relevance of the rest of your comment, sorry.

On Fri, Jul 8, 2011 at 10:34 AM, Jonathan Ellis jbel...@gmail.com wrote:

 It doesn't look like that at all.

 Row A exists.

 Client submits mutation Am.  This is not necessarily a full row.

 Coordinator validates Am.

 If validation succeeds, coordinator sends Am to the replica owners,
 effectively creating A'.

 Neither A nor A' is ever explicitly assembled on the write path.

 On Fri, Jul 8, 2011 at 9:22 AM, Jeffrey Kesselman jef...@gmail.com
 wrote:
  Not quite, its more limited and specific
  The order of operations is all within the Cassandra node server and looks
  like this this...
  We have one row, A.  Thats the only row being operated on.
  Client - submits A'
  Server does the following:
  (1) Validate function reads current A
  (2) Validate function validates A' vs. A
  (3) If validation succeeds, allows update to A'.
  My fear/concern is that after 1 and before 3, a second update to A''
 comes
  in and changes the current value of A, therefor invalidating my
  validation check, see?
  If Cassandra does not guard against this then one possible
 solution would be
  to make my own key-to-mutex map in memory, lock the mutex for A's key as
 a
  precursor to (1) and release it in a post-update function.  But I am
 always
  very nervous about inserting locking into a process that wasn't designed
  with it already in mind...
 
  On Fri, Jul 8, 2011 at 8:30 AM, William Oberman 
 ober...@civicscience.com
  wrote:
 
  Questions like this seem to come up a lot:
 
 
 http://stackoverflow.com/questions/6033888/cassandra-atomicity-isolation-of-column-updates-on-a-single-row-on-on-single-no
 
 
 http://stackoverflow.com/questions/2055037/cassandra-atomic-reads-writes-within-a-single-columnfamily
  http://www.mail-archive.com/user@cassandra.apache.org/msg14701.html
  Lets say you read state A (from one key in one CF), you change the data
 to
  A' in your client, and you write A'.  Are you worried that someone else
  might have changed A to B during this process (making the new state a
 race
  between A' and B)?  It doesn't sound to me like you are...  It sounds to
 me
  like you're worried about a set of columns for the key being in a
 consistent
  state before, during, and after a process.  And A - A' and A - B will
 each
  be atomic for the key (based on my understanding).  But, if A' and B are
  changes to a different set of columns, I believe that would interleave,
  which itself could be inconsistent from your application's point of
 view.
 
  will
 
  On Thu, Jul 7, 2011 at 11:41 PM, Jeffrey Kesselman jef...@gmail.com
  wrote:
 
  Really, as i lay in the bath thinking nabout it, I concluded what I am
  looking for is a very limited form of Consistency.
  Its consistency over a single row on a single node just for the period
 of
  update.
 
  On Thu, Jul 7, 2011 at 10:34 PM, Jeffrey Kesselman jef...@gmail.com
  wrote:
 
  Its not really isolation, btw, because we
  arent talking about anyone seeing an update mid-update.Rather, we
  are talking about when updates are allowed to occur.
  Atomicity means that all the updates happen together or they don't
  happen at all.
  Isolation means that no results of the update are visible until the
  entire update operation is complete.
  This really lies somewhere in the middle of the two concepts.   Its
 part
  of the results of the combined effects of ACID
 
 
  On Thu, Jul 7, 2011 at 10:27 PM, Jonathan Ellis jbel...@gmail.com
  wrote:
 
  Sounds to me like you're confusing atomicity with isolation.
 
  On Thu, Jul 7, 2011 at 2:54 PM, Jeffrey Kesselman jef...@gmail.com
  wrote:
   Yup, im even more confused.Lets talk about the model, not the
   implementation.
   AIUI updates to a row are atomic across all columns in that row at
   once,
   true?
   If true then the next question is, does the validation happen
 inside
   or
   outside of that guarantee, and is the row guaranteed not to change
   between
   validation and update?
   If that is *not* the case then it makes a whole class
 of solutions to
   synchronization problems fail and puts my larger project
   in serious question.
  
   On Thu, Jul 7, 2011 at 3:43 PM, Yang tedd...@gmail.com
 wrote:
  
   no , the memtable is a concurrentskiplistmap
  
   insertion can happen in parallel
  
   On Jul 7, 2011 9:24 AM, Jeffrey Kesselman jef...@gmail.com
   wrote:
This has me more confused.
   
Does this mean that ALL rows on a given node are only updated
sequentially,
never in parallel?
   
On Thu, Jul 7, 2011 at 3:21 PM, Yang tedd...@gmail.com
wrote:
   
just to add onto what jonathan said
   
the columns

Re: What does a write lock ?

2011-07-08 Thread Jeffrey Kesselman
Alright,

So are you saying the column validator, as specified
by conf/storage-conf.xml is checked in the client interface library and not
on the server side?  That seems odd to me on a number of levels, not the
least being I cant see how thrift could autogenerate that
for different languages or how those other languages would use a Java class.
*
*
On Fri, Jul 8, 2011 at 11:13 AM, William Oberman
ober...@civicscience.comwrote:

 I use a language specific wrapper around thrift as my client, but yes, I
 guess I fundamentally mean thrift == client, and the cassandra server ==
 server.

 will


 On Fri, Jul 8, 2011 at 11:08 AM, Jeffrey Kesselman jef...@gmail.comwrote:

 I am confused by what you mean by Cassandra client code.  Is this part
 of the Cassnadra server?

 My architecture is my user talks thrift to Cassandra.






-- 
It's always darkest just before you are eaten by a grue.


Re: What does a write lock ?

2011-07-08 Thread Jeffrey Kesselman
Hmm.

Thanks Nate.

I need to think about this and our data store design some.  In general I
dislike architecture with large numbers of independent servers, I think it
invites communication latencies and partial failures into the mix.  But I'll
cogitate some.

On Fri, Jul 8, 2011 at 12:21 PM, Nate McCall n...@datastax.com wrote:

 Validation occurs at the API level, returning an
 InvalidRequestException to the caller of the API (a thrift client in
 this case). Specifically, a mutation will not be scheduled for the
 storage until it has been validated at the API level.

 If the intention is to do a read-before-write validation as an
 AbstractType extension, then yes, the underlying value could indeed
 change between validation and storage. If this were the goal, you need
 to implement locking externally (via zookeper or similar as previously
 mentioned).

 On Fri, Jul 8, 2011 at 10:21 AM, William Oberman
 ober...@civicscience.com wrote:
  I haven't ever written my own
 org.apache.cassandra.db.marshal.AbstractType
  (which is I think what your talking about), so I have no idea.
 
  Looking up the JavaDoc for that class, validate says validate that the
 byte
  array is a valid sequence for the type we are supposed to be comparing,
  which sounds like a local operation to me (e.g. it shouldn't fetch remote
  data, it's just saying yep, this is a valid member of type T).
 
  will
 
  On Fri, Jul 8, 2011 at 11:17 AM, Jeffrey Kesselman jef...@gmail.com
 wrote:
 
  Alright,
  So are you saying the column validator, as specified
  by conf/storage-conf.xml is checked in the client interface library and
 not
  on the server side?  That seems odd to me on a number of levels, not the
  least being I cant see how thrift could autogenerate that
  for different languages or how those other languages would use a Java
 class.
 
  On Fri, Jul 8, 2011 at 11:13 AM, William Oberman
  ober...@civicscience.com wrote:
 
  I use a language specific wrapper around thrift as my client, but
 yes,
  I guess I fundamentally mean thrift == client, and the cassandra server
 ==
  server.
 
  will
 
  On Fri, Jul 8, 2011 at 11:08 AM, Jeffrey Kesselman jef...@gmail.com
  wrote:
 
  I am confused by what you mean by Cassandra client code.  Is this
 part
  of the Cassnadra server?
  My architecture is my user talks thrift to Cassandra.
 
 
 
 
 
  --
  It's always darkest just before you are eaten by a grue.
 
 
 




-- 
It's always darkest just before you are eaten by a grue.


Re: What does a write lock ?

2011-07-08 Thread Jeffrey Kesselman
I should add, Nate, that the intention is to do a read before write
validation and have that occur as close to the data as possible.

if there is a better hook to implement it on I'd love a pointer to it.

JK

On Fri, Jul 8, 2011 at 12:21 PM, Nate McCall n...@datastax.com wrote:

 Validation occurs at the API level, returning an
 InvalidRequestException to the caller of the API (a thrift client in
 this case). Specifically, a mutation will not be scheduled for the
 storage until it has been validated at the API level.

 If the intention is to do a read-before-write validation as an
 AbstractType extension, then yes, the underlying value could indeed
 change between validation and storage. If this were the goal, you need
 to implement locking externally (via zookeper or similar as previously
 mentioned).

 On Fri, Jul 8, 2011 at 10:21 AM, William Oberman
 ober...@civicscience.com wrote:
  I haven't ever written my own
 org.apache.cassandra.db.marshal.AbstractType
  (which is I think what your talking about), so I have no idea.
 
  Looking up the JavaDoc for that class, validate says validate that the
 byte
  array is a valid sequence for the type we are supposed to be comparing,
  which sounds like a local operation to me (e.g. it shouldn't fetch remote
  data, it's just saying yep, this is a valid member of type T).
 
  will
 
  On Fri, Jul 8, 2011 at 11:17 AM, Jeffrey Kesselman jef...@gmail.com
 wrote:
 
  Alright,
  So are you saying the column validator, as specified
  by conf/storage-conf.xml is checked in the client interface library and
 not
  on the server side?  That seems odd to me on a number of levels, not the
  least being I cant see how thrift could autogenerate that
  for different languages or how those other languages would use a Java
 class.
 
  On Fri, Jul 8, 2011 at 11:13 AM, William Oberman
  ober...@civicscience.com wrote:
 
  I use a language specific wrapper around thrift as my client, but
 yes,
  I guess I fundamentally mean thrift == client, and the cassandra server
 ==
  server.
 
  will
 
  On Fri, Jul 8, 2011 at 11:08 AM, Jeffrey Kesselman jef...@gmail.com
  wrote:
 
  I am confused by what you mean by Cassandra client code.  Is this
 part
  of the Cassnadra server?
  My architecture is my user talks thrift to Cassandra.
 
 
 
 
 
  --
  It's always darkest just before you are eaten by a grue.
 
 
 




-- 
It's always darkest just before you are eaten by a grue.


Re: What does a write lock ?

2011-07-07 Thread Jeffrey Kesselman
Hi Jonnathan,

This brings up an important question.  I have been assuming that the
validation check is part of the atomic update operation. Is this NOT the
case?  Which is to say, can the row be changed between the time the
validation method is executed and the validated data is written?

The reason I ask is because I have been thinking of this as effectively a
write-lock on the row during the entire update
process, including validation, but your answer has caused some concerns that
this is wrong...

Thanks

JK

On Thu, Jul 7, 2011 at 2:01 PM, Jonathan Ellis jbel...@gmail.com wrote:

 None of the above, it uses a glorified CAS* at the column level

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

 On Thu, Jul 7, 2011 at 12:51 PM, A J s5a...@gmail.com wrote:
  Does a write lock:
  1. Just the columns in question for the specific row in question ?
  2. The full row in question ?
  3. The full CF ?
 
  I doubt read does any locks.
 
  Thanks.
 



 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




-- 
It's always darkest just before you are eaten by a grue.


Re: What does a write lock ?

2011-07-07 Thread Jeffrey Kesselman
The old row is accessible and my validation requires a comparison of the
two.

JK

On Thu, Jul 7, 2011 at 3:23 PM, Yang tedd...@gmail.com wrote:

 validation is on the new incoming column ,not the old row,right?
  On Jul 7, 2011 8:25 AM, Jeffrey Kesselman jef...@gmail.com wrote:
  Hi Jonnathan,
 
  This brings up an important question. I have been assuming that the
  validation check is part of the atomic update operation. Is this NOT the
  case? Which is to say, can the row be changed between the time the
  validation method is executed and the validated data is written?
 
  The reason I ask is because I have been thinking of this as effectively a
  write-lock on the row during the entire update
  process, including validation, but your answer has caused some concerns
 that
  this is wrong...
 
  Thanks
 
  JK
 
  On Thu, Jul 7, 2011 at 2:01 PM, Jonathan Ellis jbel...@gmail.com
 wrote:
 
  None of the above, it uses a glorified CAS* at the column level
 
  *http://en.wikipedia.org/wiki/Compare-and-swap
 
  On Thu, Jul 7, 2011 at 12:51 PM, A J s5a...@gmail.com wrote:
   Does a write lock:
   1. Just the columns in question for the specific row in question ?
   2. The full row in question ?
   3. The full CF ?
  
   I doubt read does any locks.
  
   Thanks.
  
 
 
 
  --
  Jonathan Ellis
  Project Chair, Apache Cassandra
  co-founder of DataStax, the source for professional Cassandra support
  http://www.datastax.com
 
 
 
 
  --
  It's always darkest just before you are eaten by a grue.




-- 
It's always darkest just before you are eaten by a grue.


Re: What does a write lock ?

2011-07-07 Thread Jeffrey Kesselman
Yup, im even more confused.Lets talk about the model, not the
implementation.

AIUI updates to a row are atomic across all columns in that row at once,
true?

If true then the next question is, does the validation happen inside or
outside of that guarantee, and is the row guaranteed not to change between
validation and update?

If that is *not* the case then it makes a whole class of solutions to
synchronization problems fail and puts my larger project
in serious question.

On Thu, Jul 7, 2011 at 3:43 PM, Yang tedd...@gmail.com wrote:

 no , the memtable is a concurrentskiplistmap

 insertion can happen in parallel
 On Jul 7, 2011 9:24 AM, Jeffrey Kesselman jef...@gmail.com wrote:
  This has me more confused.
 
  Does this mean that ALL rows on a given node are only updated
 sequentially,
  never in parallel?
 
  On Thu, Jul 7, 2011 at 3:21 PM, Yang tedd...@gmail.com wrote:
 
  just to add onto what jonathan said
 
  the columns are immutable . if u overwrite/ reconcile a new obj is
  created and shoved into the memtable
 
  there is a shared lock for all writes though which guard against an
  exclusive lock on memtable switching/flushing
  On Jul 7, 2011 7:51 AM, A J s5a...@gmail.com wrote:
   Does a write lock:
   1. Just the columns in question for the specific row in question ?
   2. The full row in question ?
   3. The full CF ?
  
   I doubt read does any locks.
  
   Thanks.
 
 
 
 
  --
  It's always darkest just before you are eaten by a grue.




-- 
It's always darkest just before you are eaten by a grue.


Re: What does a write lock ?

2011-07-07 Thread Jeffrey Kesselman
Yup, im even more confused.Lets tlak about the model, not the
implementation.

AIUI updates to a single row are atomic across all columns in that row at
once, true?

If true then the next question is, does the validation happen inside or
outside of that guarantee, and is the row guaranteed not to change
underneath the validation call?

On Thu, Jul 7, 2011 at 3:43 PM, Yang tedd...@gmail.com wrote:

 no , the memtable is a concurrentskiplistmap

 insertion can happen in parallel
 On Jul 7, 2011 9:24 AM, Jeffrey Kesselman jef...@gmail.com wrote:
  This has me more confused.
 
  Does this mean that ALL rows on a given node are only updated
 sequentially,
  never in parallel?
 
  On Thu, Jul 7, 2011 at 3:21 PM, Yang tedd...@gmail.com wrote:
 
  just to add onto what jonathan said
 
  the columns are immutable . if u overwrite/ reconcile a new obj is
  created and shoved into the memtable
 
  there is a shared lock for all writes though which guard against an
  exclusive lock on memtable switching/flushing
  On Jul 7, 2011 7:51 AM, A J s5a...@gmail.com wrote:
   Does a write lock:
   1. Just the columns in question for the specific row in question ?
   2. The full row in question ?
   3. The full CF ?
  
   I doubt read does any locks.
  
   Thanks.
 
 
 
 
  --
  It's always darkest just before you are eaten by a grue.




-- 
It's always darkest just before you are eaten by a grue.


Re: What does a write lock ?

2011-07-07 Thread Jeffrey Kesselman
Not confusing, but assuming a few things.

I made a more detailed post in the Datatstax forums.

On Thu, Jul 7, 2011 at 10:27 PM, Jonathan Ellis jbel...@gmail.com wrote:

 Sounds to me like you're confusing atomicity with isolation.

 On Thu, Jul 7, 2011 at 2:54 PM, Jeffrey Kesselman jef...@gmail.com
 wrote:
  Yup, im even more confused.Lets talk about the model, not the
  implementation.
  AIUI updates to a row are atomic across all columns in that row at once,
  true?
  If true then the next question is, does the validation happen inside or
  outside of that guarantee, and is the row guaranteed not to change
 between
  validation and update?
  If that is *not* the case then it makes a whole class of solutions to
  synchronization problems fail and puts my larger project
  in serious question.
 
  On Thu, Jul 7, 2011 at 3:43 PM, Yang tedd...@gmail.com wrote:
 
  no , the memtable is a concurrentskiplistmap
 
  insertion can happen in parallel
 
  On Jul 7, 2011 9:24 AM, Jeffrey Kesselman jef...@gmail.com wrote:
   This has me more confused.
  
   Does this mean that ALL rows on a given node are only updated
   sequentially,
   never in parallel?
  
   On Thu, Jul 7, 2011 at 3:21 PM, Yang tedd...@gmail.com wrote:
  
   just to add onto what jonathan said
  
   the columns are immutable . if u overwrite/ reconcile a new obj is
   created and shoved into the memtable
  
   there is a shared lock for all writes though which guard against an
   exclusive lock on memtable switching/flushing
   On Jul 7, 2011 7:51 AM, A J s5a...@gmail.com wrote:
Does a write lock:
1. Just the columns in question for the specific row in question ?
2. The full row in question ?
3. The full CF ?
   
I doubt read does any locks.
   
Thanks.
  
  
  
  
   --
   It's always darkest just before you are eaten by a grue.
 
 
 
  --
  It's always darkest just before you are eaten by a grue.
 



 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




-- 
It's always darkest just before you are eaten by a grue.


Re: What does a write lock ?

2011-07-07 Thread Jeffrey Kesselman
Its not really isolation, btw, because we arent talking about anyone seeing
an update mid-update.Rather, we are talking about when updates are
allowed to occur.

Atomicity means that all the updates happen together or they don't happen at
all.
Isolation means that no results of the update are visible until the entire
update operation is complete.

This really lies somewhere in the middle of the two concepts.   Its part of
the results of the combined effects of ACID


On Thu, Jul 7, 2011 at 10:27 PM, Jonathan Ellis jbel...@gmail.com wrote:

 Sounds to me like you're confusing atomicity with isolation.

 On Thu, Jul 7, 2011 at 2:54 PM, Jeffrey Kesselman jef...@gmail.com
 wrote:
  Yup, im even more confused.Lets talk about the model, not the
  implementation.
  AIUI updates to a row are atomic across all columns in that row at once,
  true?
  If true then the next question is, does the validation happen inside or
  outside of that guarantee, and is the row guaranteed not to change
 between
  validation and update?
  If that is *not* the case then it makes a whole class of solutions to
  synchronization problems fail and puts my larger project
  in serious question.
 
  On Thu, Jul 7, 2011 at 3:43 PM, Yang tedd...@gmail.com wrote:
 
  no , the memtable is a concurrentskiplistmap
 
  insertion can happen in parallel
 
  On Jul 7, 2011 9:24 AM, Jeffrey Kesselman jef...@gmail.com wrote:
   This has me more confused.
  
   Does this mean that ALL rows on a given node are only updated
   sequentially,
   never in parallel?
  
   On Thu, Jul 7, 2011 at 3:21 PM, Yang tedd...@gmail.com wrote:
  
   just to add onto what jonathan said
  
   the columns are immutable . if u overwrite/ reconcile a new obj is
   created and shoved into the memtable
  
   there is a shared lock for all writes though which guard against an
   exclusive lock on memtable switching/flushing
   On Jul 7, 2011 7:51 AM, A J s5a...@gmail.com wrote:
Does a write lock:
1. Just the columns in question for the specific row in question ?
2. The full row in question ?
3. The full CF ?
   
I doubt read does any locks.
   
Thanks.
  
  
  
  
   --
   It's always darkest just before you are eaten by a grue.
 
 
 
  --
  It's always darkest just before you are eaten by a grue.
 



 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




-- 
It's always darkest just before you are eaten by a grue.


Re: What does a write lock ?

2011-07-07 Thread Jeffrey Kesselman
Really, as i lay in the bath thinking nabout it, I concluded what I am
looking for is a very limited form of Consistency.

Its consistency over a single row on a single node just for the period of
update.

On Thu, Jul 7, 2011 at 10:34 PM, Jeffrey Kesselman jef...@gmail.com wrote:

 Its not really isolation, btw, because we arent talking about anyone seeing
 an update mid-update.Rather, we are talking about when updates are
 allowed to occur.

 Atomicity means that all the updates happen together or they don't happen
 at all.
 Isolation means that no results of the update are visible until the entire
 update operation is complete.

 This really lies somewhere in the middle of the two concepts.   Its part of
 the results of the combined effects of ACID


 On Thu, Jul 7, 2011 at 10:27 PM, Jonathan Ellis jbel...@gmail.com wrote:

 Sounds to me like you're confusing atomicity with isolation.

 On Thu, Jul 7, 2011 at 2:54 PM, Jeffrey Kesselman jef...@gmail.com
 wrote:
  Yup, im even more confused.Lets talk about the model, not the
  implementation.
  AIUI updates to a row are atomic across all columns in that row at once,
  true?
  If true then the next question is, does the validation happen inside or
  outside of that guarantee, and is the row guaranteed not to change
 between
  validation and update?
  If that is *not* the case then it makes a whole class of solutions to
  synchronization problems fail and puts my larger project
  in serious question.
 
  On Thu, Jul 7, 2011 at 3:43 PM, Yang tedd...@gmail.com wrote:
 
  no , the memtable is a concurrentskiplistmap
 
  insertion can happen in parallel
 
  On Jul 7, 2011 9:24 AM, Jeffrey Kesselman jef...@gmail.com wrote:
   This has me more confused.
  
   Does this mean that ALL rows on a given node are only updated
   sequentially,
   never in parallel?
  
   On Thu, Jul 7, 2011 at 3:21 PM, Yang tedd...@gmail.com wrote:
  
   just to add onto what jonathan said
  
   the columns are immutable . if u overwrite/ reconcile a new obj is
   created and shoved into the memtable
  
   there is a shared lock for all writes though which guard against an
   exclusive lock on memtable switching/flushing
   On Jul 7, 2011 7:51 AM, A J s5a...@gmail.com wrote:
Does a write lock:
1. Just the columns in question for the specific row in question ?
2. The full row in question ?
3. The full CF ?
   
I doubt read does any locks.
   
Thanks.
  
  
  
  
   --
   It's always darkest just before you are eaten by a grue.
 
 
 
  --
  It's always darkest just before you are eaten by a grue.
 



 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




 --
 It's always darkest just before you are eaten by a grue.




-- 
It's always darkest just before you are eaten by a grue.


Re: faster ByteBuffer comparison

2011-07-02 Thread Jeffrey Kesselman
GetLong has to get it a byte at a time still to support endianess.

Id have to think about it, but what you really want is to get it all
into a byte array and then process it in  64bits. AIR there are some
new array recasting things in Java 5+.  Ill need to go look at them
more closely...

On Fri, Jul 1, 2011 at 5:42 PM, Yang tedd...@gmail.com wrote:
 I can see from profiling that a lot of the time in both reading and writing
 are spend on ByteBuffer compare on the column names (for long rows with many
 columns)
 I looked at the ByteBufferUtil.unsignedCompareByteBuffer() , it's basically
 the same structure as standard JVM ByteBuffer.compare()
 looping over each byte doing a ByteBuffer.get()
 is there a faster (probably hardware-based) compare ? I tried doing 8 bytes
 at a time by doing getLong() and it actually seems slower
 thanks
 Yang



-- 
It's always darkest just before you are eaten by a grue.


Re: faster ByteBuffer comparison

2011-07-02 Thread Jeffrey Kesselman
I'd fetch it all at once into a single byte array and try Arrays.equals()

On Sat, Jul 2, 2011 at 12:45 PM, Jeffrey Kesselman jef...@gmail.com wrote:

 GetLong has to get it a byte at a time still to support endianess.

 Id have to think about it, but what you really want is to get it all
 into a byte array and then process it in  64bits. AIR there are some
 new array recasting things in Java 5+.  Ill need to go look at them
 more closely...

 On Fri, Jul 1, 2011 at 5:42 PM, Yang tedd...@gmail.com wrote:
  I can see from profiling that a lot of the time in both reading and
 writing
  are spend on ByteBuffer compare on the column names (for long rows with
 many
  columns)
  I looked at the ByteBufferUtil.unsignedCompareByteBuffer() , it's
 basically
  the same structure as standard JVM ByteBuffer.compare()
  looping over each byte doing a ByteBuffer.get()
  is there a faster (probably hardware-based) compare ? I tried doing 8
 bytes
  at a time by doing getLong() and it actually seems slower
  thanks
  Yang



 --
 It's always darkest just before you are eaten by a grue.




-- 
It's always darkest just before you are eaten by a grue.


Re: Cassandra Clients for Java

2011-06-17 Thread Jeffrey Kesselman
I'm using Hector.  AFAIK its the only one that supports failover today.

On Fri, Jun 17, 2011 at 6:02 PM, Daniel Colchete d...@cloud3.tc wrote:
 Good day everyone!
 I'm getting started with a new project and I'm thinking about using
 Cassandra because of its distributed quality and because of its performance.
 I'm using Java on the back-end. There are many many things being said about
 the Java high level clients for Cassandra on the web. To be frank, I see
 problems with all of the java clients. For example, Hector and Scale7-pelops
 have new semantics on them that are neither Java's or Cassandra's, and I
 don't see much gain from it apart from the fact that it is more complex.
 Also, I was hoping to go with something that was annotation based so that it
 wouldn't be necessary to write boilerplate code (again, no gain).
 Demoiselle Cassandra seems to be one option but I couldn't find a download
 for it. I'm new to Java in the back-end and I find that maven is too much to
 learn just because of a client library. Also it seems to be hard to
 integrate with the other things I use on my project (GWT, GWT-platform,
 Google Eclipse Plugin).
 Kundera looks great but besides not having a download link (Google site link
 to Github, that links to Google site, but no download) its information is
 partitioned on many blog posts, some of them saying things I couldn't find
 on its website. One says it uses Lucandra for indexes but that is the only
 place talking about it, no documentation about using it. It doesn't seem to
 support Cassandra 0.8 also. Does it?
 I would like to hear from the users here what worked for you guys. Some real
 world project in production that was good to write in Java, where the client
 was stable and is maintained. What are the success stories of using
 Cassandra with Java. What would you recommend?
 Thank you very much!
 Best,
 --
 Dani
 Cloud3 Tech - http://cloud3.tc/
 Twitter: @DaniCloud3 @Cloud3Tech




-- 
It's always darkest just before you are eaten by a grue.


Re: New web client future API

2011-06-15 Thread Jeffrey Kesselman
Correct me if I'm wrong, but AFAIK Hector is the  only higher level
APi I would consider complete' right now, with support for things
like fail-over.

I notice in the latest Hector build he is starting to add CQL support,
so thats what I'm sticking with.  When he has CQL support done I'll
decide if I want to use it or stick with the programmatic API.

On Wed, Jun 15, 2011 at 10:35 AM, Victor Kabdebon
victor.kabde...@gmail.com wrote:
 Ok thanks for the update. I thought the query string was translated to
 Thrift, then send to a server.

 Victor Kabdebon

 2011/6/15 Eric Evans eev...@rackspace.com

 On Tue, 2011-06-14 at 09:49 -0400, Victor Kabdebon wrote:
  Actually from what I understood (please correct me if I am wrong) CQL
  is based on Thrift / Avro.

 In this project, we tend to use the word Thrift as a sort of shorthand
 for Cassandra's RPC interface, and not, The serialization and RPC
 framework from the Apache Thrift project.

 CQL does not (yet )have its own networking protocol, so it uses Thrift
 as a means of delivering queries, and serializing the results, but it is
 *not* a wrapper around the existing RPC methods.  The query string you
 provide is parsed entirely on the server.

 --
 Eric Evans
 eev...@rackspace.com






-- 
It's always darkest just before you are eaten by a grue.


Re: Forcing Cassandra to free up some space

2011-06-15 Thread Jeffrey Kesselman
/CASSANDRA-2521


 Regards,
 Shotaro


 On Fri, May 27, 2011 at 11:27 AM, Jeffrey Kesselman jef...@gmail.com
 wrote:
  Im also not sure that will guarantee all space is cleaned up.  It
  really depends on what you are doing inside Cassandra.  If you have
  your on garbage collect that is just in some way tied to the gc run,
  then it will run when  it runs.
 
  If otoh you are associating records in your storage with specific
  objects in memory and using one of the post-mortem hooks (finalize or
  PhantomReference) to tell you to clean up that particular record then
  its quite possible they wont all get cleaned up.  In general hotspot
  does not find and clean every candidate object on every GC run.  It
  starts with the easiest/fastest to find and then sees what more it
  thinks it needs to do to create enough memory for anticipated near
  future needs.
 
  On Thu, May 26, 2011 at 10:16 PM, Jonathan Ellis jbel...@gmail.com
  wrote:
  In summary, system.gc works fine unless you've deliberately done
  something like setting the -XX:-DisableExplicitGC flag.
 
  On Thu, May 26, 2011 at 5:58 PM, Konstantin  Naryshkin
  konstant...@a-bb.net wrote:
  So, in summary, there is no way to predictably and efficiently tell
  Cassandra to get rid of all of the extra space it is using on disk?
 
  - Original Message -
  From: Jeffrey Kesselman jef...@gmail.com
  To: user@cassandra.apache.org
  Sent: Thursday, May 26, 2011 8:57:49 PM
  Subject: Re: Forcing Cassandra to free up some space
 
  Which JVM?  Which collector?  There have been and continue to be many.
 
  Hotspot itself supports a number of different collectors with
  different behaviors.   Many of them do not collect every candidate on
  every gc, but merely the easiest ones to find.  This is why depending
  on finalizers is a *bad* idea in java code.  They may well never get
  run.  (Finalizer is one of a few features the Sun Java team always
  regretted putting in Java to start with.  It has caused quite a few
  application problems over the years)
 
  The really important thing is that NONE of these behaviors of the
  colelctors are guaranteed by specification not to change from version
  to version.  Basing your code on non-specified behaviors is a good way
  to hit mysterious failures on updates.
 
  For instance, in the mid 90s, IBM had a mode of their Vm called
  infinite heap.  it *never* garbage collected, even if you called
  System.gc.  Instead it just threw away address space and counted on
  the total memory needs for the life of the program being less then the
  total addressable space of the processor.
 
  It was *very* fast for certain kinds of applications.
 
  Far from being pedantic, not depending on undocumented behavior is
  simply good engineering.
 
 
  On Thu, May 26, 2011 at 4:51 PM, Jonathan Ellis jbel...@gmail.com
  wrote:
  I've read the relevant source. While you're pedantically correct re
  the spec, you're wrong as to what the JVM actually does.
 
  On Thu, May 26, 2011 at 3:14 PM, Jeffrey Kesselman jef...@gmail.com
  wrote:
  Some references...
 
  An object enters an unreachable state when no more strong
  references
  to it exist. When an object is unreachable, it is a candidate for
  collection. Note the wording: Just because an object is a candidate
  for collection doesn't mean it will be immediately collected. The
  JVM
  is free to delay collection until there is an immediate need for the
  memory being consumed by the object.
 
 
  http://java.sun.com/docs/books/performance/1st_edition/html/JPAppGC.fm.html#998394
 
  and Calling the gc method suggests that the Java Virtual Machine
  expend effort toward recycling unused objects
 
 
  http://download.oracle.com/javase/6/docs/api/java/lang/System.html#gc()
 
  It goes on to say that the VM will make a best effort, but best
  effort is *deliberately* left up to the definition of the gc
  implementor.
 
  I guess you missed the many lectures I have given on this subject
  over
  the years at Java One Conferences
 
  On Thu, May 26, 2011 at 3:53 PM, Jonathan Ellis jbel...@gmail.com
  wrote:
  It's a common misunderstanding that system.gc is only a suggestion;
  on
  any VM you're likely to run Cassandra on, System.gc will actually
  invoke a full collection.
 
  On Thu, May 26, 2011 at 2:18 PM, Jeffrey Kesselman
  jef...@gmail.com wrote:
  Actually this is no gaurantee.   Its a common misunderstanding
  that
  System.gc forces gc.  It does not. It is a suggestion only. The
  vm always
  has the option as to when and how much it gcs
 
  On May 26, 2011 2:51 PM, Jonathan Ellis jbel...@gmail.com
  wrote:
 
 
 
 
  --
  Jonathan Ellis
  Project Chair, Apache Cassandra
  co-founder of DataStax, the source for professional Cassandra
  support
  http://www.datastax.com
 
 
 
 
  --
  It's always darkest just before you are eaten by a grue.
 
 
 
 
  --
  Jonathan Ellis
  Project Chair, Apache Cassandra
  co-founder of DataStax, the source for professional Cassandra

Re: nosql yes but yescql, no?

2011-06-08 Thread Jeffrey Kesselman
While I agree the Thrift API sucks, Id love to see that sovled on a
binary level, and CQl on top of that.

JK

On Wed, Jun 8, 2011 at 2:50 PM, Marcos Ortiz mlor...@uci.cu wrote:
 On 06/08/2011 01:23 PM, SriSatish Ambati wrote:

 Gotta love, Eric!
 http://www.slideshare.net/jericevans/nosql-yes-but-yescql-no

 --
 SriSatish Ambati
 Director of Engineering, DataStax
 @srisatish




 Good resource.
 Thanks for share it with us SriSatish

 Regards

 --
 Marcos Luís Ortíz Valmaseda
  Software Engineer (UCI)
  http://marcosluis2186.posterous.com
  http://twitter.com/marcosluis2186





-- 
It's always darkest just before you are eaten by a grue.


Re: nosql yes but yescql, no?

2011-06-08 Thread Jeffrey Kesselman
That makes sense :)

On Wed, Jun 8, 2011 at 2:37 PM, Jeremy Hanna jeremy.hanna1...@gmail.com wrote:
 I think that's partly the idea of it.  CQL could end up being a way forward 
 and it currently builds on thrift.  Then if it becomes the API/client of 
 record to build on, then it could move to something else underneath that's 
 more efficient and CQL itself wouldn't have to change at all.

 On Jun 8, 2011, at 1:29 PM, Jeffrey Kesselman wrote:

 While I agree the Thrift API sucks, Id love to see that sovled on a
 binary level, and CQl on top of that.

 JK

 On Wed, Jun 8, 2011 at 2:50 PM, Marcos Ortiz mlor...@uci.cu wrote:
 On 06/08/2011 01:23 PM, SriSatish Ambati wrote:

 Gotta love, Eric!
 http://www.slideshare.net/jericevans/nosql-yes-but-yescql-no

 --
 SriSatish Ambati
 Director of Engineering, DataStax
 @srisatish




 Good resource.
 Thanks for share it with us SriSatish

 Regards

 --
 Marcos Luís Ortíz Valmaseda
 Software Engineer (UCI)
 http://marcosluis2186.posterous.com
 http://twitter.com/marcosluis2186





 --
 It's always darkest just before you are eaten by a grue.





-- 
It's always darkest just before you are eaten by a grue.


Re: CQL How to do

2011-06-05 Thread Jeffrey Kesselman
Fair enough.

I do have to keep reminding myself that a REST interface requires text.
And it does make more sense, at least, when coming from a human as
opposed to when you make a computer spend cycles converting binary to
text just so another computer can spend cycles turning it back again.

On Sun, Jun 5, 2011 at 8:01 PM, aaron morton aa...@thelastpickle.com wrote:
 From what I've seen of CQL there is no comparison between the potential 
 complexity of a CQL statement and that of a SQL statement. IMHO CQL is more 
 or less a human readable form of the current API, it does not add features. 
 SQL statements are arbitrarily complex and may generate many possible query 
 plans which need to be somehow compared and optimised.

 I'll add another pro to using CQL, it will be a lot easier for people to 
 describe a query they have sent to the server. It will make the helping 
 people using multiple languages a bit easier if they can grab a log record 
 and post the query they sent.

 I'm keen to see how it goes.

 Cheers

 -
 Aaron Morton
 Freelance Cassandra Developer
 @aaronmorton
 http://www.thelastpickle.com

 On 6 Jun 2011, at 03:27, Eric Evans wrote:

 On Sun, 2011-06-05 at 00:51 -0400, Jeffrey Kesselman wrote:
 Is CQL really the path for the future for Cassandra?

 CQL is no more or less official than the Thrift interface, and TTBMK,
 there is no secret cabal that met to decide it would be The Way.  People
 will use what works best for them, and if a de facto standard emerges
 (it usually does), then so much the better.

 It seems to me by introducing a textual language that has to be parsed
 and understood, you are adding back in some of the inefficiency of
 SQl...

 I think this inefficiency remains to be proven.  Or if it is less
 inefficient, if it is enough so to warrant a discussion.

 No matter what the technology, you have to have a client send a query to
 the server structured in some way.  Once received, the server has to
 parse that structure before it can act.  What is different, is that
 CQL structures the query in a human-readable string, and Thrift
 structures it as a hierarchy of records serialized to binary.

 It may be true that CQL parsing has higher overhead (Thrift does more
 object creation and is likely worse on gc), but Cassandra nodes are
 typically limited by disk IO and have loads of idle processor time.  I
 might be biased, but I think it is easy to justify considering how much
 easier CQL makes things.

 2011/6/4 aaron morton aa...@thelastpickle.com:
 May be wrong but as far as I know thrift is still the official API, for 
 now.
 CQL is in it's first release and still has a few things to be added to
 it https://issues.apache.org/jira/browse/CASSANDRA-2472 . That said, jump 
 in
 and try it out :)
 The best documentation I can point you to is
 https://github.com/apache/cassandra/blob/cassandra-0.8.0/doc/cql/CQL.textile
 There are Java,  Python and Twisted Python drivers in the source tree under
 the drivers/ directory.
 Hope that helps.
 -
 Aaron Morton
 Freelance Cassandra Developer
 @aaronmorton
 http://www.thelastpickle.com
 On 5 Jun 2011, at 04:16, Yonder wrote:

 Hi,

 In Cassandra 0.8, CQL become the primary client interface, but I don't know
 how to use it in a non-command line env. I could not find out any how-to do
 docs in Wiki or DataStax's website.

 --
 Eric Evans
 eev...@rackspace.com






-- 
It's always darkest just before you are eaten by a grue.


Re: JRockit

2011-06-01 Thread Jeffrey Kesselman
Well, my information is old...

But back in the heyday of VMs, JRockit really only had one specific
area of performance advantage, which was in message passing, and all
their benchmarks were tweaked to play to that.

Id say its not coincidence that oracle has made this free shortly
after they acquired Hotspot and the Hotspot team.  This looks like an
EOL to me.

On Wed, Jun 1, 2011 at 6:34 AM, Daniel Doubleday
daniel.double...@gmx.net wrote:
 Hi all

 now that JRockit is available for free and the claims are there that it has 
 better performance and gc I wanted to know if anybody out here has done any 
 testing / benchmarking yet.
 Also interested in deterministic gc ... maybe its worth the 300 bucks?

 Cheers,
 Daniel



-- 
It's always darkest just before you are eaten by a grue.


Re: Forcing Cassandra to free up some space

2011-05-26 Thread Jeffrey Kesselman
Actually this is no gaurantee.   Its a common misunderstanding that
System.gc forces gc.  It does not. It is a suggestion only. The vm always
has the option as to when and how much it gcs
 On May 26, 2011 2:51 PM, Jonathan Ellis jbel...@gmail.com wrote:


Re: Forcing Cassandra to free up some space

2011-05-26 Thread Jeffrey Kesselman
Im sorry.  This was my business at Sun.  You are certainly wrong about
the Hotspot VM.

See this chapter of my book

http://java.sun.com/docs/books/performance/1st_edition/html/JPAppGC.fm.html#998394

On Thu, May 26, 2011 at 3:53 PM, Jonathan Ellis jbel...@gmail.com wrote:
 It's a common misunderstanding that system.gc is only a suggestion; on
 any VM you're likely to run Cassandra on, System.gc will actually
 invoke a full collection.

 On Thu, May 26, 2011 at 2:18 PM, Jeffrey Kesselman jef...@gmail.com wrote:
 Actually this is no gaurantee.   Its a common misunderstanding that
 System.gc forces gc.  It does not. It is a suggestion only. The vm always
 has the option as to when and how much it gcs

 On May 26, 2011 2:51 PM, Jonathan Ellis jbel...@gmail.com wrote:




 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




-- 
It's always darkest just before you are eaten by a grue.


Re: Forcing Cassandra to free up some space

2011-05-26 Thread Jeffrey Kesselman
Some references...

An object enters an unreachable state when no more strong references
to it exist. When an object is unreachable, it is a candidate for
collection. Note the wording: Just because an object is a candidate
for collection doesn't mean it will be immediately collected. The JVM
is free to delay collection until there is an immediate need for the
memory being consumed by the object.

http://java.sun.com/docs/books/performance/1st_edition/html/JPAppGC.fm.html#998394

and Calling the gc method suggests that the Java Virtual Machine
expend effort toward recycling unused objects

http://download.oracle.com/javase/6/docs/api/java/lang/System.html#gc()

It goes on to say that the VM will make a best effort, but best
effort is *deliberately* left up to the definition of the gc
implementor.

I guess you missed the many lectures I have given on this subject over
the years at Java One Conferences

On Thu, May 26, 2011 at 3:53 PM, Jonathan Ellis jbel...@gmail.com wrote:
 It's a common misunderstanding that system.gc is only a suggestion; on
 any VM you're likely to run Cassandra on, System.gc will actually
 invoke a full collection.

 On Thu, May 26, 2011 at 2:18 PM, Jeffrey Kesselman jef...@gmail.com wrote:
 Actually this is no gaurantee.   Its a common misunderstanding that
 System.gc forces gc.  It does not. It is a suggestion only. The vm always
 has the option as to when and how much it gcs

 On May 26, 2011 2:51 PM, Jonathan Ellis jbel...@gmail.com wrote:




 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




-- 
It's always darkest just before you are eaten by a grue.


Re: Forcing Cassandra to free up some space

2011-05-26 Thread Jeffrey Kesselman
Which JVM?  Which collector?  There have been and continue to be many.

Hotspot itself supports a number of different collectors with
different behaviors.   Many of them do not collect every candidate on
every gc, but merely the easiest ones to find.  This is why depending
on finalizers is a *bad* idea in java code.  They may well never get
run.  (Finalizer is one of a few features the Sun Java team always
regretted putting in Java to start with.  It has caused quite a few
application problems over the years)

The really important thing is that NONE of these behaviors of the
colelctors are guaranteed by specification not to change from version
to version.  Basing your code on non-specified behaviors is a good way
to hit mysterious failures on updates.

For instance, in the mid 90s, IBM had a mode of their Vm called
infinite heap.  it *never* garbage collected, even if you called
System.gc.  Instead it just threw away address space and counted on
the total memory needs for the life of the program being less then the
total addressable space of the processor.

It was *very* fast for certain kinds of applications.

Far from being pedantic, not depending on undocumented behavior is
simply good engineering.


On Thu, May 26, 2011 at 4:51 PM, Jonathan Ellis jbel...@gmail.com wrote:
 I've read the relevant source. While you're pedantically correct re
 the spec, you're wrong as to what the JVM actually does.

 On Thu, May 26, 2011 at 3:14 PM, Jeffrey Kesselman jef...@gmail.com wrote:
 Some references...

 An object enters an unreachable state when no more strong references
 to it exist. When an object is unreachable, it is a candidate for
 collection. Note the wording: Just because an object is a candidate
 for collection doesn't mean it will be immediately collected. The JVM
 is free to delay collection until there is an immediate need for the
 memory being consumed by the object.

 http://java.sun.com/docs/books/performance/1st_edition/html/JPAppGC.fm.html#998394

 and Calling the gc method suggests that the Java Virtual Machine
 expend effort toward recycling unused objects

 http://download.oracle.com/javase/6/docs/api/java/lang/System.html#gc()

 It goes on to say that the VM will make a best effort, but best
 effort is *deliberately* left up to the definition of the gc
 implementor.

 I guess you missed the many lectures I have given on this subject over
 the years at Java One Conferences

 On Thu, May 26, 2011 at 3:53 PM, Jonathan Ellis jbel...@gmail.com wrote:
 It's a common misunderstanding that system.gc is only a suggestion; on
 any VM you're likely to run Cassandra on, System.gc will actually
 invoke a full collection.

 On Thu, May 26, 2011 at 2:18 PM, Jeffrey Kesselman jef...@gmail.com wrote:
 Actually this is no gaurantee.   Its a common misunderstanding that
 System.gc forces gc.  It does not. It is a suggestion only. The vm always
 has the option as to when and how much it gcs

 On May 26, 2011 2:51 PM, Jonathan Ellis jbel...@gmail.com wrote:




 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




 --
 It's always darkest just before you are eaten by a grue.




 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




-- 
It's always darkest just before you are eaten by a grue.


Re: Forcing Cassandra to free up some space

2011-05-26 Thread Jeffrey Kesselman
Not if it depends on a side effect of garbage collection such as finalizers

It aught to publish its own JMX control to cause that to happen.



On Thu, May 26, 2011 at 6:58 PM, Konstantin  Naryshkin
konstant...@a-bb.net wrote:
 So, in summary, there is no way to predictably and efficiently tell Cassandra 
 to get rid of all of the extra space it is using on disk?

 - Original Message -
 From: Jeffrey Kesselman jef...@gmail.com
 To: user@cassandra.apache.org
 Sent: Thursday, May 26, 2011 8:57:49 PM
 Subject: Re: Forcing Cassandra to free up some space

 Which JVM?  Which collector?  There have been and continue to be many.

 Hotspot itself supports a number of different collectors with
 different behaviors.   Many of them do not collect every candidate on
 every gc, but merely the easiest ones to find.  This is why depending
 on finalizers is a *bad* idea in java code.  They may well never get
 run.  (Finalizer is one of a few features the Sun Java team always
 regretted putting in Java to start with.  It has caused quite a few
 application problems over the years)

 The really important thing is that NONE of these behaviors of the
 colelctors are guaranteed by specification not to change from version
 to version.  Basing your code on non-specified behaviors is a good way
 to hit mysterious failures on updates.

 For instance, in the mid 90s, IBM had a mode of their Vm called
 infinite heap.  it *never* garbage collected, even if you called
 System.gc.  Instead it just threw away address space and counted on
 the total memory needs for the life of the program being less then the
 total addressable space of the processor.

 It was *very* fast for certain kinds of applications.

 Far from being pedantic, not depending on undocumented behavior is
 simply good engineering.


 On Thu, May 26, 2011 at 4:51 PM, Jonathan Ellis jbel...@gmail.com wrote:
 I've read the relevant source. While you're pedantically correct re
 the spec, you're wrong as to what the JVM actually does.

 On Thu, May 26, 2011 at 3:14 PM, Jeffrey Kesselman jef...@gmail.com wrote:
 Some references...

 An object enters an unreachable state when no more strong references
 to it exist. When an object is unreachable, it is a candidate for
 collection. Note the wording: Just because an object is a candidate
 for collection doesn't mean it will be immediately collected. The JVM
 is free to delay collection until there is an immediate need for the
 memory being consumed by the object.

 http://java.sun.com/docs/books/performance/1st_edition/html/JPAppGC.fm.html#998394

 and Calling the gc method suggests that the Java Virtual Machine
 expend effort toward recycling unused objects

 http://download.oracle.com/javase/6/docs/api/java/lang/System.html#gc()

 It goes on to say that the VM will make a best effort, but best
 effort is *deliberately* left up to the definition of the gc
 implementor.

 I guess you missed the many lectures I have given on this subject over
 the years at Java One Conferences

 On Thu, May 26, 2011 at 3:53 PM, Jonathan Ellis jbel...@gmail.com wrote:
 It's a common misunderstanding that system.gc is only a suggestion; on
 any VM you're likely to run Cassandra on, System.gc will actually
 invoke a full collection.

 On Thu, May 26, 2011 at 2:18 PM, Jeffrey Kesselman jef...@gmail.com 
 wrote:
 Actually this is no gaurantee.   Its a common misunderstanding that
 System.gc forces gc.  It does not. It is a suggestion only. The vm 
 always
 has the option as to when and how much it gcs

 On May 26, 2011 2:51 PM, Jonathan Ellis jbel...@gmail.com wrote:




 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




 --
 It's always darkest just before you are eaten by a grue.




 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




 --
 It's always darkest just before you are eaten by a grue.




-- 
It's always darkest just before you are eaten by a grue.


Re: Forcing Cassandra to free up some space

2011-05-26 Thread Jeffrey Kesselman
You really should qualify  that with on all currently known versions
of Hotspot

Not trying to give you grief, really, but its an important limitation
to understand.

On Thu, May 26, 2011 at 10:16 PM, Jonathan Ellis jbel...@gmail.com wrote:
 In summary, system.gc works fine unless you've deliberately done
 something like setting the -XX:-DisableExplicitGC flag.

 On Thu, May 26, 2011 at 5:58 PM, Konstantin  Naryshkin
 konstant...@a-bb.net wrote:
 So, in summary, there is no way to predictably and efficiently tell 
 Cassandra to get rid of all of the extra space it is using on disk?

 - Original Message -
 From: Jeffrey Kesselman jef...@gmail.com
 To: user@cassandra.apache.org
 Sent: Thursday, May 26, 2011 8:57:49 PM
 Subject: Re: Forcing Cassandra to free up some space

 Which JVM?  Which collector?  There have been and continue to be many.

 Hotspot itself supports a number of different collectors with
 different behaviors.   Many of them do not collect every candidate on
 every gc, but merely the easiest ones to find.  This is why depending
 on finalizers is a *bad* idea in java code.  They may well never get
 run.  (Finalizer is one of a few features the Sun Java team always
 regretted putting in Java to start with.  It has caused quite a few
 application problems over the years)

 The really important thing is that NONE of these behaviors of the
 colelctors are guaranteed by specification not to change from version
 to version.  Basing your code on non-specified behaviors is a good way
 to hit mysterious failures on updates.

 For instance, in the mid 90s, IBM had a mode of their Vm called
 infinite heap.  it *never* garbage collected, even if you called
 System.gc.  Instead it just threw away address space and counted on
 the total memory needs for the life of the program being less then the
 total addressable space of the processor.

 It was *very* fast for certain kinds of applications.

 Far from being pedantic, not depending on undocumented behavior is
 simply good engineering.


 On Thu, May 26, 2011 at 4:51 PM, Jonathan Ellis jbel...@gmail.com wrote:
 I've read the relevant source. While you're pedantically correct re
 the spec, you're wrong as to what the JVM actually does.

 On Thu, May 26, 2011 at 3:14 PM, Jeffrey Kesselman jef...@gmail.com wrote:
 Some references...

 An object enters an unreachable state when no more strong references
 to it exist. When an object is unreachable, it is a candidate for
 collection. Note the wording: Just because an object is a candidate
 for collection doesn't mean it will be immediately collected. The JVM
 is free to delay collection until there is an immediate need for the
 memory being consumed by the object.

 http://java.sun.com/docs/books/performance/1st_edition/html/JPAppGC.fm.html#998394

 and Calling the gc method suggests that the Java Virtual Machine
 expend effort toward recycling unused objects

 http://download.oracle.com/javase/6/docs/api/java/lang/System.html#gc()

 It goes on to say that the VM will make a best effort, but best
 effort is *deliberately* left up to the definition of the gc
 implementor.

 I guess you missed the many lectures I have given on this subject over
 the years at Java One Conferences

 On Thu, May 26, 2011 at 3:53 PM, Jonathan Ellis jbel...@gmail.com wrote:
 It's a common misunderstanding that system.gc is only a suggestion; on
 any VM you're likely to run Cassandra on, System.gc will actually
 invoke a full collection.

 On Thu, May 26, 2011 at 2:18 PM, Jeffrey Kesselman jef...@gmail.com 
 wrote:
 Actually this is no gaurantee.   Its a common misunderstanding that
 System.gc forces gc.  It does not. It is a suggestion only. The vm 
 always
 has the option as to when and how much it gcs

 On May 26, 2011 2:51 PM, Jonathan Ellis jbel...@gmail.com wrote:




 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




 --
 It's always darkest just before you are eaten by a grue.




 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




 --
 It's always darkest just before you are eaten by a grue.




 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




-- 
It's always darkest just before you are eaten by a grue.


Re: Forcing Cassandra to free up some space

2011-05-26 Thread Jeffrey Kesselman
Im also not sure that will guarantee all space is cleaned up.  It
really depends on what you are doing inside Cassandra.  If you have
your on garbage collect that is just in some way tied to the gc run,
then it will run when  it runs.

If otoh you are associating records in your storage with specific
objects in memory and using one of the post-mortem hooks (finalize or
PhantomReference) to tell you to clean up that particular record then
its quite possible they wont all get cleaned up.  In general hotspot
does not find and clean every candidate object on every GC run.  It
starts with the easiest/fastest to find and then sees what more it
thinks it needs to do to create enough memory for anticipated near
future needs.

On Thu, May 26, 2011 at 10:16 PM, Jonathan Ellis jbel...@gmail.com wrote:
 In summary, system.gc works fine unless you've deliberately done
 something like setting the -XX:-DisableExplicitGC flag.

 On Thu, May 26, 2011 at 5:58 PM, Konstantin  Naryshkin
 konstant...@a-bb.net wrote:
 So, in summary, there is no way to predictably and efficiently tell 
 Cassandra to get rid of all of the extra space it is using on disk?

 - Original Message -
 From: Jeffrey Kesselman jef...@gmail.com
 To: user@cassandra.apache.org
 Sent: Thursday, May 26, 2011 8:57:49 PM
 Subject: Re: Forcing Cassandra to free up some space

 Which JVM?  Which collector?  There have been and continue to be many.

 Hotspot itself supports a number of different collectors with
 different behaviors.   Many of them do not collect every candidate on
 every gc, but merely the easiest ones to find.  This is why depending
 on finalizers is a *bad* idea in java code.  They may well never get
 run.  (Finalizer is one of a few features the Sun Java team always
 regretted putting in Java to start with.  It has caused quite a few
 application problems over the years)

 The really important thing is that NONE of these behaviors of the
 colelctors are guaranteed by specification not to change from version
 to version.  Basing your code on non-specified behaviors is a good way
 to hit mysterious failures on updates.

 For instance, in the mid 90s, IBM had a mode of their Vm called
 infinite heap.  it *never* garbage collected, even if you called
 System.gc.  Instead it just threw away address space and counted on
 the total memory needs for the life of the program being less then the
 total addressable space of the processor.

 It was *very* fast for certain kinds of applications.

 Far from being pedantic, not depending on undocumented behavior is
 simply good engineering.


 On Thu, May 26, 2011 at 4:51 PM, Jonathan Ellis jbel...@gmail.com wrote:
 I've read the relevant source. While you're pedantically correct re
 the spec, you're wrong as to what the JVM actually does.

 On Thu, May 26, 2011 at 3:14 PM, Jeffrey Kesselman jef...@gmail.com wrote:
 Some references...

 An object enters an unreachable state when no more strong references
 to it exist. When an object is unreachable, it is a candidate for
 collection. Note the wording: Just because an object is a candidate
 for collection doesn't mean it will be immediately collected. The JVM
 is free to delay collection until there is an immediate need for the
 memory being consumed by the object.

 http://java.sun.com/docs/books/performance/1st_edition/html/JPAppGC.fm.html#998394

 and Calling the gc method suggests that the Java Virtual Machine
 expend effort toward recycling unused objects

 http://download.oracle.com/javase/6/docs/api/java/lang/System.html#gc()

 It goes on to say that the VM will make a best effort, but best
 effort is *deliberately* left up to the definition of the gc
 implementor.

 I guess you missed the many lectures I have given on this subject over
 the years at Java One Conferences

 On Thu, May 26, 2011 at 3:53 PM, Jonathan Ellis jbel...@gmail.com wrote:
 It's a common misunderstanding that system.gc is only a suggestion; on
 any VM you're likely to run Cassandra on, System.gc will actually
 invoke a full collection.

 On Thu, May 26, 2011 at 2:18 PM, Jeffrey Kesselman jef...@gmail.com 
 wrote:
 Actually this is no gaurantee.   Its a common misunderstanding that
 System.gc forces gc.  It does not. It is a suggestion only. The vm 
 always
 has the option as to when and how much it gcs

 On May 26, 2011 2:51 PM, Jonathan Ellis jbel...@gmail.com wrote:




 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




 --
 It's always darkest just before you are eaten by a grue.




 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




 --
 It's always darkest just before you are eaten by a grue.




 --
 Jonathan Ellis
 Project Chair, Apache Cassandra
 co-founder of DataStax, the source for professional Cassandra support
 http://www.datastax.com




-- 
It's always

Re: Cassandra Vs. Oracle Coherence

2011-05-20 Thread Jeffrey Kesselman
I believe coherence is their name for the TimesTen technology they bought.

TT is an in memory SQL database that can  run as a cache for Oracle.

Its totally different from Cassandra.   On the one hand it supports
trad SQL whereas Cassandra does not.  On the other hand Cassandra is
truly distributed and fault tolerant, whereas TT is not.

I suggest getting and reading the Oriely Cassandra book.

JK

On Tue, May 17, 2011 at 10:44 PM, Karamel, Raghu
raghu_kara...@intuit.com wrote:
 Hi,



 I am new to Cassandra and very excited with the technology. I am evaluating
 it and trying to understand the difference between Cassandra and Oracle
 Coherence. Precisely , looking for reasons why would some select Cassandra
 over Oracle Coherence. Does anyone did the exercise of comparing them?
 Appreciate if you can share some information on that.



 Regrads

 -RK



-- 
It's always darkest just before you are eaten by a grue.


Re: How to reduce the Read Latency.

2011-05-20 Thread Jeffrey Kesselman
What consistency are you asking for?

On Fri, May 20, 2011 at 7:42 AM, Dikang Gu dikan...@gmail.com wrote:
 Hi All,
 I'm running three cassandra 0.7.4 nodes in a cluster, and I give 2G memory
 to each node.
 Now, I get the cfstats here:
 Keyspace: UserMap
 Read Count: 38411
 Read Latency: 123.54214613001484 ms.
 Write Count: 44155
 Write Latency: 0.02341093873853471 ms.
 Pending Tasks: 0
 Column Family: Map
 SSTable count: 3
 Space used (live): 32704387
 Space used (total): 32704387
 Memtable Columns Count: 49
 Memtable Data Size: 3348
 Memtable Switch Count: 56
 Read Count: 38411
 Read Latency: 123.542 ms.
 Write Count: 44155
 Write Latency: 0.023 ms.
 Pending Tasks: 0
 Key cache capacity: 20
 Key cache size: 611
 Key cache hit rate: 0.9294361241314483
 Row cache: disabled
 Compacted row minimum size: 125
 Compacted row maximum size: 17436917
 Compacted row mean size: 147647
 You can find that the Read Latency is really high here, so what can I do to
 reduce the latency?  Give more memory to the three nodes? Any other options?
 Thanks.
 --
 Dikang Gu
 0086 - 18611140205




-- 
It's always darkest just before you are eaten by a grue.


Re: Inter node communication over UDP

2011-05-20 Thread Jeffrey Kesselman
TCP/IP byte over-head v. UDP really isnt that much if your packets are
of any significant size (its 30 bytes).

And as others have pointed out you can easily get more over-head with
worse results trying to reinvent reliable transport on top of UDP.
Remember that TCP/IP has had 30 years of development and tuning.

On Fri, May 20, 2011 at 7:39 AM, pankajsoni0126
pankajsoni0...@gmail.com wrote:
 I am working on version 0.7.6 of cassandra. I have been looking into the code
 to identify communication between nodes.

 it seems to me that both inter-node and servernode-client communication
 happens using thrift protocol, is my understanding correct?

 and the gossiper communication takes place using tcp and message queue?



 --
 View this message in context: 
 http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Inter-node-communication-over-UDP-tp6358459p6384978.html
 Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
 Nabble.com.




-- 
It's always darkest just before you are eaten by a grue.


Re: Cassandra Vs. Oracle Coherence

2011-05-20 Thread Jeffrey Kesselman
AH, I stand corrected.  Hard to follow Larry's acquisitions without a scorecard.

On 5/20/11, Peter Lin wool...@gmail.com wrote:
 That's completely wrong.

 TimesTen and Coherence are 2 separate products sold by Oracle.
 Coherence is a data grid that takes a key/value approach. It is
 massively scalable across LAN and WAN.

 In terms of comparing Cassandra and Coherence, I wouldn't. Coherence
 is a data grid and most often used as a fault tolerant distributed
 cache, though it does a lot more than that. Oracle bought Tangosol a
 few years back.

 On Fri, May 20, 2011 at 4:23 AM, Jeffrey Kesselman jef...@gmail.com wrote:
 I believe coherence is their name for the TimesTen technology they bought.

 TT is an in memory SQL database that can  run as a cache for Oracle.

 Its totally different from Cassandra.   On the one hand it supports
 trad SQL whereas Cassandra does not.  On the other hand Cassandra is
 truly distributed and fault tolerant, whereas TT is not.

 I suggest getting and reading the Oriely Cassandra book.

 JK

 On Tue, May 17, 2011 at 10:44 PM, Karamel, Raghu
 raghu_kara...@intuit.com wrote:
 Hi,



 I am new to Cassandra and very excited with the technology. I am
 evaluating
 it and trying to understand the difference between Cassandra and Oracle
 Coherence. Precisely , looking for reasons why would some select
 Cassandra
 over Oracle Coherence. Does anyone did the exercise of comparing them?
 Appreciate if you can share some information on that.



 Regrads

 -RK



 --
 It's always darkest just before you are eaten by a grue.




-- 
It's always darkest just before you are eaten by a grue.


Re: Crash when uploading large data sets

2011-05-12 Thread Jeffrey Kesselman
If this a 64bit VM?

A 32bit Java VM with default c-heap settings can only actually use
about 2GB of Java Heap.

On Thu, May 12, 2011 at 8:08 PM, James Cipar jci...@cmu.edu wrote:
 Oh, forgot this detail:  I have no swap configured, so swapping is not the 
 cause of the crash.  Could it be that I'm running out of memory on a 15GB 
 machine?  That seems unlikely.  I grepped dmesg for oom and didn't see 
 anything from the oom killer, and I used the instructions from the following 
 web page and didn't see that the oom killer had killed anything.

 http://stackoverflow.com/questions/624857/finding-which-process-was-killed-by-linux-oom-killer

 jcipar@172-19-149-62:~$ sudo cat /var/log/messages | grep --ignore-case 
 killed process
 jcipar@172-19-149-62:~$



 Also, this is pretty subjective, so I can't say for sure until it finishes, 
 but this seems to be running *much* slower after setting the heap size and 
 setting up JNA.



 On May 12, 2011, at 7:52 PM, James Cipar wrote:

 It looks like MAX_HEAP_SIZE is set in cassandra-env.sh to be half of my 
 physical memory.  These are 15GB VMs, so that's 7.5GB for Cassandra.  I 
 would have expected that to work, but I will override to 13 GB just to see 
 what happens.

 I've also got the JNA thing set up.  Do you think this would cause the 
 crashes, or is it just a performance improvement?



 On May 12, 2011, at 7:27 PM, Sameer Farooqui wrote:

 The key JVM options for Cassandra are in cassandra.in.sh.

 What is your min and max heap size?

 The default setting of max heap size is 1GB. How much RAM do your nodes 
 have? You may want to increase this setting. You can also set the -Xmx and 
 -Xms options to the same value to keep Java from having to manage heap 
 growth. On a 32-bit machine, you can get a max of about 1.6 GB of heap; you 
 can get a lot more on 64-bit.

 Try messing with some of the other settings in the cassandra.in.sh file.

 You may not have DEBUG mode turned on for Cassandra and therefore may not 
 be getting the full details of what's going on when the server crashes. In 
 the cassandra-home/conf/log4j-server.properties file, set this line from 
 the default of INFO to DEBUG:

 log4j.rootLogger=INFO,stdout,R


 Also, you haven't configured JNA on this server. Here's some info about it 
 and how to configure it:

 JNA provides Java programs easy access to native shared libraries without 
 writing anything but Java code.

 Note from Cassandra developers for why JNA is needed:
 Linux aggressively swaps out infrequently used memory to make more room 
 for its file system buffer cache. Unfortunately, modern generational 
 garbage collectors like the JVM's leave parts of its heap un-touched for 
 relatively large amounts of time, leading Linux to swap it out. When the 
 JVM finally goes to use or GC that memory, swap hell ensues.

 Setting swappiness to zero can mitigate this behavior but does not 
 eliminate it entirely. Turning off swap entirely is effective. But to avoid 
 surprising people who don't know about this behavior, the best solution is 
 to tell Linux not to swap out the JVM, and that is what we do now with 
 mlockall via JNA.

 Because of licensing issues, we can't distribute JNA with Cassandra, so you 
 must manually add it to the Cassandra lib/ directory or otherwise place it 
 on the classpath. If the JNA jar is not present, Cassandra will continue as 
 before.

 Get JNA with:
 cd ~
 wget 
 http://debian.riptano.com/debian/pool/libjna-java_3.2.7-0~nmu.2_amd64.deb

 To install:
 techlabs@cassandraN1:~$ sudo dpkg -i libjna-java_3.2.7-0~nmu.2_amd64.deb
 (Reading database ... 44334 files and directories currently installed.)
 Preparing to replace libjna-java 3.2.4-2 (using 
 libjna-java_3.2.7-0~nmu.2_amd64.deb) ...
 Unpacking replacement libjna-java ...
 Setting up libjna-java (3.2.7-0~nmu.2) ...


 The deb package will install the JNA jar file to /usr/share/java/jna.jar, 
 but Cassandra only loads it if its in the class path. The easy way to do 
 this is just create a symlink into your Cassandra lib directory (note: 
 replace /home/techlabs with your home dir location):
 ln -s /usr/share/java/jna.jar /home/techlabs/apache-cassandra-0.7.0/lib

 Research:
 http://journal.paul.querna.org/articles/2010/11/11/enabling-jna-in-cassandra/


 - Sameer


 On Thu, May 12, 2011 at 4:15 PM, James Cipar jci...@cmu.edu wrote:
 I'm using Cassandra 0.7.5, and uploading about 200 GB of data total (20 GB 
 unique data), to a cluster of 10 servers.  I'm using batch_mutate, and 
 breaking the data up into chunks of about 10k records.  Each record is 
 about 5KB, so a total of about 50MB per batch.  When I upload a smaller 2 
 GB data set, everything works fine.  When I upload the 20 GB data set, 
 servers will occasionally crash.  Currently I have my client code 
 automatically detect this and restart the server, but that is less than 
 ideal.

 I'm not sure what information to gather to determine what's going on here.  
 Here is a sample of a log 

Does anyone have Cassandra running on OpenSolaris?

2011-05-09 Thread Jeffrey Kesselman
I get this error:

bin/cassandra: syntax error at line 29: `system_memory_in_mb=$' unexpected

Thanks

JK


-- 
It's always darkest just before you are eaten by a grue.


Re: Does anyone have Cassandra running on OpenSolaris?

2011-05-09 Thread Jeffrey Kesselman
Ah. That solved it. ty.


On Mon, May 9, 2011 at 11:29 AM, Roland Gude roland.g...@yoochoose.com wrote:

 Use bash as a shell

 #bash bin/cassandra -f


 -Ursprüngliche Nachricht-
 Von: Jeffrey Kesselman [mailto:jef...@gmail.com]
 Gesendet: Montag, 9. Mai 2011 17:12
 An: user@cassandra.apache.org
 Betreff: Does anyone have Cassandra running on OpenSolaris?

 I get this error:

 bin/cassandra: syntax error at line 29: `system_memory_in_mb=$' unexpected

 Thanks

 JK


 --
 It's always darkest just before you are eaten by a grue.






-- 
It's always darkest just before you are eaten by a grue.