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

2016-09-15 Thread DuyHai Doan
and not wildcard character 2) if you're using StandardAnalyzer, it's an entirely different story. During the parsing of the search predicates by the query planer, the term 'w%a' is passed to the analyzer (StandardAnalyzer here): https://github.com/apache/cassandra/blob/trunk/src/java/org/apache

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

2016-09-15 Thread DuyHai Doan
Currently SASI can only understand the % for the beginning (suffix) or ending (prefix) position. Any expression containing the % in the middle like %w%a% will not be interpreter by SASI as wildcard. %w%a% will translate into "Give me all results containing w%a On Thu, Sep 15, 2016 at 3:58 PM,

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

2016-09-15 Thread Mikhail Krupitskiy
Thank you for the investigation. Will wait for a fix and news. Probably it’s not a directly related question but what do you think about CASSANDRA-12573? Let me know if it’s better to create a separate thread for it. Thanks, Mikhail > On 15 Sep 2016, at 16:02, DuyHai Doan

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

2016-09-15 Thread DuyHai Doan
Ok so I've found the source of the issue, it's pretty well hidden because it is NOT in the SASI source code directly. Here is the method where C* determines what kind of LIKE expression you're using (LIKE_PREFIX , LIKE CONTAINS or LIKE_MATCHES)

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

2016-09-14 Thread DuyHai Doan
Ok you're right, I get your point LIKE '%%esc%' --> startWith('%esc') LIKE 'escape%%' --> = 'escape%' What I strongly suspect is that in the source code of SASI, we parse the % xxx % expression BEFORE applying escape. That will explain the observed behavior. E.g: LIKE '%%esc%' parsed as

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

2016-09-13 Thread Mikhail Krupitskiy
Looks like we have different understanding of what results are expected. I based my understanding on http://docs.datastax.com/en/cql/3.3/cql/cql_using/useSASIIndex.html According to the doc ‘esc’ is a pattern for exact match

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

2016-09-13 Thread DuyHai Doan
CREATE CUSTOM INDEX ON test.escape(val) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'mode': 'CONTAINS', 'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', 'case_sensitive': 'false'}; I don't see any problem in the results you got SELECT *

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

2016-09-13 Thread Mikhail Krupitskiy
Thanks for the reply. Could you please provide what index definition did you use? With the index from my script I get the following results: cqlsh:test> select * from escape; id | val +--- 1 | %escapeme 2 | escape%me 3 | escape%esc Contains search cqlsh:test> SELECT * FROM

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

2016-09-13 Thread DuyHai Doan
Use % to escape % cqlsh:test> select * from escape; id | val +--- 1 | %escapeme 2 | escape%me Contains search cqlsh:test> SELECT * FROM escape WHERE val LIKE '%%esc%'; id | val +--- 1 | %escapeme (1 rows) Prefix search cqlsh:test> SELECT * FROM escape

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

2016-09-13 Thread Mikhail Krupitskiy
Hi Cassandra guys, I use Cassandra 3.7 and wondering how to use ‘%’ as a simple char in a search pattern. Here is my test script: DROP keyspace if exists kmv; CREATE keyspace if not exists kmv WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor':'1'} ; USE kmv; CREATE TABLE if

Select..IN query specs

2016-08-30 Thread Atul Saroha
I understand *IN* query only allowed on clustering columns. Just want to understand: why is it not allowed on non-primary columns with ALLOW FILTERING in case of "where clause" containing all partition keys with it. Can someone guide me to a DOC/Blog for better und

Slow query date without hour, minute,seconds.

2016-07-19 Thread Yuan Fang
The date column all look like below: The hour,minute,second: 00:00:00+. I really want to know when exactly(hour, minute) those slow queries happen. Does any one know how? Thanks so much! node_ip | date 172.31.44.252 | 2016-07-18 00:00:00+ 172.31.44.252 | 2016-07-18 00:00:00+

Re: select query on entire primary key returning more than one row in result

2016-06-14 Thread Bhuvan Rawal
>> +--- >> 0 | 1 >> 0 | 2 >> 0 | 3 >> >> We can verify this claim by applying 11513 Patch to 3.5 Tag and build & >> test for 12003. If it is fixed then we can guarantee the claim. Let me >> know if any further input may possibly be

Re: select query on entire primary key returning more than one row in result

2016-06-14 Thread Joel Knighton
now if any further input may possibly be required here. > > On Wed, Jun 15, 2016 at 2:23 AM, Joel Knighton <joel.knigh...@datastax.com > > wrote: > >> The important part of that query is that it's selecting a static column >> (with select *), not whether it is

Re: select query on entire primary key returning more than one row in result

2016-06-14 Thread Bhuvan Rawal
Joel Knighton <joel.knigh...@datastax.com> wrote: > The important part of that query is that it's selecting a static column > (with select *), not whether it is filtering on one. In CASSANDRA-12003 and > this thread, it looks like you're only selecting the primary and clustering >

Re: select query on entire primary key returning more than one row in result

2016-06-14 Thread Bhuvan Rawal
I have verified this issue to be fixed in 3.6 and 3.7. And the issue mentioned on this thread is fixed as well. On Wed, Jun 15, 2016 at 12:43 AM, Bhuvan Rawal wrote: > Joel, > > If we look at the schema carefully: > > CREATE TABLE test0 ( > pk int, > a int, > b

Re: select query on entire primary key returning more than one row in result

2016-06-14 Thread Bhuvan Rawal
Joel, If we look at the schema carefully: CREATE TABLE test0 ( pk int, a int, b text, s text static, PRIMARY KEY (*pk, a)* ); and filtering is performed on clustering column a and its not a static column: select * from test0 where pk=0 and a=2; On Wed, Jun 15, 2016 at

Re: select query on entire primary key returning more than one row in result

2016-06-14 Thread Joel Knighton
It doesn't seem to be an exact duplicate - CASSANDRA-11513 relies on you selecting a static column, which you weren't doing in the reported issue. That said, I haven't looked too closely. On Tue, Jun 14, 2016 at 2:07 PM, Bhuvan Rawal wrote: > I can reproduce CASSANDRA-11513

Re: select query on entire primary key returning more than one row in result

2016-06-14 Thread Bhuvan Rawal
I can reproduce CASSANDRA-11513 locally on 3.5, possible duplicate. On Wed, Jun 15, 2016 at 12:29 AM, Joel Knighton wrote: > There's some precedent for similar issues with static columns in 3.5 with >

Re: select query on entire primary key returning more than one row in result

2016-06-14 Thread Joel Knighton
There's some precedent for similar issues with static columns in 3.5 with https://issues.apache.org/jira/browse/CASSANDRA-11513 - a deterministic (or somewhat deterministic) path for reproduction would help narrow the issue down farther. I've played around locally with similar schemas (sans the

Re: select query on entire primary key returning more than one row in result

2016-06-14 Thread Bhuvan Rawal
Jira CASSANDRA-12003 Has been created for the same. On Tue, Jun 14, 2016 at 11:54 PM, Atul Saroha wrote: > Hi Tyler, > > This issue is mainly visible for tables having static columns, still > investigating. > We

Re: select query on entire primary key returning more than one row in result

2016-06-14 Thread Atul Saroha
Hi Tyler, This issue is mainly visible for tables having static columns, still investigating. We will try to test after removing lucene index but I don’t think this plug-in could led to change in behaviour of cassandra write to table's memtable.

Re: select query on entire primary key returning more than one row in result

2016-06-14 Thread Siddharth Verma
id is partition key, f_name is clustering key We weren't querying on lucene indexes. lucene index is on id, and f_d_name (another column). We were facing this issue on production in one column family, due to which we had to downgrade to 3.0.3

Re: select query on entire primary key returning more than one row in result

2016-06-14 Thread Tyler Hobbs
Is 'id' your partition key? I'm not familiar with the stratio indexes, but it looks like the primary key columns are both indexed. Perhaps this is related? On Tue, Jun 14, 2016 at 1:25 AM, Atul Saroha wrote: > After further debug, this issue is found in in-memory

Re: select query on entire primary key returning more than one row in result

2016-06-14 Thread Atul Saroha
After further debug, this issue is found in in-memory memtable as doing nodetool flush + compact resolve the issue. And there is no batch write used for this table which is showing issue. Table properties: WITH CLUSTERING ORDER BY (f_name ASC) > AND bloom_filter_fp_chance = 0.01 > AND

Re: select query on entire primary key returning more than one row in result

2016-06-13 Thread Siddharth Verma
No, all rows were not the same. Querying only on the partition key gives 20 rows. In the erroneous result, while querying on partition key and clustering key, we got 16 of those 20 rows. And for "*tombstone_threshold"* there isn't any entry at column family level. Thanks, Siddharth Verma

Re: select query on entire primary key returning more than one row in result

2016-06-13 Thread Anshu Vajpayee
were all rows same? If not what was different ? What was droppable tombstone compaction ratio for that table/CF? On Mon, Jun 13, 2016 at 6:11 PM, Siddharth Verma < verma.siddha...@snapdeal.com> wrote: > Running nodetool compact fixed the issue. > > Could someone help out as why it occurred. >

Re: select query on entire primary key returning more than one row in result

2016-06-13 Thread Siddharth Verma
Running nodetool compact fixed the issue. Could someone help out as why it occurred.

select query on entire primary key returning more than one row in result

2016-06-13 Thread Siddharth Verma
Hi, We are facing this issue on production, We upgraded our cassandra from 3.0.3 to 3.5 When we ran a query with partition key and clustering column(entire primary key specified), we get 16 rows in return. We have 2DC's, each with RF 3 for our keyspace. 1. We connected with cqlsh, and setting

Re: In memory code and query executions

2016-05-04 Thread Jonathan Haddad
as running a "client-mode proxy" > but same idea. > > Apparantly the embedded cassandra is by default accessed using localhost >> as hostname which will result in an IPC optimized connection I assume. >> > > Not quite sure what you mean here? > > >> Is th

Re: In memory code and query executions

2016-05-04 Thread Nate McCall
connection I assume. > Not quite sure what you mean here? > Is there a way to fully omit the Tcp/ipc stack and execute queries > directly in-memory at the cassandra database? preferrably in a (query > resultset -> to -> appcode) zero-copy approach. > > Again, yes per the li

In memory code and query executions

2016-05-02 Thread Corry Opdenakker
to fully omit the Tcp/ipc stack and execute queries directly in-memory at the cassandra database? preferrably in a (query resultset -> to -> appcode) zero-copy approach. Cheers, C.

Re: Query regarding spark on cassandra

2016-04-28 Thread Siddharth Verma
u, > > Had the issue been caused due to read, the insert, and delete statement > would have been erroneous. > "I saw the stdout from web-ui of spark, and the query along with true was > printed for both the queries.". > The statements were correct as seen on the UI. >

Re: Query regarding spark on cassandra

2016-04-28 Thread Hannu Kröger
saw the stdout from web-ui of spark, and the query along with true was > printed for both the queries.". > The statements were correct as seen on the UI. > Thanks, > Siddharth Verma > > > > On Thu, Apr 28, 2016 at 1:22 PM, Hannu Kröger <hkro...@gmail.com > <m

Re: Query regarding spark on cassandra

2016-04-28 Thread Siddharth Verma
Hi Hannu, Had the issue been caused due to read, the insert, and delete statement would have been erroneous. "I saw the stdout from web-ui of spark, and the query along with true was printed for both the queries.". The statements were correct as seen on the UI. Thanks, Siddharth Verma

Re: Query regarding spark on cassandra

2016-04-28 Thread Hannu Kröger
gt; When i run it locally, i see the respective results in the table. > > However when i run it on a cluster, sometimes the result is displayed and > sometime the changes don't take place. > I saw the stdout from web-ui of spark, and the query along with true was > printed for both the queries.

Re: Query regarding spark on cassandra

2016-04-28 Thread Siddharth Verma
in the table. >> >> However when i run it on a cluster, sometimes the result is displayed and >> sometime the changes don't take place. >> I saw the stdout from web-ui of spark, and the query along with true was >> printed for both the queries. >> >> I can't understand, what could be the issue. >> >> Any help would be appreciated. >> >> Thanks, >> Siddharth Verma >> > >

Re: Query regarding spark on cassandra

2016-04-27 Thread Siddharth Verma
tem.out.println(delete+":"+deleteStatus); > System.out.println(insert+":"+insertStatus); > > When i run it locally, i see the respective results in the table. > > However when i run it on a cluster, sometimes the result is displayed and > sometime the changes d

Query regarding spark on cassandra

2016-04-27 Thread Siddharth Verma
sometimes the result is displayed and sometime the changes don't take place. I saw the stdout from web-ui of spark, and the query along with true was printed for both the queries. I can't understand, what could be the issue. Any help would be appreciated. Thanks, Siddharth Verma

Re: Basic query in setting up secure inter-dc cluster

2016-04-25 Thread Ajay Garg
o the application-server. We don't want >> to screw things if something goes bad in DC1. >> >> >> Will be grateful for pointers. >> >> >> Thanks and Regards, >> Ajay >> >> On Sun, Jan 17, 2016 at 9:09 PM, Ajay Garg <ajaygargn...@gmail.com>

Re: Basic query in setting up secure inter-dc cluster

2016-04-17 Thread Ajay Garg
is, because DC2 is the backup centre, while DC1 is the > primary-centre connected directly to the application-server. We don't want > to screw things if something goes bad in DC1. > > > Will be grateful for pointers. > > > Thanks and Regards, > Ajay > > On Sun, Jan 17, 2016

Re: Basic query in setting up secure inter-dc cluster

2016-04-17 Thread Ajay Garg
t; Hi All. > > A gentle query-reminder. > > I will be grateful if I could be given a brief technical overview, as to > how secure-communication occurs between two nodes in a cluster. > > Please note that I wish for some information on the "how it works below > the hood",

Datastax OpsCenter - Can't connect to Cassandra All host(s) tried for query failed

2016-04-10 Thread okan özdinç
Hello Dear down votefavorite <http://stackoverflow.com/questions/36520163/datastax-opscenter-cant-connect-to-cassandra-all-hosts-tried-for-query-fail#> I have a two node and I installed DataStax OpsCenter on 10.5.0.201 but *I give error ( Unable connect to any seed nodes )

Re: Inconsistent query results and node state

2016-03-31 Thread Tyler Hobbs
On Thu, Mar 31, 2016 at 11:53 AM, Jason Kania <jason.ka...@ymail.com> wrote: > > To me it just seems like the timestamp column value is sometimes not being > set somewhere in the pipeline and the result is the epoch 0 value. > I agree, especially since you can't direc

Re: Inconsistent query results and node state

2016-03-31 Thread Jason Kania
Thanks for responding. The problems that we are having are in Cassandra 3.03 and 3.0.4. We had upgraded to see if the problem went away. The values have been out of sync this way for some time and we cannot get a row with the 1969 timestamp in any query that directly queries on the timestamp

Re: Inconsistent query results and node state

2016-03-31 Thread Jason Kania
Thanks for the response. All nodes are using NTP. Thanks, Jason From: Kai Wang <dep...@gmail.com> To: user@cassandra.apache.org; Jason Kania <jason.ka...@ymail.com> Sent: Wednesday, March 30, 2016 10:59 AM Subject: Re: Inconsistent query results and node state Do you ha

Re: Inconsistent query results and node state

2016-03-30 Thread Tyler Hobbs
in response to nodetool compact looks like a bug. What version of Cassandra are you running? On Wed, Mar 30, 2016 at 9:59 AM, Kai Wang <dep...@gmail.com> wrote: > Do you have NTP setup on all nodes? > > On Tue, Mar 29, 2016 at 11:48 PM, Jason Kania <jason.ka...@ymail.com> &g

Re: Inconsistent query results and node state

2016-03-30 Thread Kai Wang
Do you have NTP setup on all nodes? On Tue, Mar 29, 2016 at 11:48 PM, Jason Kania <jason.ka...@ymail.com> wrote: > We have encountered a query inconsistency problem wherein the following > query returns different results sporadically with invalid values for a > timestamp fie

Inconsistent query results and node state

2016-03-29 Thread Jason Kania
We have encountered a query inconsistency problem wherein the following query returns different results sporadically with invalid values for a timestamp field looking like the field is uninitialized (a zero timestamp) in the query results. Attempts to repair and compact have not changed

Re: Query regarding CassandraJavaRDD while running spark job on cassandra

2016-03-24 Thread Kai Wang
I suggest you post this to spark-cassandra-connector list. On Sat, Mar 12, 2016 at 12:52 AM, Siddharth Verma < verma.siddha...@snapdeal.com> wrote: > In cassandra I have a table with the following schema. > > CREATE TABLE my_keyspace.my_table1 ( > col_1 text, > col_2 text, > col_3

Re: DataModelling to query date range

2016-03-24 Thread Vidur Malik
ing like this: > > start | end| valid > New York Washington 2016-01-01 > New York Washington 2016-01-31 > > So if I query for ranges that have at least one bound outside Jan (e.g Jan > 15 - Feb 15) then the query you gave will work fine. If, howe

RE: DataModelling to query date range

2016-03-24 Thread Peer, Oded
You can change the table to support Multi-column slice restrictions CREATE TABLE routes ( start text, end text, year int, month int, day int, PRIMARY KEY (start, end, year, month, day) ); Then using Multi-column slice restrictions you can query: SELECT * from routes where start = 'New York

Re: DataModelling to query date range

2016-03-24 Thread Chris Martin
t;> CREATE TABLE routes ( >> start text, >> end text, >> validFrom timestamp, >> validTo timestamp, >> PRIMARY KEY (start, end, validFrom, validTo) >> ); >> >> In this case validFrom is the date that the route becomes valid and >> validTo

Re: DataModelling to query date range

2016-03-24 Thread Chris Martin
| valid New York Washington 2016-01-01 New York Washington 2016-01-31 So if I query for ranges that have at least one bound outside Jan (e.g Jan 15 - Feb 15) then the query you gave will work fine. If, however, I query for a range that is completely inside Jan e.g all routes valid on Jan

Re: DataModelling to query date range

2016-03-23 Thread Vidur Malik
route that stops becoming valid. > > If this was SQL I could write a query to find all valid routes between New > York and Washington from Jan 1st 2016 to Jan 31st 2016 using something like: > > SELECT * from routes where start = 'New York' and end = 'Washington' and > val

DataModelling to query date range

2016-03-23 Thread Chris Martin
is the date that the route that stops becoming valid. If this was SQL I could write a query to find all valid routes between New York and Washington from Jan 1st 2016 to Jan 31st 2016 using something like: SELECT * from routes where start = 'New York' and end = 'Washington' and validFrom <= 2016

Query regarding CassandraJavaRDD while running spark job on cassandra

2016-03-11 Thread Siddharth Verma
In cassandra I have a table with the following schema. CREATE TABLE my_keyspace.my_table1 ( col_1 text, col_2 text, col_3 text, col_4 text,, col_5 text, col_6 text, col_7 text, PRIMARY KEY (col_1, col_2, col_3) ) WITH CLUSTERING ORDER BY (col_2 ASC, col_3 ASC);

Query regarding filter and where in spark on cassandra

2016-03-07 Thread Siddharth Verma
Hi, While working with spark running on top of cassandra, I wanted to do some filtering on data. It can be done either on server side(where clause while cassandraTable query is written) or on client side(filter transformation on rdd). Which one of them is preferred keeping performance and time

Re: "Not enough replicas available for query" after reboot

2016-02-04 Thread Bryan Cheng
>> >> *From:* Flavien Charlon [mailto:flavien.char...@gmail.com] >> *Sent:* Thursday, February 04, 2016 4:06 PM >> *To:* user@cassandra.apache.org >> *Subject:* Re: "Not enough replicas available for query" after reboot >> >> >> >>

Re: "Not enough replicas available for query" after reboot

2016-02-04 Thread Robert Coli
1 ? > b489c970-68db-44a7-90c6-be734b41475f RAC1 > > However, now the client application fails to run queries on the cluster > with: > > Cassandra.UnavailableException: Not enough replicas available for query at >> consistency Quorum (2 required but only 1 alive) > > Do *all* nodes see each other as UP/UN? =Rob

RE: "Not enough replicas available for query" after reboot

2016-02-04 Thread SEAN_R_DURITY
From: Flavien Charlon [mailto:flavien.char...@gmail.com] Sent: Thursday, February 04, 2016 4:06 PM To: user@cassandra.apache.org Subject: Re: "Not enough replicas available for query" after reboot Yes, all three nodes see all three nodes as UN. Also, connecting from a local Cassandra mac

Re: "Not enough replicas available for query" after reboot

2016-02-04 Thread Flavien Charlon
t way (without retrying). Depending on the client, you may have options >>> to set in RetryPolicy, FailoverPolicy, etc. A bounce of the client will >>> probably fix the problem for now. >>> >>> >>> >>> >>> >>> Sean Durity >

Re: "Not enough replicas available for query" after reboot

2016-02-04 Thread Flavien Charlon
Yes, all three nodes see all three nodes as UN. Also, connecting from a local Cassandra machine using cqlsh, I can run the same query just fine (with QUORUM consistency level). On 4 February 2016 at 21:02, Robert Coli <rc...@eventbrite.com> wrote: > On Thu, Feb 4, 2016 at 12:53 PM

Re: "Not enough replicas available for query" after reboot

2016-02-04 Thread Peddi, Praveen
the problem for now. Sean Durity From: Flavien Charlon [mailto:flavien.char...@gmail.com<mailto:flavien.char...@gmail.com>] Sent: Thursday, February 04, 2016 4:06 PM To: user@cassandra.apache.org<mailto:user@cassandra.apache.org> Subject: Re: "Not enough replicas available for

Re: "Not enough replicas available for query" after reboot

2016-02-04 Thread Flavien Charlon
olicy, FailoverPolicy, etc. A bounce of the client will >>>> probably fix the problem for now. >>>> >>>> >>>> >>>> >>>> >>>> Sean Durity >>>> >>>> >>>> >>>> *From:* Fl

"Not enough replicas available for query" after reboot

2016-02-04 Thread Flavien Charlon
he cluster with: Cassandra.UnavailableException: Not enough replicas available for query at > consistency Quorum (2 required but only 1 alive) The replication factor is 3. I am running Cassandra 2.1.7. Any idea where that could come from or how to troubleshoot this further? Best, Flavien

flipping ordering of returned query results

2016-01-30 Thread Jan
Folks;  Need some advice. We have a time-series application that needs the data being returned from C*     to be flipped from the typical column based data to be row based.  example :  C*    data :   A   B  C                     D  E  F  need returned data to be :                          A  D  

Re: flipping ordering of returned query results

2016-01-30 Thread Jack Krupansky
Could you clarify... is this for pairs of rows, or is it n rows with n columns, and is n a constant known before the query executes or based on the presence of non-NULL column values? And is this always adjacent rows using a clustering key - as opposed to a partition key which does not guarantee

Re: Cassandra 3.1 - Aggregation query failure

2016-01-18 Thread DuyHai Doan
A quick update on this issue. Today, when playing with UDA, I had also the exception: java.security.AccessControlException: access denied ("java.io.FilePermission" "/x/logback.xml" "read")" What is definitely strange is that by re-executing again

Re: Basic query in setting up secure inter-dc cluster

2016-01-17 Thread Ajay Garg
Hi All. A gentle query-reminder. I will be grateful if I could be given a brief technical overview, as to how secure-communication occurs between two nodes in a cluster. Please note that I wish for some information on the "how it works below the hood", and NOT "how to set it

Re: Help debugging a very slow query

2016-01-13 Thread Jeff Jirsa
;user@cassandra.apache.org" Date: Wednesday, January 13, 2016 at 12:40 PM To: "user@cassandra.apache.org" Subject: Help debugging a very slow query Hi list, Would appreciate some insight into some irregular performance we're seeing. We have a column family that has become

Re: Help debugging a very slow query

2016-01-13 Thread Robert Coli
On Wed, Jan 13, 2016 at 12:40 PM, Bryan Cheng wrote: > 1) What's up with the megapartition? What's the best way to debug this? > Our data model is largely write once, we don't do any updates. We do > DELETE, but the partitions that are giving us issues haven't been

Help debugging a very slow query

2016-01-13 Thread Bryan Cheng
6 }, { "Sessionid": "4f51fa70-ba2f-11e5-8729-e1d125cb9b2d", "Eventid": "4f526fa0-ba2f-11e5-8729-e1d125cb9b2d", "Activity": "Preparing statement", "Source": "172.31.54.46", "SourceElapsed": 79

Re: Basic query in setting up secure inter-dc cluster

2016-01-06 Thread Ajay Garg
o you want to achieve ? >> >> >> >> *From:* Ajay Garg [mailto:ajaygargn...@gmail.com] >> *Sent:* Wednesday, January 06, 2016 11:27 AM >> *To:* user@cassandra.apache.org >> *Subject:* Basic query in setting up secure inter-dc cluster >> >> >

Re: Basic query in setting up secure inter-dc cluster

2016-01-06 Thread Neha Dave
ly do you want to achieve ? > > > > *From:* Ajay Garg [mailto:ajaygargn...@gmail.com] > *Sent:* Wednesday, January 06, 2016 11:27 AM > *To:* user@cassandra.apache.org > *Subject:* Basic query in setting up secure inter-dc cluster > > > > Hi All. > > We have a

Re: Data Modeling: Partition Size and Query Efficiency

2016-01-06 Thread Jim Ancona
roblem >>>> of how to handle a small customer who becomes too big, but that will happen >>>> much less frequently than a customer filling a partition. >>>> >>>> Jim >>>> >>>> On Tue, Jan 5, 2016 at 12:21 PM, Nate McCall <n...@thelastpickle.

Re: Data Modeling: Partition Size and Query Efficiency

2016-01-05 Thread Jim Ancona
with the largest 1%. The approach to querying across multiple partitions you describe is pretty much what I have in mind. The trick is to avoid having to query 50 partitions to return a few hundred or thousand rows. I agree that sequentially filling partitions is something to avoid. That's why I'm hoping

Re: Data Modeling: Partition Size and Query Efficiency

2016-01-05 Thread Nate McCall
> > > In this case, 99% of my data could fit in a single 50 MB partition. But if > I use the standard approach, I have to split my partitions into 50 pieces > to accommodate the largest data. That means that to query the 700 rows for > my median case, I have to read 50 partiti

Re: Data Modeling: Partition Size and Query Efficiency

2016-01-05 Thread Jack Krupansky
Jim, I don't quite get why you think you would need to query 50 partitions to return merely hundreds or thousands of rows. Please elaborate. I mean, sure, for that extreme 100th percentile, yes, you would query a lot of partitions, but for the 90th percentile it would be just one. Even the 99th

Re: Data Modeling: Partition Size and Query Efficiency

2016-01-05 Thread Jim Ancona
Hi Jack, Thanks for your response. My answers inline... On Tue, Jan 5, 2016 at 11:52 AM, Jack Krupansky <jack.krupan...@gmail.com> wrote: > Jim, I don't quite get why you think you would need to query 50 partitions > to return merely hundreds or thousands of rows. Please elabo

Re: Data Modeling: Partition Size and Query Efficiency

2016-01-05 Thread Jim Ancona
to split my partitions into 50 >> pieces to accommodate the largest data. That means that to query the 700 >> rows for my median case, I have to read 50 partitions instead of one. >> >> If you try to deal with this by starting a new partition when an old one >> fi

RE: Basic query in setting up secure inter-dc cluster

2016-01-05 Thread Singh, Abhijeet
Security is a very wide concept. What exactly do you want to achieve ? From: Ajay Garg [mailto:ajaygargn...@gmail.com] Sent: Wednesday, January 06, 2016 11:27 AM To: user@cassandra.apache.org Subject: Basic query in setting up secure inter-dc cluster Hi All. We have a 2*2 cluster deployed

Basic query in setting up secure inter-dc cluster

2016-01-05 Thread Ajay Garg
Hi All. We have a 2*2 cluster deployed, but no security as of now. As a first stage, we wish to implement inter-dc security. Is it possible to enable security one machine at a time? For example, let's say the machines are DC1M1, DC1M2, DC2M1, DC2M2. If I make the changes JUST IN DC2M2 and

Re: Data Modeling: Partition Size and Query Efficiency

2016-01-05 Thread Jonathan Haddad
Tue, Jan 5, 2016 at 12:21 PM, Nate McCall <n...@thelastpickle.com> >>> wrote: >>> >>>> >>>>> In this case, 99% of my data could fit in a single 50 MB partition. >>>>> But if I use the standard approach, I have to split my partitions in

Re: Data Modeling: Partition Size and Query Efficiency

2016-01-05 Thread Jim Ancona
5, 2016 at 12:21 PM, Nate McCall <n...@thelastpickle.com> >> wrote: >> >>> >>>> In this case, 99% of my data could fit in a single 50 MB partition. But >>>> if I use the standard approach, I have to split my partitions into 50 >>>

Re: Data Modeling: Partition Size and Query Efficiency

2016-01-05 Thread Clint Martin
ly than a customer filling a partition. > > Jim > > On Tue, Jan 5, 2016 at 12:21 PM, Nate McCall <n...@thelastpickle.com> > wrote: > >> >>> In this case, 99% of my data could fit in a single 50 MB partition. But >>> if I use the standard approach, I have to s

Re: Data Modeling: Partition Size and Query Efficiency

2016-01-04 Thread Clint Martin
e utilized the consistent hash method you described (add an artificial row key segment by modulo some part of the clustering key by a fixed position count) combined with a lazy evaluation cursor. The lazy evaluation cursor essentially is set up to query X number of partitions simultaneously, but to execute tho

Data Modeling: Partition Size and Query Efficiency

2016-01-04 Thread Jim Ancona
e anywhere from a few dozen up to thousands. For query efficiency I want the average number of rows per partition to be large enough that a query can be satisfied by reading a small number of partitions--ideally one. So I want to simultaneously limit the maximum number of rows per partition and ye

Re: Cassandra 3.1 - Aggregation query failure

2015-12-29 Thread Tyler Hobbs
me particular scenarios when the user is > using CL QUORUM (or more) and some replicas are out-of-sync. Even in the > case of aggregation over a single partition, if this partition is wide and > spans many fetch pages, the time the coordinator performs all the > read-repair and reconcile

Re: Cassandra 3.1 - Aggregation query failure

2015-12-24 Thread DuyHai Doan
denied >("java.io.FilePermission" >"/home/wpl/CassandraInstall-3.1/conf/logback.xml" "read")" > > Is that right? > > And note that this same aggregation query (on a subset of the month's > days) does complete successfully sometimes.

Re: Cassandra 3.1 - Aggregation query failure

2015-12-24 Thread Dinesh Shanbhag
There is nothing in the system.log when the aggregation query fails. Thanks for the Datastax clarification. Thanks, Dinesh. On 12/24/2015 2:46 PM, DuyHai Doan wrote: The exception stack trace at client side shows some issue with File Permission. Try to look for the same error message

RE: Cassandra 3.1 - Aggregation query failure

2015-12-23 Thread SEAN_R_DURITY
[mailto:sn...@snazy.de] Sent: Wednesday, December 23, 2015 12:15 PM To: user@cassandra.apache.org Cc: dinesh.shanb...@isanasystems.com Subject: Re: Cassandra 3.1 - Aggregation query failure Well, the usual access goal for queries in C* is “one partition per query” - maybe a handful partitions in some

Re: Cassandra 3.1 - Aggregation query failure

2015-12-23 Thread Robert Stupp
Well, the usual access goal for queries in C* is “one partition per query” - maybe a handful partitions in some cases. That does not differ for aggregates since the read path is still the same. Aggregates in C* are meant to move some computation (for example on the data in a time-frame

RE: Cassandra 3.1 - Aggregation query failure

2015-12-23 Thread SEAN_R_DURITY
...@jonhaddad.com] Sent: Monday, December 21, 2015 2:50 PM To: user@cassandra.apache.org; dinesh.shanb...@isanasystems.com Subject: Re: Cassandra 3.1 - Aggregation query failure Even if you get this to work for now, I really recommend using a different tool, like Spark. Personally I wouldn't use UDAs

Re: Cassandra 3.1 - Aggregation query failure

2015-12-23 Thread DuyHai Doan
reconcile over QUORUM replicas, the query may timeout very quickly. On Fri, Dec 18, 2015 at 5:26 PM, Tyler Hobbs <ty...@datastax.com> wrote: > > On Fri, Dec 18, 2015 at 9:17 AM, DuyHai Doan <doanduy...@gmail.com> wrote: > >> Cassandra will perform a full table

Re: Cassandra 3.1 - Aggregation query failure

2015-12-23 Thread Dinesh Shanbhag
frozen<tuple<int, int>>>, text, decimal]' failed: java.security.AccessControlException: access denied ("java.io.FilePermission" "/home/wpl/CassandraInstall-3.1/conf/logback.xml" "read")" Is that right? And note that this same aggregat

Re: Cassandra 3.1 - Aggregation query failure

2015-12-21 Thread Jonathan Haddad
Even if you get this to work for now, I really recommend using a different tool, like Spark. Personally I wouldn't use UDAs outside of a single partition. On Mon, Dec 21, 2015 at 1:50 AM Dinesh Shanbhag < dinesh.shanb...@isanasystems.com> wrote: > > Thanks for the pointers! I edited

Re: Timestamp Query

2015-12-21 Thread Eric Stevens
Generally speaking (both for Cassandra as well as for many other projects), timestamps don't carry a timezone directly. A single point in time has a consistent value for timestamp regardless of the timezone, and when you convert a timestamp to a human-friendly value, you can attach a timezone to

Re: Cassandra 3.1 - Aggregation query failure

2015-12-21 Thread Dinesh Shanbhag
Thanks for the pointers! I edited jvm.options in $CASSANDRA_HOME/conf/jvm.options to increase -Xms and -Xmx to 1536M. The result is the same. And in $CASSANDRA_HOME/logs/system.log, grep GC system.log produces this (when jvm.options had not been changed): INFO [Service Thread]

Re: Timestamp Query

2015-12-20 Thread Jai Bheemsen Rao Dhanwada
https://datastax.github.io/java-driver/features/query_timestamps/ On Sun, Dec 20, 2015 at 9:48 PM, Harikrishnan A wrote: > Hello, > > How do I set a timestamp value with specific timezone in cassandra. I > understand that it captures the timezone of the co ordinator node

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