"range query" vs "slice range query"

2011-05-25 Thread david lee
hi guys,

i'm reading up on the book "Cassandra - Definitive guide"
and i don't seem to understand what it says about "ranges and slices"

my understanding is
a range as in "a mathematical range to define a subset from an ordered set
of elements",
in cassandra typically means a range of rows whereas
a slice means a range of columns.

a range query refers to a query to retrieve a range of rows whereas
a slice range queyr refers to a query to retrieve range of columns within a
row.

i may be talking about total nonsense but i really am more confused after
reading this portion of the book
http://books.google.com/books?id=MKGSbCbEdg0C&pg=PA134&lpg=PA134&dq=cassandra+%22range+query%22+%22range+slice%22&source=bl&ots=XoPB4uA60u&sig=uDDoQe0FRkQobHnr-vPvvQ3B8TQ&hl=en&ei=ub3cTcvGLZLevQOuxs3CDw&sa=X&oi=book_result&ct=result&resnum=4&ved=0CCwQ6AEwAw#v=onepage&q=cassandra%20%22range%20query%22%20%22range%20slice%22&f=false

many thanx in advance
david


Re: "range query" vs "slice range query"

2011-05-25 Thread david lee
so, that was actually simpler than i thought ay?
cheers guys~

On 26 May 2011 05:38, Roland Gude  wrote:

> That is correct. Random partitioner orders rows according to the MD5 sum.
>
> Am 25.05.2011 um 16:11 schrieb "Robert Jackson"  >:
>
> Also, it is my understanding that if you are not using
> OrderPreservingPartitioner a get_range_slices may not return what you would
> expect.
>
> With the RandomPartitioner you can iterate over the complete list by using
> the last row key as the start for subsequent requests, but if you are using
> a single query you will be returned all the rows where the returned row
> key's md5 is between the md5 of the start row key and stop row key.
>
> Reference:
> http://wiki.apache.org/cassandra/FAQ - "Why aren't range slices/sequential
> scans giving me the expected results?"
>
> Robert Jackson
>
> --
> *From: *"Jonathan Ellis" 
> *To: *user@cassandra.apache.org
> *Sent: *Wednesday, May 25, 2011 8:54:34 AM
> *Subject: *Re: "range query" vs "slice range query"
>
> get_range_slices is the api to get a slice (of columns) from each of a
> range (of rows)
>
> On Wed, May 25, 2011 at 3:42 AM, david lee  wrote:
> > hi guys,
> > i'm reading up on the book "Cassandra - Definitive guide"
> > and i don't seem to understand what it says about "ranges and slices"
> > my understanding is
> > a range as in "a mathematical range to define a subset from an ordered
> set
> > of elements",
> > in cassandra typically means a range of rows whereas
> > a slice means a range of columns.
> > a range query refers to a query to retrieve a range of rows whereas
> > a slice range queyr refers to a query to retrieve range of columns within
> a
> > row.
> > i may be talking about total nonsense but i really am more confused after
> > reading this portion of the book
> >
> http://books.google.com/books?id=MKGSbCbEdg0C&pg=PA134&lpg=PA134&dq=cassandra+%22range+query%22+%22range+slice%22&source=bl&ots=XoPB4uA60u&sig=uDDoQe0FRkQobHnr-vPvvQ3B8TQ&hl=en&ei=ub3cTcvGLZLevQOuxs3CDw&sa=X&oi=book_result&ct=result&resnum=4&ved=0CCwQ6AEwAw#v=onepage&q=cassandra%20%22range%20query%22%20%22range%20slice%22&f=false
> > many thanx in advance
> > david
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>
>


minimum number of machines for RF=3

2011-07-07 Thread david lee
hi guys,

is there a minimum(recommended) number of machines for RF=3?

i encountered a test result where
# of nodes = 3
RF  =  3
CL.READ=QUORUM
and when 1 node was taken out and back in after which node repair was run,
the TPS dropped significantly.

is this behaviour expected since the RF (for the duration of when 1 node was
taken out)
is higher than the # of nodes?

cheers,
david


Re: minimum number of machines for RF=3

2011-07-07 Thread david lee
cheers~

On 7 July 2011 19:41, Watanabe Maki  wrote:

> It is expected behaviour and not relate on number of node.
> After the failed node bringing back, the ring will be busy by Hinted
> Handoff rewriting and Read Repair. If you run repair, all your 3 nodes need
> to build Merkel Tree, compare the hash values,  then transfer latest data to
> each other.
>
> You can tune the HH, read repair to reduce performance impact on self
> healing activities.
>
> maki
>
> On 2011/07/07, at 18:10, david lee  wrote:
>
> > hi guys,
> >
> > is there a minimum(recommended) number of machines for RF=3?
> >
> > i encountered a test result where
> > # of nodes = 3
> > RF  =  3
> > CL.READ=QUORUM
> > and when 1 node was taken out and back in after which node repair was
> run,
> > the TPS dropped significantly.
> >
> > is this behaviour expected since the RF (for the duration of when 1 node
> was taken out)
> > is higher than the # of nodes?
> >
> > cheers,
> > david
>
>


log4j settings inquiry

2011-03-23 Thread david lee
hi,
i'm trying to run cassandra 0.7 on my windows machine,
and i don't seem to be able to go beyond the warning message

C:\Program Files\Apache Software
Foundation\apache-cassandra-0.7.4\bin>cassandra
 -f
Starting Cassandra Server
log4j:WARN No appenders could be found for logger
(org.apache.cassandra.service.
AbstractCassandraDaemon).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more in
fo.

in my conf folder, i have log4j-server.properties which looks like
log4j.rootLogger=INFO,stdout,R

# stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p %d{HH:mm:ss,SSS} %m%n

# rolling log file
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.maxFileSize=20MB
log4j.appender.R.maxBackupIndex=50
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%5p [%t] %d{ISO8601} %F (line %L)
%m%n
# Edit the next line to point to your logs directory
log4j.appender.R.File=file:C:/var/log/cassandra/system.log

any help will be much appreciated.

thanx in advnace


Re: log4j settings inquiry

2011-03-24 Thread david lee
specifying the path using the file:// protocol worked like a charm.
thank you very much Aaron for your help.

but i was wondering why
 -Dlog4j.configuration=log4j-server.properties didn't work and
 -Dlog4j.configuration=file://"C:\Program Files\Apache Software
Foundation\apache-cassandra-0.7.4\conf\log4j-server.properties"^ worked so i
tried to place cassandra's home folder to a folder without any space
characters
and it worked without using file:// protocol as well.

i guess it's the issue with log4j not being able to handle space characters
well.



On 25 March 2011 05:14, aaron morton  wrote:

> Just checking the obvious thing, are you running cassandra or cassandra.bat
> ? (cannot imagine you would even get as far as you did but I like asking
> questions).
>
> It's all a bit strange because the code in 0.7.4 will throw some errors if
> it cannot resolve a path to load the config from.
>
> You can hard code the log config path by modifying the line
>  -Dlog4j.configuration=log4j-server.properties^
>
> in cassandra.bat and specifying a path using the file:// protocol
>
> Hope that helps.
> Aaron
>
> On 24 Mar 2011, at 19:40, david lee wrote:
>
> hi,
> i'm trying to run cassandra 0.7 on my windows machine,
> and i don't seem to be able to go beyond the warning message
>
> C:\Program Files\Apache Software
> Foundation\apache-cassandra-0.7.4\bin>cassandra
>  -f
> Starting Cassandra Server
> log4j:WARN No appenders could be found for logger
> (org.apache.cassandra.service.
> AbstractCassandraDaemon).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
> more in
> fo.
>
> in my conf folder, i have log4j-server.properties which looks like
> log4j.rootLogger=INFO,stdout,R
>
> # stdout
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%5p %d{HH:mm:ss,SSS} %m%n
>
> # rolling log file
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.R.maxFileSize=20MB
> log4j.appender.R.maxBackupIndex=50
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
> log4j.appender.R.layout.ConversionPattern=%5p [%t] %d{ISO8601} %F (line %L)
> %m%n
> # Edit the next line to point to your logs directory
> log4j.appender.R.File=file:C:/var/log/cassandra/system.log
>
> any help will be much appreciated.
>
> thanx in advnace
>
>
>