SNAPSHOT builds?

2018-09-29 Thread James Carman
I am trying to find 4.x SNAPSHOT builds.  Are they available anywhere
handy?  I'm trying to work on Java 11 compatibility for a library.

Thanks,

James


Re: SNAPSHOT builds?

2018-09-29 Thread James Carman
Okay, cool.  So, 4.0.0-SNAPSHOT doesn’t have Java 11 support quite yet?  No
big deal.  Just trying to get ahead of the game and be ready once we have
it.  Thanks, Jonathan!

On Sat, Sep 29, 2018 at 11:16 AM Jonathan Haddad  wrote:

> Hey James, you’ll have to build it. Java 11 is out  but the build
> instructions still apply:
>
> http://thelastpickle.com/blog/2018/08/16/java11.html
>
>
> On Sat, Sep 29, 2018 at 7:01 AM James Carman 
> wrote:
>
>> I am trying to find 4.x SNAPSHOT builds.  Are they available anywhere
>> handy?  I'm trying to work on Java 11 compatibility for a library.
>>
>> Thanks,
>>
>> James
>>
> --
> Jon Haddad
> http://www.rustyrazorblade.com
> twitter: rustyrazorblade
>


Re: Cassandra: Inconsistent data on reads (LOCAL_QUORUM)

2018-10-13 Thread James Carman
Are you using the Java driver? The default timestamp generator is
client-side now (since 3.0 I believe), so if you don’t change it, you need
your client clocks to be in sync also.
On Sat, Oct 13, 2018 at 1:24 PM Naik, Ninad  wrote:

> Thanks Maitrayee. I should have mentioned this as one of the things we
> verified. The clocks on cassandra nodes are in sync.
> --
> *From:* maitrayee shah 
> *Sent:* Friday, October 12, 2018 6:40:25 PM
> *To:* user@cassandra.apache.org
> *Subject:* Re: Cassandra: Inconsistent data on reads (LOCAL_QUORUM)
>
>
> [ This email has been sent from a source external to Epsilon. Please use
> caution when clicking links or opening attachments. ]
> We have seen inconsistent read if the clock on the nodes are not in sync.
>
>
> Thank you
>
> Sent from my iPhone
>
> On Oct 12, 2018, at 1:50 PM, Naik, Ninad  wrote:
>
> Hello,
>
> We're seeing inconsistent data while doing reads on cassandra. Here are
> the details:
>
> It's is a wide column table. The columns can be added my multiple
> machines, and read by multiple machines. The time between writes and reads
> are in minutes, but sometimes can be in seconds. Writes happen every 2
> minutes.
>
> Now, while reading we're seeing the following cases of inconsistent reads:
>
>- One column was added. If a read was done after the column was added
>(20 secs to 2 minutes after the write), Cassandra returns no data. As if
>the key doesn't exist. If the application retries, it gets the data.
>- A few columns exist for a row key. And a new column 'n' was added.
>Again, a read happens a few minutes after the write. This time, only the
>latest column 'n' is returned. In this case the app doesn't know that the
>data is incomplete so it doesn't retry. If we manually retry, we see all
>the columns.
>- A few columns exist for a row key. And a new column 'n' is added.
>When a read happens after the write, all columns but 'n' are returned.
>
> Here's what we've verified:
>
>- Both writes and reads are using 'LOCAL_QUORUM' consistency level.
>- The replication is within local data center. No remote data center
>is involved in the read or write.
>- During the inconsistent reads, none of the nodes are undergoing GC
>pauses
>- There are no errors in cassandra logs
>- Reads always happen after the writes.
>
> A few other details: Cassandra version: 2.1.9 DataStax java driver
> version: 2.1.10.2 Replication Factor: 3
>
> We don't see this problem in lower environments. We have seen this happen
> once or twice last year, but since last few days it's happening quite
> frequently. On an average 2 inconsistent reads every minute.
>
> Here's how the table definition looks like:
>
> CREATE TABLE "MY_TABLE" (
>   key text,
>   sub_key text,
>   value text,
>   PRIMARY KEY ((key), sub_key)
> ) WITH
>   bloom_filter_fp_chance=0.01 AND
>   caching='{"keys":"ALL", "rows_per_partition":"NONE"}' AND
>   comment='' AND
>   dclocal_read_repair_chance=0.10 AND
>   gc_grace_seconds=864000 AND
>   read_repair_chance=0.00 AND
>   default_time_to_live=0 AND
>   speculative_retry='ALWAYS' AND
>   memtable_flush_period_in_ms=0 AND
>   compaction={'class': 'SizeTieredCompactionStrategy'} AND
>   compression={'sstable_compression': 'LZ4Compressor'};
>
> Please point us in the right direction. Thanks !
>
>
>
> The information contained in this e-mail message and any attachments may
> be privileged and confidential. If the reader of this message is not the
> intended recipient or an agent responsible for delivering it to the
> intended recipient, you are hereby notified that any review, dissemination,
> distribution or copying of this communication is strictly prohibited. If
> you have received this communication in error, please notify the sender
> immediately by replying to this e-mail and delete the message and any
> attachments from your computer.
>
>
>
> The information contained in this e-mail message and any attachments may
> be privileged and confidential. If the reader of this message is not the
> intended recipient or an agent responsible for delivering it to the
> intended recipient, you are hereby notified that any review, dissemination,
> distribution or copying of this communication is strictly prohibited. If
> you have received this communication in error, please notify the sender
> immediately by replying to this e-mail and delete the message and any
> attachments from your computer.
>


Re: Cassandra: Inconsistent data on reads (LOCAL_QUORUM)

2018-10-13 Thread James Carman
Okay, just thought I’d throw it out there.  I just so happened to miss that
little tidbit from the upgrade guide and got bit by it.

That is an odd problem, then.  I hope you find your answer.  Please update
us if you figure it out.  Very curious to hear the answer.

On Sat, Oct 13, 2018 at 4:09 PM Naik, Ninad  wrote:

> Thanks James. Yeah, we're using the datastax java driver. But we're on
> version 2.1.10.2. And we are not using the client side timestamps.
> ------
> *From:* James Carman 
> *Sent:* Saturday, October 13, 2018 12:55:51 PM
>
> *To:* user@cassandra.apache.org
> *Subject:* Re: Cassandra: Inconsistent data on reads (LOCAL_QUORUM)
>
>
> [ This email has been sent from a source external to Epsilon. Please use
> caution when clicking links or opening attachments. ]
> Are you using the Java driver? The default timestamp generator is
> client-side now (since 3.0 I believe), so if you don’t change it, you need
> your client clocks to be in sync also.
> On Sat, Oct 13, 2018 at 1:24 PM Naik, Ninad 
> wrote:
>
> Thanks Maitrayee. I should have mentioned this as one of the things we
> verified. The clocks on cassandra nodes are in sync.
> --
> *From:* maitrayee shah 
> *Sent:* Friday, October 12, 2018 6:40:25 PM
> *To:* user@cassandra.apache.org
> *Subject:* Re: Cassandra: Inconsistent data on reads (LOCAL_QUORUM)
>
>
> [ This email has been sent from a source external to Epsilon. Please use
> caution when clicking links or opening attachments. ]
> We have seen inconsistent read if the clock on the nodes are not in sync.
>
>
> Thank you
>
> Sent from my iPhone
>
> On Oct 12, 2018, at 1:50 PM, Naik, Ninad  wrote:
>
> Hello,
>
> We're seeing inconsistent data while doing reads on cassandra. Here are
> the details:
>
> It's is a wide column table. The columns can be added my multiple
> machines, and read by multiple machines. The time between writes and reads
> are in minutes, but sometimes can be in seconds. Writes happen every 2
> minutes.
>
> Now, while reading we're seeing the following cases of inconsistent reads:
>
>- One column was added. If a read was done after the column was added
>(20 secs to 2 minutes after the write), Cassandra returns no data. As if
>the key doesn't exist. If the application retries, it gets the data.
>- A few columns exist for a row key. And a new column 'n' was added.
>Again, a read happens a few minutes after the write. This time, only the
>latest column 'n' is returned. In this case the app doesn't know that the
>data is incomplete so it doesn't retry. If we manually retry, we see all
>the columns.
>- A few columns exist for a row key. And a new column 'n' is added.
>When a read happens after the write, all columns but 'n' are returned.
>
> Here's what we've verified:
>
>- Both writes and reads are using 'LOCAL_QUORUM' consistency level.
>- The replication is within local data center. No remote data center
>is involved in the read or write.
>- During the inconsistent reads, none of the nodes are undergoing GC
>pauses
>- There are no errors in cassandra logs
>- Reads always happen after the writes.
>
> A few other details: Cassandra version: 2.1.9 DataStax java driver
> version: 2.1.10.2 Replication Factor: 3
>
> We don't see this problem in lower environments. We have seen this happen
> once or twice last year, but since last few days it's happening quite
> frequently. On an average 2 inconsistent reads every minute.
>
> Here's how the table definition looks like:
>
> CREATE TABLE "MY_TABLE" (
>   key text,
>   sub_key text,
>   value text,
>   PRIMARY KEY ((key), sub_key)
> ) WITH
>   bloom_filter_fp_chance=0.01 AND
>   caching='{"keys":"ALL", "rows_per_partition":"NONE"}' AND
>   comment='' AND
>   dclocal_read_repair_chance=0.10 AND
>   gc_grace_seconds=864000 AND
>   read_repair_chance=0.00 AND
>   default_time_to_live=0 AND
>   speculative_retry='ALWAYS' AND
>   memtable_flush_period_in_ms=0 AND
>   compaction={'class': 'SizeTieredCompactionStrategy'} AND
>   compression={'sstable_compression': 'LZ4Compressor'};
>
> Please point us in the right direction. Thanks !
>
>
>
> The information contained in this e-mail message and any attachments may
> be privileged and confidential. If the reader of this message is not the
> intended recipient or an agent responsible for delivering it to the
> int

Library/utility announcements?

2016-06-01 Thread James Carman
Some user lists allow it. Does the Cassandra community mind folks
announcing their super cool Cassandra libraries on this list? Is there a
page for us to list them?


ANNOUNCE: Hecate 3.0.0.Beta1 Available...

2016-06-03 Thread James Carman
Fellow Cassandra Users,

We have been using a library we call "Hecate" to do Cassandra ORM-type
mapping for our clients for quite some time with tremendous success. We
have recently released a 3.0.0.Beta1 version for folks to try out. You can
find the source here:

https://github.com/savoirtech/hecate

with specific documentation about the POJO library here:

https://github.com/savoirtech/hecate/blob/hecate-3.0.x/pojo/README.md

The library is available in Maven Central:


  com.savoirtech.hecate
  hecate-pojo
  3.0.0.Beta1


We hope you enjoy using Hecate as much as we have and we welcome the
feedback.

Thanks,

James Carman


Re: How to include all dependencies on cassandra driver jar?

2016-06-03 Thread James Carman
You could shade it into another jar.

On Fri, Jun 3, 2016 at 9:08 PM Carolina Simoes Gomes <
carolina.go...@huawei.com> wrote:

> Hello,
>
>
>
> I am using Cassandra 3.2.1 and the 3.0.0 driver. I need to build the
> driver but with all its dependencies included in the jar (uber jar), using
> maven, such that there are no external dependencies. How should I go about
> doing that?
>
>
>
> Thanks,
>
>
>
> *Carolina Gomes, M.Sc. *Systems Researcher
> Huawei Canada Research Center
> 19 Allstate Parkway, Suite 200
> Markham ON   L3R 5A
> carolina.go...@huawei.com 
> *www.huawei.ca* 
>


Re: Cassandra: The Definitive Guide, 2nd Edition

2016-08-02 Thread James Carman
Congrats, Jeff!  I'll definitely check it out.

On Tue, Aug 2, 2016 at 12:36 PM Jeff Carpenter <
jeff.carpen...@choicehotels.com> wrote:

> Hello
>
> I’m excited to announce that the 2nd edition of Cassandra: The Definitive
> Guide is now available from O’Reilly Media.
> http://shop.oreilly.com/product/0636920043041.do.
>
> If you’ve been around the community for awhile, you’re probably familiar
> with Eben Hewitt’s 1st edition. When released in 2010, it was the first
> book written on Cassandra, but the technology has changed so much since
> then that it was definitely due for an update.
>
> The new edition is completely reworked for Cassandra 3.X, including
> coverage of data modeling in CQL, SASI indexes, materialized views,
> lightweight transactions, DataStax drivers, plus completely new chapters on
> security deployment/integration (with a guest appearance by Patrick McFadin
> on Spark integration).
>
> I hope that this new edition will serve as a primer to many who are just
> starting with Cassandra, and as a useful reference for early adopters who
> were onboard "before it was cool".
>
> Thanks
>
>
> Jeff Carpenter
>


Re: unsubscibe

2016-08-13 Thread James Carman
Was the Google stuff really necessary? Couldn't you have just nicely told
them how to unsubscribe?

On Sat, Aug 13, 2016 at 7:52 PM Alain RODRIGUEZ  wrote:

> Hi,
>
> You did not unsubscribe yet.
>
> 'unsubscribe cassandra' in google search:
>
> Result 1: http://www.planetcassandra.org/apache-cassandra-mailing-lists/
> Result 2: http://mail-archives.apache.org/mod_mbox/cassandra-user/
> Result 3: http://cassandra.apache.org/
>
> Sending a message to user-unsubscr...@cassandra.apache.org, as mentioned
> everywhere, should work better and spam less people.
>
> Alain
>
> 2016-08-13 23:32 GMT+02:00 Lawrence Turcotte 
> :
>
>>
>>
>


Re: unsubscibe

2016-08-13 Thread James Carman
I see the confusion on quite a few lists around the organization. It's not
rampant, but it does happen. Perhaps it would be a good idea to improve the
communication somehow. When you first subscribe, you get a pretty
informative email describing all of the things you can do via email, but
who reads instructions?!?! :). I wonder if infra could force a footer on
the emails or something.

On Sat, Aug 13, 2016 at 8:35 PM Russell Bradberry 
wrote:

> I think the overall issue here is that there are many apps that provide an
> "unsubscribe" button that automagically sends these emails.
>
> I think the best course of action would be to bring this up to the powers
> that be to possibly decide on supporting this functionality as a feature.
> This, of course, because this method of unsubscribing from lists is pretty
> much standard now.
>
> Im not sure the patronizing responses with Google links help at all.
>
>
> _
> From: James Carman 
> Sent: Saturday, August 13, 2016 8:24 PM
> Subject: Re: unsubscibe
> To: 
>
>
>
> Was the Google stuff really necessary? Couldn't you have just nicely told
> them how to unsubscribe?
>
> On Sat, Aug 13, 2016 at 7:52 PM Alain RODRIGUEZ 
> wrote:
>
>> Hi,
>>
>> You did not unsubscribe yet.
>>
>> 'unsubscribe cassandra' in google search:
>>
>> Result 1: http://www.planetcassandra.org/apache-cassandra-mailing-lists/
>> Result 2: http://mail-archives.apache.org/mod_mbox/cassandra-user/
>> Result 3: http://cassandra.apache.org/
>>
>> Sending a message to user-unsubscr...@cassandra.apache.org, as mentioned
>> everywhere, should work better and spam less people.
>>
>> Alain
>>
>> 2016-08-13 23:32 GMT+02:00 Lawrence Turcotte > >:
>>
>>>
>>>
>>
>
>


Re: unsubscibe

2016-08-13 Thread James Carman
I've never noticed the unsubscribe button. That may be a good idea, though,
to support such a feature. Maybe we should poke infra!

On Sat, Aug 13, 2016 at 8:46 PM Russell Bradberry 
wrote:

> While there is an informative email when you sign up, there are a couple
> issues with it. First, as you said, people don't read instructions. Second,
> people forget. I would have to search back to when I signed up for the list
> in order to find how to unsubscribe. Lastly, gmail and many other apps
> provide a button that says "unsubscribe" which does little more than send
> an email to the list. The latter is the reason I am suggesting that this be
> worked in as an additional way to unsubscribe from the list.
>
>
>
>
>
> On Sat, Aug 13, 2016 at 8:39 PM -0400, "James Carman" <
> ja...@carmanconsulting.com> wrote:
>
> I see the confusion on quite a few lists around the organization. It's not
>> rampant, but it does happen. Perhaps it would be a good idea to improve the
>> communication somehow. When you first subscribe, you get a pretty
>> informative email describing all of the things you can do via email, but
>> who reads instructions?!?! :). I wonder if infra could force a footer on
>> the emails or something.
>>
>> On Sat, Aug 13, 2016 at 8:35 PM Russell Bradberry 
>> wrote:
>>
>>> I think the overall issue here is that there are many apps that provide
>>> an "unsubscribe" button that automagically sends these emails.
>>>
>>> I think the best course of action would be to bring this up to the
>>> powers that be to possibly decide on supporting this functionality as a
>>> feature. This, of course, because this method of unsubscribing from lists
>>> is pretty much standard now.
>>>
>>> Im not sure the patronizing responses with Google links help at all.
>>>
>>>
>>> _
>>> From: James Carman 
>>> Sent: Saturday, August 13, 2016 8:24 PM
>>> Subject: Re: unsubscibe
>>> To: 
>>>
>>>
>>>
>>> Was the Google stuff really necessary? Couldn't you have just nicely
>>> told them how to unsubscribe?
>>>
>>> On Sat, Aug 13, 2016 at 7:52 PM Alain RODRIGUEZ 
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> You did not unsubscribe yet.
>>>>
>>>> 'unsubscribe cassandra' in google search:
>>>>
>>>> Result 1:
>>>> http://www.planetcassandra.org/apache-cassandra-mailing-lists/
>>>> Result 2: http://mail-archives.apache.org/mod_mbox/cassandra-user/
>>>> Result 3: http://cassandra.apache.org/
>>>>
>>>> Sending a message to user-unsubscr...@cassandra.apache.org, as
>>>> mentioned everywhere, should work better and spam less people.
>>>>
>>>> Alain
>>>>
>>>> 2016-08-13 23:32 GMT+02:00 Lawrence Turcotte <
>>>> lawrence.turco...@gmail.com>:
>>>>
>>>>>
>>>>>
>>>>
>>>
>>>


Re: unsubscibe

2016-08-15 Thread James Carman
On Mon, Aug 15, 2016 at 10:28 AM Eric Evans 
wrote:

>
> I'm always surprised when a Google search for 'unsubscribe cassandra'
> doesn't return mailing list results from people nicely telling someone
> how to unsubscribe.
>
>
Agreed.  It doesn't make for a very welcoming community to attract new
contributors, either.


Re: unsubscibe

2016-08-16 Thread James Carman
Thank you for your sincere and honest explanation.  In the future, I would
reply with something like this:

To unsubscribe from this mailing list, please send an email to
user-unsubscr...@cassandra.apache.org.  You will receive another email,
confirming that you wish to leave the mailing list.   Simply reply to that
email.  You will then receive another email saying 'goodbye' from the
mailing list, confirming that you have been unsubscribed.

I would leave out the "as mentioned everywhere" part.



On Tue, Aug 16, 2016 at 7:03 AM Alain RODRIGUEZ  wrote:

> Hi guys,
>
> Firstly, I want to apologize to you all. English is not my first language
> and I think sometimes I come across way more harsh than what I mean to. I
> am french, I heard french were considered to be aggressive while speaking
> ;-). But I did not mean to offend anyone.
>
> I took some time to answer every unsubscribe message in the last weeks,
> because the first person I sent this message to, thanked me and told me he
> get confused because after a search, he saw other people unsubscribed this
> way (sending 'unsubscribe') and just copied this behaviour. I did not do it
> for fun or to be bad at people but rather to help them out. I also meant to
> help us as well as a community reducing the noise in the mailing list since
> a search now often returns my answer on how to unsubscribe properly with
> the warning that writing to the list will do nothing but noise.
>
> Yet as there are a few unsubscribe messages every week, I created a
> template answer I mainly copy / paste each time. A way to make sure to have
> a clear and short answer and that I can quickly answer to every
> 'unsubscribe' message. I wanted to avoid spending that much time on this as
> you can imagine...
>
> Over the last 2 months, I have reworked this message to be more concise
> and less aggressive, as I considered my first messages to be a bit too
> aggressive indeed. I thought this one was ok though.
>
> Let me explain why I did the google stuff.
>
> I think that to have this mailing list working as efficiently as possible
> we need 2 things :
>
> - First thing, a good mailing list with nice features and I definitely
> agree with this.
>
> First, as you said, people don't read instructions. Second, people forget
>
>
> +1 (even if I am a believer and I think people do read instructions, they
> obviously won't remember, so no matter if people read or not)
>
> I think the overall issue here is that there are many apps that provide an
>> "unsubscribe" button that automagically sends these emails.
>
> I think the best course of action would be to bring this up to the powers
>> that be to possibly decide on supporting this functionality as a feature.
>
>
> +1
>
> This may be a silly question, but has anyone considered making the mailing
>> list accept unsubscribe requests this way?  Or at least filter them out and
>> auto-respond with a message explaining how to unsubscribe?
>
>
> +1
>
> Yet I am not sure who is in charge here.
>
> - Second thing, people behaving nicely and smartly.
>
> This is a community and the quality and atmosphere is the one we bring as
> individuals.
>
> Meaning I have to be nicer, since a few of you agreed saying my message
> was a bit tough.
>
> But also meaning people have to do the basic searches before asking things
> here. Everyone manages to subscribe, I just want to remind people that the
> method to unsubscribe is the same one, search on google (or whatever you
> like). I always try to provide people with the method I used (or even the
> command when appropriate) to solve their issue and the result of my
> searches, for people to see how I found the information. I didn’t think
> telling people to search on google was more patronizing than telling them
> to use 'nodetool status' to see if a node is down. It is obviously
> something they know about but did not think of using. Plus I gave all the
> information, it was not like "Ask google or RTFM", since I added
> informations:
>
> You did not unsubscribe yet.
>
>
> And even the solution directly
>
> Sending a message to user-unsubscr...@cassandra.apache.org, as mentioned
>> everywhere, should work better and spam less people.
>
>
> Those are just facts. It's concise, I agree, but be sure of my good
> intentions there. I do not spend time being bad at people, this is a lost
> of time. I try to help here, as I did for the last 4+ years in this mailing
> list now.
>
> So sorry again, I hope you can all accept that there was no harm meant and
> I did not mean to be rude.
>
> Thanks all - and I promise I will try my b

Query Consistency Issues...

2015-12-15 Thread James Carman
We are encountering a situation in our environment (a 6-node Cassandra
ring) where we are trying to insert a row and then immediately update it,
using LOCAL_QUORUM consistency (replication factor = 3).  I have replicated
the issue using the following code:

https://gist.github.com/jwcarman/72714e6d0ea3508e24cc

Should we expect this to work?  Should LOCAL_QUORUM be sufficient?  If so,
what type of setup issues would we look for which would cause these types
of issues?

Thanks,

James


Re: Query Consistency Issues...

2015-12-15 Thread James Carman
On Tue, Dec 15, 2015 at 2:57 PM Paulo Motta 
wrote:

> What cassandra and driver versions are you running?
>
>
We are using 2.1.7.1


> It may be that the second update is getting the same timestamp as the
> first, or even a lower timestamp if it's being processed by another server
> with unsynced clock, so that update may be getting lost.
>
>
So, we need to look for clock sync issues between nodes in our ring?  How
close do they need to be?


> If you have high frequency updates in the same partition from the same
> client you should probably use client-side timestamps with a configured
> timestamp generator on the driver, available in Cassandra 2.1 and Java
> driver 2.1.2, and default in java driver 3.0.
>
>
Very cool!  If we have multiple nodes in our application, I suppose *their*
clocks will have to be sync'ed for this to work, right?


Adding Options to Create Statements...

2016-03-30 Thread James Carman
I am trying to perform the following operation:

public Create createCreate() {
  Create create =
SchemaBuilder.createTable("foo").addPartitionColumn("bar",
varchar()).addClusteringColumn("baz", varchar);
  if(descending) {
create.withOptions().clusteringOrder("baz", Direction.DESC);
  return create;
}

I don't want to have to return the Create.Options object from this method
(as I may need to add other columns).  Is there a way to have the options
"decorate" the Create directly without having to return the Create.Options?


Re: Adding Options to Create Statements...

2016-03-31 Thread James Carman
No thoughts? Would an upgrade of the driver "fix" this?

On Wed, Mar 30, 2016 at 10:42 AM James Carman 
wrote:

> I am trying to perform the following operation:
>
> public Create createCreate() {
>   Create create =
> SchemaBuilder.createTable("foo").addPartitionColumn("bar",
> varchar()).addClusteringColumn("baz", varchar);
>   if(descending) {
> create.withOptions().clusteringOrder("baz", Direction.DESC);
>   return create;
> }
>
> I don't want to have to return the Create.Options object from this method
> (as I may need to add other columns).  Is there a way to have the options
> "decorate" the Create directly without having to return the Create.Options?
>
>


Re: Adding Options to Create Statements...

2016-04-01 Thread James Carman
A, my bad.  One might wonder why the heck the Java driver is "owned" by
an outside entity, eh?

On Fri, Apr 1, 2016 at 11:58 AM Tyler Hobbs  wrote:

> I'm not sure which driver you're referring to, but if it's the java
> driver, it has its own mailing list that may be more helpful:
> https://groups.google.com/a/lists.datastax.com/forum/#!forum/java-driver-user
>
> On Thu, Mar 31, 2016 at 4:40 PM, James Carman 
> wrote:
>
>> No thoughts? Would an upgrade of the driver "fix" this?
>>
>> On Wed, Mar 30, 2016 at 10:42 AM James Carman 
>> wrote:
>>
>>> I am trying to perform the following operation:
>>>
>>> public Create createCreate() {
>>>   Create create =
>>> SchemaBuilder.createTable("foo").addPartitionColumn("bar",
>>> varchar()).addClusteringColumn("baz", varchar);
>>>   if(descending) {
>>> create.withOptions().clusteringOrder("baz", Direction.DESC);
>>>   return create;
>>> }
>>>
>>> I don't want to have to return the Create.Options object from this
>>> method (as I may need to add other columns).  Is there a way to have the
>>> options "decorate" the Create directly without having to return the
>>> Create.Options?
>>>
>>>
>
>
> --
> Tyler Hobbs
> DataStax <http://datastax.com/>
>


Re: Adding Options to Create Statements...

2016-04-01 Thread James Carman
But, if there were a Java driver provided by the Apache Cassandra project
itself, then it'd be an easy choice.


On Fri, Apr 1, 2016 at 2:16 PM Robert Coli  wrote:

> On Fri, Apr 1, 2016 at 10:43 AM, James Carman 
> wrote:
>
>> A, my bad.  One might wonder why the heck the Java driver is "owned"
>> by an outside entity, eh?
>>
>
> FWIW, the status quo prior to the Datastax drivers was a wide assortment
> of non-compatible drivers in different languages, not one set of
> officially-supported-by-the-Apache-project ones..
>
> ... you probably would not have preferred it? :D
>
> =Rob
>
>


Re: DataStax OpsCenter with Apache Cassandra

2016-04-11 Thread James Carman
Since when did this become a DataStax support email list?  If folks have
questions about DataStax products, shouldn't they be contacting the company
directly?


On Sun, Apr 10, 2016 at 1:13 PM Jeff Jirsa 
wrote:

> It is possible to use OpsCenter for open source / community versions up to
> 2.2.x. It will not be possible in 3.0+
>
>
>
> From: Anuj Wadehra
> Reply-To: "user@cassandra.apache.org"
> Date: Sunday, April 10, 2016 at 9:28 AM
> To: User
> Subject: DataStax OpsCenter with Apache Cassandra
>
> Hi,
>
> Is it possible to use DataStax OpsCenter for monitoring Apache distributed
> Cassandra in Production?
>
> OR
>
>  Is it possible to use DataStax OpsCenter if you are not using DataStax
> Enterprise in production?
>
>
> Thanks
> Anuj
>


Re: Large primary keys

2016-04-11 Thread James Carman
Why does the text need to be the key?

On Mon, Apr 11, 2016 at 6:04 PM Robert Wille  wrote:

> I have a need to be able to use the text of a document as the primary key
> in a table. These texts are usually less than 1K, but can sometimes be 10’s
> of K’s in size. Would it be better to use a digest of the text as the key?
> I have a background process that will occasionally need to do a full table
> scan and retrieve all of the texts, so using the digest doesn’t eliminate
> the need to store the text. Anyway, is it better to keep primary keys
> small, or is C* okay with large primary keys?
>
> Robert
>
>


Re: Large primary keys

2016-04-11 Thread James Carman
S3 maybe?
On Mon, Apr 11, 2016 at 7:05 PM Robert Wille  wrote:

> I do realize its kind of a weird use case, but it is legitimate. I have a
> collection of documents that I need to index, and I want to perform entity
> extraction on them and give the extracted entities special treatment in my
> full-text index. Because entity extraction costs money, and each document
> will end up being indexed multiple times, I want to cache them in
> Cassandra. The document text is the obvious key to retrieve entities from
> the cache. If I use the document ID, then I have to track timestamps. I
> know that sounds like a simple workaround, but I’m presenting a
> much-simplified view of my actual data model.
>
> The reason for needing the text in the table, and not just a digest, is
> that sometimes entity extraction has to be deferred due to license
> limitations. In those cases, the entity extraction occurs on a background
> process, and the entities will be included in the index the next time the
> document is indexed.
>
> I will use a digest as the key. I suspected that would be the answer, but
> its good to get confirmation.
>
> Robert
>
> On Apr 11, 2016, at 4:36 PM, Jan Kesten  wrote:
>
> > Hi Robert,
> >
> > why do you need the actual text as a key? I sounds a bit unatural at
> least for me. Keep in mind that you cannot do "like" queries on keys in
> cassandra. For performance and keeping things more readable I would prefer
> hashing your text and use the hash as key.
> >
> > You should also take into account to store the keys (hashes) in a
> seperate table per day / hour or something like that, so you can quickly
> get all keys for a time range. A query without the partition key may be
> very slow.
> >
> > Jan
> >
> > Am 11.04.2016 um 23:43 schrieb Robert Wille:
> >> I have a need to be able to use the text of a document as the primary
> key in a table. These texts are usually less than 1K, but can sometimes be
> 10’s of K’s in size. Would it be better to use a digest of the text as the
> key? I have a background process that will occasionally need to do a full
> table scan and retrieve all of the texts, so using the digest doesn’t
> eliminate the need to store the text. Anyway, is it better to keep primary
> keys small, or is C* okay with large primary keys?
> >>
> >> Robert
> >>
> >
>
>


Re: scylladb

2017-03-12 Thread James Carman
Does all of this Scylla talk really even belong on the Cassandra user
mailing list in the first place?




On Sun, Mar 12, 2017 at 4:07 PM Jeff Jirsa  wrote:



On 2017-03-11 22:33 (-0700), Dor Laor  wrote:
> On Sat, Mar 11, 2017 at 10:02 PM, Jeff Jirsa  wrote:
> > On 2017-03-10 09:57 (-0800), Rakesh Kumar wrote:
> > > Cassanda vs Scylla is a valid comparison because they both are
> > compatible. Scylla is a drop-in replacement for Cassandra.
> >
> > No, they aren't, and no, it isn't
> >
>
> Jeff is angry with us for some reason. I don't know why, it's natural that
> when  a new opponent there are objections and the proof lies on us.

I'm not angry. When I'm angry I send emails with paragraphs of expletives.
It doesn't happen very often.

This is an open source ASF project, it's not about fighting for market
share against startups who find it necessary to inflate their level of
compatibility to sell support contracts, it's about providing software that
people can use (with a license that makes it easy to use). I don't work for
a company that makes money selling Cassandra based solutions and you're not
an opponent.

>
> Scylla IS a drop in replacement for C*. We support the same CQL (from
> version 1.7 it's cql 3.3.1, protocol v4), the same SStable format (based
on
> 2.1.8).

Scylla doesn't even run on all of the supported operating systems, let
alone have feature parity or network level compatibility (which you'd
probably need if you REALLY want to be drop-in
stop-one-cassandra-node-swap-binaries-start-it-up compatible, which is what
your site used to claim, but obviously isn't supported). You support a
subset of one query language and can read and write one sstable format. You
do it with great supporting tech and a great engineering team, but you're
not compatible, and if I were your cofounder I'd ask you to focus on the
tech strengths and not your drop-in compatibility, so engineers who care
about facts don't grow to resent your public lies.

I've used a lot of databases in my life, but I don't know that I've ever
had someone call me angry because I pointed out that database A wasn't
compatible with database B, but I guess I'll chalk it up to 2017 and the
year of fake news / alternative facts.

Hugs and kisses,
- Jeff


Re: scylladb

2017-03-12 Thread James Carman
Well, looking back, it appears this thread is from 2015, so apparently
everyone is okay with it.

Promoting a value-add product that makes using Cassandra easier/more
efficient/etc would be cool, but coming to the Cassandra mailing list to
promote a "drop-in replacement" (use us, not Cassandra) isn't cool, IMHO.


On Sun, Mar 12, 2017 at 5:04 PM Kant Kodali  wrote:

yes.

On Sun, Mar 12, 2017 at 2:01 PM, James Carman 
wrote:

Does all of this Scylla talk really even belong on the Cassandra user
mailing list in the first place?




On Sun, Mar 12, 2017 at 4:07 PM Jeff Jirsa  wrote:



On 2017-03-11 22:33 (-0700), Dor Laor  wrote:
> On Sat, Mar 11, 2017 at 10:02 PM, Jeff Jirsa  wrote:
> > On 2017-03-10 09:57 (-0800), Rakesh Kumar wrote:
> > > Cassanda vs Scylla is a valid comparison because they both are
> > compatible. Scylla is a drop-in replacement for Cassandra.
> >
> > No, they aren't, and no, it isn't
> >
>
> Jeff is angry with us for some reason. I don't know why, it's natural that
> when  a new opponent there are objections and the proof lies on us.

I'm not angry. When I'm angry I send emails with paragraphs of expletives.
It doesn't happen very often.

This is an open source ASF project, it's not about fighting for market
share against startups who find it necessary to inflate their level of
compatibility to sell support contracts, it's about providing software that
people can use (with a license that makes it easy to use). I don't work for
a company that makes money selling Cassandra based solutions and you're not
an opponent.

>
> Scylla IS a drop in replacement for C*. We support the same CQL (from
> version 1.7 it's cql 3.3.1, protocol v4), the same SStable format (based
on
> 2.1.8).

Scylla doesn't even run on all of the supported operating systems, let
alone have feature parity or network level compatibility (which you'd
probably need if you REALLY want to be drop-in
stop-one-cassandra-node-swap-binaries-start-it-up compatible, which is what
your site used to claim, but obviously isn't supported). You support a
subset of one query language and can read and write one sstable format. You
do it with great supporting tech and a great engineering team, but you're
not compatible, and if I were your cofounder I'd ask you to focus on the
tech strengths and not your drop-in compatibility, so engineers who care
about facts don't grow to resent your public lies.

I've used a lot of databases in my life, but I don't know that I've ever
had someone call me angry because I pointed out that database A wasn't
compatible with database B, but I guess I'll chalk it up to 2017 and the
year of fake news / alternative facts.

Hugs and kisses,
- Jeff


Re: How can I scale my read rate?

2017-03-19 Thread James Carman
Have you tried using PreparedStatements?

On Sat, Mar 18, 2017 at 9:47 PM S G  wrote:

> ok, I gave the executeAsync() a try.
> Good part is that it was really easy to write the code for that.
> Bad part is that it did not had a huge effect on my throughput - I gained
> about 5% increase in throughput.
> I suspect it is so because my queries are all get-by-primary-key queries
> and were anyways completing in less than 2 milliseconds.
> So there was not much wait to begin with.
>
>
> Here is my code:
>
> String getByKeyQueryStr = "Select * from fooTable where key = " + key;
> //ResultSet result = session.execute(getByKeyQueryStr);  // Previous code
> ResultSetFuture future = session.executeAsync(getByKeyQueryStr);
> FutureCallback callback = new MyFutureCallback();
> executor = MoreExecutors.sameThreadExecutor();
> //executor = Executors.newFixedThreadPool(3); // Tried this too, no effect
> //executor = Executors.newFixedThreadPool(10); // Tried this too, no effect
> Futures.addCallback(future, callback, executor);
>
> Can I improve the above code in some way?
> Are there any JMX metrics that can tell me what's going on?
>
> From the vmstat command, I see that CPU idle time is about 70% even though
> I am running about 60 threads per VM
> Total 20 client-VMs with 8 cores each are querying a Cassandra cluster
> with 16 VMs, 8-core each too.
>
> [image: Screen Shot 2017-03-18 at 6.46.03 PM.png]
> ​
> ​
>
>
> Thanks
> SG
>
>
> On Sat, Mar 18, 2017 at 5:38 PM, S G  wrote:
>
> Thanks. It seems that you guys have found executeAsync to yield good
> results.
> I want to share my understanding how this could benefit performance and
> some validation from the group will be awesome.
>
> I will call executeAsync() each time I want to get by primary-key.
> That ways, my client thread is not blocked anymore and I can submit a lot
> more requests per unit time.
> The async requests get piled on the underlying Netty I/O thread which
> ensures that it is always busy all the time.
> Earlier, the Netty I/O thread would have wasted some cycles when the
> sync-execute method was processing the results.
> And earlier, the client thread would also have wasted some cycles waiting
> for netty-thread to complete.
>
> With executeAsync(), none of them is waiting.
> Only thing to ensure is that the Netty thread's queue does not grow
> indefinitely.
>
> If the above theory is correct, then it sounds like a really good thing to
> try.
> If not, please do share some more details.
>
>
>
>
> On Sat, Mar 18, 2017 at 2:00 PM,  wrote:
>
> +1 for executeAsync – had a long time to argue that it’s not bad as with
> good old rdbms.
>
>
>
>
>
>
>
> Gesendet von meinem Windows 10 Phone
>
>
>
> *Von: *Arvydas Jonusonis 
> *Gesendet: *Samstag, 18. März 2017 19:08
> *An: *user@cassandra.apache.org
> *Betreff: *Re: How can I scale my read rate?
>
>
>
> ..then you're not taking advantage of request pipelining. Use executeAsync
> - this will increase your throughput for sure.
>
>
>
> http://www.datastax.com/dev/blog/java-driver-async-queries
>
>
>
>
>
> On Sat, Mar 18, 2017 at 08:00 S G  wrote:
>
> I have enabled JMX but not sure what metrics to look for - they are way
> too many of them.
>
> I am using session.execute(...)
>
>
>
>
>
> On Fri, Mar 17, 2017 at 2:07 PM, Arvydas Jonusonis <
> arvydas.jonuso...@gmail.com> wrote:
>
> It would be interesting to see some of the driver metrics (in your stress
> test tool) - if you enable JMX, they should be exposed by default.
>
> Also, are you using session.execute(..) or session.executeAsync(..) ?
>
>
>
>
>
>
>


Re: Unsubscribe

2014-11-04 Thread James Carman
You should have received an email when you signed up which gives you
instructions on how to unsubscribe.  Otherwise, send an email to
user-h...@cassandra.apache.org

On Mon, Nov 3, 2014 at 10:30 PM, Malay Nilabh 
wrote:

>  Hi
>
>
>
> It was great to be part of this group. Thanks for helping out. Please
> unsubscribe me now.
>
>
>
> *Regards,*
>
> *Malay Nilabh*
>
> BIDW BU/ Big Data CoE
>
> L&T Infotech Ltd, Hinjewadi,Pune
>
> [image: Description: image001]: +91-20-66571746
>
> [image: Description: Description: Description: Description:
> cid:image002.png@01CF1EAD.959B9290]+91-73-879-00727
>
> Email: malay.nil...@lntinfotech.com
>
> *|| Save Paper - Save Trees || *
>
>
>
> --
> The contents of this e-mail and any attachment(s) may contain confidential
> or privileged information for the intended recipient(s). Unintended
> recipients are prohibited from taking action on the basis of information in
> this e-mail and using or disseminating the information, and must notify the
> sender and delete it from their system. L&T Infotech will not accept
> responsibility or liability for the accuracy or completeness of, or the
> presence of any virus or disabling code in this e-mail"
>


Re: embedding cassandra in junit ..

2014-06-11 Thread James Carman
Take a look at cassandra-unit.

https://github.com/savoirtech/hecate/blob/master/hecate-cql3/src/test/java/com/savoirtech/hecate/cql3/test/CassandraTestCase.java



On Wed, Jun 11, 2014 at 11:02 PM, Kevin Burton  wrote:

> Maybe this is an anti-pattern.. please feel free to flame me if that's the
> case ;)
>
> I'd like to embed cassandra in junit so that I can test my database code
> from my laptop and also get it working in our integration.
>
> The general idea is to start with a clean slate, run cassandra, create
> tables, simulate production load, then shutdown.
>
> This page:
>
> http://wiki.apache.org/cassandra/Embedding
>
> seems to hint that it's possible.
>
> of course.. there are some tests here that make it more complicated - like
> quorum read.  but for right now I'll settle for one replica.
>
> --
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> Skype: *burtonator*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> 
> 
> War is peace. Freedom is slavery. Ignorance is strength. Corporations are
> people.
>
>


Re: embedding cassandra in junit ..

2014-06-12 Thread James Carman
These are the maven coordinates:

http://search.maven.org/#artifactdetails%7Corg.cassandraunit%7Ccassandra-unit%7C2.0.2.1%7Cjar



On Thu, Jun 12, 2014 at 1:40 PM, Kevin Burton  wrote:

> Ah.. nice!  I assume you mean this?
>
> https://github.com/jsevellec/cassandra-unit
>
> This should be awesome :)
>
>
> On Wed, Jun 11, 2014 at 8:08 PM, Johan Edstrom  wrote:
>
>> Cassandra-unit 2.0X works awesomely,
>> if you are willing to spend the slightly few more cycles, - Look at
>> farsandra. :)
>>
>> I copied Farsandra (since there was no release) into hecate.
>>
>> On Jun 11, 2014, at 11:02 PM, Kevin Burton  wrote:
>>
>> > Maybe this is an anti-pattern.. please feel free to flame me if that's
>> the case ;)
>> >
>> > I'd like to embed cassandra in junit so that I can test my database
>> code from my laptop and also get it working in our integration.
>> >
>> > The general idea is to start with a clean slate, run cassandra, create
>> tables, simulate production load, then shutdown.
>> >
>> > This page:
>> >
>> > http://wiki.apache.org/cassandra/Embedding
>> >
>> > seems to hint that it's possible.
>> >
>> > of course.. there are some tests here that make it more complicated -
>> like quorum read.  but for right now I'll settle for one replica.
>> >
>> > --
>> >
>> > Founder/CEO Spinn3r.com
>> > Location: San Francisco, CA
>> > Skype: burtonator
>> > blog: http://burtonator.wordpress.com
>> > … or check out my Google+ profile
>> >
>> > War is peace. Freedom is slavery. Ignorance is strength. Corporations
>> are people.
>> >
>>
>>
>
>
> --
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> Skype: *burtonator*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> 
> 
>  War is peace. Freedom is slavery. Ignorance is strength. Corporations
> are people.
>
>