[jira] [Created] (CASSANDRA-7721) Remove shuffle utility

2014-08-07 Thread Jeremy Hanna (JIRA)
Jeremy Hanna created CASSANDRA-7721:
---

 Summary: Remove shuffle utility
 Key: CASSANDRA-7721
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7721
 Project: Cassandra
  Issue Type: Task
  Components: Tools
Reporter: Jeremy Hanna


Shuffle has done more harm than good.  When enabling virtual nodes on an 
existing cluster it's best to replicate to a new datacenter with vnodes enabled 
and then decommissioning the non-vnodes datacenter.

We should remove the shuffle utility.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (CASSANDRA-7721) Remove shuffle utility

2014-08-07 Thread Jeremy Hanna (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14090293#comment-14090293
 ] 

Jeremy Hanna edited comment on CASSANDRA-7721 at 8/8/14 4:38 AM:
-

Dupe.  See linked ticket for discussion.


was (Author: jeromatron):
Dupe.  See linked ticket.

> Remove shuffle utility
> --
>
> Key: CASSANDRA-7721
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7721
> Project: Cassandra
>  Issue Type: Task
>  Components: Tools
>Reporter: Jeremy Hanna
>
> Shuffle has done more harm than good.  When enabling virtual nodes on an 
> existing cluster it's best to replicate to a new datacenter with vnodes 
> enabled and then decommissioning the non-vnodes datacenter.
> We should remove the shuffle utility.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Resolved] (CASSANDRA-7721) Remove shuffle utility

2014-08-07 Thread Jeremy Hanna (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jeremy Hanna resolved CASSANDRA-7721.
-

Resolution: Duplicate

Dupe.  See linked ticket.

> Remove shuffle utility
> --
>
> Key: CASSANDRA-7721
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7721
> Project: Cassandra
>  Issue Type: Task
>  Components: Tools
>Reporter: Jeremy Hanna
>
> Shuffle has done more harm than good.  When enabling virtual nodes on an 
> existing cluster it's best to replicate to a new datacenter with vnodes 
> enabled and then decommissioning the non-vnodes datacenter.
> We should remove the shuffle utility.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7720) Add a more consistent snapshot mechanism

2014-08-07 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14090272#comment-14090272
 ] 

Jonathan Ellis commented on CASSANDRA-7720:
---

Yes, it would be useful in the client-waits-for-A-before-writing-B scenario.

> Add a more consistent snapshot mechanism
> 
>
> Key: CASSANDRA-7720
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7720
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Mike Schrag
>
> We’ve hit an interesting issue with snapshotting, which makes sense in 
> hindsight, but presents an interesting challenge for consistent restores:
> * initiate snapshot
> * snapshotting flushes table A and takes the snapshot
> * insert into table A
> * insert into table B
> * snapshotting flushes table B and takes the snapshot
> * snapshot finishes
> So what happens here is that we end up having a B, but NOT having an A, even 
> though B was chronologically inserted after A.
> It makes sense when I think about what snapshot is doing, but I wonder if 
> snapshots actually should get a little fancier to behave a little more like 
> what I think most people would expect. What I think should happen is 
> something along the lines of the following:
> For each node:
> * pass a client timestamp in the snapshot call corresponding to "now"
> * snapshot the tables using the existing procedure
> * walk backwards through the linked snapshot sstables in that snapshot
>   * if the earliest update in that sstable is after the client's timestamp, 
> delete the sstable in the snapshot
>   * if the earliest update in the sstable is before the client's timestamp, 
> then look at the last update. Walk backwards through that sstable.
> * if any updates fall after the timestamp, make a copy of that sstable in 
> the snapshot folder only up to the point of the timestamp and then delete the 
> original sstable in the snapshot (we need to copy because we're likely 
> holding a shared hard linked sstable)
> I think this would guarantee that you have a chronologically consistent view 
> of your snapshot across all machines and columnfamilies within a given 
> snapshot.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7720) Add a more consistent snapshot mechanism

2014-08-07 Thread Mike Schrag (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14090268#comment-14090268
 ] 

Mike Schrag commented on CASSANDRA-7720:


With quorum reads + writes, it would have to be a pretty catastrophic failure 
to not get an A at all on at least one replica in the cluster by the time you 
get a B. I'm not actually sure how it would be possible in our case, since our 
process is gated such that A has to successfully write to the cluster before 
the process that initiates the B write. Somehow you'd have to have a scenario 
where the A write manages to tell the client that it succeeded (which would 
mean that it had to land on the commit log of at least SOME coordinator, which 
should then flush to disk as part of the snapshot), then B writes, but we 
somehow have now lost A. The only case I can think of is a network partition on 
every replica of A at the point of snapshotting, at which point, I would expect 
snapshotting to be considered a failure, anyway. I grant that there are 
probably still edge cases, but in the current implementation, it's not all that 
edge-y for a system that is under heavy writes, and something like this 
approach, I think, would make backups more reliable for people who prefer to 
make the snapshot performance trade-off.

As far as a partial-write, that can happen already with snapshotting (if you 
managed to crash all of the replicas for a given token in the middle or 
something), and I think it would be considered a failed snapshot and unsuitable 
for use as a backup target.

> Add a more consistent snapshot mechanism
> 
>
> Key: CASSANDRA-7720
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7720
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Mike Schrag
>
> We’ve hit an interesting issue with snapshotting, which makes sense in 
> hindsight, but presents an interesting challenge for consistent restores:
> * initiate snapshot
> * snapshotting flushes table A and takes the snapshot
> * insert into table A
> * insert into table B
> * snapshotting flushes table B and takes the snapshot
> * snapshot finishes
> So what happens here is that we end up having a B, but NOT having an A, even 
> though B was chronologically inserted after A.
> It makes sense when I think about what snapshot is doing, but I wonder if 
> snapshots actually should get a little fancier to behave a little more like 
> what I think most people would expect. What I think should happen is 
> something along the lines of the following:
> For each node:
> * pass a client timestamp in the snapshot call corresponding to "now"
> * snapshot the tables using the existing procedure
> * walk backwards through the linked snapshot sstables in that snapshot
>   * if the earliest update in that sstable is after the client's timestamp, 
> delete the sstable in the snapshot
>   * if the earliest update in the sstable is before the client's timestamp, 
> then look at the last update. Walk backwards through that sstable.
> * if any updates fall after the timestamp, make a copy of that sstable in 
> the snapshot folder only up to the point of the timestamp and then delete the 
> original sstable in the snapshot (we need to copy because we're likely 
> holding a shared hard linked sstable)
> I think this would guarantee that you have a chronologically consistent view 
> of your snapshot across all machines and columnfamilies within a given 
> snapshot.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7720) Add a more consistent snapshot mechanism

2014-08-07 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14090259#comment-14090259
 ] 

Jonathan Ellis commented on CASSANDRA-7720:
---

But even with your proposal, if the A write is delayed for any other reason you 
still get a snapshot with B but no A.  (In the scenario where snapshot "now" is 
later than both A and B.)  That is what I mean by not really changing the 
scenarios you have to tolerate.

> Add a more consistent snapshot mechanism
> 
>
> Key: CASSANDRA-7720
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7720
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Mike Schrag
>
> We’ve hit an interesting issue with snapshotting, which makes sense in 
> hindsight, but presents an interesting challenge for consistent restores:
> * initiate snapshot
> * snapshotting flushes table A and takes the snapshot
> * insert into table A
> * insert into table B
> * snapshotting flushes table B and takes the snapshot
> * snapshot finishes
> So what happens here is that we end up having a B, but NOT having an A, even 
> though B was chronologically inserted after A.
> It makes sense when I think about what snapshot is doing, but I wonder if 
> snapshots actually should get a little fancier to behave a little more like 
> what I think most people would expect. What I think should happen is 
> something along the lines of the following:
> For each node:
> * pass a client timestamp in the snapshot call corresponding to "now"
> * snapshot the tables using the existing procedure
> * walk backwards through the linked snapshot sstables in that snapshot
>   * if the earliest update in that sstable is after the client's timestamp, 
> delete the sstable in the snapshot
>   * if the earliest update in the sstable is before the client's timestamp, 
> then look at the last update. Walk backwards through that sstable.
> * if any updates fall after the timestamp, make a copy of that sstable in 
> the snapshot folder only up to the point of the timestamp and then delete the 
> original sstable in the snapshot (we need to copy because we're likely 
> holding a shared hard linked sstable)
> I think this would guarantee that you have a chronologically consistent view 
> of your snapshot across all machines and columnfamilies within a given 
> snapshot.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7720) Add a more consistent snapshot mechanism

2014-08-07 Thread Mike Schrag (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14090252#comment-14090252
 ] 

Mike Schrag commented on CASSANDRA-7720:


"literally never get an A written to disk" => "literally never get an A written 
to [any snapshot folder on any replica in the cluster]"

> Add a more consistent snapshot mechanism
> 
>
> Key: CASSANDRA-7720
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7720
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Mike Schrag
>
> We’ve hit an interesting issue with snapshotting, which makes sense in 
> hindsight, but presents an interesting challenge for consistent restores:
> * initiate snapshot
> * snapshotting flushes table A and takes the snapshot
> * insert into table A
> * insert into table B
> * snapshotting flushes table B and takes the snapshot
> * snapshot finishes
> So what happens here is that we end up having a B, but NOT having an A, even 
> though B was chronologically inserted after A.
> It makes sense when I think about what snapshot is doing, but I wonder if 
> snapshots actually should get a little fancier to behave a little more like 
> what I think most people would expect. What I think should happen is 
> something along the lines of the following:
> For each node:
> * pass a client timestamp in the snapshot call corresponding to "now"
> * snapshot the tables using the existing procedure
> * walk backwards through the linked snapshot sstables in that snapshot
>   * if the earliest update in that sstable is after the client's timestamp, 
> delete the sstable in the snapshot
>   * if the earliest update in the sstable is before the client's timestamp, 
> then look at the last update. Walk backwards through that sstable.
> * if any updates fall after the timestamp, make a copy of that sstable in 
> the snapshot folder only up to the point of the timestamp and then delete the 
> original sstable in the snapshot (we need to copy because we're likely 
> holding a shared hard linked sstable)
> I think this would guarantee that you have a chronologically consistent view 
> of your snapshot across all machines and columnfamilies within a given 
> snapshot.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7720) Add a more consistent snapshot mechanism

2014-08-07 Thread Mike Schrag (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14090251#comment-14090251
 ] 

Mike Schrag commented on CASSANDRA-7720:


I agree about not having any guarantees on ordering. And for our running 
system, this isn't a big deal, because it will be eventually correct. 
Snapshotting is an interesting problem, though, because you potentially 
preserve a view of the world that you can never recover from in your backups. 
With what I'm proposing, if you snapshot an entire cluster and then restore it 
onto a brand new cluster, you at least get a cluster-wide consistent view of 
the universe at time 't'. In the current system, you can get unlucky and manage 
to literally never get an A written to disk (we had this happen). With the 
consistent time-t snapshot, you'd be globally consistent in your backup up to 
any given point, so you might get an A without a B, but you'd never get a B 
without an A. The backup-and-restore case is really nasty because it's 
conceptually like an infinite-duration network partition, so if you don't try 
your best to get a good view of the world, there's no eventual consistency that 
is ever going to fix you up.

> Add a more consistent snapshot mechanism
> 
>
> Key: CASSANDRA-7720
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7720
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Mike Schrag
>
> We’ve hit an interesting issue with snapshotting, which makes sense in 
> hindsight, but presents an interesting challenge for consistent restores:
> * initiate snapshot
> * snapshotting flushes table A and takes the snapshot
> * insert into table A
> * insert into table B
> * snapshotting flushes table B and takes the snapshot
> * snapshot finishes
> So what happens here is that we end up having a B, but NOT having an A, even 
> though B was chronologically inserted after A.
> It makes sense when I think about what snapshot is doing, but I wonder if 
> snapshots actually should get a little fancier to behave a little more like 
> what I think most people would expect. What I think should happen is 
> something along the lines of the following:
> For each node:
> * pass a client timestamp in the snapshot call corresponding to "now"
> * snapshot the tables using the existing procedure
> * walk backwards through the linked snapshot sstables in that snapshot
>   * if the earliest update in that sstable is after the client's timestamp, 
> delete the sstable in the snapshot
>   * if the earliest update in the sstable is before the client's timestamp, 
> then look at the last update. Walk backwards through that sstable.
> * if any updates fall after the timestamp, make a copy of that sstable in 
> the snapshot folder only up to the point of the timestamp and then delete the 
> original sstable in the snapshot (we need to copy because we're likely 
> holding a shared hard linked sstable)
> I think this would guarantee that you have a chronologically consistent view 
> of your snapshot across all machines and columnfamilies within a given 
> snapshot.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7717) cassandra-stress: add sample yamls to distro

2014-08-07 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-7717:
--

Reporter: Robert Stupp  (was: Michael Shuler)

> cassandra-stress: add sample yamls to distro
> 
>
> Key: CASSANDRA-7717
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7717
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Robert Stupp
>Assignee: T Jake Luciani
>Priority: Minor
> Fix For: 2.1.0
>
> Attachments: 7717-2.txt, 7717.txt
>
>
> C* stress is missing sample yaml files in distro. They are in git - but not 
> in the downloadable tgz .



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7717) cassandra-stress: add sample yamls to distro

2014-08-07 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-7717:
--

Reviewer: Michael Shuler  (was: Robert Stupp)

> cassandra-stress: add sample yamls to distro
> 
>
> Key: CASSANDRA-7717
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7717
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Robert Stupp
>Assignee: T Jake Luciani
>Priority: Minor
> Fix For: 2.1.0
>
> Attachments: 7717-2.txt, 7717.txt
>
>
> C* stress is missing sample yaml files in distro. They are in git - but not 
> in the downloadable tgz .



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7720) Add a more consistent snapshot mechanism

2014-08-07 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14090244#comment-14090244
 ] 

Jonathan Ellis commented on CASSANDRA-7720:
---

Remember, we have NO guarantees on ordering.  Hint replay, read repair, and 
failures-fixed-by-full-repair can all cause "newer" updates to be applied 
before "older" ones.  So changing snapshot wouldn't really change the scenarios 
you have to tolerate.

I'm not against making a "best effort" in principle, but doing seq scans of 
snapshots to build a copy with most but not all of the data is a pretty big 
deal for both performance and complexity. (What if you die partway through?)

So my inclination is that there isn't a whole lot of benefit from doing this, 
and RAMP (which actually does give you guarantees in the faceo of HH/RR/etc) is 
a better solution.  (and if they're not part of the same batch then ipso facto 
it's not really a problem).


> Add a more consistent snapshot mechanism
> 
>
> Key: CASSANDRA-7720
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7720
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Mike Schrag
>
> We’ve hit an interesting issue with snapshotting, which makes sense in 
> hindsight, but presents an interesting challenge for consistent restores:
> * initiate snapshot
> * snapshotting flushes table A and takes the snapshot
> * insert into table A
> * insert into table B
> * snapshotting flushes table B and takes the snapshot
> * snapshot finishes
> So what happens here is that we end up having a B, but NOT having an A, even 
> though B was chronologically inserted after A.
> It makes sense when I think about what snapshot is doing, but I wonder if 
> snapshots actually should get a little fancier to behave a little more like 
> what I think most people would expect. What I think should happen is 
> something along the lines of the following:
> For each node:
> * pass a client timestamp in the snapshot call corresponding to "now"
> * snapshot the tables using the existing procedure
> * walk backwards through the linked snapshot sstables in that snapshot
>   * if the earliest update in that sstable is after the client's timestamp, 
> delete the sstable in the snapshot
>   * if the earliest update in the sstable is before the client's timestamp, 
> then look at the last update. Walk backwards through that sstable.
> * if any updates fall after the timestamp, make a copy of that sstable in 
> the snapshot folder only up to the point of the timestamp and then delete the 
> original sstable in the snapshot (we need to copy because we're likely 
> holding a shared hard linked sstable)
> I think this would guarantee that you have a chronologically consistent view 
> of your snapshot across all machines and columnfamilies within a given 
> snapshot.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7717) cassandra-stress: add sample yamls to distro

2014-08-07 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-7717:
--

Reporter: Michael Shuler  (was: Robert Stupp)

> cassandra-stress: add sample yamls to distro
> 
>
> Key: CASSANDRA-7717
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7717
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Michael Shuler
>Assignee: T Jake Luciani
>Priority: Minor
> Fix For: 2.1.0
>
> Attachments: 7717-2.txt, 7717.txt
>
>
> C* stress is missing sample yaml files in distro. They are in git - but not 
> in the downloadable tgz .



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7717) cassandra-stress: add sample yamls to distro

2014-08-07 Thread Michael Shuler (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Shuler updated CASSANDRA-7717:
--

Attachment: 7717-2.txt

Let's also include the example yaml files in the debian package. Test build of 
artifacts and debs looks good to me.
7717-2.txt attached.

> cassandra-stress: add sample yamls to distro
> 
>
> Key: CASSANDRA-7717
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7717
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Robert Stupp
>Assignee: T Jake Luciani
>Priority: Minor
> Fix For: 2.1.0
>
> Attachments: 7717-2.txt, 7717.txt
>
>
> C* stress is missing sample yaml files in distro. They are in git - but not 
> in the downloadable tgz .



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7720) Add a more consistent snapshot mechanism

2014-08-07 Thread Mike Schrag (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14090234#comment-14090234
 ] 

Mike Schrag commented on CASSANDRA-7720:


Even with RAMP, I'm not sure that would cover you. In this particular case, the 
two inserts into the tables were not in the same atomic batch, even, so we're 
really just racing against the sstables on disk. We're just a hapless victim of 
the order that cass hard links the snapshot folder both among sstables in 
multiple column families on the same node as well as sstables in multiple 
column families across multiple nodes. In the end, even with RAMP, I believe 
you'd still have to make snapshotting commit-id-(or timestamp-)sensitive.

As an aside, i think this proposed extension to snapshotting would definitely 
be an option. Many people might not care at all that you get out-of-sequence 
snapshots, and you definitely would take a performance hit with the process I 
suggest up above.

> Add a more consistent snapshot mechanism
> 
>
> Key: CASSANDRA-7720
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7720
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Mike Schrag
>
> We’ve hit an interesting issue with snapshotting, which makes sense in 
> hindsight, but presents an interesting challenge for consistent restores:
> * initiate snapshot
> * snapshotting flushes table A and takes the snapshot
> * insert into table A
> * insert into table B
> * snapshotting flushes table B and takes the snapshot
> * snapshot finishes
> So what happens here is that we end up having a B, but NOT having an A, even 
> though B was chronologically inserted after A.
> It makes sense when I think about what snapshot is doing, but I wonder if 
> snapshots actually should get a little fancier to behave a little more like 
> what I think most people would expect. What I think should happen is 
> something along the lines of the following:
> For each node:
> * pass a client timestamp in the snapshot call corresponding to "now"
> * snapshot the tables using the existing procedure
> * walk backwards through the linked snapshot sstables in that snapshot
>   * if the earliest update in that sstable is after the client's timestamp, 
> delete the sstable in the snapshot
>   * if the earliest update in the sstable is before the client's timestamp, 
> then look at the last update. Walk backwards through that sstable.
> * if any updates fall after the timestamp, make a copy of that sstable in 
> the snapshot folder only up to the point of the timestamp and then delete the 
> original sstable in the snapshot (we need to copy because we're likely 
> holding a shared hard linked sstable)
> I think this would guarantee that you have a chronologically consistent view 
> of your snapshot across all machines and columnfamilies within a given 
> snapshot.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7718) dtest cql_tests.py:TestCQL.cql3_insert_thrift_test fails intermittently

2014-08-07 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-7718:
--

Fix Version/s: 2.1.0

> dtest cql_tests.py:TestCQL.cql3_insert_thrift_test fails intermittently
> ---
>
> Key: CASSANDRA-7718
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7718
> Project: Cassandra
>  Issue Type: Test
>  Components: Tests
> Environment: cassandra-2.1.0 branch
>Reporter: Michael Shuler
>Assignee: Aleksey Yeschenko
> Fix For: 2.1.0
>
> Attachments: node1.log
>
>
> This test fails about 20-25% of the time - ran about 10 times through looping 
> the test, and it typically fails on the 4th or 5th test.
> {noformat}
> (master)mshuler@hana:~/git/cassandra-dtest$ ../loop_dtest.sh 
> "cql_tests.py:TestCQL.cql3_insert_thrift_test"
> <...>
>  Run #4 
> nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
> cql3_insert_thrift_test (cql_tests.TestCQL) ... cluster ccm directory: 
> /tmp/dtest-Drwunj
> [node1 ERROR] 
> [node1 ERROR] 
> FAIL
> removing ccm cluster test at: /tmp/dtest-Drwunj
> ==
> FAIL: cql3_insert_thrift_test (cql_tests.TestCQL)
> --
> Traceback (most recent call last):
>   File "/home/mshuler/git/cassandra-dtest/cql_tests.py", line 1627, in 
> cql3_insert_thrift_test
> assert res == [ [2, 4, 200] ], res
> AssertionError: []
> --
> Ran 1 test in 7.192s
> {noformat}
> loop_dtest.sh:
> {noformat}
> #!/bin/bash
> if [ ${1} ]; then
> export MAX_HEAP_SIZE="1G"
> export HEAP_NEWSIZE="256M"
> export PRINT_DEBUG=true
> COUNT=0
> while true; do
> echo
> echo " Run #$COUNT "
> nosetests --nocapture --nologcapture --verbosity=3 ${1}
> if [ $? -ne 0 ]; then
> exit 1
> fi
> ((COUNT++))
> sleep 0.5
> done
> unset MAX_HEAP_SIZE HEAP_NEWSIZE PRINT_DEBUG
> else
> echo "  ${0} needs a test to run.."
> exit 255
> fi
> {noformat}
> I find no ERROR/WARN log entries from the failed test - attached node log 
> anyway.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7718) dtest cql_tests.py:TestCQL.cql3_insert_thrift_test fails intermittently

2014-08-07 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14090230#comment-14090230
 ] 

Jonathan Ellis commented on CASSANDRA-7718:
---

What does this bisect to, [~mshuler]?

> dtest cql_tests.py:TestCQL.cql3_insert_thrift_test fails intermittently
> ---
>
> Key: CASSANDRA-7718
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7718
> Project: Cassandra
>  Issue Type: Test
>  Components: Tests
> Environment: cassandra-2.1.0 branch
>Reporter: Michael Shuler
>Assignee: Aleksey Yeschenko
> Fix For: 2.1.0
>
> Attachments: node1.log
>
>
> This test fails about 20-25% of the time - ran about 10 times through looping 
> the test, and it typically fails on the 4th or 5th test.
> {noformat}
> (master)mshuler@hana:~/git/cassandra-dtest$ ../loop_dtest.sh 
> "cql_tests.py:TestCQL.cql3_insert_thrift_test"
> <...>
>  Run #4 
> nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
> cql3_insert_thrift_test (cql_tests.TestCQL) ... cluster ccm directory: 
> /tmp/dtest-Drwunj
> [node1 ERROR] 
> [node1 ERROR] 
> FAIL
> removing ccm cluster test at: /tmp/dtest-Drwunj
> ==
> FAIL: cql3_insert_thrift_test (cql_tests.TestCQL)
> --
> Traceback (most recent call last):
>   File "/home/mshuler/git/cassandra-dtest/cql_tests.py", line 1627, in 
> cql3_insert_thrift_test
> assert res == [ [2, 4, 200] ], res
> AssertionError: []
> --
> Ran 1 test in 7.192s
> {noformat}
> loop_dtest.sh:
> {noformat}
> #!/bin/bash
> if [ ${1} ]; then
> export MAX_HEAP_SIZE="1G"
> export HEAP_NEWSIZE="256M"
> export PRINT_DEBUG=true
> COUNT=0
> while true; do
> echo
> echo " Run #$COUNT "
> nosetests --nocapture --nologcapture --verbosity=3 ${1}
> if [ $? -ne 0 ]; then
> exit 1
> fi
> ((COUNT++))
> sleep 0.5
> done
> unset MAX_HEAP_SIZE HEAP_NEWSIZE PRINT_DEBUG
> else
> echo "  ${0} needs a test to run.."
> exit 255
> fi
> {noformat}
> I find no ERROR/WARN log entries from the failed test - attached node log 
> anyway.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7720) Add a more consistent snapshot mechanism

2014-08-07 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14090228#comment-14090228
 ] 

Jonathan Ellis commented on CASSANDRA-7720:
---

Or we could just add RAMP transactions. :)  (CASSANDRA-7056)

> Add a more consistent snapshot mechanism
> 
>
> Key: CASSANDRA-7720
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7720
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Mike Schrag
>
> We’ve hit an interesting issue with snapshotting, which makes sense in 
> hindsight, but presents an interesting challenge for consistent restores:
> * initiate snapshot
> * snapshotting flushes table A and takes the snapshot
> * insert into table A
> * insert into table B
> * snapshotting flushes table B and takes the snapshot
> * snapshot finishes
> So what happens here is that we end up having a B, but NOT having an A, even 
> though B was chronologically inserted after A.
> It makes sense when I think about what snapshot is doing, but I wonder if 
> snapshots actually should get a little fancier to behave a little more like 
> what I think most people would expect. What I think should happen is 
> something along the lines of the following:
> For each node:
> * pass a client timestamp in the snapshot call corresponding to "now"
> * snapshot the tables using the existing procedure
> * walk backwards through the linked snapshot sstables in that snapshot
>   * if the earliest update in that sstable is after the client's timestamp, 
> delete the sstable in the snapshot
>   * if the earliest update in the sstable is before the client's timestamp, 
> then look at the last update. Walk backwards through that sstable.
> * if any updates fall after the timestamp, make a copy of that sstable in 
> the snapshot folder only up to the point of the timestamp and then delete the 
> original sstable in the snapshot (we need to copy because we're likely 
> holding a shared hard linked sstable)
> I think this would guarantee that you have a chronologically consistent view 
> of your snapshot across all machines and columnfamilies within a given 
> snapshot.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7628) Tools java driver needs to be updated

2014-08-07 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14090229#comment-14090229
 ] 

Jonathan Ellis commented on CASSANDRA-7628:
---

Should we just drop in 2.0.4 for 2.1.0 since that's so straightforward?

> Tools java driver needs to be updated
> -
>
> Key: CASSANDRA-7628
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7628
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Brandon Williams
>Assignee: Benedict
>Priority: Minor
> Fix For: 2.1.1
>
>
> When you run stress currently you get a bunch of harmless stacktraces like:
> {noformat}
> ERROR 21:11:51 Error parsing schema options for table system_traces.sessions: 
> Cluster.getMetadata().getKeyspace("system_traces").getTable("sessions").getOptions()
>  will return null
> java.lang.IllegalArgumentException: populate_io_cache_on_flush is not a 
> column defined in this metadata
> at 
> com.datastax.driver.core.ColumnDefinitions.getAllIdx(ColumnDefinitions.java:273)
>  ~[cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ColumnDefinitions.getFirstIdx(ColumnDefinitions.java:279)
>  ~[cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ArrayBackedRow.isNull(ArrayBackedRow.java:56) 
> ~[cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.TableMetadata$Options.(TableMetadata.java:529) 
> ~[cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.TableMetadata.build(TableMetadata.java:119) 
> ~[cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.Metadata.buildTableMetadata(Metadata.java:131) 
> [cassandra-driver-core-2.0.1.jar:na]
> at com.datastax.driver.core.Metadata.rebuildSchema(Metadata.java:92) 
> [cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:293)
>  [cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:230)
>  [cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:170)
>  [cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:78) 
> [cassandra-driver-core-2.0.1.jar:na]
> at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1029) 
> [cassandra-driver-core-2.0.1.jar:na]
> at com.datastax.driver.core.Cluster.getMetadata(Cluster.java:270) 
> [cassandra-driver-core-2.0.1.jar:na]
> at 
> org.apache.cassandra.stress.util.JavaDriverClient.connect(JavaDriverClient.java:90)
>  [stress/:na]
> at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:177)
>  [stress/:na]
> at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:159)
>  [stress/:na]
> at 
> org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:264) 
> [stress/:na]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7716) cassandra-stress: provide better error messages

2014-08-07 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-7716:
--

Fix Version/s: (was: 2.1.0)
   2.1.1

> cassandra-stress: provide better error messages
> ---
>
> Key: CASSANDRA-7716
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7716
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Robert Stupp
>Assignee: T Jake Luciani
>Priority: Trivial
> Fix For: 2.1.1
>
>
> Just tried new stress tool.
> It would be great if the stress tool gives better error messages by telling 
> the user what option or config parameter/value caused an error.
> YAML parse errors are meaningful (gives code snippets etc).
> Examples are:
> {noformat}
> WARN  16:59:39 Setting caching options with deprecated syntax.
> Exception in thread "main" java.lang.NullPointerException
>   at java.util.regex.Matcher.getTextLength(Matcher.java:1234)
>   at java.util.regex.Matcher.reset(Matcher.java:308)
>   at java.util.regex.Matcher.(Matcher.java:228)
>   at java.util.regex.Pattern.matcher(Pattern.java:1088)
>   at 
> org.apache.cassandra.stress.settings.OptionDistribution.get(OptionDistribution.java:67)
>   at 
> org.apache.cassandra.stress.StressProfile.init(StressProfile.java:151)
>   at 
> org.apache.cassandra.stress.StressProfile.load(StressProfile.java:482)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommandUser.(SettingsCommandUser.java:53)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommandUser.build(SettingsCommandUser.java:114)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommand.get(SettingsCommand.java:134)
>   at 
> org.apache.cassandra.stress.settings.StressSettings.get(StressSettings.java:218)
>   at 
> org.apache.cassandra.stress.settings.StressSettings.parse(StressSettings.java:206)
>   at org.apache.cassandra.stress.Stress.main(Stress.java:58)
> {noformat}
> When table-definition is wrong:
> {noformat}
> Exception in thread "main" java.lang.RuntimeException: 
> org.apache.cassandra.exceptions.SyntaxException: line 6:14 mismatched input 
> '(' expecting ')'
>   at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:550)
>   at 
> org.apache.cassandra.stress.StressProfile.init(StressProfile.java:134)
>   at 
> org.apache.cassandra.stress.StressProfile.load(StressProfile.java:482)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommandUser.(SettingsCommandUser.java:53)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommandUser.build(SettingsCommandUser.java:114)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommand.get(SettingsCommand.java:134)
>   at 
> org.apache.cassandra.stress.settings.StressSettings.get(StressSettings.java:218)
>   at 
> org.apache.cassandra.stress.settings.StressSettings.parse(StressSettings.java:206)
>   at org.apache.cassandra.stress.Stress.main(Stress.java:58)
> Caused by: org.apache.cassandra.exceptions.SyntaxException: line 6:14 
> mismatched input '(' expecting ')'
>   at 
> org.apache.cassandra.cql3.CqlParser.throwLastRecognitionError(CqlParser.java:273)
>   at 
> org.apache.cassandra.cql3.QueryProcessor.parseStatement(QueryProcessor.java:456)
>   at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:541)
>   ... 8 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Assigned] (CASSANDRA-7710) nodetool ring throws exception if run on machine without Cassandra

2014-08-07 Thread Michael Shuler (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Shuler reassigned CASSANDRA-7710:
-

Assignee: Michael Shuler

> nodetool ring throws exception if run on machine without Cassandra
> --
>
> Key: CASSANDRA-7710
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7710
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Jimmy Mårdell
>Assignee: Michael Shuler
>Priority: Minor
>
> DatabaseDescriptor.getNumTokens() is invoked in the nodetool ring command 
> which doesn't work so well when running on a machine where Cassandra doesnt' 
> exist. And it has all kind of side effects as well.
> This seems fixed in 2.1 but would be nice if it was fixed in 2.0 as well.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-7720) Add a more consistent snapshot mechanism

2014-08-07 Thread Mike Schrag (JIRA)
Mike Schrag created CASSANDRA-7720:
--

 Summary: Add a more consistent snapshot mechanism
 Key: CASSANDRA-7720
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7720
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Mike Schrag


We’ve hit an interesting issue with snapshotting, which makes sense in 
hindsight, but presents an interesting challenge for consistent restores:

* initiate snapshot
* snapshotting flushes table A and takes the snapshot
* insert into table A
* insert into table B
* snapshotting flushes table B and takes the snapshot
* snapshot finishes

So what happens here is that we end up having a B, but NOT having an A, even 
though B was chronologically inserted after A.

It makes sense when I think about what snapshot is doing, but I wonder if 
snapshots actually should get a little fancier to behave a little more like 
what I think most people would expect. What I think should happen is something 
along the lines of the following:

For each node:
* pass a client timestamp in the snapshot call corresponding to "now"
* snapshot the tables using the existing procedure
* walk backwards through the linked snapshot sstables in that snapshot
  * if the earliest update in that sstable is after the client's timestamp, 
delete the sstable in the snapshot
  * if the earliest update in the sstable is before the client's timestamp, 
then look at the last update. Walk backwards through that sstable.
* if any updates fall after the timestamp, make a copy of that sstable in 
the snapshot folder only up to the point of the timestamp and then delete the 
original sstable in the snapshot (we need to copy because we're likely holding 
a shared hard linked sstable)

I think this would guarantee that you have a chronologically consistent view of 
your snapshot across all machines and columnfamilies within a given snapshot.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7719) Add PreparedStatements related metrics

2014-08-07 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-7719:
--

Fix Version/s: 2.1.1

> Add PreparedStatements related metrics
> --
>
> Key: CASSANDRA-7719
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7719
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Michaël Figuière
>Priority: Minor
> Fix For: 2.1.1
>
>
> Cassandra newcomers often don't understand that they're expected to use 
> PreparedStatements for almost all of their repetitive queries executed in 
> production.
> It doesn't look like Cassandra currently expose any PreparedStatements 
> related metrics.It would be interesting, and I believe fairly simple, to add 
> several of them to make it possible, in development / management / monitoring 
> tools, to show warnings or alerts related to this bad practice.
> Thus I would suggest to add the following metrics:
> * Executed prepared statements count
> * Executed unprepared statements count
> * Amount of PreparedStatements that have been registered on the node



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7719) Add PreparedStatements related metrics

2014-08-07 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-7719:
--

Assignee: T Jake Luciani

> Add PreparedStatements related metrics
> --
>
> Key: CASSANDRA-7719
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7719
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Michaël Figuière
>Assignee: T Jake Luciani
>Priority: Minor
> Fix For: 2.1.1
>
>
> Cassandra newcomers often don't understand that they're expected to use 
> PreparedStatements for almost all of their repetitive queries executed in 
> production.
> It doesn't look like Cassandra currently expose any PreparedStatements 
> related metrics.It would be interesting, and I believe fairly simple, to add 
> several of them to make it possible, in development / management / monitoring 
> tools, to show warnings or alerts related to this bad practice.
> Thus I would suggest to add the following metrics:
> * Executed prepared statements count
> * Executed unprepared statements count
> * Amount of PreparedStatements that have been registered on the node



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7468) Add time-based execution to cassandra-stress

2014-08-07 Thread Daniel Meyer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14090102#comment-14090102
 ] 

Daniel Meyer commented on CASSANDRA-7468:
-

from the help:

{code}
Usage: user [clustering=DIST(?)] ops(?) [profile=?] [err?] [n Add time-based execution to cassandra-stress
> 
>
> Key: CASSANDRA-7468
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7468
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Matt Kennedy
>Assignee: Matt Kennedy
>Priority: Minor
> Fix For: 2.1.1
>
> Attachments: 7468v2.txt, trunk-7468-rebase.patch, trunk-7468.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7700) Unexpected exception in RangeTombstoneList.insertFrom during Python Driver Duration Test

2014-08-07 Thread Tyler Hobbs (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14090004#comment-14090004
 ] 

Tyler Hobbs commented on CASSANDRA-7700:


+1

> Unexpected exception in RangeTombstoneList.insertFrom during Python Driver 
> Duration Test
> 
>
> Key: CASSANDRA-7700
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7700
> Project: Cassandra
>  Issue Type: Bug
> Environment: ubuntu via ctool. Linux ip-10-199-0-152 3.2.0-57-virtual 
> #87-Ubuntu SMP Tue Nov 12 21:53:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
>Reporter: Rick Smith
>Assignee: Sylvain Lebresne
> Fix For: 2.0.10
>
> Attachments: 7700.txt, Tombstone_Exception.txt
>
>
> Found the attached exception (duration test log and associated Cassandra log) 
> when running the Python driver duration tests against 
> CASSANDRA_VERSION=cassandra-2.1.0-rc5 and master branch of driver. Error 
> repeated in logs twice over 12 hours on master_gevent cluster, and once on 
> gevent cluster over the same time period. Cluster and associated cluster 
> setup via ctool.
> Log excerpt:
> {noformat}
> INFO  [MemtableFlushWriter:184] 2014-08-05 05:45:39,161 Memtable.java:360 - 
> Completed flushing 
> /srv/performance/cass/data/duration_test/ints-133f8c901c2f11e491e66b1b73f81641/duration_test-ints-ka-173-Data.db
>  (2131716 bytes) for commitlog position 
> ReplayPosition(segmentId=1407193910537, position=13460548)
> ERROR [SharedPool-Worker-7] 2014-08-05 05:45:45,160 ErrorMessage.java:218 - 
> Unexpected exception during request
> java.lang.AssertionError: null
>   at 
> org.apache.cassandra.db.RangeTombstoneList.insertFrom(RangeTombstoneList.java:528)
>  ~[main/:na]
>   at 
> org.apache.cassandra.db.RangeTombstoneList.addAll(RangeTombstoneList.java:221)
>  ~[main/:na]
> {noformat}
> more details in attachment.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7622) Implement virtual tables

2014-08-07 Thread JIRA

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089977#comment-14089977
 ] 

Michaël Figuière commented on CASSANDRA-7622:
-

+1 as well. Once it there, it would make it easy to expose any API-defined 
data. This would make it possible to create tools that can rely on JMX metrics, 
configuration, or any other information without relying on an extra port or on 
a local agent to access this data.

> Implement virtual tables
> 
>
> Key: CASSANDRA-7622
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7622
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Tupshin Harper
> Fix For: 3.0
>
>
> There are a variety of reasons to want virtual tables, which would be any 
> table that would be backed by an API, rather than data explicitly managed and 
> stored as sstables.
> One possible use case would be to expose JMX data through CQL as a 
> resurrection of CASSANDRA-3527.
> Another is a more general framework to implement the ability to expose yaml 
> configuration information. So it would be an alternate approach to 
> CASSANDRA-7370.
> A possible implementation would be in terms of CASSANDRA-7443, but I am not 
> presupposing.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-7719) Add PreparedStatements related metrics

2014-08-07 Thread JIRA
Michaël Figuière created CASSANDRA-7719:
---

 Summary: Add PreparedStatements related metrics
 Key: CASSANDRA-7719
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7719
 Project: Cassandra
  Issue Type: New Feature
Reporter: Michaël Figuière
Priority: Minor


Cassandra newcomers often don't understand that they're expected to use 
PreparedStatements for almost all of their repetitive queries executed in 
production.

It doesn't look like Cassandra currently expose any PreparedStatements related 
metrics.It would be interesting, and I believe fairly simple, to add several of 
them to make it possible, in development / management / monitoring tools, to 
show warnings or alerts related to this bad practice.

Thus I would suggest to add the following metrics:
* Executed prepared statements count
* Executed unprepared statements count
* Amount of PreparedStatements that have been registered on the node




--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7628) Tools java driver needs to be updated

2014-08-07 Thread Benedict (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089959#comment-14089959
 ] 

Benedict commented on CASSANDRA-7628:
-

FTR, 2.1.0-rc1 works fine dropped in as well - only thing that doesn't compile 
is CqlPagingRecordReader, which needs a couple of delegate methods 
auto-generating.

> Tools java driver needs to be updated
> -
>
> Key: CASSANDRA-7628
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7628
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Brandon Williams
>Assignee: Benedict
>Priority: Minor
> Fix For: 2.1.1
>
>
> When you run stress currently you get a bunch of harmless stacktraces like:
> {noformat}
> ERROR 21:11:51 Error parsing schema options for table system_traces.sessions: 
> Cluster.getMetadata().getKeyspace("system_traces").getTable("sessions").getOptions()
>  will return null
> java.lang.IllegalArgumentException: populate_io_cache_on_flush is not a 
> column defined in this metadata
> at 
> com.datastax.driver.core.ColumnDefinitions.getAllIdx(ColumnDefinitions.java:273)
>  ~[cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ColumnDefinitions.getFirstIdx(ColumnDefinitions.java:279)
>  ~[cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ArrayBackedRow.isNull(ArrayBackedRow.java:56) 
> ~[cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.TableMetadata$Options.(TableMetadata.java:529) 
> ~[cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.TableMetadata.build(TableMetadata.java:119) 
> ~[cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.Metadata.buildTableMetadata(Metadata.java:131) 
> [cassandra-driver-core-2.0.1.jar:na]
> at com.datastax.driver.core.Metadata.rebuildSchema(Metadata.java:92) 
> [cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:293)
>  [cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:230)
>  [cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:170)
>  [cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:78) 
> [cassandra-driver-core-2.0.1.jar:na]
> at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1029) 
> [cassandra-driver-core-2.0.1.jar:na]
> at com.datastax.driver.core.Cluster.getMetadata(Cluster.java:270) 
> [cassandra-driver-core-2.0.1.jar:na]
> at 
> org.apache.cassandra.stress.util.JavaDriverClient.connect(JavaDriverClient.java:90)
>  [stress/:na]
> at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:177)
>  [stress/:na]
> at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:159)
>  [stress/:na]
> at 
> org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:264) 
> [stress/:na]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7628) Tools java driver needs to be updated

2014-08-07 Thread Michael Shuler (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089948#comment-14089948
 ] 

Michael Shuler commented on CASSANDRA-7628:
---

Since the tools/lib java-driver version is currently 2.0.1, I replaced it with 
tools/lib/cassandra-driver-core-2.0.4.jar and C* builds fine. This clears up 
the ugly stacktraces from stress, but I'm not sure how this would affect hadoop 
- untested.

> Tools java driver needs to be updated
> -
>
> Key: CASSANDRA-7628
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7628
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Brandon Williams
>Assignee: Benedict
>Priority: Minor
> Fix For: 2.1.1
>
>
> When you run stress currently you get a bunch of harmless stacktraces like:
> {noformat}
> ERROR 21:11:51 Error parsing schema options for table system_traces.sessions: 
> Cluster.getMetadata().getKeyspace("system_traces").getTable("sessions").getOptions()
>  will return null
> java.lang.IllegalArgumentException: populate_io_cache_on_flush is not a 
> column defined in this metadata
> at 
> com.datastax.driver.core.ColumnDefinitions.getAllIdx(ColumnDefinitions.java:273)
>  ~[cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ColumnDefinitions.getFirstIdx(ColumnDefinitions.java:279)
>  ~[cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ArrayBackedRow.isNull(ArrayBackedRow.java:56) 
> ~[cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.TableMetadata$Options.(TableMetadata.java:529) 
> ~[cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.TableMetadata.build(TableMetadata.java:119) 
> ~[cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.Metadata.buildTableMetadata(Metadata.java:131) 
> [cassandra-driver-core-2.0.1.jar:na]
> at com.datastax.driver.core.Metadata.rebuildSchema(Metadata.java:92) 
> [cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:293)
>  [cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:230)
>  [cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:170)
>  [cassandra-driver-core-2.0.1.jar:na]
> at 
> com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:78) 
> [cassandra-driver-core-2.0.1.jar:na]
> at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1029) 
> [cassandra-driver-core-2.0.1.jar:na]
> at com.datastax.driver.core.Cluster.getMetadata(Cluster.java:270) 
> [cassandra-driver-core-2.0.1.jar:na]
> at 
> org.apache.cassandra.stress.util.JavaDriverClient.connect(JavaDriverClient.java:90)
>  [stress/:na]
> at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:177)
>  [stress/:na]
> at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:159)
>  [stress/:na]
> at 
> org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:264) 
> [stress/:na]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7718) dtest cql_tests.py:TestCQL.cql3_insert_thrift_test fails intermittently

2014-08-07 Thread Michael Shuler (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Shuler updated CASSANDRA-7718:
--

Tester: Michael Shuler

> dtest cql_tests.py:TestCQL.cql3_insert_thrift_test fails intermittently
> ---
>
> Key: CASSANDRA-7718
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7718
> Project: Cassandra
>  Issue Type: Test
>  Components: Tests
> Environment: cassandra-2.1.0 branch
>Reporter: Michael Shuler
>Assignee: Aleksey Yeschenko
> Attachments: node1.log
>
>
> This test fails about 20-25% of the time - ran about 10 times through looping 
> the test, and it typically fails on the 4th or 5th test.
> {noformat}
> (master)mshuler@hana:~/git/cassandra-dtest$ ../loop_dtest.sh 
> "cql_tests.py:TestCQL.cql3_insert_thrift_test"
> <...>
>  Run #4 
> nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
> cql3_insert_thrift_test (cql_tests.TestCQL) ... cluster ccm directory: 
> /tmp/dtest-Drwunj
> [node1 ERROR] 
> [node1 ERROR] 
> FAIL
> removing ccm cluster test at: /tmp/dtest-Drwunj
> ==
> FAIL: cql3_insert_thrift_test (cql_tests.TestCQL)
> --
> Traceback (most recent call last):
>   File "/home/mshuler/git/cassandra-dtest/cql_tests.py", line 1627, in 
> cql3_insert_thrift_test
> assert res == [ [2, 4, 200] ], res
> AssertionError: []
> --
> Ran 1 test in 7.192s
> {noformat}
> loop_dtest.sh:
> {noformat}
> #!/bin/bash
> if [ ${1} ]; then
> export MAX_HEAP_SIZE="1G"
> export HEAP_NEWSIZE="256M"
> export PRINT_DEBUG=true
> COUNT=0
> while true; do
> echo
> echo " Run #$COUNT "
> nosetests --nocapture --nologcapture --verbosity=3 ${1}
> if [ $? -ne 0 ]; then
> exit 1
> fi
> ((COUNT++))
> sleep 0.5
> done
> unset MAX_HEAP_SIZE HEAP_NEWSIZE PRINT_DEBUG
> else
> echo "  ${0} needs a test to run.."
> exit 255
> fi
> {noformat}
> I find no ERROR/WARN log entries from the failed test - attached node log 
> anyway.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Assigned] (CASSANDRA-7718) dtest cql_tests.py:TestCQL.cql3_insert_thrift_test fails intermittently

2014-08-07 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis reassigned CASSANDRA-7718:
-

Assignee: Aleksey Yeschenko

> dtest cql_tests.py:TestCQL.cql3_insert_thrift_test fails intermittently
> ---
>
> Key: CASSANDRA-7718
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7718
> Project: Cassandra
>  Issue Type: Test
>  Components: Tests
> Environment: cassandra-2.1.0 branch
>Reporter: Michael Shuler
>Assignee: Aleksey Yeschenko
> Attachments: node1.log
>
>
> This test fails about 20-25% of the time - ran about 10 times through looping 
> the test, and it typically fails on the 4th or 5th test.
> {noformat}
> (master)mshuler@hana:~/git/cassandra-dtest$ ../loop_dtest.sh 
> "cql_tests.py:TestCQL.cql3_insert_thrift_test"
> <...>
>  Run #4 
> nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
> cql3_insert_thrift_test (cql_tests.TestCQL) ... cluster ccm directory: 
> /tmp/dtest-Drwunj
> [node1 ERROR] 
> [node1 ERROR] 
> FAIL
> removing ccm cluster test at: /tmp/dtest-Drwunj
> ==
> FAIL: cql3_insert_thrift_test (cql_tests.TestCQL)
> --
> Traceback (most recent call last):
>   File "/home/mshuler/git/cassandra-dtest/cql_tests.py", line 1627, in 
> cql3_insert_thrift_test
> assert res == [ [2, 4, 200] ], res
> AssertionError: []
> --
> Ran 1 test in 7.192s
> {noformat}
> loop_dtest.sh:
> {noformat}
> #!/bin/bash
> if [ ${1} ]; then
> export MAX_HEAP_SIZE="1G"
> export HEAP_NEWSIZE="256M"
> export PRINT_DEBUG=true
> COUNT=0
> while true; do
> echo
> echo " Run #$COUNT "
> nosetests --nocapture --nologcapture --verbosity=3 ${1}
> if [ $? -ne 0 ]; then
> exit 1
> fi
> ((COUNT++))
> sleep 0.5
> done
> unset MAX_HEAP_SIZE HEAP_NEWSIZE PRINT_DEBUG
> else
> echo "  ${0} needs a test to run.."
> exit 255
> fi
> {noformat}
> I find no ERROR/WARN log entries from the failed test - attached node log 
> anyway.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-7718) dtest cql_tests.py:TestCQL.cql3_insert_thrift_test fails intermittently

2014-08-07 Thread Michael Shuler (JIRA)
Michael Shuler created CASSANDRA-7718:
-

 Summary: dtest cql_tests.py:TestCQL.cql3_insert_thrift_test fails 
intermittently
 Key: CASSANDRA-7718
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7718
 Project: Cassandra
  Issue Type: Test
  Components: Tests
 Environment: cassandra-2.1.0 branch
Reporter: Michael Shuler
 Attachments: node1.log

This test fails about 20-25% of the time - ran about 10 times through looping 
the test, and it typically fails on the 4th or 5th test.
{noformat}
(master)mshuler@hana:~/git/cassandra-dtest$ ../loop_dtest.sh 
"cql_tests.py:TestCQL.cql3_insert_thrift_test"
<...>

 Run #4 
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
cql3_insert_thrift_test (cql_tests.TestCQL) ... cluster ccm directory: 
/tmp/dtest-Drwunj
[node1 ERROR] 
[node1 ERROR] 
FAIL
removing ccm cluster test at: /tmp/dtest-Drwunj

==
FAIL: cql3_insert_thrift_test (cql_tests.TestCQL)
--
Traceback (most recent call last):
  File "/home/mshuler/git/cassandra-dtest/cql_tests.py", line 1627, in 
cql3_insert_thrift_test
assert res == [ [2, 4, 200] ], res
AssertionError: []

--
Ran 1 test in 7.192s
{noformat}

loop_dtest.sh:
{noformat}
#!/bin/bash
if [ ${1} ]; then
export MAX_HEAP_SIZE="1G"
export HEAP_NEWSIZE="256M"
export PRINT_DEBUG=true
COUNT=0
while true; do
echo
echo " Run #$COUNT "
nosetests --nocapture --nologcapture --verbosity=3 ${1}
if [ $? -ne 0 ]; then
exit 1
fi
((COUNT++))
sleep 0.5
done
unset MAX_HEAP_SIZE HEAP_NEWSIZE PRINT_DEBUG
else
echo "  ${0} needs a test to run.."
exit 255
fi
{noformat}

I find no ERROR/WARN log entries from the failed test - attached node log 
anyway.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7622) Implement virtual tables

2014-08-07 Thread Jon Haddad (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089862#comment-14089862
 ] 

Jon Haddad commented on CASSANDRA-7622:
---

+1 on virtual tables, especially for the purposes of querying JMX.

> Implement virtual tables
> 
>
> Key: CASSANDRA-7622
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7622
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Tupshin Harper
> Fix For: 3.0
>
>
> There are a variety of reasons to want virtual tables, which would be any 
> table that would be backed by an API, rather than data explicitly managed and 
> stored as sstables.
> One possible use case would be to expose JMX data through CQL as a 
> resurrection of CASSANDRA-3527.
> Another is a more general framework to implement the ability to expose yaml 
> configuration information. So it would be an alternate approach to 
> CASSANDRA-7370.
> A possible implementation would be in terms of CASSANDRA-7443, but I am not 
> presupposing.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Assigned] (CASSANDRA-7556) Update cqlsh for UDFs

2014-08-07 Thread Robert Stupp (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Stupp reassigned CASSANDRA-7556:
---

Assignee: Robert Stupp

> Update cqlsh for UDFs
> -
>
> Key: CASSANDRA-7556
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7556
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Tyler Hobbs
>Assignee: Robert Stupp
> Fix For: 3.0
>
> Attachments: 7556.txt
>
>
> Once CASSANDRA-7395 and CASSANDRA-7526 are complete, we'll want to add cqlsh 
> support for user defined functions.
> This will include:
> * Completion for {{CREATE FUNCTION}} and {{DROP FUNCTION}}
> * Tolerating (almost) arbitrary text inside function bodies
> * {{DESCRIBE TYPE}} support
> * Including types in {{DESCRIBE KEYSPACE}} output
> * Possibly {{GRANT}} completion for any new privileges



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7556) Update cqlsh for UDFs

2014-08-07 Thread Robert Stupp (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Stupp updated CASSANDRA-7556:


Attachment: 7556.txt

initial draft that supports 
* {{DESCRIBE FUNCTIONS}} lists all namespaces and all non-namespaced functions
* {{DESCRIBE FUNCTIONS }} lists all functions in the given namespace
* {{DESCRIBE FUNCTION }} prints given function (namespaced or 
non-namespaced)


> Update cqlsh for UDFs
> -
>
> Key: CASSANDRA-7556
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7556
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Tyler Hobbs
> Fix For: 3.0
>
> Attachments: 7556.txt
>
>
> Once CASSANDRA-7395 and CASSANDRA-7526 are complete, we'll want to add cqlsh 
> support for user defined functions.
> This will include:
> * Completion for {{CREATE FUNCTION}} and {{DROP FUNCTION}}
> * Tolerating (almost) arbitrary text inside function bodies
> * {{DESCRIBE TYPE}} support
> * Including types in {{DESCRIBE KEYSPACE}} output
> * Possibly {{GRANT}} completion for any new privileges



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7597) Remove static initializer in DatabaseDescriptor

2014-08-07 Thread Yuki Morishita (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089820#comment-14089820
 ] 

Yuki Morishita commented on CASSANDRA-7597:
---

In my opinion, we should, ultimately, get rid of DatabaseDescriptor.
The root of the problem is that it affects everything it touches even you just 
want a piece of it.
It does too much. I think calling System.exit from DD is not good at all.

So I prefer finding the way to do it rather than introducing tweak.

I think each module(gossip, net, streaming, etc...) shuold:

- Define own options and the way to validate them.
- Not *pull* options from somewhere else. Options should be given at the module 
initialization.

Note that we can keep Config/cassandra.yaml as is after the change because it 
is just the source of options.

For the first step, I'm planning to try to rip off DD from the path called from 
sstableloader(CASSANDRA-7585 is in fact a part of it).
It still is not a easy way, since classes like Range/Token indirectly reference 
option(partitioner, specifically) from DD.
After that, maybe we can move on to another tool or module for ripping off.

> Remove static initializer in DatabaseDescriptor
> ---
>
> Key: CASSANDRA-7597
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7597
> Project: Cassandra
>  Issue Type: Improvement
> Environment: Cassandra 2.0.9 (earlier version should be affected as 
> well)
>Reporter: Pavel Sakun
>Assignee: Robert Stupp
> Attachments: 7597.txt
>
>
> As discussed below, it's difficult to properly react on invalid configuration 
> values in a client tool that uses cassandra code (here: an sstable loader).
> Reason is that the static initializer in DatabaseDescriptor calls System.exit 
> in case of configuration failures.
> Recommend to implement some "loadAndApplyConfig" method on DatabaseDescriptor 
> and remove the static initializer and let the calling code react accordingly 
> (print error, exit VM).
> All direct and indirect uses of DatabaseDescriptor must be catched to solve 
> this ticket - so this is not a 2.1 ticket.
> --
> Old Description:
> We're using SSTableSimpleUnsortedWriter API to generate SSTable to be loaded 
> into cassandra. In case of any issue with config DatabaseDescriptor calls 
> System.exit() which is apparently not the thing you expect while using API.
> Test case is simple:
> System.setProperty( "cassandra.config", "" );
> new YamlConfigurationLoader().loadConfig();
> Thread.sleep( 5000 );
> System.out.println("We're still alive"); // this will never be called



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7695) Inserting the same row in parallel causes bad data to be returned to the client

2014-08-07 Thread Ryan McGuire (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089783#comment-14089783
 ] 

Ryan McGuire commented on CASSANDRA-7695:
-

[quick performance sanity 
check|http://riptano.github.io/cassandra_performance/graph_v3/graph.html?stats=stats.7695.json]

> Inserting the same row in parallel causes bad data to be returned to the 
> client
> ---
>
> Key: CASSANDRA-7695
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7695
> Project: Cassandra
>  Issue Type: Bug
> Environment: Linux 3.12.21, JVM 1.7u60
> Cassandra server 2.1.0 RC 5
> Cassandra datastax client version 2.1.0RC1
>Reporter: Johan Bjork
>Assignee: T Jake Luciani
>Priority: Blocker
>  Labels: qa-resolved
> Fix For: 2.1.0
>
> Attachments: 7695-workaround.txt, PutFailureRepro.java, 
> bad-data-tid43-get, bad-data-tid43-put
>
>
> Running the attached test program against a cassandra 2.1 server results in 
> scrambled data returned by the SELECT statement. Running it against latest 
> stable works fine.
> Attached:
> * Program that reproduces the failure
> * Example output files from mentioned test-program with the scrambled output.
> Failure mode:
> The value returned by 'get' is scrambled, the size is correct but some bytes 
> have shifted locations in the returned buffer.
> Cluster info:
> For the test we set up a single cassandra node using the stock configuration 
> file.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7695) Inserting the same row in parallel causes bad data to be returned to the client

2014-08-07 Thread Ryan McGuire (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan McGuire updated CASSANDRA-7695:


Labels: qa-resolved  (was: )

> Inserting the same row in parallel causes bad data to be returned to the 
> client
> ---
>
> Key: CASSANDRA-7695
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7695
> Project: Cassandra
>  Issue Type: Bug
> Environment: Linux 3.12.21, JVM 1.7u60
> Cassandra server 2.1.0 RC 5
> Cassandra datastax client version 2.1.0RC1
>Reporter: Johan Bjork
>Assignee: T Jake Luciani
>Priority: Blocker
>  Labels: qa-resolved
> Fix For: 2.1.0
>
> Attachments: 7695-workaround.txt, PutFailureRepro.java, 
> bad-data-tid43-get, bad-data-tid43-put
>
>
> Running the attached test program against a cassandra 2.1 server results in 
> scrambled data returned by the SELECT statement. Running it against latest 
> stable works fine.
> Attached:
> * Program that reproduces the failure
> * Example output files from mentioned test-program with the scrambled output.
> Failure mode:
> The value returned by 'get' is scrambled, the size is correct but some bytes 
> have shifted locations in the returned buffer.
> Cluster info:
> For the test we set up a single cassandra node using the stock configuration 
> file.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7498) sstable2json exports keys in a wrong format

2014-08-07 Thread Alexey Zotov (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089703#comment-14089703
 ] 

Alexey Zotov commented on CASSANDRA-7498:
-

Thanks.

> sstable2json exports keys in a wrong format
> ---
>
> Key: CASSANDRA-7498
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7498
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Alexey Zotov
>Assignee: Alexey Zotov
>Priority: Minor
>  Labels: tools
> Fix For: 2.1.1
>
> Attachments: CASSANDRA-2.1-7498.txt
>
>
> I examined code of _SSTableImport_ and _SSTableExport_ classes and found one 
> thing that looks strange to me. Currently processing (encoding/decoding) of 
> columns' names and values is performed based on CF Comparator and Value 
> Validator correspondingly. But row keys are processed using _#bytesToHex_ and 
> _#hexToBytes_ methods despite of there is Key Validator. Such approach works 
> properly for "bytes" keys only. For other types it exports keys in a wrong 
> format (i.e. they are exported in unreadable form).
> In the scope of this ticket we need to consider backward compatibility 
> (import of previously exported sstables). For "bytes" keys it will work as 
> previously since _#bytesToHex_ and _#hexToBytes_ methods are used in 
> internals of _BytesType_ class. For other types we need to allow an ability 
> to import data using "bytes" despite of configured validator.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7700) Unexpected exception in RangeTombstoneList.insertFrom during Python Driver Duration Test

2014-08-07 Thread Tyler Hobbs (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tyler Hobbs updated CASSANDRA-7700:
---

Description: 
Found the attached exception (duration test log and associated Cassandra log) 
when running the Python driver duration tests against 
CASSANDRA_VERSION=cassandra-2.1.0-rc5 and master branch of driver. Error 
repeated in logs twice over 12 hours on master_gevent cluster, and once on 
gevent cluster over the same time period. Cluster and associated cluster setup 
via ctool.

Log excerpt:
{noformat}
INFO  [MemtableFlushWriter:184] 2014-08-05 05:45:39,161 Memtable.java:360 - 
Completed flushing 
/srv/performance/cass/data/duration_test/ints-133f8c901c2f11e491e66b1b73f81641/duration_test-ints-ka-173-Data.db
 (2131716 bytes) for commitlog position ReplayPosition(segmentId=1407193910537, 
position=13460548)
ERROR [SharedPool-Worker-7] 2014-08-05 05:45:45,160 ErrorMessage.java:218 - 
Unexpected exception during request
java.lang.AssertionError: null
at 
org.apache.cassandra.db.RangeTombstoneList.insertFrom(RangeTombstoneList.java:528)
 ~[main/:na]
at 
org.apache.cassandra.db.RangeTombstoneList.addAll(RangeTombstoneList.java:221) 
~[main/:na]
{noformat}

more details in attachment.



  was:
Found the attached exception (duration test log and associated Cassandra log) 
when running the Python driver duration tests against 
CASSANDRA_VERSION=cassandra-2.1.0-rc5 and master branch of driver. Error 
repeated in logs twice over 12 hours on master_gevent cluster, and once on 
gevent cluster over the same time period. Cluster and associated cluster setup 
via ctool.

Log excerpt:
INFO  [MemtableFlushWriter:184] 2014-08-05 05:45:39,161 Memtable.java:360 - 
Completed flushing 
/srv/performance/cass/data/duration_test/ints-133f8c901c2f11e491e66b1b73f81641/duration_test-ints-ka-173-Data.db
 (2131716 bytes) for commitlog position ReplayPosition(segmentId=1407193910537, 
position=13460548)
ERROR [SharedPool-Worker-7] 2014-08-05 05:45:45,160 ErrorMessage.java:218 - 
Unexpected exception during request
java.lang.AssertionError: null
at 
org.apache.cassandra.db.RangeTombstoneList.insertFrom(RangeTombstoneList.java:528)
 ~[main/:na]
at 
org.apache.cassandra.db.RangeTombstoneList.addAll(RangeTombstoneList.java:221) 
~[main/:na]

more details in attachment.




> Unexpected exception in RangeTombstoneList.insertFrom during Python Driver 
> Duration Test
> 
>
> Key: CASSANDRA-7700
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7700
> Project: Cassandra
>  Issue Type: Bug
> Environment: ubuntu via ctool. Linux ip-10-199-0-152 3.2.0-57-virtual 
> #87-Ubuntu SMP Tue Nov 12 21:53:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
>Reporter: Rick Smith
>Assignee: Sylvain Lebresne
> Fix For: 2.0.10
>
> Attachments: 7700.txt, Tombstone_Exception.txt
>
>
> Found the attached exception (duration test log and associated Cassandra log) 
> when running the Python driver duration tests against 
> CASSANDRA_VERSION=cassandra-2.1.0-rc5 and master branch of driver. Error 
> repeated in logs twice over 12 hours on master_gevent cluster, and once on 
> gevent cluster over the same time period. Cluster and associated cluster 
> setup via ctool.
> Log excerpt:
> {noformat}
> INFO  [MemtableFlushWriter:184] 2014-08-05 05:45:39,161 Memtable.java:360 - 
> Completed flushing 
> /srv/performance/cass/data/duration_test/ints-133f8c901c2f11e491e66b1b73f81641/duration_test-ints-ka-173-Data.db
>  (2131716 bytes) for commitlog position 
> ReplayPosition(segmentId=1407193910537, position=13460548)
> ERROR [SharedPool-Worker-7] 2014-08-05 05:45:45,160 ErrorMessage.java:218 - 
> Unexpected exception during request
> java.lang.AssertionError: null
>   at 
> org.apache.cassandra.db.RangeTombstoneList.insertFrom(RangeTombstoneList.java:528)
>  ~[main/:na]
>   at 
> org.apache.cassandra.db.RangeTombstoneList.addAll(RangeTombstoneList.java:221)
>  ~[main/:na]
> {noformat}
> more details in attachment.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7707) blobAs() function results not validated

2014-08-07 Thread Tyler Hobbs (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089688#comment-14089688
 ] 

Tyler Hobbs commented on CASSANDRA-7707:


+1 with two minor nits:

* Change {{"In call to function %s, value 0x%s is not a valid binary 
representation for a %s"}} to {{"In call to function %s, value 0x%s is not a 
valid binary representation for type %s"}}.  (The first version is a little 
strange for some types.)
* In {{"...is not a valid value for it's declared return type..."}}, it should 
be "its"

> blobAs() function results not validated
> ---
>
> Key: CASSANDRA-7707
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7707
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Tyler Hobbs
>Assignee: Sylvain Lebresne
>Priority: Critical
> Fix For: 2.0.10, 2.1.1
>
> Attachments: 7707.txt
>
>
> The results of the {{blobAs*()}} functions are not validated.
> Here are some examples:
> Non-type1 UUID inserted into timeuuid column:
> {noformat}
> create table foo (k int primary key, v timeuuid);
> insert into foo (0, blobAsTimeuuid(0x));
> {noformat}
> Blob with length > 4 inserted into an int column:
> {noformat}
> create table bar (k int primary key, v int);
> insert into bar (k, v) VALUES (0, blobAsInt(0x00));
> {noformat}
> Non-ascii characters inserted into an ascii column:
> {noformat}
> create table baz (k int primary key, v ascii);
> insert into baz (k, v) VALUES (0, blobAsAscii(0x));
> {noformat}
> Some of these (like the int column) could cause issues that look like 
> corruption.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7562) Java source code for UDFs

2014-08-07 Thread Robert Stupp (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Stupp updated CASSANDRA-7562:


Attachment: 7562-on-7395.txt
7562-full.txt

UDF schema-change removed

> Java source code for UDFs
> -
>
> Key: CASSANDRA-7562
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7562
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Robert Stupp
>Assignee: Robert Stupp
> Attachments: 7562-full.txt, 7562-on-7395.txt
>
>
> Purpose of this ticket to add support for Java source code for user defined 
> functions (CASSANDRA-7395)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7395) Support for pure user-defined functions (UDF)

2014-08-07 Thread Robert Stupp (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Stupp updated CASSANDRA-7395:


Attachment: 7395.txt

New patch with schema-change for functions removed

> Support for pure user-defined functions (UDF)
> -
>
> Key: CASSANDRA-7395
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7395
> Project: Cassandra
>  Issue Type: New Feature
>  Components: API, Core
>Reporter: Jonathan Ellis
>Assignee: Robert Stupp
>  Labels: cql
> Fix For: 3.0
>
> Attachments: 7395-dtest.txt, 7395.txt, udf-create-syntax.png, 
> udf-drop-syntax.png
>
>
> We have some tickets for various aspects of UDF (CASSANDRA-4914, 
> CASSANDRA-5970, CASSANDRA-4998) but they all suffer from various degrees of 
> ocean-boiling.
> Let's start with something simple: allowing pure user-defined functions in 
> the SELECT clause of a CQL query.  That's it.
> By "pure" I mean, must depend only on the input parameters.  No side effects. 
>  No exposure to C* internals.  Column values in, result out.  
> http://en.wikipedia.org/wiki/Pure_function



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7562) Java source code for UDFs

2014-08-07 Thread Robert Stupp (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Stupp updated CASSANDRA-7562:


Attachment: (was: 7562-on-7395.txt)

> Java source code for UDFs
> -
>
> Key: CASSANDRA-7562
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7562
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Robert Stupp
>Assignee: Robert Stupp
>
> Purpose of this ticket to add support for Java source code for user defined 
> functions (CASSANDRA-7395)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7562) Java source code for UDFs

2014-08-07 Thread Robert Stupp (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Stupp updated CASSANDRA-7562:


Attachment: (was: 7562-full.txt)

> Java source code for UDFs
> -
>
> Key: CASSANDRA-7562
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7562
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Robert Stupp
>Assignee: Robert Stupp
>
> Purpose of this ticket to add support for Java source code for user defined 
> functions (CASSANDRA-7395)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7395) Support for pure user-defined functions (UDF)

2014-08-07 Thread Robert Stupp (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Stupp updated CASSANDRA-7395:


Attachment: (was: 7395-native-3-4.txt)

> Support for pure user-defined functions (UDF)
> -
>
> Key: CASSANDRA-7395
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7395
> Project: Cassandra
>  Issue Type: New Feature
>  Components: API, Core
>Reporter: Jonathan Ellis
>Assignee: Robert Stupp
>  Labels: cql
> Fix For: 3.0
>
> Attachments: 7395-dtest.txt, udf-create-syntax.png, 
> udf-drop-syntax.png
>
>
> We have some tickets for various aspects of UDF (CASSANDRA-4914, 
> CASSANDRA-5970, CASSANDRA-4998) but they all suffer from various degrees of 
> ocean-boiling.
> Let's start with something simple: allowing pure user-defined functions in 
> the SELECT clause of a CQL query.  That's it.
> By "pure" I mean, must depend only on the input parameters.  No side effects. 
>  No exposure to C* internals.  Column values in, result out.  
> http://en.wikipedia.org/wiki/Pure_function



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7395) Support for pure user-defined functions (UDF)

2014-08-07 Thread Robert Stupp (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Stupp updated CASSANDRA-7395:


Attachment: (was: 7395.txt)

> Support for pure user-defined functions (UDF)
> -
>
> Key: CASSANDRA-7395
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7395
> Project: Cassandra
>  Issue Type: New Feature
>  Components: API, Core
>Reporter: Jonathan Ellis
>Assignee: Robert Stupp
>  Labels: cql
> Fix For: 3.0
>
> Attachments: 7395-dtest.txt, udf-create-syntax.png, 
> udf-drop-syntax.png
>
>
> We have some tickets for various aspects of UDF (CASSANDRA-4914, 
> CASSANDRA-5970, CASSANDRA-4998) but they all suffer from various degrees of 
> ocean-boiling.
> Let's start with something simple: allowing pure user-defined functions in 
> the SELECT clause of a CQL query.  That's it.
> By "pure" I mean, must depend only on the input parameters.  No side effects. 
>  No exposure to C* internals.  Column values in, result out.  
> http://en.wikipedia.org/wiki/Pure_function



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Reopened] (CASSANDRA-6126) Set MALLOC_ARENA_MAX in cassandra-env.sh for new glibc per-thread allocator

2014-08-07 Thread Brandon Williams (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-6126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams reopened CASSANDRA-6126:
-


> Set MALLOC_ARENA_MAX in cassandra-env.sh for new glibc per-thread allocator
> ---
>
> Key: CASSANDRA-6126
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6126
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Packaging
> Environment: glibc >= 2.10
>Reporter: J. Ryan Earl
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.2
>
>
> Cassandra does not take into account particular GLIBC environment variables 
> and the nature of the JVM.  Cassandra should set the MALLOC_ARENA_MAX 
> variable, ideally in cassandra-env.sh, to have something like the following:
> {noformat}
> export MALLOC_ARENA_MAX=${MALLOC_ARENA_MAX:-4}
> {noformat}
> This will limit the number of per-thread memory allocation arenas (ie 
> separate memory ranges dedicated to each thread for memory allocation) for 
> the new per-thread GLIBC malloc found in distribution like Enterprise Linux 6 
> and newer.  The net effect is a performance gain, specifically through 
> reduced page-table size and kernel overhead of memory management.  Without 
> the setting, Cassandra will occupy more than double the amount of virtual 
> memory space, and due to increased pagetable size, the resident amount of 
> memory will also be somewhat larger (~10% or so).  For more discussion, see 
> HADOOP-7154.  Bottom line, cassandra-env.sh need to be setting 
> MALLOC_ARENA_MAX to better use system resources.
> In general it can be stated all JVMs should use this environment setting as 
> JVMs tend to be highly threaded and manage their own heap.  Cassandra and 
> Hadoop in particular seem to benefit from my testing.
> More background: 
> http://siddhesh.in/journal/2012/10/24/malloc-per-thread-arenas-in-glibc/



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-2388) ColumnFamilyRecordReader fails for a given split because a host is down, even if records could reasonably be read from other replica.

2014-08-07 Thread Paulo Motta (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089646#comment-14089646
 ] 

Paulo Motta commented on CASSANDRA-2388:


[~pkolaczk] any update on this? this review has been roaming for quite some 
time now...
sorry for bothering but would be nice to see this integrated. cheers!

> ColumnFamilyRecordReader fails for a given split because a host is down, even 
> if records could reasonably be read from other replica.
> -
>
> Key: CASSANDRA-2388
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2388
> Project: Cassandra
>  Issue Type: Bug
>  Components: Hadoop
>Affects Versions: 0.6
>Reporter: Eldon Stegall
>Assignee: Paulo Motta
>Priority: Minor
>  Labels: hadoop, inputformat
> Fix For: 2.0.10
>
> Attachments: 0002_On_TException_try_next_split.patch, 
> 1.2-CASSANDRA-2388.patch, 2.0-CASSANDRA-2388-v2.patch, 
> 2.0-CASSANDRA-2388.patch, CASSANDRA-2388-addition1.patch, 
> CASSANDRA-2388-extended.patch, CASSANDRA-2388.patch, CASSANDRA-2388.patch, 
> CASSANDRA-2388.patch, CASSANDRA-2388.patch
>
>
> ColumnFamilyRecordReader only tries the first location for a given split. We 
> should try multiple locations for a given split.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7597) Remove static initializer in DatabaseDescriptor

2014-08-07 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089639#comment-14089639
 ] 

Jonathan Ellis commented on CASSANDRA-7597:
---

WDYT [~yukim]?

> Remove static initializer in DatabaseDescriptor
> ---
>
> Key: CASSANDRA-7597
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7597
> Project: Cassandra
>  Issue Type: Improvement
> Environment: Cassandra 2.0.9 (earlier version should be affected as 
> well)
>Reporter: Pavel Sakun
>Assignee: Robert Stupp
> Attachments: 7597.txt
>
>
> As discussed below, it's difficult to properly react on invalid configuration 
> values in a client tool that uses cassandra code (here: an sstable loader).
> Reason is that the static initializer in DatabaseDescriptor calls System.exit 
> in case of configuration failures.
> Recommend to implement some "loadAndApplyConfig" method on DatabaseDescriptor 
> and remove the static initializer and let the calling code react accordingly 
> (print error, exit VM).
> All direct and indirect uses of DatabaseDescriptor must be catched to solve 
> this ticket - so this is not a 2.1 ticket.
> --
> Old Description:
> We're using SSTableSimpleUnsortedWriter API to generate SSTable to be loaded 
> into cassandra. In case of any issue with config DatabaseDescriptor calls 
> System.exit() which is apparently not the thing you expect while using API.
> Test case is simple:
> System.setProperty( "cassandra.config", "" );
> new YamlConfigurationLoader().loadConfig();
> Thread.sleep( 5000 );
> System.out.println("We're still alive"); // this will never be called



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6126) Set MALLOC_ARENA_MAX in cassandra-env.sh for new glibc per-thread allocator

2014-08-07 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089642#comment-14089642
 ] 

Jonathan Ellis commented on CASSANDRA-6126:
---

/cc [~brandon.williams]

> Set MALLOC_ARENA_MAX in cassandra-env.sh for new glibc per-thread allocator
> ---
>
> Key: CASSANDRA-6126
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6126
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Packaging
> Environment: glibc >= 2.10
>Reporter: J. Ryan Earl
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.2
>
>
> Cassandra does not take into account particular GLIBC environment variables 
> and the nature of the JVM.  Cassandra should set the MALLOC_ARENA_MAX 
> variable, ideally in cassandra-env.sh, to have something like the following:
> {noformat}
> export MALLOC_ARENA_MAX=${MALLOC_ARENA_MAX:-4}
> {noformat}
> This will limit the number of per-thread memory allocation arenas (ie 
> separate memory ranges dedicated to each thread for memory allocation) for 
> the new per-thread GLIBC malloc found in distribution like Enterprise Linux 6 
> and newer.  The net effect is a performance gain, specifically through 
> reduced page-table size and kernel overhead of memory management.  Without 
> the setting, Cassandra will occupy more than double the amount of virtual 
> memory space, and due to increased pagetable size, the resident amount of 
> memory will also be somewhat larger (~10% or so).  For more discussion, see 
> HADOOP-7154.  Bottom line, cassandra-env.sh need to be setting 
> MALLOC_ARENA_MAX to better use system resources.
> In general it can be stated all JVMs should use this environment setting as 
> JVMs tend to be highly threaded and manage their own heap.  Cassandra and 
> Hadoop in particular seem to benefit from my testing.
> More background: 
> http://siddhesh.in/journal/2012/10/24/malloc-per-thread-arenas-in-glibc/



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7717) cassandra-stress: add sample yamls to distro

2014-08-07 Thread T Jake Luciani (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

T Jake Luciani updated CASSANDRA-7717:
--

Priority: Minor  (was: Major)

> cassandra-stress: add sample yamls to distro
> 
>
> Key: CASSANDRA-7717
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7717
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Robert Stupp
>Assignee: T Jake Luciani
>Priority: Minor
> Fix For: 2.1.0
>
> Attachments: 7717.txt
>
>
> C* stress is missing sample yaml files in distro. They are in git - but not 
> in the downloadable tgz .



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7716) cassandra-stress: provide better error messages

2014-08-07 Thread T Jake Luciani (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

T Jake Luciani updated CASSANDRA-7716:
--

Priority: Trivial  (was: Major)

> cassandra-stress: provide better error messages
> ---
>
> Key: CASSANDRA-7716
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7716
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Robert Stupp
>Assignee: T Jake Luciani
>Priority: Trivial
> Fix For: 2.1.0
>
>
> Just tried new stress tool.
> It would be great if the stress tool gives better error messages by telling 
> the user what option or config parameter/value caused an error.
> YAML parse errors are meaningful (gives code snippets etc).
> Examples are:
> {noformat}
> WARN  16:59:39 Setting caching options with deprecated syntax.
> Exception in thread "main" java.lang.NullPointerException
>   at java.util.regex.Matcher.getTextLength(Matcher.java:1234)
>   at java.util.regex.Matcher.reset(Matcher.java:308)
>   at java.util.regex.Matcher.(Matcher.java:228)
>   at java.util.regex.Pattern.matcher(Pattern.java:1088)
>   at 
> org.apache.cassandra.stress.settings.OptionDistribution.get(OptionDistribution.java:67)
>   at 
> org.apache.cassandra.stress.StressProfile.init(StressProfile.java:151)
>   at 
> org.apache.cassandra.stress.StressProfile.load(StressProfile.java:482)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommandUser.(SettingsCommandUser.java:53)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommandUser.build(SettingsCommandUser.java:114)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommand.get(SettingsCommand.java:134)
>   at 
> org.apache.cassandra.stress.settings.StressSettings.get(StressSettings.java:218)
>   at 
> org.apache.cassandra.stress.settings.StressSettings.parse(StressSettings.java:206)
>   at org.apache.cassandra.stress.Stress.main(Stress.java:58)
> {noformat}
> When table-definition is wrong:
> {noformat}
> Exception in thread "main" java.lang.RuntimeException: 
> org.apache.cassandra.exceptions.SyntaxException: line 6:14 mismatched input 
> '(' expecting ')'
>   at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:550)
>   at 
> org.apache.cassandra.stress.StressProfile.init(StressProfile.java:134)
>   at 
> org.apache.cassandra.stress.StressProfile.load(StressProfile.java:482)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommandUser.(SettingsCommandUser.java:53)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommandUser.build(SettingsCommandUser.java:114)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommand.get(SettingsCommand.java:134)
>   at 
> org.apache.cassandra.stress.settings.StressSettings.get(StressSettings.java:218)
>   at 
> org.apache.cassandra.stress.settings.StressSettings.parse(StressSettings.java:206)
>   at org.apache.cassandra.stress.Stress.main(Stress.java:58)
> Caused by: org.apache.cassandra.exceptions.SyntaxException: line 6:14 
> mismatched input '(' expecting ')'
>   at 
> org.apache.cassandra.cql3.CqlParser.throwLastRecognitionError(CqlParser.java:273)
>   at 
> org.apache.cassandra.cql3.QueryProcessor.parseStatement(QueryProcessor.java:456)
>   at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:541)
>   ... 8 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7716) cassandra-stress: provide better error messages

2014-08-07 Thread T Jake Luciani (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

T Jake Luciani updated CASSANDRA-7716:
--

Fix Version/s: 2.1.0

> cassandra-stress: provide better error messages
> ---
>
> Key: CASSANDRA-7716
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7716
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Robert Stupp
>Assignee: T Jake Luciani
>Priority: Trivial
> Fix For: 2.1.0
>
>
> Just tried new stress tool.
> It would be great if the stress tool gives better error messages by telling 
> the user what option or config parameter/value caused an error.
> YAML parse errors are meaningful (gives code snippets etc).
> Examples are:
> {noformat}
> WARN  16:59:39 Setting caching options with deprecated syntax.
> Exception in thread "main" java.lang.NullPointerException
>   at java.util.regex.Matcher.getTextLength(Matcher.java:1234)
>   at java.util.regex.Matcher.reset(Matcher.java:308)
>   at java.util.regex.Matcher.(Matcher.java:228)
>   at java.util.regex.Pattern.matcher(Pattern.java:1088)
>   at 
> org.apache.cassandra.stress.settings.OptionDistribution.get(OptionDistribution.java:67)
>   at 
> org.apache.cassandra.stress.StressProfile.init(StressProfile.java:151)
>   at 
> org.apache.cassandra.stress.StressProfile.load(StressProfile.java:482)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommandUser.(SettingsCommandUser.java:53)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommandUser.build(SettingsCommandUser.java:114)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommand.get(SettingsCommand.java:134)
>   at 
> org.apache.cassandra.stress.settings.StressSettings.get(StressSettings.java:218)
>   at 
> org.apache.cassandra.stress.settings.StressSettings.parse(StressSettings.java:206)
>   at org.apache.cassandra.stress.Stress.main(Stress.java:58)
> {noformat}
> When table-definition is wrong:
> {noformat}
> Exception in thread "main" java.lang.RuntimeException: 
> org.apache.cassandra.exceptions.SyntaxException: line 6:14 mismatched input 
> '(' expecting ')'
>   at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:550)
>   at 
> org.apache.cassandra.stress.StressProfile.init(StressProfile.java:134)
>   at 
> org.apache.cassandra.stress.StressProfile.load(StressProfile.java:482)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommandUser.(SettingsCommandUser.java:53)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommandUser.build(SettingsCommandUser.java:114)
>   at 
> org.apache.cassandra.stress.settings.SettingsCommand.get(SettingsCommand.java:134)
>   at 
> org.apache.cassandra.stress.settings.StressSettings.get(StressSettings.java:218)
>   at 
> org.apache.cassandra.stress.settings.StressSettings.parse(StressSettings.java:206)
>   at org.apache.cassandra.stress.Stress.main(Stress.java:58)
> Caused by: org.apache.cassandra.exceptions.SyntaxException: line 6:14 
> mismatched input '(' expecting ')'
>   at 
> org.apache.cassandra.cql3.CqlParser.throwLastRecognitionError(CqlParser.java:273)
>   at 
> org.apache.cassandra.cql3.QueryProcessor.parseStatement(QueryProcessor.java:456)
>   at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:541)
>   ... 8 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7717) cassandra-stress: add sample yamls to distro

2014-08-07 Thread T Jake Luciani (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

T Jake Luciani updated CASSANDRA-7717:
--

Attachment: 7717.txt

> cassandra-stress: add sample yamls to distro
> 
>
> Key: CASSANDRA-7717
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7717
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Robert Stupp
>Assignee: T Jake Luciani
> Fix For: 2.1.0
>
> Attachments: 7717.txt
>
>
> C* stress is missing sample yaml files in distro. They are in git - but not 
> in the downloadable tgz .



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[Cassandra Wiki] Update of "RunningCassandraInIDEA" by RobertStupp

2014-08-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for 
change notification.

The "RunningCassandraInIDEA" page has been changed by RobertStupp:
https://wiki.apache.org/cassandra/RunningCassandraInIDEA?action=diff&rev1=26&rev2=27

Comment:
Note to link IDEA to .classpath

  
   {{attachment:2_Import as Eclipse project.png}}
   <><>
-  7. Select '''Next'''
+  7. Select '''Next''' - make sure that '''Link created IntelliJ IDEA modules 
to Eclipse project files''' is checked
  
-  {{attachment:3_Select Project Directory.png}}
+  {{attachment:3b-import-project.png}}
   <><>
   8. Select '''cassandra''' and click '''Finish'''. You now have a 
successfully imported Cassandra project.
  
@@ -76, +76 @@

  
   {{{
   Main class: org.apache.cassandra.service.CassandraDaemon
-  VM options: -Dcassandra-foreground=yes -Dcassandra.config=@@@ -ea -Xmx1G
- 
-  Note -Dcassandra.config you want to replace @@@ with the full path to your 
cassandra.yaml config file (located in /conf/cassandra.yaml)
-  eg: file:Users/user/workspace/cassandra/conf/cassandra.yaml
+  VM options:
+-Dcassandra-foreground=yes
+-Dcassandra.config=file://$PROJECT_DIR$/conf/cassandra.yaml
+-Dcassandra.storagedir=$PROJECT_DIR$/data
+-Dlogback.configurationFile=file://$PROJECT_DIR$/conf/logback.xml
+-Dcassandra.logdir=$PROJECT_DIR$/data/logs
+-ea
+-Xmx1G
   }}}
  
   3. Click '''OK'''.
@@ -106, +110 @@

  
  = Notes =
  
+ == Java 7 since Cassandra 2.0 ==
+ 
  Dont forget to update IntelliJ to use JDK7 or later for Cassandra versions 
greater than Cassandra 1.2
  
   {{attachment:7_JDK and Language Level Change.png}}
  
  {{https://c.statcounter.com/9397521/0/fe557aad/1/|stats}}
  
+ == Link IDEA to .classpath ==
+ 
+ If you did not check '''Link created IntelliJ IDEA modules to Eclipse project 
files''' in the project import dialog, you can change that later and IDEA will 
automatically use changes if .classpath file is regenerated using
+ {{{
+ ant generate-eclipse-files
+ }}}
+ 
+  {{attachment:3c-project-structure.png}}
+ 


[Cassandra Wiki] New attachment added to page RunningCassandraInIDEA

2014-08-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page "RunningCassandraInIDEA" for change 
notification. An attachment has been added to that page by RobertStupp. 
Following detailed information is available:

Attachment name: 3b-import-project.png
Attachment size: 95204
Attachment link: 
https://wiki.apache.org/cassandra/RunningCassandraInIDEA?action=AttachFile&do=get&target=3b-import-project.png
Page link: https://wiki.apache.org/cassandra/RunningCassandraInIDEA


[Cassandra Wiki] New attachment added to page RunningCassandraInIDEA

2014-08-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page "RunningCassandraInIDEA" for change 
notification. An attachment has been added to that page by RobertStupp. 
Following detailed information is available:

Attachment name: 3c-project-structure.png
Attachment size: 122922
Attachment link: 
https://wiki.apache.org/cassandra/RunningCassandraInIDEA?action=AttachFile&do=get&target=3c-project-structure.png
Page link: https://wiki.apache.org/cassandra/RunningCassandraInIDEA


[jira] [Commented] (CASSANDRA-7464) Retire/replace sstable2json and json2sstable

2014-08-07 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089634#comment-14089634
 ] 

Jonathan Ellis commented on CASSANDRA-7464:
---

thrift row key = cql partition key
static block refers to "static columns" here: 
http://www.datastax.com/dev/blog/cql-in-2-0-6

so basically, the goal is to give more semantic meaning to the "atoms" in the 
storage engine, by grouping them in categories like these.

> Retire/replace sstable2json and json2sstable
> 
>
> Key: CASSANDRA-7464
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7464
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Sylvain Lebresne
>Priority: Minor
>
> Both tools are pretty awful. They are primarily meant for debugging (there is 
> much more efficient and convenient ways to do import/export data), but their 
> output manage to be hard to handle both for humans and for tools (especially 
> as soon as you have modern stuff like composites).
> There is value to having tools to export sstable contents into a format that 
> is easy to manipulate by human and tools for debugging, small hacks and 
> general tinkering, but sstable2json and json2sstable are not that.  
> So I propose that we deprecate those tools and consider writing better 
> replacements. It shouldn't be too hard to come up with an output format that 
> is more aware of modern concepts like composites, UDTs, 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[Cassandra Wiki] New attachment added to page RunningCassandraInIDEA

2014-08-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page "RunningCassandraInIDEA" for change 
notification. An attachment has been added to that page by RobertStupp. 
Following detailed information is available:

Attachment name: 3b-import-project.png
Attachment size: 150190
Attachment link: 
https://wiki.apache.org/cassandra/RunningCassandraInIDEA?action=AttachFile&do=get&target=3b-import-project.png
Page link: https://wiki.apache.org/cassandra/RunningCassandraInIDEA


[jira] [Commented] (CASSANDRA-7546) AtomicSortedColumns.addAllWithSizeDelta has a spin loop that allocates memory

2014-08-07 Thread graham sanderson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089617#comment-14089617
 ] 

graham sanderson commented on CASSANDRA-7546:
-

doh - i should have asked about the double counting - didn't see it, now I do

> AtomicSortedColumns.addAllWithSizeDelta has a spin loop that allocates memory
> -
>
> Key: CASSANDRA-7546
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7546
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: graham sanderson
>Assignee: graham sanderson
> Attachments: 7546.20.txt, 7546.20_2.txt, 7546.20_3.txt, 
> 7546.20_4.txt, 7546.20_5.txt, 7546.20_6.txt, 7546.20_7.txt, 7546.20_alt.txt, 
> suggestion1.txt, suggestion1_21.txt
>
>
> In order to preserve atomicity, this code attempts to read, clone/update, 
> then CAS the state of the partition.
> Under heavy contention for updating a single partition this can cause some 
> fairly staggering memory growth (the more cores on your machine the worst it 
> gets).
> Whilst many usage patterns don't do highly concurrent updates to the same 
> partition, hinting today, does, and in this case wild (order(s) of magnitude 
> more than expected) memory allocation rates can be seen (especially when the 
> updates being hinted are small updates to different partitions which can 
> happen very fast on their own) - see CASSANDRA-7545
> It would be best to eliminate/reduce/limit the spinning memory allocation 
> whilst not slowing down the very common un-contended case.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7714) Add new CMS GC flags to Windows startup scripts for JVM later than 1.7.0_60

2014-08-07 Thread Joshua McKenzie (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joshua McKenzie updated CASSANDRA-7714:
---

Fix Version/s: (was: 2.0.10)

> Add new CMS GC flags to Windows startup scripts for JVM later than 1.7.0_60
> ---
>
> Key: CASSANDRA-7714
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7714
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Packaging
>Reporter: Joshua McKenzie
>Assignee: Joshua McKenzie
>  Labels: Windows
> Fix For: 2.1.1
>
>
> Replicate changes from CASSANDRA-7432.
> Relevant patch contents:
> {noformat}
>  # note: bash evals '1.7.x' as > '1.7' so this is really a >= 1.7 jvm check
> +if { [ "$JVM_VERSION" \> "1.7" ] && [ "$JVM_VERSION" \< "1.8.0" ] && [ 
> "$JVM_PATCH_VERSION" -ge "60" ]; } || [ "$JVM_VERSION" \> "1.8" ] ; then
> +JVM_OPTS="$JVM_OPTS -XX:+CMSParallelInitialMarkEnabled 
> -XX:+CMSEdenChunksRecordAlways"
> +fi
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7695) Inserting the same row in parallel causes bad data to be returned to the client

2014-08-07 Thread T Jake Luciani (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089607#comment-14089607
 ] 

T Jake Luciani commented on CASSANDRA-7695:
---

Committed with nits (forgot to change the test name).

I ran stress locally and noticed no difference in performance.

> Inserting the same row in parallel causes bad data to be returned to the 
> client
> ---
>
> Key: CASSANDRA-7695
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7695
> Project: Cassandra
>  Issue Type: Bug
> Environment: Linux 3.12.21, JVM 1.7u60
> Cassandra server 2.1.0 RC 5
> Cassandra datastax client version 2.1.0RC1
>Reporter: Johan Bjork
>Assignee: T Jake Luciani
>Priority: Blocker
> Fix For: 2.1.0
>
> Attachments: 7695-workaround.txt, PutFailureRepro.java, 
> bad-data-tid43-get, bad-data-tid43-put
>
>
> Running the attached test program against a cassandra 2.1 server results in 
> scrambled data returned by the SELECT statement. Running it against latest 
> stable works fine.
> Attached:
> * Program that reproduces the failure
> * Example output files from mentioned test-program with the scrambled output.
> Failure mode:
> The value returned by 'get' is scrambled, the size is correct but some bytes 
> have shifted locations in the returned buffer.
> Cluster info:
> For the test we set up a single cassandra node using the stock configuration 
> file.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[2/3] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1

2014-08-07 Thread jake
Merge branch 'cassandra-2.1.0' into cassandra-2.1


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2c701f8f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2c701f8f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2c701f8f

Branch: refs/heads/trunk
Commit: 2c701f8f9a87bd4388e917eab8910f7fa865b5bc
Parents: 756c85e b3ada2b
Author: Jake Luciani 
Authored: Thu Aug 7 14:52:56 2014 -0400
Committer: Jake Luciani 
Committed: Thu Aug 7 14:52:56 2014 -0400

--
 CHANGES.txt |   1 +
 .../cassandra/service/CassandraDaemon.java  |   9 +
 .../apache/cassandra/cql3/CorruptionTest.java   | 195 +++
 3 files changed, 205 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2c701f8f/CHANGES.txt
--
diff --cc CHANGES.txt
index c7f2510,aef0c40..2bd8667
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,25 -1,5 +1,26 @@@
 +2.1.1
 + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569)
 + * SSTableExport uses correct validator to create string representation of 
partition
 +   keys (CASSANDRA-7498)
 + * Avoid NPEs when receiving type changes for an unknown keyspace 
(CASSANDRA-7689)
 + * Add support for custom 2i validation (CASSANDRA-7575)
 + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Add listen_interface and rpc_interface options (CASSANDRA-7417)
 + * Improve schema merge performance (CASSANDRA-7444)
 + * Adjust MT depth based on # of partition validating (CASSANDRA-5263)
 + * Optimise NativeCell comparisons (CASSANDRA-6755)
 + * Configurable client timeout for cqlsh (CASSANDRA-7516)
 + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
 +Merged from 2.0:
 + * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229)
 + * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635)
 + * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS 
(CASSANDRA-7611)
 + * Catch errors when the JVM pulls the rug out from GCInspector 
(CASSANDRA-5345)
 + * cqlsh fails when version number parts are not int (CASSANDRA-7524)
 +
 +
  2.1.0-final
+  * workaround for netty issue causing corrupted data off the wire 
(CASSANDRA-7695)
   * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
   * Fix binding null values inside UDT (CASSANDRA-7685)
   * Fix UDT field selection with empty fields (CASSANDRA-7670)



[1/2] git commit: Workaround for netty issue causing corrupted data to come off the wire

2014-08-07 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 756c85e86 -> 2c701f8f9


Workaround for netty issue causing corrupted data to come off the wire

patch by tjake, test by Johan Bjork; reviewed by belliottsmith for 
(CASSANDRA-7695)


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b3ada2bc
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b3ada2bc
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b3ada2bc

Branch: refs/heads/cassandra-2.1
Commit: b3ada2bc453e84a470b070b56e35a13e0913662b
Parents: d8eff03
Author: Jake Luciani 
Authored: Thu Aug 7 14:35:28 2014 -0400
Committer: Jake Luciani 
Committed: Thu Aug 7 14:35:28 2014 -0400

--
 CHANGES.txt |   1 +
 .../cassandra/service/CassandraDaemon.java  |   9 +
 .../apache/cassandra/cql3/CorruptionTest.java   | 195 +++
 3 files changed, 205 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3ada2bc/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 26b39e0..aef0c40 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.0-final
+ * workaround for netty issue causing corrupted data off the wire 
(CASSANDRA-7695)
  * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
  * Fix binding null values inside UDT (CASSANDRA-7685)
  * Fix UDT field selection with empty fields (CASSANDRA-7670)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3ada2bc/src/java/org/apache/cassandra/service/CassandraDaemon.java
--
diff --git a/src/java/org/apache/cassandra/service/CassandraDaemon.java 
b/src/java/org/apache/cassandra/service/CassandraDaemon.java
index 7c85f81..5c88cb1 100644
--- a/src/java/org/apache/cassandra/service/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java
@@ -37,6 +37,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.addthis.metrics.reporter.config.ReporterConfig;
+import io.netty.util.internal.PlatformDependent;
 import org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor;
 import org.apache.cassandra.concurrent.Stage;
 import org.apache.cassandra.concurrent.StageManager;
@@ -69,6 +70,14 @@ import org.apache.cassandra.utils.Pair;
  */
 public class CassandraDaemon
 {
+
+//Workaround for netty issue
+static 
+{
+System.setProperty("io.netty.noUnsafe","true");
+assert !PlatformDependent.hasUnsafe();
+}
+
 public static final String MBEAN_NAME = 
"org.apache.cassandra.db:type=NativeAccess";
 
 // Have a dedicated thread to call exit to avoid deadlock in the case 
where the thread that wants to invoke exit

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3ada2bc/test/long/org/apache/cassandra/cql3/CorruptionTest.java
--
diff --git a/test/long/org/apache/cassandra/cql3/CorruptionTest.java 
b/test/long/org/apache/cassandra/cql3/CorruptionTest.java
new file mode 100644
index 000..1a42112
--- /dev/null
+++ b/test/long/org/apache/cassandra/cql3/CorruptionTest.java
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.cql3;
+
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.datastax.driver.core.*;
+import com.datastax.driver.core.policies.LoggingRetryPolicy;
+import com.datastax.driver.core.policies.Policies;
+import com.datastax.driver.core.utils.Bytes;
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.config.Database

[3/3] git commit: Merge branch 'cassandra-2.1' into trunk

2014-08-07 Thread jake
Merge branch 'cassandra-2.1' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4c3ba4f3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4c3ba4f3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4c3ba4f3

Branch: refs/heads/trunk
Commit: 4c3ba4f30acf65d769517009f8d263f6d87ede81
Parents: 32358d6 2c701f8
Author: Jake Luciani 
Authored: Thu Aug 7 14:53:30 2014 -0400
Committer: Jake Luciani 
Committed: Thu Aug 7 14:53:30 2014 -0400

--
 CHANGES.txt |   1 +
 .../cassandra/service/CassandraDaemon.java  |   9 +
 .../apache/cassandra/cql3/CorruptionTest.java   | 195 +++
 3 files changed, 205 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4c3ba4f3/CHANGES.txt
--



[1/3] git commit: Workaround for netty issue causing corrupted data to come off the wire

2014-08-07 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/trunk 32358d646 -> 4c3ba4f30


Workaround for netty issue causing corrupted data to come off the wire

patch by tjake, test by Johan Bjork; reviewed by belliottsmith for 
(CASSANDRA-7695)


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b3ada2bc
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b3ada2bc
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b3ada2bc

Branch: refs/heads/trunk
Commit: b3ada2bc453e84a470b070b56e35a13e0913662b
Parents: d8eff03
Author: Jake Luciani 
Authored: Thu Aug 7 14:35:28 2014 -0400
Committer: Jake Luciani 
Committed: Thu Aug 7 14:35:28 2014 -0400

--
 CHANGES.txt |   1 +
 .../cassandra/service/CassandraDaemon.java  |   9 +
 .../apache/cassandra/cql3/CorruptionTest.java   | 195 +++
 3 files changed, 205 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3ada2bc/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 26b39e0..aef0c40 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.0-final
+ * workaround for netty issue causing corrupted data off the wire 
(CASSANDRA-7695)
  * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
  * Fix binding null values inside UDT (CASSANDRA-7685)
  * Fix UDT field selection with empty fields (CASSANDRA-7670)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3ada2bc/src/java/org/apache/cassandra/service/CassandraDaemon.java
--
diff --git a/src/java/org/apache/cassandra/service/CassandraDaemon.java 
b/src/java/org/apache/cassandra/service/CassandraDaemon.java
index 7c85f81..5c88cb1 100644
--- a/src/java/org/apache/cassandra/service/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java
@@ -37,6 +37,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.addthis.metrics.reporter.config.ReporterConfig;
+import io.netty.util.internal.PlatformDependent;
 import org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor;
 import org.apache.cassandra.concurrent.Stage;
 import org.apache.cassandra.concurrent.StageManager;
@@ -69,6 +70,14 @@ import org.apache.cassandra.utils.Pair;
  */
 public class CassandraDaemon
 {
+
+//Workaround for netty issue
+static 
+{
+System.setProperty("io.netty.noUnsafe","true");
+assert !PlatformDependent.hasUnsafe();
+}
+
 public static final String MBEAN_NAME = 
"org.apache.cassandra.db:type=NativeAccess";
 
 // Have a dedicated thread to call exit to avoid deadlock in the case 
where the thread that wants to invoke exit

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3ada2bc/test/long/org/apache/cassandra/cql3/CorruptionTest.java
--
diff --git a/test/long/org/apache/cassandra/cql3/CorruptionTest.java 
b/test/long/org/apache/cassandra/cql3/CorruptionTest.java
new file mode 100644
index 000..1a42112
--- /dev/null
+++ b/test/long/org/apache/cassandra/cql3/CorruptionTest.java
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.cql3;
+
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.datastax.driver.core.*;
+import com.datastax.driver.core.policies.LoggingRetryPolicy;
+import com.datastax.driver.core.policies.Policies;
+import com.datastax.driver.core.utils.Bytes;
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.config.DatabaseDescriptor;
+imp

[2/2] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1

2014-08-07 Thread jake
Merge branch 'cassandra-2.1.0' into cassandra-2.1


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2c701f8f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2c701f8f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2c701f8f

Branch: refs/heads/cassandra-2.1
Commit: 2c701f8f9a87bd4388e917eab8910f7fa865b5bc
Parents: 756c85e b3ada2b
Author: Jake Luciani 
Authored: Thu Aug 7 14:52:56 2014 -0400
Committer: Jake Luciani 
Committed: Thu Aug 7 14:52:56 2014 -0400

--
 CHANGES.txt |   1 +
 .../cassandra/service/CassandraDaemon.java  |   9 +
 .../apache/cassandra/cql3/CorruptionTest.java   | 195 +++
 3 files changed, 205 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2c701f8f/CHANGES.txt
--
diff --cc CHANGES.txt
index c7f2510,aef0c40..2bd8667
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,25 -1,5 +1,26 @@@
 +2.1.1
 + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569)
 + * SSTableExport uses correct validator to create string representation of 
partition
 +   keys (CASSANDRA-7498)
 + * Avoid NPEs when receiving type changes for an unknown keyspace 
(CASSANDRA-7689)
 + * Add support for custom 2i validation (CASSANDRA-7575)
 + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Add listen_interface and rpc_interface options (CASSANDRA-7417)
 + * Improve schema merge performance (CASSANDRA-7444)
 + * Adjust MT depth based on # of partition validating (CASSANDRA-5263)
 + * Optimise NativeCell comparisons (CASSANDRA-6755)
 + * Configurable client timeout for cqlsh (CASSANDRA-7516)
 + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
 +Merged from 2.0:
 + * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229)
 + * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635)
 + * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS 
(CASSANDRA-7611)
 + * Catch errors when the JVM pulls the rug out from GCInspector 
(CASSANDRA-5345)
 + * cqlsh fails when version number parts are not int (CASSANDRA-7524)
 +
 +
  2.1.0-final
+  * workaround for netty issue causing corrupted data off the wire 
(CASSANDRA-7695)
   * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
   * Fix binding null values inside UDT (CASSANDRA-7685)
   * Fix UDT field selection with empty fields (CASSANDRA-7670)



git commit: Workaround for netty issue causing corrupted data to come off the wire

2014-08-07 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1.0 d8eff03df -> b3ada2bc4


Workaround for netty issue causing corrupted data to come off the wire

patch by tjake, test by Johan Bjork; reviewed by belliottsmith for 
(CASSANDRA-7695)


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b3ada2bc
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b3ada2bc
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b3ada2bc

Branch: refs/heads/cassandra-2.1.0
Commit: b3ada2bc453e84a470b070b56e35a13e0913662b
Parents: d8eff03
Author: Jake Luciani 
Authored: Thu Aug 7 14:35:28 2014 -0400
Committer: Jake Luciani 
Committed: Thu Aug 7 14:35:28 2014 -0400

--
 CHANGES.txt |   1 +
 .../cassandra/service/CassandraDaemon.java  |   9 +
 .../apache/cassandra/cql3/CorruptionTest.java   | 195 +++
 3 files changed, 205 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3ada2bc/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 26b39e0..aef0c40 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.0-final
+ * workaround for netty issue causing corrupted data off the wire 
(CASSANDRA-7695)
  * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
  * Fix binding null values inside UDT (CASSANDRA-7685)
  * Fix UDT field selection with empty fields (CASSANDRA-7670)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3ada2bc/src/java/org/apache/cassandra/service/CassandraDaemon.java
--
diff --git a/src/java/org/apache/cassandra/service/CassandraDaemon.java 
b/src/java/org/apache/cassandra/service/CassandraDaemon.java
index 7c85f81..5c88cb1 100644
--- a/src/java/org/apache/cassandra/service/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java
@@ -37,6 +37,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.addthis.metrics.reporter.config.ReporterConfig;
+import io.netty.util.internal.PlatformDependent;
 import org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor;
 import org.apache.cassandra.concurrent.Stage;
 import org.apache.cassandra.concurrent.StageManager;
@@ -69,6 +70,14 @@ import org.apache.cassandra.utils.Pair;
  */
 public class CassandraDaemon
 {
+
+//Workaround for netty issue
+static 
+{
+System.setProperty("io.netty.noUnsafe","true");
+assert !PlatformDependent.hasUnsafe();
+}
+
 public static final String MBEAN_NAME = 
"org.apache.cassandra.db:type=NativeAccess";
 
 // Have a dedicated thread to call exit to avoid deadlock in the case 
where the thread that wants to invoke exit

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3ada2bc/test/long/org/apache/cassandra/cql3/CorruptionTest.java
--
diff --git a/test/long/org/apache/cassandra/cql3/CorruptionTest.java 
b/test/long/org/apache/cassandra/cql3/CorruptionTest.java
new file mode 100644
index 000..1a42112
--- /dev/null
+++ b/test/long/org/apache/cassandra/cql3/CorruptionTest.java
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.cql3;
+
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.datastax.driver.core.*;
+import com.datastax.driver.core.policies.LoggingRetryPolicy;
+import com.datastax.driver.core.policies.Policies;
+import com.datastax.driver.core.utils.Bytes;
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.config.Data

[Cassandra Wiki] New attachment added to page RunningCassandraInIDEA

2014-08-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page "RunningCassandraInIDEA" for change 
notification. An attachment has been added to that page by RobertStupp. 
Following detailed information is available:

Attachment name: 3c-project-structure.png
Attachment size: 105315
Attachment link: 
https://wiki.apache.org/cassandra/RunningCassandraInIDEA?action=AttachFile&do=get&target=3c-project-structure.png
Page link: https://wiki.apache.org/cassandra/RunningCassandraInIDEA


[Cassandra Wiki] New attachment added to page RunningCassandraInIDEA

2014-08-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page "RunningCassandraInIDEA" for change 
notification. An attachment has been added to that page by RobertStupp. 
Following detailed information is available:

Attachment name: 3b-import-project.png
Attachment size: 66954
Attachment link: 
https://wiki.apache.org/cassandra/RunningCassandraInIDEA?action=AttachFile&do=get&target=3b-import-project.png
Page link: https://wiki.apache.org/cassandra/RunningCassandraInIDEA


[jira] [Assigned] (CASSANDRA-7316) Windows feature parity - lock JVM in memory to prevent swapping

2014-08-07 Thread Joshua McKenzie (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joshua McKenzie reassigned CASSANDRA-7316:
--

Assignee: Joshua McKenzie  (was: Ala' Alkhaldi)

> Windows feature parity - lock JVM in memory to prevent swapping
> ---
>
> Key: CASSANDRA-7316
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7316
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Joshua McKenzie
>Assignee: Joshua McKenzie
>Priority: Minor
>  Labels: Windows, perfomance
> Fix For: 3.0
>
>
> Similar to mlockall() in CLibrary.java for linux, it would be nice to lock 
> the virtual address space on Windows to prevent page faults.
> One option: Reference API:  
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa366895(v=vs.85).aspx



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7316) Windows feature parity - lock JVM in memory to prevent swapping

2014-08-07 Thread Joshua McKenzie (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joshua McKenzie updated CASSANDRA-7316:
---

Reviewer:   (was: Joshua McKenzie)

> Windows feature parity - lock JVM in memory to prevent swapping
> ---
>
> Key: CASSANDRA-7316
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7316
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Joshua McKenzie
>Assignee: Joshua McKenzie
>Priority: Minor
>  Labels: Windows, perfomance
> Fix For: 3.0
>
>
> Similar to mlockall() in CLibrary.java for linux, it would be nice to lock 
> the virtual address space on Windows to prevent page faults.
> One option: Reference API:  
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa366895(v=vs.85).aspx



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[Cassandra Wiki] Update of "ContributorsGroup" by BrandonWilliams

2014-08-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for 
change notification.

The "ContributorsGroup" page has been changed by BrandonWilliams:
https://wiki.apache.org/cassandra/ContributorsGroup?action=diff&rev1=35&rev2=36

   * MichaelShuler
   * BenedictElliottSmith
   * RobertStupp
+  * JoshuaMcKenzie
  


[jira] [Updated] (CASSANDRA-7695) Inserting the same row in parallel causes bad data to be returned to the client

2014-08-07 Thread Ryan McGuire (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan McGuire updated CASSANDRA-7695:


Tester: Ryan McGuire

> Inserting the same row in parallel causes bad data to be returned to the 
> client
> ---
>
> Key: CASSANDRA-7695
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7695
> Project: Cassandra
>  Issue Type: Bug
> Environment: Linux 3.12.21, JVM 1.7u60
> Cassandra server 2.1.0 RC 5
> Cassandra datastax client version 2.1.0RC1
>Reporter: Johan Bjork
>Assignee: T Jake Luciani
>Priority: Blocker
> Fix For: 2.1.0
>
> Attachments: 7695-workaround.txt, PutFailureRepro.java, 
> bad-data-tid43-get, bad-data-tid43-put
>
>
> Running the attached test program against a cassandra 2.1 server results in 
> scrambled data returned by the SELECT statement. Running it against latest 
> stable works fine.
> Attached:
> * Program that reproduces the failure
> * Example output files from mentioned test-program with the scrambled output.
> Failure mode:
> The value returned by 'get' is scrambled, the size is correct but some bytes 
> have shifted locations in the returned buffer.
> Cluster info:
> For the test we set up a single cassandra node using the stock configuration 
> file.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Assigned] (CASSANDRA-7717) cassandra-stress: add sample yamls to distro

2014-08-07 Thread Brandon Williams (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams reassigned CASSANDRA-7717:
---

Assignee: T Jake Luciani  (was: Michael Shuler)

> cassandra-stress: add sample yamls to distro
> 
>
> Key: CASSANDRA-7717
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7717
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Robert Stupp
>Assignee: T Jake Luciani
> Fix For: 2.1.0
>
>
> C* stress is missing sample yaml files in distro. They are in git - but not 
> in the downloadable tgz .



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Assigned] (CASSANDRA-7717) cassandra-stress: add sample yamls to distro

2014-08-07 Thread Brandon Williams (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams reassigned CASSANDRA-7717:
---

Assignee: Michael Shuler  (was: T Jake Luciani)

> cassandra-stress: add sample yamls to distro
> 
>
> Key: CASSANDRA-7717
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7717
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Robert Stupp
>Assignee: Michael Shuler
> Fix For: 2.1.0
>
>
> C* stress is missing sample yaml files in distro. They are in git - but not 
> in the downloadable tgz .



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-7717) cassandra-stress: add sample yamls to distro

2014-08-07 Thread Robert Stupp (JIRA)
Robert Stupp created CASSANDRA-7717:
---

 Summary: cassandra-stress: add sample yamls to distro
 Key: CASSANDRA-7717
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7717
 Project: Cassandra
  Issue Type: Improvement
Reporter: Robert Stupp
Assignee: T Jake Luciani
 Fix For: 2.1.0


C* stress is missing sample yaml files in distro. They are in git - but not in 
the downloadable tgz .



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-7716) cassandra-stress: provide better error messages

2014-08-07 Thread Robert Stupp (JIRA)
Robert Stupp created CASSANDRA-7716:
---

 Summary: cassandra-stress: provide better error messages
 Key: CASSANDRA-7716
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7716
 Project: Cassandra
  Issue Type: Improvement
Reporter: Robert Stupp
Assignee: T Jake Luciani


Just tried new stress tool.

It would be great if the stress tool gives better error messages by telling the 
user what option or config parameter/value caused an error.

YAML parse errors are meaningful (gives code snippets etc).

Examples are:

{noformat}
WARN  16:59:39 Setting caching options with deprecated syntax.
Exception in thread "main" java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1234)
at java.util.regex.Matcher.reset(Matcher.java:308)
at java.util.regex.Matcher.(Matcher.java:228)
at java.util.regex.Pattern.matcher(Pattern.java:1088)
at 
org.apache.cassandra.stress.settings.OptionDistribution.get(OptionDistribution.java:67)
at 
org.apache.cassandra.stress.StressProfile.init(StressProfile.java:151)
at 
org.apache.cassandra.stress.StressProfile.load(StressProfile.java:482)
at 
org.apache.cassandra.stress.settings.SettingsCommandUser.(SettingsCommandUser.java:53)
at 
org.apache.cassandra.stress.settings.SettingsCommandUser.build(SettingsCommandUser.java:114)
at 
org.apache.cassandra.stress.settings.SettingsCommand.get(SettingsCommand.java:134)
at 
org.apache.cassandra.stress.settings.StressSettings.get(StressSettings.java:218)
at 
org.apache.cassandra.stress.settings.StressSettings.parse(StressSettings.java:206)
at org.apache.cassandra.stress.Stress.main(Stress.java:58)
{noformat}

When table-definition is wrong:
{noformat}
Exception in thread "main" java.lang.RuntimeException: 
org.apache.cassandra.exceptions.SyntaxException: line 6:14 mismatched input '(' 
expecting ')'
at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:550)
at 
org.apache.cassandra.stress.StressProfile.init(StressProfile.java:134)
at 
org.apache.cassandra.stress.StressProfile.load(StressProfile.java:482)
at 
org.apache.cassandra.stress.settings.SettingsCommandUser.(SettingsCommandUser.java:53)
at 
org.apache.cassandra.stress.settings.SettingsCommandUser.build(SettingsCommandUser.java:114)
at 
org.apache.cassandra.stress.settings.SettingsCommand.get(SettingsCommand.java:134)
at 
org.apache.cassandra.stress.settings.StressSettings.get(StressSettings.java:218)
at 
org.apache.cassandra.stress.settings.StressSettings.parse(StressSettings.java:206)
at org.apache.cassandra.stress.Stress.main(Stress.java:58)
Caused by: org.apache.cassandra.exceptions.SyntaxException: line 6:14 
mismatched input '(' expecting ')'
at 
org.apache.cassandra.cql3.CqlParser.throwLastRecognitionError(CqlParser.java:273)
at 
org.apache.cassandra.cql3.QueryProcessor.parseStatement(QueryProcessor.java:456)
at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:541)
... 8 more
{noformat}




--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7398) Missing flexibility to have file:/// vs. file:/// when loading config file cassandra.yaml

2014-08-07 Thread Joshua McKenzie (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089470#comment-14089470
 ] 

Joshua McKenzie commented on CASSANDRA-7398:


committed v9.

> Missing flexibility to have file:/// vs. file:/// when loading 
> config file cassandra.yaml
> --
>
> Key: CASSANDRA-7398
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7398
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment:  Cassandra 2.1.0-rc1-SNAPSHOT, Win 7
>Reporter: Marco Tulio Avila Cerón
>Assignee: Marco Tulio Avila Cerón
>Priority: Minor
>  Labels: lhf, patch
> Fix For: 2.1.1
>
> Attachments: 7398_v9.txt, CASSANDRA-7398_prefix_v2.patch, 
> CASSANDRA-7398_prefix_v3.patch, CASSANDRA-7398_prefix_v4.patch, 
> trunk-7398_v5.txt, trunk-7398_v6.txt, trunk-7398_v7.txt, trunk-7398_v8.txt, 
> trunk-7398_v8_impl.txt, trunk-7398_v8_test.txt
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> The parameter in the VM options -Dcassandra.config= needs file:///
> Allow the user to have optional "file:///" when loading the config file from 
> the filesystem



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-7715) Add a credentials cache to the PasswordAuthenticator

2014-08-07 Thread Mike Adamson (JIRA)
Mike Adamson created CASSANDRA-7715:
---

 Summary: Add a credentials cache to the PasswordAuthenticator
 Key: CASSANDRA-7715
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7715
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Mike Adamson
Priority: Minor
 Fix For: 3.0


If the PasswordAuthenticator cached credentials for a short it would reduce the 
overhead of user journeys when they need to do multiple authentications in 
quick succession.

This cache should work in the same way as the cache in CassandraAuthorizer in 
that if it's TTL is set to 0 the cache will be disabled.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7707) blobAs() function results not validated

2014-08-07 Thread Sylvain Lebresne (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne updated CASSANDRA-7707:


Attachment: 7707.txt

> blobAs() function results not validated
> ---
>
> Key: CASSANDRA-7707
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7707
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Tyler Hobbs
>Assignee: Tyler Hobbs
>Priority: Critical
> Fix For: 2.0.10, 2.1.1
>
> Attachments: 7707.txt
>
>
> The results of the {{blobAs*()}} functions are not validated.
> Here are some examples:
> Non-type1 UUID inserted into timeuuid column:
> {noformat}
> create table foo (k int primary key, v timeuuid);
> insert into foo (0, blobAsTimeuuid(0x));
> {noformat}
> Blob with length > 4 inserted into an int column:
> {noformat}
> create table bar (k int primary key, v int);
> insert into bar (k, v) VALUES (0, blobAsInt(0x00));
> {noformat}
> Non-ascii characters inserted into an ascii column:
> {noformat}
> create table baz (k int primary key, v ascii);
> insert into baz (k, v) VALUES (0, blobAsAscii(0x));
> {noformat}
> Some of these (like the int column) could cause issues that look like 
> corruption.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


git commit: Better messaging on URI failure on cassandra.config Patch by Josh McKenzie; review by Lyuben Todorov for CASSANDRA-7398

2014-08-07 Thread jmckenzie
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 319eeabb4 -> 756c85e86


Better messaging on URI failure on cassandra.config
Patch by Josh McKenzie; review by Lyuben Todorov for CASSANDRA-7398


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/756c85e8
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/756c85e8
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/756c85e8

Branch: refs/heads/cassandra-2.1
Commit: 756c85e86fc9e2de492c23c3e6c10e4b4511293a
Parents: 319eeab
Author: Joshua McKenzie 
Authored: Thu Aug 7 12:05:40 2014 -0500
Committer: Joshua McKenzie 
Committed: Thu Aug 7 12:05:40 2014 -0500

--
 .../apache/cassandra/config/YamlConfigurationLoader.java| 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/756c85e8/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
--
diff --git a/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java 
b/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
index 4a1280c..78621f2 100644
--- a/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
+++ b/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
@@ -19,6 +19,7 @@ package org.apache.cassandra.config;
 
 import java.beans.IntrospectionException;
 import java.io.ByteArrayInputStream;
+import java.io.File;
 import java.io.InputStream;
 import java.io.IOException;
 import java.net.URL;
@@ -66,7 +67,13 @@ public class YamlConfigurationLoader implements 
ConfigurationLoader
 ClassLoader loader = DatabaseDescriptor.class.getClassLoader();
 url = loader.getResource(configUrl);
 if (url == null)
-throw new ConfigurationException("Cannot locate " + configUrl);
+{
+String required = "file:" + File.separator + File.separator;
+if (!configUrl.startsWith(required))
+throw new ConfigurationException("Expecting URI in 
variable: [cassandra.config].  Please prefix the file with " + required + 
File.separator +
+" for local files or " + required + "" + 
File.separator + " for remote files.  Aborting.");
+throw new ConfigurationException("Cannot locate " + configUrl 
+ ".  If this is a local file, please confirm you've provided " + required + 
File.separator + " as a URI prefix.");
+}
 }
 
 return url;



[2/2] git commit: Merge branch 'cassandra-2.1' into trunk

2014-08-07 Thread jmckenzie
Merge branch 'cassandra-2.1' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/32358d64
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/32358d64
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/32358d64

Branch: refs/heads/trunk
Commit: 32358d646d7fc214a1bc16d58ca5e5d5b025bda6
Parents: f92ae20 756c85e
Author: Joshua McKenzie 
Authored: Thu Aug 7 12:06:52 2014 -0500
Committer: Joshua McKenzie 
Committed: Thu Aug 7 12:06:52 2014 -0500

--
 .../apache/cassandra/config/YamlConfigurationLoader.java| 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/32358d64/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
--



[1/2] git commit: Better messaging on URI failure on cassandra.config Patch by Josh McKenzie; review by Lyuben Todorov for CASSANDRA-7398

2014-08-07 Thread jmckenzie
Repository: cassandra
Updated Branches:
  refs/heads/trunk f92ae20a8 -> 32358d646


Better messaging on URI failure on cassandra.config
Patch by Josh McKenzie; review by Lyuben Todorov for CASSANDRA-7398


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/756c85e8
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/756c85e8
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/756c85e8

Branch: refs/heads/trunk
Commit: 756c85e86fc9e2de492c23c3e6c10e4b4511293a
Parents: 319eeab
Author: Joshua McKenzie 
Authored: Thu Aug 7 12:05:40 2014 -0500
Committer: Joshua McKenzie 
Committed: Thu Aug 7 12:05:40 2014 -0500

--
 .../apache/cassandra/config/YamlConfigurationLoader.java| 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/756c85e8/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
--
diff --git a/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java 
b/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
index 4a1280c..78621f2 100644
--- a/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
+++ b/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
@@ -19,6 +19,7 @@ package org.apache.cassandra.config;
 
 import java.beans.IntrospectionException;
 import java.io.ByteArrayInputStream;
+import java.io.File;
 import java.io.InputStream;
 import java.io.IOException;
 import java.net.URL;
@@ -66,7 +67,13 @@ public class YamlConfigurationLoader implements 
ConfigurationLoader
 ClassLoader loader = DatabaseDescriptor.class.getClassLoader();
 url = loader.getResource(configUrl);
 if (url == null)
-throw new ConfigurationException("Cannot locate " + configUrl);
+{
+String required = "file:" + File.separator + File.separator;
+if (!configUrl.startsWith(required))
+throw new ConfigurationException("Expecting URI in 
variable: [cassandra.config].  Please prefix the file with " + required + 
File.separator +
+" for local files or " + required + "" + 
File.separator + " for remote files.  Aborting.");
+throw new ConfigurationException("Cannot locate " + configUrl 
+ ".  If this is a local file, please confirm you've provided " + required + 
File.separator + " as a URI prefix.");
+}
 }
 
 return url;



[jira] [Resolved] (CASSANDRA-7570) CqlPagingRecordReader is broken

2014-08-07 Thread Brandon Williams (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams resolved CASSANDRA-7570.
-

Resolution: Fixed

Committed.

> CqlPagingRecordReader is broken
> ---
>
> Key: CASSANDRA-7570
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7570
> Project: Cassandra
>  Issue Type: Bug
>  Components: Hadoop
>Reporter: Brandon Williams
>Assignee: Alex Liu
> Fix For: 2.0.10, 2.1.1
>
> Attachments: 7570-2.0-branch.txt
>
>
> As mentioned on CASSANDRA-7059, it broke CPRR.  It's not quite as simple as 
> changing the greater than to a greater than equal, either, since that makes 
> the task run forever.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[2/6] git commit: Fix pig tests.

2014-08-07 Thread brandonwilliams
Fix pig tests.

Patch by Alex Liu, reviewed by brandonwilliams for CASSANDRA-7570


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6fdcd3b6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6fdcd3b6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6fdcd3b6

Branch: refs/heads/cassandra-2.1
Commit: 6fdcd3b616b262c0a5c266e765046a57602be1b8
Parents: 3970c65
Author: Brandon Williams 
Authored: Thu Aug 7 11:54:34 2014 -0500
Committer: Brandon Williams 
Committed: Thu Aug 7 11:54:34 2014 -0500

--
 .../cassandra/pig/CqlTableDataTypeTest.java | 39 ++---
 .../org/apache/cassandra/pig/CqlTableTest.java  | 61 
 .../cassandra/pig/ThriftColumnFamilyTest.java   | 14 -
 3 files changed, 28 insertions(+), 86 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fdcd3b6/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
--
diff --git a/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java 
b/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
index 1819c61..bbd5a87 100644
--- a/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
+++ b/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
@@ -217,22 +217,14 @@ public class CqlTableDataTypeTest extends PigTestBase
 }
 
 @Test
-public void testCqlStorageRegularType()
-throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
-{
-cqlTableTest("rows = LOAD 'cql://cql3ks/cqltable?" + defaultParameters 
+ "' USING CqlStorage();");
-counterTableTest("cc_rows = LOAD 'cql://cql3ks/countertable?" + 
defaultParameters + "' USING CqlStorage();");
-}
-
-@Test
 public void testCqlNativeStorageRegularType()
 throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
 {
 //input_cql=select * from cqltable where token(key) > ? and token(key) 
<= ?
-cqlTableTest("rows = LOAD 'cql://cql3ks/cqltable?" + defaultParameters 
+ nativeParameters + 
"&input_cql=select%20*%20from%20cqltable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage();");
+cqlTableTest("rows = LOAD 'cql://cql3ks/cqltable?" + defaultParameters 
+ nativeParameters + 
"&input_cql=select%20*%20from%20cqltable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
 
 //input_cql=select * from countertable where token(key) > ? and 
token(key) <= ?
-counterTableTest("cc_rows = LOAD 'cql://cql3ks/countertable?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20countertable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage();");
+counterTableTest("cc_rows = LOAD 'cql://cql3ks/countertable?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20countertable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
 }
 
 private void cqlTableTest(String initialQuery) throws IOException
@@ -296,18 +288,11 @@ public class CqlTableDataTypeTest extends PigTestBase
 }
 
 @Test
-public void testCqlStorageSetType()
-throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
-{
-settableTest("set_rows = LOAD 'cql://cql3ks/settable?" + 
defaultParameters + "' USING CqlStorage();");
-}
-
-@Test
 public void testCqlNativeStorageSetType()
 throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
 {
 //input_cql=select * from settable where token(key) > ? and token(key) 
<= ?
-settableTest("set_rows = LOAD 'cql://cql3ks/settable?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20settable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage();");
+settableTest("set_rows = LOAD 'cql://cql3ks/settable?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20settable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
 }
 
 private void settableTest(String initialQuery) throws IOException
@@ -370,18 +355,11 @@ publi

[6/6] git commit: Merge branch 'cassandra-2.1' into trunk

2014-08-07 Thread brandonwilliams
Merge branch 'cassandra-2.1' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f92ae20a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f92ae20a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f92ae20a

Branch: refs/heads/trunk
Commit: f92ae20a84cc22d303234a9c8847ba1e8fa0b6d7
Parents: d1e41c0 319eeab
Author: Brandon Williams 
Authored: Thu Aug 7 11:57:22 2014 -0500
Committer: Brandon Williams 
Committed: Thu Aug 7 11:57:22 2014 -0500

--
 .../cassandra/pig/CqlTableDataTypeTest.java | 39 ++---
 .../org/apache/cassandra/pig/CqlTableTest.java  | 61 
 .../cassandra/pig/ThriftColumnFamilyTest.java   | 14 -
 3 files changed, 28 insertions(+), 86 deletions(-)
--




[1/6] git commit: Fix pig tests.

2014-08-07 Thread brandonwilliams
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 3970c650d -> 6fdcd3b61
  refs/heads/cassandra-2.1 0c2bbefae -> 319eeabb4
  refs/heads/trunk d1e41c01e -> f92ae20a8


Fix pig tests.

Patch by Alex Liu, reviewed by brandonwilliams for CASSANDRA-7570


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6fdcd3b6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6fdcd3b6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6fdcd3b6

Branch: refs/heads/cassandra-2.0
Commit: 6fdcd3b616b262c0a5c266e765046a57602be1b8
Parents: 3970c65
Author: Brandon Williams 
Authored: Thu Aug 7 11:54:34 2014 -0500
Committer: Brandon Williams 
Committed: Thu Aug 7 11:54:34 2014 -0500

--
 .../cassandra/pig/CqlTableDataTypeTest.java | 39 ++---
 .../org/apache/cassandra/pig/CqlTableTest.java  | 61 
 .../cassandra/pig/ThriftColumnFamilyTest.java   | 14 -
 3 files changed, 28 insertions(+), 86 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fdcd3b6/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
--
diff --git a/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java 
b/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
index 1819c61..bbd5a87 100644
--- a/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
+++ b/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
@@ -217,22 +217,14 @@ public class CqlTableDataTypeTest extends PigTestBase
 }
 
 @Test
-public void testCqlStorageRegularType()
-throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
-{
-cqlTableTest("rows = LOAD 'cql://cql3ks/cqltable?" + defaultParameters 
+ "' USING CqlStorage();");
-counterTableTest("cc_rows = LOAD 'cql://cql3ks/countertable?" + 
defaultParameters + "' USING CqlStorage();");
-}
-
-@Test
 public void testCqlNativeStorageRegularType()
 throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
 {
 //input_cql=select * from cqltable where token(key) > ? and token(key) 
<= ?
-cqlTableTest("rows = LOAD 'cql://cql3ks/cqltable?" + defaultParameters 
+ nativeParameters + 
"&input_cql=select%20*%20from%20cqltable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage();");
+cqlTableTest("rows = LOAD 'cql://cql3ks/cqltable?" + defaultParameters 
+ nativeParameters + 
"&input_cql=select%20*%20from%20cqltable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
 
 //input_cql=select * from countertable where token(key) > ? and 
token(key) <= ?
-counterTableTest("cc_rows = LOAD 'cql://cql3ks/countertable?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20countertable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage();");
+counterTableTest("cc_rows = LOAD 'cql://cql3ks/countertable?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20countertable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
 }
 
 private void cqlTableTest(String initialQuery) throws IOException
@@ -296,18 +288,11 @@ public class CqlTableDataTypeTest extends PigTestBase
 }
 
 @Test
-public void testCqlStorageSetType()
-throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
-{
-settableTest("set_rows = LOAD 'cql://cql3ks/settable?" + 
defaultParameters + "' USING CqlStorage();");
-}
-
-@Test
 public void testCqlNativeStorageSetType()
 throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
 {
 //input_cql=select * from settable where token(key) > ? and token(key) 
<= ?
-settableTest("set_rows = LOAD 'cql://cql3ks/settable?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20settable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage();");
+settableTest("set_rows = LOAD 'cql://cql3ks/settable?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20settable%20where%20token(key)%

[4/6] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2014-08-07 Thread brandonwilliams
Merge branch 'cassandra-2.0' into cassandra-2.1


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/319eeabb
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/319eeabb
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/319eeabb

Branch: refs/heads/trunk
Commit: 319eeabb4c69dff22df9280a78e49e526a540d39
Parents: 0c2bbef 6fdcd3b
Author: Brandon Williams 
Authored: Thu Aug 7 11:56:57 2014 -0500
Committer: Brandon Williams 
Committed: Thu Aug 7 11:56:57 2014 -0500

--
 .../cassandra/pig/CqlTableDataTypeTest.java | 39 ++---
 .../org/apache/cassandra/pig/CqlTableTest.java  | 61 
 .../cassandra/pig/ThriftColumnFamilyTest.java   | 14 -
 3 files changed, 28 insertions(+), 86 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/319eeabb/test/pig/org/apache/cassandra/pig/ThriftColumnFamilyTest.java
--



[3/6] git commit: Fix pig tests.

2014-08-07 Thread brandonwilliams
Fix pig tests.

Patch by Alex Liu, reviewed by brandonwilliams for CASSANDRA-7570


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6fdcd3b6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6fdcd3b6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6fdcd3b6

Branch: refs/heads/trunk
Commit: 6fdcd3b616b262c0a5c266e765046a57602be1b8
Parents: 3970c65
Author: Brandon Williams 
Authored: Thu Aug 7 11:54:34 2014 -0500
Committer: Brandon Williams 
Committed: Thu Aug 7 11:54:34 2014 -0500

--
 .../cassandra/pig/CqlTableDataTypeTest.java | 39 ++---
 .../org/apache/cassandra/pig/CqlTableTest.java  | 61 
 .../cassandra/pig/ThriftColumnFamilyTest.java   | 14 -
 3 files changed, 28 insertions(+), 86 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fdcd3b6/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
--
diff --git a/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java 
b/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
index 1819c61..bbd5a87 100644
--- a/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
+++ b/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
@@ -217,22 +217,14 @@ public class CqlTableDataTypeTest extends PigTestBase
 }
 
 @Test
-public void testCqlStorageRegularType()
-throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
-{
-cqlTableTest("rows = LOAD 'cql://cql3ks/cqltable?" + defaultParameters 
+ "' USING CqlStorage();");
-counterTableTest("cc_rows = LOAD 'cql://cql3ks/countertable?" + 
defaultParameters + "' USING CqlStorage();");
-}
-
-@Test
 public void testCqlNativeStorageRegularType()
 throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
 {
 //input_cql=select * from cqltable where token(key) > ? and token(key) 
<= ?
-cqlTableTest("rows = LOAD 'cql://cql3ks/cqltable?" + defaultParameters 
+ nativeParameters + 
"&input_cql=select%20*%20from%20cqltable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage();");
+cqlTableTest("rows = LOAD 'cql://cql3ks/cqltable?" + defaultParameters 
+ nativeParameters + 
"&input_cql=select%20*%20from%20cqltable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
 
 //input_cql=select * from countertable where token(key) > ? and 
token(key) <= ?
-counterTableTest("cc_rows = LOAD 'cql://cql3ks/countertable?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20countertable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage();");
+counterTableTest("cc_rows = LOAD 'cql://cql3ks/countertable?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20countertable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
 }
 
 private void cqlTableTest(String initialQuery) throws IOException
@@ -296,18 +288,11 @@ public class CqlTableDataTypeTest extends PigTestBase
 }
 
 @Test
-public void testCqlStorageSetType()
-throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
-{
-settableTest("set_rows = LOAD 'cql://cql3ks/settable?" + 
defaultParameters + "' USING CqlStorage();");
-}
-
-@Test
 public void testCqlNativeStorageSetType()
 throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
 {
 //input_cql=select * from settable where token(key) > ? and token(key) 
<= ?
-settableTest("set_rows = LOAD 'cql://cql3ks/settable?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20settable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage();");
+settableTest("set_rows = LOAD 'cql://cql3ks/settable?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20settable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
 }
 
 private void settableTest(String initialQuery) throws IOException
@@ -370,18 +355,11 @@ public class 

[5/6] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2014-08-07 Thread brandonwilliams
Merge branch 'cassandra-2.0' into cassandra-2.1


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/319eeabb
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/319eeabb
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/319eeabb

Branch: refs/heads/cassandra-2.1
Commit: 319eeabb4c69dff22df9280a78e49e526a540d39
Parents: 0c2bbef 6fdcd3b
Author: Brandon Williams 
Authored: Thu Aug 7 11:56:57 2014 -0500
Committer: Brandon Williams 
Committed: Thu Aug 7 11:56:57 2014 -0500

--
 .../cassandra/pig/CqlTableDataTypeTest.java | 39 ++---
 .../org/apache/cassandra/pig/CqlTableTest.java  | 61 
 .../cassandra/pig/ThriftColumnFamilyTest.java   | 14 -
 3 files changed, 28 insertions(+), 86 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/319eeabb/test/pig/org/apache/cassandra/pig/ThriftColumnFamilyTest.java
--



[1/5] git commit: merge

2014-08-07 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/trunk 56141aee8 -> d1e41c01e


merge


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e682ffc4
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e682ffc4
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e682ffc4

Branch: refs/heads/trunk
Commit: e682ffc4700ddd57a1a961c8d7fbbb3a87d89ff9
Parents: 24d8571 ddda541
Author: Jonathan Ellis 
Authored: Thu Aug 7 09:27:14 2014 -0500
Committer: Jonathan Ellis 
Committed: Thu Aug 7 09:27:14 2014 -0500

--

--




[3/5] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.0' into cassandra-2.1.0

Conflicts:
CHANGES.txt

src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d8eff03d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d8eff03d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d8eff03d

Branch: refs/heads/trunk
Commit: d8eff03df0bbfa9066855bc49e18d76f609508a0
Parents: 33de6dc 3970c65
Author: Sylvain Lebresne 
Authored: Thu Aug 7 18:32:36 2014 +0200
Committer: Sylvain Lebresne 
Committed: Thu Aug 7 18:32:36 2014 +0200

--
 CHANGES.txt   |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java   |  6 ++
 .../org/apache/cassandra/db/index/SecondaryIndex.java | 10 ++
 .../apache/cassandra/db/index/SecondaryIndexManager.java  |  4 ++--
 4 files changed, 19 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/CHANGES.txt
--
diff --cc CHANGES.txt
index dfeca21,df40933..26b39e0
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,9 -1,5 +1,10 @@@
 -2.0.10
 +2.1.0-final
 + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
 + * Fix binding null values inside UDT (CASSANDRA-7685)
 + * Fix UDT field selection with empty fields (CASSANDRA-7670)
 + * Bogus deserialization of static cells from sstable (CASSANDRA-7684)
 +Merged from 2.0:
+  * Fix potential AssertionError with 2ndary indexes (CASSANDRA-6612)
   * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
   * Minor leak in sstable2jon (CASSANDRA-7709)
   * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
--
diff --cc 
src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
index a2011b6,87e87cb..d8c03fb
--- 
a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
+++ 
b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
@@@ -60,20 -55,15 +60,26 @@@ public abstract class AbstractSimplePer
   
indexedCfMetadata);
  }
  
 +protected AbstractType getIndexKeyComparator()
 +{
 +return columnDef.type;
 +}
 +
 +@Override
 +public DecoratedKey getIndexKeyFor(ByteBuffer value)
 +{
 +return new BufferDecoratedKey(new LocalToken(getIndexKeyComparator(), 
value), value);
 +}
 +
+ @Override
+ String indexTypeForGrouping()
+ {
+ return "_internal_";
+ }
+ 
 -protected abstract ByteBuffer makeIndexColumnName(ByteBuffer rowKey, 
Column column);
 +protected abstract CellName makeIndexColumnName(ByteBuffer rowKey, Cell 
cell);
  
 -protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Column 
column);
 +protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Cell 
cell);
  
  protected abstract AbstractType getExpressionComparator();
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--
diff --cc src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index edb9126,a15464a..339af8f
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@@ -547,10 -518,10 +547,10 @@@ public class SecondaryIndexManage
  if (columns == null)
  {
  columns = new HashSet<>();
- groupByIndexType.put(index.getClass().getCanonicalName(), 
columns);
+ groupByIndexType.put(index.indexTypeForGrouping(), columns);
  }
  
 -columns.add(ix.column_name);
 +columns.add(ix.column);
  }
  
  List indexSearchers = new 
ArrayList<>(groupByIndexType.size());



[5/5] git commit: Merge branch 'cassandra-2.1' into trunk

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.1' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d1e41c01
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d1e41c01
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d1e41c01

Branch: refs/heads/trunk
Commit: d1e41c01eeebe9c8cf034e42d41e94dcc2265d49
Parents: 56141ae 0c2bbef
Author: Sylvain Lebresne 
Authored: Thu Aug 7 18:36:33 2014 +0200
Committer: Sylvain Lebresne 
Committed: Thu Aug 7 18:36:33 2014 +0200

--
 CHANGES.txt   |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java   |  6 ++
 .../org/apache/cassandra/db/index/SecondaryIndex.java | 10 ++
 .../apache/cassandra/db/index/SecondaryIndexManager.java  |  4 ++--
 4 files changed, 19 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d1e41c01/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d1e41c01/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
--



[1/3] git commit: Fix potential AssertionError with 2ndary indexes

2014-08-07 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 e682ffc47 -> 0c2bbefae


Fix potential AssertionError with 2ndary indexes

patch by slebresne; reviewed by beobal for CASSANDRA-6612


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3970c650
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3970c650
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3970c650

Branch: refs/heads/cassandra-2.1
Commit: 3970c650d43f8b8bb9aa1c153055fd838a9b4bb6
Parents: 6e6a6c3
Author: Sylvain Lebresne 
Authored: Thu Aug 7 18:09:57 2014 +0200
Committer: Sylvain Lebresne 
Committed: Thu Aug 7 18:23:52 2014 +0200

--
 CHANGES.txt |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java |  6 ++
 .../org/apache/cassandra/db/index/SecondaryIndex.java   | 10 ++
 .../cassandra/db/index/SecondaryIndexManager.java   | 12 +---
 4 files changed, 22 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 915aeea..df40933 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Fix potential AssertionError with 2ndary indexes (CASSANDRA-6612)
  * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
  * Minor leak in sstable2jon (CASSANDRA-7709)
  * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
--
diff --git 
a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
 
b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
index 8b12575..87e87cb 100644
--- 
a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
+++ 
b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
@@ -55,6 +55,12 @@ public abstract class AbstractSimplePerColumnSecondaryIndex 
extends PerColumnSec
  
indexedCfMetadata);
 }
 
+@Override
+String indexTypeForGrouping()
+{
+return "_internal_";
+}
+
 protected abstract ByteBuffer makeIndexColumnName(ByteBuffer rowKey, 
Column column);
 
 protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Column 
column);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
--
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndex.java 
b/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
index fda28f0..64266c4 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
@@ -94,6 +94,16 @@ public abstract class SecondaryIndex
  */
 abstract public String getIndexName();
 
+/**
+ * All internal 2ndary indexes will return "_internal_" for this. Custom
+ * 2ndary indexes will return their class name. This only matter for
+ * SecondaryIndexManager.groupByIndexType.
+ */
+String indexTypeForGrouping()
+{
+// Our internal indexes overwrite this
+return getClass().getCanonicalName();
+}
 
 /**
  * Return the unique name for this index and column

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java 
b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index 2c0d611..a15464a 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -198,17 +198,15 @@ public class SecondaryIndexManager
 if (clause == null || clause.isEmpty())
 return false;
 
-// It doesn't seem a clause can have multiple searchers, but since
-// getIndexSearchersForQuery returns a list ...
 List searchers = 
getIndexSearchersForQuery(clause);
 if (searchers.isEmpty())
 return false;
 
 for (SecondaryIndexSearcher searcher : searchers)
-if (!searcher.isIndexing(clause))
-return false;
+if (searcher.isIndexing(clause))
+return true;
 
-return true;
+return false;
 

[2/5] git commit: Fix potential AssertionError with 2ndary indexes

2014-08-07 Thread slebresne
Fix potential AssertionError with 2ndary indexes

patch by slebresne; reviewed by beobal for CASSANDRA-6612


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3970c650
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3970c650
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3970c650

Branch: refs/heads/trunk
Commit: 3970c650d43f8b8bb9aa1c153055fd838a9b4bb6
Parents: 6e6a6c3
Author: Sylvain Lebresne 
Authored: Thu Aug 7 18:09:57 2014 +0200
Committer: Sylvain Lebresne 
Committed: Thu Aug 7 18:23:52 2014 +0200

--
 CHANGES.txt |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java |  6 ++
 .../org/apache/cassandra/db/index/SecondaryIndex.java   | 10 ++
 .../cassandra/db/index/SecondaryIndexManager.java   | 12 +---
 4 files changed, 22 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 915aeea..df40933 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Fix potential AssertionError with 2ndary indexes (CASSANDRA-6612)
  * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
  * Minor leak in sstable2jon (CASSANDRA-7709)
  * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
--
diff --git 
a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
 
b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
index 8b12575..87e87cb 100644
--- 
a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
+++ 
b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
@@ -55,6 +55,12 @@ public abstract class AbstractSimplePerColumnSecondaryIndex 
extends PerColumnSec
  
indexedCfMetadata);
 }
 
+@Override
+String indexTypeForGrouping()
+{
+return "_internal_";
+}
+
 protected abstract ByteBuffer makeIndexColumnName(ByteBuffer rowKey, 
Column column);
 
 protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Column 
column);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
--
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndex.java 
b/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
index fda28f0..64266c4 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
@@ -94,6 +94,16 @@ public abstract class SecondaryIndex
  */
 abstract public String getIndexName();
 
+/**
+ * All internal 2ndary indexes will return "_internal_" for this. Custom
+ * 2ndary indexes will return their class name. This only matter for
+ * SecondaryIndexManager.groupByIndexType.
+ */
+String indexTypeForGrouping()
+{
+// Our internal indexes overwrite this
+return getClass().getCanonicalName();
+}
 
 /**
  * Return the unique name for this index and column

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java 
b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index 2c0d611..a15464a 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -198,17 +198,15 @@ public class SecondaryIndexManager
 if (clause == null || clause.isEmpty())
 return false;
 
-// It doesn't seem a clause can have multiple searchers, but since
-// getIndexSearchersForQuery returns a list ...
 List searchers = 
getIndexSearchersForQuery(clause);
 if (searchers.isEmpty())
 return false;
 
 for (SecondaryIndexSearcher searcher : searchers)
-if (!searcher.isIndexing(clause))
-return false;
+if (searcher.isIndexing(clause))
+return true;
 
-return true;
+return false;
 }
 
 /**
@@ -515,12 +513,12 @@ public class SecondaryIndexManager
 if (index == null

[4/5] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.1.0' into cassandra-2.1


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0c2bbefa
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0c2bbefa
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0c2bbefa

Branch: refs/heads/trunk
Commit: 0c2bbefae3186f600cef49e1859c9e56751f3ab5
Parents: e682ffc d8eff03
Author: Sylvain Lebresne 
Authored: Thu Aug 7 18:36:13 2014 +0200
Committer: Sylvain Lebresne 
Committed: Thu Aug 7 18:36:13 2014 +0200

--
 CHANGES.txt   |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java   |  6 ++
 .../org/apache/cassandra/db/index/SecondaryIndex.java | 10 ++
 .../apache/cassandra/db/index/SecondaryIndexManager.java  |  4 ++--
 4 files changed, 19 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0c2bbefa/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0c2bbefa/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--



[3/3] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.1.0' into cassandra-2.1


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0c2bbefa
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0c2bbefa
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0c2bbefa

Branch: refs/heads/cassandra-2.1
Commit: 0c2bbefae3186f600cef49e1859c9e56751f3ab5
Parents: e682ffc d8eff03
Author: Sylvain Lebresne 
Authored: Thu Aug 7 18:36:13 2014 +0200
Committer: Sylvain Lebresne 
Committed: Thu Aug 7 18:36:13 2014 +0200

--
 CHANGES.txt   |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java   |  6 ++
 .../org/apache/cassandra/db/index/SecondaryIndex.java | 10 ++
 .../apache/cassandra/db/index/SecondaryIndexManager.java  |  4 ++--
 4 files changed, 19 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0c2bbefa/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0c2bbefa/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--



[jira] [Updated] (CASSANDRA-7570) CqlPagingRecordReader is broken

2014-08-07 Thread Alex Liu (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alex Liu updated CASSANDRA-7570:


Attachment: (was: 7570_2.0_branch.txt)

> CqlPagingRecordReader is broken
> ---
>
> Key: CASSANDRA-7570
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7570
> Project: Cassandra
>  Issue Type: Bug
>  Components: Hadoop
>Reporter: Brandon Williams
>Assignee: Alex Liu
> Fix For: 2.0.10, 2.1.1
>
> Attachments: 7570-2.0-branch.txt
>
>
> As mentioned on CASSANDRA-7059, it broke CPRR.  It's not quite as simple as 
> changing the greater than to a greater than equal, either, since that makes 
> the task run forever.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


  1   2   >