Re: Request For 0.6.12 Release

2011-02-16 Thread Aaron Morton
Have checked it's all in the 0.6 branch and asked the devs for a 0.6.12 release. Will let you know how it goes.cheersAaronOn 16 Feb, 2011,at 08:38 AM, Aaron Morton aa...@thelastpickle.com wrote:I worked on that ticket, will try to chase it up.AaronOn 15/02/2011, at 2:01 PM, Gregory Szorc gregory.sz...@gmail.com wrote:The latest official 0.6.x releases, 0.6.10 and 0.6.11, have a very serious bug/regression when performing some quorum reads (CASSANDRA-2081), which is fixed in the head of the 0.6 branch. If there aren’t any plans to cut 0.6.12 any time soon, as an end user, I request that an official and “blessed” release of 0.6.x be made ASAP.On a related note, I am frustrated that such a serious issue has lingered in the “latest oldstable release.” I would have liked to see one or more of the following:1) The issue documented prominently on the apache.org web site and inside the download archive so end users would know they are downloading and running known-broken software2) The 0.6.10 and 0.6.11 builds pulled after identification of the issue3) A 0.6.12 release cut immediately (with reasonable time for testing, of course) to address the issueI understand that releases may not always be as stable as we all desire. But, I hope that when future bugs affecting the bread and butter properties of a distributed storage engine surface (especially when they are regressions) that the official project response (preferably via mailing list and the web site) is swift and maximizes the potential for data integrity and availability.If there is anything I can do to help the process, I’d gladly give some of my time to help the overall community.Gregory Szorcgregory.sz...@gmail.com

exceptions upgrading from 0.7.0 to 0.7.1

2011-02-16 Thread Karl Hiramoto

Hi,

just started an upgrade on a single node of a live production cluster, 
and did a nodetool repair/compact/cleanup   in the logs I see
exceptions, is this normal?

ERROR [ReadStage:31] 2011-02-16 08:18:38,094
DebuggableThreadPoolExecutor.java (line 103) Error in ThreadPoolExecutor
java.io.IOError: java.io.EOFException
at
org.apache.cassandra.db.columniterator.SSTableNamesIterator.init(SSTableNamesIterator.java:75)
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:1274)
at
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1166)
at
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1095)
at org.apache.cassandra.db.Table.getRow(Table.java:384)
at
org.apache.cassandra.db.SliceByNamesReadCommand.getRow(SliceByNamesReadCommand.java:60)
at
org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:473)
at
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
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)
Caused by: java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:392)
at
org.apache.cassandra.utils.BloomFilterSerializer.deserialize(BloomFilterSerializer.java:48)
at
org.apache.cassandra.utils.BloomFilterSerializer.deserialize(BloomFilterSerializer.java:30)
at
org.apache.cassandra.io.sstable.IndexHelper.defreezeBloomFilter(IndexHelper.java:108)
at
org.apache.cassandra.db.columniterator.SSTableNamesIterator.read(SSTableNamesIterator.java:106)
at
org.apache.cassandra.db.columniterator.SSTableNamesIterator.init(SSTableNamesIterator.java:71)
... 12 more
ERROR [ReadStage:31] 2011-02-16 08:18:38,096
AbstractCassandraDaemon.java (line 114) Fatal exception in thread
Thread[ReadStage:31,5,main]
java.io.IOError: java.io.EOFException
at
org.apache.cassandra.db.columniterator.SSTableNamesIterator.init(SSTableNamesIterator.java:75)
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:1274)
at
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1166)
at
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1095)
at org.apache.cassandra.db.Table.getRow(Table.java:384)
at
org.apache.cassandra.db.SliceByNamesReadCommand.getRow(SliceByNamesReadCommand.java:60)
at
org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:473)
at
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
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)
Caused by: java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:392)
at
org.apache.cassandra.utils.BloomFilterSerializer.deserialize(BloomFilterSerializer.java:48)
at
org.apache.cassandra.utils.BloomFilterSerializer.deserialize(BloomFilterSerializer.java:30)
at
org.apache.cassandra.io.sstable.IndexHelper.defreezeBloomFilter(IndexHelper.java:108)
at
org.apache.cassandra.db.columniterator.SSTableNamesIterator.read(SSTableNamesIterator.java:106)
at
org.apache.cassandra.db.columniterator.SSTableNamesIterator.init(SSTableNamesIterator.java:71)
... 12 more
ERROR [ReadStage:32] 2011-02-16 08:18:47,986
DebuggableThreadPoolExecutor.java (line 103) Error in ThreadPoolExecutor
java.io.IOError: java.io.EOFException
at
org.apache.cassandra.db.columniterator.SSTableNamesIterator.init(SSTableNamesIterator.java:75)
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:1274)
at
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1166)
at
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1095)
at 

limit on rows in a cf

2011-02-16 Thread Sasha Dolgy
is there a limit or a factor to take into account when the number of rows in
a CF exceeds a certain number?  i see the columns for a row can get upwards
of 2 billion ... can i have 2 billion rows without much issue?

-- 
Sasha Dolgy
sasha.do...@gmail.com


Re: Partitioning

2011-02-16 Thread Wangpei (Peter)
I have same question.
I read the source code of NetworkTopologyStrategy, seems it always put replica 
on the first nodes on the ring of the DC.
If I am misunderstand, It seems those nodes will became hot spot.
Why NetworkTopologyStrategy works that way? is there some alternative can avoid 
this shortcoming?

Thanks in advance.

Peter

发件人: Aaron Morton [mailto:aa...@thelastpickle.com]
发送时间: 2011年2月16日 3:56
收件人: user@cassandra.apache.org
主题: Re: Partitioning

You can using the Network Topology Strategy see
http://wiki.apache.org/cassandra/Operations?highlight=(topology)|(network)#Network_topology

and NetworkTopologyStrategy in the  conf/cassandra.yaml file.

You can control the number of replicas to each DC.

Also look at conf/cassandra-topology.properties for information on how to tell 
cassandra about your network topology.

Aaron


On 16 Feb, 2011,at 05:10 AM, RWN s5a...@gmail.com wrote:

Hi,
I am new to Cassandra and am evaluating it.

Following diagram is how my setup will be: http://bit.ly/gJZlhw
Here each oval represents one data center. I want to keep N=4. i.e. four
copies of every Column Family. I want one copy in each data-center. In
other words, COMPLETE database must be contained in each of the data
centers.

Question:
1. Is this possible ? If so, how do I configure (partitioner, replica etc) ?

Thanks

AJ

P.S excuse my multiple posting of the same. I am unable to subscribe for
some reason.
--
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Partitioning-tp6028132p6028132.html
Sent from the 
cassandra-u...@incubator.apache.orgmailto:cassandra-u...@incubator.apache.org 
mailing list archive at Nabble.comhttp://Nabble.com.


Re: limit on rows in a cf

2011-02-16 Thread Sylvain Lebresne
Sky is the limit.

Columns in a row are limited to 2 billion because the size of a row is
recorded in a java int. A row must also fit on one node, so this also limit
in a way the size of a row (if you have large values, you could be limited
by this factor much before reaching 2 billions columns).

The number of rows is never recorded anywhere (no data type limit). And rows
are balanced over the cluster. So there is no real limit outside what your
cluster can handle (that is the number of machine you can afford is probably
the limit).

Now, if a single node holds a huge number of rows, the only factor that
comes to mind is that the sparse index kept in memory for the SSTable can
start to take too much memory (depending on how much memory you have). In
which case you can have a look at index_interval in cassandra.yaml. But as
long as you don't start seeing node EOM for no reason, this should not be a
concern.

--
Sylvain

On Wed, Feb 16, 2011 at 9:36 AM, Sasha Dolgy sdo...@gmail.com wrote:


 is there a limit or a factor to take into account when the number of rows
 in a CF exceeds a certain number?  i see the columns for a row can get
 upwards of 2 billion ... can i have 2 billion rows without much issue?

 --
 Sasha Dolgy
 sasha.do...@gmail.com



Re: limit on rows in a cf

2011-02-16 Thread Sasha Dolgy
Thanks Sylvain

On Wed, Feb 16, 2011 at 10:05 AM, Sylvain Lebresne sylv...@datastax.comwrote:

 Sky is the limit.

 Columns in a row are limited to 2 billion because the size of a row is
 recorded in a java int. A row must also fit on one node, so this also limit
 in a way the size of a row (if you have large values, you could be limited
 by this factor much before reaching 2 billions columns).

 The number of rows is never recorded anywhere (no data type limit). And
 rows are balanced over the cluster. So there is no real limit outside what
 your cluster can handle (that is the number of machine you can afford is
 probably the limit).

 Now, if a single node holds a huge number of rows, the only factor that
 comes to mind is that the sparse index kept in memory for the SSTable can
 start to take too much memory (depending on how much memory you have). In
 which case you can have a look at index_interval in cassandra.yaml. But as
 long as you don't start seeing node EOM for no reason, this should not be a
 concern.

 --
 Sylvain

 On Wed, Feb 16, 2011 at 9:36 AM, Sasha Dolgy sdo...@gmail.com wrote:


 is there a limit or a factor to take into account when the number of rows
 in a CF exceeds a certain number?  i see the columns for a row can get
 upwards of 2 billion ... can i have 2 billion rows without much issue?

 --
 Sasha Dolgy
 sasha.do...@gmail.com





-- 
Sasha Dolgy
sasha.do...@gmail.com


memory consuption

2011-02-16 Thread ruslan usifov
Hello

Here is my output from ps aux:

root   737  0.0  0.0   8940   804 ?S04:34   0:00 nimbus(hdb)
root   768  0.0  0.0  0 0 ?S04:34   0:00
[flush-202:0]
root  1368 43.1 70.5 8248976 5935852 ? Sl   04:45 297:47
/usr/local/jdk1.6.0_23/bin/java -ea -XX:+UseThreadPriorities -XX:Thr
 cassandra daemon
root  1633  0.0  0.0  70584  3212 ?Ss   15:49   0:00 sshd:
ruslan [priv]


Is it normal that cassandra daemon eat so many memory? I look on it around
12 hours and memory consumption is only grows.


ps:
uname -a
Linux slv004 2.6.32-311-ec2 #23-Ubuntu SMP Thu Dec 2 11:14:35 UTC 2010
x86_64 GNU/Linux

java -version
java version 1.6.0_23
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)


My working machine is 8 CPU 8GB of RAM


Re: Possible EOFException regression in 0.7.1

2011-02-16 Thread Jonas Borgström
On 02/15/2011 07:15 PM, Sylvain Lebresne wrote:
 On Tue, Feb 15, 2011 at 7:10 PM, ruslan usifov ruslan.usi...@gmail.com
 mailto:ruslan.usi...@gmail.com wrote:
 
 It will be great if patch appear very quick
 
 
 patch attached here: https://issues.apache.org/jira/browse/CASSANDRA-2165

Hi again and thanks for quickly fixing this. I can no longer reproduce
this using my script on a clean 0.7.2 install.

However, after upgrading the cluster where I originally found this issue
I get the following exception when access some of the rows inserted
during my testing of 0.7.0 and 0.7.1.

[default@foo] get datasets[5]['name'] as utf8;
= (column=6e616d65, value=key:5, timestamp=1297342560881994)
[default@foo] get datasets[4];
= Lots of data
[default@foo] get datasets[4]['name'] as utf8;
null

And in system.log:
--
ERROR [ReadStage:59] 2011-02-16 14:55:01,737
AbstractCassandraDaemon.java (line 114) Fatal exception in thread
Thread[ReadStage:59,5,main]
java.lang.RuntimeException: java.lang.NegativeArraySizeException
at
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:34)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NegativeArraySizeException
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:108)
at
org.apache.cassandra.db.columniterator.SSTableNamesIterator.read(SSTableNamesIterator.java:106)
at
org.apache.cassandra.db.columniterator.SSTableNamesIterator.init(SSTableNamesIterator.java:71)
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:1275)
at
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1167)
at
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1095)
at org.apache.cassandra.db.Table.getRow(Table.java:384)
at
org.apache.cassandra.db.SliceByNamesReadCommand.getRow(SliceByNamesReadCommand.java:60)
at
org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:473)
at
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
... 3 more

get_range also fails with a similar exception:
--
ERROR [ReadStage:43] 2011-02-16 14:59:08,662
AbstractCassandraDaemon.java (line 114) Fatal exception in thread
Thread[ReadStage:43,5,main]
java.lang.RuntimeException: java.lang.NegativeArraySizeException
at
org.apache.cassandra.service.RangeSliceVerbHandler.doVerb(RangeSliceVerbHandler.java:60)
at
org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:72)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NegativeArraySizeException
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:108)
at
org.apache.cassandra.db.columniterator.SSTableNamesIterator.read(SSTableNamesIterator.java:106)
at
org.apache.cassandra.db.columniterator.SSTableNamesIterator.init(SSTableNamesIterator.java:91)
at
org.apache.cassandra.db.filter.NamesQueryFilter.getSSTableColumnIterator(NamesQueryFilter.java:64)
at
org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:87)
at
org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:184)
at
org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:144)
at
org.apache.cassandra.io.sstable.SSTableScanner.next(SSTableScanner.java:136)
at
org.apache.cassandra.io.sstable.SSTableScanner.next(SSTableScanner.java:39)
at
org.apache.commons.collections.iterators.CollatingIterator.set(CollatingIterator.java:284)
at
org.apache.commons.collections.iterators.CollatingIterator.least(CollatingIterator.java:326)
at
org.apache.commons.collections.iterators.CollatingIterator.next(CollatingIterator.java:230)

Re: Keyspace additions are not replicated to one node in the cluster

2011-02-16 Thread Gary Dusbabek
The first thing you should try is to restart the node that is not
syncing.  That will reset the version it gossips, which was not always
getting updated (fixed in CASSANDRA-2083).

Gary.


On Tue, Feb 15, 2011 at 18:25, Shu Zhang szh...@mediosystems.com wrote:
 Hi, a node in my cassandra cluster will not accept keyspace additions applied 
 to other nodes. In its logs, it says:

 DEBUG [MigrationStage:1] 2011-02-15 15:39:57,995 
 DefinitionsUpdateResponseVerbHandler.java (line 71) Applying AddKeyspace from 
 {X}
 DEBUG [MigrationStage:1] 2011-02-15 15:39:57,995 
 DefinitionsUpdateResponseVerbHandler.java (line 79) Migration not applied 
 Previous version mismatch. cannot apply.

 My cassandra nodes' version is 0.7-rc4.

 Does anyone know how I can recover from this problem? I'm fine with this node 
 being synced to whatever data definition is defined on the rest of the 
 cluster.

 Thanks,
 Shu


Re: Partitioning

2011-02-16 Thread A J
Yes, I read the same and it sounded weird.

*Note that with RackAwareStrategy, succeeding nodes along the ring should
alternate data centers to avoid hot spots. For instance, if you have nodes
A, B, C, and D in increasing Token order, and instead of alternating you
place A and B in DC1, and C and D in DC2, then nodes C and A will have
disproportionately more data on them because they will be the replica
destination for every Token range in the other data center.*



I hope there is a way where the replica of 1st node of DC1 is 1st node of
DC2
replica of 2nd node of DC1 is 2nd node of DC2 and so on

Also hope there is a way where replica of 1st node of Rack1in DC1 is 1st
node of Rack2DC1
replica of 2nd node of Rack1inDC1 is 2nd node of Rack2DC1 and so on.

Please advise if this will not be possible.

2011/2/16 Wangpei (Peter) peter.wang...@huawei.com

  I have same question.

 I read the source code of NetworkTopologyStrategy, seems it always put
 replica on the first nodes on the ring of the DC.

 If I am misunderstand, It seems those nodes will became hot spot.

 Why NetworkTopologyStrategy works that way? is there some alternative can
 avoid this shortcoming?



 Thanks in advance.



 Peter



 *发件人:* Aaron Morton [mailto:aa...@thelastpickle.com]
 *发送时间:* 2011年2月16日 3:56
 *收件人:* user@cassandra.apache.org
 *主题:* Re: Partitioning



 You can using the Network Topology Strategy see


 http://wiki.apache.org/cassandra/Operations?highlight=(topology)|(network)#Network_topology



 and NetworkTopologyStrategy in the  conf/cassandra.yaml file.



 You can control the number of replicas to each DC.



 Also look at conf/cassandra-topology.properties for information on how to
 tell cassandra about your network topology.



 Aaron



 On 16 Feb, 2011,at 05:10 AM, RWN s5a...@gmail.com wrote:


 Hi,
 I am new to Cassandra and am evaluating it.

 Following diagram is how my setup will be: http://bit.ly/gJZlhw
 Here each oval represents one data center. I want to keep N=4. i.e. four
 copies of every Column Family. I want one copy in each data-center. In
 other words, COMPLETE database must be contained in each of the data
 centers.

 Question:
 1. Is this possible ? If so, how do I configure (partitioner, replica etc)
 ?

 Thanks

 AJ

 P.S excuse my multiple posting of the same. I am unable to subscribe for
 some reason.
 --
 View this message in context:
 http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Partitioning-tp6028132p6028132.html
 Sent from the cassandra-u...@incubator.apache.org mailing list archive at
 Nabble.com.




Re: Cassandra memory consumption

2011-02-16 Thread ruslan usifov
 Each of your 21 column families will have its own memtable if you have
 the default memtable settings your memory usage will grow quite large
 over time. Have you tuned down your memtable size?


Which config parameter make this? binary_memtable_throughput_in_mb?


Re: Dropping Creating Column Families Never Returns

2011-02-16 Thread Jonathan Ellis
Dropping a CF requires the compaction lock, so if a compaction is in
progress it needs to wait for it to finish.

On Tue, Feb 15, 2011 at 8:19 PM, William R Speirs bill.spe...@gmail.com wrote:
 What would/could take so long for the nodes to agree? It's a small cluster
 (7 nodes) all on local LAN and not being used by anything else.

 I think a delete  refresh might be in order...

 Thanks!

 Bill-

 On 02/15/2011 09:13 PM, Jonathan Ellis wrote:

 command never returns means it's waiting for the nodes to agree on
 the new schema version.  Bad Mojo will ensue if you issue more schema
 updates anyway.

 On Tue, Feb 15, 2011 at 3:46 PM, Bill Speirsbill.spe...@gmail.com
  wrote:

 Has anyone ever tried to drop a column family and/or create one and
 have the command not return from the cli? I'm using 0.7.1 and I tried
 to drop a column family and the command never returned. However, on
 another node it showed it was gone. I Ctrl-C out of the command, then
 issued a create for a column family of the same name, different
 schema. That command never returned, but again in other host it showed
 it was there. I went to describe and list this column family and got
 this:

 [default@Logging] describe keyspace Logging;
 Keyspace: Logging:
  Replication Strategy: org.apache.cassandra.locator.SimpleStrategy
    Replication Factor: 3
  Column Families:
    ColumnFamily: Messages
      Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
      Row cache size / save period: 0.0/0
      Key cache size / save period: 20.0/14400
      Memtable thresholds: 0.5953125/127/60
      GC grace seconds: 864000
      Compaction min/max thresholds: 4/32
      Read repair chance: 1.0
      Built indexes: []
 [default@Logging] list Messages;
 Messages not found in current keyspace.


 Any ideas?

 Bill-








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


Re: Cassandra memory consumption

2011-02-16 Thread Victor Kabdebon
Yes I didn't see there was 2 different parameters. I was personally setting
( in cassandra 0.6.6 ) MemTableThoughputInMB, but I don't know what
BinaryMemtableThroughtputInMB is.

And I take this opportunity to ask a question :
If you have a small amount of data per key so that your memtable is maybe a
few Ko big. Is the memory footprint of the memtable going to be
MemTableThoughputInMB mb or few Ko + overhead ?

Ruslan I have seen your question in the other mail and I have the same
problem. How many CF do you have ?



2011/2/16 ruslan usifov ruslan.usi...@gmail.com


 Each of your 21 column families will have its own memtable if you have
 the default memtable settings your memory usage will grow quite large
 over time. Have you tuned down your memtable size?


 Which config parameter make this? binary_memtable_throughput_in_mb?



Re: Possible EOFException regression in 0.7.1

2011-02-16 Thread Jonathan Ellis
It does look a lot like 1932.  Make sure everything is really running
0.7.2, 0.7.0 can't read data files created by 0.7.1+.

If the versions are ok, take a snapshot, then compact, and see if the
problem still occurs with all files on the [compacted] new format.

2011/2/16 Jonas Borgström jonas.borgst...@trioptima.com:
 On 02/15/2011 07:15 PM, Sylvain Lebresne wrote:
 On Tue, Feb 15, 2011 at 7:10 PM, ruslan usifov ruslan.usi...@gmail.com
 mailto:ruslan.usi...@gmail.com wrote:

     It will be great if patch appear very quick


 patch attached here: https://issues.apache.org/jira/browse/CASSANDRA-2165

 Hi again and thanks for quickly fixing this. I can no longer reproduce
 this using my script on a clean 0.7.2 install.

 However, after upgrading the cluster where I originally found this issue
 I get the following exception when access some of the rows inserted
 during my testing of 0.7.0 and 0.7.1.

 [default@foo] get datasets[5]['name'] as utf8;
 = (column=6e616d65, value=key:5, timestamp=1297342560881994)
 [default@foo] get datasets[4];
 = Lots of data
 [default@foo] get datasets[4]['name'] as utf8;
 null

 And in system.log:
 --
 ERROR [ReadStage:59] 2011-02-16 14:55:01,737
 AbstractCassandraDaemon.java (line 114) Fatal exception in thread
 Thread[ReadStage:59,5,main]
 java.lang.RuntimeException: java.lang.NegativeArraySizeException
        at
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:34)
        at
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
 Caused by: java.lang.NegativeArraySizeException
        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:108)
        at
 org.apache.cassandra.db.columniterator.SSTableNamesIterator.read(SSTableNamesIterator.java:106)
        at
 org.apache.cassandra.db.columniterator.SSTableNamesIterator.init(SSTableNamesIterator.java:71)
        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:1275)
        at
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1167)
        at
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1095)
        at org.apache.cassandra.db.Table.getRow(Table.java:384)
        at
 org.apache.cassandra.db.SliceByNamesReadCommand.getRow(SliceByNamesReadCommand.java:60)
        at
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:473)
        at
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
        ... 3 more

 get_range also fails with a similar exception:
 --
 ERROR [ReadStage:43] 2011-02-16 14:59:08,662
 AbstractCassandraDaemon.java (line 114) Fatal exception in thread
 Thread[ReadStage:43,5,main]
 java.lang.RuntimeException: java.lang.NegativeArraySizeException
        at
 org.apache.cassandra.service.RangeSliceVerbHandler.doVerb(RangeSliceVerbHandler.java:60)
        at
 org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:72)
        at
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
 Caused by: java.lang.NegativeArraySizeException
        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:108)
        at
 org.apache.cassandra.db.columniterator.SSTableNamesIterator.read(SSTableNamesIterator.java:106)
        at
 org.apache.cassandra.db.columniterator.SSTableNamesIterator.init(SSTableNamesIterator.java:91)
        at
 org.apache.cassandra.db.filter.NamesQueryFilter.getSSTableColumnIterator(NamesQueryFilter.java:64)
        at
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:87)
        at
 org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:184)
        at
 org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:144)
        at
 org.apache.cassandra.io.sstable.SSTableScanner.next(SSTableScanner.java:136)
        at
 

Re: Cassandra memory consumption

2011-02-16 Thread ruslan usifov
2011/2/16 Victor Kabdebon victor.kabde...@gmail.com



 Ruslan I have seen your question in the other mail and I have the same
 problem. How many CF do you have ?


 16


Re: Cassandra memory consumption

2011-02-16 Thread Victor Kabdebon
Someone please correct me if I am wrong, but I think the overhead you can
expect is something like :

16* MemTableThroughtPutInMB
 but I don't know when BinaryMemTableThroughputInMb come into account..

2011/2/16 ruslan usifov ruslan.usi...@gmail.com



 2011/2/16 Victor Kabdebon victor.kabde...@gmail.com



 Ruslan I have seen your question in the other mail and I have the same
 problem. How many CF do you have ?


 16



Re: plugins/triggers/coprocessors

2011-02-16 Thread Jeremy Hanna
Just wanted to let people who follow the user list know that if there is 
interest in something like plugins, triggers, or coprocessors on the 
server-side with Cassandra, the ticket to follow or get involved with (code, 
comments, etc) is CASSANDRA-1311:
https://issues.apache.org/jira/browse/CASSANDRA-1311

On Feb 11, 2011, at 1:31 PM, Jeremy Hanna wrote:

 So from here I guess it's a matter of working out the comments/concerns 
 presented on 1311 and any future discussion sounds like it belongs there.
 
 Like I said, I just wanted to initiate discussion since it had been a while 
 and the dust from 0.7 had settled.  It seems like an incredibly useful 
 concept to have as a core feature.  Another motivation was Ben Black 
 presenting at Strata.  He had mentioned that he and Cliff had worked through 
 doing server side operations which sounded similar (though their effort 
 sounded like it was not generalizable).  I've talked to others in the 
 community that have hoped for a feature like this too.  In any case, since it 
 crossed ticket boundaries, I thought it would be most appropriate to gauge 
 interest as a discussion thread.
 
 Hopefully this will help for people who would like to either help out with 
 implementation or give feedback as to how it can be made general purpose or 
 more Cassandra-y.
 
 On Feb 11, 2011, at 1:11 PM, Jeff Hodges wrote:
 
 As the dude that worked on the 1016 prototype, I agree with this.
 
 On Fri, Feb 11, 2011 at 10:53 AM, Stu Hood stuh...@gmail.com wrote:
 Honestly, I think we should just mark 1016 a dupe and move forward with
 1311: we won't be hurting anyone's feelings, and the implementation from
 1016 is: 1. much, much less complete, 2. abandoned.
 
 
 On Fri, Feb 11, 2011 at 9:23 AM, Jeremy Hanna 
 jeremy.hanna1...@gmail.comwrote:
 
 Thanks Maxim - I'll just go ahead and BCC you and Hentschel and move the
 discussion to the dev list.
 
 Based on the comments on 1311 - did you have anything else to add to that -
 could we unify around 1016 or 1311 and work on getting that to a general
 state of acceptance?  Were there any that were able to do some work on
 either these days?  Or are we not at that point?
 
 On Feb 11, 2011, at 10:36 AM, Maxim Grinev wrote:
 
 Hi all,
 
 Jeremy, thanks for starting the discussion! We don't follow the dev list
 closely so it was a good idea to email it directly.
 
 It really seems to be about the same. To unify the discussions, we
 propose to list the features of each solution and compare them feature by
 feature. Here is the feature list for triggers:
  • Triggers are set on a column family. Triggers are executed for
 each mutation to the column family and parametrized by the mutation.
  • The mutation, which is the trigger parameter, is the new value.
 The trigger cannot see the old value.
  • Triggers are executed asynchronously some time after the write
 which fired it is acknowledged to the client.
  • Triggers are executed once during normal execution. We guarantee
 at least once execution in case of node failures.
 Cheers,
 Maxim
 
 
 On Thu, Feb 10, 2011 at 8:45 AM, Jeremy Hanna
 jeremy.hanna1...@gmail.com wrote:
 Hey guys,
 
 I was just wondering if it would be a good time to unify discussions on
 plugins/triggers/coprocessors?
 
 https://issues.apache.org/jira/browse/CASSANDRA-1016
 https://issues.apache.org/jira/browse/CASSANDRA-1311
 
 I was going to email the dev list but since I don't know if all of you
 follow the dev list and you guys are the ones that expressed the most
 interest, I thought I would start here.
 
 Yeah, they're all tackling basically the same problem. For which we
 should have a single solution.
 
 -ryan
 
 
 
 
 



Re: Coordinator node

2011-02-16 Thread A J
Thanks for the confirmation. Interesting alternatives to avoid random
coordinator.
Are there any blogs/writeups of they (primary node as co-ordinator) been
used in production scenarios. I googled but could not find anything
relevant.

On Wed, Feb 16, 2011 at 3:25 AM, Oleg Anastasyev olega...@gmail.com wrote:

 A J s5alye at gmail.com writes:

 
 
  Makes sense ! Thanks.
  Just a quick follow-up:
  Now I understand the write is not made to coordinator (unless it is part
 of
 the replica for that key). But does the write column traffic 'flow' through
 the
 coordinator node. For a 2G column write, will I see 2G network traffic on
 the
 coordinator node  or just a few bytes of traffic on the co-ordinator of it
 reading the key and talking to nodes/client etc ?

 Yes, if you talk to random (AKA coordinator) node first - all 2G traffic
 will
 flow to it first and then forwarded to natural nodes (those owning replicas
 of a
 row to be written).
 If you want to avoid extra traffic, you should determine natural nodes of
 the
 row and send your write directly to one of natural nodes (i.e. one of
 natural
 nodes became coordinator). This natural coordinator node will accept write
 locally and submit write to other replicas in parallel.
 If your client is written in java this can be implemented relatively easy.
 Look
 at TokenMetadata.ringIterator().

 If you have no requirement on using thrift interface of cassandra, it could
 be
 more efficient to write using StorageProxy interface. The latter plays a
 local
 coordinator role, so it talks directly to all replicas, so these 2G will be
 passed directly from your client to all row replicas.


 
  This will be a factor for us. So need to make sure exactly.





cluster size, several cluster on one node for multi-tenancy

2011-02-16 Thread Mimi Aluminium
Hi,
We are interested in a multi-tenancy environment, that may consist of up to
hundreds of data centers. The current design requires cross rack and cross
DC replication. Specifically, the per-tenant CFs will be replicated 6 times:
in three racks,  with 2 copies inside a rack, the racks will be located in
at least two different DCs. In the future other replication policies will be
considered. The application will decide where (which racks and DC)  to place
each tenant's replicas.  and it might be that one rack can hold more than
one tenant.

Separating each tenant in a different keyspace, as was suggested
in  previous mail thread in this subject, seems to be a good approach
(assuming the memtable problem will be solved somehow).
But then we had concern with regard to the cluster size.
and here are my questions:
1) Given the above, should I define one Cassandra cluster that hold all the
DCs? sounds not reasonable  given hundreds DCs tens of servers in each DC
etc. Where is the bottleneck here? keep-alive messages, the gossip, request
routing? what is the largest number of servers a cluster can bear?
2) Now assuming that I can create the per-tenant  keyspace only for  the
servers that in the three racks where the replicas are held,  does such
definition reduces the messaging transfer among the other servers. Does
Cassandra optimizes the message transfer in such case?
3) Additional possible solution was to create a separate clusters per each
tenant. But it can cause a situation where one server has to run two or more
Cassandra's clusters. Can we run more than one cluster in parallel, does it
means two cassandra daemons / instances on one server? what will be the
overhead? do you have a link that explains how to deal with it?

Please can you help me to decide which of these solution can work or you are
welcome to suggest something else.
Thanks a lot,
Mimi


Re: Possible EOFException regression in 0.7.1

2011-02-16 Thread Jonas Borgström
On 02/16/2011 03:54 PM, Jonathan Ellis wrote:
 It does look a lot like 1932.  Make sure everything is really running
 0.7.2, 0.7.0 can't read data files created by 0.7.1+.

All nodes are running 0.7.2

 If the versions are ok, take a snapshot, then compact, and see if the
 problem still occurs with all files on the [compacted] new format.

Yes I can confirm that rewriting all sstables by issuing compact did
the trick. Before I started I noticed that some nodes had both e and f
sstables and some only f files. So I guess the problem is that the
version f files generated by 0.7.1 sometimes contained corrupted column
name bloom filters somehow.
Anyway, compact did make the problem go away.

Thanks!

/ Jonas


rename index

2011-02-16 Thread Roland Gude
Hi,
unfortiunately i made a copy paste error and created two indexes called 
myindex on different columnfamilies.
What can I do to fix this?

Below the output from describe keyspace

ColumnFamily: A
  Columns sorted by: org.apache.cassandra.db.marshal.TimeUUIDType
  Row cache size / save period: 0.0/0
  Key cache size / save period: 20.0/14400
 Memtable thresholds: 1.1203125/239/60
  GC grace seconds: 864000
  Compaction min/max thresholds: 4/32
  Read repair chance: 1.0
  Column Metadata:
Column Name: --1000--
  Validation Class: org.apache.cassandra.db.marshal.UTF8Type
  Index Name: MyIndex
  Index Type: KEYS
ColumnFamily: B
  Columns sorted by: org.apache.cassandra.db.marshal.TimeUUIDType
  Row cache size / save period: 0.0/0
  Key cache size / save period: 20.0/14400
  Memtable thresholds: 1.1203125/239/60
  GC grace seconds: 864000
  Compaction min/max thresholds: 4/32
  Read repair chance: 1.0
  Column Metadata:
Column Name: --1000--
  Validation Class: org.apache.cassandra.db.marshal.UTF8Type
  Index Name: MyIndex
  Index Type: KEYS

--
YOOCHOOSE GmbH

Roland Gude
Software Engineer

Im Mediapark 8, 50670 Köln

+49 221 4544151 (Tel)
+49 221 4544159 (Fax)
+49 171 7894057 (Mobil)


Email: roland.g...@yoochoose.com
WWW: www.yoochoose.comhttp://www.yoochoose.com/

YOOCHOOSE GmbH
Geschäftsführer: Dr. Uwe Alkemper, Michael Friedmann
Handelsregister: Amtsgericht Köln HRB 65275
Ust-Ident-Nr: DE 264 773 520
Sitz der Gesellschaft: Köln



Re: Cassandra memory consumption

2011-02-16 Thread Robert Coli
On Wed, Feb 16, 2011 at 7:12 AM, Victor Kabdebon
victor.kabde...@gmail.com wrote:
 Someone please correct me if I am wrong, but I think the overhead you can
 expect is something like :


MemTableThroughtPutInMB * JavaOverheadFudgeFactor * maximum likely
number of such memtables which might exist at once, due to flushing
logic

JavaOverHeadFudgeFactor is at least 2.

The maximum likely number of such memtables is usually roughly 3
when considered across an assortment of columnfamilies with different
write patterns.

  but I don't know when BinaryMemTableThroughputInMb come into account..

BinaryMemTable options are only considered when using the Binary
Memtable interface. If you don't know what that is, you're not using
it.

=Rob


Re: Patterns for writing enterprise applications on cassandra

2011-02-16 Thread tijoriwala.ritesh

Hi Gaurav,
Thanks for the reply...I did look at the cages framework and I see that it
provides some functionality for locking and atomic writes for multiple keys.
My question was that do people rely on these kind of frameworks - if so, is
cages the only one or are there others as well...and if not, what do they do
to solve these kind of problems...

Thanks,
Ritesh
-- 
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Patterns-for-writing-enterprise-applications-on-cassandra-tp6030077p6033138.html
Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
Nabble.com.


Re: Patterns for writing enterprise applications on cassandra

2011-02-16 Thread tijoriwala.ritesh

Adding to the above message of mine, bulk atomic writes (or transaction
blocks) tend to be a common pattern in rich enterprise applications where
business logic requires all or no writes on set of entities. There may not
be a need for all ACID properties but atleast atomicity and durability are
a must.
-- 
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Patterns-for-writing-enterprise-applications-on-cassandra-tp6030077p6033178.html
Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
Nabble.com.


Re: Patterns for writing enterprise applications on cassandra

2011-02-16 Thread Dave Revell
Ritesh,

There don't seem to be any common best practices to do this. I think the
reason is that by adding transaction semantics on top of Cassandra you're
throwing away the most important properties of Cassandra. The effects of a
transaction/locking layer:

- A centralized performance bottleneck that won't scale linearly
- Complex failure detection and recovery
- Reduced availability/partition tolerance (CAP: C prevents simultaneous A
and P)
- High latency for geographically remote clients
- Lower throughput due to enforced serial ordering of transactions

There are probably other reasons that didn't occur to me. Cassandra's great
at doing what it does, but it's certainly not a general purpose
transactional database for all use cases.

-Dave

On Wed, Feb 16, 2011 at 11:19 AM, tijoriwala.ritesh 
tijoriwala.rit...@gmail.com wrote:


 Hi Gaurav,
 Thanks for the reply...I did look at the cages framework and I see that it
 provides some functionality for locking and atomic writes for multiple
 keys.
 My question was that do people rely on these kind of frameworks - if so, is
 cages the only one or are there others as well...and if not, what do they
 do
 to solve these kind of problems...

 Thanks,
 Ritesh
 --
 View this message in context:
 http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Patterns-for-writing-enterprise-applications-on-cassandra-tp6030077p6033138.html
 Sent from the cassandra-u...@incubator.apache.org mailing list archive at
 Nabble.com.



Re: What is the most solid version of Cassandra? No secondary indexes needed.

2011-02-16 Thread Aaron Morton
0.7.2 is just about to be released.

Aaron

On 16/02/2011, at 11:42 AM, buddhasystem potek...@bnl.gov wrote:

 
 Thank you Attila!
 
 We will indeed have a few months of breaking in. I suppose I'll
 keep my fingers crossed and see that 0.7.X is very stable. So I'll
 deploy 0.7.1 -- I will need to apply all the patches, there is no
 cumulative download, is that correct?
 
 
 Attila Babo wrote:
 
 0.6.8 is stable and production ready, the later versions of the 0.6
 branch has issues. No offense, but the 0.7 branch is fairly unstable
 from my experience. I have reproduced all the open bugs with a
 production dataset, even when tried to rebuild it from scratch after a
 complete loss.
 
 If you have a few month before going to production your best bet is
 still 0.7.1 as it will stabilize but the switch between versions is
 painful.
 
 /Attila
 
 
 
 -- 
 View this message in context: 
 http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/What-is-the-most-solid-version-of-Cassandra-No-secondary-indexes-needed-tp6028966p6029622.html
 Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
 Nabble.com.


Re: latest rows

2011-02-16 Thread Alaa Zubaidi

Hi Tyler,

Thanks for you input, but we have a set key that consists of 
name:timestamp that we are using.. and we need to also retrieve the 
oldest data as well..


Thanks

On 2/15/2011 9:07 PM, Tyler Hobbs wrote:

But wouldn't using timestamp as row keys cause conflicts?


Depending on client behavior, yes.  If that's an issue for you, make your
own UUIDs by appending something random or client-specific to the timestamp.



--
Alaa Zubaidi
PDF Solutions, Inc.
333 West San Carlos Street, Suite 700
San Jose, CA 95110  USA
Tel: 408-283-5639 (or 408-280-7900 x5639)
fax: 408-938-6479
email: alaa.zuba...@pdf.com




Re: Cassandra memory consumption

2011-02-16 Thread Victor Kabdebon
Thanks robert, and do you know if there is a way to control the maximum
likely number of memtables ? (I'd like to cap it at 2)

2011/2/16 Robert Coli rc...@digg.com

 On Wed, Feb 16, 2011 at 7:12 AM, Victor Kabdebon
 victor.kabde...@gmail.com wrote:
  Someone please correct me if I am wrong, but I think the overhead you can
  expect is something like :
 

 MemTableThroughtPutInMB * JavaOverheadFudgeFactor * maximum likely
 number of such memtables which might exist at once, due to flushing
 logic

 JavaOverHeadFudgeFactor is at least 2.

 The maximum likely number of such memtables is usually roughly 3
 when considered across an assortment of columnfamilies with different
 write patterns.

   but I don't know when BinaryMemTableThroughputInMb come into account..

 BinaryMemTable options are only considered when using the Binary
 Memtable interface. If you don't know what that is, you're not using
 it.

 =Rob



Re: memory consuption

2011-02-16 Thread Aaron Morton
JVM heap memory is controlled by the settings in conf/Cassandra-env.sh 

Memory mapped files will use additional virtual memory, is controlled in 
conf/Cassandra.yaml disk_access_mode


Aaron

On 17/02/2011, at 2:19 AM, ruslan usifov ruslan.usi...@gmail.com wrote:

 Hello
 
 Here is my output from ps aux:
 
 root   737  0.0  0.0   8940   804 ?S04:34   0:00 nimbus(hdb)
 root   768  0.0  0.0  0 0 ?S04:34   0:00 [flush-202:0]
 root  1368 43.1 70.5 8248976 5935852 ? Sl   04:45 297:47 
 /usr/local/jdk1.6.0_23/bin/java -ea -XX:+UseThreadPriorities -XX:Thr
 cassandra daemon
 root  1633  0.0  0.0  70584  3212 ?Ss   15:49   0:00 sshd: ruslan 
 [priv]
 
 
 Is it normal that cassandra daemon eat so many memory? I look on it around 12 
 hours and memory consumption is only grows.
 
 
 ps: 
 uname -a 
 Linux slv004 2.6.32-311-ec2 #23-Ubuntu SMP Thu Dec 2 11:14:35 UTC 2010 x86_64 
 GNU/Linux
 
 java -version
 java version 1.6.0_23
 Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
 Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)
 
 
 My working machine is 8 CPU 8GB of RAM


Re: Patterns for writing enterprise applications on cassandra

2011-02-16 Thread tijoriwala.ritesh

thanks Dave. So general purpose mechanism would be use RDBMS for data that
requires locking semantics or use something like Cages on top of Cassandra
and then use Cassandra for data mining/high throughput read queries and
writable data that does not require transactions?

Are there any sample applications or open source projects that use Cassandra
and involve some application of transactions? I cannot imagine a fully
functional enterprise application not involving transactions...

Sorry about the long messages but I am trying to learn on how to decide on
design..

Thanks,
Ritesh
-- 
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Patterns-for-writing-enterprise-applications-on-cassandra-tp6030077p6033262.html
Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
Nabble.com.


Re: Patterns for writing enterprise applications on cassandra

2011-02-16 Thread Anthony John
Ritesh,

The gist of Dave's contention is that Casandra adds value in spite of the
lack of transactions. However, that need not mean that it can be used for
Enterprise applications. Transaction semantics needs to be re-imagined
within the capabilities of this new kind of database infrastructure, which
addresses some key challenges in scaling.

In some sense - RDBMSs have spoiled us to expect ACID transactions in the
database. Remember, transaction processing is older than RDBMSs - it was
done on COBOL/mainframes and a bulk of banking transactions - even today -
do not go through ACID supporting database platforms. They still live on the
mainframe.

So it can be done and frameworks like CAGES are showing a way forward. At
the heart of it, there will need to be a Two-Phase commit type protocol
coordinator that sits in front of Cassandra. Of which - one can be sure -
there will be many implementations / best practices in the coming months.

HTH,

-JA

On Wed, Feb 16, 2011 at 1:31 PM, Dave Revell d...@meebo-inc.com wrote:

 Ritesh,

 There don't seem to be any common best practices to do this. I think the
 reason is that by adding transaction semantics on top of Cassandra you're
 throwing away the most important properties of Cassandra. The effects of a
 transaction/locking layer:

 - A centralized performance bottleneck that won't scale linearly
 - Complex failure detection and recovery
 - Reduced availability/partition tolerance (CAP: C prevents simultaneous A
 and P)
 - High latency for geographically remote clients
 - Lower throughput due to enforced serial ordering of transactions

 There are probably other reasons that didn't occur to me. Cassandra's great
 at doing what it does, but it's certainly not a general purpose
 transactional database for all use cases.

 -Dave

 On Wed, Feb 16, 2011 at 11:19 AM, tijoriwala.ritesh 
 tijoriwala.rit...@gmail.com wrote:


 Hi Gaurav,
 Thanks for the reply...I did look at the cages framework and I see that it
 provides some functionality for locking and atomic writes for multiple
 keys.
 My question was that do people rely on these kind of frameworks - if so,
 is
 cages the only one or are there others as well...and if not, what do they
 do
 to solve these kind of problems...

 Thanks,
 Ritesh
 --
 View this message in context:
 http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Patterns-for-writing-enterprise-applications-on-cassandra-tp6030077p6033138.html
 Sent from the cassandra-u...@incubator.apache.org mailing list archive at
 Nabble.com.





Re: Cassandra memory consumption

2011-02-16 Thread Robert Coli
On Wed, Feb 16, 2011 at 11:22 AM, Victor Kabdebon
victor.kabde...@gmail.com wrote:
 Thanks robert, and do you know if there is a way to control the maximum
 likely number of memtables ? (I'd like to cap it at 2)

That likely number of memtables is the number of memtables which :

a) have been created
b) may or may not have hit a flush threshold
c) have not been flushed
d) and therefore are resident in memory

The only way to keep the number of resident memtables at or around 2
is to never write to your node significantly faster than you can
flush. Given other consumers of system I/O like compaction and the
implications of multiple CFs which all contend to flush, this can be
non-trivial in practice. 3 in my calculation here is a safety
ceiling type value, in that you would really have to be pushing your
node or have a small number of high-write CFs to actually have 3
memtables per CF resident across all CFs on a node.

=Rob


Re: rename index

2011-02-16 Thread Aaron Morton
There is no rename, but update column family though the cli or api with just 
the renamed index should work.

The code says it will remove old and add new indexes based on their name.

I'm not sure if the name is used for anything other than identifying the index 
inside the CF. Are the duplicate names causing a problem?

Aaron

On 17/02/2011, at 6:15 AM, Roland Gude roland.g...@yoochoose.com wrote:

 Hi,
 
 unfortiunately i made a copy paste error and created two indexes called 
 “myindex” on different columnfamilies.
 
 What can I do to fix this?
 
  
 
 Below the output from describe keyspace
 
  
 
 ColumnFamily: A
 
   Columns sorted by: org.apache.cassandra.db.marshal.TimeUUIDType
 
   Row cache size / save period: 0.0/0
 
   Key cache size / save period: 20.0/14400
 
  Memtable thresholds: 1.1203125/239/60
 
   GC grace seconds: 864000
 
   Compaction min/max thresholds: 4/32
 
   Read repair chance: 1.0
 
   Column Metadata:
 
 Column Name: --1000--
 
   Validation Class: org.apache.cassandra.db.marshal.UTF8Type
 
   Index Name: MyIndex
 
   Index Type: KEYS
 
 ColumnFamily: B
 
   Columns sorted by: org.apache.cassandra.db.marshal.TimeUUIDType
 
   Row cache size / save period: 0.0/0
 
   Key cache size / save period: 20.0/14400
 
   Memtable thresholds: 1.1203125/239/60
 
   GC grace seconds: 864000
 
   Compaction min/max thresholds: 4/32
 
   Read repair chance: 1.0
 
   Column Metadata:
 
 Column Name: --1000--
 
   Validation Class: org.apache.cassandra.db.marshal.UTF8Type
 
   Index Name: MyIndex
 
   Index Type: KEYS
 
  
 
 --
 
 YOOCHOOSE GmbH
 
  
 
 Roland Gude
 
 Software Engineer
 
  
 
 Im Mediapark 8, 50670 Köln
 
  
 
 +49 221 4544151 (Tel)
 
 +49 221 4544159 (Fax)
 
 +49 171 7894057 (Mobil)
 
  
 
  
 
 Email: roland.g...@yoochoose.com
 
 WWW: www.yoochoose.com
 
  
 
 YOOCHOOSE GmbH
 
 Geschäftsführer: Dr. Uwe Alkemper, Michael Friedmann
 
 Handelsregister: Amtsgericht Köln HRB 65275
 
 Ust-Ident-Nr: DE 264 773 520
 
 Sitz der Gesellschaft: Köln
 
  


Re: Patterns for writing enterprise applications on cassandra

2011-02-16 Thread tijoriwala.ritesh

Thanks a lot Anthony. That does help me think on possible options...
-- 
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Patterns-for-writing-enterprise-applications-on-cassandra-tp6030077p6033316.html
Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
Nabble.com.


create additional secondary index

2011-02-16 Thread Yueyu Fu
Hi,

I'm trying to add a new secondary index on a CF which already have a secondary 
index by calling update column family.

But the CF was left with just the new secondary index and the old index 
disappeared. AFAIK, the only way to keep both indices was to include the old 
secondary index in the update command.

Is this the desired way to add more secondary indices?

Thanks,
Yueyu





Re: latest rows

2011-02-16 Thread Tyler Hobbs
 Thanks for you input, but we have a set key that consists of name:timestamp
 that we are using.. and we need to also retrieve the oldest data as well..


Then you'll need to denormalize and store every row three ways:  timestamp,
inverted timestamp, and normal, if you want to be able to access them in all
three ways using OPP.

I would recommend not using OPP and just using timeline rows.  Here's a
fantastic discussion of OrderPreservingPartitioner vs
RandomPartitionerhttp://ria101.wordpress.com/2010/02/22/cassandra-randompartitioner-vs-orderpreservingpartitioner/
.

-- 
Tyler Hobbs
Software Engineer, DataStax http://datastax.com/
Maintainer of the pycassa http://github.com/pycassa/pycassa Cassandra
Python client library


Re: latest rows

2011-02-16 Thread Matthew Dennis
+1 on avoiding OPP

On Wed, Feb 16, 2011 at 3:27 PM, Tyler Hobbs ty...@datastax.com wrote:


 Thanks for you input, but we have a set key that consists of name:timestamp
 that we are using.. and we need to also retrieve the oldest data as well..


 Then you'll need to denormalize and store every row three ways:  timestamp,
 inverted timestamp, and normal, if you want to be able to access them in all
 three ways using OPP.

 I would recommend not using OPP and just using timeline rows.  Here's a
 fantastic discussion of OrderPreservingPartitioner vs 
 RandomPartitionerhttp://ria101.wordpress.com/2010/02/22/cassandra-randompartitioner-vs-orderpreservingpartitioner/
 .


 --
 Tyler Hobbs
 Software Engineer, DataStax http://datastax.com/
 Maintainer of the pycassa http://github.com/pycassa/pycassa Cassandra
 Python client library




Re: create additional secondary index

2011-02-16 Thread buddhasystem

I sidestep this problem by using a Python script (pycassa-based) where I
configure my CFs. This way, it's reproducible and documented.
-- 
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/create-additional-secondary-index-tp6033574p6033683.html
Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
Nabble.com.


Re: Patterns for writing enterprise applications on cassandra

2011-02-16 Thread Nate McCall
I found the following paper (PDF) very helpful in shaping my thoughts
about what it means to build systems without transactions.

http://www.ics.uci.edu/~cs223/papers/cidr07p15.pdf

LIfe Beyond Distributed Transactions: an Apostate's Opinion by Pat Helland

On Wed, Feb 16, 2011 at 2:00 PM, tijoriwala.ritesh
tijoriwala.rit...@gmail.com wrote:

 Thanks a lot Anthony. That does help me think on possible options...
 --
 View this message in context: 
 http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Patterns-for-writing-enterprise-applications-on-cassandra-tp6030077p6033316.html
 Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
 Nabble.com.



Re: latest rows

2011-02-16 Thread Alaa Zubaidi

Thank you guys ...

On 2/16/2011 1:36 PM, Matthew Dennis wrote:

+1 on avoiding OPP

On Wed, Feb 16, 2011 at 3:27 PM, Tyler Hobbsty...@datastax.com  wrote:


Thanks for you input, but we have a set key that consists of name:timestamp

that we are using.. and we need to also retrieve the oldest data as well..


Then you'll need to denormalize and store every row three ways:  timestamp,
inverted timestamp, and normal, if you want to be able to access them in all
three ways using OPP.

I would recommend not using OPP and just using timeline rows.  Here's a
fantastic discussion of OrderPreservingPartitioner vs 
RandomPartitionerhttp://ria101.wordpress.com/2010/02/22/cassandra-randompartitioner-vs-orderpreservingpartitioner/
.


--
Tyler Hobbs
Software Engineer, DataStaxhttp://datastax.com/
Maintainer of the pycassahttp://github.com/pycassa/pycassa  Cassandra
Python client library




--
Alaa Zubaidi
PDF Solutions, Inc.
333 West San Carlos Street, Suite 700
San Jose, CA 95110  USA
Tel: 408-283-5639 (or 408-280-7900 x5639)
fax: 408-938-6479
email: alaa.zuba...@pdf.com




Commercial support for cassandra

2011-02-16 Thread A J
By any chance are there companies that provide support for Cassandra ?
Consult on setup and configuration and annual support packages ?


Re: Commercial support for cassandra

2011-02-16 Thread Michael Widmann
riptano - contact matt pfeil

mike

2011/2/17 A J s5a...@gmail.com

 By any chance are there companies that provide support for Cassandra ?
 Consult on setup and configuration and annual support packages ?




-- 
bayoda.com - Professional Online Backup Solutions for Small and Medium Sized
Companies


Re: Commercial support for cassandra

2011-02-16 Thread Sal Fuentes
They also offer great training sessions. Have a look at their site for more
information: http://www.datastax.com/about-us


On Wed, Feb 16, 2011 at 3:13 PM, Michael Widmann
michael.widm...@gmail.comwrote:

 riptano - contact matt pfeil

 mike

 2011/2/17 A J s5a...@gmail.com

 By any chance are there companies that provide support for Cassandra ?
 Consult on setup and configuration and annual support packages ?




 --
 bayoda.com - Professional Online Backup Solutions for Small and Medium
 Sized Companies




-- 
Salvador Fuentes Jr.


Re: Patterns for writing enterprise applications on cassandra

2011-02-16 Thread Dave Revell
Re Anthony's statement:

 So it can be done and frameworks like CAGES are showing a way forward. At
 the heart of it, there will need to be a Two-Phase commit type protocol
 coordinator that sits in front of Cassandra. Of which - one can be sure -
there
 will be many implementations / best practices in the coming months.

I disagree. I think anyone who wants transactions should pick a database
that supports them. Bolting a transactional system on top could perhaps be
made to work at great cost if you always used CL ALL for every operation. I
personally don't think it's possible, but I can't actually prove it.

Consider how to enforce:
1) atomicity: you need some kind of undo/redo logging system with crash
recovery to handle partially-executed transactions. This is a lot of tricky
Cassandra-specific code. A locking system isn't good enough.
2) isolation: lock managers are f*^ing hard, especially handling the
failure cases. Performant deadlock detection is difficult. Getting
sufficiently fine-grained locks would require Cassandra-specific code.

I'm trying to argue that these features belong inside the database, and not
bolted on top, so you should use a database that includes them.

Plainly: don't use Cassandra for applications that require
transactions. However, if you can express your app without the need of
transactions, that where Cassandra really shines.

+1 on Nate's recommendation to read the Helland paper.

Contentiously,
Dave

On Wed, Feb 16, 2011 at 2:20 PM, Nate McCall n...@datastax.com wrote:

 I found the following paper (PDF) very helpful in shaping my thoughts
 about what it means to build systems without transactions.

 http://www.ics.uci.edu/~cs223/papers/cidr07p15.pdf

 LIfe Beyond Distributed Transactions: an Apostate's Opinion by Pat
 Helland

 On Wed, Feb 16, 2011 at 2:00 PM, tijoriwala.ritesh
 tijoriwala.rit...@gmail.com wrote:
 
  Thanks a lot Anthony. That does help me think on possible options...
  --
  View this message in context:
 http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Patterns-for-writing-enterprise-applications-on-cassandra-tp6030077p6033316.html
  Sent from the cassandra-u...@incubator.apache.org mailing list archive
 at Nabble.com.
 



Re: Patterns for writing enterprise applications on cassandra

2011-02-16 Thread Anthony John
Dave,

I agree with you, mostly ;) !!

While the reference to 2PC is a tad misplaced here - the idea is that the
paradigm of transactions might have to get redefined or - better still -
broadened to include protocols that the provide similar guarantees in an
eventually consistent dispensation.

Bottom line - just like eventual consistency takes getting used to and
absorbed - we will figure out ways to write applications that require
transactions (per current definition) against a datastore that does not
strictly support it. Again, remember the current notion of transaction
(historically speaking) came after practice of transaction processing.

One can think of many ways to doing this, but no point in bloviating without
having something to show.

HTH,

-JA

On Wed, Feb 16, 2011 at 5:34 PM, Dave Revell d...@meebo-inc.com wrote:

 Re Anthony's statement:

  So it can be done and frameworks like CAGES are showing a way forward.
 At
  the heart of it, there will need to be a Two-Phase commit type protocol
  coordinator that sits in front of Cassandra. Of which - one can be sure -
 there
  will be many implementations / best practices in the coming months.

 I disagree. I think anyone who wants transactions should pick a database
 that supports them. Bolting a transactional system on top could perhaps be
 made to work at great cost if you always used CL ALL for every operation. I
 personally don't think it's possible, but I can't actually prove it.

 Consider how to enforce:
 1) atomicity: you need some kind of undo/redo logging system with crash
 recovery to handle partially-executed transactions. This is a lot of tricky
 Cassandra-specific code. A locking system isn't good enough.
 2) isolation: lock managers are f*^ing hard, especially handling the
 failure cases. Performant deadlock detection is difficult. Getting
 sufficiently fine-grained locks would require Cassandra-specific code.

 I'm trying to argue that these features belong inside the database, and not
 bolted on top, so you should use a database that includes them.

 Plainly: don't use Cassandra for applications that require
 transactions. However, if you can express your app without the need of
 transactions, that where Cassandra really shines.

 +1 on Nate's recommendation to read the Helland paper.

 Contentiously,
 Dave

 On Wed, Feb 16, 2011 at 2:20 PM, Nate McCall n...@datastax.com wrote:

 I found the following paper (PDF) very helpful in shaping my thoughts
 about what it means to build systems without transactions.

 http://www.ics.uci.edu/~cs223/papers/cidr07p15.pdf

 LIfe Beyond Distributed Transactions: an Apostate's Opinion by Pat
 Helland

 On Wed, Feb 16, 2011 at 2:00 PM, tijoriwala.ritesh
 tijoriwala.rit...@gmail.com wrote:
 
  Thanks a lot Anthony. That does help me think on possible options...
  --
  View this message in context:
 http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Patterns-for-writing-enterprise-applications-on-cassandra-tp6030077p6033316.html
  Sent from the cassandra-u...@incubator.apache.org mailing list archive
 at Nabble.com.
 





[RELEASE] 0.7.2

2011-02-16 Thread Eric Evans

CASSANDRA-2165[1] became evident almost as soon as 0.7.1 released, and
it's ugly enough that we didn't want to wait.

Be sure you've read the changelog[2] and release notes[3], and let us
know[4] if you encounter any problems.

Thanks!


[1]: https://issues.apache.org/jira/browse/CASSANDRA-2165
[2]: http://goo.gl/iI7U2 (CHANGES.txt)
[3]: http://goo.gl/b2dCq (NEWS.txt)
[4]: https://issues.apache.org/jira/browse/CASSANDRA

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



indexedslicesQuery class error

2011-02-16 Thread Raoyixuan (Shandy)
I do the range query  by the hector client when the state and birht_date 
columns are both indexed, it show the error:

The method addGtExpression(String,String) in the type 
IndexedSlicesQueryString,String,String is not applicable for the 
arguments(String,long)

The code is as below:

StringSerializer ss = StringSerializer.get();
IndexedSlicesQueryString, String, String indexedSlicesQuery = 
HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ss);
indexedSlicesQuery.setColumnNames(full_name, birth_date, state);
indexedSlicesQuery.addGtExpression(birth_date, 1970L);
indexedSlicesQuery.addEqualsExpression(state, UT);
indexedSlicesQuery.setColumnFamily(users);
indexedSlicesQuery.setStartKey();
QueryResultOrderedRowsString, String, String result = 
indexedSlicesQuery.execute();

华为技术有限公司 Huawei Technologies Co., Ltd.[Company_logo]





Email: raoyix...@huawei.commailto:raoyix...@huawei.com
地址:深圳市龙岗区坂田华为基地 邮编:518129
Huawei Technologies Co., Ltd.
Bantian, Longgang District,Shenzhen 518129, P.R.China
http://www.huawei.com

本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
This e-mail and its attachments contain confidential information from HUAWEI, 
which
is intended only for the person or entity whose address is listed above. Any 
use of the
information contained herein in any way (including, but not limited to, total 
or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify 
the sender by
phone or email immediately and delete it!

inline: image001.jpg

Re: indexedslicesQuery class error

2011-02-16 Thread Roshan Dawrani
That's because in createIndexedSlicesQuery(), you have used SS as the
valueSerializer, and then in addGtExpression(birth_date, 1970L), you pass
a long as the value.

@see:
https://groups.google.com/group/hector-users/browse_thread/thread/520c5332dedfca4a

2011/2/17 Raoyixuan (Shandy) raoyix...@huawei.com

  I do the range query  by the hector client when the state and birht_date
 columns are both indexed, it show the error:



 The method addGtExpression(String,String) in the type
 IndexedSlicesQueryString,String,String is not applicable for the
 arguments(String,long)



 The code is as below:



 StringSerializer ss = StringSerializer.get();
 IndexedSlicesQueryString, String, String indexedSlicesQuery =
 HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ss);
 indexedSlicesQuery.setColumnNames(full_name, birth_date, state);
 indexedSlicesQuery.addGtExpression(birth_date, 1970L);
 indexedSlicesQuery.addEqualsExpression(state, UT);
 indexedSlicesQuery.setColumnFamily(users);
 indexedSlicesQuery.setStartKey();
 QueryResultOrderedRowsString, String, String result =
 indexedSlicesQuery.execute();



 华为技术有限公司 Huawei Technologies Co., Ltd.[image: Company_logo]








 Email: raoyix...@huawei.com
 地址:深圳市龙岗区坂田华为基地 邮编:518129
 Huawei Technologies Co., Ltd.
 Bantian, Longgang District,Shenzhen 518129, P.R.China
 http://www.huawei.com
  --

 本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
 止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
 的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
 This e-mail and its attachments contain confidential information from
 HUAWEI, which
 is intended only for the person or entity whose address is listed above.
 Any use of the
 information contained herein in any way (including, but not limited to,
 total or partial
 disclosure, reproduction, or dissemination) by persons other than the
 intended
 recipient(s) is prohibited. If you receive this e-mail in error, please
 notify the sender by
 phone or email immediately and delete it!






-- 
Roshan
Blog: http://roshandawrani.wordpress.com/
Twitter: @roshandawrani http://twitter.com/roshandawrani
Skype: roshandawrani
image001.jpg

RE: indexedslicesQuery class error

2011-02-16 Thread Raoyixuan (Shandy)
Not really.

I also tried the code as below:
StringSerializer ss = StringSerializer.get();
LongSerializer ls = LongSerializer.get();
IndexedSlicesQueryString, String, Long indexedSlicesQuery = 
HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ls);
indexedSlicesQuery.setColumnNames(full_name, birth_date, state);
indexedSlicesQuery.addGtExpression(birth_date, 1970L);
indexedSlicesQuery.addEqualsExpression(state, UT);
indexedSlicesQuery.setColumnFamily(users);
indexedSlicesQuery.setStartKey();
QueryResultOrderedRowsString, String, Long result = 
indexedSlicesQuery.execute();
It shows the error:
The method addGtEqualEpression(String,Long) in the type 
IndexedSlicesQueryString,String,Long is not applicable for the 
arguments(String,String)



From: Roshan Dawrani [mailto:roshandawr...@gmail.com]
Sent: Thursday, February 17, 2011 10:37 AM
To: user@cassandra.apache.org
Subject: Re: indexedslicesQuery class error

That's because in createIndexedSlicesQuery(), you have used SS as the 
valueSerializer, and then in addGtExpression(birth_date, 1970L), you pass a 
long as the value.

@see: 
https://groups.google.com/group/hector-users/browse_thread/thread/520c5332dedfca4a

2011/2/17 Raoyixuan (Shandy) raoyix...@huawei.commailto:raoyix...@huawei.com
I do the range query  by the hector client when the state and birht_date 
columns are both indexed, it show the error:

The method addGtExpression(String,String) in the type 
IndexedSlicesQueryString,String,String is not applicable for the 
arguments(String,long)

The code is as below:

StringSerializer ss = StringSerializer.get();
IndexedSlicesQueryString, String, String indexedSlicesQuery = 
HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ss);
indexedSlicesQuery.setColumnNames(full_name, birth_date, state);
indexedSlicesQuery.addGtExpression(birth_date, 1970L);
indexedSlicesQuery.addEqualsExpression(state, UT);
indexedSlicesQuery.setColumnFamily(users);
indexedSlicesQuery.setStartKey();
QueryResultOrderedRowsString, String, String result = 
indexedSlicesQuery.execute();

华为技术有限公司 Huawei Technologies Co., Ltd.[Company_logo]




Email: raoyix...@huawei.commailto:raoyix...@huawei.com
地址:深圳市龙岗区坂田华为基地 邮编:518129
Huawei Technologies Co., Ltd.
Bantian, Longgang District,Shenzhen 518129, P.R.China
http://www.huawei.com

本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
This e-mail and its attachments contain confidential information from HUAWEI, 
which
is intended only for the person or entity whose address is listed above. Any 
use of the
information contained herein in any way (including, but not limited to, total 
or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify 
the sender by
phone or email immediately and delete it!




--
Roshan
Blog: http://roshandawrani.wordpress.com/
Twitter: @roshandawranihttp://twitter.com/roshandawrani
Skype: roshandawrani
inline: image001.jpg

Re: indexedslicesQuery class error

2011-02-16 Thread Roshan Dawrani
addGtEqual???

You are still making the same mistake.

You are now saying that your values are going to be long (by passing LS as
the valueSerializer), but in *addEqualsExpression*(), you are passing a
String value.

2011/2/17 Raoyixuan (Shandy) raoyix...@huawei.com

  Not really.



 I also tried the code as below:

 StringSerializer ss = StringSerializer.get();

 LongSerializer ls = LongSerializer.get();
 IndexedSlicesQueryString, String, Long indexedSlicesQuery =
 HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ls);

 indexedSlicesQuery.setColumnNames(full_name, birth_date, state);
 indexedSlicesQuery.addGtExpression(birth_date, 1970L);
 indexedSlicesQuery.addEqualsExpression(state, UT);
 indexedSlicesQuery.setColumnFamily(users);
 indexedSlicesQuery.setStartKey();
 QueryResultOrderedRowsString, String, Long result =
 indexedSlicesQuery.execute();

 It shows the error:

 The method addGtEqualEpression(String,Long) in the type
 IndexedSlicesQueryString,String,Long is not applicable for the
 arguments(String,String)







 *From:* Roshan Dawrani [mailto:roshandawr...@gmail.com]
 *Sent:* Thursday, February 17, 2011 10:37 AM
 *To:* user@cassandra.apache.org
 *Subject:* Re: indexedslicesQuery class error



 That's because in createIndexedSlicesQuery(), you have used SS as the
 valueSerializer, and then in addGtExpression(birth_date, 1970L), you pass
 a long as the value.



 @see:
 https://groups.google.com/group/hector-users/browse_thread/thread/520c5332dedfca4a



 2011/2/17 Raoyixuan (Shandy) raoyix...@huawei.com

  I do the range query  by the hector client when the state and birht_date
 columns are both indexed, it show the error:



 The method addGtExpression(String,String) in the type
 IndexedSlicesQueryString,String,String is not applicable for the
 arguments(String,long)



 The code is as below:



 StringSerializer ss = StringSerializer.get();
 IndexedSlicesQueryString, String, String indexedSlicesQuery =
 HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ss);
 indexedSlicesQuery.setColumnNames(full_name, birth_date, state);
 indexedSlicesQuery.addGtExpression(birth_date, 1970L);
 indexedSlicesQuery.addEqualsExpression(state, UT);
 indexedSlicesQuery.setColumnFamily(users);
 indexedSlicesQuery.setStartKey();
 QueryResultOrderedRowsString, String, String result =
 indexedSlicesQuery.execute();



 华为技术有限公司 Huawei Technologies Co., Ltd.[image: Company_logo]








 Email: raoyix...@huawei.com
 地址:深圳市龙岗区坂田华为基地 邮编:518129
 Huawei Technologies Co., Ltd.
 Bantian, Longgang District,Shenzhen 518129, P.R.China
 http://www.huawei.com
  --

 本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
 止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
 的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
 This e-mail and its attachments contain confidential information from
 HUAWEI, which
 is intended only for the person or entity whose address is listed above.
 Any use of the
 information contained herein in any way (including, but not limited to,
 total or partial
 disclosure, reproduction, or dissemination) by persons other than the
 intended
 recipient(s) is prohibited. If you receive this e-mail in error, please
 notify the sender by
 phone or email immediately and delete it!






 --
 Roshan
 Blog: http://roshandawrani.wordpress.com/
 Twitter: @roshandawrani http://twitter.com/roshandawrani
 Skype: roshandawrani




-- 
Roshan
Blog: http://roshandawrani.wordpress.com/
Twitter: @roshandawrani http://twitter.com/roshandawrani
Skype: roshandawrani
image001.jpg

RE: indexedslicesQuery class error

2011-02-16 Thread Raoyixuan (Shandy)
But my requirement is get the data by birth_date and state , how to achieve it  
by hector client?

From: Roshan Dawrani [mailto:roshandawr...@gmail.com]
Sent: Thursday, February 17, 2011 10:48 AM
To: user@cassandra.apache.org
Subject: Re: indexedslicesQuery class error

addGtEqual???

You are still making the same mistake.

You are now saying that your values are going to be long (by passing LS as the 
valueSerializer), but in addEqualsExpression(), you are passing a String value.
2011/2/17 Raoyixuan (Shandy) raoyix...@huawei.commailto:raoyix...@huawei.com
Not really.

I also tried the code as below:
StringSerializer ss = StringSerializer.get();
LongSerializer ls = LongSerializer.get();
IndexedSlicesQueryString, String, Long indexedSlicesQuery = 
HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ls);

indexedSlicesQuery.setColumnNames(full_name, birth_date, state);
indexedSlicesQuery.addGtExpression(birth_date, 1970L);
indexedSlicesQuery.addEqualsExpression(state, UT);
indexedSlicesQuery.setColumnFamily(users);
indexedSlicesQuery.setStartKey();
QueryResultOrderedRowsString, String, Long result = 
indexedSlicesQuery.execute();
It shows the error:
The method addGtEqualEpression(String,Long) in the type 
IndexedSlicesQueryString,String,Long is not applicable for the 
arguments(String,String)



From: Roshan Dawrani 
[mailto:roshandawr...@gmail.commailto:roshandawr...@gmail.com]
Sent: Thursday, February 17, 2011 10:37 AM
To: user@cassandra.apache.orgmailto:user@cassandra.apache.org
Subject: Re: indexedslicesQuery class error

That's because in createIndexedSlicesQuery(), you have used SS as the 
valueSerializer, and then in addGtExpression(birth_date, 1970L), you pass a 
long as the value.

@see: 
https://groups.google.com/group/hector-users/browse_thread/thread/520c5332dedfca4a

2011/2/17 Raoyixuan (Shandy) raoyix...@huawei.commailto:raoyix...@huawei.com
I do the range query  by the hector client when the state and birht_date 
columns are both indexed, it show the error:

The method addGtExpression(String,String) in the type 
IndexedSlicesQueryString,String,String is not applicable for the 
arguments(String,long)

The code is as below:

StringSerializer ss = StringSerializer.get();
IndexedSlicesQueryString, String, String indexedSlicesQuery = 
HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ss);
indexedSlicesQuery.setColumnNames(full_name, birth_date, state);
indexedSlicesQuery.addGtExpression(birth_date, 1970L);
indexedSlicesQuery.addEqualsExpression(state, UT);
indexedSlicesQuery.setColumnFamily(users);
indexedSlicesQuery.setStartKey();
QueryResultOrderedRowsString, String, String result = 
indexedSlicesQuery.execute();

华为技术有限公司 Huawei Technologies Co., Ltd.[Company_logo]




Email: raoyix...@huawei.commailto:raoyix...@huawei.com
地址:深圳市龙岗区坂田华为基地 邮编:518129
Huawei Technologies Co., Ltd.
Bantian, Longgang District,Shenzhen 518129, P.R.China
http://www.huawei.com

本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
This e-mail and its attachments contain confidential information from HUAWEI, 
which
is intended only for the person or entity whose address is listed above. Any 
use of the
information contained herein in any way (including, but not limited to, total 
or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify 
the sender by
phone or email immediately and delete it!




--
Roshan
Blog: http://roshandawrani.wordpress.com/
Twitter: @roshandawranihttp://twitter.com/roshandawrani
Skype: roshandawrani



--
Roshan
Blog: http://roshandawrani.wordpress.com/
Twitter: @roshandawranihttp://twitter.com/roshandawrani
Skype: roshandawrani
inline: image001.jpg

Re: indexedslicesQuery class error

2011-02-16 Thread Roshan Dawrani
You didn't see the previously given link?

@see:
https://groups.google.com/group/hector-users/browse_thread/thread/520c5332dedfca4a

2011/2/17 Raoyixuan (Shandy) raoyix...@huawei.com

  But my requirement is get the data by birth_date and state , how to
 achieve it  by hector client?



 *From:* Roshan Dawrani [mailto:roshandawr...@gmail.com]
 *Sent:* Thursday, February 17, 2011 10:48 AM

 *To:* user@cassandra.apache.org
 *Subject:* Re: indexedslicesQuery class error



 addGtEqual???



 You are still making the same mistake.



 You are now saying that your values are going to be long (by passing LS as
 the valueSerializer), but in *addEqualsExpression*(), you are passing a
 String value.

 2011/2/17 Raoyixuan (Shandy) raoyix...@huawei.com

 Not really.



 I also tried the code as below:

 StringSerializer ss = StringSerializer.get();

 LongSerializer ls = LongSerializer.get();
 IndexedSlicesQueryString, String, Long indexedSlicesQuery =
 HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ls);


 indexedSlicesQuery.setColumnNames(full_name, birth_date, state);
 indexedSlicesQuery.addGtExpression(birth_date, 1970L);
 indexedSlicesQuery.addEqualsExpression(state, UT);
 indexedSlicesQuery.setColumnFamily(users);
 indexedSlicesQuery.setStartKey();

 QueryResultOrderedRowsString, String, Long result =
 indexedSlicesQuery.execute();

 It shows the error:

 The method addGtEqualEpression(String,Long) in the type
 IndexedSlicesQueryString,String,Long is not applicable for the
 arguments(String,String)







 *From:* Roshan Dawrani [mailto:roshandawr...@gmail.com]
 *Sent:* Thursday, February 17, 2011 10:37 AM
 *To:* user@cassandra.apache.org
 *Subject:* Re: indexedslicesQuery class error



 That's because in createIndexedSlicesQuery(), you have used SS as the
 valueSerializer, and then in addGtExpression(birth_date, 1970L), you pass
 a long as the value.



 @see:
 https://groups.google.com/group/hector-users/browse_thread/thread/520c5332dedfca4a



 2011/2/17 Raoyixuan (Shandy) raoyix...@huawei.com

  I do the range query  by the hector client when the state and birht_date
 columns are both indexed, it show the error:



 The method addGtExpression(String,String) in the type
 IndexedSlicesQueryString,String,String is not applicable for the
 arguments(String,long)



 The code is as below:



 StringSerializer ss = StringSerializer.get();
 IndexedSlicesQueryString, String, String indexedSlicesQuery =
 HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ss);
 indexedSlicesQuery.setColumnNames(full_name, birth_date, state);
 indexedSlicesQuery.addGtExpression(birth_date, 1970L);
 indexedSlicesQuery.addEqualsExpression(state, UT);
 indexedSlicesQuery.setColumnFamily(users);
 indexedSlicesQuery.setStartKey();
 QueryResultOrderedRowsString, String, String result =
 indexedSlicesQuery.execute();



 华为技术有限公司 Huawei Technologies Co., Ltd.[image: Company_logo]








 Email: raoyix...@huawei.com
 地址:深圳市龙岗区坂田华为基地 邮编:518129
 Huawei Technologies Co., Ltd.
 Bantian, Longgang District,Shenzhen 518129, P.R.China
 http://www.huawei.com
  --

 本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
 止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
 的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
 This e-mail and its attachments contain confidential information from
 HUAWEI, which
 is intended only for the person or entity whose address is listed above.
 Any use of the
 information contained herein in any way (including, but not limited to,
 total or partial
 disclosure, reproduction, or dissemination) by persons other than the
 intended
 recipient(s) is prohibited. If you receive this e-mail in error, please
 notify the sender by
 phone or email immediately and delete it!






 --
 Roshan
 Blog: http://roshandawrani.wordpress.com/
 Twitter: @roshandawrani http://twitter.com/roshandawrani
 Skype: roshandawrani




 --
 Roshan
 Blog: http://roshandawrani.wordpress.com/
 Twitter: @roshandawrani http://twitter.com/roshandawrani
 Skype: roshandawrani

image001.jpg

RE: indexedslicesQuery class error

2011-02-16 Thread Raoyixuan (Shandy)
I modify it as below
StringSerializer ss = StringSerializer.get();
IndexedSlicesQueryString, String, String indexedSlicesQuery = 
HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ss);
indexedSlicesQuery.setColumnNames(full_name, birth_date, state);
indexedSlicesQuery.addGtExpression(birth_date, longSerializer.toByteBuffer 
(1970L));
indexedSlicesQuery.addEqualsExpression(state, 
stringSerializer.toByteBuffer(UT));
indexedSlicesQuery.setColumnFamily(users);
indexedSlicesQuery.setStartKey();
QueryResultOrderedRowsString, String, String result = 
indexedSlicesQuery.execute();
It shows the error

The method addGtExpression(String,String) in the type 
IndexedSlicesQueryString,String,String is not applicable for the 
arguments(String,ByteBuffer)

From: Roshan Dawrani [mailto:roshandawr...@gmail.com]
Sent: Thursday, February 17, 2011 10:54 AM
To: user@cassandra.apache.org
Subject: Re: indexedslicesQuery class error

You didn't see the previously given link?

@see: 
https://groups.google.com/group/hector-users/browse_thread/thread/520c5332dedfca4a
2011/2/17 Raoyixuan (Shandy) raoyix...@huawei.commailto:raoyix...@huawei.com
But my requirement is get the data by birth_date and state , how to achieve it  
by hector client?

From: Roshan Dawrani 
[mailto:roshandawr...@gmail.commailto:roshandawr...@gmail.com]
Sent: Thursday, February 17, 2011 10:48 AM

To: user@cassandra.apache.orgmailto:user@cassandra.apache.org
Subject: Re: indexedslicesQuery class error

addGtEqual???

You are still making the same mistake.

You are now saying that your values are going to be long (by passing LS as the 
valueSerializer), but in addEqualsExpression(), you are passing a String value.
2011/2/17 Raoyixuan (Shandy) raoyix...@huawei.commailto:raoyix...@huawei.com
Not really.

I also tried the code as below:
StringSerializer ss = StringSerializer.get();
LongSerializer ls = LongSerializer.get();
IndexedSlicesQueryString, String, Long indexedSlicesQuery = 
HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ls);

indexedSlicesQuery.setColumnNames(full_name, birth_date, state);
indexedSlicesQuery.addGtExpression(birth_date, 1970L);
indexedSlicesQuery.addEqualsExpression(state, UT);
indexedSlicesQuery.setColumnFamily(users);
indexedSlicesQuery.setStartKey();
QueryResultOrderedRowsString, String, Long result = 
indexedSlicesQuery.execute();
It shows the error:
The method addGtEqualEpression(String,Long) in the type 
IndexedSlicesQueryString,String,Long is not applicable for the 
arguments(String,String)



From: Roshan Dawrani 
[mailto:roshandawr...@gmail.commailto:roshandawr...@gmail.com]
Sent: Thursday, February 17, 2011 10:37 AM
To: user@cassandra.apache.orgmailto:user@cassandra.apache.org
Subject: Re: indexedslicesQuery class error

That's because in createIndexedSlicesQuery(), you have used SS as the 
valueSerializer, and then in addGtExpression(birth_date, 1970L), you pass a 
long as the value.

@see: 
https://groups.google.com/group/hector-users/browse_thread/thread/520c5332dedfca4a

2011/2/17 Raoyixuan (Shandy) raoyix...@huawei.commailto:raoyix...@huawei.com
I do the range query  by the hector client when the state and birht_date 
columns are both indexed, it show the error:

The method addGtExpression(String,String) in the type 
IndexedSlicesQueryString,String,String is not applicable for the 
arguments(String,long)

The code is as below:

StringSerializer ss = StringSerializer.get();
IndexedSlicesQueryString, String, String indexedSlicesQuery = 
HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ss);
indexedSlicesQuery.setColumnNames(full_name, birth_date, state);
indexedSlicesQuery.addGtExpression(birth_date, 1970L);
indexedSlicesQuery.addEqualsExpression(state, UT);
indexedSlicesQuery.setColumnFamily(users);
indexedSlicesQuery.setStartKey();
QueryResultOrderedRowsString, String, String result = 
indexedSlicesQuery.execute();

华为技术有限公司 Huawei Technologies Co., Ltd.[Company_logo]




Email: raoyix...@huawei.commailto:raoyix...@huawei.com
地址:深圳市龙岗区坂田华为基地 邮编:518129
Huawei Technologies Co., Ltd.
Bantian, Longgang District,Shenzhen 518129, P.R.China
http://www.huawei.com

本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
This e-mail and its attachments contain confidential information from HUAWEI, 
which
is intended only for the person or entity whose address is listed above. Any 
use of the
information contained herein in any way (including, but not limited to, total 
or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify 
the sender by
phone or email immediately and delete it!




--
Roshan
Blog: http://roshandawrani.wordpress.com/
Twitter: @roshandawranihttp://twitter.com/roshandawrani
Skype: roshandawrani



--
Roshan
Blog: http://roshandawrani.wordpress.com/
Twitter: @roshandawranihttp://twitter.com/roshandawrani

RE: indexedslicesQuery class error

2011-02-16 Thread Raoyixuan (Shandy)
Thanks .

I change ss to bytebufferserializer. It works fine.

From: Raoyixuan (Shandy) [mailto:raoyix...@huawei.com]
Sent: Thursday, February 17, 2011 11:16 AM
To: user@cassandra.apache.org
Subject: RE: indexedslicesQuery class error

I modify it as below
StringSerializer ss = StringSerializer.get();
IndexedSlicesQueryString, String, String indexedSlicesQuery = 
HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ss);
indexedSlicesQuery.setColumnNames(full_name, birth_date, state);
indexedSlicesQuery.addGtExpression(birth_date, longSerializer.toByteBuffer 
(1970L));
indexedSlicesQuery.addEqualsExpression(state, 
stringSerializer.toByteBuffer(UT));
indexedSlicesQuery.setColumnFamily(users);
indexedSlicesQuery.setStartKey();
QueryResultOrderedRowsString, String, String result = 
indexedSlicesQuery.execute();
It shows the error

The method addGtExpression(String,String) in the type 
IndexedSlicesQueryString,String,String is not applicable for the 
arguments(String,ByteBuffer)

From: Roshan Dawrani [mailto:roshandawr...@gmail.com]
Sent: Thursday, February 17, 2011 10:54 AM
To: user@cassandra.apache.org
Subject: Re: indexedslicesQuery class error

You didn't see the previously given link?

@see: 
https://groups.google.com/group/hector-users/browse_thread/thread/520c5332dedfca4a
2011/2/17 Raoyixuan (Shandy) raoyix...@huawei.commailto:raoyix...@huawei.com
But my requirement is get the data by birth_date and state , how to achieve it  
by hector client?

From: Roshan Dawrani 
[mailto:roshandawr...@gmail.commailto:roshandawr...@gmail.com]
Sent: Thursday, February 17, 2011 10:48 AM

To: user@cassandra.apache.orgmailto:user@cassandra.apache.org
Subject: Re: indexedslicesQuery class error

addGtEqual???

You are still making the same mistake.

You are now saying that your values are going to be long (by passing LS as the 
valueSerializer), but in addEqualsExpression(), you are passing a String value.
2011/2/17 Raoyixuan (Shandy) raoyix...@huawei.commailto:raoyix...@huawei.com
Not really.

I also tried the code as below:
StringSerializer ss = StringSerializer.get();
LongSerializer ls = LongSerializer.get();
IndexedSlicesQueryString, String, Long indexedSlicesQuery = 
HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ls);

indexedSlicesQuery.setColumnNames(full_name, birth_date, state);
indexedSlicesQuery.addGtExpression(birth_date, 1970L);
indexedSlicesQuery.addEqualsExpression(state, UT);
indexedSlicesQuery.setColumnFamily(users);
indexedSlicesQuery.setStartKey();
QueryResultOrderedRowsString, String, Long result = 
indexedSlicesQuery.execute();
It shows the error:
The method addGtEqualEpression(String,Long) in the type 
IndexedSlicesQueryString,String,Long is not applicable for the 
arguments(String,String)



From: Roshan Dawrani 
[mailto:roshandawr...@gmail.commailto:roshandawr...@gmail.com]
Sent: Thursday, February 17, 2011 10:37 AM
To: user@cassandra.apache.orgmailto:user@cassandra.apache.org
Subject: Re: indexedslicesQuery class error

That's because in createIndexedSlicesQuery(), you have used SS as the 
valueSerializer, and then in addGtExpression(birth_date, 1970L), you pass a 
long as the value.

@see: 
https://groups.google.com/group/hector-users/browse_thread/thread/520c5332dedfca4a

2011/2/17 Raoyixuan (Shandy) raoyix...@huawei.commailto:raoyix...@huawei.com
I do the range query  by the hector client when the state and birht_date 
columns are both indexed, it show the error:

The method addGtExpression(String,String) in the type 
IndexedSlicesQueryString,String,String is not applicable for the 
arguments(String,long)

The code is as below:

StringSerializer ss = StringSerializer.get();
IndexedSlicesQueryString, String, String indexedSlicesQuery = 
HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ss);
indexedSlicesQuery.setColumnNames(full_name, birth_date, state);
indexedSlicesQuery.addGtExpression(birth_date, 1970L);
indexedSlicesQuery.addEqualsExpression(state, UT);
indexedSlicesQuery.setColumnFamily(users);
indexedSlicesQuery.setStartKey();
QueryResultOrderedRowsString, String, String result = 
indexedSlicesQuery.execute();

华为技术有限公司 Huawei Technologies Co., Ltd.[Company_logo]




Email: raoyix...@huawei.commailto:raoyix...@huawei.com
地址:深圳市龙岗区坂田华为基地 邮编:518129
Huawei Technologies Co., Ltd.
Bantian, Longgang District,Shenzhen 518129, P.R.China
http://www.huawei.com

本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
This e-mail and its attachments contain confidential information from HUAWEI, 
which
is intended only for the person or entity whose address is listed above. Any 
use of the
information contained herein in any way (including, but not limited to, total 
or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify 
the sender by
phone or email immediately and delete it!




--
Roshan

Re: NegativeArraySizeException with 0.7.2

2011-02-16 Thread Nate McCall
See the following mail thread:
http://www.mail-archive.com/user@cassandra.apache.org/msg10183.html

In short, running nodetool compact should clear it up.

On Wed, Feb 16, 2011 at 11:23 PM, Casey Deccio ca...@deccio.net wrote:
 I recently upgraded to 0.7.2 from 0.7.0, and now when I run my
 multi-threaded app (using python/pycassa/thrift) I'm getting the following
 NegativeArraySizeException.  The traceback is below:

 ERROR 21:08:33,187 Fatal exception in thread Thread[ReadStage:219,5,main]
 java.lang.RuntimeException: java.lang.NegativeArraySizeException
     at
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:34)
     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)
 Caused by: java.lang.NegativeArraySizeException
     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:108)
     at
 org.apache.cassandra.db.columniterator.SSTableNamesIterator.read(SSTableNamesIterator.java:106)
     at
 org.apache.cassandra.db.columniterator.SSTableNamesIterator.init(SSTableNamesIterator.java:71)
     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:1275)
     at
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1167)
     at
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1095)
     at org.apache.cassandra.db.Table.getRow(Table.java:384)
     at
 org.apache.cassandra.db.SliceByNamesReadCommand.getRow(SliceByNamesReadCommand.java:60)
     at
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:473)
     at
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
     ... 3 more

 Any ideas?

 As a side note, is there a way to revert to 0.7.0 keeping the cluster in
 tact?

 Casey



Re: NegativeArraySizeException with 0.7.2

2011-02-16 Thread Casey Deccio
On Wed, Feb 16, 2011 at 10:01 PM, Nate McCall n...@datastax.com wrote:

 See the following mail thread:
 http://www.mail-archive.com/user@cassandra.apache.org/msg10183.html

 In short, running nodetool compact should clear it up.


Thanks for the pointer!  I ran nodetool compact on my nodes, and so far it's
looking good...

Casey


frequent client exceptions on 0.7.0

2011-02-16 Thread Andy Skalet
Hello,

We were occasionally experiencing client exceptions with 0.6.3, so we
upgraded to 0.7.0 a couple weeks ago, but unfortunately we now get
more client exceptions, and more frequently.  Also, occasionally
nodetool ring will show a node Down even though cassandra is still
running and the node will be up again shortly.  We run nodetool ring
every half hour or so for monitoring, otherwise we probably would not
have noticed.

I'm trying to determine whether we are hitting some bugs, just don't
have enough hardware for our application, or have made some error in
configuration.  I would happy to provide any more information or run
tests to narrow down the problem.  Below are some exceptions we see
several distinct times every day:

1)

 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/columnfamily.py,
line 430, in get
   self._rcl(read_consistency_level))
 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/pool.py,
line 397, in new_f
   result = getattr(super(ConnectionWrapper, self), f.__name__)(*args, **kwargs)
 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/cassandra/Cassandra.py,
line 432, in get_slice
   return self.recv_get_slice()
 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/cassandra/Cassandra.py,
line 446, in recv_get_slice
   (fname, mtype, rseqid) = self._iprot.readMessageBegin()
 File 
/usr/local/lib/python2.6/dist-packages/Thrift-0.5.0-py2.6-linux-i686.egg/thrift/protocol/TBinaryProtocol.py,
line 126, in readMessageBegin
   sz = self.readI32()
 File 
/usr/local/lib/python2.6/dist-packages/Thrift-0.5.0-py2.6-linux-i686.egg/thrift/protocol/TBinaryProtocol.py,
line 203, in readI32
   buff = self.trans.readAll(4)
 File 
/usr/local/lib/python2.6/dist-packages/Thrift-0.5.0-py2.6-linux-i686.egg/thrift/transport/TTransport.py,
line 63, in readAll
   raise EOFError()
EOFError

2)

File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/columnfamily.py,
line 710, in insert
   res = self._tlocal.client.insert(key, cp, column,
self._wcl(write_consistency_level))
 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/pool.py,
line 421, in new_f
   return new_f(self, *args, **kwargs)
 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/pool.py,
line 421, in new_f
   return new_f(self, *args, **kwargs)
 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/pool.py,
line 421, in new_f
   return new_f(self, *args, **kwargs)
 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/pool.py,
line 406, in new_f
   raise MaximumRetryException('Retried %d times' % self._retry_count)
MaximumRetryException: Retried 4 times

3)

   return ColumnFamily(client, bucket_name)
 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/columnfamily.py,
line 122, in __init__
   self._obtain_connection()
 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/columnfamily.py,
line 359, in _obtain_connection
   self._tlocal.client = self.pool.get()
 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/pool.py,
line 724, in get
   conn = self._create_connection()
 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/pool.py,
line 122, in _create_connection
   wrapper = self._get_new_wrapper(server)
 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/pool.py,
line 640, in _get_new_wrapper
   credentials=self.credentials)
 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/pool.py,
line 317, in __init__
   super(ConnectionWrapper, self).__init__(*args, **kwargs)
 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/connection.py,
line 38, in __init__
   server_api_version = int(self.describe_version().split('.', 1)[0])
 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/cassandra/Cassandra.py,
line 947, in describe_version
   return self.recv_describe_version()
 File 
/usr/local/lib/python2.6/dist-packages/pycassa-1.0.4-py2.6.egg/pycassa/cassandra/Cassandra.py,
line 957, in recv_describe_version
   (fname, mtype, rseqid) = self._iprot.readMessageBegin()
 File 
/usr/local/lib/python2.6/dist-packages/Thrift-0.5.0-py2.6-linux-i686.egg/thrift/protocol/TBinaryProtocol.py,
line 126, in readMessageBegin
   sz = self.readI32()
 File 
/usr/local/lib/python2.6/dist-packages/Thrift-0.5.0-py2.6-linux-i686.egg/thrift/protocol/TBinaryProtocol.py,
line 203, in readI32
   buff = self.trans.readAll(4)
 File 
/usr/local/lib/python2.6/dist-packages/Thrift-0.5.0-py2.6-linux-i686.egg/thrift/transport/TTransport.py,
line 58, in readAll
   chunk = self.read(sz-have)
 File 
/usr/local/lib/python2.6/dist-packages/Thrift-0.5.0-py2.6-linux-i686.egg/thrift/transport/TTransport.py,
line 272, in read
   self.readFrame()
 File