RE: A question to 'paging' support in DataStax java driver

2016-05-09 Thread Lu, Boying
I filed a JIRA https://issues.apache.org/jira/browse/CASSANDRA-11741 to track 
this.

From: DuyHai Doan [mailto:doanduy...@gmail.com]
Sent: 2016年5月10日 12:47
To: user@cassandra.apache.org
Subject: Re: A question to 'paging' support in DataStax java driver

I guess it's technically possible but then we'll need to update the binary 
protocol. Just create a JIRA and ask for this feature

On Tue, May 10, 2016 at 5:00 AM, Lu, Boying 
> wrote:
Thanks very much.

I understand that the data needs to be read from the DB to get the next 
‘PagingState’.

But is it possible not to return those data to the client side, just returning 
the ‘PagingState’?
I.e. the data is read on the server side, but not return to client side, this 
can save some bandwidth
between client and server.


From: DuyHai Doan [mailto:doanduy...@gmail.com]
Sent: 2016年5月9日 21:06
To: user@cassandra.apache.org
Subject: Re: A question to 'paging' support in DataStax java driver

In a truly consistent world (should I say "snapshot isolation" world instead), 
re-reading the same page should yield the same results no matter how many new 
inserts have occurred since the last page read.

Caching previous page at app level can be a solution but not viable if the 
amount of data is huge, also you'll need a cache layer and deal with cache 
invalidation etc ...

The point is, providing snapshot isolation in a distributed system is hard 
without some sort of synchronous coordination e.g. global lock (read 
http://www.bailis.org/papers/hat-vldb2014.pdf)


On Mon, May 9, 2016 at 2:17 PM, Bhuvan Rawal 
> wrote:
Hi Doan,

What does it have to do being eventual consistency? Lets assume a scenario with 
complete consistency and we are at page X, and at the same time some 
inserts/updates happened at page X-2 and we jumped to that.
User will see inconsistent page in that case as well, right? Also in such cases 
how would you design a user facing application (Cache previous pages at app 
level?)

Regards,
Bhuvan

On Mon, May 9, 2016 at 4:18 PM, DuyHai Doan 
> wrote:
"Is it possible to just return PagingState object without returning data?" --> 
No

Simply because before reading the actual data for each page of N rows, you 
cannot know at which token value a page of data starts...

And it is worst than that, with paging you don't have any isolation. Let's 
suppose you keep in your application/web front-end the paging states for page 
1, 2 and 3. Since there are concurrent inserts on the cluster at the same time, 
when you re-use the paging state 2 for example, you may not get the same 
results as the previous read.

And it is inevitable in an eventual consistent distributed DB world

On Mon, May 9, 2016 at 12:25 PM, Lu, Boying 
> wrote:
dHi, All,

We are considering to use DataStax java driver in our codes. One important 
feature provided by the driver we want to use is ‘paging’.
But according to the 
https://datastax.github.io/java-driver/3.0.0/manual/paging/, it seems that we 
can’t jump between pages.

Is it possible to just return PagingState object without returning data? e.g.  
If I want to jump to the page 5 from the page 1,
I need to go through each page from page 1 to page 5,  Is it possible to just 
return the PagingState object of page 1, 2, 3 and 4 without
actual data of each page? This can save some bandwidth at least.

Thanks in advance.

Boying








Re: A question to 'paging' support in DataStax java driver

2016-05-09 Thread DuyHai Doan
I guess it's technically possible but then we'll need to update the binary
protocol. Just create a JIRA and ask for this feature

On Tue, May 10, 2016 at 5:00 AM, Lu, Boying  wrote:

> Thanks very much.
>
>
>
> I understand that the data needs to be read from the DB to get the next
> ‘PagingState’.
>
>
>
> But is it possible not to return those data to the client side, just
> returning the ‘PagingState’?
>
> I.e. the data is read on the server side, but not return to client side,
> this can save some bandwidth
>
> between client and server.
>
>
>
>
>
> *From:* DuyHai Doan [mailto:doanduy...@gmail.com]
> *Sent:* 2016年5月9日 21:06
> *To:* user@cassandra.apache.org
> *Subject:* Re: A question to 'paging' support in DataStax java driver
>
>
>
> In a truly consistent world (should I say "snapshot isolation" world
> instead), re-reading the same page should yield the same results no matter
> how many new inserts have occurred since the last page read.
>
>
>
> Caching previous page at app level can be a solution but not viable if the
> amount of data is huge, also you'll need a cache layer and deal with cache
> invalidation etc ...
>
>
>
> The point is, providing snapshot isolation in a distributed system is hard
> without some sort of synchronous coordination e.g. global lock (read
> http://www.bailis.org/papers/hat-vldb2014.pdf)
>
>
>
>
>
> On Mon, May 9, 2016 at 2:17 PM, Bhuvan Rawal  wrote:
>
> Hi Doan,
>
>
>
> What does it have to do being eventual consistency? Lets assume a scenario
> with complete consistency and we are at page X, and at the same time some
> inserts/updates happened at page X-2 and we jumped to that.
>
> User will see inconsistent page in that case as well, right? Also in such
> cases how would you design a user facing application (Cache previous pages
> at app level?)
>
>
>
> Regards,
>
> Bhuvan
>
>
>
> On Mon, May 9, 2016 at 4:18 PM, DuyHai Doan  wrote:
>
> "Is it possible to just return PagingState object without returning
> data?" --> No
>
>
>
> Simply because before reading the actual data for each page of N rows, you
> cannot know at which token value a page of data starts...
>
>
>
> And it is worst than that, with paging you don't have any isolation. Let's
> suppose you keep in your application/web front-end the paging states for
> page 1, 2 and 3. Since there are concurrent inserts on the cluster at the
> same time, when you re-use the paging state 2 for example, you may not get
> the same results as the previous read.
>
>
>
> And it is inevitable in an eventual consistent distributed DB world
>
>
>
> On Mon, May 9, 2016 at 12:25 PM, Lu, Boying  wrote:
>
> dHi, All,
>
>
>
> We are considering to use DataStax java driver in our codes. One important
> feature provided by the driver we want to use is ‘paging’.
>
> But according to the
> https://datastax.github.io/java-driver/3.0.0/manual/paging/, it seems
> that we can’t jump between pages.
>
>
>
> Is it possible to just return PagingState object without returning data?
> e.g.  If I want to jump to the page 5 from the page 1,
>
> I need to go through each page from page 1 to page 5,  Is it possible to
> just return the PagingState object of page 1, 2, 3 and 4 without
>
> actual data of each page? This can save some bandwidth at least.
>
>
>
> Thanks in advance.
>
>
>
> Boying
>
>
>
>
>
>
>
>
>
>
>


Re: Accessing Cassandra data from Spark Shell

2016-05-09 Thread Ben Slater
You can use SparkShell to access Cassandra via the Spark Cassandra
connector. The getting started article on our support page will probably
give you a good steer to get started even if you’re not using Instaclustr:
https://support.instaclustr.com/hc/en-us/articles/213097877-Getting-Started-with-Instaclustr-Spark-Cassandra-

Cheers
Ben

On Tue, 10 May 2016 at 14:08 Cassa L  wrote:

> Hi,
> Has anyone tried accessing Cassandra data using SparkShell? How do you do
> it? Can you use HiveContext for Cassandra data? I'm using community version
> of Cassandra-3.0
>
> Thanks,
> LCassa
>
-- 

Ben Slater
Chief Product Officer, Instaclustr
+61 437 929 798


Re: Accessing Cassandra data from Spark Shell

2016-05-09 Thread Ted Yu
bq. Can you use HiveContext for Cassandra data?

Most likely the above cannot be done.

On Mon, May 9, 2016 at 9:08 PM, Cassa L  wrote:

> Hi,
> Has anyone tried accessing Cassandra data using SparkShell? How do you do
> it? Can you use HiveContext for Cassandra data? I'm using community version
> of Cassandra-3.0
>
> Thanks,
> LCassa
>


Accessing Cassandra data from Spark Shell

2016-05-09 Thread Cassa L
Hi,
Has anyone tried accessing Cassandra data using SparkShell? How do you do
it? Can you use HiveContext for Cassandra data? I'm using community version
of Cassandra-3.0

Thanks,
LCassa


RE: A question to 'paging' support in DataStax java driver

2016-05-09 Thread Lu, Boying
Thanks very much.

I understand that the data needs to be read from the DB to get the next 
‘PagingState’.

But is it possible not to return those data to the client side, just returning 
the ‘PagingState’?
I.e. the data is read on the server side, but not return to client side, this 
can save some bandwidth
between client and server.


From: DuyHai Doan [mailto:doanduy...@gmail.com]
Sent: 2016年5月9日 21:06
To: user@cassandra.apache.org
Subject: Re: A question to 'paging' support in DataStax java driver

In a truly consistent world (should I say "snapshot isolation" world instead), 
re-reading the same page should yield the same results no matter how many new 
inserts have occurred since the last page read.

Caching previous page at app level can be a solution but not viable if the 
amount of data is huge, also you'll need a cache layer and deal with cache 
invalidation etc ...

The point is, providing snapshot isolation in a distributed system is hard 
without some sort of synchronous coordination e.g. global lock (read 
http://www.bailis.org/papers/hat-vldb2014.pdf)


On Mon, May 9, 2016 at 2:17 PM, Bhuvan Rawal 
> wrote:
Hi Doan,

What does it have to do being eventual consistency? Lets assume a scenario with 
complete consistency and we are at page X, and at the same time some 
inserts/updates happened at page X-2 and we jumped to that.
User will see inconsistent page in that case as well, right? Also in such cases 
how would you design a user facing application (Cache previous pages at app 
level?)

Regards,
Bhuvan

On Mon, May 9, 2016 at 4:18 PM, DuyHai Doan 
> wrote:
"Is it possible to just return PagingState object without returning data?" --> 
No

Simply because before reading the actual data for each page of N rows, you 
cannot know at which token value a page of data starts...

And it is worst than that, with paging you don't have any isolation. Let's 
suppose you keep in your application/web front-end the paging states for page 
1, 2 and 3. Since there are concurrent inserts on the cluster at the same time, 
when you re-use the paging state 2 for example, you may not get the same 
results as the previous read.

And it is inevitable in an eventual consistent distributed DB world

On Mon, May 9, 2016 at 12:25 PM, Lu, Boying 
> wrote:
dHi, All,

We are considering to use DataStax java driver in our codes. One important 
feature provided by the driver we want to use is ‘paging’.
But according to the 
https://datastax.github.io/java-driver/3.0.0/manual/paging/, it seems that we 
can’t jump between pages.

Is it possible to just return PagingState object without returning data? e.g.  
If I want to jump to the page 5 from the page 1,
I need to go through each page from page 1 to page 5,  Is it possible to just 
return the PagingState object of page 1, 2, 3 and 4 without
actual data of each page? This can save some bandwidth at least.

Thanks in advance.

Boying







Re: Data platform support

2016-05-09 Thread Denise Rogers
It really depends how close you want to stay to the most current versions of 
open source community products. 

Cloudera has tended to build more products that requires their distribution to 
not be as current with open source product versions. 

Regards,
Denise

Sent from mi iPhone

> On May 9, 2016, at 8:21 PM, Srini Sydney  wrote:
> 
> Hi guys
> 
> We are thinking of using one the 3 big data platforms i.e hortonworks , mapr 
> or cloudera . Will use hadoop ,hive , zookeeper, and spark in these platforms.
> 
> 
> Which platform would be better suited for cassandra ?
> 
> 
> -  sreeni
> 



Data platform support

2016-05-09 Thread Srini Sydney
Hi guys

We are thinking of using one the 3 big data platforms i.e hortonworks , mapr or 
cloudera . Will use hadoop ,hive , zookeeper, and spark in these platforms.


Which platform would be better suited for cassandra ?

 
 -  sreeni



Cassandra 3.0.6 Release?

2016-05-09 Thread Drew Kutcharian
Hi,

What’s the 3.0.6 release date? Seems like the code has been frozen for a few 
days now. I ask because I want to install Cassandra on Ubuntu 16.04 and 
CASSANDRA-10853 is blocking it.

Best,

Drew

Re: SS Tables Files Streaming

2016-05-09 Thread Ben Bromhead
Note that incremental repair strategies (2.1+) run anti-compaction against
sstables in the range being repaired, so this will prevent overstreaming
based on the ranges in the repair session.

On Mon, 9 May 2016 at 10:31 Ben Bromhead  wrote:

> Yup, with repair and particularly bootstrap is there is a decent amount of
> "over streaming" of data due to the fact it's just sending an sstable.
>
> On Fri, 6 May 2016 at 14:49 Anubhav Kale 
> wrote:
>
>> Does repair really send SS Table files as is ? Wouldn’t data for tokens
>> be distributed across SS Tables ?
>>
>>
>>
>> *From:* Jeff Jirsa [mailto:jeff.ji...@crowdstrike.com]
>> *Sent:* Friday, May 6, 2016 2:12 PM
>>
>>
>> *To:* user@cassandra.apache.org
>> *Subject:* Re: SS Tables Files Streaming
>>
>>
>>
>> Also probably sstableloader / bulk loading interface
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> (I don’t think any of these necessarily stream “as-is”, but that’s a
>> different conversation I suspect)
>>
>>
>>
>>
>>
>> *From: *Jonathan Haddad
>> *Reply-To: *"user@cassandra.apache.org"
>> *Date: *Friday, May 6, 2016 at 1:52 PM
>> *To: *"user@cassandra.apache.org"
>> *Subject: *Re: SS Tables Files Streaming
>>
>>
>>
>> Repairs, bootstamp, decommission.
>>
>>
>>
>> On Fri, May 6, 2016 at 1:16 PM Anubhav Kale 
>> wrote:
>>
>> Hello,
>>
>>
>>
>> In what scenarios can SS Table files on disk from Node 1 go to Node 2 as
>> is ?  I’m aware this happens in *nodetool rebuild* and I am assuming
>> this does *not* happen in repairs. Can someone confirm ?
>>
>>
>>
>> The reason I ask is I am working on a solution for backup / restore and I
>> need to be sure if I boot a node, start copying over backed up files then
>> those files won’t get overwritten by something coming from other nodes.
>>
>>
>>
>> Thanks !
>>
>> --
> Ben Bromhead
> CTO | Instaclustr 
> +1 650 284 9692
> Managed Cassandra / Spark on AWS, Azure and Softlayer
>
-- 
Ben Bromhead
CTO | Instaclustr 
+1 650 284 9692
Managed Cassandra / Spark on AWS, Azure and Softlayer


Re: SS Tables Files Streaming

2016-05-09 Thread Ben Bromhead
Yup, with repair and particularly bootstrap is there is a decent amount of
"over streaming" of data due to the fact it's just sending an sstable.

On Fri, 6 May 2016 at 14:49 Anubhav Kale  wrote:

> Does repair really send SS Table files as is ? Wouldn’t data for tokens be
> distributed across SS Tables ?
>
>
>
> *From:* Jeff Jirsa [mailto:jeff.ji...@crowdstrike.com]
> *Sent:* Friday, May 6, 2016 2:12 PM
>
>
> *To:* user@cassandra.apache.org
> *Subject:* Re: SS Tables Files Streaming
>
>
>
> Also probably sstableloader / bulk loading interface
>
>
>
>
>
>
>
>
>
> (I don’t think any of these necessarily stream “as-is”, but that’s a
> different conversation I suspect)
>
>
>
>
>
> *From: *Jonathan Haddad
> *Reply-To: *"user@cassandra.apache.org"
> *Date: *Friday, May 6, 2016 at 1:52 PM
> *To: *"user@cassandra.apache.org"
> *Subject: *Re: SS Tables Files Streaming
>
>
>
> Repairs, bootstamp, decommission.
>
>
>
> On Fri, May 6, 2016 at 1:16 PM Anubhav Kale 
> wrote:
>
> Hello,
>
>
>
> In what scenarios can SS Table files on disk from Node 1 go to Node 2 as
> is ?  I’m aware this happens in *nodetool rebuild* and I am assuming this
> does *not* happen in repairs. Can someone confirm ?
>
>
>
> The reason I ask is I am working on a solution for backup / restore and I
> need to be sure if I boot a node, start copying over backed up files then
> those files won’t get overwritten by something coming from other nodes.
>
>
>
> Thanks !
>
> --
Ben Bromhead
CTO | Instaclustr 
+1 650 284 9692
Managed Cassandra / Spark on AWS, Azure and Softlayer


Re: CAS operation does not return value on failure

2016-05-09 Thread horschi
Update: It was actually the driver update (from 2.1.9 to 3.0.1) that solved
the issue. I reverted by C* Server back to 2.2 and my test is still ok.

On Mon, May 9, 2016 at 1:28 PM, horschi  wrote:

> I just retried with Cassandra 3.0.5 and it performs much better. Not a
> single of these illegal results.
>
> I guess my recommendation for anyone using CAS is: Upgrade to >= 3.x :-)
>
> On Wed, May 4, 2016 at 5:46 PM, horschi  wrote:
>
>> Hi,
>>
>> I am doing some testing on CAS operations and I am frequently having the
>> issue that my resultset says wasApplied()==false, but it does not contain
>> any value.
>>
>>
>> This behaviour of course leads to the following Exception when I try to
>> read it:
>>
>> Caused by: java.lang.IllegalArgumentException: value is not a column
>> defined in this metadata
>> at
>> com.datastax.driver.core.ColumnDefinitions.getAllIdx(ColumnDefinitions.java:273)
>> at
>> com.datastax.driver.core.ColumnDefinitions.getFirstIdx(ColumnDefinitions.java:279)
>> at
>> com.datastax.driver.core.ArrayBackedRow.getIndexOf(ArrayBackedRow.java:68)
>> at
>> com.datastax.driver.core.AbstractGettableData.getBytes(AbstractGettableData.java:131)
>>
>>
>>
>> My questions now are:
>>
>> Is it to be expected that a failing CAS operation sometimes does this?
>>
>> if yes: Shouldn't there a possibility on the driver side to handle this
>> in a better was, e.g. add a "hasColumn()" method or something to the
>> ResultSet?
>>
>> if no: Is that perhaps a symptom to a greater issue in cassandra?
>>
>>
>> kind regards,
>> Christian
>>
>> PS: I also appreciate general feedback on the entire C* CAS topic :-)
>>
>>
>>
>


Re: A question to 'paging' support in DataStax java driver

2016-05-09 Thread DuyHai Doan
In a truly consistent world (should I say "snapshot isolation" world
instead), re-reading the same page should yield the same results no matter
how many new inserts have occurred since the last page read.

Caching previous page at app level can be a solution but not viable if the
amount of data is huge, also you'll need a cache layer and deal with cache
invalidation etc ...

The point is, providing snapshot isolation in a distributed system is hard
without some sort of synchronous coordination e.g. global lock (read
http://www.bailis.org/papers/hat-vldb2014.pdf)


On Mon, May 9, 2016 at 2:17 PM, Bhuvan Rawal  wrote:

> Hi Doan,
>
> What does it have to do being eventual consistency? Lets assume a scenario
> with complete consistency and we are at page X, and at the same time some
> inserts/updates happened at page X-2 and we jumped to that.
> User will see inconsistent page in that case as well, right? Also in such
> cases how would you design a user facing application (Cache previous pages
> at app level?)
>
> Regards,
> Bhuvan
>
> On Mon, May 9, 2016 at 4:18 PM, DuyHai Doan  wrote:
>
>> "Is it possible to just return PagingState object without returning
>> data?" --> No
>>
>> Simply because before reading the actual data for each page of N rows,
>> you cannot know at which token value a page of data starts...
>>
>> And it is worst than that, with paging you don't have any isolation.
>> Let's suppose you keep in your application/web front-end the paging states
>> for page 1, 2 and 3. Since there are concurrent inserts on the cluster at
>> the same time, when you re-use the paging state 2 for example, you may not
>> get the same results as the previous read.
>>
>> And it is inevitable in an eventual consistent distributed DB world
>>
>> On Mon, May 9, 2016 at 12:25 PM, Lu, Boying  wrote:
>>
>>> dHi, All,
>>>
>>>
>>>
>>> We are considering to use DataStax java driver in our codes. One
>>> important feature provided by the driver we want to use is ‘paging’.
>>>
>>> But according to the
>>> https://datastax.github.io/java-driver/3.0.0/manual/paging/, it seems
>>> that we can’t jump between pages.
>>>
>>>
>>>
>>> Is it possible to just return PagingState object without returning data?
>>> e.g.  If I want to jump to the page 5 from the page 1,
>>>
>>> I need to go through each page from page 1 to page 5,  Is it possible to
>>> just return the PagingState object of page 1, 2, 3 and 4 without
>>>
>>> actual data of each page? This can save some bandwidth at least.
>>>
>>>
>>>
>>> Thanks in advance.
>>>
>>>
>>>
>>> Boying
>>>
>>>
>>>
>>>
>>>
>>
>>
>


Re: A question to 'paging' support in DataStax java driver

2016-05-09 Thread Bhuvan Rawal
Hi Doan,

What does it have to do being eventual consistency? Lets assume a scenario
with complete consistency and we are at page X, and at the same time some
inserts/updates happened at page X-2 and we jumped to that.
User will see inconsistent page in that case as well, right? Also in such
cases how would you design a user facing application (Cache previous pages
at app level?)

Regards,
Bhuvan

On Mon, May 9, 2016 at 4:18 PM, DuyHai Doan  wrote:

> "Is it possible to just return PagingState object without returning
> data?" --> No
>
> Simply because before reading the actual data for each page of N rows, you
> cannot know at which token value a page of data starts...
>
> And it is worst than that, with paging you don't have any isolation. Let's
> suppose you keep in your application/web front-end the paging states for
> page 1, 2 and 3. Since there are concurrent inserts on the cluster at the
> same time, when you re-use the paging state 2 for example, you may not get
> the same results as the previous read.
>
> And it is inevitable in an eventual consistent distributed DB world
>
> On Mon, May 9, 2016 at 12:25 PM, Lu, Boying  wrote:
>
>> dHi, All,
>>
>>
>>
>> We are considering to use DataStax java driver in our codes. One
>> important feature provided by the driver we want to use is ‘paging’.
>>
>> But according to the
>> https://datastax.github.io/java-driver/3.0.0/manual/paging/, it seems
>> that we can’t jump between pages.
>>
>>
>>
>> Is it possible to just return PagingState object without returning data?
>> e.g.  If I want to jump to the page 5 from the page 1,
>>
>> I need to go through each page from page 1 to page 5,  Is it possible to
>> just return the PagingState object of page 1, 2, 3 and 4 without
>>
>> actual data of each page? This can save some bandwidth at least.
>>
>>
>>
>> Thanks in advance.
>>
>>
>>
>> Boying
>>
>>
>>
>>
>>
>
>


Re: CAS operation does not return value on failure

2016-05-09 Thread horschi
I just retried with Cassandra 3.0.5 and it performs much better. Not a
single of these illegal results.

I guess my recommendation for anyone using CAS is: Upgrade to >= 3.x :-)

On Wed, May 4, 2016 at 5:46 PM, horschi  wrote:

> Hi,
>
> I am doing some testing on CAS operations and I am frequently having the
> issue that my resultset says wasApplied()==false, but it does not contain
> any value.
>
>
> This behaviour of course leads to the following Exception when I try to
> read it:
>
> Caused by: java.lang.IllegalArgumentException: value is not a column
> defined in this metadata
> at
> com.datastax.driver.core.ColumnDefinitions.getAllIdx(ColumnDefinitions.java:273)
> at
> com.datastax.driver.core.ColumnDefinitions.getFirstIdx(ColumnDefinitions.java:279)
> at
> com.datastax.driver.core.ArrayBackedRow.getIndexOf(ArrayBackedRow.java:68)
> at
> com.datastax.driver.core.AbstractGettableData.getBytes(AbstractGettableData.java:131)
>
>
>
> My questions now are:
>
> Is it to be expected that a failing CAS operation sometimes does this?
>
> if yes: Shouldn't there a possibility on the driver side to handle this in
> a better was, e.g. add a "hasColumn()" method or something to the ResultSet?
>
> if no: Is that perhaps a symptom to a greater issue in cassandra?
>
>
> kind regards,
> Christian
>
> PS: I also appreciate general feedback on the entire C* CAS topic :-)
>
>
>


Re: cqlsh problem

2016-05-09 Thread kurt Greaves
Don't be fooled, despite saying tcp6 and :::*, it still listens on IPv4. As
far as I'm aware this happens on all 2.1 Cassandra nodes, and may just be
an oddity of netstat. It would be unrelated to your connection timeout
issues, that's most likely related to firewall/network issues.

On 9 May 2016 at 09:59, joseph gao  wrote:

> It doesn't work ,still using ipv6 [image: 内嵌图片 1]
>
> And I already set [image: 内嵌图片 2]
>
> Now I'm using 4.1.1 using 9160 port instead of 5.x.x。
>
> Hopefully this could be resolved, Thanks!
>
> 2016-03-30 22:13 GMT+08:00 Alain RODRIGUEZ :
>
>> Hi Joseph,
>>
>> why cassandra using tcp6 for 9042 port like :
>>> tcp6   0  0 0.0.0.0:9042:::*
>>>  LISTEN
>>>
>>
>> if I remember correctly, in 2.1 and higher, cqlsh uses native transport,
>> port 9042  (instead of thrift port 9160) and your clients (if any) are also
>> probably using native transport (port 9042). So yes, this could be an issue
>> indeed.
>>
>> You should have something like:
>>
>> tcp0  0  1.2.3.4:9042   :::*LISTEN
>>
>> You are using IPv6 and no rpc address. Try setting it to the listen
>> address and using IPv4.
>>
>> C*heers,
>>
>> ---
>>
>> Alain Rodriguez - al...@thelastpickle.com
>>
>> France
>>
>> The Last Pickle - Apache Cassandra Consulting
>>
>> http://www.thelastpickle.com
>>
>> 2016-03-30 6:09 GMT+02:00 joseph gao :
>>
>>> why cassandra using tcp6 for 9042 port like :
>>> tcp6   0  0 0.0.0.0:9042:::*
>>>  LISTEN
>>> would this be the problem
>>>
>>> 2016-03-30 11:34 GMT+08:00 joseph gao :
>>>
 still have not fixed it . cqlsh: error: no such option:
 --connect-timeout
 cqlsh version 5.0.1



 2016-03-25 16:46 GMT+08:00 Alain RODRIGUEZ :

> Hi Joseph.
>
> As I can't reproduce here, I believe you are having network issue of
> some kind.
>
> MacBook-Pro:~ alain$ cqlsh --version
> cqlsh 5.0.1
> MacBook-Pro:~ alain$ echo 'DESCRIBE KEYSPACES;' | cqlsh
> --connect-timeout=5 --request-timeout=10
> system_traces  system
> MacBook-Pro:~ alain$
>
> It's been a few days, did you manage to fix it ?
>
> C*heers,
> ---
> Alain Rodriguez - al...@thelastpickle.com
> France
>
> The Last Pickle - Apache Cassandra Consulting
> http://www.thelastpickle.com
>
> 2016-03-21 9:59 GMT+01:00 joseph gao :
>
>> cqlsh version 5.0.1. nodetool tpstats looks good, log looks good.
>> And I used specified port 9042. And it immediately returns fail (less 
>> than
>> 3 seconds). By the way where should I use '--connect-timeout', cqlsh 
>> seems
>> don't have such parameters.
>>
>> 2016-03-18 17:29 GMT+08:00 Alain RODRIGUEZ :
>>
>>> Is the node fully healthy or rejecting some requests ?
>>>
>>> What are the outputs for "grep -i "ERROR"
>>> /var/log/cassandra/system.log" and "nodetool tpstats"?
>>>
>>> Any error? Any pending / blocked or dropped messages?
>>>
>>> Also did you try using distinct ports (9160 for thrift, 9042 for
>>> native) - out of curiosity, not sure this will help.
>>>
>>> What is your version of cqlsh "cqlsh --version" ?
>>>
>>> doesn't work most times. But some time it just work fine

>>>
>>> Do you fill like this is due to a timeout (query being too big,
>>> cluster being to busy)? Try setting this higher:
>>>
>>> --connect-timeout=CONNECT_TIMEOUT
>>>
>>> Specify the connection timeout in seconds
>>> (default: 5 seconds).
>>>
>>>   --request-timeout=REQUEST_TIMEOUT
>>>
>>> Specify the default request timeout in
>>> seconds (default: 10 seconds).
>>>
>>> C*heers,
>>> ---
>>> Alain Rodriguez - al...@thelastpickle.com
>>> France
>>>
>>> The Last Pickle - Apache Cassandra Consulting
>>> http://www.thelastpickle.com
>>>
>>> 2016-03-18 4:49 GMT+01:00 joseph gao :
>>>
 Of course yes.

 2016-03-17 22:35 GMT+08:00 Vishwas Gupta <
 vishwas.gu...@snapdeal.com>:

> Have you started the Cassandra service?
>
> sh cassandra
> On 17-Mar-2016 7:59 pm, "Alain RODRIGUEZ" 
> wrote:
>
>> Hi, did you try with the address of the node rather than 127.0.0.1
>>
>> Is the transport protocol used by cqlsh (not sure if it is thrift
>> or binary - native in 2.1)  active ? What is the "nodetool info" 
>> output ?
>>
>> C*heers,
>> ---
>> Alain Rodriguez - al...@thelastpickle.com
>> 

Re: A question to 'paging' support in DataStax java driver

2016-05-09 Thread DuyHai Doan
"Is it possible to just return PagingState object without returning data?"
--> No

Simply because before reading the actual data for each page of N rows, you
cannot know at which token value a page of data starts...

And it is worst than that, with paging you don't have any isolation. Let's
suppose you keep in your application/web front-end the paging states for
page 1, 2 and 3. Since there are concurrent inserts on the cluster at the
same time, when you re-use the paging state 2 for example, you may not get
the same results as the previous read.

And it is inevitable in an eventual consistent distributed DB world

On Mon, May 9, 2016 at 12:25 PM, Lu, Boying  wrote:

> dHi, All,
>
>
>
> We are considering to use DataStax java driver in our codes. One important
> feature provided by the driver we want to use is ‘paging’.
>
> But according to the
> https://datastax.github.io/java-driver/3.0.0/manual/paging/, it seems
> that we can’t jump between pages.
>
>
>
> Is it possible to just return PagingState object without returning data?
> e.g.  If I want to jump to the page 5 from the page 1,
>
> I need to go through each page from page 1 to page 5,  Is it possible to
> just return the PagingState object of page 1, 2, 3 and 4 without
>
> actual data of each page? This can save some bandwidth at least.
>
>
>
> Thanks in advance.
>
>
>
> Boying
>
>
>
>
>


A question to 'paging' support in DataStax java driver

2016-05-09 Thread Lu, Boying
dHi, All,

We are considering to use DataStax java driver in our codes. One important 
feature provided by the driver we want to use is 'paging'.
But according to the 
https://datastax.github.io/java-driver/3.0.0/manual/paging/, it seems that we 
can't jump between pages.

Is it possible to just return PagingState object without returning data? e.g.  
If I want to jump to the page 5 from the page 1,
I need to go through each page from page 1 to page 5,  Is it possible to just 
return the PagingState object of page 1, 2, 3 and 4 without
actual data of each page? This can save some bandwidth at least.

Thanks in advance.

Boying




Re: cqlsh problem

2016-05-09 Thread joseph gao
It doesn't work ,still using ipv6 [image: 内嵌图片 1]

And I already set [image: 内嵌图片 2]

Now I'm using 4.1.1 using 9160 port instead of 5.x.x。

Hopefully this could be resolved, Thanks!

2016-03-30 22:13 GMT+08:00 Alain RODRIGUEZ :

> Hi Joseph,
>
> why cassandra using tcp6 for 9042 port like :
>> tcp6   0  0 0.0.0.0:9042:::*
>>  LISTEN
>>
>
> if I remember correctly, in 2.1 and higher, cqlsh uses native transport,
> port 9042  (instead of thrift port 9160) and your clients (if any) are also
> probably using native transport (port 9042). So yes, this could be an issue
> indeed.
>
> You should have something like:
>
> tcp0  0  1.2.3.4:9042   :::*LISTEN
>
> You are using IPv6 and no rpc address. Try setting it to the listen
> address and using IPv4.
>
> C*heers,
>
> ---
>
> Alain Rodriguez - al...@thelastpickle.com
>
> France
>
> The Last Pickle - Apache Cassandra Consulting
>
> http://www.thelastpickle.com
>
> 2016-03-30 6:09 GMT+02:00 joseph gao :
>
>> why cassandra using tcp6 for 9042 port like :
>> tcp6   0  0 0.0.0.0:9042:::*
>>  LISTEN
>> would this be the problem
>>
>> 2016-03-30 11:34 GMT+08:00 joseph gao :
>>
>>> still have not fixed it . cqlsh: error: no such option: --connect-timeout
>>> cqlsh version 5.0.1
>>>
>>>
>>>
>>> 2016-03-25 16:46 GMT+08:00 Alain RODRIGUEZ :
>>>
 Hi Joseph.

 As I can't reproduce here, I believe you are having network issue of
 some kind.

 MacBook-Pro:~ alain$ cqlsh --version
 cqlsh 5.0.1
 MacBook-Pro:~ alain$ echo 'DESCRIBE KEYSPACES;' | cqlsh
 --connect-timeout=5 --request-timeout=10
 system_traces  system
 MacBook-Pro:~ alain$

 It's been a few days, did you manage to fix it ?

 C*heers,
 ---
 Alain Rodriguez - al...@thelastpickle.com
 France

 The Last Pickle - Apache Cassandra Consulting
 http://www.thelastpickle.com

 2016-03-21 9:59 GMT+01:00 joseph gao :

> cqlsh version 5.0.1. nodetool tpstats looks good, log looks good. And
> I used specified port 9042. And it immediately returns fail (less than 3
> seconds). By the way where should I use '--connect-timeout', cqlsh seems
> don't have such parameters.
>
> 2016-03-18 17:29 GMT+08:00 Alain RODRIGUEZ :
>
>> Is the node fully healthy or rejecting some requests ?
>>
>> What are the outputs for "grep -i "ERROR"
>> /var/log/cassandra/system.log" and "nodetool tpstats"?
>>
>> Any error? Any pending / blocked or dropped messages?
>>
>> Also did you try using distinct ports (9160 for thrift, 9042 for
>> native) - out of curiosity, not sure this will help.
>>
>> What is your version of cqlsh "cqlsh --version" ?
>>
>> doesn't work most times. But some time it just work fine
>>>
>>
>> Do you fill like this is due to a timeout (query being too big,
>> cluster being to busy)? Try setting this higher:
>>
>> --connect-timeout=CONNECT_TIMEOUT
>>
>> Specify the connection timeout in seconds
>> (default: 5 seconds).
>>
>>   --request-timeout=REQUEST_TIMEOUT
>>
>> Specify the default request timeout in seconds 
>> (default:
>> 10 seconds).
>>
>> C*heers,
>> ---
>> Alain Rodriguez - al...@thelastpickle.com
>> France
>>
>> The Last Pickle - Apache Cassandra Consulting
>> http://www.thelastpickle.com
>>
>> 2016-03-18 4:49 GMT+01:00 joseph gao :
>>
>>> Of course yes.
>>>
>>> 2016-03-17 22:35 GMT+08:00 Vishwas Gupta >> >:
>>>
 Have you started the Cassandra service?

 sh cassandra
 On 17-Mar-2016 7:59 pm, "Alain RODRIGUEZ" 
 wrote:

> Hi, did you try with the address of the node rather than 127.0.0.1
>
> Is the transport protocol used by cqlsh (not sure if it is thrift
> or binary - native in 2.1)  active ? What is the "nodetool info" 
> output ?
>
> C*heers,
> ---
> Alain Rodriguez - al...@thelastpickle.com
> France
>
> The Last Pickle - Apache Cassandra Consulting
> http://www.thelastpickle.com
>
> 2016-03-17 14:26 GMT+01:00 joseph gao :
>
>> hi, all
>> cassandra version 2.1.7
>> When I use cqlsh to connect cassandra, something is wrong
>>
>> Connection error: ( Unable to connect to any servers',
>> {'127.0.0.1': OperationTimedOut('errors=None, last_host=None,)})
>>
>> This happens 

Re: CAS operation does not return value on failure

2016-05-09 Thread horschi
Hi Jack,

sorry to keep you busy :-)

There definitely is a column named "value" in the table. And most of the
time this codepath works fine, even when my CAS update fails. But in very
rare cases I get a ResultSet that contains applied=false but does not
contain any value column.


I just ran my test again and found a empty ResultSet for the following
query:

delete from "Lock" where lockname=:lockname and id=:id if value=:value

--> ResultSet contains only [applied]=false, but no lockname, id or value.


Am I correct in my assumption that this should not be?

kind regards,
Christian



On Fri, May 6, 2016 at 1:20 AM, Jack Krupansky 
wrote:

> "value" in that message is the name of a column that is expect to be in
> your table schema - the message is simply complaining that you have no
> column named "value" in that table.
> The error concerns the table schema, not any actual data in either the
> statement or the table.
>
> "metadata" is simply referring to your table schema.
>
> Does your table schema have a "value" column?
> Does your preared statement refer to a "value" column, or are you
> supplying that name when executing the prepared statement?
>
> The "datastax.driver.core" in the exception trace class names indicates
> that the error is detected in the Java driver, not Cassandra.
>
>
>
> -- Jack Krupansky
>
> On Thu, May 5, 2016 at 6:45 PM, horschi  wrote:
>
>> Hi Jack,
>>
>> I thought that it is Cassandra that fills the value on CAS failures. So
>> the question if it is to be expected to have wasApplied()==false and not
>> have any value in the ResultSet should belong here.
>>
>> So my question for this mailing list would be:
>>
>> Is it correct behaviour that C* returns wasApplied()==false but not any
>> value? My expectation was that there always is a value in such a case.
>>
>> kind regards,
>> Christian
>>
>>
>> On Wed, May 4, 2016 at 6:00 PM, Jack Krupansky 
>> wrote:
>>
>>> Probably better to ask this on the Java driver user list.
>>>
>>>
>>> -- Jack Krupansky
>>>
>>> On Wed, May 4, 2016 at 11:46 AM, horschi  wrote:
>>>
 Hi,

 I am doing some testing on CAS operations and I am frequently having
 the issue that my resultset says wasApplied()==false, but it does not
 contain any value.


 This behaviour of course leads to the following Exception when I try to
 read it:

 Caused by: java.lang.IllegalArgumentException: value is not a column
 defined in this metadata
 at
 com.datastax.driver.core.ColumnDefinitions.getAllIdx(ColumnDefinitions.java:273)
 at
 com.datastax.driver.core.ColumnDefinitions.getFirstIdx(ColumnDefinitions.java:279)
 at
 com.datastax.driver.core.ArrayBackedRow.getIndexOf(ArrayBackedRow.java:68)
 at
 com.datastax.driver.core.AbstractGettableData.getBytes(AbstractGettableData.java:131)



 My questions now are:

 Is it to be expected that a failing CAS operation sometimes does this?

 if yes: Shouldn't there a possibility on the driver side to handle this
 in a better was, e.g. add a "hasColumn()" method or something to the
 ResultSet?

 if no: Is that perhaps a symptom to a greater issue in cassandra?


 kind regards,
 Christian

 PS: I also appreciate general feedback on the entire C* CAS topic :-)



>>>
>>
>


Re: DSE Search : NPE when executing Solr CQL queries using solr_query

2016-05-09 Thread Joseph Tech
hi,

I have posted this as the latest "answer" (though it isn't really) with all
details on stackoverflow
http://stackoverflow.com/questions/27966440/normal-query-on-cassandra-using-datastax-enterprise-works-but-not-solr-query
. Hope someone from DS can help.

Thanks,
Joseph

On Tue, Apr 12, 2016 at 9:09 PM, Jack Krupansky 
wrote:

> You'll have to use StackOverflow or DataStax for support on DSE Search.
>
> It looks like you have a Field Output Transformer (
> *UserFieldOutputTransformer.java*). The NPE might be related to
> processing that occurs there - try removing this FOT and see if the NPE
> still occurs. For example, maybe the FOT is setting an output column value
> to NULL.
>
> Also, see if there is a "Caused By" entry elsewhere in the Java stack
> trace.
>
> -- Jack Krupansky
>
> On Tue, Apr 12, 2016 at 6:07 AM, Joseph Tech 
> wrote:
>
>> hi,
>>
>> I am facing an issue where Solr queries executed from cqlsh using the
>> solr_query field is throwing an NPE in system.log, while cqlsh shows the
>> following error:
>>
>> Unable to complete request: one or more nodes were unavailable.
>>
>> These queries work fine thru the Solr admin console UI.
>>
>> Below is the stacktrace when executing the wildcard query :
>>
>> select * from user where solr_query='user_id:*ABCD-**';
>>
>> The line in bold (from custom Output FT) shows that the key corresponding
>> to ABCD-* was identified, but results are not returned. I noticed some
>> JIRAs like SOLR-7254 with similar stacktraces, but doesnt mention a fix.
>> Please suggest if there's anything on the Cassandra side to be checked for
>> this.
>>
>>  INFO [http-8983-exec-1] 2016-04-12 04:46:13,061
>> SolrCoreResourceManager.java (line 553) Trying to load resource schema.xml
>> for core XYZ.user by querying from local node with CL QUORUM
>>  INFO [http-8983-exec-1] 2016-04-12 04:46:13,065
>> SolrCoreResourceManager.java (line 563) Successfully loaded resource
>> schema.xml for core XYZ.user by querying from local node.
>>  INFO [LocalShardServer query worker - 0] 2016-04-12 04:46:32,127 
>> *UserFieldOutputTransformer.java
>> (line 28) name: user_id, value: ABCD-a552-47c0-b4c1-66ce3db11496*
>> ERROR [Thrift:5] 2016-04-12 04:46:32,130 SolrException.java (line 124)
>> java.lang.NullPointerException
>> at
>> org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:896)
>> at
>> org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:642)
>> at
>> org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:621)
>> at
>> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:319)
>> at
>> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:140)
>> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1891)
>> at
>> com.datastax.bdp.search.solr.cql.CqlSolrQueryExecutor.executeSolrQuery(CqlSolrQueryExecutor.java:174)
>> at
>> com.datastax.bdp.search.solr.cql.CqlSolrQueryExecutor.execute(CqlSolrQueryExecutor.java:96)
>> at
>> com.datastax.bdp.cassandra.cql3.DseQueryHandler$SolrStatementExecution.execute(DseQueryHandler.java:464)
>> at
>> com.datastax.bdp.cassandra.cql3.DseQueryHandler.executeOperationWithTiming(DseQueryHandler.java:190)
>> at
>> com.datastax.bdp.cassandra.cql3.DseQueryHandler.executeOperationWithAuditLogging(DseQueryHandler.java:223)
>> at
>> com.datastax.bdp.cassandra.cql3.DseQueryHandler.process(DseQueryHandler.java:103)
>> at
>> org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1958)
>> at
>> com.datastax.bdp.server.DseServer.execute_cql3_query(DseServer.java:543)
>> at
>> org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4486)
>> at
>> org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4470)
>> at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
>> at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
>> at
>> org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:204)
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>> at java.lang.Thread.run(Thread.java:745)
>>
>>
>>
>


Re: [C*3.0.3]lucene indexes not deleted and nodetool repair makes DC unavailable

2016-05-09 Thread Siddharth Verma
Hi Eduardo,
Thanks for your help on stratio index problem

As per your questions.

1. We ran nodetool repair on one box(no range repair), but due to it,
entire DC was non responsive.
It was up, but we were not able to connect.

2. RF is 3, and we have 2 DCs each with 3 nodes.

3. Consistency level for writes is Local_Quorum.

Thanks
Siddharth Verma