Re: Running Cassandra as a Windows Service

2010-07-04 Thread Richard Grossman
Hello

Why not using Java Wrapper Service?
http://wrapper.tanukisoftware.org/doc/english/download.jsp
You can configure any java process as real windows services instead of batch
files

Richard

On Thu, Jun 10, 2010 at 8:34 PM, Kochheiser,Todd W - TO-DITT1 
twkochhei...@bpa.gov wrote:

  For various reasons I am required to deploy systems on Windows.  As such,
 I went looking for information on running Cassandra as a Windows service.
 I’ve read some of the user threads regarding running Cassandra as a Windows
 service, such as this one:

 *
 http://www.mail-archive.com/user@cassandra.apache.org/msg01656.html*http://www.mail-archive.com/user@cassandra.apache.org/msg01656.html

 I also found the following JIRA issue:

 
 *https://issues.apache.org/jira/browse/CASSANDRA-292*https://issues.apache.org/jira/browse/CASSANDRA-292

 As it didn’t look like anyone has contributed a formal solution and having
 some experience using Apache’s Procrun (*
 http://commons.apache.org/daemon/procrun.html*http://commons.apache.org/daemon/procrun.html),
 I decided to go ahead and write a batch script and a simple “WindowsService”
 class to accomplish the task.  The WindowsService class only makes calls to
 public methods in CassandraDeamon and is fairly simple.  In combination with
 the batch script, it is very easy to install and remove the service.  At
 this point, I’ve installed Cassandra as a Windows service on XP (32 bit),
 Windows 7 (64 bit) and Windows Server 2008 R1/R2 (64 bit).  It should work
 fine on other version of Windows (2K, 2K3).

 Questions:


1. Has anyone else already done this work?
2. If not, I wouldn’t mind sharing the code/script or contributing it
back to the project.  Is there any interest in this from the Cassandra dev
team or the user community?


 Ideally the WindowsService could be included in the distributed
 source/binary distributions (perhaps in a contrib area) as well as the batch
 script and associated procrun executables.  Or, perhaps it could be posted
 to a Cassandra community site (is there one?).

 Todd








Model to store biggest score

2010-03-17 Thread Richard Grossman
Hi,

I trying to find a model where I can keep the list of biggest score for
users.
it's seems simple but I'm stuck here .
For example user1 score = 10
user2 score = 20
user3 score = 30

Query: Top score (2) = user3, user2
If someone have made something similar thanks for sharing

Richard


Re: Model to store biggest score

2010-03-17 Thread Richard Grossman
But in the case of simple column family I've the same problem when I update
the score of 1 user then I need to remove his old score too. For example
here the user uid5 was at 130 now he is at 140 because I add the random
number cassandra will keep all the score evolution.

get Keyspace2.topScoreUser['top']
= (column=140-1, value=uid5, timestamp=1268841641979)
= (column=130-2, value=uid5, timestamp=1268841614066)
= (column=130-1, value=uid4, timestamp=1268841594786)
= (column=130, value=uid4, timestamp=1268841517352)
= (column=120, value=uid3, timestamp=1268841509536)
= (column=110, value=uid2, timestamp=1268841501720)
= (column=100, value=uid1, timestamp=1268841496069)

Is it wrong ?

On Wed, Mar 17, 2010 at 6:20 PM, Brandon Williams dri...@gmail.com wrote:

 On Wed, Mar 17, 2010 at 11:13 AM, Toby DiPasquale t...@cbcg.net wrote:

 Couldn't you just use a supercolumn whose keys were the score and the
 subcolumns were username:true? Basically using the subcolumns as a
 list?


 Sure, but that complicates getting the top N scores.  You'd have to use the
 OrderedPartioner, so it's a bit less flexible.  Also, any time a score
 changed you'd have to find the old one and remove them.

 -Brandon