Re: Smart Table creation for 2D range query

2017-05-09 Thread Jim Ancona
gt;> and y are > 0 and <= 1. You would then have a table like: >> > >> > CREATE TABLE geospatial ( >> > space text, >> > x double, >> > y double, >> > item text, >> > m1, >> > m2, >> > m3, >> > primary ke

Re: Smart Table creation for 2D range query

2017-05-09 Thread Jon Haddad
olution could give you those range queries if you > > made the x and y components part of the clustering key. > > > > For example, a space of (1,1) could contain all x,y coordinates where x and > > y are > 0 and <= 1. You would then have a table like: > > > &g

Re: Smart Table creation for 2D range query

2017-05-09 Thread Jim Ancona
onents part of the clustering key. > > > > For example, a space of (1,1) could contain all x,y coordinates where x > and y are > 0 and <= 1. You would then have a table like: > > > > CREATE TABLE geospatial ( > > space text, > > x double, > > y double,

Re: Smart Table creation for 2D range query

2017-05-08 Thread Jon Haddad
m1, > m2, > m3, > primary key ((space), x, y, m1, m2, m3, m4, m5) > ); > > A query of select * where space = '1,1' and x <1 and x >0.5 and y< 0.2 and > y>0.1; should yield all x and y pairs and their distinct metadata. Or > something like th

Re: Smart Table creation for 2D range query

2017-05-08 Thread kurt greaves
tes where x and y are > 0 and <= 1. You would then have a table like: CREATE TABLE geospatial ( space text, x double, y double, item text, m1, m2, m3, primary key ((space), x, y, m1, m2, m3, m4, m5) ); A query of select * where space = '1,1' and x <1 and x >0.5 and y< 0.2

Re: Smart Table creation for 2D range query

2017-05-08 Thread Anthony Grasso
Hi Lydia, Yes. This will define the *x*, *y* columns as the components of the partition key. Note that by doing this both *x* and *y* values will be required to at a minimum to perform a valid query. Alternatively, the *x* and *y* values could be combined in into a single text field as Jon has

Re: Smart Table creation for 2D range query

2017-05-07 Thread Lydia Ickler
y-coordinates, accompanied by some columns with >> meta information (m1, ... ,m5). There will be around 100,000,000 rows >> overall. Some rows might have the same (x,y) pairs but always distinct meta >> information. >> >> In the end I want to do a rather simple

Re: Smart Table creation for 2D range query

2017-05-05 Thread Jon Haddad
gt;> tackle a table creation / indexing in a sophisticated way. >> >> My aim is to store x- and y-coordinates, accompanied by some columns with >> meta information (m1, ... ,m5). There will be around 100,000,000 rows >> overall. Some rows might have the same (x,y) pair

Re: Smart Table creation for 2D range query

2017-05-05 Thread Nitan Kainth
. > > In the end I want to do a rather simple range query in the form of e.g. (0 >= > x <= 1) AND (0 >= y <= 1). > > What would be the best choice of variables to set as primary key, partition > key. Or should I use a index? And if so on w

Smart Table creation for 2D range query

2017-05-05 Thread Lydia
. Some rows might have the same (x,y) pairs but always distinct meta information. In the end I want to do a rather simple range query in the form of e.g. (0 >= x <= 1) AND (0 >= y <= 1). What would be the best choice of variables to set as primary key, partition key. Or should I

Re: Will query on PK read entire partition?

2017-04-25 Thread Vladimir Yudovin
jel...@gmail.com>: If I have a table like this: PRIMARY KEY ((userid),deviceid) And I query SELECT * FROM devices where userid= ? and deviceid = ? Will cassandra read the entire partition for the userid? So if I lots of tombstones for userid, will they get scanned? I guess this dep

Re: Will query on PK read entire partition?

2017-04-21 Thread Alain RODRIGUEZ
pache Cassandra Consulting http://www.thelastpickle.com 2017-04-21 10:44 GMT+02:00 Oskar Kjellin : > If I have a table like this: > > PRIMARY KEY ((userid),deviceid) > > And I query > SELECT * FROM devices where userid= ? and deviceid = ? > > Will cassandra read the entire

Will query on PK read entire partition?

2017-04-21 Thread Oskar Kjellin
If I have a table like this: PRIMARY KEY ((userid),deviceid) And I query SELECT * FROM devices where userid= ? and deviceid = ? Will cassandra read the entire partition for the userid? So if I lots of tombstones for userid, will they get scanned? I guess this depends on how the bloomfilter is

Re: Query on Data Modelling of a specific usecase

2017-04-20 Thread Naresh Yadav
Hi Jon, Thanks for your guidance. In above mentioned table i can have different scale depending on Report. One report may have 1 rows. Second report may have half million rows. Third report may have 1 million rows. Fourth report may have 10 million rows. As this is timeseries data that was

Re: Query on Data Modelling of a specific usecase

2017-04-19 Thread Jon Haddad
How much data do you plan to store in each table? I’ll be honest, this doesn’t sound like a Cassandra use case at first glance. 1 table per report x 1000 is going to be a bad time. Odds are with different queries, you’ll need multiple views, so lets call that a handful of tables per report.

Re: Query on Data Modelling of a specific usecase

2017-04-18 Thread Naresh Yadav
Looking for cassandra expert's recommendation on above usecase, please reply. On Mon, Apr 17, 2017 at 7:37 PM, Naresh Yadav wrote: > Hi all, > > This is my existing table configured on apache-cassandra-3.0.9: > > CREATE TABLE report_id1 ( >mc_id text, >tag_id text, >e_date timestamp.

Query on Data Modelling of a specific usecase

2017-04-17 Thread Naresh Yadav
Hi all, This is my existing table configured on apache-cassandra-3.0.9: CREATE TABLE report_id1 ( mc_id text, tag_id text, e_date timestamp. value text PRIMARY KEY ((mc_id, tag_id), e_date) } I create table dynamically for each report from application. Need to support upto 1000 re

Re: Very odd & inconsistent results from SASI query

2017-03-20 Thread Voytek Jarnot
xes are stored individually on each node what you're >>> suggesting sounds exactly like a consistency issue. the fact that you read >>> 0 cells on one query implies the node that got the query did not have any >>> data for the row. The reason you would sometimes see

Re: Very odd & inconsistent results from SASI query

2017-03-20 Thread Voytek Jarnot
h node what you're >> suggesting sounds exactly like a consistency issue. the fact that you read >> 0 cells on one query implies the node that got the query did not have any >> data for the row. The reason you would sometimes see different behaviours >> is likely becau

Re: Very odd & inconsistent results from SASI query

2017-03-20 Thread Voytek Jarnot
twork issues may be. On Mon, Mar 20, 2017 at 2:42 PM, kurt greaves wrote: > As secondary indexes are stored individually on each node what you're > suggesting sounds exactly like a consistency issue. the fact that you read > 0 cells on one query implies the node that got the query did

Re: Very odd & inconsistent results from SASI query

2017-03-20 Thread kurt greaves
As secondary indexes are stored individually on each node what you're suggesting sounds exactly like a consistency issue. the fact that you read 0 cells on one query implies the node that got the query did not have any data for the row. The reason you would sometimes see different behaviou

Re: Very odd & inconsistent results from SASI query

2017-03-17 Thread Voytek Jarnot
ng the index). > > Further confounding the issue is that if my testers run these same queries > with the same parameters tomorrow, they're likely to work correctly. > > Only thing I've been able to glean from tracing execution is that the > queries that work follow "

Very odd & inconsistent results from SASI query

2017-03-17 Thread Voytek Jarnot
oblems, but it is Q3 that sometimes does not work and that's a simply equality comparison (although still using the index). Further confounding the issue is that if my testers run these same queries with the same parameters tomorrow, they're likely to work correctly. Only thing I've been

Re: Trouble implementing CAS operation with LWT query

2017-02-22 Thread Edward Capriolo
On Wed, Feb 22, 2017 at 8:42 AM, 안정아 wrote: > Hi, all > > > > I'm trying to implement a typical CAS operation with LWT query(conditional > update). > > But I'm having trouble keeping integrity of the result when > WriteTimeoutException occurs. > > ac

Trouble implementing CAS operation with LWT query

2017-02-22 Thread 안정아
Hi, all   I'm trying to implement a typical CAS operation with LWT query(conditional update). But I'm having trouble keeping integrity of the result when WriteTimeoutException occurs. according to http://www.datastax.com/dev/blog/cassandra-error-handling-done-right "If

Re: is there a query to find out the largest partition in a table?

2017-02-18 Thread Kant Kodali
: > is there a query to find out the largest partition in a table? Does the > query below give me the largest partition? > > select max(mean_partition_size) from size_estimates ; > > Thanks, > Kant >

is there a query to find out the largest partition in a table?

2017-02-18 Thread Kant Kodali
is there a query to find out the largest partition in a table? Does the query below give me the largest partition? select max(mean_partition_size) from size_estimates ; Thanks, Kant

RE: Query on Cassandra clusters

2017-01-03 Thread SEAN_R_DURITY
[mailto:sumit.anve...@gmail.com] Sent: Wednesday, December 21, 2016 3:47 PM To: user@cassandra.apache.org Subject: Re: Query on Cassandra clusters Thank you Alain for the detailed explanation. To answer you question on Java version, JVM settings and Memory usage. We are using using 1.8.0_45

Re: Query

2016-12-30 Thread Work
eeds to be handled. > > > > Can anyone please tell me some big name who is using Cassandra for handling > its huge data sets like Twitter etc. > > > > Sent from Outlook > > > > From: Edward Capriolo > Sent: Friday, December 30, 2016 5:53 AM >

RE: Query

2016-12-30 Thread SEAN_R_DURITY
studies, too, with their enterprise version of Cassandra: http://www.datastax.com/resources/casestudies Sean Durity From: Sikander Rafiq [mailto:hafiz_ra...@hotmail.com] Sent: Friday, December 30, 2016 8:00 AM To: user@cassandra.apache.org Subject: Re: Query Thanks for your comments/suggestions

Re: Query

2016-12-30 Thread Sikander Rafiq
.apache.org Subject: Re: Query You should start with understanding your needs. Once you understand your need you can pick the software that fits your need. Staring with a software stack is backwards. On Thu, Dec 29, 2016 at 11:34 PM, Ben Slater mailto:ben.sla...@instaclustr.com>> wrote:

Re: Query

2016-12-29 Thread Edward Capriolo
You should start with understanding your needs. Once you understand your need you can pick the software that fits your need. Staring with a software stack is backwards. On Thu, Dec 29, 2016 at 11:34 PM, Ben Slater wrote: > I wasn’t familiar with Gizzard either so I thought I’d take a look. The >

Re: Query

2016-12-29 Thread Ben Slater
I wasn’t familiar with Gizzard either so I thought I’d take a look. The first things on their github readme is: *NB: This project is currently not recommended as a base for new consumers.* (And no commits since 2013) So, Cassandra definitely looks like a better choice as your datastore for a new p

Re: Query

2016-12-29 Thread Manoj Khangaonkar
I am not that familiar with gizzard but with gizzard + mysql , you have multiple moving parts in the system that need to managed separately. You'll need the mysql expert for mysql and the gizzard expert to manage the distributed part. It can be argued that long term this will have higher adminstrat

Query

2016-12-29 Thread Sikander Rafiq
Hi, I'm exploring Cassandra for handling large data sets for mobile app, but i'm not clear where it stands. If we use MySQL as underlying database and Gizzard for building custom distributed databases (with arbitrary storage technology) and Memcached for highly queried data, then where lies

Re: Comment on query performance

2016-12-29 Thread Ashutosh Dhundhara
undhara < >>> ashutoshdhundh...@yahoo.com> wrote: >>> >>>> Hi All, >>>> >>>> I have a table like this: >>>> >>>> CREATE TABLE IF NOT EXISTS Posts ( >>>> idObject int, >>>> objectType t

Re: Comment on query performance

2016-12-29 Thread DuyHai Doan
EATE TABLE IF NOT EXISTS Posts ( >>> idObject int, >>> objectType text, >>> idParent int, >>> id int, >>> idResolution int, >>> PRIMARY KEY ((idObject, objectType, idParent), id) >>> ); >>> >>> Now hav

Re: Comment on query performance

2016-12-29 Thread Ashutosh Dhundhara
>> >> CREATE TABLE IF NOT EXISTS Posts ( >> idObject int, >> objectType text, >> idParent int, >> id int, >> idResolution int, >> PRIMARY KEY ((idObject, objectType, idParent), id) >> ); >> >> Now have a look at th

Re: Comment on query performance

2016-12-29 Thread DuyHai Doan
t), id) > ); > > Now have a look at the following query: > > SELECT * FROM POSTS WHERE idobject = 1 AND objectType = 'COURSE' AND idParent > = 0 AND idResolution = 1 ALLOW FILTERING > > Now the Partition Key is completely known, so if I use ALLOW FILTERING is >

Comment on query performance

2016-12-29 Thread Ashutosh Dhundhara
Hi All, I have a table like this: CREATE TABLE IF NOT EXISTS Posts ( idObject int, objectType text, idParent int, id int, idResolution int, PRIMARY KEY ((idObject, objectType, idParent), id) ); Now have a look at the following query: SELECT * FROM POSTS WHERE idobject

Re: Query on Cassandra clusters

2016-12-21 Thread Sumit Anvekar
Thank you Alain for the detailed explanation. To answer you question on Java version, JVM settings and Memory usage. We are using using 1.8.0_45. precisely >java -version java version "1.8.0_45" Java(TM) SE Runtime Environment (build 1.8.0_45-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02

Re: Query on Cassandra clusters

2016-12-21 Thread Alain RODRIGUEZ
Hi Sumit, 1. I have a Cassandra cluster with 11 nodes, 5 of which have Cassandra > version 3.0.3 and then newer 5 nodes have 3.6.0 version. I strongly recommend to: - Stick with one version of Apache Cassandra per cluster. - Always be as close as possible from the last minor release of t

Query on Cassandra clusters

2016-12-20 Thread Sumit Anvekar
I have a couple questions. 1. I have a Cassandra cluster with 11 nodes, 5 of which have Cassandra version 3.0.3 and then newer 5 nodes have 3.6.0 version. I has been running fine until recently I am seeing higher amount of data residing in newer boxes. The configuration file (YAML file) is exactly

Re: Why does `now()` produce different times within the same query?

2016-12-03 Thread Jeff Jirsa
On 2016-12-03 08:44 (-0800), Edward Capriolo wrote: > On Sat, Dec 3, 2016 at 11:01 AM, Edward Capriolo > wrote: > > > > > > > A new unique timeuuid (at the time where the statement using it is > > executed). > > > > Indicates that each statement has one unique time uuid. Calling the udf > >

Re: Why does `now()` produce different times within the same query?

2016-12-03 Thread Edward Capriolo
d >>>>>>> of >>>>>>> derailing threads. I will just note though that if we're not talking >>>>>>> about >>>>>>> a confusion issue but rather how to get a timeuuid to be fixed within a >>>>>&g

Re: Why does `now()` produce different times within the same query?

2016-12-03 Thread Edward Capriolo
gt;>>>>> that, but it's a different problem really and I'm not a fond of derailing >>>>>> threads. I will just note though that if we're not talking about a >>>>>> confusion issue but rather how to get a timeuuid to be fixed within a >>>>>> statement, then

Re: Why does `now()` produce different times within the same query?

2016-12-03 Thread Edward Capriolo
then there is much much more trivial solution: generate it >>>>> client side. The `now()` function is a small convenience but there is >>>>> nothing you cannot do without it client side, and that actually basically >>>>> stands for almost any use of (non aggre

Re: Why does `now()` produce different times within the same query?

2016-12-03 Thread Jonathan Haddad
use of (non aggregate) function in Cassandra > currently. > > > > > "Food for thought: Hive's UDFs introduced an annotation > @UDFType(deterministic > = false) > > > http://dmtolpeko.com/2014/10/15/invoking-stateful-udf-at-map-and-reduce-side-in-hive/ &g

Re: Why does `now()` produce different times within the same query?

2016-12-03 Thread Edward Capriolo
client side. The `now()` function is a small convenience but there is >>> nothing you cannot do without it client side, and that actually basically >>> stands for almost any use of (non aggregate) function in Cassandra >>> currently. >>> >>> >>>>

Re: Why does `now()` produce different times within the same query?

2016-12-02 Thread Jonathan Haddad
or thought: Hive's UDFs introduced an annotation > @UDFType(deterministic > = false) > > > http://dmtolpeko.com/2014/10/15/invoking-stateful-udf-at-map-and-reduce-side-in-hive/ > > The effect is the query planner can see when such a UDF is in use and > determine the value

Re: Why does `now()` produce different times within the same query?

2016-12-02 Thread Edward Capriolo
gt;> >> >> "Food for thought: Hive's UDFs introduced an annotation >> @UDFType(deterministic = false) >> >> http://dmtolpeko.com/2014/10/15/invoking-stateful-udf-at-map >> -and-reduce-side-in-hive/ >> >> The effect is the query planner can s

Re: Why does `now()` produce different times within the same query?

2016-12-01 Thread Ben Bromhead
round behaviour. And how is >that actually useful: you're having different result anyway and you're >letting the server pick the timestamp in the first place, so you're > probably >not caring about milliseconds precision of that timestamp in the first > place.

Re: Why does `now()` produce different times within the same query?

2016-12-01 Thread Marko Švaljek
One millisecond is not an issue in most of Internet of Things projects out there. There are lots of connection related things that add far more latency to the requests than that. Especially if you take into account the time it takes for the data to actually come to a cassandra node in the backgroun

Re: Why does `now()` produce different times within the same query?

2016-12-01 Thread Cody Yancey
On Thu, Dec 1, 2016 at 11:09 AM Sylvain Lebresne wrote: > there is much much more trivial solution: generate it client side. The > `now()` function is a small convenience but there is nothing you cannot do > without it client side > Please see my post above as to why this is a bad idea for inser

Re: Why does `now()` produce different times within the same query?

2016-12-01 Thread Edward Capriolo
gt;> >> >> "Food for thought: Hive's UDFs introduced an annotation >> @UDFType(deterministic = false) >> >> http://dmtolpeko.com/2014/10/15/invoking-stateful-udf-at-map >> -and-reduce-side-in-hive/ >> >> The effect is the query planner can s

Re: Why does `now()` produce different times within the same query?

2016-12-01 Thread Jonathan Haddad
gt; > > > > "Food for thought: Hive's UDFs introduced an annotation > @UDFType(deterministic > = false) > > > http://dmtolpeko.com/2014/10/15/invoking-stateful-udf-at-map-and-reduce-side-in-hive/ > > The effect is the query planner can see when such a UDF is in u

Re: Why does `now()` produce different times within the same query?

2016-12-01 Thread Sylvain Lebresne
ent side, and that actually basically stands for almost any use of (non aggregate) function in Cassandra currently. > > > "Food for thought: Hive's UDFs introduced an annotation > @UDFType(deterministic = false) > > http://dmtolpeko.com/2014/10/15/invoking-stateful-u

Re: Why does `now()` produce different times within the same query?

2016-12-01 Thread Bruce Heath
Get Outlook for Android<https://aka.ms/ghei36> From: Edward Capriolo Sent: Thursday, December 1, 2016 10:44:10 AM To: user@cassandra.apache.org Subject: Re: Why does `now()` produce different times within the same query? On Thu, Dec 1, 2016 at 4:06 AM, S

Re: Why does `now()` produce different times within the same query?

2016-12-01 Thread Edward Capriolo
>> >>>> >>>> *Daemeon C.M. ReiydelleUSA (+1) 415.501.0198 <(415)%20501-0198>London >>>> (+44) (0) 20 8144 9872 <+44%2020%208144%209872>* >>>> >>>> On Wed, Nov 30, 2016 at 6:16 PM, Cody Yancey wrote: >>>> >>

Re: Why does `now()` produce different times within the same query?

2016-12-01 Thread Sylvain Lebresne
ner case, and it is a corner case that breaks >>> Internet-of-Things applications. We can tightly control clock skew in our >>> cluster. We most definitely CANNOT control clock skew on the thousands of >>> sensors that write to our cluster. >>> >>> Thanks, >>

Re: Why does `now()` produce different times within the same query?

2016-11-30 Thread Benjamin Roth
PM, Robert Wille wrote: >> >> In my opinion, this is not broken and “fixing” it would break existing >> code. Consider a batch that includes multiple inserts, each of which >> inserts the value returned by now(). Getting the same UUID for each insert >> would be a maj

Re: Why does `now()` produce different times within the same query?

2016-11-30 Thread Ben Bromhead
be a major problem. > > Cheers > > Robert > > > On Nov 30, 2016, at 4:46 PM, Todd Fast wrote: > > FWIW I'd suggest opening a bug--this behavior is certainly quite > unexpected and more than just a documentation issue. In general I can't > imagine any des

Re: Why does `now()` produce different times within the same query?

2016-11-30 Thread Edward Capriolo
a batch that includes multiple inserts, each of which >>>> inserts the value returned by now(). Getting the same UUID for each insert >>>> would be a major problem. >>>> >>>> Cheers >>>> >>>> Robert >>>> >>>> &g

Re: Why does `now()` produce different times within the same query?

2016-11-30 Thread Cody Yancey
a bug--this behavior is certainly quite >>> unexpected and more than just a documentation issue. In general I can't >>> imagine any desirable properties of the current implementation, and there >>> are likely a bunch of latent bugs sitting out there, so it should be fixe

Re: Why does `now()` produce different times within the same query?

2016-11-30 Thread daemeon reiydelle
ior is certainly quite >> unexpected and more than just a documentation issue. In general I can't >> imagine any desirable properties of the current implementation, and there >> are likely a bunch of latent bugs sitting out there, so it should be fixed. >> >&g

Re: Why does `now()` produce different times within the same query?

2016-11-30 Thread Cody Yancey
t should be fixed. > > Todd > > On Wed, Nov 30, 2016 at 12:37 PM Terry Liu wrote: > >> Sorry for my typo. Obviously, I meant: >> "It appears that a single query that calls Cassandra's`now()` time >> function *multiple times *may actually cause a que

Re: Why does `now()` produce different times within the same query?

2016-11-30 Thread Robert Wille
of latent bugs sitting out there, so it should be fixed. Todd On Wed, Nov 30, 2016 at 12:37 PM Terry Liu mailto:t...@turnitin.com>> wrote: Sorry for my typo. Obviously, I meant: "It appears that a single query that calls Cassandra's`now()` time function multiple times may actually

Re: Why does `now()` produce different times within the same query?

2016-11-30 Thread Todd Fast
Todd On Wed, Nov 30, 2016 at 12:37 PM Terry Liu wrote: > Sorry for my typo. Obviously, I meant: > "It appears that a single query that calls Cassandra's`now()` time > function *multiple times *may actually cause a query to write or return > different times." > >

Re: Why does `now()` produce different times within the same query?

2016-11-30 Thread Terry Liu
Sorry for my typo. Obviously, I meant: "It appears that a single query that calls Cassandra's`now()` time function *multiple times *may actually cause a query to write or return different times." Less of a surprise now that I realize more about the implementation, but I agree tha

Re: Why does `now()` produce different times within the same query?

2016-11-29 Thread Marko Švaljek
-11-29 22:49 GMT+01:00 Terry Liu : > It appears that a single query that calls Cassandra's `now()` time > function may actually cause a query to write or return different times. > > Is this the expected or defined behavior, and if so, why does it behave > like this rather th

Re: Why does `now()` produce different times within the same query?

2016-11-29 Thread Ariel Weisberg
s://docs.datastax.com/en/cql/3.3/cql/cql_using/useWritetime.html for each column. Writetime didn't seem have hits in the Apache docs so I linked to the Datastax docs. I'll see about getting them updated. Regards, Ariel On Tue, Nov 29, 2016, at 04:49 PM, Terry Liu wrote: > It appears that a sing

Why does `now()` produce different times within the same query?

2016-11-29 Thread Terry Liu
It appears that a single query that calls Cassandra's `now()` time function may actually cause a query to write or return different times. Is this the expected or defined behavior, and if so, why does it behave like this rather than evaluating `now()` once across an entire statement? This r

"java.io.IOError: java.io.EOFException: EOF after 13889 bytes out of 460861" occured when I query from a table

2016-10-31 Thread ????/??????
he 'viewA' and 'tblA' using cql, it throw the follwing exception. query from viewA: "ServerError: " and query from tblA: "ServerError: " My system version is : Cassandra 3.7 + spark1.6.2 + Spark Cassandra Connec

Re: Cassandra failure during read query at consistency QUORUM (2 responses were required but only 0 replica responded, 2 failed)

2016-10-30 Thread Denis Mikhaylov
> We’re running Cassandra 3.9 > > On the application side I see failed reads with this exception > com.datastax.driver.core.exceptions.ReadFailureException: Cassandra failure > during read query at consistency QUORUM (2 responses were required but only 0 > replica resp

Re: Cassandra failure during read query at consistency QUORUM (2 responses were required but only 0 replica responded, 2 failed)

2016-10-28 Thread Edward Capriolo
with this exception > com.datastax.driver.core.exceptions.ReadFailureException: Cassandra > failure during read query at consistency QUORUM (2 responses were required > but only 0 replica responded, 2 failed) > > On the server side we see: > > WARN [SharedPool-Worker-3] 2016-10-28 13:28:22,965 > AbstractLocalAwareE

Cassandra failure during read query at consistency QUORUM (2 responses were required but only 0 replica responded, 2 failed)

2016-10-28 Thread Denis Mikhaylov
Hi! We’re running Cassandra 3.9 On the application side I see failed reads with this exception com.datastax.driver.core.exceptions.ReadFailureException: Cassandra failure during read query at consistency QUORUM (2 responses were required but only 0 replica responded, 2 failed) On the server

Re: Cannot restrict clustering columns by IN relations when a collection is selected by the query

2016-10-27 Thread DuyHai Doan
assigned_members list,* > * votes list>,* > *labels list>,* > * PRIMARY KEY ( project_id, member_id, ticket_id )* > *);* > > I have a scenario where I need to show all tickets for a particular > project, by a group of member ids. > > I think it woul

Cannot restrict clustering columns by IN relations when a collection is selected by the query

2016-10-27 Thread Ali Akhtar
enario where I need to show all tickets for a particular project, by a group of member ids. I think it would be more efficient to do this as an IN query of the type: *project_id = x AND member_id IN (...)*, instead of doing multiple queries of: *project_id = x AND member_id = y* I tried to setup an ac

Re: Cannot restrict clustering columns by IN relations when a collection is selected by the query

2016-10-23 Thread Samba
n...@choicehotels.com> wrote: > >> Hello >> >> Consider the following schema: >> >> CREATE TABLE rates_by_code ( >> hotel_id text, >> rate_code text, >> rates set, >> description text, >> PRIMARY KEY ((hotel_id), rate_

Re: Cannot restrict clustering columns by IN relations when a collection is selected by the query

2016-10-21 Thread DuyHai Doan
E TABLE rates_by_code ( > hotel_id text, > rate_code text, > rates set, > description text, > PRIMARY KEY ((hotel_id), rate_code) > ); > > When executing the query: > > select rates from rates_by_code where hotel_id='AZ123' and rate_code IN > ('ABC

Cannot restrict clustering columns by IN relations when a collection is selected by the query

2016-10-21 Thread Jeff Carpenter
Hello Consider the following schema: CREATE TABLE rates_by_code ( hotel_id text, rate_code text, rates set, description text, PRIMARY KEY ((hotel_id), rate_code) ); When executing the query: select rates from rates_by_code where hotel_id='AZ123' and rate_code IN ('ABC

Re: Java Driver - Specifying parameters for an IN() query?

2016-10-11 Thread Justin Cameron
Example: 'Select * from my_table WHERE pk = 'test' And ck IN (1, 2)' On Tue, 11 Oct 2016 at 06:15 Ali Akhtar wrote: If I wanted to create an accessor, and have a method which does a query like this: 'Select * from my_table WHERE pk = ? And ck IN (?)' And there

Re: Java Driver - Specifying parameters for an IN() query?

2016-10-11 Thread Justin Cameron
umn in the partition key and/or the last column in the full primary key. Example: 'Select * from my_table WHERE pk = 'test' And ck IN (1, 2)' On Tue, 11 Oct 2016 at 06:15 Ali Akhtar wrote: If I wanted to create an accessor, and have a method which does a query like this

Re: Java Driver - Specifying parameters for an IN() query?

2016-10-11 Thread Ali Akhtar
in the > full primary key. > > Example: > > 'Select * from my_table WHERE pk = 'test' And ck IN (1, 2)' > > > On Tue, 11 Oct 2016 at 06:15 Ali Akhtar wrote: > > If I wanted to create an accessor, and have a method which does a query > like thi

Re: Java Driver - Specifying parameters for an IN() query?

2016-10-11 Thread Ali Akhtar
the brackets around the question mark) > > regards, > Ch > > On Tue, Oct 11, 2016 at 3:14 PM, Ali Akhtar wrote: > >> If I wanted to create an accessor, and have a method which does a query >> like this: >> >> 'Select * from my_table WHERE pk = ? And ck IN

Re: Java Driver - Specifying parameters for an IN() query?

2016-10-11 Thread Ali Akhtar
umn in the > full primary key. > > Example: > > 'Select * from my_table WHERE pk = 'test' And ck IN (1, 2)' > > > On Tue, 11 Oct 2016 at 06:15 Ali Akhtar wrote: > >> If I wanted to create an accessor, and have a method which does a query >>

Re: Java Driver - Specifying parameters for an IN() query?

2016-10-11 Thread horschi
Hi Ali, do you perhaps want "'Select * from my_table WHERE pk = ? And ck IN ?'" ? (Without the brackets around the question mark) regards, Ch On Tue, Oct 11, 2016 at 3:14 PM, Ali Akhtar wrote: > If I wanted to create an accessor, and have a method which does a query &

Re: Java Driver - Specifying parameters for an IN() query?

2016-10-11 Thread Justin Cameron
htar wrote: > If I wanted to create an accessor, and have a method which does a query > like this: > > 'Select * from my_table WHERE pk = ? And ck IN (?)' > > And there were multiple options that could go inside the IN() query, how > can I specify that? Will it

Java Driver - Specifying parameters for an IN() query?

2016-10-11 Thread Ali Akhtar
If I wanted to create an accessor, and have a method which does a query like this: 'Select * from my_table WHERE pk = ? And ck IN (?)' And there were multiple options that could go inside the IN() query, how can I specify that? Will it e.g, let me pass in an array as the 2nd variable?

Re: Doing a calculation in a query?

2016-10-10 Thread DuyHai Doan
ded) > > If order made on Jan 1, but not yet shipped, and today is Jan 10th, then > shipment_delay = 10 days. > > I then need to sort the orders in the order of 'shipment_delay desc', i.e > show the orders which took the longest, at the top. > > Is it possible to def

Doing a calculation in a query?

2016-10-10 Thread Ali Akhtar
ders in the order of 'shipment_delay desc', i.e show the orders which took the longest, at the top. Is it possible to define 'shipment_delay' at the table or query level, so it can be used in the 'order by' clause, or if this ordering will have to be done myself after the data is received? Thanks.

Re: How to query '%' character using LIKE operator in Cassandra 3.7?

2016-10-04 Thread Mikhail Krupitskiy
Please see my comments inline. Thanks, Mikhail > On 26 Sep 2016, at 17:07, DuyHai Doan wrote: > > "In the current implementation (‘%’ could be a wildcard only at the start/end > of a term) I guess it should be ’ENDS with ‘%escape’ ‘." > > --> Yes in the current impl, it means ENDS WITH '%esca

Contains-query leads to error when list in selected row is empty

2016-09-28 Thread Michael Mirwaldt
#x27;2'} AND durable_writes = true; CREATE TABLE mykeyspace.mytable (partitionkey text, mylist list, PRIMARY KEY (partitionkey)); If I add the value INSERT INTO mykeyspace.mytable(partitionkey,mylist) VALUES('A',['1']); and query sel

Re: How to query '%' character using LIKE operator in Cassandra 3.7?

2016-09-26 Thread DuyHai Doan
"In the current implementation (‘%’ could be a wildcard only at the start/end of a term) I guess it should be ’ENDS with ‘%escape’ ‘." --> Yes in the current impl, it means ENDS WITH '%escape' but we want SASI to understand the %% as an escape for % so the goal is that SASI understands LIKE '%%esc

Re: How to query '%' character using LIKE operator in Cassandra 3.7?

2016-09-26 Thread Mikhail Krupitskiy
> LIKE '%%%escape' --> EQUALS TO '%%escape' ??? In the current implementation (‘%’ could be a wildcard only at the start/end of a term) I guess it should be ’ENDS with ‘%escape’ ‘. Moreover all terms that contains single ‘%’ somewhere in the middle should cause an exception. BUT may be it’s bette

Re: How to query '%' character using LIKE operator in Cassandra 3.7?

2016-09-24 Thread DuyHai Doan
Reminder, right now, the % character is only interpreted as wildcard IF AND ONLY IF it is the first/last character of the searched term LIKE '%escape' --> ENDS WITH 'escape' If we use % to escape %, LIKE '%%escape' --> EQUALS TO '%escape' LIKE '%%%escape' --> EQUALS TO '%%escape' ??? On Fr

Re: How to query '%' character using LIKE operator in Cassandra 3.7?

2016-09-23 Thread Mikhail Krupitskiy
Hi, Jim, What pattern should be used to search “ends with ‘%escape’ “ with your conception? Thanks, Mikhail > On 22 Sep 2016, at 18:51, Jim Ancona wrote: > > To answer DuyHai's question without introducing new syntax, I'd suggest: >> LIKE '%%%escape' means STARTS WITH '%' AND ENDS WITH 'escap

Re: How to query '%' character using LIKE operator in Cassandra 3.7?

2016-09-22 Thread Jim Ancona
To answer DuyHai's question without introducing new syntax, I'd suggest: LIKE '%%%escape' means STARTS WITH '%' AND ENDS WITH 'escape' So the first two %'s are translated to a literal, non-wildcard % and the third % is a wildcard because it's not doubled. Jim On Thu, Sep 22, 2016 at 11:40 AM, M

Re: How to query '%' character using LIKE operator in Cassandra 3.7?

2016-09-22 Thread Mikhail Krupitskiy
I guess that it should be similar to how it is done in SQL for LIKE patterns. You can introduce an escape character, e.g. ‘\’. Examples: ‘%’ - any string ‘\%’ - equal to ‘%’ character ‘\%foo%’ - starts from ‘%foo’ ‘%%%escape’ - ends with ’escape’ ‘\%%’ - starts from ‘%’ ‘\\\%%’ - starts from ‘\%’

Re: How to query '%' character using LIKE operator in Cassandra 3.7?

2016-09-22 Thread DuyHai Doan
Hello Mikhail It's more complicated that it seems LIKE '%%escape' means EQUAL TO '%escape' LIKE '%escape' means ENDS WITH 'escape' What's about LIKE '%%%escape' How should we treat this case ? Replace %% by % at the beginning of the searched term ?? On Thu, Sep 22, 2016 at 3:31 PM, Mi

<    1   2   3   4   5   6   7   8   9   10   >