[jira] [Updated] (CASSANDRA-8650) Creation and maintenance of roles should not require superuser status

2015-01-28 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe updated CASSANDRA-8650:
---
Attachment: 8650-v2.txt

V2 with a new IResource implementation representing database roles.

 Creation and maintenance of roles should not require superuser status
 -

 Key: CASSANDRA-8650
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8650
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core
Reporter: Sam Tunnicliffe
Assignee: Sam Tunnicliffe
  Labels: cql, security
 Fix For: 3.0

 Attachments: 8650-v2.txt, 8650.txt


 Currently, only roles with superuser status are permitted to 
 create/drop/grant/revoke roles, which violates the principal of least 
 privilege. In addition, in order to run {{ALTER ROLE}} statements a user must 
 log in directly as that role or else be a superuser. This requirement 
 increases the (ab)use of superuser privileges, especially where roles are 
 created without {{LOGIN}} privileges to model groups of permissions granted 
 to individual db users. In this scenario, a superuser is always required if 
 such roles are to be granted and modified.
 We should add more granular permissions to allow administration of roles 
 without requiring superuser status.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8695) thrift column definition list sometimes immutable

2015-01-28 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295148#comment-14295148
 ] 

Aleksey Yeschenko commented on CASSANDRA-8695:
--

Doesn't really matter which one you decide to alter - 
CFMetaData#internalFromThrift() is the only consumer of 
ColumnDefinition#fromThrift().

 thrift column definition list sometimes immutable
 -

 Key: CASSANDRA-8695
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8695
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Chris Lockfort

 When the input cf_def.column_metadata is null, ColumnDefinition.fromThrift 
 can return Collections.emptyList() (which is defined to be an immutable list) 
 One caller, CFMetaData.internalFromThrift , incorrectly assumes that this 
 list will always be mutable and tries to add to this immutable list, which 
 causes the Cassandra server to throw an exception.
 It looks like this is a bug in 2.1, but not in trunk.
 I can include my one-liner patch, but I'm not sure whether it is better to 
 fix the caller (to not assume random lists you get back from a method are 
 mutable) or the callee (to always return a mutable list).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8683) Ensure early reopening has no overlap with replaced files, and that SSTableReader.first/last are honoured universally

2015-01-28 Thread Benedict (JIRA)

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

Benedict updated CASSANDRA-8683:

Summary: Ensure early reopening has no overlap with replaced files, and 
that SSTableReader.first/last are honoured universally  (was: Incremental 
repairs broken with early opening of compaction results)

 Ensure early reopening has no overlap with replaced files, and that 
 SSTableReader.first/last are honoured universally
 -

 Key: CASSANDRA-8683
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8683
 Project: Cassandra
  Issue Type: Bug
Reporter: Marcus Eriksson
Assignee: Marcus Eriksson
 Fix For: 2.1.3

 Attachments: 0001-avoid-NPE-in-getPositionsForRanges.patch


 Incremental repairs holds a set of the sstables it started the repair on (we 
 need to know which sstables were actually validated to be able to anticompact 
 them). This includes any tmplink files that existed when the compaction 
 started (if we wouldn't include those, we would miss data since we move the 
 start point of the existing non-tmplink files)
 With CASSANDRA-6916 we swap out those instances with new ones 
 (SSTR.cloneWithNewStart / SSTW.openEarly), meaning that the underlying file 
 can get deleted even though we hold a reference.
 This causes the unit test error: 
 http://cassci.datastax.com/job/trunk_utest/1330/testReport/junit/org.apache.cassandra.db.compaction/LeveledCompactionStrategyTest/testValidationMultipleSSTablePerLevel/
 (note that it only fails on trunk though, in 2.1 we don't hold references to 
 the repairing files for non-incremental repairs, but the bug should exist in 
 2.1 as well)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8595) Emit timeouts per endpoint

2015-01-28 Thread Pramod Nair (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295158#comment-14295158
 ] 

Pramod Nair commented on CASSANDRA-8595:


Hello,

I'm interested in working on this issue.
Could you please let me know the use-case for this?

 Emit timeouts per endpoint
 --

 Key: CASSANDRA-8595
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8595
 Project: Cassandra
  Issue Type: Improvement
Reporter: sankalp kohli
Priority: Minor

 We currently emit number of timeouts experienced by a co-ordinator while 
 doing reads and writes. This does not tell us which replica or endpoint is 
 responsible for the timeouts. 
 We can keep a map of endpoint to number of timeouts which could be emitted 
 via JMX.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-8698) Refactor reference use in StreamTransferTask et al. to make safety obvious

2015-01-28 Thread Benedict (JIRA)
Benedict created CASSANDRA-8698:
---

 Summary: Refactor reference use in StreamTransferTask et al. to 
make safety obvious
 Key: CASSANDRA-8698
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8698
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Priority: Minor
 Fix For: 3.0


Follow up to Safer Resource Management (CASSANDRA-7705). Since here we don't 
encapsulate our ref use in a try-with-resources block, we do some manual 
munging to try to ensure we don't drop any references. We can do better, and 
make this part of the functionality offered by Refs. At the same time, we 
should assess the way references are obtained in SSTableLoader.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (CASSANDRA-8683) Ensure early reopening has no overlap with replaced files, and that SSTableReader.first/last are honoured universally

2015-01-28 Thread Benedict (JIRA)

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

Benedict reassigned CASSANDRA-8683:
---

Assignee: Benedict  (was: Marcus Eriksson)

 Ensure early reopening has no overlap with replaced files, and that 
 SSTableReader.first/last are honoured universally
 -

 Key: CASSANDRA-8683
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8683
 Project: Cassandra
  Issue Type: Bug
Reporter: Marcus Eriksson
Assignee: Benedict
 Fix For: 2.1.3

 Attachments: 0001-avoid-NPE-in-getPositionsForRanges.patch


 Incremental repairs holds a set of the sstables it started the repair on (we 
 need to know which sstables were actually validated to be able to anticompact 
 them). This includes any tmplink files that existed when the compaction 
 started (if we wouldn't include those, we would miss data since we move the 
 start point of the existing non-tmplink files)
 With CASSANDRA-6916 we swap out those instances with new ones 
 (SSTR.cloneWithNewStart / SSTW.openEarly), meaning that the underlying file 
 can get deleted even though we hold a reference.
 This causes the unit test error: 
 http://cassci.datastax.com/job/trunk_utest/1330/testReport/junit/org.apache.cassandra.db.compaction/LeveledCompactionStrategyTest/testValidationMultipleSSTablePerLevel/
 (note that it only fails on trunk though, in 2.1 we don't hold references to 
 the repairing files for non-incremental repairs, but the bug should exist in 
 2.1 as well)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8683) Ensure early reopening has no overlap with replaced files, and that SSTableReader.first/last are honoured universally

2015-01-28 Thread Benedict (JIRA)

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

Benedict updated CASSANDRA-8683:

Reviewer:   (was: Benedict)

 Ensure early reopening has no overlap with replaced files, and that 
 SSTableReader.first/last are honoured universally
 -

 Key: CASSANDRA-8683
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8683
 Project: Cassandra
  Issue Type: Bug
Reporter: Marcus Eriksson
Assignee: Benedict
 Fix For: 2.1.3

 Attachments: 0001-avoid-NPE-in-getPositionsForRanges.patch


 Incremental repairs holds a set of the sstables it started the repair on (we 
 need to know which sstables were actually validated to be able to anticompact 
 them). This includes any tmplink files that existed when the compaction 
 started (if we wouldn't include those, we would miss data since we move the 
 start point of the existing non-tmplink files)
 With CASSANDRA-6916 we swap out those instances with new ones 
 (SSTR.cloneWithNewStart / SSTW.openEarly), meaning that the underlying file 
 can get deleted even though we hold a reference.
 This causes the unit test error: 
 http://cassci.datastax.com/job/trunk_utest/1330/testReport/junit/org.apache.cassandra.db.compaction/LeveledCompactionStrategyTest/testValidationMultipleSSTablePerLevel/
 (note that it only fails on trunk though, in 2.1 we don't hold references to 
 the repairing files for non-incremental repairs, but the bug should exist in 
 2.1 as well)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (CASSANDRA-8691) SSTableReader.getPosition() does not correctly filter out queries that exceed its bounds

2015-01-28 Thread Benedict (JIRA)

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

Benedict resolved CASSANDRA-8691.
-
Resolution: Duplicate

 SSTableReader.getPosition() does not correctly filter out queries that exceed 
 its bounds
 

 Key: CASSANDRA-8691
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8691
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Benedict
 Fix For: 2.1.3


 This has been true for some time, but I worry about including it before 2.1 
 in case we depend on the brokenness somehow. In getPosition, we test:
 {code}
 if (first.compareTo(key)  0 || last.compareTo(key)  0)
 {
 if (op == Operator.EQ  updateCacheAndStats)
 bloomFilterTracker.addFalsePositive();
 if (op.apply(1)  0)
 {
 Tracing.trace(Check against min and max keys allows skipping 
 sstable {}, descriptor.generation);
 return null;
 }
 }
 {code}
 However, op.apply(1) always returns = 0 unless op == Operation.EQ



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-7705) Safer Resource Management

2015-01-28 Thread Marcus Eriksson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295203#comment-14295203
 ] 

Marcus Eriksson commented on CASSANDRA-7705:


+1

 Safer Resource Management
 -

 Key: CASSANDRA-7705
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7705
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Benedict
 Fix For: 3.0


 We've had a spate of bugs recently with bad reference counting. these can 
 have potentially dire consequences, generally either randomly deleting data 
 or giving us infinite loops. 
 Since in 2.1 we only reference count resources that are relatively expensive 
 and infrequently managed (or in places where this safety is probably not as 
 necessary, e.g. SerializingCache), we could without any negative consequences 
 (and only slight code complexity) introduce a safer resource management 
 scheme for these more expensive/infrequent actions.
 Basically, I propose when we want to acquire a resource we allocate an object 
 that manages the reference. This can only be released once; if it is released 
 twice, we fail immediately at the second release, reporting where the bug is 
 (rather than letting it continue fine until the next correct release corrupts 
 the count). The reference counter remains the same, but we obtain guarantees 
 that the reference count itself is never badly maintained, although code 
 using it could mistakenly release its own handle early (typically this is 
 only an issue when cleaning up after a failure, in which case under the new 
 scheme this would be an innocuous error)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7950) Output of nodetool compactionstats and compactionhistory does not work well with long keyspace and column family names.

2015-01-28 Thread Anuja Mandlecha (JIRA)

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

Anuja Mandlecha updated CASSANDRA-7950:
---
Attachment: 7950.patch

[~eugenstud]: I looked into how column command in unix works and did the same 
for compactionhistory command and also added TAB (\t) as a delimeter for now 
which can be used by grep, cut,awk commands. In future we can also provide a 
delimeter option as I have mentioned earlier. 
For compactionstats the code is already present to calculate the 
maxColumnLength, hence I only added a delimeter TAB(\t) to it. The attached 
path contain these changes.
Note: I have used cassandra 2.1 branch.

 Output of nodetool compactionstats and compactionhistory does not work well 
 with long keyspace and column family names.  
 -

 Key: CASSANDRA-7950
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7950
 Project: Cassandra
  Issue Type: Bug
 Environment: CentOS 5, 64bit, Oracle JDK 7, DSE
Reporter: Eugene
Priority: Minor
  Labels: lhf
 Fix For: 2.0.13

 Attachments: 7950.patch, nodetool-examples.txt


 When running these commands:
 nodetool compactionstats
 nodetool compactionhistory
 The output can be difficult to grok due to long keyspace names, column family 
 names, and long values.  I have attached an example.
 It's difficult for both humans and grep/sed/awk/perl to read.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-7705) Safer Resource Management

2015-01-28 Thread Marcus Eriksson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294873#comment-14294873
 ] 

Marcus Eriksson commented on CASSANDRA-7705:


LGTM, +1

tiny nits to fix on commit:
* unused onRelease() method in SSTableWriter
* seems you removed @BeforeClass on closeSTDErr() in BlackListingCompactionsTest

 Safer Resource Management
 -

 Key: CASSANDRA-7705
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7705
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Benedict
 Fix For: 3.0


 We've had a spate of bugs recently with bad reference counting. these can 
 have potentially dire consequences, generally either randomly deleting data 
 or giving us infinite loops. 
 Since in 2.1 we only reference count resources that are relatively expensive 
 and infrequently managed (or in places where this safety is probably not as 
 necessary, e.g. SerializingCache), we could without any negative consequences 
 (and only slight code complexity) introduce a safer resource management 
 scheme for these more expensive/infrequent actions.
 Basically, I propose when we want to acquire a resource we allocate an object 
 that manages the reference. This can only be released once; if it is released 
 twice, we fail immediately at the second release, reporting where the bug is 
 (rather than letting it continue fine until the next correct release corrupts 
 the count). The reference counter remains the same, but we obtain guarantees 
 that the reference count itself is never badly maintained, although code 
 using it could mistakenly release its own handle early (typically this is 
 only an issue when cleaning up after a failure, in which case under the new 
 scheme this would be an innocuous error)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


cassandra git commit: Make sure we compact highly overlapping cold sstables with STCS

2015-01-28 Thread marcuse
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 325169e82 - 9efa0173d


Make sure we compact highly overlapping cold sstables with STCS

Patch by marcuse; reviewed by carlyeks for CASSANDRA-8635


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

Branch: refs/heads/cassandra-2.1
Commit: 9efa0173d0e621045f650e9a57a607d3c4c0bb50
Parents: 325169e
Author: Marcus Eriksson marc...@apache.org
Authored: Wed Jan 28 13:49:42 2015 +0100
Committer: Marcus Eriksson marc...@apache.org
Committed: Wed Jan 28 13:53:27 2015 +0100

--
 CHANGES.txt |  2 +
 .../SizeTieredCompactionStrategy.java   | 77 +++-
 .../cassandra/io/sstable/ColumnNameHelper.java  | 22 ++
 .../cassandra/io/sstable/SSTableReader.java | 50 +
 .../SizeTieredCompactionStrategyTest.java   | 12 +--
 .../cassandra/db/filter/ColumnSliceTest.java| 14 
 6 files changed, 168 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9efa0173/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b247127..ff6a26f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.1.3
+ * Make sure we compact highly overlapping cold sstables with
+   STCS (CASSANDRA-8635)
  * rpc_interface and listen_interface generate NPE on startup when specified 
interface doesn't exist (CASSANDRA-8677)
  * Fix ArrayIndexOutOfBoundsException in nodetool cfhistograms (CASSANDRA-8514)
  * Switch from yammer metrics for nodetool cf/proxy histograms (CASSANDRA-8662)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9efa0173/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
--
diff --git 
a/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java 
b/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
index 4b44426..fbd715c 100644
--- 
a/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
+++ 
b/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
@@ -24,12 +24,14 @@ import com.google.common.annotations.VisibleForTesting;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
+import com.google.common.primitives.Longs;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.cql3.statements.CFPropDefs;
 import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.exceptions.ConfigurationException;
+import org.apache.cassandra.io.sstable.ColumnNameHelper;
 import org.apache.cassandra.io.sstable.SSTableReader;
 import org.apache.cassandra.utils.Pair;
 
@@ -80,7 +82,7 @@ public class SizeTieredCompactionStrategy extends 
AbstractCompactionStrategy
 int maxThreshold = cfs.getMaximumCompactionThreshold();
 
 IterableSSTableReader candidates = 
filterSuspectSSTables(Sets.intersection(cfs.getUncompactingSSTables(), 
sstables));
-candidates = filterColdSSTables(Lists.newArrayList(candidates), 
options.coldReadsToOmit);
+candidates = filterColdSSTables(Lists.newArrayList(candidates), 
options.coldReadsToOmit, cfs.getMinimumCompactionThreshold());
 
 ListListSSTableReader buckets = 
getBuckets(createSSTableAndLengthPairs(candidates), options.bucketHigh, 
options.bucketLow, options.minSSTableSize);
 logger.debug(Compaction buckets are {}, buckets);
@@ -109,10 +111,11 @@ public class SizeTieredCompactionStrategy extends 
AbstractCompactionStrategy
  * across all sstables
  * @param sstables all sstables to consider
  * @param coldReadsToOmit the proportion of total reads/sec that will be 
omitted (0=omit nothing, 1=omit everything)
+ * @param minThreshold min compaction threshold
  * @return a list of sstables with the coldest sstables excluded until the 
reads they represent reaches coldReadsToOmit
  */
 @VisibleForTesting
-static ListSSTableReader filterColdSSTables(ListSSTableReader 
sstables, double coldReadsToOmit)
+static ListSSTableReader filterColdSSTables(ListSSTableReader 
sstables, double coldReadsToOmit, int minThreshold)
 {
 if (coldReadsToOmit == 0.0)
 return sstables;
@@ -167,10 +170,78 @@ public class SizeTieredCompactionStrategy extends 
AbstractCompactionStrategy
 totalColdReads += reads;
 cutoffIndex++;
 }
+ListSSTableReader hotSSTables = new 

[jira] [Commented] (CASSANDRA-8650) Creation and maintenance of roles should not require superuser status

2015-01-28 Thread Sam Tunnicliffe (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294929#comment-14294929
 ] 

Sam Tunnicliffe commented on CASSANDRA-8650:


Yes, I ummed and ahhed about that myself and whether roles should be considered 
part of the top level DataResource or not. In fact,  my first version did 
exactly what you suggest but it included some ugliness to work around several 
places where we assume we're dealing with DataResource. I'll clean that up and 
post it for comparison.

 Creation and maintenance of roles should not require superuser status
 -

 Key: CASSANDRA-8650
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8650
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core
Reporter: Sam Tunnicliffe
Assignee: Sam Tunnicliffe
  Labels: cql, security
 Fix For: 3.0

 Attachments: 8650.txt


 Currently, only roles with superuser status are permitted to 
 create/drop/grant/revoke roles, which violates the principal of least 
 privilege. In addition, in order to run {{ALTER ROLE}} statements a user must 
 log in directly as that role or else be a superuser. This requirement 
 increases the (ab)use of superuser privileges, especially where roles are 
 created without {{LOGIN}} privileges to model groups of permissions granted 
 to individual db users. In this scenario, a superuser is always required if 
 such roles are to be granted and modified.
 We should add more granular permissions to allow administration of roles 
 without requiring superuser status.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


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

2015-01-28 Thread marcuse
Merge branch 'cassandra-2.1' into trunk

Conflicts:
CHANGES.txt

src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java


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

Branch: refs/heads/trunk
Commit: b4b1bdd3250ea8f35739df4fcdcc92bf5351a3d6
Parents: 2b028b2 9efa017
Author: Marcus Eriksson marc...@apache.org
Authored: Wed Jan 28 14:02:32 2015 +0100
Committer: Marcus Eriksson marc...@apache.org
Committed: Wed Jan 28 14:02:32 2015 +0100

--
 CHANGES.txt |  2 +
 .../SizeTieredCompactionStrategy.java   | 77 +++-
 .../cassandra/io/sstable/ColumnNameHelper.java  | 22 ++
 .../io/sstable/format/SSTableReader.java| 49 +
 .../SizeTieredCompactionStrategyTest.java   | 12 +--
 .../cassandra/db/filter/ColumnSliceTest.java| 14 
 6 files changed, 167 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b4b1bdd3/CHANGES.txt
--
diff --cc CHANGES.txt
index 5c6bb81,ff6a26f..432ebcc8
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,62 -1,9 +1,64 @@@
 +3.0
 + * rpc_interface and listen_interface generate NPE on startup when specified 
interface doesn't exist (CASSANDRA-8677)
 + * Fix ArrayIndexOutOfBoundsException in nodetool cfhistograms 
(CASSANDRA-8514)
 + * Serializing Row cache alternative, fully off heap (CASSANDRA-7438)
 + * Duplicate rows returned when in clause has repeated values (CASSANDRA-6707)
 + * Make CassandraException unchecked, extend RuntimeException (CASSANDRA-8560)
 + * Support direct buffer decompression for reads (CASSANDRA-8464)
 + * DirectByteBuffer compatible LZ4 methods (CASSANDRA-7039)
 + * Add role based access control (CASSANDRA-7653)
 + * Group sstables for anticompaction correctly (CASSANDRA-8578)
 + * Add ReadFailureException to native protocol, respond
 +   immediately when replicas encounter errors while handling
 +   a read request (CASSANDRA-7886)
 + * Switch CommitLogSegment from RandomAccessFile to nio (CASSANDRA-8308)
 + * Allow mixing token and partition key restrictions (CASSANDRA-7016)
 + * Support index key/value entries on map collections (CASSANDRA-8473)
 + * Modernize schema tables (CASSANDRA-8261)
 + * Support for user-defined aggregation functions (CASSANDRA-8053)
 + * Fix NPE in SelectStatement with empty IN values (CASSANDRA-8419)
 + * Refactor SelectStatement, return IN results in natural order instead
 +   of IN value list order and ignore duplicate values in partition key IN 
restrictions (CASSANDRA-7981)
 + * Support UDTs, tuples, and collections in user-defined
 +   functions (CASSANDRA-7563)
 + * Fix aggregate fn results on empty selection, result column name,
 +   and cqlsh parsing (CASSANDRA-8229)
 + * Mark sstables as repaired after full repair (CASSANDRA-7586)
 + * Extend Descriptor to include a format value and refactor reader/writer
 +   APIs (CASSANDRA-7443)
 + * Integrate JMH for microbenchmarks (CASSANDRA-8151)
 + * Keep sstable levels when bootstrapping (CASSANDRA-7460)
 + * Add Sigar library and perform basic OS settings check on startup 
(CASSANDRA-7838)
 + * Support for aggregation functions (CASSANDRA-4914)
 + * Remove cassandra-cli (CASSANDRA-7920)
 + * Accept dollar quoted strings in CQL (CASSANDRA-7769)
 + * Make assassinate a first class command (CASSANDRA-7935)
 + * Support IN clause on any clustering column (CASSANDRA-4762)
 + * Improve compaction logging (CASSANDRA-7818)
 + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917)
 + * Do anticompaction in groups (CASSANDRA-6851)
 + * Support user-defined functions (CASSANDRA-7395, 7526, 7562, 7740, 7781, 
7929,
 +   7924, 7812, 8063, 7813, 7708)
 + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416)
 + * Move sstable RandomAccessReader to nio2, which allows using the
 +   FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050)
 + * Remove CQL2 (CASSANDRA-5918)
 + * Add Thrift get_multi_slice call (CASSANDRA-6757)
 + * Optimize fetching multiple cells by name (CASSANDRA-6933)
 + * Allow compilation in java 8 (CASSANDRA-7028)
 + * Make incremental repair default (CASSANDRA-7250)
 + * Enable code coverage thru JaCoCo (CASSANDRA-7226)
 + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) 
 + * Shorten SSTable path (CASSANDRA-6962)
 + * Use unsafe mutations for most unit tests (CASSANDRA-6969)
 + * Fix race condition during calculation of pending ranges (CASSANDRA-7390)
 + * Fail on very large batch sizes 

[1/2] cassandra git commit: Make sure we compact highly overlapping cold sstables with STCS

2015-01-28 Thread marcuse
Repository: cassandra
Updated Branches:
  refs/heads/trunk 2b028b2b2 - b4b1bdd32


Make sure we compact highly overlapping cold sstables with STCS

Patch by marcuse; reviewed by carlyeks for CASSANDRA-8635


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

Branch: refs/heads/trunk
Commit: 9efa0173d0e621045f650e9a57a607d3c4c0bb50
Parents: 325169e
Author: Marcus Eriksson marc...@apache.org
Authored: Wed Jan 28 13:49:42 2015 +0100
Committer: Marcus Eriksson marc...@apache.org
Committed: Wed Jan 28 13:53:27 2015 +0100

--
 CHANGES.txt |  2 +
 .../SizeTieredCompactionStrategy.java   | 77 +++-
 .../cassandra/io/sstable/ColumnNameHelper.java  | 22 ++
 .../cassandra/io/sstable/SSTableReader.java | 50 +
 .../SizeTieredCompactionStrategyTest.java   | 12 +--
 .../cassandra/db/filter/ColumnSliceTest.java| 14 
 6 files changed, 168 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9efa0173/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b247127..ff6a26f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.1.3
+ * Make sure we compact highly overlapping cold sstables with
+   STCS (CASSANDRA-8635)
  * rpc_interface and listen_interface generate NPE on startup when specified 
interface doesn't exist (CASSANDRA-8677)
  * Fix ArrayIndexOutOfBoundsException in nodetool cfhistograms (CASSANDRA-8514)
  * Switch from yammer metrics for nodetool cf/proxy histograms (CASSANDRA-8662)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9efa0173/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
--
diff --git 
a/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java 
b/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
index 4b44426..fbd715c 100644
--- 
a/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
+++ 
b/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
@@ -24,12 +24,14 @@ import com.google.common.annotations.VisibleForTesting;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
+import com.google.common.primitives.Longs;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.cql3.statements.CFPropDefs;
 import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.exceptions.ConfigurationException;
+import org.apache.cassandra.io.sstable.ColumnNameHelper;
 import org.apache.cassandra.io.sstable.SSTableReader;
 import org.apache.cassandra.utils.Pair;
 
@@ -80,7 +82,7 @@ public class SizeTieredCompactionStrategy extends 
AbstractCompactionStrategy
 int maxThreshold = cfs.getMaximumCompactionThreshold();
 
 IterableSSTableReader candidates = 
filterSuspectSSTables(Sets.intersection(cfs.getUncompactingSSTables(), 
sstables));
-candidates = filterColdSSTables(Lists.newArrayList(candidates), 
options.coldReadsToOmit);
+candidates = filterColdSSTables(Lists.newArrayList(candidates), 
options.coldReadsToOmit, cfs.getMinimumCompactionThreshold());
 
 ListListSSTableReader buckets = 
getBuckets(createSSTableAndLengthPairs(candidates), options.bucketHigh, 
options.bucketLow, options.minSSTableSize);
 logger.debug(Compaction buckets are {}, buckets);
@@ -109,10 +111,11 @@ public class SizeTieredCompactionStrategy extends 
AbstractCompactionStrategy
  * across all sstables
  * @param sstables all sstables to consider
  * @param coldReadsToOmit the proportion of total reads/sec that will be 
omitted (0=omit nothing, 1=omit everything)
+ * @param minThreshold min compaction threshold
  * @return a list of sstables with the coldest sstables excluded until the 
reads they represent reaches coldReadsToOmit
  */
 @VisibleForTesting
-static ListSSTableReader filterColdSSTables(ListSSTableReader 
sstables, double coldReadsToOmit)
+static ListSSTableReader filterColdSSTables(ListSSTableReader 
sstables, double coldReadsToOmit, int minThreshold)
 {
 if (coldReadsToOmit == 0.0)
 return sstables;
@@ -167,10 +170,78 @@ public class SizeTieredCompactionStrategy extends 
AbstractCompactionStrategy
 totalColdReads += reads;
 cutoffIndex++;
 }
+ListSSTableReader hotSSTables = new 

[jira] [Assigned] (CASSANDRA-8601) cassandra-stress yaml profiles should support all -pop and -insert options

2015-01-28 Thread Benedict (JIRA)

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

Benedict reassigned CASSANDRA-8601:
---

Assignee: Benedict

 cassandra-stress yaml profiles should support all -pop and -insert options
 --

 Key: CASSANDRA-8601
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8601
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Benedict
Assignee: Benedict

 The yaml file currently supports most -insert options, but for simplicity and 
 uniformity it makes sense to offer all of them and the -pop options as well, 
 with any command line options simply overriding the settings provided in the 
 yaml (since many of these do make more sense to specify on the command line, 
 for easy scripting). 
 It might be nice, even, to permit the command ratios to be defined, and for 
 multiple different sets of all of the above parameters to be defined in a 
 profiles section, so that you could define a populate profile, and 
 different kinds of read workload profiles, which can each easily be specified 
 on the command line to define the complete workload.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[2/7] cassandra git commit: Safer Resource Management

2015-01-28 Thread benedict
Safer Resource Management

patch by benedict; review by marcuse for CASSANDRA-7705


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

Branch: refs/heads/cassandra-2.1
Commit: c75ee4160cb8fcdf47c90bfce8bf0d861f32d268
Parents: 9efa017
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 14:45:31 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 14:46:16 2015 +

--
 CHANGES.txt |   1 +
 build.xml   |   1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  | 143 +++---
 .../org/apache/cassandra/db/DataTracker.java|   6 +-
 .../compaction/AbstractCompactionStrategy.java  |   2 +-
 .../db/compaction/CompactionController.java |  20 +-
 .../db/compaction/CompactionManager.java|  26 +-
 .../cassandra/db/compaction/CompactionTask.java |   9 +-
 .../cassandra/db/index/SecondaryIndex.java  |  10 +-
 .../apache/cassandra/io/sstable/SSTable.java|   1 +
 .../cassandra/io/sstable/SSTableLoader.java |  14 +-
 .../cassandra/io/sstable/SSTableReader.java | 444 +--
 .../cassandra/io/sstable/SSTableRewriter.java   |  15 +-
 .../cassandra/io/sstable/SSTableWriter.java |   4 +-
 .../cassandra/service/ActiveRepairService.java  |  18 +-
 .../cassandra/streaming/StreamReceiveTask.java  |  10 +-
 .../cassandra/streaming/StreamSession.java  |  28 +-
 .../cassandra/streaming/StreamTransferTask.java |  10 +-
 .../streaming/messages/OutgoingFileMessage.java |  10 +-
 .../cassandra/tools/StandaloneScrubber.java |   2 +-
 .../apache/cassandra/utils/concurrent/Ref.java  | 134 ++
 .../cassandra/utils/concurrent/RefCounted.java  |  94 
 .../utils/concurrent/RefCountedImpl.java| 132 ++
 .../apache/cassandra/utils/concurrent/Refs.java | 219 +
 .../unit/org/apache/cassandra/SchemaLoader.java |  10 +
 .../org/apache/cassandra/db/KeyCacheTest.java   |   9 +-
 .../db/compaction/AntiCompactionTest.java   |  26 +-
 .../compaction/BlacklistingCompactionsTest.java |  11 +
 .../cassandra/io/sstable/LegacySSTableTest.java |   2 +-
 .../io/sstable/SSTableRewriterTest.java |   4 +-
 .../streaming/StreamTransferTaskTest.java   |   2 +-
 .../streaming/StreamingTransferTest.java|  18 +-
 .../utils/concurrent/RefCountedTest.java|  85 
 33 files changed, 1097 insertions(+), 423 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c75ee416/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ff6a26f..d142a68 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.3
+ * Safer Resource Management (CASSANDRA-7705)
  * Make sure we compact highly overlapping cold sstables with
STCS (CASSANDRA-8635)
  * rpc_interface and listen_interface generate NPE on startup when specified 
interface doesn't exist (CASSANDRA-8677)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c75ee416/build.xml
--
diff --git a/build.xml b/build.xml
index 2e5d0ac..d53a0f7 100644
--- a/build.xml
+++ b/build.xml
@@ -1109,6 +1109,7 @@
 jvmarg value=-Djava.awt.headless=true/
 jvmarg value=-javaagent:${basedir}/lib/jamm-0.3.0.jar /
 jvmarg value=-ea/
+jvmarg value=-Dcassandra.debugrefcount=true/
 jvmarg value=-Xss256k/
 jvmarg 
value=-Dcassandra.memtable_row_overhead_computation_step=100/
 jvmarg 
value=-Dcassandra.test.use_prepared=${cassandra.test.use_prepared}/

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c75ee416/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 3822648..62aadf9 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -33,6 +33,7 @@ import com.google.common.base.*;
 import com.google.common.collect.*;
 import com.google.common.util.concurrent.*;
 
+import org.apache.cassandra.io.FSWriteError;
 import org.json.simple.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -58,7 +59,6 @@ import org.apache.cassandra.dht.*;
 import org.apache.cassandra.dht.Range;
 import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.io.FSReadError;
-import org.apache.cassandra.io.FSWriteError;
 import 

[jira] [Created] (CASSANDRA-8699) SSTableRewriter.abort() can throw an exception when closing the open writer

2015-01-28 Thread Benedict (JIRA)
Benedict created CASSANDRA-8699:
---

 Summary: SSTableRewriter.abort() can throw an exception when 
closing the open writer
 Key: CASSANDRA-8699
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8699
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Benedict
 Fix For: 2.1.3


We should not call close on the open writer, as introduced in CASSANDRA-8157, 
but instead ensure abort is called.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


cassandra git commit: Fix schema from Thrift conversion with empty metadata

2015-01-28 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 c75ee4160 - b788bb371


Fix schema from Thrift conversion with empty metadata

patch by Chris Lockfort; reviewed by Aleksey Yeschenko for
CASSANDRA-8695


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

Branch: refs/heads/cassandra-2.1
Commit: b788bb37121abbc6cc73b93aea98915613744889
Parents: c75ee41
Author: Chris Lockfort clockf...@palantir.com
Authored: Tue Jan 27 16:43:18 2015 -0800
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Wed Jan 28 18:39:03 2015 +0300

--
 CHANGES.txt| 4 +++-
 src/java/org/apache/cassandra/config/ColumnDefinition.java | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b788bb37/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index d142a68..b976a16 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,8 +1,10 @@
 2.1.3
+ * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
  * Safer Resource Management (CASSANDRA-7705)
  * Make sure we compact highly overlapping cold sstables with
STCS (CASSANDRA-8635)
- * rpc_interface and listen_interface generate NPE on startup when specified 
interface doesn't exist (CASSANDRA-8677)
+ * rpc_interface and listen_interface generate NPE on startup when specified
+   interface doesn't exist (CASSANDRA-8677)
  * Fix ArrayIndexOutOfBoundsException in nodetool cfhistograms (CASSANDRA-8514)
  * Switch from yammer metrics for nodetool cf/proxy histograms (CASSANDRA-8662)
  * Make sure we don't add tmplink files to the compaction

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b788bb37/src/java/org/apache/cassandra/config/ColumnDefinition.java
--
diff --git a/src/java/org/apache/cassandra/config/ColumnDefinition.java 
b/src/java/org/apache/cassandra/config/ColumnDefinition.java
index ff66162..d6cc94c 100644
--- a/src/java/org/apache/cassandra/config/ColumnDefinition.java
+++ b/src/java/org/apache/cassandra/config/ColumnDefinition.java
@@ -298,7 +298,7 @@ public class ColumnDefinition extends ColumnSpecification
 public static ListColumnDefinition fromThrift(String ksName, String 
cfName, AbstractType? thriftComparator, AbstractType? thriftSubcomparator, 
ListColumnDef thriftDefs) throws SyntaxException, ConfigurationException
 {
 if (thriftDefs == null)
-return Collections.emptyList();
+return new ArrayList();
 
 ListColumnDefinition defs = new ArrayList(thriftDefs.size());
 for (ColumnDef thriftColumnDef : thriftDefs)



[jira] [Commented] (CASSANDRA-8694) Repair of empty keyspace hangs rather than ignoring the request

2015-01-28 Thread Jeff Jirsa (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295470#comment-14295470
 ] 

Jeff Jirsa commented on CASSANDRA-8694:
---

There's already a check for empty cfnames in repair.RepairSession:

assert cfnames.length  0 : Repairing no column families seems 
pointless, doesn't it;

We can check cfnames.length prior to getting there to prevent the hang



 Repair of empty keyspace hangs rather than ignoring the request
 ---

 Key: CASSANDRA-8694
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8694
 Project: Cassandra
  Issue Type: Bug
Reporter: Ryan McGuire
Priority: Minor
 Attachments: cass-8694.patch


 Create a two node cluster, create a keyspace, don't create any tables. 
 Initiate a repair:
 {code}
 04:32 PM:~$ ccm create -v git:cassandra-2.1 test -n 2 -s
 Fetching Cassandra updates...
 Current cluster is now: test
 04:33 PM:~$ ccm node1 cqlsh
 Connected to test at 127.0.0.1:9042.
 [cqlsh 5.0.1 | Cassandra 2.1.2-SNAPSHOT | CQL spec 3.2.0 | Native protocol v3]
 Use HELP for help.
 cqlsh create KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 2};
 cqlsh 
 04:34 PM:~$ ccm node1 nodetool -- repair
 [2015-01-27 16:34:11,741] Nothing to repair for keyspace 'system'
 [2015-01-27 16:34:11,748] Starting repair command #1, repairing 2 ranges for 
 keyspace test (parallelism=SEQUENTIAL, full=true)
 {code}
 The repair hangs.
 Do the same thing but add a table, and the repair completes very quickly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8694) Repair of empty keyspace hangs rather than ignoring the request

2015-01-28 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa updated CASSANDRA-8694:
--
Attachment: cass-8694.patch

 Repair of empty keyspace hangs rather than ignoring the request
 ---

 Key: CASSANDRA-8694
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8694
 Project: Cassandra
  Issue Type: Bug
Reporter: Ryan McGuire
Priority: Minor
 Attachments: cass-8694.patch


 Create a two node cluster, create a keyspace, don't create any tables. 
 Initiate a repair:
 {code}
 04:32 PM:~$ ccm create -v git:cassandra-2.1 test -n 2 -s
 Fetching Cassandra updates...
 Current cluster is now: test
 04:33 PM:~$ ccm node1 cqlsh
 Connected to test at 127.0.0.1:9042.
 [cqlsh 5.0.1 | Cassandra 2.1.2-SNAPSHOT | CQL spec 3.2.0 | Native protocol v3]
 Use HELP for help.
 cqlsh create KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 2};
 cqlsh 
 04:34 PM:~$ ccm node1 nodetool -- repair
 [2015-01-27 16:34:11,741] Nothing to repair for keyspace 'system'
 [2015-01-27 16:34:11,748] Starting repair command #1, repairing 2 ranges for 
 keyspace test (parallelism=SEQUENTIAL, full=true)
 {code}
 The repair hangs.
 Do the same thing but add a table, and the repair completes very quickly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8072) Exception during startup: Unable to gossip with any seeds

2015-01-28 Thread Russ Hatch (JIRA)

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

Russ Hatch updated CASSANDRA-8072:
--
Reproduced In: 2.0.11, 2.0.10, 2.1.3  (was: 2.0.10, 2.0.11)

 Exception during startup: Unable to gossip with any seeds
 -

 Key: CASSANDRA-8072
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8072
 Project: Cassandra
  Issue Type: Bug
Reporter: Ryan Springer
Assignee: Brandon Williams
 Attachments: casandra-system-log-with-assert-patch.log


 When Opscenter 4.1.4 or 5.0.1 tries to provision a 2-node DSC 2.0.10 cluster 
 in either ec2 or locally, an error occurs sometimes with one of the nodes 
 refusing to start C*.  The error in the /var/log/cassandra/system.log is:
 ERROR [main] 2014-10-06 15:54:52,292 CassandraDaemon.java (line 513) 
 Exception encountered during startup
 java.lang.RuntimeException: Unable to gossip with any seeds
 at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1200)
 at 
 org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:444)
 at 
 org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:655)
 at 
 org.apache.cassandra.service.StorageService.initServer(StorageService.java:609)
 at 
 org.apache.cassandra.service.StorageService.initServer(StorageService.java:502)
 at 
 org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:378)
 at 
 org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:496)
 at 
 org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:585)
  INFO [StorageServiceShutdownHook] 2014-10-06 15:54:52,326 Gossiper.java 
 (line 1279) Announcing shutdown
  INFO [StorageServiceShutdownHook] 2014-10-06 15:54:54,326 
 MessagingService.java (line 701) Waiting for messaging service to quiesce
  INFO [ACCEPT-localhost/127.0.0.1] 2014-10-06 15:54:54,327 
 MessagingService.java (line 941) MessagingService has terminated the accept() 
 thread
 This errors does not always occur when provisioning a 2-node cluster, but 
 probably around half of the time on only one of the nodes.  I haven't been 
 able to reproduce this error with DSC 2.0.9, and there have been no code or 
 definition file changes in Opscenter.
 I can reproduce locally with the above steps.  I'm happy to test any proposed 
 fixes since I'm the only person able to reproduce reliably so far.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8275) Some queries with multicolumn relation do not behave properly when secondary index is used

2015-01-28 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-8275:
--
Attachment: CASSANDRA-8275-trunk.txt
CASSANDRA-8275-2.1.txt
CASSANDRA-8275-2.0.txt

Those 3 patches fix the 2 problems specified before for the 3 versions that 
support multi column restrictions.

 Some queries with multicolumn relation do not behave properly when secondary 
 index is used
 --

 Key: CASSANDRA-8275
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8275
 Project: Cassandra
  Issue Type: Bug
Reporter: Benjamin Lerer
Assignee: Benjamin Lerer
 Attachments: CASSANDRA-8275-2.0.txt, CASSANDRA-8275-2.1.txt, 
 CASSANDRA-8275-trunk.txt


 In the case where we perform a select using a multicolumn relation over 
 multiple columns that use a secondary index the error message returned is 
 wrong.
 The following unit test can be use to reproduce the problem:
 {code}
 @Test
 public void testMultipleClusteringWithIndex() throws Throwable
 {
 createTable(CREATE TABLE %s (a int, b int, c int, d int, PRIMARY KEY 
 (a, b, c, d)));
 createIndex(CREATE INDEX ON %s (b)); 
 
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 0, 0, 
 0);
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 0, 1, 
 0);
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 0, 1, 
 1);
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 1, 0, 
 0);
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 1, 1, 
 0);
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 1, 1, 
 1);
 assertRows(execute(SELECT * FROM %s WHERE (b) = (?), 1),
row(0, 1, 0, 0),
row(0, 1, 1, 0),
row(0, 1, 1, 1)
);
 
 assertRows(execute(SELECT * FROM %s WHERE (b, c) = (?, ?) ALLOW 
 FILTERING, 1, 1),
row(0, 1, 1, 0),
row(0, 1, 1, 1)
);
 }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-8275) Some queries with multicolumn relation do not behave properly when secondary index is used

2015-01-28 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295837#comment-14295837
 ] 

Benjamin Lerer edited comment on CASSANDRA-8275 at 1/28/15 8:52 PM:


Those 3 patches fix the problems for the 3 versions that support multi column 
restrictions.


was (Author: blerer):
Those 3 patches fix the 2 problems specified before for the 3 versions that 
support multi column restrictions.

 Some queries with multicolumn relation do not behave properly when secondary 
 index is used
 --

 Key: CASSANDRA-8275
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8275
 Project: Cassandra
  Issue Type: Bug
Reporter: Benjamin Lerer
Assignee: Benjamin Lerer
 Fix For: 3.0, 2.1.3, 2.0.13

 Attachments: CASSANDRA-8275-2.0.txt, CASSANDRA-8275-2.1.txt, 
 CASSANDRA-8275-trunk.txt


 In the case where we perform a select using a multicolumn relation over 
 multiple columns that use a secondary index the error message returned is 
 wrong.
 The following unit test can be use to reproduce the problem:
 {code}
 @Test
 public void testMultipleClusteringWithIndex() throws Throwable
 {
 createTable(CREATE TABLE %s (a int, b int, c int, d int, PRIMARY KEY 
 (a, b, c, d)));
 createIndex(CREATE INDEX ON %s (b)); 
 
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 0, 0, 
 0);
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 0, 1, 
 0);
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 0, 1, 
 1);
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 1, 0, 
 0);
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 1, 1, 
 0);
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 1, 1, 
 1);
 assertRows(execute(SELECT * FROM %s WHERE (b) = (?), 1),
row(0, 1, 0, 0),
row(0, 1, 1, 0),
row(0, 1, 1, 1)
);
 
 assertRows(execute(SELECT * FROM %s WHERE (b, c) = (?, ?) ALLOW 
 FILTERING, 1, 1),
row(0, 1, 1, 0),
row(0, 1, 1, 1)
);
 }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8696) nodetool repair on cassandra 2.1.2 keyspaces return java.lang.RuntimeException: Could not create snapshot

2015-01-28 Thread Jeff Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295881#comment-14295881
 ] 

Jeff Liu commented on CASSANDRA-8696:
-

The replica nodes are not busy at all. Actually I have stopped all client 
connection while trying to run a nodetool repair. 

nodetool tpstats also shows that there isn't much activities going on.


{noformat}
Pool NameActive   Pending  Completed   Blocked  All 
time blocked
CounterMutationStage  0 0  0 0  
   0
ReadStage 0 0  35441 0  
   0
RequestResponseStage  0 0   26940702 0  
   0
MutationStage 1 0   42298652 0  
   0
ReadRepairStage   0 0101 0  
   0
GossipStage   0 0  77379 0  
   0
CacheCleanupExecutor  0 0  0 0  
   0
AntiEntropyStage  0 0333 0  
   0
MigrationStage0 0   1664 0  
   0
ValidationExecutor0 0 51 0  
   0
CommitLogArchiver 0 0  0 0  
   0
MiscStage 0 0  0 0  
   0
MemtableFlushWriter   1 1853 0  
   0
MemtableReclaimMemory 0 0853 0  
   0
PendingRangeCalculator0 0 12 0  
   0
MemtablePostFlush 0 0   1365 0  
   0
CompactionExecutor2 9244 0  
   0
InternalResponseStage 0 0   1679 0  
   0
HintedHandoff 0 0 13 0  
   0

Message type   Dropped
RANGE_SLICE  0
READ_REPAIR  0
PAGED_RANGE  0
BINARY   0
READ  6067
MUTATION 8
_TRACE   0
REQUEST_RESPONSE 0
COUNTER_MUTATION 0
{noformat}

 nodetool repair on cassandra 2.1.2 keyspaces return 
 java.lang.RuntimeException: Could not create snapshot
 -

 Key: CASSANDRA-8696
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8696
 Project: Cassandra
  Issue Type: Bug
Reporter: Jeff Liu

 When trying to run nodetool repair -pr on cassandra node ( 2.1.2), cassandra 
 throw java exceptions: cannot create snapshot. 
 the error log from system.log:
 {noformat}
 INFO  [STREAM-IN-/10.97.9.110] 2015-01-28 02:07:28,815 
 StreamResultFuture.java:166 - [Stream #692c1450-a692-11e4-9973-070e938df227 
 ID#0] Prepare completed. Receiving 2 files(221187 bytes), sending 5 
 files(632105 bytes)
 INFO  [STREAM-IN-/10.97.9.110] 2015-01-28 02:07:29,046 
 StreamResultFuture.java:180 - [Stream #692c1450-a692-11e4-9973-070e938df227] 
 Session with /10.97.9.110 is complete
 INFO  [STREAM-IN-/10.97.9.110] 2015-01-28 02:07:29,046 
 StreamResultFuture.java:212 - [Stream #692c1450-a692-11e4-9973-070e938df227] 
 All sessions completed
 INFO  [STREAM-IN-/10.97.9.110] 2015-01-28 02:07:29,047 
 StreamingRepairTask.java:96 - [repair #685e3d00-a692-11e4-9973-070e938df227] 
 streaming task succeed, returning response to /10.98.194.68
 INFO  [RepairJobTask:1] 2015-01-28 02:07:29,065 StreamResultFuture.java:86 - 
 [Stream #692c6270-a692-11e4-9973-070e938df227] Executing streaming plan for 
 Repair
 INFO  [StreamConnectionEstablisher:4] 2015-01-28 02:07:29,065 
 StreamSession.java:213 - [Stream #692c6270-a692-11e4-9973-070e938df227] 
 Starting streaming to /10.66.187.201
 INFO  [StreamConnectionEstablisher:4] 2015-01-28 02:07:29,070 
 StreamCoordinator.java:209 - [Stream #692c6270-a692-11e4-9973-070e938df227, 
 ID#0] Beginning stream session with /10.66.187.201
 INFO  [STREAM-IN-/10.66.187.201] 2015-01-28 02:07:29,465 
 StreamResultFuture.java:166 - [Stream #692c6270-a692-11e4-9973-070e938df227 
 ID#0] Prepare completed. Receiving 5 files(627994 bytes), sending 5 
 files(632105 bytes)
 INFO  [StreamReceiveTask:22] 2015-01-28 02:07:31,971 
 StreamResultFuture.java:180 - [Stream #692c6270-a692-11e4-9973-070e938df227] 
 Session with /10.66.187.201 is complete
 INFO  [StreamReceiveTask:22] 2015-01-28 02:07:31,972 
 StreamResultFuture.java:212 - [Stream 

[jira] [Commented] (CASSANDRA-8418) Queries that require allow filtering are working without it

2015-01-28 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295866#comment-14295866
 ] 

Benjamin Lerer commented on CASSANDRA-8418:
---

The problem with the warning log is that unless we specify the query that 
should required {{ALLOW FILTERING}}  in the message, the warning is a bit 
useless. The person who will found the warning will have no clue of which query 
triggered the problem.
On the other hand, logging only the first query that should have required 
{{ALLOW FILTERING}} is a bit misleading, as it could give the impression that 
only one query was causing problem.

I am more in favor of letting 2.1 as it is and documenting the change in the 
{{CHANGES.txt}} file for 3.0.


 Queries that require allow filtering are working without it
 ---

 Key: CASSANDRA-8418
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8418
 Project: Cassandra
  Issue Type: Bug
Reporter: Philip Thompson
Assignee: Benjamin Lerer
Priority: Minor
 Fix For: 3.0

 Attachments: CASSANDRA-8418.txt


 The trunk dtest {{cql_tests.py:TestCQL.composite_index_with_pk_test}} has 
 begun failing after the changes to CASSANDRA-7981. 
 With the schema {code}CREATE TABLE blogs (
 blog_id int,
 time1 int,
 time2 int,
 author text,
 content text,
 PRIMARY KEY (blog_id, time1, time2){code}
 and {code}CREATE INDEX ON blogs(author){code}, then the query
 {code}SELECT blog_id, content FROM blogs WHERE time1  0 AND 
 author='foo'{code} now requires ALLOW FILTERING, but did not before the 
 refactor.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8275) Some queries with multicolumn relation do not behave properly when secondary index is used

2015-01-28 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295840#comment-14295840
 ] 

Benjamin Lerer commented on CASSANDRA-8275:
---

While working on this problem I discovered that there was 2 issues with 
multicolumn restrictions and secondary indices:
# The first problem was caused by the fact that the code was not retrieving the 
proper value for the clustering column {{IndexExpression}} when multicolumn 
restrictions were being used. This problem could be reproduced by the unit test 
provided in the description
# The second problem was that for the table:
{code}CREATE TABLE test (a int, b int, c int, d int, e int, f int, PRIMARY KEY 
((a, b), c, d, e)){code}
the following query:
{code}SELECT * FROM test WHERE a = ? AND (c) IN ((?), (?)) AND f = ? ALLOW 
FILTERING{code}
was working fine if the clustering column {{c}} was not indexed but was 
rejected if it was.
The reason was that the code was trying to create an {{IndexExpression}} for 
the {{c}} column which was not needed.
This problem was also affecting single column restrictions.  

 Some queries with multicolumn relation do not behave properly when secondary 
 index is used
 --

 Key: CASSANDRA-8275
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8275
 Project: Cassandra
  Issue Type: Bug
Reporter: Benjamin Lerer
Assignee: Benjamin Lerer
 Fix For: 3.0, 2.1.3, 2.0.13

 Attachments: CASSANDRA-8275-2.0.txt, CASSANDRA-8275-2.1.txt, 
 CASSANDRA-8275-trunk.txt


 In the case where we perform a select using a multicolumn relation over 
 multiple columns that use a secondary index the error message returned is 
 wrong.
 The following unit test can be use to reproduce the problem:
 {code}
 @Test
 public void testMultipleClusteringWithIndex() throws Throwable
 {
 createTable(CREATE TABLE %s (a int, b int, c int, d int, PRIMARY KEY 
 (a, b, c, d)));
 createIndex(CREATE INDEX ON %s (b)); 
 
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 0, 0, 
 0);
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 0, 1, 
 0);
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 0, 1, 
 1);
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 1, 0, 
 0);
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 1, 1, 
 0);
 execute(INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?), 0, 1, 1, 
 1);
 assertRows(execute(SELECT * FROM %s WHERE (b) = (?), 1),
row(0, 1, 0, 0),
row(0, 1, 1, 0),
row(0, 1, 1, 1)
);
 
 assertRows(execute(SELECT * FROM %s WHERE (b, c) = (?, ?) ALLOW 
 FILTERING, 1, 1),
row(0, 1, 1, 0),
row(0, 1, 1, 1)
);
 }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8528) Add an ExecutionException to the protocol

2015-01-28 Thread Robert Stupp (JIRA)

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

Robert Stupp updated CASSANDRA-8528:

Attachment: 8528-003.txt

attached 8528-003.txt (just merged recent trunk)

 Add an ExecutionException to the protocol
 -

 Key: CASSANDRA-8528
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8528
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Sylvain Lebresne
Assignee: Robert Stupp
  Labels: client-impacting, protocolv4
 Fix For: 3.0

 Attachments: 8528-001.txt, 8528-002.txt, 8528-003.txt


 With the introduction of UDF, we should add an ExecutionException (or 
 FunctionExecutionException or something like that) to the exceptions that can 
 be sent back to client. We can't guarantee that UDFs won't throw and none of 
 our existing exception is terribly adapted to report such event to the client.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8678) CREATE TABLE accepts value for default_time_to_live on counter table

2015-01-28 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295808#comment-14295808
 ] 

Aleksey Yeschenko commented on CASSANDRA-8678:
--

Needs both.

 CREATE TABLE accepts value for default_time_to_live on counter table
 

 Key: CASSANDRA-8678
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8678
 Project: Cassandra
  Issue Type: Wish
  Components: Tools
Reporter: Aaron Ploetz
Assignee: Jeff Jirsa
Priority: Minor
 Fix For: 2.1.2

 Attachments: cassandra-8678.diff


 I can create a counter table (via cqlsh) with a default_time_to_live:
 CREATE TABLE IF NOT EXISTS metrics2(
   time timestamp,
   value counter,
   PRIMARY KEY ((time))
 ) WITH default_time_to_live=10;
 Upsert a row that increments the counter:
 {{UPDATE metrics2 SET value=value+1 WHERE timestamp='2015-01-24 10:48 
 -0600';}}
 Wait 10 seconds, and select, and the row is (of course) still there.  There 
 should probably be a warning or error preventing the creation of a table that 
 has both counter columns and a value set for default_time_to_live.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8696) nodetool repair on cassandra 2.1.2 keyspaces return java.lang.RuntimeException: Could not create snapshot

2015-01-28 Thread Yuki Morishita (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295852#comment-14295852
 ] 

Yuki Morishita commented on CASSANDRA-8696:
---

If there are no errors on replica nodes, then snapshot may be timed out.
Check if replica nodes are busy (i.e. heavy GC activity) and check nodetool 
tpstats.
Lost notification is harmless, it is just telling nodetool lost some messages 
so you should check log for repair completion.

 nodetool repair on cassandra 2.1.2 keyspaces return 
 java.lang.RuntimeException: Could not create snapshot
 -

 Key: CASSANDRA-8696
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8696
 Project: Cassandra
  Issue Type: Bug
Reporter: Jeff Liu

 When trying to run nodetool repair -pr on cassandra node ( 2.1.2), cassandra 
 throw java exceptions: cannot create snapshot. 
 the error log from system.log:
 {noformat}
 INFO  [STREAM-IN-/10.97.9.110] 2015-01-28 02:07:28,815 
 StreamResultFuture.java:166 - [Stream #692c1450-a692-11e4-9973-070e938df227 
 ID#0] Prepare completed. Receiving 2 files(221187 bytes), sending 5 
 files(632105 bytes)
 INFO  [STREAM-IN-/10.97.9.110] 2015-01-28 02:07:29,046 
 StreamResultFuture.java:180 - [Stream #692c1450-a692-11e4-9973-070e938df227] 
 Session with /10.97.9.110 is complete
 INFO  [STREAM-IN-/10.97.9.110] 2015-01-28 02:07:29,046 
 StreamResultFuture.java:212 - [Stream #692c1450-a692-11e4-9973-070e938df227] 
 All sessions completed
 INFO  [STREAM-IN-/10.97.9.110] 2015-01-28 02:07:29,047 
 StreamingRepairTask.java:96 - [repair #685e3d00-a692-11e4-9973-070e938df227] 
 streaming task succeed, returning response to /10.98.194.68
 INFO  [RepairJobTask:1] 2015-01-28 02:07:29,065 StreamResultFuture.java:86 - 
 [Stream #692c6270-a692-11e4-9973-070e938df227] Executing streaming plan for 
 Repair
 INFO  [StreamConnectionEstablisher:4] 2015-01-28 02:07:29,065 
 StreamSession.java:213 - [Stream #692c6270-a692-11e4-9973-070e938df227] 
 Starting streaming to /10.66.187.201
 INFO  [StreamConnectionEstablisher:4] 2015-01-28 02:07:29,070 
 StreamCoordinator.java:209 - [Stream #692c6270-a692-11e4-9973-070e938df227, 
 ID#0] Beginning stream session with /10.66.187.201
 INFO  [STREAM-IN-/10.66.187.201] 2015-01-28 02:07:29,465 
 StreamResultFuture.java:166 - [Stream #692c6270-a692-11e4-9973-070e938df227 
 ID#0] Prepare completed. Receiving 5 files(627994 bytes), sending 5 
 files(632105 bytes)
 INFO  [StreamReceiveTask:22] 2015-01-28 02:07:31,971 
 StreamResultFuture.java:180 - [Stream #692c6270-a692-11e4-9973-070e938df227] 
 Session with /10.66.187.201 is complete
 INFO  [StreamReceiveTask:22] 2015-01-28 02:07:31,972 
 StreamResultFuture.java:212 - [Stream #692c6270-a692-11e4-9973-070e938df227] 
 All sessions completed
 INFO  [StreamReceiveTask:22] 2015-01-28 02:07:31,972 
 StreamingRepairTask.java:96 - [repair #685e3d00-a692-11e4-9973-070e938df227] 
 streaming task succeed, returning response to /10.98.194.68
 ERROR [RepairJobTask:1] 2015-01-28 02:07:39,444 RepairJob.java:127 - Error 
 occurred during snapshot phase
 java.lang.RuntimeException: Could not create snapshot at /10.97.9.110
 at 
 org.apache.cassandra.repair.SnapshotTask$SnapshotCallback.onFailure(SnapshotTask.java:77)
  ~[apache-cassandra-2.1.2.jar:2.1.2]
 at 
 org.apache.cassandra.net.MessagingService$5$1.run(MessagingService.java:347) 
 ~[apache-cassandra-2.1.2.jar:2.1.2]
 at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
 ~[na:1.7.0_45]
 at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
 ~[na:1.7.0_45]
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  [na:1.7.0_45]
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  [na:1.7.0_45]
 at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
 INFO  [AntiEntropySessions:6] 2015-01-28 02:07:39,445 RepairSession.java:260 
 - [repair #6f85e740-a692-11e4-9973-070e938df227] new session: will sync 
 /10.98.194.68, /10.66.187.201, /10.226.218.135 on range 
 (12817179804668051873746972069086
 2638799,12863540308359254031520865977436165] for events.[bigint0text, 
 bigint0boolean, bigint0int, dataset_catalog, column_categories, 
 bigint0double, bigint0bigint]
 ERROR [AntiEntropySessions:5] 2015-01-28 02:07:39,445 RepairSession.java:303 
 - [repair #685e3d00-a692-11e4-9973-070e938df227] session completed with the 
 following error
 java.io.IOException: Failed during snapshot creation.
 at 
 org.apache.cassandra.repair.RepairSession.failedSnapshot(RepairSession.java:344)
  ~[apache-cassandra-2.1.2.jar:2.1.2]
 at 
 org.apache.cassandra.repair.RepairJob$2.onFailure(RepairJob.java:128) 
 

[jira] [Comment Edited] (CASSANDRA-8700) replace the wiki with docs in the git repo

2015-01-28 Thread Jon Haddad (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14296060#comment-14296060
 ] 

Jon Haddad edited comment on CASSANDRA-8700 at 1/28/15 11:37 PM:
-

{quote}
It still puts the onus on the comitters' shoulders, though.
{quote}

Your point is valid, having the committers bottlenecked on docs might be 
problematic.  I know you guys have a lot on your plate already, it may be 
asking too much for docs merges as well.  On the other hand, considering though 
the frequency of edits (even if the current rate was tripled) it would only be 
a handful a week.  If it actually managed got out of control I feel like 
someone would have to step up as the docs maintainer.  

{quote}
I feel you there, but that's an infra problem. If it worked in a sane amount of 
time would you feel differently? We could ping infra to see what's up here.
{quote}

I think that would be a massive step forward, and probably the correct initial 
one.  If that's possible, I think the pragmatic approach would be to:

a) improve the wiki performance (couple seconds to save is fine)
b) reevaluate wiki usage in a few months to see if it's improved usage.  


was (Author: rustyrazorblade):
{quote}
It still puts the onus on the comitters' shoulders, though.
{quote}

Your point is valid, having the committers bottlenecked on docs might be 
problematic.  I know you guys have a lot on your plate already, it may be 
asking too much for docs merges as well.  Considering though the frequency of 
edits (even if the current rate was tripled) it would only be a handful a week. 
 If it actually got out of control I feel like someone would have to step up as 
the docs maintainer.

{quote}
I feel you there, but that's an infra problem. If it worked in a sane amount of 
time would you feel differently? We could ping infra to see what's up here.
{quote}

I think that would be a massive step forward, and probably the correct initial 
one.  If that's possible, I think the pragmatic approach would be to:

a) improve the wiki performance (couple seconds to save is fine)
b) reevaluate wiki usage in a few months to see if it's improved usage.  

 replace the wiki with docs in the git repo
 --

 Key: CASSANDRA-8700
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8700
 Project: Cassandra
  Issue Type: Improvement
  Components: Documentation  website
Reporter: Jon Haddad
Priority: Minor

 The wiki as it stands is pretty terrible.  It takes several minutes to apply 
 a single update, and as a result, it's almost never updated.  The information 
 there has very little context as to what version it applies to.  Most people 
 I've talked to that try to use the information they find there find it is 
 more confusing than helpful.
 I'd like to propose that instead of using the wiki, the doc directory in the 
 cassandra repo be used for docs (already used for CQL3 spec) in a format that 
 can be built to a variety of output formats like HTML / epub / etc.  I won't 
 start the bikeshedding on which markup format is preferable - but there are 
 several options that can work perfectly fine.  I've personally use sphinx w/ 
 restructured text, and markdown.  Both can build easily and as an added bonus 
 be pushed to readthedocs (or something similar) automatically.  For an 
 example, see cqlengine's documentation, which I think is already 
 significantly better than the wiki: 
 http://cqlengine.readthedocs.org/en/latest/
 In addition to being overall easier to maintain, putting the documentation in 
 the git repo adds context, since it evolves with the versions of Cassandra.
 If the wiki were kept even remotely up to date, I wouldn't bother with this, 
 but not having at least some basic documentation in the repo, or anywhere 
 associated with the project, is frustrating.
 For reference, the last 3 updates were:
 1/15/15 - updating committers list
 1/08/15 - updating contributers and how to contribute
 12/16/14 - added a link to CQL docs from wiki frontpage (by me)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8700) replace the wiki with docs in the git repo

2015-01-28 Thread Jon Haddad (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14296060#comment-14296060
 ] 

Jon Haddad commented on CASSANDRA-8700:
---

{quote}
It still puts the onus on the comitters' shoulders, though.
{quote}

Your point is valid, having the committers bottlenecked on docs might be 
problematic.  I know you guys have a lot on your plate already, it may be 
asking too much for docs merges as well.  Considering though the frequency of 
edits (even if the current rate was tripled) it would only be a handful a week. 
 If it actually got out of control I feel like someone would have to step up as 
the docs maintainer.

{quote}
I feel you there, but that's an infra problem. If it worked in a sane amount of 
time would you feel differently? We could ping infra to see what's up here.
{quote}

I think that would be a massive step forward, and probably the correct initial 
one.  If that's possible, I think the pragmatic approach would be to:

a) improve the wiki performance (couple seconds to save is fine)
b) reevaluate wiki usage in a few months to see if it's improved usage.  

 replace the wiki with docs in the git repo
 --

 Key: CASSANDRA-8700
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8700
 Project: Cassandra
  Issue Type: Improvement
  Components: Documentation  website
Reporter: Jon Haddad
Priority: Minor

 The wiki as it stands is pretty terrible.  It takes several minutes to apply 
 a single update, and as a result, it's almost never updated.  The information 
 there has very little context as to what version it applies to.  Most people 
 I've talked to that try to use the information they find there find it is 
 more confusing than helpful.
 I'd like to propose that instead of using the wiki, the doc directory in the 
 cassandra repo be used for docs (already used for CQL3 spec) in a format that 
 can be built to a variety of output formats like HTML / epub / etc.  I won't 
 start the bikeshedding on which markup format is preferable - but there are 
 several options that can work perfectly fine.  I've personally use sphinx w/ 
 restructured text, and markdown.  Both can build easily and as an added bonus 
 be pushed to readthedocs (or something similar) automatically.  For an 
 example, see cqlengine's documentation, which I think is already 
 significantly better than the wiki: 
 http://cqlengine.readthedocs.org/en/latest/
 In addition to being overall easier to maintain, putting the documentation in 
 the git repo adds context, since it evolves with the versions of Cassandra.
 If the wiki were kept even remotely up to date, I wouldn't bother with this, 
 but not having at least some basic documentation in the repo, or anywhere 
 associated with the project, is frustrating.
 For reference, the last 3 updates were:
 1/15/15 - updating committers list
 1/08/15 - updating contributers and how to contribute
 12/16/14 - added a link to CQL docs from wiki frontpage (by me)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8358) Bundled tools shouldn't be using Thrift API

2015-01-28 Thread Philip Thompson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14296200#comment-14296200
 ] 

Philip Thompson commented on CASSANDRA-8358:


Here is my current branch: https://github.com/ptnapoleon/cassandra/compare/8358
Sorry about the WIP pushed changes to BulkLoader, ignore those for now. I have 
recently received a JAR of the a tentative 2.1.5 of the driver containing 
JAVA-312, so I can finish work on this now.

I was having an issue where the Thread calling the java driver's connect() was 
being interrupted, which was causing the connect() to fail. Currently I check 
for Thread.interrupted() and retry if that is the reason for the failure. I am 
not sure how to prevent the interruption in the first place.

Currently when running pig-test, only one test that uses CqlNativeStorage is 
failing, and that is testCqlNativeStorageCollectionColumnTable. 
This is due to the following problem:
{code}
java.lang.IllegalArgumentException
at java.nio.Buffer.limit(Buffer.java:267)
at 
org.apache.cassandra.utils.ByteBufferUtil.readBytes(ByteBufferUtil.java:552)
at 
org.apache.cassandra.utils.ByteBufferUtil.readBytesWithShortLength(ByteBufferUtil.java:561)
at 
org.apache.cassandra.serializers.CollectionSerializer.readValue(CollectionSerializer.java:118)
at 
org.apache.cassandra.serializers.MapSerializer.deserializeForNativeProtocol(MapSerializer.java:100)
at org.apache.cassandra.cql3.Maps$Value.fromSerialized(Maps.java:164)
at org.apache.cassandra.cql3.Maps$Marker.bind(Maps.java:273)
at org.apache.cassandra.cql3.Maps$Marker.bind(Maps.java:262)
at org.apache.cassandra.cql3.Maps$Putter.doPut(Maps.java:355)
at org.apache.cassandra.cql3.Maps$Setter.execute(Maps.java:292)
at 
org.apache.cassandra.cql3.statements.UpdateStatement.addUpdateForKey(UpdateStatement.java:98)
at 
org.apache.cassandra.cql3.statements.ModificationStatement.getMutations(ModificationStatement.java:655)
at 
org.apache.cassandra.cql3.statements.ModificationStatement.executeWithoutCondition(ModificationStatement.java:487)
at 
org.apache.cassandra.cql3.statements.ModificationStatement.execute(ModificationStatement.java:473)
at 
org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:233)
at 
org.apache.cassandra.cql3.QueryProcessor.processPrepared(QueryProcessor.java:443)
at 
org.apache.cassandra.transport.messages.ExecuteMessage.execute(ExecuteMessage.java:134)
at 
org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:439)
at 
org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:335)
at 
io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
at 
io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32)
at 
io.netty.channel.AbstractChannelHandlerContext$8.run(AbstractChannelHandlerContext.java:324)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at 
org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:164)
at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105)
at java.lang.Thread.run(Thread.java:745)
{code}
This is erroring because in CollectionSerializer.readValue
{code}
public static ByteBuffer readValue(ByteBuffer input, int version)
{
if (version = Server.VERSION_3)
{
int size = input.getInt();
if (size  0)
return null;

return ByteBufferUtil.readBytes(input, size);
}
else
{
return ByteBufferUtil.readBytesWithShortLength(input);
}
}
{code}
The value of size from input.getInt() is an integer in the millions for one of 
the map values. I am still figuring out what is differing from cassandra-2.1 
where the test is passing without my changes, but the ByteBuffer itself doesn't 
appear to be different.

In  CqlConfigHelper, should I be creating an OUTPUT_* property for each INPUT_* 
property?

PigTestBase should be switched over to using the java driver, but I would 
rather handle that in a separate ticket.
AbstractCassandraStorage may be deprecated for 3.0, but it is not working at 
all with the current schema parsing queries. That also belongs in a separate 
ticket.

 Bundled tools shouldn't be using Thrift API
 ---

 Key: CASSANDRA-8358
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8358
 Project: Cassandra
  Issue Type: Improvement
  

[jira] [Commented] (CASSANDRA-8700) replace the wiki with docs in the git repo

2015-01-28 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14296038#comment-14296038
 ] 

Brandon Williams commented on CASSANDRA-8700:
-

bq. Well, not really. Anyone can submit a JIRA w/ a doc update.

It still puts the onus on the comitters' shoulders, though.

bq. It's such a nightmare to save a change (5 minutes last time I tried) that I 
just never do it.

I feel you there, but that's an infra problem.  If it worked in a sane amount 
of time would you feel differently?  We could ping infra to see what's up here.

 replace the wiki with docs in the git repo
 --

 Key: CASSANDRA-8700
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8700
 Project: Cassandra
  Issue Type: Improvement
  Components: Documentation  website
Reporter: Jon Haddad
Priority: Minor

 The wiki as it stands is pretty terrible.  It takes several minutes to apply 
 a single update, and as a result, it's almost never updated.  The information 
 there has very little context as to what version it applies to.  Most people 
 I've talked to that try to use the information they find there find it is 
 more confusing than helpful.
 I'd like to propose that instead of using the wiki, the doc directory in the 
 cassandra repo be used for docs (already used for CQL3 spec) in a format that 
 can be built to a variety of output formats like HTML / epub / etc.  I won't 
 start the bikeshedding on which markup format is preferable - but there are 
 several options that can work perfectly fine.  I've personally use sphinx w/ 
 restructured text, and markdown.  Both can build easily and as an added bonus 
 be pushed to readthedocs (or something similar) automatically.  For an 
 example, see cqlengine's documentation, which I think is already 
 significantly better than the wiki: 
 http://cqlengine.readthedocs.org/en/latest/
 In addition to being overall easier to maintain, putting the documentation in 
 the git repo adds context, since it evolves with the versions of Cassandra.
 If the wiki were kept even remotely up to date, I wouldn't bother with this, 
 but not having at least some basic documentation in the repo, or anywhere 
 associated with the project, is frustrating.
 For reference, the last 3 updates were:
 1/15/15 - updating committers list
 1/08/15 - updating contributers and how to contribute
 12/16/14 - added a link to CQL docs from wiki frontpage (by me)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8072) Exception during startup: Unable to gossip with any seeds

2015-01-28 Thread Russ Hatch (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14296070#comment-14296070
 ] 

Russ Hatch commented on CASSANDRA-8072:
---

A few more notes here. I noticed testing today that running decommission on the 
non-seed node actually seems to properly close one connection (it waits for a 
few seconds after decommission is complete and disappears from the netstat 
output on the seed), but that another connection springs up in it's place. It's 
this connection established *after* decommission which seems to be lingering 
when the peer disappers, going into CLOSE_WAIT when the process is stopped. I 
did some testing with tcpkill to forcefully close this connection (which is a 
little tricky because it needs traffic flowing to work), and was able to 
confirm that when this connection is no longer open, a node can start without 
triggering the 'unable to gossip' exception.



 Exception during startup: Unable to gossip with any seeds
 -

 Key: CASSANDRA-8072
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8072
 Project: Cassandra
  Issue Type: Bug
Reporter: Ryan Springer
Assignee: Brandon Williams
 Attachments: casandra-system-log-with-assert-patch.log


 When Opscenter 4.1.4 or 5.0.1 tries to provision a 2-node DSC 2.0.10 cluster 
 in either ec2 or locally, an error occurs sometimes with one of the nodes 
 refusing to start C*.  The error in the /var/log/cassandra/system.log is:
 ERROR [main] 2014-10-06 15:54:52,292 CassandraDaemon.java (line 513) 
 Exception encountered during startup
 java.lang.RuntimeException: Unable to gossip with any seeds
 at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1200)
 at 
 org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:444)
 at 
 org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:655)
 at 
 org.apache.cassandra.service.StorageService.initServer(StorageService.java:609)
 at 
 org.apache.cassandra.service.StorageService.initServer(StorageService.java:502)
 at 
 org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:378)
 at 
 org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:496)
 at 
 org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:585)
  INFO [StorageServiceShutdownHook] 2014-10-06 15:54:52,326 Gossiper.java 
 (line 1279) Announcing shutdown
  INFO [StorageServiceShutdownHook] 2014-10-06 15:54:54,326 
 MessagingService.java (line 701) Waiting for messaging service to quiesce
  INFO [ACCEPT-localhost/127.0.0.1] 2014-10-06 15:54:54,327 
 MessagingService.java (line 941) MessagingService has terminated the accept() 
 thread
 This errors does not always occur when provisioning a 2-node cluster, but 
 probably around half of the time on only one of the nodes.  I haven't been 
 able to reproduce this error with DSC 2.0.9, and there have been no code or 
 definition file changes in Opscenter.
 I can reproduce locally with the above steps.  I'm happy to test any proposed 
 fixes since I'm the only person able to reproduce reliably so far.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8072) Exception during startup: Unable to gossip with any seeds

2015-01-28 Thread Russ Hatch (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14296075#comment-14296075
 ] 

Russ Hatch commented on CASSANDRA-8072:
---

One correction here, the FIN_WAIT2 seems like it's actually lasting about one 
minute, so I think it's being removed when tcp_fin_timeout expires.

 Exception during startup: Unable to gossip with any seeds
 -

 Key: CASSANDRA-8072
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8072
 Project: Cassandra
  Issue Type: Bug
Reporter: Ryan Springer
Assignee: Brandon Williams
 Attachments: casandra-system-log-with-assert-patch.log


 When Opscenter 4.1.4 or 5.0.1 tries to provision a 2-node DSC 2.0.10 cluster 
 in either ec2 or locally, an error occurs sometimes with one of the nodes 
 refusing to start C*.  The error in the /var/log/cassandra/system.log is:
 ERROR [main] 2014-10-06 15:54:52,292 CassandraDaemon.java (line 513) 
 Exception encountered during startup
 java.lang.RuntimeException: Unable to gossip with any seeds
 at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1200)
 at 
 org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:444)
 at 
 org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:655)
 at 
 org.apache.cassandra.service.StorageService.initServer(StorageService.java:609)
 at 
 org.apache.cassandra.service.StorageService.initServer(StorageService.java:502)
 at 
 org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:378)
 at 
 org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:496)
 at 
 org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:585)
  INFO [StorageServiceShutdownHook] 2014-10-06 15:54:52,326 Gossiper.java 
 (line 1279) Announcing shutdown
  INFO [StorageServiceShutdownHook] 2014-10-06 15:54:54,326 
 MessagingService.java (line 701) Waiting for messaging service to quiesce
  INFO [ACCEPT-localhost/127.0.0.1] 2014-10-06 15:54:54,327 
 MessagingService.java (line 941) MessagingService has terminated the accept() 
 thread
 This errors does not always occur when provisioning a 2-node cluster, but 
 probably around half of the time on only one of the nodes.  I haven't been 
 able to reproduce this error with DSC 2.0.9, and there have been no code or 
 definition file changes in Opscenter.
 I can reproduce locally with the above steps.  I'm happy to test any proposed 
 fixes since I'm the only person able to reproduce reliably so far.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8268) Token serialization should not assume all tokens are created by the database partitioner

2015-01-28 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14296093#comment-14296093
 ] 

Aleksey Yeschenko commented on CASSANDRA-8268:
--

Code LGTM as is, but I'd prefer to rename two methods if you don't mind:

1. Make MS#serializationPartitioner() into MS#clusterPartitioner() or 
MS#globalPartitioner()
2. Make MS#verifyPartitioner() into MS#validatePartitioner(), and have it throw 
an AE (or a RTE) right there, vs. returning a boolean and have its callers to 
assert.

 Token serialization should not assume all tokens are created by the database 
 partitioner
 

 Key: CASSANDRA-8268
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8268
 Project: Cassandra
  Issue Type: Bug
Reporter: Branimir Lambov
Assignee: Branimir Lambov
Priority: Minor
 Fix For: 3.0

 Attachments: 8268.patch


 This is also a hidden reference to StorageService.getPartitioner within 
 Token, but this needs to be handled more carefully as we need to check 
 whether tokens serialized with the wrong partitioner could be present in user 
 data.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


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

2015-01-28 Thread benedict
Merge branch 'cassandra-2.1' into trunk

Conflicts:
src/java/org/apache/cassandra/db/compaction/CompactionManager.java
src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
src/java/org/apache/cassandra/service/ActiveRepairService.java
src/java/org/apache/cassandra/streaming/StreamSession.java
src/java/org/apache/cassandra/streaming/StreamTransferTask.java

src/java/org/apache/cassandra/streaming/messages/OutgoingFileMessage.java
test/unit/org/apache/cassandra/SchemaLoader.java
test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java

test/unit/org/apache/cassandra/db/compaction/BlacklistingCompactionsTest.java
test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java


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

Branch: refs/heads/trunk
Commit: 9c4a776d207739f918cba93cc40d2029ae5c05f0
Parents: b4b1bdd c75ee41
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 15:19:58 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 15:19:58 2015 +

--
 CHANGES.txt |   1 +
 build.xml   |   1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  | 143 +++---
 .../org/apache/cassandra/db/DataTracker.java|   6 +-
 .../compaction/AbstractCompactionStrategy.java  |   2 +-
 .../db/compaction/CompactionController.java |  20 +-
 .../db/compaction/CompactionManager.java|  24 +-
 .../cassandra/db/compaction/CompactionTask.java |   9 +-
 .../cassandra/db/index/SecondaryIndex.java  |  10 +-
 .../apache/cassandra/io/sstable/SSTable.java|   1 +
 .../cassandra/io/sstable/SSTableLoader.java |  14 +-
 .../cassandra/io/sstable/SSTableRewriter.java   |  15 +-
 .../io/sstable/format/SSTableReader.java| 441 +--
 .../io/sstable/format/big/BigTableWriter.java   |   4 +-
 .../cassandra/service/ActiveRepairService.java  |  26 +-
 .../cassandra/streaming/StreamReceiveTask.java  |  10 +-
 .../cassandra/streaming/StreamSession.java  |  28 +-
 .../cassandra/streaming/StreamTransferTask.java |  10 +-
 .../streaming/messages/OutgoingFileMessage.java |  10 +-
 .../cassandra/tools/StandaloneScrubber.java |   2 +-
 .../apache/cassandra/utils/concurrent/Ref.java  | 134 ++
 .../cassandra/utils/concurrent/RefCounted.java  |  94 
 .../utils/concurrent/RefCountedImpl.java| 132 ++
 .../apache/cassandra/utils/concurrent/Refs.java | 219 +
 .../unit/org/apache/cassandra/SchemaLoader.java |  11 +
 .../org/apache/cassandra/db/KeyCacheTest.java   |   9 +-
 .../db/compaction/AntiCompactionTest.java   |  26 +-
 .../compaction/BlacklistingCompactionsTest.java |  11 +
 .../cassandra/io/sstable/LegacySSTableTest.java |   2 +-
 .../io/sstable/SSTableRewriterTest.java |   6 +-
 .../streaming/StreamTransferTaskTest.java   |   2 +-
 .../streaming/StreamingTransferTest.java|  18 +-
 .../utils/concurrent/RefCountedTest.java|  85 
 33 files changed, 1100 insertions(+), 426 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9c4a776d/CHANGES.txt
--
diff --cc CHANGES.txt
index 432ebcc8,d142a68..53a2c63
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,64 -1,10 +1,65 @@@
 +3.0
 + * rpc_interface and listen_interface generate NPE on startup when specified 
interface doesn't exist (CASSANDRA-8677)
 + * Fix ArrayIndexOutOfBoundsException in nodetool cfhistograms 
(CASSANDRA-8514)
 + * Serializing Row cache alternative, fully off heap (CASSANDRA-7438)
 + * Duplicate rows returned when in clause has repeated values (CASSANDRA-6707)
 + * Make CassandraException unchecked, extend RuntimeException (CASSANDRA-8560)
 + * Support direct buffer decompression for reads (CASSANDRA-8464)
 + * DirectByteBuffer compatible LZ4 methods (CASSANDRA-7039)
 + * Add role based access control (CASSANDRA-7653)
 + * Group sstables for anticompaction correctly (CASSANDRA-8578)
 + * Add ReadFailureException to native protocol, respond
 +   immediately when replicas encounter errors while handling
 +   a read request (CASSANDRA-7886)
 + * Switch CommitLogSegment from RandomAccessFile to nio (CASSANDRA-8308)
 + * Allow mixing token and partition key restrictions (CASSANDRA-7016)
 + * Support index key/value entries on map collections (CASSANDRA-8473)
 + * Modernize schema tables (CASSANDRA-8261)
 + * Support for user-defined aggregation functions (CASSANDRA-8053)
 + * Fix NPE in SelectStatement with empty IN 

[jira] [Commented] (CASSANDRA-7705) Safer Resource Management

2015-01-28 Thread Benedict (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295266#comment-14295266
 ] 

Benedict commented on CASSANDRA-7705:
-

bq. (though they aren't actually anything to do with these commits AFAICT)

My git-foo was weak, this clearly was my mistake.

Committed, thanks!

Also, looking closely at the code I agree with your concern about sharedRef, 
but think the whole of StreamingTransfer should have a bit of an overhaul of 
its own, to ensure absolute safety including in the face of error. I had a bit 
of a go at this, but decided it was a bit meaty for an addendum to this ticket. 
So I've filed CASSANDRA-8698

 Safer Resource Management
 -

 Key: CASSANDRA-7705
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7705
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Benedict
 Fix For: 3.0


 We've had a spate of bugs recently with bad reference counting. these can 
 have potentially dire consequences, generally either randomly deleting data 
 or giving us infinite loops. 
 Since in 2.1 we only reference count resources that are relatively expensive 
 and infrequently managed (or in places where this safety is probably not as 
 necessary, e.g. SerializingCache), we could without any negative consequences 
 (and only slight code complexity) introduce a safer resource management 
 scheme for these more expensive/infrequent actions.
 Basically, I propose when we want to acquire a resource we allocate an object 
 that manages the reference. This can only be released once; if it is released 
 twice, we fail immediately at the second release, reporting where the bug is 
 (rather than letting it continue fine until the next correct release corrupts 
 the count). The reference counter remains the same, but we obtain guarantees 
 that the reference count itself is never badly maintained, although code 
 using it could mistakenly release its own handle early (typically this is 
 only an issue when cleaning up after a failure, in which case under the new 
 scheme this would be an innocuous error)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8695) thrift column definition list sometimes immutable

2015-01-28 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-8695:
-
Assignee: Chris Lockfort

 thrift column definition list sometimes immutable
 -

 Key: CASSANDRA-8695
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8695
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Chris Lockfort
Assignee: Chris Lockfort
 Fix For: 2.1.3

 Attachments: cassandra-2.1.2-8695.patch


 When the input cf_def.column_metadata is null, ColumnDefinition.fromThrift 
 can return Collections.emptyList() (which is defined to be an immutable list) 
 One caller, CFMetaData.internalFromThrift , incorrectly assumes that this 
 list will always be mutable and tries to add to this immutable list, which 
 causes the Cassandra server to throw an exception.
 It looks like this is a bug in 2.1, but not in trunk.
 I can include my one-liner patch, but I'm not sure whether it is better to 
 fix the caller (to not assume random lists you get back from a method are 
 mutable) or the callee (to always return a mutable list).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (CASSANDRA-8698) Refactor reference use in StreamTransferTask et al. to make safety obvious

2015-01-28 Thread Benedict (JIRA)

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

Benedict reassigned CASSANDRA-8698:
---

Assignee: Benedict

 Refactor reference use in StreamTransferTask et al. to make safety obvious
 --

 Key: CASSANDRA-8698
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8698
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Benedict
Priority: Minor
  Labels: Correctness
 Fix For: 3.0


 Follow up to Safer Resource Management (CASSANDRA-7705). Since here we don't 
 encapsulate our ref use in a try-with-resources block, we do some manual 
 munging to try to ensure we don't drop any references. We can do better, and 
 make this part of the functionality offered by Refs. At the same time, we 
 should assess the way references are obtained in SSTableLoader.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8542) Make get_range_slices and related succeed most of the time on tombstone heavy column families

2015-01-28 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295289#comment-14295289
 ] 

Aleksey Yeschenko commented on CASSANDRA-8542:
--

It's 3.1 territory, at best, if we ever decided to do this, so no, not yet.

 Make get_range_slices and related succeed most of the time on tombstone heavy 
 column families
 -

 Key: CASSANDRA-8542
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8542
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Shawn Walker
Priority: Minor
 Attachments: trunk-8542-InvertibleBloomReconciler.txt


 I've got a ColumnFamily in which some rows end up being used in a queue-like 
 fashion, and where many tombstones tend to pile up at the left end of the 
 row.  As a result, I run into {{TombstoneOverwhelming}} (e.g. CASSANDRA-6117) 
 when trying to list the columns of said rows.
 Please don't yell at me too loudly. I know the issue I'm describing will 
 generally be considered as being due to poor use of Cassandra.  I understand 
 the rationale of the current behavior, and am hesitant to play with fire by 
 increasing {{tombstone_fail_threshold}} to a high value.  Instead, what I 
 propose is an alternate method of resolving such queries on the read path.
 
 This is based on the following observation: on the coordinator node, when 
 {{RangeSliceResponseResolver}} is resolving a range slice query, it needn't 
 be aware of all tombstones that all responding nodes have within the 
 specified range.  Instead, it would suffice if it could determine only those 
 tombstones which aren't shared by all responding nodes. E.g. if node #1 
 responds with tombstones (A, B, D), node #2 responds with tombstones (A, B, 
 C), and node #3 responds with tombstones (A, B, C, D), 
 {{RangeSliceResponseResolver}} need only actually know about the tombstones 
 (C, D): All of the responders will already have removed any relevant data for 
 the tombstones (A, B) from their individual responses.
 Arranging for {{RangeSliceResponseResolver}} to discover only the non-common 
 tombstones can be accomplished by using a variant of the invertible bloom 
 filter data structure described in e.g. 
 http://conferences.sigcomm.org/sigcomm/2011/papers/sigcomm/p218.pdf.  Using 
 an invertible Bloom filter, each responding node can build a (roughly) fixed 
 size data structure holding a representation of all the tombstones that node 
 encounters.  The coordinator node can then combine the invertible Bloom 
 filters.  If there aren't too many non-common tombstones, the coordinator 
 node will be able to enumerate all of them, and so resolve the range slice 
 query.
 I see accomplishing this in a few discrete steps:
 1. Implement an appropriate variant of the invertible bloom filter.  I've 
 started this already, and will shortly upload a patch including my 
 {{InvertibleBloomReconciler}} implementation.  From a black box perspective, 
 {{InvertibleBloomReconcilerTest.verifyFiveWayReconciliation()}} demonstrates 
 how this data structure and algorithm could be used.
 2. (db layer) Wrap {{InvertibleBloomReconciler}} into 
 {{TombstoneReconciler}}, a structure for spilling tombstones into.  Refactor 
 large swaths of {{org.apache.cassandra.db}}'s read path to accomodate the 
 possibility of placing tombstones discovered during a read into a 
 {{TombstoneReconciler}} instead of returning them within a {{Row}}, 
 {{ListRow}}, {{ColumnFamily}}, etc.  I've attempted a start on this, though 
 this means carrying the {{TombstoneReconciler}} around through most of 
 {{ColumnFamilyStore}}, practically all of {{org.apache.db.filter}}, and other 
 places I haven't yet discovered.  I'm wondering if I wouldn't be better off 
 waiting for CASSANDRA-8099 before starting this step -- a fully iterator flow 
 through {{org.apache.cassandra.db}} could make this easier, cleaner, and have 
 significantly lower code impact.
 3. (dynamo layer) Arrange for {{RangeSliceCommand}} to include parameters 
 for the IBR (table size, hash count, seed), possibly by making these part of 
 {{CFMetaData}}.  Allow a {{RangeSliceResponse}} to optionally return a 
 {{TombstoneReconciler}} in addition to its {{ListRow}}.  Refactor 
 {{RangeSliceResponseResolver}} to be capable of handling 
 {{TombstoneReconciler}} s.  Possibly refactor 
 {{StorageProxy.getRangeSlices(...)}} to disable read repair if any responses 
 contained a {{TombstoneReconciler}}.
 Since the invertible bloom filter is a probabilistic data structure, it is 
 possible that resolving a query in this manner could fail.  As such, I'm 
 proposing that the current read path not make use of the 
 {{TombstoneReconciler}} idea unless it would otherwise 

[1/2] cassandra git commit: Fix schema from Thrift conversion with empty metadata

2015-01-28 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/trunk 9c4a776d2 - bbb1592e8


Fix schema from Thrift conversion with empty metadata

patch by Chris Lockfort; reviewed by Aleksey Yeschenko for
CASSANDRA-8695


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

Branch: refs/heads/trunk
Commit: b788bb37121abbc6cc73b93aea98915613744889
Parents: c75ee41
Author: Chris Lockfort clockf...@palantir.com
Authored: Tue Jan 27 16:43:18 2015 -0800
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Wed Jan 28 18:39:03 2015 +0300

--
 CHANGES.txt| 4 +++-
 src/java/org/apache/cassandra/config/ColumnDefinition.java | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b788bb37/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index d142a68..b976a16 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,8 +1,10 @@
 2.1.3
+ * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
  * Safer Resource Management (CASSANDRA-7705)
  * Make sure we compact highly overlapping cold sstables with
STCS (CASSANDRA-8635)
- * rpc_interface and listen_interface generate NPE on startup when specified 
interface doesn't exist (CASSANDRA-8677)
+ * rpc_interface and listen_interface generate NPE on startup when specified
+   interface doesn't exist (CASSANDRA-8677)
  * Fix ArrayIndexOutOfBoundsException in nodetool cfhistograms (CASSANDRA-8514)
  * Switch from yammer metrics for nodetool cf/proxy histograms (CASSANDRA-8662)
  * Make sure we don't add tmplink files to the compaction

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b788bb37/src/java/org/apache/cassandra/config/ColumnDefinition.java
--
diff --git a/src/java/org/apache/cassandra/config/ColumnDefinition.java 
b/src/java/org/apache/cassandra/config/ColumnDefinition.java
index ff66162..d6cc94c 100644
--- a/src/java/org/apache/cassandra/config/ColumnDefinition.java
+++ b/src/java/org/apache/cassandra/config/ColumnDefinition.java
@@ -298,7 +298,7 @@ public class ColumnDefinition extends ColumnSpecification
 public static ListColumnDefinition fromThrift(String ksName, String 
cfName, AbstractType? thriftComparator, AbstractType? thriftSubcomparator, 
ListColumnDef thriftDefs) throws SyntaxException, ConfigurationException
 {
 if (thriftDefs == null)
-return Collections.emptyList();
+return new ArrayList();
 
 ListColumnDefinition defs = new ArrayList(thriftDefs.size());
 for (ColumnDef thriftColumnDef : thriftDefs)



[jira] [Assigned] (CASSANDRA-8600) Refactor stress options to reduce prominence of legacy modes (counter_read, etc.)

2015-01-28 Thread Benedict (JIRA)

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

Benedict reassigned CASSANDRA-8600:
---

Assignee: Benedict

 Refactor stress options to reduce prominence of legacy modes (counter_read, 
 etc.)
 -

 Key: CASSANDRA-8600
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8600
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Benedict
Assignee: Benedict
Priority: Minor

 There;s an asymmetry to how we treat these, with all four legacy commands 
 (read, write, counter_read, counter_write) getting their own full-blown 
 command, whereas the user command is comparatively almost hidden.  There 
 are also two option sets that apply only to the legacy commands (schema and 
 cols) which isn't at all apparent.
 We should clean this up, by e.g. renaming user to profile or something 
 more obvious, and dropping the four old commands and renaming mixed to 
 simple  - this would give simple a similar spec style to profile. We 
 should then make it clear that cols and schema only apply to the simple 
 mode, and should fail if they are supplied otherwise.
 We can of course continue to accept all of the old ways of specifying 
 commands if we want, and just not print them out in the help.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (CASSANDRA-8659) cassandra-stress should report latencies for each kind of operation independently

2015-01-28 Thread Benedict (JIRA)

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

Benedict reassigned CASSANDRA-8659:
---

Assignee: Benedict

 cassandra-stress should report latencies for each kind of operation 
 independently
 -

 Key: CASSANDRA-8659
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8659
 Project: Cassandra
  Issue Type: Improvement
Reporter: Benedict
Assignee: Benedict
Priority: Minor

 What it says on the tin. i.e. reads and writes should be reported as 
 different line items.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (CASSANDRA-8690) Ensure all error handling code that may itself throw an exception utilises addSuppressed

2015-01-28 Thread Benedict (JIRA)

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

Benedict reassigned CASSANDRA-8690:
---

Assignee: Benedict

 Ensure all error handling code that may itself throw an exception utilises 
 addSuppressed
 

 Key: CASSANDRA-8690
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8690
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Benedict
Priority: Minor
 Fix For: 2.1.3






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (CASSANDRA-8658) cassandra-stress should support distinct readers/writers for a mixed workload

2015-01-28 Thread Benedict (JIRA)

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

Benedict reassigned CASSANDRA-8658:
---

Assignee: Benedict

 cassandra-stress should support distinct readers/writers for a mixed workload
 -

 Key: CASSANDRA-8658
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8658
 Project: Cassandra
  Issue Type: Improvement
Reporter: Benedict
Assignee: Benedict
Priority: Minor

 By default all threads assume they interleave reads with writes, whereas many 
 workloads may be characterised by independent readers and writers. The 
 difference is that by interleaving, if we have hit e.g. disk constraints for 
 flush, write latencies may spike while read latencies are unaffected. By 
 interleaving operations on each actor, all actors will rapidly becomes 
 writers during such an event.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (CASSANDRA-8411) Cassandra stress tool fails with NotStrictlyPositiveException on example profiles

2015-01-28 Thread Benedict (JIRA)

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

Benedict reassigned CASSANDRA-8411:
---

Assignee: Benedict

 Cassandra stress tool fails with NotStrictlyPositiveException on example 
 profiles
 -

 Key: CASSANDRA-8411
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8411
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
 Environment: Linux Centos
Reporter: Igor Meltser
Assignee: Benedict
Priority: Trivial

 Trying to run stress tool with provided profile fails:
 dsc-cassandra-2.1.2/tools $ ./bin/cassandra-stress user n=1 
 profile=cqlstress-example.yaml ops\(insert=1\) -node 
 INFO  06:21:35 Using data-center name 'datacenter1' for 
 DCAwareRoundRobinPolicy (if this is incorrect, please provide the correct 
 datacenter name with DCAwareRoundRobinPolicy constructor)
 Connected to cluster: Benchmark Cluster
 INFO  06:21:35 New Cassandra host /:9042 added
 Datatacenter: datacenter1; Host: /.; Rack: rack1
 Datatacenter: datacenter1; Host: /; Rack: rack1
 Datatacenter: datacenter1; Host: /; Rack: rack1
 INFO  06:21:35 New Cassandra host /:9042 added
 INFO  06:21:35 New Cassandra host /:9042 added
 Created schema. Sleeping 3s for propagation.
 Exception in thread main 
 org.apache.commons.math3.exception.NotStrictlyPositiveException: standard 
 deviation (0)
 at 
 org.apache.commons.math3.distribution.NormalDistribution.init(NormalDistribution.java:108)
 at 
 org.apache.cassandra.stress.settings.OptionDistribution$GaussianFactory.get(OptionDistribution.java:418)
 at 
 org.apache.cassandra.stress.generate.SeedManager.init(SeedManager.java:59)
 at 
 org.apache.cassandra.stress.settings.SettingsCommandUser.getFactory(SettingsCommandUser.java:78)
 at org.apache.cassandra.stress.StressAction.run(StressAction.java:61)
 at org.apache.cassandra.stress.Stress.main(Stress.java:109)
 The tool is 2.1.2 version, but the tested Cassandra is 2.0.8 version



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8695) thrift column definition list sometimes immutable

2015-01-28 Thread Chris Lockfort (JIRA)

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

Chris Lockfort updated CASSANDRA-8695:
--
Attachment: cassandra-2.1.2-8695.patch

 thrift column definition list sometimes immutable
 -

 Key: CASSANDRA-8695
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8695
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Chris Lockfort
 Attachments: cassandra-2.1.2-8695.patch


 When the input cf_def.column_metadata is null, ColumnDefinition.fromThrift 
 can return Collections.emptyList() (which is defined to be an immutable list) 
 One caller, CFMetaData.internalFromThrift , incorrectly assumes that this 
 list will always be mutable and tries to add to this immutable list, which 
 causes the Cassandra server to throw an exception.
 It looks like this is a bug in 2.1, but not in trunk.
 I can include my one-liner patch, but I'm not sure whether it is better to 
 fix the caller (to not assume random lists you get back from a method are 
 mutable) or the callee (to always return a mutable list).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (CASSANDRA-8686) Introduce Latency Target for Stress

2015-01-28 Thread Benedict (JIRA)

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

Benedict reassigned CASSANDRA-8686:
---

Assignee: Benedict

 Introduce Latency Target for Stress
 ---

 Key: CASSANDRA-8686
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8686
 Project: Cassandra
  Issue Type: Improvement
Reporter: jonathan lacefield
Assignee: Benedict
Priority: Minor

 This item is a request to add a latency target to the rate option for the new 
 stress tool.  The goal of the latency target would be to provide a guideline 
 for SLAs to the stress tool so the stress tool can determine threads and 
 throughputs that can be sustained while meeting the SLA targets.
 For example:
 cassandra-stress [options/commands] -rate latency p90=5 p95=10 p99=100
 The outcome of this command would be a stress execution that would gradually 
 increase threads, and hence throughput (trans/sec), until the latency profile 
 can no longer be satisfied with the current workload (yaml file definition) 
 and/or cluster.  This would provide a ceiling for throughput and connections 
 for the given cluster, workload, and SLA profile.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7705) Safer Resource Management

2015-01-28 Thread Benedict (JIRA)

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

Benedict updated CASSANDRA-7705:

Fix Version/s: 2.1.3

 Safer Resource Management
 -

 Key: CASSANDRA-7705
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7705
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Benedict
 Fix For: 3.0, 2.1.3


 We've had a spate of bugs recently with bad reference counting. these can 
 have potentially dire consequences, generally either randomly deleting data 
 or giving us infinite loops. 
 Since in 2.1 we only reference count resources that are relatively expensive 
 and infrequently managed (or in places where this safety is probably not as 
 necessary, e.g. SerializingCache), we could without any negative consequences 
 (and only slight code complexity) introduce a safer resource management 
 scheme for these more expensive/infrequent actions.
 Basically, I propose when we want to acquire a resource we allocate an object 
 that manages the reference. This can only be released once; if it is released 
 twice, we fail immediately at the second release, reporting where the bug is 
 (rather than letting it continue fine until the next correct release corrupts 
 the count). The reference counter remains the same, but we obtain guarantees 
 that the reference count itself is never badly maintained, although code 
 using it could mistakenly release its own handle early (typically this is 
 only an issue when cleaning up after a failure, in which case under the new 
 scheme this would be an innocuous error)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[1/6] cassandra git commit: ninja remove MeteredFlusherTest

2015-01-28 Thread benedict
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 b077cda83 - d47d2b1e2
  refs/heads/cassandra-2.1 ffd0ae4bf - bda32583f
  refs/heads/trunk ca1b06500 - 4537b3277


ninja remove MeteredFlusherTest


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

Branch: refs/heads/cassandra-2.0
Commit: d47d2b1e2b66e239b8cf81e8c254dd3fbdf32052
Parents: b077cda
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:37:49 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:37:49 2015 +

--
 .../apache/cassandra/db/MeteredFlusherTest.java | 72 
 1 file changed, 72 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d47d2b1e/test/long/org/apache/cassandra/db/MeteredFlusherTest.java
--
diff --git a/test/long/org/apache/cassandra/db/MeteredFlusherTest.java 
b/test/long/org/apache/cassandra/db/MeteredFlusherTest.java
deleted file mode 100644
index 5e25744..000
--- a/test/long/org/apache/cassandra/db/MeteredFlusherTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.apache.cassandra.db;
-/*
- *
- * 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.
- *
- */
-
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-
-import org.junit.Test;
-
-import org.apache.cassandra.SchemaLoader;
-import org.apache.cassandra.config.CFMetaData;
-import org.apache.cassandra.exceptions.ConfigurationException;
-import org.apache.cassandra.db.marshal.UTF8Type;
-import org.apache.cassandra.service.MigrationManager;
-import org.apache.cassandra.utils.ByteBufferUtil;
-
-public class MeteredFlusherTest extends SchemaLoader
-{
-@Test
-public void testManyMemtables() throws IOException, ConfigurationException
-{
-Keyspace keyspace = Keyspace.open(Keyspace1);
-for (int i = 0; i  100; i++)
-{
-CFMetaData metadata = new CFMetaData(keyspace.getName(), _CF + 
i, ColumnFamilyType.Standard, UTF8Type.instance, null);
-MigrationManager.announceNewColumnFamily(metadata);
-}
-
-ByteBuffer name = ByteBufferUtil.bytes(c);
-for (int j = 0; j  200; j++)
-{
-for (int i = 0; i  100; i++)
-{
-RowMutation rm = new RowMutation(Keyspace1, 
ByteBufferUtil.bytes(key + j));
-ColumnFamily cf = 
TreeMapBackedSortedColumns.factory.create(Keyspace1, _CF + i);
-// don't cheat by allocating this outside of the loop; that 
defeats the purpose of deliberately using lots of memory
-ByteBuffer value = ByteBuffer.allocate(10);
-cf.addColumn(new Column(name, value));
-rm.add(cf);
-rm.applyUnsafe();
-}
-}
-
-int flushes = 0;
-for (ColumnFamilyStore cfs : ColumnFamilyStore.all())
-{
-if (cfs.name.startsWith(_CF))
-flushes += cfs.getMemtableSwitchCount();
-}
-assert flushes  0;
-}
-}
-



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

2015-01-28 Thread benedict
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/4537b327
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4537b327
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4537b327

Branch: refs/heads/trunk
Commit: 4537b32772ed1b5116214a23f7f3b7c7f06613a1
Parents: ca1b065 bda3258
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:39:39 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:39:39 2015 +

--

--




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

2015-01-28 Thread benedict
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
test/long/org/apache/cassandra/db/LongFlushMemtableTest.java


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

Branch: refs/heads/trunk
Commit: bda32583f239f65d3249f309bc190414cfa2e903
Parents: ffd0ae4 d47d2b1
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:39:30 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:39:30 2015 +

--

--




[2/3] cassandra git commit: ninja remove commitlog_periodic_queue_size from cassandra.yaml, and @Deprecate in Config.java

2015-01-28 Thread benedict
ninja remove commitlog_periodic_queue_size from cassandra.yaml, and @Deprecate 
in Config.java


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

Branch: refs/heads/trunk
Commit: 160cbc1276503a50fe42f63996211094da5cafbd
Parents: 97c54c5
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:44:35 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:44:35 2015 +

--
 conf/cassandra.yaml  | 6 +-
 src/java/org/apache/cassandra/config/Config.java | 4 +++-
 2 files changed, 4 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/160cbc12/conf/cassandra.yaml
--
diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index a58b596..0b114aa 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -236,13 +236,9 @@ counter_cache_save_period: 7200
 #
 # the other option is periodic where writes may be acked immediately
 # and the CommitLog is simply synced every commitlog_sync_period_in_ms
-# milliseconds.  commitlog_periodic_queue_size allows 1024*(CPU cores) pending
-# entries on the commitlog queue by default.  If you are writing very large
-# blobs, you should reduce that; 16*cores works reasonably well for 1MB blobs.
-# It should be at least as large as the concurrent_writes setting.
+# milliseconds. 
 commitlog_sync: periodic
 commitlog_sync_period_in_ms: 1
-# commitlog_periodic_queue_size:
 
 # The size of the individual commitlog file segments.  A commitlog
 # segment may be archived, deleted, or recycled once all the data

http://git-wip-us.apache.org/repos/asf/cassandra/blob/160cbc12/src/java/org/apache/cassandra/config/Config.java
--
diff --git a/src/java/org/apache/cassandra/config/Config.java 
b/src/java/org/apache/cassandra/config/Config.java
index a78cd63..4c1a2c4 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -153,7 +153,9 @@ public class Config
 public Double commitlog_sync_batch_window_in_ms;
 public Integer commitlog_sync_period_in_ms;
 public int commitlog_segment_size_in_mb = 32;
-public int commitlog_periodic_queue_size = 1024 * 
FBUtilities.getAvailableProcessors();
+ 
+@Deprecated
+public int commitlog_periodic_queue_size = -1;
 
 public String endpoint_snitch;
 public Boolean dynamic_snitch = true;



[1/3] cassandra git commit: ninja remove commitlog_periodic_queue_size from cassandra.yaml, and @Deprecate in Config.java

2015-01-28 Thread benedict
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 97c54c50c - 160cbc127
  refs/heads/trunk 0af4ae293 - a1f65c34f


ninja remove commitlog_periodic_queue_size from cassandra.yaml, and @Deprecate 
in Config.java


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

Branch: refs/heads/cassandra-2.1
Commit: 160cbc1276503a50fe42f63996211094da5cafbd
Parents: 97c54c5
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:44:35 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:44:35 2015 +

--
 conf/cassandra.yaml  | 6 +-
 src/java/org/apache/cassandra/config/Config.java | 4 +++-
 2 files changed, 4 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/160cbc12/conf/cassandra.yaml
--
diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index a58b596..0b114aa 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -236,13 +236,9 @@ counter_cache_save_period: 7200
 #
 # the other option is periodic where writes may be acked immediately
 # and the CommitLog is simply synced every commitlog_sync_period_in_ms
-# milliseconds.  commitlog_periodic_queue_size allows 1024*(CPU cores) pending
-# entries on the commitlog queue by default.  If you are writing very large
-# blobs, you should reduce that; 16*cores works reasonably well for 1MB blobs.
-# It should be at least as large as the concurrent_writes setting.
+# milliseconds. 
 commitlog_sync: periodic
 commitlog_sync_period_in_ms: 1
-# commitlog_periodic_queue_size:
 
 # The size of the individual commitlog file segments.  A commitlog
 # segment may be archived, deleted, or recycled once all the data

http://git-wip-us.apache.org/repos/asf/cassandra/blob/160cbc12/src/java/org/apache/cassandra/config/Config.java
--
diff --git a/src/java/org/apache/cassandra/config/Config.java 
b/src/java/org/apache/cassandra/config/Config.java
index a78cd63..4c1a2c4 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -153,7 +153,9 @@ public class Config
 public Double commitlog_sync_batch_window_in_ms;
 public Integer commitlog_sync_period_in_ms;
 public int commitlog_segment_size_in_mb = 32;
-public int commitlog_periodic_queue_size = 1024 * 
FBUtilities.getAvailableProcessors();
+ 
+@Deprecated
+public int commitlog_periodic_queue_size = -1;
 
 public String endpoint_snitch;
 public Boolean dynamic_snitch = true;



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

2015-01-28 Thread benedict
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/a1f65c34
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a1f65c34
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a1f65c34

Branch: refs/heads/trunk
Commit: a1f65c34fb6ae0f05545a603191938669e63c83c
Parents: 0af4ae2 160cbc1
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:44:41 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:44:41 2015 +

--
 conf/cassandra.yaml  | 6 +-
 src/java/org/apache/cassandra/config/Config.java | 4 +++-
 2 files changed, 4 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1f65c34/conf/cassandra.yaml
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1f65c34/src/java/org/apache/cassandra/config/Config.java
--



[jira] [Resolved] (CASSANDRA-8676) commitlog_periodic_queue_size should not exist in 2.1+

2015-01-28 Thread Benedict (JIRA)

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

Benedict resolved CASSANDRA-8676.
-
Resolution: Fixed

ninja removed from yaml, and deprecated the Config.java property

 commitlog_periodic_queue_size should not exist in 2.1+
 --

 Key: CASSANDRA-8676
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8676
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Benedict
Assignee: Benedict
Priority: Trivial
  Labels: docs
 Fix For: 2.1.3


 This property was erroneously left in the yaml for 2.1. I will remove it from 
 the yaml, and mark it deprecated in Config.java. If it could also be removed 
 from the documentation, that would be great.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8700) replace the wiki with docs in the git repo

2015-01-28 Thread Jon Haddad (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14296000#comment-14296000
 ] 

Jon Haddad commented on CASSANDRA-8700:
---

{quote}
The problem with this is, only committers can contribute.
{quote}

Well, not really.  Anyone can submit a JIRA w/ a doc update.  It's not 
excluding anyone.

{quote}
I can put you in the contributors group
{quote}

I'm actually in there already.  It's such a nightmare to save a change (5 
minutes last time I tried) that I just never do it.

{quote}
Really though, some of it is, some of it isn't
{quote}

You're able to find plenty of things that are true, and just as many that are 
out dated.  One of the benefits of putting the docs in git is that it removes 
ambiguity that currently exists in the wiki.  For instance - how would you 
document counters?  There's caveats, changes to implementation, etc, that need 
to be told to the user trying to work with Cassandra.  If that was versioned 
along with the codebase, it becomes substantially easier to manage.  Again, I 
reference cqlengine, where we did both a wiki  docs in repo and it worked 
great.  

 replace the wiki with docs in the git repo
 --

 Key: CASSANDRA-8700
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8700
 Project: Cassandra
  Issue Type: Improvement
  Components: Documentation  website
Reporter: Jon Haddad
Priority: Minor

 The wiki as it stands is pretty terrible.  It takes several minutes to apply 
 a single update, and as a result, it's almost never updated.  The information 
 there has very little context as to what version it applies to.  Most people 
 I've talked to that try to use the information they find there find it is 
 more confusing than helpful.
 I'd like to propose that instead of using the wiki, the doc directory in the 
 cassandra repo be used for docs (already used for CQL3 spec) in a format that 
 can be built to a variety of output formats like HTML / epub / etc.  I won't 
 start the bikeshedding on which markup format is preferable - but there are 
 several options that can work perfectly fine.  I've personally use sphinx w/ 
 restructured text, and markdown.  Both can build easily and as an added bonus 
 be pushed to readthedocs (or something similar) automatically.  For an 
 example, see cqlengine's documentation, which I think is already 
 significantly better than the wiki: 
 http://cqlengine.readthedocs.org/en/latest/
 In addition to being overall easier to maintain, putting the documentation in 
 the git repo adds context, since it evolves with the versions of Cassandra.
 If the wiki were kept even remotely up to date, I wouldn't bother with this, 
 but not having at least some basic documentation in the repo, or anywhere 
 associated with the project, is frustrating.
 For reference, the last 3 updates were:
 1/15/15 - updating committers list
 1/08/15 - updating contributers and how to contribute
 12/16/14 - added a link to CQL docs from wiki frontpage (by me)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


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

2015-01-28 Thread benedict
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt


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

Branch: refs/heads/cassandra-2.1
Commit: 2bff135cde13fd321ddbbbe107164bcef2cca0d8
Parents: 1650dd5 31324ee
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:59:24 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:59:24 2015 +

--
 CHANGES.txt | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2bff135c/CHANGES.txt
--
diff --cc CHANGES.txt
index 553356a,7fa5f63..d273350
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,86 -1,10 +1,89 @@@
 +2.1.3
-  * Fix SSTableSimpleUnsortedWriter ConcurrentModificationException 
(CASSANDRA-8619)
 + * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
 + * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
 + * Safer Resource Management (CASSANDRA-7705)
 + * Make sure we compact highly overlapping cold sstables with
 +   STCS (CASSANDRA-8635)
 + * rpc_interface and listen_interface generate NPE on startup when specified
 +   interface doesn't exist (CASSANDRA-8677)
 + * Fix ArrayIndexOutOfBoundsException in nodetool cfhistograms 
(CASSANDRA-8514)
 + * Switch from yammer metrics for nodetool cf/proxy histograms 
(CASSANDRA-8662)
 + * Make sure we don't add tmplink files to the compaction
 +   strategy (CASSANDRA-8580)
 + * (cqlsh) Handle maps with blob keys (CASSANDRA-8372)
 + * (cqlsh) Handle DynamicCompositeType schemas correctly (CASSANDRA-8563)
 + * Duplicate rows returned when in clause has repeated values (CASSANDRA-6707)
 + * Add tooling to detect hot partitions (CASSANDRA-7974)
 + * Fix cassandra-stress user-mode truncation of partition generation 
(CASSANDRA-8608)
 + * Only stream from unrepaired sstables during inc repair (CASSANDRA-8267)
 + * Don't allow starting multiple inc repairs on the same sstables 
(CASSANDRA-8316)
 + * Invalidate prepared BATCH statements when related tables
 +   or keyspaces are dropped (CASSANDRA-8652)
 + * Fix missing results in secondary index queries on collections
 +   with ALLOW FILTERING (CASSANDRA-8421)
 + * Expose EstimatedHistogram metrics for range slices (CASSANDRA-8627)
 + * (cqlsh) Escape clqshrc passwords properly (CASSANDRA-8618)
 + * Fix NPE when passing wrong argument in ALTER TABLE statement 
(CASSANDRA-8355)
 + * Pig: Refactor and deprecate CqlStorage (CASSANDRA-8599)
 + * Don't reuse the same cleanup strategy for all sstables (CASSANDRA-8537)
 + * Fix case-sensitivity of index name on CREATE and DROP INDEX
 +   statements (CASSANDRA-8365)
 + * Better detection/logging for corruption in compressed sstables 
(CASSANDRA-8192)
 + * Use the correct repairedAt value when closing writer (CASSANDRA-8570)
 + * (cqlsh) Handle a schema mismatch being detected on startup (CASSANDRA-8512)
 + * Properly calculate expected write size during compaction (CASSANDRA-8532)
 + * Invalidate affected prepared statements when a table's columns
 +   are altered (CASSANDRA-7910)
 + * Stress - user defined writes should populate sequentally (CASSANDRA-8524)
 + * Fix regression in SSTableRewriter causing some rows to become unreadable 
 +   during compaction (CASSANDRA-8429)
 + * Run major compactions for repaired/unrepaired in parallel (CASSANDRA-8510)
 + * (cqlsh) Fix compression options in DESCRIBE TABLE output when compression
 +   is disabled (CASSANDRA-8288)
 + * (cqlsh) Fix DESCRIBE output after keyspaces are altered (CASSANDRA-7623)
 + * Make sure we set lastCompactedKey correctly (CASSANDRA-8463)
 + * (cqlsh) Fix output of CONSISTENCY command (CASSANDRA-8507)
 + * (cqlsh) Fixed the handling of LIST statements (CASSANDRA-8370)
 + * Make sstablescrub check leveled manifest again (CASSANDRA-8432)
 + * Check first/last keys in sstable when giving out positions (CASSANDRA-8458)
 + * Disable mmap on Windows (CASSANDRA-6993)
 + * Add missing ConsistencyLevels to cassandra-stress (CASSANDRA-8253)
 + * Add auth support to cassandra-stress (CASSANDRA-7985)
 + * Fix ArrayIndexOutOfBoundsException when generating error message
 +   for some CQL syntax errors (CASSANDRA-8455)
 + * Scale memtable slab allocation logarithmically (CASSANDRA-7882)
 + * cassandra-stress simultaneous inserts over same seed (CASSANDRA-7964)
 + * Reduce cassandra-stress sampling memory requirements (CASSANDRA-7926)
 + * Ensure memtable flush cannot expire commit log entries from its future 
(CASSANDRA-8383)
 + * Make read defrag async to reclaim 

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

2015-01-28 Thread benedict
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt


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

Branch: refs/heads/trunk
Commit: 2bff135cde13fd321ddbbbe107164bcef2cca0d8
Parents: 1650dd5 31324ee
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:59:24 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:59:24 2015 +

--
 CHANGES.txt | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2bff135c/CHANGES.txt
--
diff --cc CHANGES.txt
index 553356a,7fa5f63..d273350
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,86 -1,10 +1,89 @@@
 +2.1.3
-  * Fix SSTableSimpleUnsortedWriter ConcurrentModificationException 
(CASSANDRA-8619)
 + * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
 + * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
 + * Safer Resource Management (CASSANDRA-7705)
 + * Make sure we compact highly overlapping cold sstables with
 +   STCS (CASSANDRA-8635)
 + * rpc_interface and listen_interface generate NPE on startup when specified
 +   interface doesn't exist (CASSANDRA-8677)
 + * Fix ArrayIndexOutOfBoundsException in nodetool cfhistograms 
(CASSANDRA-8514)
 + * Switch from yammer metrics for nodetool cf/proxy histograms 
(CASSANDRA-8662)
 + * Make sure we don't add tmplink files to the compaction
 +   strategy (CASSANDRA-8580)
 + * (cqlsh) Handle maps with blob keys (CASSANDRA-8372)
 + * (cqlsh) Handle DynamicCompositeType schemas correctly (CASSANDRA-8563)
 + * Duplicate rows returned when in clause has repeated values (CASSANDRA-6707)
 + * Add tooling to detect hot partitions (CASSANDRA-7974)
 + * Fix cassandra-stress user-mode truncation of partition generation 
(CASSANDRA-8608)
 + * Only stream from unrepaired sstables during inc repair (CASSANDRA-8267)
 + * Don't allow starting multiple inc repairs on the same sstables 
(CASSANDRA-8316)
 + * Invalidate prepared BATCH statements when related tables
 +   or keyspaces are dropped (CASSANDRA-8652)
 + * Fix missing results in secondary index queries on collections
 +   with ALLOW FILTERING (CASSANDRA-8421)
 + * Expose EstimatedHistogram metrics for range slices (CASSANDRA-8627)
 + * (cqlsh) Escape clqshrc passwords properly (CASSANDRA-8618)
 + * Fix NPE when passing wrong argument in ALTER TABLE statement 
(CASSANDRA-8355)
 + * Pig: Refactor and deprecate CqlStorage (CASSANDRA-8599)
 + * Don't reuse the same cleanup strategy for all sstables (CASSANDRA-8537)
 + * Fix case-sensitivity of index name on CREATE and DROP INDEX
 +   statements (CASSANDRA-8365)
 + * Better detection/logging for corruption in compressed sstables 
(CASSANDRA-8192)
 + * Use the correct repairedAt value when closing writer (CASSANDRA-8570)
 + * (cqlsh) Handle a schema mismatch being detected on startup (CASSANDRA-8512)
 + * Properly calculate expected write size during compaction (CASSANDRA-8532)
 + * Invalidate affected prepared statements when a table's columns
 +   are altered (CASSANDRA-7910)
 + * Stress - user defined writes should populate sequentally (CASSANDRA-8524)
 + * Fix regression in SSTableRewriter causing some rows to become unreadable 
 +   during compaction (CASSANDRA-8429)
 + * Run major compactions for repaired/unrepaired in parallel (CASSANDRA-8510)
 + * (cqlsh) Fix compression options in DESCRIBE TABLE output when compression
 +   is disabled (CASSANDRA-8288)
 + * (cqlsh) Fix DESCRIBE output after keyspaces are altered (CASSANDRA-7623)
 + * Make sure we set lastCompactedKey correctly (CASSANDRA-8463)
 + * (cqlsh) Fix output of CONSISTENCY command (CASSANDRA-8507)
 + * (cqlsh) Fixed the handling of LIST statements (CASSANDRA-8370)
 + * Make sstablescrub check leveled manifest again (CASSANDRA-8432)
 + * Check first/last keys in sstable when giving out positions (CASSANDRA-8458)
 + * Disable mmap on Windows (CASSANDRA-6993)
 + * Add missing ConsistencyLevels to cassandra-stress (CASSANDRA-8253)
 + * Add auth support to cassandra-stress (CASSANDRA-7985)
 + * Fix ArrayIndexOutOfBoundsException when generating error message
 +   for some CQL syntax errors (CASSANDRA-8455)
 + * Scale memtable slab allocation logarithmically (CASSANDRA-7882)
 + * cassandra-stress simultaneous inserts over same seed (CASSANDRA-7964)
 + * Reduce cassandra-stress sampling memory requirements (CASSANDRA-7926)
 + * Ensure memtable flush cannot expire commit log entries from its future 
(CASSANDRA-8383)
 + * Make read defrag async to reclaim memtables 

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

2015-01-28 Thread benedict
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/08e7b3e7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/08e7b3e7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/08e7b3e7

Branch: refs/heads/trunk
Commit: 08e7b3e778fef3c42d68faf8af72f4af348eb82f
Parents: cb22dd6 2bff135
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:59:30 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:59:30 2015 +

--
 CHANGES.txt | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/08e7b3e7/CHANGES.txt
--
diff --cc CHANGES.txt
index 86dbf56,d273350..ab4621d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,62 -1,4 +1,61 @@@
 +3.0
 + * Upgrade Metrics library and remove depricated metrics (CASSANDRA-5657)
 + * Serializing Row cache alternative, fully off heap (CASSANDRA-7438)
 + * Duplicate rows returned when in clause has repeated values (CASSANDRA-6707)
 + * Make CassandraException unchecked, extend RuntimeException (CASSANDRA-8560)
 + * Support direct buffer decompression for reads (CASSANDRA-8464)
 + * DirectByteBuffer compatible LZ4 methods (CASSANDRA-7039)
 + * Add role based access control (CASSANDRA-7653)
 + * Group sstables for anticompaction correctly (CASSANDRA-8578)
 + * Add ReadFailureException to native protocol, respond
 +   immediately when replicas encounter errors while handling
 +   a read request (CASSANDRA-7886)
 + * Switch CommitLogSegment from RandomAccessFile to nio (CASSANDRA-8308)
 + * Allow mixing token and partition key restrictions (CASSANDRA-7016)
 + * Support index key/value entries on map collections (CASSANDRA-8473)
 + * Modernize schema tables (CASSANDRA-8261)
 + * Support for user-defined aggregation functions (CASSANDRA-8053)
 + * Fix NPE in SelectStatement with empty IN values (CASSANDRA-8419)
 + * Refactor SelectStatement, return IN results in natural order instead
 +   of IN value list order and ignore duplicate values in partition key IN 
restrictions (CASSANDRA-7981)
 + * Support UDTs, tuples, and collections in user-defined
 +   functions (CASSANDRA-7563)
 + * Fix aggregate fn results on empty selection, result column name,
 +   and cqlsh parsing (CASSANDRA-8229)
 + * Mark sstables as repaired after full repair (CASSANDRA-7586)
 + * Extend Descriptor to include a format value and refactor reader/writer
 +   APIs (CASSANDRA-7443)
 + * Integrate JMH for microbenchmarks (CASSANDRA-8151)
 + * Keep sstable levels when bootstrapping (CASSANDRA-7460)
 + * Add Sigar library and perform basic OS settings check on startup 
(CASSANDRA-7838)
 + * Support for aggregation functions (CASSANDRA-4914)
 + * Remove cassandra-cli (CASSANDRA-7920)
 + * Accept dollar quoted strings in CQL (CASSANDRA-7769)
 + * Make assassinate a first class command (CASSANDRA-7935)
 + * Support IN clause on any clustering column (CASSANDRA-4762)
 + * Improve compaction logging (CASSANDRA-7818)
 + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917)
 + * Do anticompaction in groups (CASSANDRA-6851)
 + * Support user-defined functions (CASSANDRA-7395, 7526, 7562, 7740, 7781, 
7929,
 +   7924, 7812, 8063, 7813, 7708)
 + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416)
 + * Move sstable RandomAccessReader to nio2, which allows using the
 +   FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050)
 + * Remove CQL2 (CASSANDRA-5918)
 + * Add Thrift get_multi_slice call (CASSANDRA-6757)
 + * Optimize fetching multiple cells by name (CASSANDRA-6933)
 + * Allow compilation in java 8 (CASSANDRA-7028)
 + * Make incremental repair default (CASSANDRA-7250)
 + * Enable code coverage thru JaCoCo (CASSANDRA-7226)
 + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) 
 + * Shorten SSTable path (CASSANDRA-6962)
 + * Use unsafe mutations for most unit tests (CASSANDRA-6969)
 + * Fix race condition during calculation of pending ranges (CASSANDRA-7390)
 + * Fail on very large batch sizes (CASSANDRA-8011)
 + * Improve concurrency of repair (CASSANDRA-6455, 8208)
 +
 +
  2.1.3
-  * Fix SSTableSimpleUnsortedWriter ConcurrentModificationException 
(CASSANDRA-8619)
   * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
   * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
   * Safer Resource Management (CASSANDRA-7705)



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

2015-01-28 Thread benedict
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
test/long/org/apache/cassandra/db/LongFlushMemtableTest.java


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

Branch: refs/heads/cassandra-2.1
Commit: bda32583f239f65d3249f309bc190414cfa2e903
Parents: ffd0ae4 d47d2b1
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:39:30 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:39:30 2015 +

--

--




[2/6] cassandra git commit: ninja remove MeteredFlusherTest

2015-01-28 Thread benedict
ninja remove MeteredFlusherTest


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

Branch: refs/heads/cassandra-2.1
Commit: d47d2b1e2b66e239b8cf81e8c254dd3fbdf32052
Parents: b077cda
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:37:49 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:37:49 2015 +

--
 .../apache/cassandra/db/MeteredFlusherTest.java | 72 
 1 file changed, 72 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d47d2b1e/test/long/org/apache/cassandra/db/MeteredFlusherTest.java
--
diff --git a/test/long/org/apache/cassandra/db/MeteredFlusherTest.java 
b/test/long/org/apache/cassandra/db/MeteredFlusherTest.java
deleted file mode 100644
index 5e25744..000
--- a/test/long/org/apache/cassandra/db/MeteredFlusherTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.apache.cassandra.db;
-/*
- *
- * 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.
- *
- */
-
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-
-import org.junit.Test;
-
-import org.apache.cassandra.SchemaLoader;
-import org.apache.cassandra.config.CFMetaData;
-import org.apache.cassandra.exceptions.ConfigurationException;
-import org.apache.cassandra.db.marshal.UTF8Type;
-import org.apache.cassandra.service.MigrationManager;
-import org.apache.cassandra.utils.ByteBufferUtil;
-
-public class MeteredFlusherTest extends SchemaLoader
-{
-@Test
-public void testManyMemtables() throws IOException, ConfigurationException
-{
-Keyspace keyspace = Keyspace.open(Keyspace1);
-for (int i = 0; i  100; i++)
-{
-CFMetaData metadata = new CFMetaData(keyspace.getName(), _CF + 
i, ColumnFamilyType.Standard, UTF8Type.instance, null);
-MigrationManager.announceNewColumnFamily(metadata);
-}
-
-ByteBuffer name = ByteBufferUtil.bytes(c);
-for (int j = 0; j  200; j++)
-{
-for (int i = 0; i  100; i++)
-{
-RowMutation rm = new RowMutation(Keyspace1, 
ByteBufferUtil.bytes(key + j));
-ColumnFamily cf = 
TreeMapBackedSortedColumns.factory.create(Keyspace1, _CF + i);
-// don't cheat by allocating this outside of the loop; that 
defeats the purpose of deliberately using lots of memory
-ByteBuffer value = ByteBuffer.allocate(10);
-cf.addColumn(new Column(name, value));
-rm.add(cf);
-rm.applyUnsafe();
-}
-}
-
-int flushes = 0;
-for (ColumnFamilyStore cfs : ColumnFamilyStore.all())
-{
-if (cfs.name.startsWith(_CF))
-flushes += cfs.getMemtableSwitchCount();
-}
-assert flushes  0;
-}
-}
-



[3/6] cassandra git commit: ninja remove MeteredFlusherTest

2015-01-28 Thread benedict
ninja remove MeteredFlusherTest


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

Branch: refs/heads/trunk
Commit: d47d2b1e2b66e239b8cf81e8c254dd3fbdf32052
Parents: b077cda
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:37:49 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:37:49 2015 +

--
 .../apache/cassandra/db/MeteredFlusherTest.java | 72 
 1 file changed, 72 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d47d2b1e/test/long/org/apache/cassandra/db/MeteredFlusherTest.java
--
diff --git a/test/long/org/apache/cassandra/db/MeteredFlusherTest.java 
b/test/long/org/apache/cassandra/db/MeteredFlusherTest.java
deleted file mode 100644
index 5e25744..000
--- a/test/long/org/apache/cassandra/db/MeteredFlusherTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.apache.cassandra.db;
-/*
- *
- * 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.
- *
- */
-
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-
-import org.junit.Test;
-
-import org.apache.cassandra.SchemaLoader;
-import org.apache.cassandra.config.CFMetaData;
-import org.apache.cassandra.exceptions.ConfigurationException;
-import org.apache.cassandra.db.marshal.UTF8Type;
-import org.apache.cassandra.service.MigrationManager;
-import org.apache.cassandra.utils.ByteBufferUtil;
-
-public class MeteredFlusherTest extends SchemaLoader
-{
-@Test
-public void testManyMemtables() throws IOException, ConfigurationException
-{
-Keyspace keyspace = Keyspace.open(Keyspace1);
-for (int i = 0; i  100; i++)
-{
-CFMetaData metadata = new CFMetaData(keyspace.getName(), _CF + 
i, ColumnFamilyType.Standard, UTF8Type.instance, null);
-MigrationManager.announceNewColumnFamily(metadata);
-}
-
-ByteBuffer name = ByteBufferUtil.bytes(c);
-for (int j = 0; j  200; j++)
-{
-for (int i = 0; i  100; i++)
-{
-RowMutation rm = new RowMutation(Keyspace1, 
ByteBufferUtil.bytes(key + j));
-ColumnFamily cf = 
TreeMapBackedSortedColumns.factory.create(Keyspace1, _CF + i);
-// don't cheat by allocating this outside of the loop; that 
defeats the purpose of deliberately using lots of memory
-ByteBuffer value = ByteBuffer.allocate(10);
-cf.addColumn(new Column(name, value));
-rm.add(cf);
-rm.applyUnsafe();
-}
-}
-
-int flushes = 0;
-for (ColumnFamilyStore cfs : ColumnFamilyStore.all())
-{
-if (cfs.name.startsWith(_CF))
-flushes += cfs.getMemtableSwitchCount();
-}
-assert flushes  0;
-}
-}
-



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

2015-01-28 Thread benedict
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/cb22dd6c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cb22dd6c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cb22dd6c

Branch: refs/heads/trunk
Commit: cb22dd6c51c8f455d1f55aadbcdc887d8886f09a
Parents: 24bc6a0 1650dd5
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:55:51 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:55:51 2015 +

--
 CHANGES.txt | 1 +
 src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java  | 5 +
 .../cassandra/io/sstable/SSTableSimpleUnsortedWriter.java   | 2 ++
 3 files changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cb22dd6c/CHANGES.txt
--
diff --cc CHANGES.txt
index ba1539b,553356a..86dbf56
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,61 -1,5 +1,62 @@@
 +3.0
 + * Upgrade Metrics library and remove depricated metrics (CASSANDRA-5657)
 + * Serializing Row cache alternative, fully off heap (CASSANDRA-7438)
 + * Duplicate rows returned when in clause has repeated values (CASSANDRA-6707)
 + * Make CassandraException unchecked, extend RuntimeException (CASSANDRA-8560)
 + * Support direct buffer decompression for reads (CASSANDRA-8464)
 + * DirectByteBuffer compatible LZ4 methods (CASSANDRA-7039)
 + * Add role based access control (CASSANDRA-7653)
 + * Group sstables for anticompaction correctly (CASSANDRA-8578)
 + * Add ReadFailureException to native protocol, respond
 +   immediately when replicas encounter errors while handling
 +   a read request (CASSANDRA-7886)
 + * Switch CommitLogSegment from RandomAccessFile to nio (CASSANDRA-8308)
 + * Allow mixing token and partition key restrictions (CASSANDRA-7016)
 + * Support index key/value entries on map collections (CASSANDRA-8473)
 + * Modernize schema tables (CASSANDRA-8261)
 + * Support for user-defined aggregation functions (CASSANDRA-8053)
 + * Fix NPE in SelectStatement with empty IN values (CASSANDRA-8419)
 + * Refactor SelectStatement, return IN results in natural order instead
 +   of IN value list order and ignore duplicate values in partition key IN 
restrictions (CASSANDRA-7981)
 + * Support UDTs, tuples, and collections in user-defined
 +   functions (CASSANDRA-7563)
 + * Fix aggregate fn results on empty selection, result column name,
 +   and cqlsh parsing (CASSANDRA-8229)
 + * Mark sstables as repaired after full repair (CASSANDRA-7586)
 + * Extend Descriptor to include a format value and refactor reader/writer
 +   APIs (CASSANDRA-7443)
 + * Integrate JMH for microbenchmarks (CASSANDRA-8151)
 + * Keep sstable levels when bootstrapping (CASSANDRA-7460)
 + * Add Sigar library and perform basic OS settings check on startup 
(CASSANDRA-7838)
 + * Support for aggregation functions (CASSANDRA-4914)
 + * Remove cassandra-cli (CASSANDRA-7920)
 + * Accept dollar quoted strings in CQL (CASSANDRA-7769)
 + * Make assassinate a first class command (CASSANDRA-7935)
 + * Support IN clause on any clustering column (CASSANDRA-4762)
 + * Improve compaction logging (CASSANDRA-7818)
 + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917)
 + * Do anticompaction in groups (CASSANDRA-6851)
 + * Support user-defined functions (CASSANDRA-7395, 7526, 7562, 7740, 7781, 
7929,
 +   7924, 7812, 8063, 7813, 7708)
 + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416)
 + * Move sstable RandomAccessReader to nio2, which allows using the
 +   FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050)
 + * Remove CQL2 (CASSANDRA-5918)
 + * Add Thrift get_multi_slice call (CASSANDRA-6757)
 + * Optimize fetching multiple cells by name (CASSANDRA-6933)
 + * Allow compilation in java 8 (CASSANDRA-7028)
 + * Make incremental repair default (CASSANDRA-7250)
 + * Enable code coverage thru JaCoCo (CASSANDRA-7226)
 + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) 
 + * Shorten SSTable path (CASSANDRA-6962)
 + * Use unsafe mutations for most unit tests (CASSANDRA-6969)
 + * Fix race condition during calculation of pending ranges (CASSANDRA-7390)
 + * Fail on very large batch sizes (CASSANDRA-8011)
 + * Improve concurrency of repair (CASSANDRA-6455, 8208)
 +
 +
  2.1.3
+  * Fix SSTableSimpleUnsortedWriter ConcurrentModificationException 
(CASSANDRA-8619)
   * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
   * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
   * Safer Resource Management (CASSANDRA-7705)


[1/6] cassandra git commit: Fix SSTableSimpleUnsortedWriter ConcurrentModificationException

2015-01-28 Thread benedict
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 d47d2b1e2 - 31324eefb
  refs/heads/cassandra-2.1 1650dd51d - 2bff135cd
  refs/heads/trunk cb22dd6c5 - 08e7b3e77


Fix SSTableSimpleUnsortedWriter ConcurrentModificationException

patch by benedict; reviewed by sylvain for CASSANDRA-8619


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

Branch: refs/heads/cassandra-2.0
Commit: 31324eefbde219395dd2b9e49e8252f4498db676
Parents: d47d2b1
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:58:12 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:58:12 2015 +

--
 CHANGES.txt | 1 +
 src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java  | 5 +
 .../cassandra/io/sstable/SSTableSimpleUnsortedWriter.java   | 2 ++
 3 files changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/31324eef/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 792f8c1..7fa5f63 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.13:
+ * Fix SSTableSimpleUnsortedWriter ConcurrentModificationException 
(CASSANDRA-8619)
  * Round up time deltas lower than 1ms in BulkLoader (CASSANDRA-8645)
  * Add batch remove iterator to ABSC (CASSANDRA-8414, 8666)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/31324eef/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
--
diff --git a/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java 
b/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
index 93d3dcf..d58b28f 100644
--- a/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
@@ -534,6 +534,11 @@ public class CQLSSTableWriter implements Closeable
 };
 }
 
+protected void addColumn(Cell cell) throws IOException
+{
+throw new UnsupportedOperationException();
+}
+
 static class SyncException extends RuntimeException
 {
 SyncException(IOException ioe)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/31324eef/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
--
diff --git 
a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java 
b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
index 39ec71d..b58e574 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
@@ -167,6 +167,7 @@ public class SSTableSimpleUnsortedWriter extends 
AbstractSSTableSimpleWriter
 
 checkForWriterException();
 
+columnFamily = null;
 try
 {
 writeQueue.put(buffer);
@@ -178,6 +179,7 @@ public class SSTableSimpleUnsortedWriter extends 
AbstractSSTableSimpleWriter
 }
 buffer = new Buffer();
 currentSize = 0;
+columnFamily = getColumnFamily();
 }
 
 private void checkForWriterException() throws IOException



[2/6] cassandra git commit: Fix SSTableSimpleUnsortedWriter ConcurrentModificationException

2015-01-28 Thread benedict
Fix SSTableSimpleUnsortedWriter ConcurrentModificationException

patch by benedict; reviewed by sylvain for CASSANDRA-8619


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

Branch: refs/heads/cassandra-2.1
Commit: 31324eefbde219395dd2b9e49e8252f4498db676
Parents: d47d2b1
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:58:12 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:58:12 2015 +

--
 CHANGES.txt | 1 +
 src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java  | 5 +
 .../cassandra/io/sstable/SSTableSimpleUnsortedWriter.java   | 2 ++
 3 files changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/31324eef/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 792f8c1..7fa5f63 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.13:
+ * Fix SSTableSimpleUnsortedWriter ConcurrentModificationException 
(CASSANDRA-8619)
  * Round up time deltas lower than 1ms in BulkLoader (CASSANDRA-8645)
  * Add batch remove iterator to ABSC (CASSANDRA-8414, 8666)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/31324eef/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
--
diff --git a/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java 
b/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
index 93d3dcf..d58b28f 100644
--- a/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
@@ -534,6 +534,11 @@ public class CQLSSTableWriter implements Closeable
 };
 }
 
+protected void addColumn(Cell cell) throws IOException
+{
+throw new UnsupportedOperationException();
+}
+
 static class SyncException extends RuntimeException
 {
 SyncException(IOException ioe)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/31324eef/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
--
diff --git 
a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java 
b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
index 39ec71d..b58e574 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
@@ -167,6 +167,7 @@ public class SSTableSimpleUnsortedWriter extends 
AbstractSSTableSimpleWriter
 
 checkForWriterException();
 
+columnFamily = null;
 try
 {
 writeQueue.put(buffer);
@@ -178,6 +179,7 @@ public class SSTableSimpleUnsortedWriter extends 
AbstractSSTableSimpleWriter
 }
 buffer = new Buffer();
 currentSize = 0;
+columnFamily = getColumnFamily();
 }
 
 private void checkForWriterException() throws IOException



[3/6] cassandra git commit: Fix SSTableSimpleUnsortedWriter ConcurrentModificationException

2015-01-28 Thread benedict
Fix SSTableSimpleUnsortedWriter ConcurrentModificationException

patch by benedict; reviewed by sylvain for CASSANDRA-8619


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

Branch: refs/heads/trunk
Commit: 31324eefbde219395dd2b9e49e8252f4498db676
Parents: d47d2b1
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:58:12 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:58:12 2015 +

--
 CHANGES.txt | 1 +
 src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java  | 5 +
 .../cassandra/io/sstable/SSTableSimpleUnsortedWriter.java   | 2 ++
 3 files changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/31324eef/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 792f8c1..7fa5f63 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.13:
+ * Fix SSTableSimpleUnsortedWriter ConcurrentModificationException 
(CASSANDRA-8619)
  * Round up time deltas lower than 1ms in BulkLoader (CASSANDRA-8645)
  * Add batch remove iterator to ABSC (CASSANDRA-8414, 8666)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/31324eef/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
--
diff --git a/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java 
b/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
index 93d3dcf..d58b28f 100644
--- a/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
@@ -534,6 +534,11 @@ public class CQLSSTableWriter implements Closeable
 };
 }
 
+protected void addColumn(Cell cell) throws IOException
+{
+throw new UnsupportedOperationException();
+}
+
 static class SyncException extends RuntimeException
 {
 SyncException(IOException ioe)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/31324eef/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
--
diff --git 
a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java 
b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
index 39ec71d..b58e574 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
@@ -167,6 +167,7 @@ public class SSTableSimpleUnsortedWriter extends 
AbstractSSTableSimpleWriter
 
 checkForWriterException();
 
+columnFamily = null;
 try
 {
 writeQueue.put(buffer);
@@ -178,6 +179,7 @@ public class SSTableSimpleUnsortedWriter extends 
AbstractSSTableSimpleWriter
 }
 buffer = new Buffer();
 currentSize = 0;
+columnFamily = getColumnFamily();
 }
 
 private void checkForWriterException() throws IOException



[jira] [Created] (CASSANDRA-8700) shut off the wiki

2015-01-28 Thread Jon Haddad (JIRA)
Jon Haddad created CASSANDRA-8700:
-

 Summary: shut off the wiki
 Key: CASSANDRA-8700
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8700
 Project: Cassandra
  Issue Type: Improvement
  Components: Documentation  website
Reporter: Jon Haddad
Priority: Minor


The wiki as it stands is pretty terrible.  It takes several minutes to apply a 
single update, and as a result, it's almost never updated.  The information 
there has very little context as to what version it applies to.  Most people 
I've talked to that try to use the information they find there find it is more 
confusing than helpful.

I'd like to propose that instead of using the wiki, the doc directory in the 
cassandra repo be used for docs (already used for CQL3 spec) in a format that 
can be built to a variety of output formats like HTML / epub / etc.  I won't 
start the bikeshedding on which markup format is preferable - but there are 
several options that can work perfectly fine.  I've personally use sphinx w/ 
restructured text, and markdown.  Both can build easily and as an added bonus 
be pushed to readthedocs (or something similar) automatically.  For an example, 
see cqlengine's documentation, which I think is already significantly better 
than the wiki: http://cqlengine.readthedocs.org/en/latest/

In addition to being overall easier to maintain, putting the documentation in 
the git repo adds context, since it evolves with the versions of Cassandra.

If the wiki were kept even remotely up to date, I wouldn't bother with this, 
but not having at least some basic documentation in the repo, or anywhere 
associated with the project, is frustrating.

For reference, the last 3 updates were:

1/15/15 - updating committers list
1/08/15 - updating contributers and how to contribute
12/16/14 - added a link to CQL docs from wiki frontpage (by me)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8700) replace the wiki with docs in the git repo

2015-01-28 Thread Jon Haddad (JIRA)

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

Jon Haddad updated CASSANDRA-8700:
--
Summary: replace the wiki with docs in the git repo  (was: shut off the 
wiki)

 replace the wiki with docs in the git repo
 --

 Key: CASSANDRA-8700
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8700
 Project: Cassandra
  Issue Type: Improvement
  Components: Documentation  website
Reporter: Jon Haddad
Priority: Minor

 The wiki as it stands is pretty terrible.  It takes several minutes to apply 
 a single update, and as a result, it's almost never updated.  The information 
 there has very little context as to what version it applies to.  Most people 
 I've talked to that try to use the information they find there find it is 
 more confusing than helpful.
 I'd like to propose that instead of using the wiki, the doc directory in the 
 cassandra repo be used for docs (already used for CQL3 spec) in a format that 
 can be built to a variety of output formats like HTML / epub / etc.  I won't 
 start the bikeshedding on which markup format is preferable - but there are 
 several options that can work perfectly fine.  I've personally use sphinx w/ 
 restructured text, and markdown.  Both can build easily and as an added bonus 
 be pushed to readthedocs (or something similar) automatically.  For an 
 example, see cqlengine's documentation, which I think is already 
 significantly better than the wiki: 
 http://cqlengine.readthedocs.org/en/latest/
 In addition to being overall easier to maintain, putting the documentation in 
 the git repo adds context, since it evolves with the versions of Cassandra.
 If the wiki were kept even remotely up to date, I wouldn't bother with this, 
 but not having at least some basic documentation in the repo, or anywhere 
 associated with the project, is frustrating.
 For reference, the last 3 updates were:
 1/15/15 - updating committers list
 1/08/15 - updating contributers and how to contribute
 12/16/14 - added a link to CQL docs from wiki frontpage (by me)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8700) replace the wiki with docs in the git repo

2015-01-28 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295971#comment-14295971
 ] 

Brandon Williams commented on CASSANDRA-8700:
-

bq. instead of using the wiki, the doc directory in the cassandra repo be used 
for docs 

The problem with this is, only committers can contribute. If you look at the 
[contributors group|https://wiki.apache.org/cassandra/ContributorsGroup] on the 
wiki, it's a pretty long list and regularly people request contributor access 
(I know because I do the bulk of the adding.)

bq. If the wiki were kept even remotely up to date

I can put you in the contributors group :)  Really though, some of it is, some 
of it isn't. http://wiki.apache.org/cassandra/ArchitectureGossip for instance 
is quite accurate.

 replace the wiki with docs in the git repo
 --

 Key: CASSANDRA-8700
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8700
 Project: Cassandra
  Issue Type: Improvement
  Components: Documentation  website
Reporter: Jon Haddad
Priority: Minor

 The wiki as it stands is pretty terrible.  It takes several minutes to apply 
 a single update, and as a result, it's almost never updated.  The information 
 there has very little context as to what version it applies to.  Most people 
 I've talked to that try to use the information they find there find it is 
 more confusing than helpful.
 I'd like to propose that instead of using the wiki, the doc directory in the 
 cassandra repo be used for docs (already used for CQL3 spec) in a format that 
 can be built to a variety of output formats like HTML / epub / etc.  I won't 
 start the bikeshedding on which markup format is preferable - but there are 
 several options that can work perfectly fine.  I've personally use sphinx w/ 
 restructured text, and markdown.  Both can build easily and as an added bonus 
 be pushed to readthedocs (or something similar) automatically.  For an 
 example, see cqlengine's documentation, which I think is already 
 significantly better than the wiki: 
 http://cqlengine.readthedocs.org/en/latest/
 In addition to being overall easier to maintain, putting the documentation in 
 the git repo adds context, since it evolves with the versions of Cassandra.
 If the wiki were kept even remotely up to date, I wouldn't bother with this, 
 but not having at least some basic documentation in the repo, or anywhere 
 associated with the project, is frustrating.
 For reference, the last 3 updates were:
 1/15/15 - updating committers list
 1/08/15 - updating contributers and how to contribute
 12/16/14 - added a link to CQL docs from wiki frontpage (by me)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7542) Reduce CAS contention

2015-01-28 Thread Benedict (JIRA)

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

Benedict updated CASSANDRA-7542:

Assignee: (was: Benedict)

 Reduce CAS contention
 -

 Key: CASSANDRA-7542
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7542
 Project: Cassandra
  Issue Type: Improvement
Reporter: sankalp kohli
 Fix For: 2.0.13


 CAS updates on same CQL partition can lead to heavy contention inside C*. I 
 am looking for simple ways(no algorithmic changes) to reduce contention as 
 the penalty of it is high in terms of latency, specially for reads. 
 We can put some sort of synchronization on CQL partition at StorageProxy 
 level. This will reduce contention at least for all requests landing on one 
 box for same partition. 
 Here is an example of why it will help:
 1) Say 1 write and 2 read CAS requests for the same partition key is send to 
 C* in parallel. 
 2) Since client is token-aware, it sends these 3 request to the same C* 
 instance A. (Lets assume that all 3 requests goto same instance A) 
 3) In this C* instance A, all 3 CAS requests will contend with each other in 
 Paxos. (This is bad)
 To improve contention in 3), what I am proposing is to add a lock on 
 partition key similar to what we do in PaxosState.java to serialize these 3 
 requests. This will remove the contention and improve performance as these 3 
 requests will not collide with each other.
 Another improvement we can do in client is to pick a deterministic live 
 replica for a given partition doing CAS.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (CASSANDRA-8631) long-test MeteredFlusherTest fails with heap OOM

2015-01-28 Thread Benedict (JIRA)

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

Benedict resolved CASSANDRA-8631.
-
   Resolution: Fixed
Reproduced In: 2.0.0, 1.2.0  (was: 1.2.0, 2.0.0)

ninja fixed

 long-test MeteredFlusherTest fails with heap OOM
 

 Key: CASSANDRA-8631
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8631
 Project: Cassandra
  Issue Type: Test
  Components: Tests
 Environment: cassandra-2.0 commit 90780b5
Reporter: Michael Shuler
Assignee: Benedict
Priority: Minor
  Labels: unit-test

 I attempted to find a spot where this test actually passes, and I was unable 
 to do so. I tried back to 1.1 HEAD and various release tags under jdk7 and 
 jdk6 for = 1.2 tags. In 1.2.0 with jdk6, the test times out with 
 java.lang.OutOfMemoryError: GC overhead limit exceeded, so it's similar.
 {noformat}
 [junit] Testcase: 
 testManyMemtables(org.apache.cassandra.db.MeteredFlusherTest):Caused an 
 ERROR
 [junit] Java heap space
 [junit] java.lang.OutOfMemoryError: Java heap space
 [junit] at java.nio.HeapByteBuffer.init(HeapByteBuffer.java:57)
 [junit] at java.nio.ByteBuffer.allocate(ByteBuffer.java:331)
 [junit] at 
 org.apache.cassandra.utils.SlabAllocator$Region.init(SlabAllocator.java:157)
 [junit] at 
 org.apache.cassandra.utils.SlabAllocator$Region.init(SlabAllocator.java:131)
 [junit] at 
 org.apache.cassandra.utils.SlabAllocator.getRegion(SlabAllocator.java:101)
 [junit] at 
 org.apache.cassandra.utils.SlabAllocator.allocate(SlabAllocator.java:73)
 [junit] at 
 org.apache.cassandra.utils.Allocator.clone(Allocator.java:30)
 [junit] at org.apache.cassandra.db.Column.localCopy(Column.java:277)
 [junit] at org.apache.cassandra.db.Memtable$1.apply(Memtable.java:114)
 [junit] at org.apache.cassandra.db.Memtable$1.apply(Memtable.java:111)
 [junit] at 
 org.apache.cassandra.db.AtomicSortedColumns.addAllWithSizeDelta(AtomicSortedColumns.java:194)
 [junit] at org.apache.cassandra.db.Memtable.resolve(Memtable.java:218)
 [junit] at org.apache.cassandra.db.Memtable.put(Memtable.java:165)
 [junit] at 
 org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:901)
 [junit] at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:374)
 [junit] at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:339)
 [junit] at 
 org.apache.cassandra.db.RowMutation.applyUnsafe(RowMutation.java:216)
 [junit] at 
 org.apache.cassandra.db.MeteredFlusherTest.testManyMemtables(MeteredFlusherTest.java:59)
 [junit] 
 [junit] 
 [junit] Test org.apache.cassandra.db.MeteredFlusherTest FAILED
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


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

2015-01-28 Thread benedict
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/0af4ae29
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0af4ae29
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0af4ae29

Branch: refs/heads/trunk
Commit: 0af4ae293625e0cfc1dca370f982dbbc145d08a0
Parents: 4537b32 97c54c5
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:41:52 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:41:52 2015 +

--
 src/java/org/apache/cassandra/utils/memory/NativeAllocator.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0af4ae29/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java
--



[2/3] cassandra git commit: ninja fix 7882

2015-01-28 Thread benedict
ninja fix 7882


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

Branch: refs/heads/trunk
Commit: 97c54c50c97235e536472a05feed471b0a273a74
Parents: bda3258
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:41:46 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:41:46 2015 +

--
 src/java/org/apache/cassandra/utils/memory/NativeAllocator.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/97c54c50/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java
--
diff --git a/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java 
b/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java
index 0e15ed2..272a4c2 100644
--- a/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java
+++ b/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java
@@ -104,6 +104,9 @@ public class NativeAllocator extends MemtableAllocator
 public long allocate(int size, OpOrder.Group opGroup)
 {
 assert size = 0;
+offHeap().allocate(size, opGroup);
+// satisfy large allocations directly from JVM since they don't cause 
fragmentation
+// as badly, and fill up our regions quickly
 if (size  MAX_CLONED_SIZE)
 return allocateOversize(size, opGroup);
 
@@ -150,7 +153,6 @@ public class NativeAllocator extends MemtableAllocator
 {
 // satisfy large allocations directly from JVM since they don't cause 
fragmentation
 // as badly, and fill up our regions quickly
-offHeap().allocate(size, opGroup);
 Region region = new Region(allocator.allocate(size), size);
 regions.add(region);
 



[1/3] cassandra git commit: ninja fix 7882

2015-01-28 Thread benedict
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 bda32583f - 97c54c50c
  refs/heads/trunk 4537b3277 - 0af4ae293


ninja fix 7882


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

Branch: refs/heads/cassandra-2.1
Commit: 97c54c50c97235e536472a05feed471b0a273a74
Parents: bda3258
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:41:46 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:41:46 2015 +

--
 src/java/org/apache/cassandra/utils/memory/NativeAllocator.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/97c54c50/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java
--
diff --git a/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java 
b/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java
index 0e15ed2..272a4c2 100644
--- a/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java
+++ b/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java
@@ -104,6 +104,9 @@ public class NativeAllocator extends MemtableAllocator
 public long allocate(int size, OpOrder.Group opGroup)
 {
 assert size = 0;
+offHeap().allocate(size, opGroup);
+// satisfy large allocations directly from JVM since they don't cause 
fragmentation
+// as badly, and fill up our regions quickly
 if (size  MAX_CLONED_SIZE)
 return allocateOversize(size, opGroup);
 
@@ -150,7 +153,6 @@ public class NativeAllocator extends MemtableAllocator
 {
 // satisfy large allocations directly from JVM since they don't cause 
fragmentation
 // as badly, and fill up our regions quickly
-offHeap().allocate(size, opGroup);
 Region region = new Region(allocator.allocate(size), size);
 regions.add(region);
 



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

2015-01-28 Thread benedict
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/24bc6a03
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/24bc6a03
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/24bc6a03

Branch: refs/heads/trunk
Commit: 24bc6a0386452b7d3fc5db17e5276cb528c5f7ce
Parents: a1f65c3 71ccc87
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:51:01 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:51:01 2015 +

--
 CHANGES.txt |   1 +
 .../utils/memory/NativeAllocatorTest.java   | 111 ++
 tools/stress/README.txt | 113 ---
 3 files changed, 183 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/24bc6a03/CHANGES.txt
--
diff --cc CHANGES.txt
index 7af5b89,c40fc19..ba1539b
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,61 -1,5 +1,62 @@@
 +3.0
 + * Upgrade Metrics library and remove depricated metrics (CASSANDRA-5657)
 + * Serializing Row cache alternative, fully off heap (CASSANDRA-7438)
 + * Duplicate rows returned when in clause has repeated values (CASSANDRA-6707)
 + * Make CassandraException unchecked, extend RuntimeException (CASSANDRA-8560)
 + * Support direct buffer decompression for reads (CASSANDRA-8464)
 + * DirectByteBuffer compatible LZ4 methods (CASSANDRA-7039)
 + * Add role based access control (CASSANDRA-7653)
 + * Group sstables for anticompaction correctly (CASSANDRA-8578)
 + * Add ReadFailureException to native protocol, respond
 +   immediately when replicas encounter errors while handling
 +   a read request (CASSANDRA-7886)
 + * Switch CommitLogSegment from RandomAccessFile to nio (CASSANDRA-8308)
 + * Allow mixing token and partition key restrictions (CASSANDRA-7016)
 + * Support index key/value entries on map collections (CASSANDRA-8473)
 + * Modernize schema tables (CASSANDRA-8261)
 + * Support for user-defined aggregation functions (CASSANDRA-8053)
 + * Fix NPE in SelectStatement with empty IN values (CASSANDRA-8419)
 + * Refactor SelectStatement, return IN results in natural order instead
 +   of IN value list order and ignore duplicate values in partition key IN 
restrictions (CASSANDRA-7981)
 + * Support UDTs, tuples, and collections in user-defined
 +   functions (CASSANDRA-7563)
 + * Fix aggregate fn results on empty selection, result column name,
 +   and cqlsh parsing (CASSANDRA-8229)
 + * Mark sstables as repaired after full repair (CASSANDRA-7586)
 + * Extend Descriptor to include a format value and refactor reader/writer
 +   APIs (CASSANDRA-7443)
 + * Integrate JMH for microbenchmarks (CASSANDRA-8151)
 + * Keep sstable levels when bootstrapping (CASSANDRA-7460)
 + * Add Sigar library and perform basic OS settings check on startup 
(CASSANDRA-7838)
 + * Support for aggregation functions (CASSANDRA-4914)
 + * Remove cassandra-cli (CASSANDRA-7920)
 + * Accept dollar quoted strings in CQL (CASSANDRA-7769)
 + * Make assassinate a first class command (CASSANDRA-7935)
 + * Support IN clause on any clustering column (CASSANDRA-4762)
 + * Improve compaction logging (CASSANDRA-7818)
 + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917)
 + * Do anticompaction in groups (CASSANDRA-6851)
 + * Support user-defined functions (CASSANDRA-7395, 7526, 7562, 7740, 7781, 
7929,
 +   7924, 7812, 8063, 7813, 7708)
 + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416)
 + * Move sstable RandomAccessReader to nio2, which allows using the
 +   FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050)
 + * Remove CQL2 (CASSANDRA-5918)
 + * Add Thrift get_multi_slice call (CASSANDRA-6757)
 + * Optimize fetching multiple cells by name (CASSANDRA-6933)
 + * Allow compilation in java 8 (CASSANDRA-7028)
 + * Make incremental repair default (CASSANDRA-7250)
 + * Enable code coverage thru JaCoCo (CASSANDRA-7226)
 + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) 
 + * Shorten SSTable path (CASSANDRA-6962)
 + * Use unsafe mutations for most unit tests (CASSANDRA-6969)
 + * Fix race condition during calculation of pending ranges (CASSANDRA-7390)
 + * Fail on very large batch sizes (CASSANDRA-8011)
 + * Improve concurrency of repair (CASSANDRA-6455, 8208)
 +
 +
  2.1.3
+  * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
   * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
   * Safer Resource Management (CASSANDRA-7705)
   * Make sure we compact highly overlapping cold sstables with



[2/5] cassandra git commit: Update tools/stress/README.txt

2015-01-28 Thread benedict
Update tools/stress/README.txt

patch by ptnapoleon; reviewed by benedict for CASSANDRA-7933


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

Branch: refs/heads/trunk
Commit: 7cd1102606d51d8a5ac26ced818d50172acc1007
Parents: 160cbc1
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:49:33 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:49:33 2015 +

--
 CHANGES.txt |   1 +
 tools/stress/README.txt | 113 +++
 2 files changed, 72 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cd11026/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 7a38735..c40fc19 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.3
+ * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
  * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
  * Safer Resource Management (CASSANDRA-7705)
  * Make sure we compact highly overlapping cold sstables with

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cd11026/tools/stress/README.txt
--
diff --git a/tools/stress/README.txt b/tools/stress/README.txt
index 9f745c1..0046b25 100644
--- a/tools/stress/README.txt
+++ b/tools/stress/README.txt
@@ -4,55 +4,84 @@ cassandra-stress
 Description
 ---
 cassandra-stress is a tool for benchmarking and load testing a Cassandra
-cluster.  It is significantly faster than the older py_stress tool.
+cluster. cassandra-stress supports testing arbitrary CQL tables and queries
+to allow users to benchmark their data model.
 
 Setup
 -
-Run `ant` from the Cassandra source directory, then cassandra-stress can be 
invoke from tools/bin/cassandra-stress
+Run `ant` from the Cassandra source directory, then cassandra-stress can be 
invoked from tools/bin/cassandra-stress.
+cassandra-stress supports benchmarking any Cassandra cluster of version 2.0+.
 
 Usage
 -
-There are three different modes of operation:
-
-* inserting (loading test data)
-* reading
-* range slicing (only works with the OrderPreservingPartioner)
-* indexed range slicing (works with RandomParitioner on indexed 
ColumnFamilies)
-
-Important options:
--o or --operation:
-Sets the operation mode, one of 'insert', 'read', 'rangeslice', or 
'indexedrangeslice'
--n or --num-keys:
-the number of rows to insert/read/slice; defaults to one million
--d or --nodes:
-the node(s) to perform the test against.  For multiple nodes, supply a
-comma-separated list without spaces, ex: 
cassandra1,cassandra2,cassandra3
--y or --family-type:
-Sets the ColumnFamily type.  One of 'Standard' or 'Super'.  If using 
super,
-you probably want to set the -u option also.
--c or --cells:
-the number of cells per row, defaults to 5
--u or --supercolumns:
-use the number of supercolumns specified NOTE: you must set the -y
-option appropriately, or this option has no effect.
--g or --get-range-slice-count:
-This is only used for the rangeslice operation and will *NOT* work with
-the RandomPartioner.  You must set the OrderPreservingPartioner in your
-storage-conf.xml (note that you will need to wipe all existing data
-when switching partioners.)  This option sets the number of rows to
-slice at a time and defaults to 1000.
--r or --random:
-Only used for reads.  By default, cassandra-stress will perform reads 
on rows
-with a guassian distribution, which will cause some repeats.  Setting
-this option makes the reads completely random instead.
--i or --progress-interval:
-The interval, in seconds, at which progress will be output.
-
-Remember that you must perform inserts before performing reads or range slices.
+There are several operation types:
+
+* write-only, read-only, and mixed workloads of standard data
+* write-only and read-only workloads for counter columns
+* user configured workloads, running custom queries on custom schemas
+* support for legacy cassandra-stress operations
+
+The syntax is `cassandra-stress command [options]`. If you want more 
information on a given command
+or options, just run `cassandra-stress help command|option`.
+
+Commands:
+read:
+Multiple concurrent reads - the cluster must first be populated by a 
write test
+write:
+

[3/5] cassandra git commit: ninja add unit test for 7882

2015-01-28 Thread benedict
ninja add unit test for 7882


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

Branch: refs/heads/trunk
Commit: 71ccc87a79d161cdf5cf219a276f5bd7313f9c80
Parents: 7cd1102
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:50:13 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:50:13 2015 +

--
 .../utils/memory/NativeAllocatorTest.java   | 111 +++
 1 file changed, 111 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/71ccc87a/test/unit/org/apache/cassandra/utils/memory/NativeAllocatorTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/utils/memory/NativeAllocatorTest.java 
b/test/unit/org/apache/cassandra/utils/memory/NativeAllocatorTest.java
new file mode 100644
index 000..83d6c0c
--- /dev/null
+++ b/test/unit/org/apache/cassandra/utils/memory/NativeAllocatorTest.java
@@ -0,0 +1,111 @@
+/*
+* 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.utils.memory;
+
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicReference;
+
+import com.google.common.util.concurrent.Uninterruptibles;
+
+import org.junit.Test;
+
+import junit.framework.Assert;
+import org.apache.cassandra.utils.concurrent.OpOrder;
+
+public class NativeAllocatorTest
+{
+
+@Test
+public void testBookKeeping() throws ExecutionException, 
InterruptedException
+{
+{
+final ScheduledExecutorService exec = 
Executors.newScheduledThreadPool(2);
+final OpOrder order = new OpOrder();
+final OpOrder.Group group = order.start();
+final CountDownLatch canClean = new CountDownLatch(1);
+final CountDownLatch isClean = new CountDownLatch(1);
+final AtomicReferenceNativeAllocator allocatorRef = new 
AtomicReference();
+final AtomicReferenceOpOrder.Barrier barrier = new 
AtomicReference();
+final NativeAllocator allocator = new NativeAllocator(new 
NativePool(1, 100, 0.75f, new Runnable()
+{
+public void run()
+{
+try
+{
+canClean.await();
+}
+catch (InterruptedException e)
+{
+throw new AssertionError();
+}
+if (isClean.getCount()  0)
+{
+allocatorRef.get().offHeap().release(80);
+isClean.countDown();
+}
+}
+}));
+allocatorRef.set(allocator);
+final Runnable markBlocking = new Runnable()
+{
+
+public void run()
+{
+barrier.set(order.newBarrier());
+barrier.get().issue();
+barrier.get().markBlocking();
+}
+};
+final Runnable run = new Runnable()
+{
+public void run()
+{
+// allocate normal, check accounted and not cleaned
+allocator.allocate(10, group);
+Assert.assertEquals(10, allocator.offHeap().owns());
+Uninterruptibles.sleepUninterruptibly(10L, 
TimeUnit.MILLISECONDS);
+Assert.assertEquals(1, isClean.getCount());
+
+// allocate above watermark, check cleaned
+allocator.allocate(70, group);
+Assert.assertEquals(80, allocator.offHeap().owns());
+canClean.countDown();
+try
+{
+isClean.await(10L, TimeUnit.MILLISECONDS);
+  

[4/5] cassandra git commit: ninja add unit test for 7882

2015-01-28 Thread benedict
ninja add unit test for 7882


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

Branch: refs/heads/cassandra-2.1
Commit: 71ccc87a79d161cdf5cf219a276f5bd7313f9c80
Parents: 7cd1102
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:50:13 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:50:13 2015 +

--
 .../utils/memory/NativeAllocatorTest.java   | 111 +++
 1 file changed, 111 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/71ccc87a/test/unit/org/apache/cassandra/utils/memory/NativeAllocatorTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/utils/memory/NativeAllocatorTest.java 
b/test/unit/org/apache/cassandra/utils/memory/NativeAllocatorTest.java
new file mode 100644
index 000..83d6c0c
--- /dev/null
+++ b/test/unit/org/apache/cassandra/utils/memory/NativeAllocatorTest.java
@@ -0,0 +1,111 @@
+/*
+* 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.utils.memory;
+
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicReference;
+
+import com.google.common.util.concurrent.Uninterruptibles;
+
+import org.junit.Test;
+
+import junit.framework.Assert;
+import org.apache.cassandra.utils.concurrent.OpOrder;
+
+public class NativeAllocatorTest
+{
+
+@Test
+public void testBookKeeping() throws ExecutionException, 
InterruptedException
+{
+{
+final ScheduledExecutorService exec = 
Executors.newScheduledThreadPool(2);
+final OpOrder order = new OpOrder();
+final OpOrder.Group group = order.start();
+final CountDownLatch canClean = new CountDownLatch(1);
+final CountDownLatch isClean = new CountDownLatch(1);
+final AtomicReferenceNativeAllocator allocatorRef = new 
AtomicReference();
+final AtomicReferenceOpOrder.Barrier barrier = new 
AtomicReference();
+final NativeAllocator allocator = new NativeAllocator(new 
NativePool(1, 100, 0.75f, new Runnable()
+{
+public void run()
+{
+try
+{
+canClean.await();
+}
+catch (InterruptedException e)
+{
+throw new AssertionError();
+}
+if (isClean.getCount()  0)
+{
+allocatorRef.get().offHeap().release(80);
+isClean.countDown();
+}
+}
+}));
+allocatorRef.set(allocator);
+final Runnable markBlocking = new Runnable()
+{
+
+public void run()
+{
+barrier.set(order.newBarrier());
+barrier.get().issue();
+barrier.get().markBlocking();
+}
+};
+final Runnable run = new Runnable()
+{
+public void run()
+{
+// allocate normal, check accounted and not cleaned
+allocator.allocate(10, group);
+Assert.assertEquals(10, allocator.offHeap().owns());
+Uninterruptibles.sleepUninterruptibly(10L, 
TimeUnit.MILLISECONDS);
+Assert.assertEquals(1, isClean.getCount());
+
+// allocate above watermark, check cleaned
+allocator.allocate(70, group);
+Assert.assertEquals(80, allocator.offHeap().owns());
+canClean.countDown();
+try
+{
+isClean.await(10L, TimeUnit.MILLISECONDS);
+  

[1/5] cassandra git commit: Update tools/stress/README.txt

2015-01-28 Thread benedict
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 160cbc127 - 71ccc87a7
  refs/heads/trunk a1f65c34f - 24bc6a038


Update tools/stress/README.txt

patch by ptnapoleon; reviewed by benedict for CASSANDRA-7933


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

Branch: refs/heads/cassandra-2.1
Commit: 7cd1102606d51d8a5ac26ced818d50172acc1007
Parents: 160cbc1
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:49:33 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:49:33 2015 +

--
 CHANGES.txt |   1 +
 tools/stress/README.txt | 113 +++
 2 files changed, 72 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cd11026/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 7a38735..c40fc19 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.3
+ * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
  * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
  * Safer Resource Management (CASSANDRA-7705)
  * Make sure we compact highly overlapping cold sstables with

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cd11026/tools/stress/README.txt
--
diff --git a/tools/stress/README.txt b/tools/stress/README.txt
index 9f745c1..0046b25 100644
--- a/tools/stress/README.txt
+++ b/tools/stress/README.txt
@@ -4,55 +4,84 @@ cassandra-stress
 Description
 ---
 cassandra-stress is a tool for benchmarking and load testing a Cassandra
-cluster.  It is significantly faster than the older py_stress tool.
+cluster. cassandra-stress supports testing arbitrary CQL tables and queries
+to allow users to benchmark their data model.
 
 Setup
 -
-Run `ant` from the Cassandra source directory, then cassandra-stress can be 
invoke from tools/bin/cassandra-stress
+Run `ant` from the Cassandra source directory, then cassandra-stress can be 
invoked from tools/bin/cassandra-stress.
+cassandra-stress supports benchmarking any Cassandra cluster of version 2.0+.
 
 Usage
 -
-There are three different modes of operation:
-
-* inserting (loading test data)
-* reading
-* range slicing (only works with the OrderPreservingPartioner)
-* indexed range slicing (works with RandomParitioner on indexed 
ColumnFamilies)
-
-Important options:
--o or --operation:
-Sets the operation mode, one of 'insert', 'read', 'rangeslice', or 
'indexedrangeslice'
--n or --num-keys:
-the number of rows to insert/read/slice; defaults to one million
--d or --nodes:
-the node(s) to perform the test against.  For multiple nodes, supply a
-comma-separated list without spaces, ex: 
cassandra1,cassandra2,cassandra3
--y or --family-type:
-Sets the ColumnFamily type.  One of 'Standard' or 'Super'.  If using 
super,
-you probably want to set the -u option also.
--c or --cells:
-the number of cells per row, defaults to 5
--u or --supercolumns:
-use the number of supercolumns specified NOTE: you must set the -y
-option appropriately, or this option has no effect.
--g or --get-range-slice-count:
-This is only used for the rangeslice operation and will *NOT* work with
-the RandomPartioner.  You must set the OrderPreservingPartioner in your
-storage-conf.xml (note that you will need to wipe all existing data
-when switching partioners.)  This option sets the number of rows to
-slice at a time and defaults to 1000.
--r or --random:
-Only used for reads.  By default, cassandra-stress will perform reads 
on rows
-with a guassian distribution, which will cause some repeats.  Setting
-this option makes the reads completely random instead.
--i or --progress-interval:
-The interval, in seconds, at which progress will be output.
-
-Remember that you must perform inserts before performing reads or range slices.
+There are several operation types:
+
+* write-only, read-only, and mixed workloads of standard data
+* write-only and read-only workloads for counter columns
+* user configured workloads, running custom queries on custom schemas
+* support for legacy cassandra-stress operations
+
+The syntax is `cassandra-stress command [options]`. If you want more 
information on a given command
+or options, just run `cassandra-stress help command|option`.
+

[jira] [Commented] (CASSANDRA-8623) sstablesplit fails *randomly* with Data component is missing

2015-01-28 Thread Yuki Morishita (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14296015#comment-14296015
 ] 

Yuki Morishita commented on CASSANDRA-8623:
---

+1

 sstablesplit fails *randomly* with Data component is missing
 

 Key: CASSANDRA-8623
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8623
 Project: Cassandra
  Issue Type: Bug
Reporter: Alan Boudreault
Assignee: Marcus Eriksson
 Attachments: 
 0001-make-sure-we-finish-compactions-before-waiting-for-d.patch, 
 8623-v2.patch, output.log, output2.log


 I'm experiencing an issue related to sstablesplit. I would like to understand 
 if I am doing something wrong or there is an issue in the split process. The 
 process fails randomly with the following exception:
 {code}
 ERROR 02:17:36 Error in ThreadPoolExecutor
 java.lang.AssertionError: Data component is missing for 
 sstable./tools/bin/../../data/data/system/compactions_in_progress-55080ab05d9c388690a4acb25fe1f77b/system-compactions_in_progress-ka-16
 {code}
 See attached output.log file. The process never stops after this exception 
 and I've also seen the dataset growing indefinitely (number of sstables).  
 * I have not been able to reproduce the issue with a single sstablesplit 
 command. ie, specifying all files with glob matching.
 * I can reproduce the bug if I call multiple sstablesplit one file at the 
 time (the way ccm does)
 Here is the test case file to reproduce the bug:
 https://drive.google.com/file/d/0BwZ_GPM33j6KdVh0NTdkOWV2R1E/view?usp=sharing
 1. Download the split_issue.tar.gz file. It includes latest cassandra-2.1 
 branch binaries.
 2. Extract it
 3. CD inside the use case directory
 4. Download the dataset (2G) just to be sure we have the same thing, and 
 place it in the working directory.
https://docs.google.com/uc?id=0BwZ_GPM33j6KV3ViNnpPcVFndUUexport=download
 5. The first time, run ./test.sh. This will setup and run a test.
 6. The next times, you can only run ./test --no-setup . This will only reset 
 the dataset as its initial state and re-run the test. You might have to run 
 the tests some times before experiencing it... but I'm always able with only 
 2-3 runs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[2/3] cassandra git commit: Fix SSTableSimpleUnsortedWriter ConcurrentModificationException

2015-01-28 Thread benedict
Fix SSTableSimpleUnsortedWriter ConcurrentModificationException

patch by benedict; reviewed by sylvain for CASSANDRA-8619


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

Branch: refs/heads/trunk
Commit: 1650dd51d4c6c41d19dbaac64ae4527e45190ad3
Parents: 71ccc87
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:54:27 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:54:27 2015 +

--
 CHANGES.txt | 1 +
 src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java  | 5 +
 .../cassandra/io/sstable/SSTableSimpleUnsortedWriter.java   | 2 ++
 3 files changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1650dd51/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c40fc19..553356a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.3
+ * Fix SSTableSimpleUnsortedWriter ConcurrentModificationException 
(CASSANDRA-8619)
  * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
  * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
  * Safer Resource Management (CASSANDRA-7705)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1650dd51/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
--
diff --git a/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java 
b/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
index 85e54ab..3e27ff9 100644
--- a/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
@@ -549,6 +549,11 @@ public class CQLSSTableWriter implements Closeable
 };
 }
 
+protected void addColumn(Cell cell) throws IOException
+{
+throw new UnsupportedOperationException();
+}
+
 static class SyncException extends RuntimeException
 {
 SyncException(IOException ioe)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1650dd51/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
--
diff --git 
a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java 
b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
index 3cfdc7b..129dfca 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
@@ -167,6 +167,7 @@ public class SSTableSimpleUnsortedWriter extends 
AbstractSSTableSimpleWriter
 
 checkForWriterException();
 
+columnFamily = null;
 try
 {
 writeQueue.put(buffer);
@@ -178,6 +179,7 @@ public class SSTableSimpleUnsortedWriter extends 
AbstractSSTableSimpleWriter
 }
 buffer = new Buffer();
 currentSize = 0;
+columnFamily = getColumnFamily();
 }
 
 private void checkForWriterException() throws IOException



[1/3] cassandra git commit: Fix SSTableSimpleUnsortedWriter ConcurrentModificationException

2015-01-28 Thread benedict
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 71ccc87a7 - 1650dd51d
  refs/heads/trunk 24bc6a038 - cb22dd6c5


Fix SSTableSimpleUnsortedWriter ConcurrentModificationException

patch by benedict; reviewed by sylvain for CASSANDRA-8619


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

Branch: refs/heads/cassandra-2.1
Commit: 1650dd51d4c6c41d19dbaac64ae4527e45190ad3
Parents: 71ccc87
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Jan 28 22:54:27 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Jan 28 22:54:27 2015 +

--
 CHANGES.txt | 1 +
 src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java  | 5 +
 .../cassandra/io/sstable/SSTableSimpleUnsortedWriter.java   | 2 ++
 3 files changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1650dd51/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c40fc19..553356a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.3
+ * Fix SSTableSimpleUnsortedWriter ConcurrentModificationException 
(CASSANDRA-8619)
  * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
  * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
  * Safer Resource Management (CASSANDRA-7705)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1650dd51/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
--
diff --git a/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java 
b/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
index 85e54ab..3e27ff9 100644
--- a/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
@@ -549,6 +549,11 @@ public class CQLSSTableWriter implements Closeable
 };
 }
 
+protected void addColumn(Cell cell) throws IOException
+{
+throw new UnsupportedOperationException();
+}
+
 static class SyncException extends RuntimeException
 {
 SyncException(IOException ioe)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1650dd51/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
--
diff --git 
a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java 
b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
index 3cfdc7b..129dfca 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
@@ -167,6 +167,7 @@ public class SSTableSimpleUnsortedWriter extends 
AbstractSSTableSimpleWriter
 
 checkForWriterException();
 
+columnFamily = null;
 try
 {
 writeQueue.put(buffer);
@@ -178,6 +179,7 @@ public class SSTableSimpleUnsortedWriter extends 
AbstractSSTableSimpleWriter
 }
 buffer = new Buffer();
 currentSize = 0;
+columnFamily = getColumnFamily();
 }
 
 private void checkForWriterException() throws IOException



[jira] [Updated] (CASSANDRA-8678) CREATE TABLE accepts value for default_time_to_live on counter table

2015-01-28 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa updated CASSANDRA-8678:
--
Attachment: cass-8678-2.diff

In the ALTER TABLE case, since the validation already prevents adding counters 
to non-counter CFs, the only addition required is to prevent adding 
default_time_to_live via WITH

 CREATE TABLE accepts value for default_time_to_live on counter table
 

 Key: CASSANDRA-8678
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8678
 Project: Cassandra
  Issue Type: Wish
  Components: Tools
Reporter: Aaron Ploetz
Assignee: Jeff Jirsa
Priority: Minor
 Fix For: 2.1.2

 Attachments: cass-8678-2.diff, cassandra-8678.diff


 I can create a counter table (via cqlsh) with a default_time_to_live:
 CREATE TABLE IF NOT EXISTS metrics2(
   time timestamp,
   value counter,
   PRIMARY KEY ((time))
 ) WITH default_time_to_live=10;
 Upsert a row that increments the counter:
 {{UPDATE metrics2 SET value=value+1 WHERE timestamp='2015-01-24 10:48 
 -0600';}}
 Wait 10 seconds, and select, and the row is (of course) still there.  There 
 should probably be a warning or error preventing the creation of a table that 
 has both counter columns and a value set for default_time_to_live.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8678) CREATE TABLE accepts value for default_time_to_live on counter table

2015-01-28 Thread Jeff Jirsa (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14296388#comment-14296388
 ] 

Jeff Jirsa commented on CASSANDRA-8678:
---

As a consistency note, there's a mix of InvalidRequestException() thrown in 
AlterTableStatement and CreateTableStatement vs ConfigurationException() thrown 
in CFMetaData validate - there may be value in consolidating that at some 
point, but probably beyond the scope of this issue.

 CREATE TABLE accepts value for default_time_to_live on counter table
 

 Key: CASSANDRA-8678
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8678
 Project: Cassandra
  Issue Type: Wish
  Components: Tools
Reporter: Aaron Ploetz
Assignee: Jeff Jirsa
Priority: Minor
 Fix For: 2.1.2

 Attachments: cass-8678-2.diff, cassandra-8678.diff


 I can create a counter table (via cqlsh) with a default_time_to_live:
 CREATE TABLE IF NOT EXISTS metrics2(
   time timestamp,
   value counter,
   PRIMARY KEY ((time))
 ) WITH default_time_to_live=10;
 Upsert a row that increments the counter:
 {{UPDATE metrics2 SET value=value+1 WHERE timestamp='2015-01-24 10:48 
 -0600';}}
 Wait 10 seconds, and select, and the row is (of course) still there.  There 
 should probably be a warning or error preventing the creation of a table that 
 has both counter columns and a value set for default_time_to_live.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


cassandra git commit: the Metrics map is keyed by String, not MetricName

2015-01-28 Thread dbrosius
Repository: cassandra
Updated Branches:
  refs/heads/trunk 08e7b3e77 - 48a7e645d


the Metrics map is keyed by String, not MetricName


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

Branch: refs/heads/trunk
Commit: 48a7e645d871bdb91e082f3ad3cdb61ba3f16199
Parents: 08e7b3e
Author: Dave Brosius dbros...@mebigfatguy.com
Authored: Thu Jan 29 01:48:36 2015 -0500
Committer: Dave Brosius dbros...@mebigfatguy.com
Committed: Thu Jan 29 01:48:36 2015 -0500

--
 src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/48a7e645/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
--
diff --git a/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java 
b/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
index 90b6b80..7b1be74 100644
--- a/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
+++ b/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
@@ -618,7 +618,7 @@ public class ColumnFamilyMetrics
 {
 for(String name : all)
 {
-
allColumnFamilyMetrics.get(name).remove(Metrics.getMetrics().get(factory.createMetricName(name)));
+
allColumnFamilyMetrics.get(name).remove(Metrics.getMetrics().get(factory.createMetricName(name).getMetricName()));
 Metrics.remove(factory.createMetricName(name));
 }
 readLatency.release();



[jira] [Commented] (CASSANDRA-7118) Exception around IOException doesnt report file or table getting exception

2015-01-28 Thread Chaitanya Gupta (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14296539#comment-14296539
 ] 

Chaitanya Gupta commented on CASSANDRA-7118:


I am not able to reproduce this on Cassandra 2.1. With corrupt SStable, I got 
following error which shows the Corrupt SStable name.

java.lang.RuntimeException: 
org.apache.cassandra.io.sstable.CorruptSSTableException: 
org.apache.cassandra.io.compress.CorruptBlockException: 
(/home/dlauser/datastax/cassandra-cassandra-2.1/build/test/cassandra/data/cg2/emp-da28df60a6e911e498535f9bdf20ef4a/cg2-emp-ka-1-Data.db):
 corruption detected, chunk at 0 of length 94.
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2174)
 ~[main/:na]

[cg2 is the keyspace name, emp is the CF name]

 Exception around IOException doesnt report file or table getting exception
 --

 Key: CASSANDRA-7118
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7118
 Project: Cassandra
  Issue Type: Improvement
Reporter: Laura Adney
Priority: Minor

 Saw this in Cassandra version: 1.2.11.2
 Run into several situations where an IOException indicates that corruption 
 has occurred.  The exception does not provide the sstable or the table name 
 making it very difficult to determine what files are involved.
 The request is to update the error/exception to include more relevant 
 table/file information.
 Example Exception:
 ERROR [ReadStage:146665] 2014-02-25 06:28:18,286 CassandraDaemon.java (line 
 191) Exception in thread Thread[ReadStage:146665,5,main]
 java.lang.RuntimeException: 
 org.apache.cassandra.io.sstable.CorruptSSTableException: java.io.EOFException
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1613)
   at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:744)
 Caused by: org.apache.cassandra.io.sstable.CorruptSSTableException: 
 java.io.EOFException
 Caused by: java.io.EOFException
   at java.io.RandomAccessFile.readFully(RandomAccessFile.java:446)
   at java.io.RandomAccessFile.readFully(RandomAccessFile.java:424)
   at 
 org.apache.cassandra.io.util.RandomAccessReader.readBytes(RandomAccessReader.java:380)
   at 
 org.apache.cassandra.utils.ByteBufferUtil.read(ByteBufferUtil.java:392)
   at 
 org.apache.cassandra.utils.ByteBufferUtil.readWithLength(ByteBufferUtil.java:355)
   at 
 org.apache.cassandra.db.ColumnSerializer.deserializeColumnBody(ColumnSerializer.java:94)
   at 
 org.apache.cassandra.db.OnDiskAtom$Serializer.deserializeFromSSTable(OnDiskAtom.java:92)
   at 
 org.apache.cassandra.db.OnDiskAtom$Serializer.deserializeFromSSTable(OnDiskAtom.java:73)
   at 
 org.apache.cassandra.db.columniterator.IndexedSliceReader$SimpleBlockFetcher.init(IndexedSliceReader.java:477)
   at 
 org.apache.cassandra.db.columniterator.IndexedSliceReader.init(IndexedSliceReader.java:94)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-5657) Upgrade metrics lib and remove deprecated metrics

2015-01-28 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-5657:
--
Summary: Upgrade metrics lib and remove deprecated metrics  (was: remove 
deprecated metrics)

 Upgrade metrics lib and remove deprecated metrics
 -

 Key: CASSANDRA-5657
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5657
 Project: Cassandra
  Issue Type: Task
  Components: Tools
Reporter: Jonathan Ellis
Assignee: T Jake Luciani
  Labels: technical_debt
 Fix For: 3.0

 Attachments: 5657.txt, 5657v2.txt, nits.txt






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (CASSANDRA-7821) Add Optional Backoff on Retry to Cassandra Stress

2015-01-28 Thread T Jake Luciani (JIRA)

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

T Jake Luciani resolved CASSANDRA-7821.
---
Resolution: Later

Re-open if you get to this...

 Add Optional Backoff on Retry to Cassandra Stress
 -

 Key: CASSANDRA-7821
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7821
 Project: Cassandra
  Issue Type: Improvement
Reporter: Russell Alexander Spitzer
Assignee: Russell Alexander Spitzer
 Attachments: CASSANDRA-7821-2.1.patch


 Currently when stress is running against a cluster which occasionally has 
 nodes marked as down, it will almost immediately stop. This occurs because 
 the retry loop can execute extremely quickly if each execution terminates 
 with a {{com.datastax.driver.core.exceptions.NoHostAvailableException}} or 
 {{com.datastax.driver.core.exceptions.UnavailableException}}. 
 In case of these  exceptions is will most likely be unable to succeed if the 
 retries are performed as fast as possible. To get around this, we could add 
 an optional delay on retries giving the cluster time to recover rather than 
 terminating the stress run. 
 We could make this configurable, with options such as:
 * Constant # Delays the same amount after each retry
 * Linear # Backoff a set amount * the trial number
 * Exponential # Backoff set amount * 2 ^ trial number
 This may also require adjusting the thread is stuck check to make sure that 
 the max retry timeout will not cause the thread to be terminated early.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[2/4] cassandra git commit: Upgrade metrics library and remove depricated metrics

2015-01-28 Thread jake
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8896a70b/src/java/org/apache/cassandra/metrics/LatencyMetrics.java
--
diff --git a/src/java/org/apache/cassandra/metrics/LatencyMetrics.java 
b/src/java/org/apache/cassandra/metrics/LatencyMetrics.java
index 149af91..ced56a8 100644
--- a/src/java/org/apache/cassandra/metrics/LatencyMetrics.java
+++ b/src/java/org/apache/cassandra/metrics/LatencyMetrics.java
@@ -20,13 +20,14 @@ package org.apache.cassandra.metrics;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.cassandra.utils.EstimatedHistogram;
+import com.codahale.metrics.Counter;
+import com.codahale.metrics.Timer;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
-import com.yammer.metrics.Metrics;
-import com.yammer.metrics.core.Counter;
-import com.yammer.metrics.core.Timer;
+
+import static org.apache.cassandra.metrics.CassandraMetricsRegistry.Metrics;
+
 
 /**
  * Metrics about latencies
@@ -44,11 +45,6 @@ public class LatencyMetrics
 protected final MetricNameFactory factory;
 protected final String namePrefix;
 
-@Deprecated public final EstimatedHistogram totalLatencyHistogram = new 
EstimatedHistogram();
-@Deprecated public final EstimatedHistogram recentLatencyHistogram = new 
EstimatedHistogram();
-protected long lastLatency;
-protected long lastOpCount;
-
 /**
  * Create LatencyMetrics with given group, type, and scope. Name prefix 
for each metric will be empty.
  *
@@ -83,8 +79,8 @@ public class LatencyMetrics
 this.factory = factory;
 this.namePrefix = namePrefix;
 
-latency = Metrics.newTimer(factory.createMetricName(namePrefix + 
Latency), TimeUnit.MICROSECONDS, TimeUnit.SECONDS);
-totalLatency = Metrics.newCounter(factory.createMetricName(namePrefix 
+ TotalLatency));
+latency = Metrics.timer(factory.createMetricName(namePrefix + 
Latency));
+totalLatency = Metrics.counter(factory.createMetricName(namePrefix + 
TotalLatency));
 }
 
 /**
@@ -106,9 +102,7 @@ public class LatencyMetrics
 {
 // convert to microseconds. 1 millionth
 latency.update(nanos, TimeUnit.NANOSECONDS);
-totalLatency.inc(nanos / 1000);
-totalLatencyHistogram.add(nanos / 1000);
-recentLatencyHistogram.add(nanos / 1000);
+totalLatency.inc(nanos);
 for(LatencyMetrics parent : parents)
 {
 parent.addNano(nanos);
@@ -117,25 +111,7 @@ public class LatencyMetrics
 
 public void release()
 {
-
Metrics.defaultRegistry().removeMetric(factory.createMetricName(namePrefix + 
Latency));
-
Metrics.defaultRegistry().removeMetric(factory.createMetricName(namePrefix + 
TotalLatency));
-}
-
-@Deprecated
-public synchronized double getRecentLatency()
-{
-long ops = latency.count();
-long n = totalLatency.count();
-if (ops == lastOpCount)
-return 0;
-try
-{
-return ((double) n - lastLatency) / (ops - lastOpCount);
-}
-finally
-{
-lastLatency = n;
-lastOpCount = ops;
-}
+Metrics.remove(factory.createMetricName(namePrefix + Latency));
+Metrics.remove(factory.createMetricName(namePrefix + TotalLatency));
 }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8896a70b/src/java/org/apache/cassandra/metrics/MetricNameFactory.java
--
diff --git a/src/java/org/apache/cassandra/metrics/MetricNameFactory.java 
b/src/java/org/apache/cassandra/metrics/MetricNameFactory.java
index 78f8b14..4e8f2b4 100644
--- a/src/java/org/apache/cassandra/metrics/MetricNameFactory.java
+++ b/src/java/org/apache/cassandra/metrics/MetricNameFactory.java
@@ -17,7 +17,6 @@
  */
 package org.apache.cassandra.metrics;
 
-import com.yammer.metrics.core.MetricName;
 
 public interface MetricNameFactory
 {
@@ -27,5 +26,5 @@ public interface MetricNameFactory
  * @param metricName part of qualified name.
  * @return new String with given metric name.
  */
-MetricName createMetricName(String metricName);
+CassandraMetricsRegistry.MetricName createMetricName(String metricName);
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8896a70b/src/java/org/apache/cassandra/metrics/ReadRepairMetrics.java
--
diff --git a/src/java/org/apache/cassandra/metrics/ReadRepairMetrics.java 
b/src/java/org/apache/cassandra/metrics/ReadRepairMetrics.java
index f9b1a40..9ee1c60 100644
--- a/src/java/org/apache/cassandra/metrics/ReadRepairMetrics.java
+++ b/src/java/org/apache/cassandra/metrics/ReadRepairMetrics.java
@@ -17,10 +17,9 @@
  */
 package org.apache.cassandra.metrics;
 
-import java.util.concurrent.TimeUnit;
+import 

[1/4] cassandra git commit: Upgrade metrics library and remove depricated metrics

2015-01-28 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/trunk bbb1592e8 - 8896a70b0


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8896a70b/test/long/org/apache/cassandra/utils/LongBTreeTest.java
--
diff --git a/test/long/org/apache/cassandra/utils/LongBTreeTest.java 
b/test/long/org/apache/cassandra/utils/LongBTreeTest.java
index eb75671..133c6c5 100644
--- a/test/long/org/apache/cassandra/utils/LongBTreeTest.java
+++ b/test/long/org/apache/cassandra/utils/LongBTreeTest.java
@@ -46,10 +46,10 @@ import 
com.google.common.util.concurrent.ListenableFutureTask;
 import org.junit.Assert;
 import org.junit.Test;
 
-import com.yammer.metrics.Metrics;
-import com.yammer.metrics.core.Timer;
-import com.yammer.metrics.core.TimerContext;
-import com.yammer.metrics.stats.Snapshot;
+
+import com.codahale.metrics.MetricRegistry;
+import com.codahale.metrics.Snapshot;
+import com.codahale.metrics.Timer;
 import org.apache.cassandra.concurrent.NamedThreadFactory;
 import org.apache.cassandra.utils.btree.BTree;
 import org.apache.cassandra.utils.btree.BTreeSearchIterator;
@@ -60,8 +60,9 @@ import org.apache.cassandra.utils.btree.UpdateFunction;
 public class LongBTreeTest
 {
 
-private static final Timer BTREE_TIMER = Metrics.newTimer(BTree.class, 
BTREE, TimeUnit.NANOSECONDS, TimeUnit.NANOSECONDS);
-private static final Timer TREE_TIMER = Metrics.newTimer(BTree.class, 
TREE, TimeUnit.NANOSECONDS, TimeUnit.NANOSECONDS);
+private static final MetricRegistry metrics = new MetricRegistry();
+private static final Timer BTREE_TIMER = 
metrics.timer(MetricRegistry.name(BTree.class, BTREE));
+private static final Timer TREE_TIMER = 
metrics.timer(MetricRegistry.name(BTree.class, TREE));
 private static final ExecutorService MODIFY = 
Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors(), new 
NamedThreadFactory(MODIFY));
 private static final ExecutorService COMPARE = 
Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors(), new 
NamedThreadFactory(COMPARE));
 private static final RandomAbortInteger SPORADIC_ABORT = new 
RandomAbort(new Random(), 0.0001f);
@@ -236,7 +237,7 @@ public class LongBTreeTest
 }
 mods -= c;
 }
-TimerContext ctxt;
+Timer.Context ctxt;
 ctxt = TREE_TIMER.time();
 canon.putAll(buffer);
 ctxt.stop();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8896a70b/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java 
b/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
index f09eb93..45ed56e 100644
--- a/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
+++ b/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
@@ -53,8 +53,8 @@ public class ColumnFamilyMetricTest
 
 store.truncateBlocking();
 
-assertEquals(0, store.metric.liveDiskSpaceUsed.count());
-assertEquals(0, store.metric.totalDiskSpaceUsed.count());
+assertEquals(0, store.metric.liveDiskSpaceUsed.getCount());
+assertEquals(0, store.metric.totalDiskSpaceUsed.getCount());
 
 for (int j = 0; j  10; j++)
 {
@@ -72,14 +72,14 @@ public class ColumnFamilyMetricTest
 }
 
 // size metrics should show the sum of all SSTable sizes
-assertEquals(size, store.metric.liveDiskSpaceUsed.count());
-assertEquals(size, store.metric.totalDiskSpaceUsed.count());
+assertEquals(size, store.metric.liveDiskSpaceUsed.getCount());
+assertEquals(size, store.metric.totalDiskSpaceUsed.getCount());
 
 store.truncateBlocking();
 
 // after truncate, size metrics should be down to 0
-assertEquals(0, store.metric.liveDiskSpaceUsed.count());
-assertEquals(0, store.metric.totalDiskSpaceUsed.count());
+assertEquals(0, store.metric.liveDiskSpaceUsed.getCount());
+assertEquals(0, store.metric.totalDiskSpaceUsed.getCount());
 
 store.enableAutoCompaction();
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8896a70b/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java 
b/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java
index 7c086f7..5679ba5 100644
--- a/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java
+++ b/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java
@@ -81,6 +81,7 @@ import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.io.sstable.metadata.MetadataCollector;
 import 

[4/4] cassandra git commit: Upgrade metrics library and remove depricated metrics

2015-01-28 Thread jake
Upgrade metrics library and remove depricated metrics

Patch by tjake; reviewed by aleksey for CASSANDRA-5657


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

Branch: refs/heads/trunk
Commit: 8896a70b015102c212d0a27ed1f4e1f0fabe85c4
Parents: bbb1592
Author: T Jake Luciani j...@apache.org
Authored: Mon Jan 5 09:34:08 2015 -0500
Committer: T Jake Luciani j...@apache.org
Committed: Wed Jan 28 11:12:19 2015 -0500

--
 CHANGES.txt |   1 +
 build.xml   |   4 +-
 lib/licenses/metrics-core-2.2.0.txt | 202 -
 lib/licenses/metrics-core-3.1.0.txt | 202 +
 lib/metrics-core-2.2.0.jar  | Bin 82123 - 0 bytes
 lib/metrics-core-3.1.0.jar  | Bin 0 - 111908 bytes
 .../cassandra/concurrent/IExecutorMBean.java|  41 -
 .../JMXEnabledScheduledThreadPoolExecutor.java  |   4 +-
 .../JMXEnabledSharedExecutorPool.java   | 113 ---
 .../JMXEnabledThreadPoolExecutor.java   |  21 +-
 .../JMXEnabledThreadPoolExecutorMBean.java  |  19 +-
 .../cassandra/concurrent/SEPExecutor.java   |  32 +-
 .../concurrent/SharedExecutorPool.java  |   9 +
 .../org/apache/cassandra/concurrent/Stage.java  |  16 +
 .../cassandra/concurrent/StageManager.java  |   2 +-
 .../apache/cassandra/db/ColumnFamilyStore.java  | 176 +
 .../cassandra/db/ColumnFamilyStoreMBean.java| 234 --
 .../cassandra/db/HintedHandOffManager.java  |   2 +-
 .../cassandra/db/commitlog/CommitLog.java   |  20 -
 .../cassandra/db/commitlog/CommitLogMBean.java  |  21 -
 .../cassandra/db/compaction/CompactionInfo.java |   3 +-
 .../db/compaction/CompactionManager.java|   8 +-
 .../db/compaction/CompactionManagerMBean.java   |  28 -
 .../cassandra/db/filter/ExtendedFilter.java |   2 +-
 src/java/org/apache/cassandra/gms/Gossiper.java |   2 +-
 .../locator/DynamicEndpointSnitch.java  |  18 +-
 .../metrics/CASClientRequestMetrics.java|  20 +-
 .../apache/cassandra/metrics/CQLMetrics.java|  30 +-
 .../apache/cassandra/metrics/CacheMetrics.java  |  59 +-
 .../metrics/CassandraMetricsRegistry.java   | 791 +++
 .../cassandra/metrics/ClearableHistogram.java   |  48 ++
 .../apache/cassandra/metrics/ClientMetrics.java |  13 +-
 .../cassandra/metrics/ClientRequestMetrics.java |  26 +-
 .../cassandra/metrics/ColumnFamilyMetrics.java  | 157 ++--
 .../cassandra/metrics/CommitLogMetrics.java |  23 +-
 .../cassandra/metrics/CompactionMetrics.java|  22 +-
 .../cassandra/metrics/ConnectionMetrics.java|  66 +-
 .../cassandra/metrics/DefaultNameFactory.java   |   7 +-
 .../metrics/DroppedMessageMetrics.java  |  21 +-
 .../metrics/EstimatedHistogramReservoir.java| 105 +++
 .../cassandra/metrics/FileCacheMetrics.java |  32 +-
 .../cassandra/metrics/HintedHandoffMetrics.java |  15 +-
 .../cassandra/metrics/KeyspaceMetrics.java  |  62 +-
 .../cassandra/metrics/LatencyMetrics.java   |  44 +-
 .../cassandra/metrics/MetricNameFactory.java|   3 +-
 .../cassandra/metrics/ReadRepairMetrics.java|  14 +-
 .../cassandra/metrics/RestorableMeter.java  |  10 +-
 .../apache/cassandra/metrics/SEPMetrics.java|  55 +-
 .../cassandra/metrics/StorageMetrics.java   |  13 +-
 .../cassandra/metrics/StreamingMetrics.java |  16 +-
 .../metrics/ThreadPoolMetricNameFactory.java|   6 +-
 .../cassandra/metrics/ThreadPoolMetrics.java|  74 +-
 .../apache/cassandra/net/MessagingService.java  |  30 +-
 .../cassandra/net/MessagingServiceMBean.java|  15 -
 .../net/OutboundTcpConnectionPool.java  |   6 +-
 .../scheduler/RoundRobinScheduler.java  |   2 -
 .../cassandra/scheduler/WeightedQueue.java  |  43 +-
 .../cassandra/scheduler/WeightedQueueMBean.java |  32 -
 .../apache/cassandra/service/CacheService.java  |  67 +-
 .../cassandra/service/CacheServiceMBean.java|  86 --
 .../cassandra/service/CassandraDaemon.java  |   7 +-
 .../cassandra/service/LoadBroadcaster.java  |   3 +-
 .../apache/cassandra/service/StorageProxy.java  | 102 +--
 .../cassandra/service/StorageProxyMBean.java|  48 --
 .../cassandra/service/StorageService.java   |  21 +-
 .../cassandra/service/StorageServiceMBean.java  |  10 -
 .../cassandra/thrift/CassandraServer.java   |   2 +-
 .../org/apache/cassandra/tools/NodeProbe.java   | 109 +--
 .../org/apache/cassandra/tools/NodeTool.java|  56 +-
 .../transport/RequestThreadPoolExecutor.java|   6 +-
 .../apache/cassandra/utils/StatusLogger.java|  40 +-
 .../cassandra/utils/concurrent/WaitQueue.java   |  10 +-
 .../concurrent/LongSharedExecutorPoolTest.java  |   2 +-

[jira] [Commented] (CASSANDRA-8685) Consider upgrade to thrift 0.9.2 (or later)

2015-01-28 Thread T Jake Luciani (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295342#comment-14295342
 ] 

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

This would need to go in for 3.0 does that work?

 Consider upgrade to thrift 0.9.2 (or later)
 ---

 Key: CASSANDRA-8685
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8685
 Project: Cassandra
  Issue Type: Bug
Reporter: Adam Hattrell
Assignee: T Jake Luciani

 Folks using Astyanax and the like are subject to  
 https://issues.apache.org/jira/browse/THRIFT-1457 and may run into heap 
 pressure on the Cassandra side for larger read request, as thrift doesn't 
 reset its internal buffer.  This can lead to larger TFramedTransport 
 instances will be kept on the heap.
 I've seen at least one situation where this has saved around 1Gb of heap 
 space on average.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (CASSANDRA-8149) bump metrics-reporter-config dependency to 2.3.1

2015-01-28 Thread T Jake Luciani (JIRA)

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

T Jake Luciani reassigned CASSANDRA-8149:
-

Assignee: T Jake Luciani

 bump metrics-reporter-config dependency to 2.3.1
 

 Key: CASSANDRA-8149
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8149
 Project: Cassandra
  Issue Type: Improvement
Reporter: Pierre-Yves Ritschard
Assignee: T Jake Luciani
 Fix For: 3.0


 It would be nice to be able to take advantage of the new reporters available 
 in
 metrics-reporter-config 2.3.1 which is now available on maven central.
 If my understanding is correct, this only entails bumping the dependency in 
 build.xml.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


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

2015-01-28 Thread yukim
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/71abd220
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/71abd220
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/71abd220

Branch: refs/heads/trunk
Commit: 71abd220811be55edbd725ed12b06626f596eb08
Parents: 8896a70 ffd0ae4
Author: Yuki Morishita yu...@apache.org
Authored: Wed Jan 28 10:32:34 2015 -0600
Committer: Yuki Morishita yu...@apache.org
Committed: Wed Jan 28 10:32:34 2015 -0600

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/db/compaction/Upgrader.java | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/71abd220/src/java/org/apache/cassandra/db/compaction/Upgrader.java
--



[2/3] cassandra git commit: Fix sstableupgrade throws exception

2015-01-28 Thread yukim
Fix sstableupgrade throws exception

patch by yukim; reviewed by krummas for CASSANDRA-8688


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

Branch: refs/heads/trunk
Commit: ffd0ae4bf97591fbd2147b3dc6107e9bc69a4936
Parents: b788bb3
Author: Yuki Morishita yu...@apache.org
Authored: Wed Jan 28 10:31:52 2015 -0600
Committer: Yuki Morishita yu...@apache.org
Committed: Wed Jan 28 10:31:52 2015 -0600

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/db/compaction/Upgrader.java | 6 +-
 2 files changed, 2 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ffd0ae4b/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b976a16..7a38735 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -75,6 +75,7 @@
  * Improve JBOD disk utilization (CASSANDRA-7386)
  * Log failed host when preparing incremental repair (CASSANDRA-8228)
  * Force config client mode in CQLSSTableWriter (CASSANDRA-8281)
+ * Fix sstableupgrade throws exception (CASSANDRA-8688)
 Merged from 2.0:
  * Add batch remove iterator to ABSC (CASSANDRA-8414, 8666)
  * Round up time deltas lower than 1ms in BulkLoader (CASSANDRA-8645)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ffd0ae4b/src/java/org/apache/cassandra/db/compaction/Upgrader.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/Upgrader.java 
b/src/java/org/apache/cassandra/db/compaction/Upgrader.java
index 39f668d..5d245ac 100644
--- a/src/java/org/apache/cassandra/db/compaction/Upgrader.java
+++ b/src/java/org/apache/cassandra/db/compaction/Upgrader.java
@@ -18,7 +18,6 @@
 package org.apache.cassandra.db.compaction;
 
 import java.io.File;
-import java.io.IOException;
 import java.util.*;
 
 import com.google.common.base.Throwables;
@@ -28,8 +27,6 @@ import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.db.DecoratedKey;
 import org.apache.cassandra.io.sstable.*;
 import org.apache.cassandra.io.sstable.metadata.MetadataCollector;
-import org.apache.cassandra.utils.CLibrary;
-import org.apache.cassandra.utils.CloseableIterator;
 import org.apache.cassandra.utils.OutputHandler;
 
 public class Upgrader
@@ -92,8 +89,7 @@ public class Upgrader
 writer.append(row);
 }
 
-ListSSTableReader sstables = writer.finish();
-cfs.getDataTracker().markCompactedSSTablesReplaced(toUpgrade, 
sstables, OperationType.UPGRADE_SSTABLES);
+writer.finish();
 outputHandler.output(Upgrade of  + sstable +  complete.);
 
 }



[1/3] cassandra git commit: Fix sstableupgrade throws exception

2015-01-28 Thread yukim
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 b788bb371 - ffd0ae4bf
  refs/heads/trunk 8896a70b0 - 71abd2208


Fix sstableupgrade throws exception

patch by yukim; reviewed by krummas for CASSANDRA-8688


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

Branch: refs/heads/cassandra-2.1
Commit: ffd0ae4bf97591fbd2147b3dc6107e9bc69a4936
Parents: b788bb3
Author: Yuki Morishita yu...@apache.org
Authored: Wed Jan 28 10:31:52 2015 -0600
Committer: Yuki Morishita yu...@apache.org
Committed: Wed Jan 28 10:31:52 2015 -0600

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/db/compaction/Upgrader.java | 6 +-
 2 files changed, 2 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ffd0ae4b/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b976a16..7a38735 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -75,6 +75,7 @@
  * Improve JBOD disk utilization (CASSANDRA-7386)
  * Log failed host when preparing incremental repair (CASSANDRA-8228)
  * Force config client mode in CQLSSTableWriter (CASSANDRA-8281)
+ * Fix sstableupgrade throws exception (CASSANDRA-8688)
 Merged from 2.0:
  * Add batch remove iterator to ABSC (CASSANDRA-8414, 8666)
  * Round up time deltas lower than 1ms in BulkLoader (CASSANDRA-8645)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ffd0ae4b/src/java/org/apache/cassandra/db/compaction/Upgrader.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/Upgrader.java 
b/src/java/org/apache/cassandra/db/compaction/Upgrader.java
index 39f668d..5d245ac 100644
--- a/src/java/org/apache/cassandra/db/compaction/Upgrader.java
+++ b/src/java/org/apache/cassandra/db/compaction/Upgrader.java
@@ -18,7 +18,6 @@
 package org.apache.cassandra.db.compaction;
 
 import java.io.File;
-import java.io.IOException;
 import java.util.*;
 
 import com.google.common.base.Throwables;
@@ -28,8 +27,6 @@ import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.db.DecoratedKey;
 import org.apache.cassandra.io.sstable.*;
 import org.apache.cassandra.io.sstable.metadata.MetadataCollector;
-import org.apache.cassandra.utils.CLibrary;
-import org.apache.cassandra.utils.CloseableIterator;
 import org.apache.cassandra.utils.OutputHandler;
 
 public class Upgrader
@@ -92,8 +89,7 @@ public class Upgrader
 writer.append(row);
 }
 
-ListSSTableReader sstables = writer.finish();
-cfs.getDataTracker().markCompactedSSTablesReplaced(toUpgrade, 
sstables, OperationType.UPGRADE_SSTABLES);
+writer.finish();
 outputHandler.output(Upgrade of  + sstable +  complete.);
 
 }



[jira] [Commented] (CASSANDRA-8072) Exception during startup: Unable to gossip with any seeds

2015-01-28 Thread Russ Hatch (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295364#comment-14295364
 ] 

Russ Hatch commented on CASSANDRA-8072:
---

Thanks very much.

 Exception during startup: Unable to gossip with any seeds
 -

 Key: CASSANDRA-8072
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8072
 Project: Cassandra
  Issue Type: Bug
Reporter: Ryan Springer
Assignee: Brandon Williams
 Attachments: casandra-system-log-with-assert-patch.log


 When Opscenter 4.1.4 or 5.0.1 tries to provision a 2-node DSC 2.0.10 cluster 
 in either ec2 or locally, an error occurs sometimes with one of the nodes 
 refusing to start C*.  The error in the /var/log/cassandra/system.log is:
 ERROR [main] 2014-10-06 15:54:52,292 CassandraDaemon.java (line 513) 
 Exception encountered during startup
 java.lang.RuntimeException: Unable to gossip with any seeds
 at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1200)
 at 
 org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:444)
 at 
 org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:655)
 at 
 org.apache.cassandra.service.StorageService.initServer(StorageService.java:609)
 at 
 org.apache.cassandra.service.StorageService.initServer(StorageService.java:502)
 at 
 org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:378)
 at 
 org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:496)
 at 
 org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:585)
  INFO [StorageServiceShutdownHook] 2014-10-06 15:54:52,326 Gossiper.java 
 (line 1279) Announcing shutdown
  INFO [StorageServiceShutdownHook] 2014-10-06 15:54:54,326 
 MessagingService.java (line 701) Waiting for messaging service to quiesce
  INFO [ACCEPT-localhost/127.0.0.1] 2014-10-06 15:54:54,327 
 MessagingService.java (line 941) MessagingService has terminated the accept() 
 thread
 This errors does not always occur when provisioning a 2-node cluster, but 
 probably around half of the time on only one of the nodes.  I haven't been 
 able to reproduce this error with DSC 2.0.9, and there have been no code or 
 definition file changes in Opscenter.
 I can reproduce locally with the above steps.  I'm happy to test any proposed 
 fixes since I'm the only person able to reproduce reliably so far.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


  1   2   >