Re: Cassandra Supports multi tenant or not

2012-06-10 Thread Toru Inoko
please refer following url, if you'd like to know about multi-tenancy with  
Cassandra.

http://wiki.apache.org/cassandra/MultiTenant

And, Hector supports multi tenant datamodel on cassandra.
https://github.com/hector-client/hector/wiki/Virtual-Keyspaces

Recently, I have disscussed about multi tenant datamodel on cassandra.  
please refere following archive.

http://mail-archives.apache.org/mod_mbox/cassandra-user/201206.mbox/browser

Toru.

On Mon, 11 Jun 2012 14:45:32 +0900, MOHD ARSHAD SALEEM  
 wrote:



Hi All,

I wanted to know cassandra supports multi tenant features or not.
if cassandra not supported multi tenant is there any other  
database which supports multi tenant .


Regards
Arshad



--
---
SCSK Corp.

Toru Inoko
tel   : 03-6438-3544
mail  : in...@ms.scsk.jp
---



Effective ownership on both nodes 0 %

2012-06-10 Thread Prakrati Agrawal
Dear all

I have a Cassandra cluster with 2 nodes.
I was trying to increase the replication factor of keyspace in Cassandra to 2. 
I did the following steps:
UPDATE KEYSPACE demo WITH strategy_options = {DC1:2,DC2:2}; on both the nodes
Then I ran the nodetool repair on both the nodes
Then I ran my Hector code to count the number of rows and columns in the 
database.
I get the following error: Unavailable Exception
Also when I run the command
./nodetool -h ip_address ring
I found that both nodes ownership is 0 %. Please tell me how should I fix that.

Thanks and Regards
Prakrati





This email message may contain proprietary, private and confidential 
information. The information transmitted is intended only for the person(s) or 
entities to which it is addressed. Any review, retransmission, dissemination or 
other use of, or taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is prohibited and may be 
illegal. If you received this in error, please contact the sender and delete 
the message from your system.

Mu Sigma takes all reasonable steps to ensure that its electronic 
communications are free from viruses. However, given Internet accessibility, 
the Company cannot accept liability for any virus introduced by this e-mail or 
any attachment and you are advised to use up-to-date virus checking software.


Re: Setting column to null

2012-06-10 Thread Roshni Rajagopal
Would you want to view data like this "there was a key, which had this column , 
but now it does not have any value as of this time."

Unless you specifically want this information, I believe you should just delete 
the column, rather than have an alternate value for NULL or create a composite 
column.

Because in cassandra that’s the way deletion is dealt with, putting NULLs is 
the way we deal with it in RDBMS because we have a fixed number of columns 
which always have to have some value, even if its NULL, and we have to have the 
same set of columns for every row.
In Cassandara, we can delete the column, and in most scenarios that’s what we 
should do, unless we specifically want to preserve some history that this 
column was turned null at this time…Each row can have different columns.

Regards,
Roshni

From: Edward Capriolo mailto:edlinuxg...@gmail.com>>
Reply-To: "user@cassandra.apache.org" 
mailto:user@cassandra.apache.org>>
To: "user@cassandra.apache.org" 
mailto:user@cassandra.apache.org>>
Subject: Re: Setting column to null

Your best bet is to define the column as a composite column where one part 
represents is null and the other part is the data.

On Friday, June 8, 2012, shashwat shriparv 
mailto:dwivedishash...@gmail.com>> wrote:
> What you can do is you can define some specific variable like "NULLDATA" some 
> thing like that to update in columns that does have value
>
>
> On Fri, Jun 8, 2012 at 11:58 PM, aaron morton 
> mailto:aa...@thelastpickle.com>> wrote:
>
> You don't nee to set columns to null, delete the column instead.
> Cheers
> -
> Aaron Morton
> Freelance Developer
> @aaronmorton
> http://www.thelastpickle.com
> On 8/06/2012, at 9:34 AM, Leonid Ilyevsky wrote:
>
> Is it possible to explicitly set a column value to null?
>
> I see that if insert statement does not include a specific column, that 
> column comes up as null (assuming we are creating a record with new unique 
> key).
> But if we want to update a record, how we set it to null?
>
> Another situation is when I use prepared cql3 statement (in Java) and send 
> parameters when I execute it. If I want to leave some column unassigned, I 
> need a special statement without that column.
> What I would like is, prepare one statement including all columns, and then 
> be able to set some of them to null. I tried to set corresponding ByteBuffer 
> parameter to null, obviously got an exception.
> 
> This email, along with any attachments, is confidential and may be legally 
> privileged or otherwise protected from disclosure. Any unauthorized 
> dissemination, copying or use of the contents of this email is strictly 
> prohibited and may be in violation of law. If you are not the intended 
> recipient, any disclosure, copying, forwarding or distribution of this email 
> is strictly prohibited and this email and any attachments should be deleted 
> immediately. This email and any attachments do not constitute an offer to 
> sell or a solicitation of an offer to purchase any interest in any investment 
> vehicle sponsored by Moon Capital Management LP (“Moon Capital”). Moon 
> Capital does not provide legal, accounting or tax advice. Any statement 
> regarding legal, accounting or tax matters was not intended or written to be 
> relied upon by any person as advice. Moon Capital does not waive 
> confidentiality or privilege as a result of this email.
>
>
>
> --
>
>
> ∞
>
> Shashwat Shriparv
>
>

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


RE: Out of memory error

2012-06-10 Thread Prakrati Agrawal
The version is 1.1.0

Prakrati Agrawal | Developer - Big Data(I&D)| 9731648376 | www.mu-sigma.com

From: Dave Brosius [mailto:dbros...@mebigfatguy.com]
Sent: Monday, June 11, 2012 10:07 AM
To: user@cassandra.apache.org
Subject: Re: Out of memory error

What version of Cassandra?

might be related to https://issues.apache.org/jira/browse/CASSANDRA-4098



On 06/11/2012 12:07 AM, Prakrati Agrawal wrote:
Sorry

I ran list columnFamilyName; and it threw this error.

Thanks and Regards
Prakrati

From: aaron morton [mailto:aa...@thelastpickle.com]
Sent: Saturday, June 09, 2012 12:18 AM
To: user@cassandra.apache.org
Subject: Re: Out of memory error

When you ask a question please include the query or function call you have 
made. An any other information that would help someone understand what you are 
trying to do.

Also, please list things you have already tried to work around the problem.

Cheers

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

On 8/06/2012, at 9:04 PM, Prakrati Agrawal wrote:



Dear all,

When I try to list the entire data in my column family I get the following 
error:

Using default limit of 100
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at 
org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:140)
at 
org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)
at 
org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at 
org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
at 
org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
at 
org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
at 
org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
at 
org.apache.cassandra.thrift.Cassandra$Client.recv_get_range_slices(Cassandra.java:683)
at 
org.apache.cassandra.thrift.Cassandra$Client.get_range_slices(Cassandra.java:667)
at 
org.apache.cassandra.cli.CliClient.executeList(CliClient.java:1373)
at 
org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:264)
at 
org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.java:219)
at org.apache.cassandra.cli.CliMain.main(CliMain.java:346)

Please help me

Thanks and Regards
Prakrati




This email message may contain proprietary, private and confidential 
information. The information transmitted is intended only for the person(s) or 
entities to which it is addressed. Any review, retransmission, dissemination or 
other use of, or taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is prohibited and may be 
illegal. If you received this in error, please contact the sender and delete 
the message from your system.

Mu Sigma takes all reasonable steps to ensure that its electronic 
communications are free from viruses. However, given Internet accessibility, 
the Company cannot accept liability for any virus introduced by this e-mail or 
any attachment and you are advised to use up-to-date virus checking software.



This email message may contain proprietary, private and confidential 
information. The information transmitted is intended only for the person(s) or 
entities to which it is addressed. Any review, retransmission, dissemination or 
other use of, or taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is prohibited and may be 
illegal. If you received this in error, please contact the sender and delete 
the message from your system.

Mu Sigma takes all reasonable steps to ensure that its electronic 
communications are free from viruses. However, given Internet accessibility, 
the Company cannot accept liability for any virus introduced by this e-mail or 
any attachment and you are advised to use up-to-date virus checking software.



This email message may contain proprietary, private and confidential 
information. The information transmitted is intended only for the person(s) or 
entities to which it is addressed. Any review, retransmission, dissemination or 
other use of, or taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is prohibited and may be 
illegal. If you received this in error, please contact the sender and delete 
the message from your system.

Mu Sigma takes all reasonable steps to ensure that its electronic 
communications are free from viruses. However, given Internet accessibility, 
the Company cannot accept liability for any virus introduced by this e-mail or 
any 

Re: Out of memory error

2012-06-10 Thread Dave Brosius

What version of Cassandra?

might be related to https://issues.apache.org/jira/browse/CASSANDRA-4098



On 06/11/2012 12:07 AM, Prakrati Agrawal wrote:


Sorry

I ran list /columnFamilyName/; and it threw this error.

Thanks and Regards

Prakrati

*From:*aaron morton [mailto:aa...@thelastpickle.com]
*Sent:* Saturday, June 09, 2012 12:18 AM
*To:* user@cassandra.apache.org
*Subject:* Re: Out of memory error

When you ask a question please include the query or function call you 
have made. An any other information that would help someone understand 
what you are trying to do.


Also, please list things you have already tried to work around the 
problem.


Cheers

-

Aaron Morton

Freelance Developer

@aaronmorton

http://www.thelastpickle.com

On 8/06/2012, at 9:04 PM, Prakrati Agrawal wrote:



Dear all,

When I try to list the entire data in my column family I get the 
following error:


Using default limit of 100

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

at 
org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:140)


at 
org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)


at 
org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)


at 
org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)


at 
org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)


at 
org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)


at 
org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)


at 
org.apache.cassandra.thrift.Cassandra$Client.recv_get_range_slices(Cassandra.java:683)


at 
org.apache.cassandra.thrift.Cassandra$Client.get_range_slices(Cassandra.java:667)


at 
org.apache.cassandra.cli.CliClient.executeList(CliClient.java:1373)


at 
org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:264)


at 
org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.java:219)


at org.apache.cassandra.cli.CliMain.main(CliMain.java:346)

Please help me

Thanks and Regards

Prakrati



This email message may contain proprietary, private and confidential 
information. The information transmitted is intended only for the 
person(s) or entities to which it is addressed. Any review, 
retransmission, dissemination or other use of, or taking of any action 
in reliance upon, this information by persons or entities other than 
the intended recipient is prohibited and may be illegal. If you 
received this in error, please contact the sender and delete the 
message from your system.


Mu Sigma takes all reasonable steps to ensure that its electronic 
communications are free from viruses. However, given Internet 
accessibility, the Company cannot accept liability for any virus 
introduced by this e-mail or any attachment and you are advised to use 
up-to-date virus checking software.




This email message may contain proprietary, private and confidential 
information. The information transmitted is intended only for the 
person(s) or entities to which it is addressed. Any review, 
retransmission, dissemination or other use of, or taking of any action 
in reliance upon, this information by persons or entities other than 
the intended recipient is prohibited and may be illegal. If you 
received this in error, please contact the sender and delete the 
message from your system.


Mu Sigma takes all reasonable steps to ensure that its electronic 
communications are free from viruses. However, given Internet 
accessibility, the Company cannot accept liability for any virus 
introduced by this e-mail or any attachment and you are advised to use 
up-to-date virus checking software.




RE: Out of memory error

2012-06-10 Thread Prakrati Agrawal
Sorry

I ran list columnFamilyName; and it threw this error.

Thanks and Regards
Prakrati

From: aaron morton [mailto:aa...@thelastpickle.com]
Sent: Saturday, June 09, 2012 12:18 AM
To: user@cassandra.apache.org
Subject: Re: Out of memory error

When you ask a question please include the query or function call you have 
made. An any other information that would help someone understand what you are 
trying to do.

Also, please list things you have already tried to work around the problem.

Cheers

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

On 8/06/2012, at 9:04 PM, Prakrati Agrawal wrote:


Dear all,

When I try to list the entire data in my column family I get the following 
error:

Using default limit of 100
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at 
org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:140)
at 
org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)
at 
org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at 
org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
at 
org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
at 
org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
at 
org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
at 
org.apache.cassandra.thrift.Cassandra$Client.recv_get_range_slices(Cassandra.java:683)
at 
org.apache.cassandra.thrift.Cassandra$Client.get_range_slices(Cassandra.java:667)
at 
org.apache.cassandra.cli.CliClient.executeList(CliClient.java:1373)
at 
org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:264)
at 
org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.java:219)
at org.apache.cassandra.cli.CliMain.main(CliMain.java:346)

Please help me

Thanks and Regards
Prakrati




This email message may contain proprietary, private and confidential 
information. The information transmitted is intended only for the person(s) or 
entities to which it is addressed. Any review, retransmission, dissemination or 
other use of, or taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is prohibited and may be 
illegal. If you received this in error, please contact the sender and delete 
the message from your system.

Mu Sigma takes all reasonable steps to ensure that its electronic 
communications are free from viruses. However, given Internet accessibility, 
the Company cannot accept liability for any virus introduced by this e-mail or 
any attachment and you are advised to use up-to-date virus checking software.



This email message may contain proprietary, private and confidential 
information. The information transmitted is intended only for the person(s) or 
entities to which it is addressed. Any review, retransmission, dissemination or 
other use of, or taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is prohibited and may be 
illegal. If you received this in error, please contact the sender and delete 
the message from your system.

Mu Sigma takes all reasonable steps to ensure that its electronic 
communications are free from viruses. However, given Internet accessibility, 
the Company cannot accept liability for any virus introduced by this e-mail or 
any attachment and you are advised to use up-to-date virus checking software.


Composite columns: CLI or CQL?

2012-06-10 Thread Georg Köster
Dear all,

I'm really excited about Cassandra's peer-to-peer architecture and sorted
values.

Currently I'm blocked in trials: I cannot insert longs into 'val' in:

create columnfamily entries (

id varchar,

va varchar,

ts bigint,

val bigint,

PRIMARY KEY (id, va, ts)

);
I get validation errors (String didn't validate). I can insert strings as
much as I like. With int it seems to work, too.

Did I make a mistake? The error is somewhat spurious, very seldomly it goes
through, but I cannot really reproduce that situation. Another question is
of course if I can switch validation off for the time it's still buggy?

Since I don't get to trials: How fast is inserting a new column into the
middle of a 100,000 columns row anyways?

Cheers,
Georg


Re: Can't delete from SCF wide row

2012-06-10 Thread Rustam Aliyev

Hi Aaron,

Thanks for reply. I did some more tests and it looks like the problem is 
not in deletes/writes, it rather in reads (I do read before deleting).


It turns out that problem was in another CF which had wide row of 1.2GB 
and row cache. Cassandra tries to read this row into cache and becomes 
unresponsive. Disabling row cache on this CF helped to read through this 
row and perform cleanup. It seems that Cassandra reads into cache all 
columns, even those which were deleted (w/ tombstones) but not GCed.


Seems that CASSANDRA-2864 
 and 
CASSANDRA-1956  
opened to address this problem.


Best,
Rustam.


On 04/06/2012 19:41, aaron morton wrote:

Delete is a no look write operation, like normal writes. So it should not be 
directly causing a lot of memory allocation.

It may be causing a lot of compaction activity, which due to the wide row may 
be throwing up lots of GC.

Try the following to get through the deletions:

* disable compaction by setting min_compaction_level and max_compaction_level 
to 0 (via nodetool on current versions)

Once you have finished compaction
* lower the in_memory_compaction_limit in the yaml.
* set concurrent_compactions to 2 in the yaml
* enable compaction again

Once everything has settled down restore the in_memory_compaction_limit and 
concurrent_compactions

Hope that helps.

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

On 2/06/2012, at 7:53 AM, Rustam Aliyev wrote:


Hi all,

I have SCF with ~250K rows. One of these rows is relatively large - it's a wide 
row (according to compaction logs) containing ~100.000 super columns and 
overall size of 1GB. Each super column has average size of 10K and ~10 sub 
columns.

When I'm trying to delete ~90% of the columns in this particular row, Cassandra 
nodes which own this wide row (3 of 5, RF=3) quickly run out of the heap space. 
See logs from one of the hosts here:

http://pastebin.com/raw.php?i=kwn7b3rP

After that, all 3 nodes start flapping up/down and GC messages (like the one in the 
bottom of the pastebin above) appearing in the logs. Cassandra never repairs from this 
mode and the only way out if to "kill -9" and start again. On IRC it was 
suggested that it enters GC death spiral.

I tried to throttle delete requests on the client side - sending batch of 100 
delete requests each 500ms. So no more than 200 deletes/sec. But it didn't 
help. I can reduce it further to 100/sec, but I don't think it will help much.

I delete millions of columns from other row in this SCF at the same rate and 
never have hit this problem. It only happens when I try to delete from this 
particular wide row.

So right now I don't know how can I delete these columns. Any ideas?


Many thanks,
Rustam.




Commit log durability per column family

2012-06-10 Thread osishkin osishkin
I require durability for inserts to my column families so I'm using
batch mode to insert data.
However, I have some column families which I use for less important
data (indexes) which are much more write intensive.
If I could change the commit log setting only for them to periodic
instead of batch, it would improve performance for me, without losing
too much guarantees.

Is that even possible?
I'm using Cassandra 0.7 (and yes, I know it's bad, I will upgrade soon)

Thank you