[jira] [Created] (CASSANDRA-5992) Add a logger.trace call to Tracing
Jeremiah Jordan created CASSANDRA-5992: -- Summary: Add a logger.trace call to Tracing Key: CASSANDRA-5992 URL: https://issues.apache.org/jira/browse/CASSANDRA-5992 Project: Cassandra Issue Type: Bug Components: Core Reporter: Jeremiah Jordan Priority: Minor A bunch of stuff is now written to Tracing, and there are no logging trace calls any more. If a node is having issues on the read/write path and tracing can't actually save data, there is no way to see through logging what is going on. Would be nice if we made all Tracing messages also go out at logger.trace so that you could enable that to debug stuff. Being able to change the RF of the system_traces KS might also help here, but there would still be classes of problems that it would be good to have the logging there for. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-5993) Can't create columns name 'desc'
David Semeria created CASSANDRA-5993: Summary: Can't create columns name 'desc' Key: CASSANDRA-5993 URL: https://issues.apache.org/jira/browse/CASSANDRA-5993 Project: Cassandra Issue Type: Bug Reporter: David Semeria Priority: Minor Fix For: 2.0 create table test ( id text primary key, desc text); Bad Request: line 1:41 mismatched input 'desc' expecting ')' -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5993) Can't create CQL columns named 'desc'
[ https://issues.apache.org/jira/browse/CASSANDRA-5993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Semeria updated CASSANDRA-5993: - Summary: Can't create CQL columns named 'desc' (was: Can't create columns name 'desc') Can't create CQL columns named 'desc' - Key: CASSANDRA-5993 URL: https://issues.apache.org/jira/browse/CASSANDRA-5993 Project: Cassandra Issue Type: Bug Reporter: David Semeria Priority: Minor Fix For: 2.0 create table test ( id text primary key, desc text); Bad Request: line 1:41 mismatched input 'desc' expecting ')' -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (CASSANDRA-4131) Integrate Hive support to be in core cassandra
[ https://issues.apache.org/jira/browse/CASSANDRA-4131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13759019#comment-13759019 ] Cyril Scetbon edited comment on CASSANDRA-4131 at 9/10/13 9:33 AM: --- I tried your README documentation (I was almost doing the same things) and I got the same error http://pastebin.com/KTRPx2Fh. As you can see I got no error with the creation of the column family messages that didn't exist. I can't understand how your tests (SELECT * FROM xxx) successfully worked with this incompatible cast … Any more information about that ? was (Author: cscetbon): I tried your README documentation (I was almost doing the same things) and I got the same error http://pastebin.com/KTRPx2Fh. As you can see I got no error with the creation of the column family messages that didn't exist. Integrate Hive support to be in core cassandra -- Key: CASSANDRA-4131 URL: https://issues.apache.org/jira/browse/CASSANDRA-4131 Project: Cassandra Issue Type: Improvement Reporter: Jeremy Hanna Assignee: Edward Capriolo Labels: hadoop, hive The standalone hive support (at https://github.com/riptano/hive) would be great to have in-tree so that people don't have to go out to github to download it and wonder if it's a left-for-dead external shim. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5883) Switch to Logback
[ https://issues.apache.org/jira/browse/CASSANDRA-5883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13762916#comment-13762916 ] Mck SembWever commented on CASSANDRA-5883: -- Has log4j2 been considered? Both log4j (old) and logback has awful java code in its internals using synchronised blocks/methods. log4j2 seems to take a large step forward here and ensures an application won't lock up in the same way a log4j/logback application can. Such contention locks are not unusual once you increase logging in any high concurrent application. log4j2 can be more than 1000x times faster… http://logging.apache.org/log4j/2.x/manual/async.html#Performance Switch to Logback - Key: CASSANDRA-5883 URL: https://issues.apache.org/jira/browse/CASSANDRA-5883 Project: Cassandra Issue Type: Bug Components: Core, Tools Reporter: Jonathan Ellis Assignee: Dave Brosius Priority: Minor Fix For: 2.1 Attachments: 0001-Additional-migration-to-logback.patch, 5883-1.txt, 5883-additional1.txt, 5883.txt Logback has a number of advantages over log4j, and switching will be straightforward since we are already using the slf4j translation layer: http://logback.qos.ch/reasonsToSwitch.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5078) save compaction merge counts in a system table
[ https://issues.apache.org/jira/browse/CASSANDRA-5078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13762966#comment-13762966 ] lantao yan commented on CASSANDRA-5078: --- sorry for the late update. pretty busy recently. even missed Jonathan's London meetup. :) For the conflict on the entry, I don't quite get it. I read the code, it seems like one directory (one column family) will be owned by one thread? so there won't be any chances, two threads are working on the same column family with the same timestamp? I could be wrong. If I miss something, please let me know. save compaction merge counts in a system table -- Key: CASSANDRA-5078 URL: https://issues.apache.org/jira/browse/CASSANDRA-5078 Project: Cassandra Issue Type: Improvement Reporter: Matthew F. Dennis Assignee: lantao yan Priority: Minor Labels: lhf Attachments: 5078-v3.txt, 5078-v4.txt, patch1.patch we should save the compaction merge stats from CASSANDRA-4894 in the system table and probably expose them via JMX (and nodetool) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CASSANDRA-5816) [PATCH] Debian packaging: also recommend chrony and ptpd in addition to ntp
[ https://issues.apache.org/jira/browse/CASSANDRA-5816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams resolved CASSANDRA-5816. - Resolution: Fixed [PATCH] Debian packaging: also recommend chrony and ptpd in addition to ntp --- Key: CASSANDRA-5816 URL: https://issues.apache.org/jira/browse/CASSANDRA-5816 Project: Cassandra Issue Type: Improvement Components: Packaging Affects Versions: 1.2.7 Reporter: Blair Zajac Assignee: Blair Zajac Priority: Minor Fix For: 2.0.1, 1.2.9 I'm switching my Ubuntu servers running Cassandra from ntp to chrony for the reasons cited here when Fedora made the switch to have chrony be the default NTP client: http://fedoraproject.org/wiki/Features/ChronyDefaultNTP Currently, the debian packaging recommends only ntp so if chrony is installed it'll want to remove it and install ntp. I also added ptpd, the Precision Time Protocol daemon, which is another time syncing server for completeness. Please apply this to the 1.2 branch so the next 1.2.x release can deploy with chrony. Below is the patch since it's a one-liner. Thanks, Blair --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Standards-Version: 3.8.3 Package: cassandra Architecture: all Depends: openjdk-6-jre-headless (= 6b11) | java6-runtime, jsvc (= 1.0), libcommons-daemon-java (= 1.0), adduser, libjna-java, python (= 2.5), python-support (= 0.90.0), ${misc:Depends} -Recommends: ntp +Recommends: chrony | ntp | ptpd Conflicts: apache-cassandra1 Replaces: apache-cassandra1 Description: distributed storage system for structured data -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5910) Most CQL3 functions should handle null gracefully
[ https://issues.apache.org/jira/browse/CASSANDRA-5910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-5910: Attachment: 5910-v2.txt Sounds good to me. Attaching v2 that just makes all existing function handle null correctly (token() will return null as soon as any one of its argument is null). We can see later for what we do when returning null doesn't fly anymore. Most CQL3 functions should handle null gracefully - Key: CASSANDRA-5910 URL: https://issues.apache.org/jira/browse/CASSANDRA-5910 Project: Cassandra Issue Type: Bug Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.10 Attachments: 5910.txt, 5910-v2.txt Currently, we don't allow null parameters for functions. So {noformat} UPDATE test SET d=dateOf(null) WHERE k=0 {noformat} is basically an invalid query. Unfortunately, there's at least one case where we don't validate correctly, namely if we do: {noformat} SELECT k, dateOf(t) FROM test {noformat} In that case, if for any of the row {{t}} is null, we end up with a server side NPE. But more importantly, throwing an InvalidException in that case would be pretty inconvenient and actually somewhat wrong since the query is not invalid in itself. So, at least in that latter case, we want {{dateOf(t) == null}} when {{t == null}}. And if we do that, I suggest making it always the case (i.e. make the first query valid but assigning {{null}} to {{d}}). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5960) Remove 1.2 network compatibility code from 2.1
[ https://issues.apache.org/jira/browse/CASSANDRA-5960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13763028#comment-13763028 ] Sylvain Lebresne commented on CASSANDRA-5960: - The patch needs rebasing but lgtm otherwise, except maybe for the IncomingTcpConnection change: even if we don't understand pre-2.0 format, could be nice to still log some meaningful exception if a 1.2 node talk to us rather than assuming current version. Remove 1.2 network compatibility code from 2.1 -- Key: CASSANDRA-5960 URL: https://issues.apache.org/jira/browse/CASSANDRA-5960 Project: Cassandra Issue Type: Improvement Reporter: Aleksey Yeschenko Assignee: Aleksey Yeschenko Priority: Trivial Fix For: 2.1 Attachments: 5960.txt Clean up the special-case code added for compatibility with 1.2 (reads) for the move to composites instead of supercolumns (CASSANDRA-3237, CASSANDRA-5123) and explicit timestamps in all read commands (CASSANDRA-5149). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5953) Replication validation is broken
[ https://issues.apache.org/jira/browse/CASSANDRA-5953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13763057#comment-13763057 ] Sylvain Lebresne commented on CASSANDRA-5953: - I don't know how much that matters, but as far as I can tell, we've never validated such a thing (I'm able to reproduce the exact same with the cli on 1.2 at least). Which leads me to the question: do we really want to refuse it? Feels to me that handling non-existing nodes the same way than dead ones is rather sane. And actually I think that refusing this could be a tad painful if someone wants to up its RF. Replication validation is broken Key: CASSANDRA-5953 URL: https://issues.apache.org/jira/browse/CASSANDRA-5953 Project: Cassandra Issue Type: Bug Components: Core Reporter: Jonathan Ellis Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.10 On my local, single node cluster, RF=3 inserts should not succeed: {noformat} cqlsh CREATE KEYSPACE mykeyspace WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 3 }; cqlsh use mykeyspace ; cqlsh:mykeyspace CREATE TABLE users ( ... user_id int PRIMARY KEY, ... fname text, ... lname text ... ); cqlsh:mykeyspace INSERT INTO users (user_id, fname, lname) ... VALUES (1745, 'john', 'smith'); cqlsh:mykeyspace select * from users; user_id | fname | lname -+---+--- 1745 | john | smith {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CASSANDRA-5991) COPY FROM failing on maps with Unmatched named substitution
[ https://issues.apache.org/jira/browse/CASSANDRA-5991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko reassigned CASSANDRA-5991: Assignee: Aleksey Yeschenko COPY FROM failing on maps with Unmatched named substitution - Key: CASSANDRA-5991 URL: https://issues.apache.org/jira/browse/CASSANDRA-5991 Project: Cassandra Issue Type: Bug Environment: Cassandra 1.2.9 installed via Homebrew on OS X. Reporter: Christopher J. Bottaro Assignee: Aleksey Yeschenko I created a dump using COPY TO, but then the dump won't load with COPY FROM. $ echo COPY applications TO 'dev_development.csv'; | cqlsh -k dev_development localhost 776 rows exported in 7.935 seconds. $ echo COPY applications FROM 'dev_development.csv'; | cqlsh -k beta_development localhost stdin:2:Unmatched named substitution: '27' not given for 'INSERT INTO beta_development.applications (version, id, answers) VALUES (\'2013-01-22 13:52:11-0600\', 219, {1: \'{result:Izaiah}\', 2: \'{result:Maegan}\', 3: \'{result:Bergstrom}\', 4: \'{result:1-617-729-8621 x05429}\', 5: \'{result:Mailing/Shipping Address}\', 6: \'{result:257 O\'Reilly Tunnel}\', 7: \'{result:null}\', 8: \'{result:Sauerberg}\', 9: \'{result:null}\', 10: \'{result:Washington}\', 11: \'{result:99043-3492}\', 12: \'{result:Peru}\', 13: \'{result:null}\', 14: \'{result:Male}\', 15: \'{result:6/5/1980}\', 16: \'{result:American Indian or Alaska Native (not Hispanic or Latino)}\', 17: \'{result:Refugee or Protected Person}\', 18: \'{result:5/10/2011}\', 19: \'{result:[Indiana University-South Bend,IVY Tech-South Bend]}\', 20: \'{result:[Band,Basketball,Hockey]}\', 21: \'{result:Robertsville}\', 22: \'{result:null}\', 23: \'{result:OH}\', 24: \'{result:83615-4544}\', 25: \'{result:Planning to file}\', 26: \'{result:[]}\', 27: \'{result:null}\', 28: \'{result:null}\', 29: \'{result:Nemo odio et repellendus dolores quis non ut. Ut sint labore nostrum. Quo odit at explicabo veniam necessitatibus error aliquid.br /Magni saepe nam et deleniti. Laudantium aut rerum accusantium voluptatem voluptas. Incidunt facere rerum veritatis aliquid deleniti ut. Qui non ea dicta officiis deserunt.br /Aut voluptas sapiente non omnis optio illum laboriosam. Voluptatem veritatis quibusdam aperiam. Vero ipsum facere accusamus aut cumque vel.br /Dolorem tenetur ut occaecati quia eos assumenda. Officiis doloribus similique id harum corporis quas. Quis occaecati sint aut fugiat ut nisi voluptas culpa. Ea illo maxime ut nobis beatae qui. Velit est quasi earum autem totam ab repudiandae fuga.br /Maiores sint et sed. Non fugit esse molestiae. Eum praesentium quae sapiente repellendus. Aut ipsam alias dolor ducimus eum debitis eaque id.br /Et provident ad ut ullam mollitia laboriosam doloremque ex. Quo quia id qui omnis quos numquam. Cum ratione ab est. Quia aspernatur et cum iusto voluptas saepe voluptatem. Veniam et doloribus quam.br /Exercitationem quis reiciendis explicabo assumenda. Amet sit consequatur enim aut et veniam quia. Inventore et iusto autem ea praesentium voluptates. Nostrum vel minima quasi recusandae. Vel enim veniam omnis.br /Consequuntur modi laborum est aut repellendus occaecati. Vero hic mollitia consequuntur. Quas quia ut et. Sed sunt unde dolore. Explicabo amet error sunt.br /Sunt cupiditate provident aut. Aliquam suscipit quaerat culpa consectetur ab. Et optio nesciunt impedit doloremque quis facere quae dolorum.}\', 32: \'{result:678}\', 33: \'{result:84}\', 34: \'{result:1.52}\', 35: \'{result:Undergraduate Studies}\', 36: \'{result:5296}\', 37: \'{result:6612}\', 38: \'{result:1311}\', 39: \'{result:27}\'})' stdin:2:Aborting import at record #28 (line 29). Previously-inserted values still present. 28 rows imported in 0.325 seconds. Please let me know what other information I can provide. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5994) Allow empty CQL3 batches (as no-op)
[ https://issues.apache.org/jira/browse/CASSANDRA-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-5994: - Reviewer: iamaleksey Allow empty CQL3 batches (as no-op) --- Key: CASSANDRA-5994 URL: https://issues.apache.org/jira/browse/CASSANDRA-5994 Project: Cassandra Issue Type: Improvement Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Trivial Fix For: 1.2.10 Attachments: 5994.txt The CQL3 parser doesn't allow empty batch statements and bitches with a parsing error. While clients should probably make sure they don't generate empty batches as it's useless, it's easy for client that general batch requests to forget handling the empty case, ending up sending an empty batch. it's a tad annoying to get a runtime error in production just for that. Let just it being a no-op. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
git commit: Remove 1.2 network compatibility code
Updated Branches: refs/heads/trunk b21a0dab5 - 4f5242cfb Remove 1.2 network compatibility code patch by Aleksey Yeschenko; reviewed by Sylvain Lebresne for CASSANDRA-5960 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4f5242cf Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4f5242cf Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4f5242cf Branch: refs/heads/trunk Commit: 4f5242cfbfb302e8099cb514ea78f134fef84d45 Parents: b21a0da Author: Aleksey Yeschenko alek...@apache.org Authored: Tue Sep 10 17:13:01 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Tue Sep 10 17:13:01 2013 +0300 -- CHANGES.txt | 2 + .../apache/cassandra/db/RangeSliceCommand.java | 130 --- .../org/apache/cassandra/db/ReadCommand.java| 46 +-- .../cassandra/db/SliceByNamesReadCommand.java | 102 +++ .../cassandra/db/SliceFromReadCommand.java | 89 +++-- .../apache/cassandra/db/filter/QueryPath.java | 111 .../cassandra/net/IncomingTcpConnection.java| 15 +-- .../apache/cassandra/service/StorageProxy.java | 2 +- 8 files changed, 73 insertions(+), 424 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f5242cf/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index d1440cc..1f20fa0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,8 @@ * change logging from log4j to logback (CASSANDRA-5883) * switch to LZ4 compression for internode communication (CASSANDRA-5887) * Stop using Thrift-generated Index* classes internally (CASSANDRA-5971) + * Remove 1.2 network compatibility code (CASSANDRA-5960) + 2.0.1 * Improve error message when yaml contains invalid properties (CASSANDRA-5958) http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f5242cf/src/java/org/apache/cassandra/db/RangeSliceCommand.java -- diff --git a/src/java/org/apache/cassandra/db/RangeSliceCommand.java b/src/java/org/apache/cassandra/db/RangeSliceCommand.java index 5e8788c..28b86f8 100644 --- a/src/java/org/apache/cassandra/db/RangeSliceCommand.java +++ b/src/java/org/apache/cassandra/db/RangeSliceCommand.java @@ -20,16 +20,15 @@ package org.apache.cassandra.db; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; -import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; +import com.google.common.base.Objects; + import org.apache.cassandra.config.CFMetaData; import org.apache.cassandra.config.Schema; import org.apache.cassandra.db.filter.ExtendedFilter; import org.apache.cassandra.db.filter.IDiskAtomFilter; -import org.apache.cassandra.db.marshal.AbstractType; -import org.apache.cassandra.db.marshal.CompositeType; import org.apache.cassandra.dht.AbstractBounds; import org.apache.cassandra.io.IVersionedSerializer; import org.apache.cassandra.net.MessageOut; @@ -46,37 +45,37 @@ public class RangeSliceCommand extends AbstractRangeCommand implements Pageable public final boolean isPaging; public RangeSliceCommand(String keyspace, - String column_family, + String columnFamily, long timestamp, IDiskAtomFilter predicate, AbstractBoundsRowPosition range, int maxResults) { -this(keyspace, column_family, timestamp, predicate, range, null, maxResults, false, false); +this(keyspace, columnFamily, timestamp, predicate, range, null, maxResults, false, false); } public RangeSliceCommand(String keyspace, - String column_family, + String columnFamily, long timestamp, IDiskAtomFilter predicate, AbstractBoundsRowPosition range, ListIndexExpression row_filter, int maxResults) { -this(keyspace, column_family, timestamp, predicate, range, row_filter, maxResults, false, false); +this(keyspace, columnFamily, timestamp, predicate, range, row_filter, maxResults, false, false); } public RangeSliceCommand(String keyspace, - String column_family, + String columnFamily, long timestamp, IDiskAtomFilter predicate, AbstractBoundsRowPosition range, -
[jira] [Updated] (CASSANDRA-5910) Most CQL3 functions should handle null gracefully
[ https://issues.apache.org/jira/browse/CASSANDRA-5910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-5910: - Reviewer: iamaleksey Most CQL3 functions should handle null gracefully - Key: CASSANDRA-5910 URL: https://issues.apache.org/jira/browse/CASSANDRA-5910 Project: Cassandra Issue Type: Bug Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.10 Attachments: 5910.txt, 5910-v2.txt Currently, we don't allow null parameters for functions. So {noformat} UPDATE test SET d=dateOf(null) WHERE k=0 {noformat} is basically an invalid query. Unfortunately, there's at least one case where we don't validate correctly, namely if we do: {noformat} SELECT k, dateOf(t) FROM test {noformat} In that case, if for any of the row {{t}} is null, we end up with a server side NPE. But more importantly, throwing an InvalidException in that case would be pretty inconvenient and actually somewhat wrong since the query is not invalid in itself. So, at least in that latter case, we want {{dateOf(t) == null}} when {{t == null}}. And if we do that, I suggest making it always the case (i.e. make the first query valid but assigning {{null}} to {{d}}). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-5995) Cassandra-shuffle causes NumberFormatException
William Montaz created CASSANDRA-5995: - Summary: Cassandra-shuffle causes NumberFormatException Key: CASSANDRA-5995 URL: https://issues.apache.org/jira/browse/CASSANDRA-5995 Project: Cassandra Issue Type: Bug Components: Tools Environment: Amazon EC2 Reporter: William Montaz Using Cassandra-shuffle create, then Cassandra-shuffle en causes a NumbertFormatException : Extract from output.log INFO 15:01:28,935 Enabling scheduled transfers of token ranges INFO 15:01:28,957 Initiating transfer of 3059156119944164299 (scheduled at Tue Sep 10 15:01:19 UTC 2013) WARN 15:01:28,962 Token 3059156119944164299 changing ownership from /10.36.194.173 to /10.39.67.29 WARN 15:01:28,967 Token 3059156119944164299 changing ownership from /10.36.194.173 to /10.39.67.29 INFO 15:01:28,968 RELOCATING: relocating [3059156119944164299] to 10.39.67.29 INFO 15:01:28,968 RELOCATING: Sleeping 3 ms before start streaming/fetching ranges ERROR 15:01:29,331 Exception in thread Thread[GossipStage:8,5,main] java.lang.NumberFormatException: For input string: at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Long.parseLong(Long.java:453) at java.lang.Long.valueOf(Long.java:540) at org.apache.cassandra.dht.Murmur3Partitioner$1.fromString(Murmur3Partitioner.java:183) at org.apache.cassandra.service.StorageService.handleStateRelocating(StorageService.java:1490) at org.apache.cassandra.service.StorageService.onChange(StorageService.java:1180) at org.apache.cassandra.gms.Gossiper.doNotifications(Gossiper.java:956) at org.apache.cassandra.gms.Gossiper.applyNewStates(Gossiper.java:947) at org.apache.cassandra.gms.Gossiper.applyStateLocally(Gossiper.java:905) at org.apache.cassandra.gms.GossipDigestAckVerbHandler.doVerb(GossipDigestAckVerbHandler.java:57) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:56) 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:724) ERROR 15:01:30,098 Exception in thread Thread[GossipStage:9,5,main] java.lang.NumberFormatException: For input string: at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Long.parseLong(Long.java:453) at java.lang.Long.valueOf(Long.java:540) at org.apache.cassandra.dht.Murmur3Partitioner$1.fromString(Murmur3Partitioner.java:183) at org.apache.cassandra.service.StorageService.handleStateRelocating(StorageService.java:1490) at org.apache.cassandra.service.StorageService.onChange(StorageService.java:1180) at org.apache.cassandra.gms.Gossiper.doNotifications(Gossiper.java:956) at org.apache.cassandra.gms.Gossiper.applyNewStates(Gossiper.java:947) at org.apache.cassandra.gms.Gossiper.applyStateLocally(Gossiper.java:905) at org.apache.cassandra.gms.GossipDigestAck2VerbHandler.doVerb(GossipDigestAck2VerbHandler.java:49) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:56) 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:724) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
git commit: Fix merge (s//= in CompositesSearcher)
Updated Branches: refs/heads/cassandra-2.0 096f2bf92 - 1ff0d8e9f Fix merge (s//= in CompositesSearcher) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1ff0d8e9 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1ff0d8e9 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1ff0d8e9 Branch: refs/heads/cassandra-2.0 Commit: 1ff0d8e9f653b7575caa0f2c09e59ff51c79a8ad Parents: 096f2bf Author: Aleksey Yeschenko alek...@apache.org Authored: Tue Sep 10 18:23:03 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Tue Sep 10 18:23:03 2013 +0300 -- .../apache/cassandra/db/index/composites/CompositesSearcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1ff0d8e9/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java -- diff --git a/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java b/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java index 011839e..0c2cfbc 100644 --- a/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java +++ b/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java @@ -138,7 +138,7 @@ public class CompositesSearcher extends SecondaryIndexSearcher { // Did we get more columns that needed to respect the user limit? // (but we still need to return what has been fetched already) -if (columnsCount limit) +if (columnsCount = limit) return makeReturn(currentKey, data); if (indexColumns == null || indexColumns.isEmpty())
[2/2] git commit: Merge branch 'cassandra-2.0' into trunk
Merge branch 'cassandra-2.0' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/38226121 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/38226121 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/38226121 Branch: refs/heads/trunk Commit: 3822612182c9c1c82ce580016ad8c6de07ff99c3 Parents: 36610aa 1ff0d8e Author: Aleksey Yeschenko alek...@apache.org Authored: Tue Sep 10 18:23:51 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Tue Sep 10 18:23:51 2013 +0300 -- .../apache/cassandra/db/index/composites/CompositesSearcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/38226121/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java --
[1/2] git commit: Fix merge (s//= in CompositesSearcher)
Updated Branches: refs/heads/trunk 36610aaf7 - 382261218 Fix merge (s//= in CompositesSearcher) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1ff0d8e9 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1ff0d8e9 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1ff0d8e9 Branch: refs/heads/trunk Commit: 1ff0d8e9f653b7575caa0f2c09e59ff51c79a8ad Parents: 096f2bf Author: Aleksey Yeschenko alek...@apache.org Authored: Tue Sep 10 18:23:03 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Tue Sep 10 18:23:03 2013 +0300 -- .../apache/cassandra/db/index/composites/CompositesSearcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1ff0d8e9/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java -- diff --git a/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java b/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java index 011839e..0c2cfbc 100644 --- a/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java +++ b/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java @@ -138,7 +138,7 @@ public class CompositesSearcher extends SecondaryIndexSearcher { // Did we get more columns that needed to respect the user limit? // (but we still need to return what has been fetched already) -if (columnsCount limit) +if (columnsCount = limit) return makeReturn(currentKey, data); if (indexColumns == null || indexColumns.isEmpty())
[1/2] git commit: Correctly handle limits in CompositesSearcher
Updated Branches: refs/heads/cassandra-2.0 52678a284 - 096f2bf92 Correctly handle limits in CompositesSearcher patch by Aleksey Yeschenko; reviewed by Sylvain Lebresne for CASSANDRA-5975 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/caef32e5 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/caef32e5 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/caef32e5 Branch: refs/heads/cassandra-2.0 Commit: caef32e5d67c3b093de53bf99479cd457169178c Parents: 30f5e56 Author: Aleksey Yeschenko alek...@apache.org Authored: Tue Sep 10 17:41:04 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Tue Sep 10 17:41:04 2013 +0300 -- CHANGES.txt | 1 + .../apache/cassandra/db/ColumnFamilyStore.java | 2 +- .../db/index/composites/CompositesSearcher.java | 55 +++- 3 files changed, 33 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/caef32e5/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index a282670..2328bf7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,7 @@ * Make user-defined compaction JMX blocking (CASSANDRA-4952) * Fix streaming does not transfer wrapped range (CASSANDRA-5948) * Fix loading index summary containing empty key (CASSANDRA-5965) + * Correctly handle limits in CompositesSearcher (CASSANDRA-5975) 1.2.9 http://git-wip-us.apache.org/repos/asf/cassandra/blob/caef32e5/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 22b1dd5..745b5ba 100644 --- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java +++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java @@ -1497,7 +1497,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean try { -while (rowIterator.hasNext() rows.size() filter.maxRows() columnsCount filter.maxColumns()) +while (rowIterator.hasNext() matched filter.maxRows() columnsCount filter.maxColumns()) { // get the raw columns requested, and additional columns for the expressions if necessary Row rawRow = rowIterator.next(); http://git-wip-us.apache.org/repos/asf/cassandra/blob/caef32e5/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java -- diff --git a/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java b/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java index 4817a00..1e9d59d 100644 --- a/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java +++ b/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java @@ -21,6 +21,9 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.util.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.apache.cassandra.db.*; import org.apache.cassandra.db.filter.*; import org.apache.cassandra.db.index.AbstractSimplePerColumnSecondaryIndex; @@ -34,8 +37,6 @@ import org.apache.cassandra.dht.Range; import org.apache.cassandra.thrift.IndexExpression; import org.apache.cassandra.thrift.IndexOperator; import org.apache.cassandra.utils.ByteBufferUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class CompositesSearcher extends SecondaryIndexSearcher { @@ -111,10 +112,10 @@ public class CompositesSearcher extends SecondaryIndexSearcher final CompositeType baseComparator = (CompositeType)baseCfs.getComparator(); final CompositeType indexComparator = (CompositeType)index.getIndexCfs().getComparator(); -CompositeType.Builder builder = null; +final ByteBuffer startPrefix; if (startKey.remaining() 0) { -builder = indexComparator.builder().add(startKey); +CompositeType.Builder builder = indexComparator.builder().add(startKey); // For names filter, we have no choice but to query from the beginning of the key. This can be highly inefficient however. if (filter.originalFilter() instanceof SliceQueryFilter) { @@ -122,12 +123,17 @@ public class CompositesSearcher extends SecondaryIndexSearcher for (int i = 0; i Math.min(prefixSize, components.length); ++i) builder.add(components[i]); } +startPrefix = builder.build(); +} +else +{ +startPrefix =
[jira] [Updated] (CASSANDRA-5894) CQL-aware SSTableWriter
[ https://issues.apache.org/jira/browse/CASSANDRA-5894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeremiah Jordan updated CASSANDRA-5894: --- Summary: CQL-aware SSTableWriter (was: CQL-aware SSTable Writer) CQL-aware SSTableWriter --- Key: CASSANDRA-5894 URL: https://issues.apache.org/jira/browse/CASSANDRA-5894 Project: Cassandra Issue Type: New Feature Components: Tools Reporter: Jonathan Ellis Priority: Minor SSTableSimple[Un]SortedWriter requires defining raw comparators and inserting raw data cells. We should create a CQL-aware alternative. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5987) IllegalArgumentException when bulk loading
[ https://issues.apache.org/jira/browse/CASSANDRA-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13763092#comment-13763092 ] Henrik Baastrup commented on CASSANDRA-5987: Hi Yuki, I see your point! I have now simplified my program and table so I do not use composite keys, but only one primary key; I use a UUID I generate on the fly for this. The problem remain, I still get the IllegalArgumentException. I changed my create table statement as follow: {quote} CREATE TABLE nsmo_dns ( key uuid PRIMARY KEY, endtime bigint, lastframetime bigint, . . {quote} and my SSTableSimpleUnsortedWriter create statement is as follow: {quote} new SSTableSimpleUnsortedWriter( directory, partitioner, keyspace, columnFamily, UUIDType.instance, null, BUFFER_SIZE); {quote} My write looks like this now: {quote} public void write(SSTableSimpleUnsortedWriter writer, long timestamp) throws IOException { writer.newRow(ByteBuffer.wrap(decompose(key))); writer.addColumn(toBufferWithShortLength(endtime), bytes(endtime), timestamp); writer.addColumn(toBufferWithShortLength(lastframetime), bytes(lastframetime), timestamp); writer.addColumn(bytes(begintime), bytes(begintime), timestamp); . . {quote} As I see it, either does SSTableSimpleUnsortedWriter not write the length of the column name in front of it, or the AbstractCompositeType in the Cassandra engine expect a length of the column name where there is none. Of cause, there exist also the possibility that I have missed something ;) IllegalArgumentException when bulk loading -- Key: CASSANDRA-5987 URL: https://issues.apache.org/jira/browse/CASSANDRA-5987 Project: Cassandra Issue Type: Bug Components: Core Environment: Cassandra 2.0.0 on Linux Reporter: Henrik Baastrup Attachments: CassandraLoader.tgz I have created SSTables with the org.apache.cassandra.io.sstable.SSTableSimpleUnsortedWriter class, but when I try to load the SSTables with sstableloader -d localhost nsmo_ds/nsmo_ds I get: WARN 13:46:40,875 [Stream #7d0193a0-1945-11e3-ac84-f9df5751357f] Stream failed Streaming to the following hosts failed: {quote} [/127.0.0.1] java.util.concurrent.ExecutionException: org.apache.cassandra.streaming.StreamException: Stream failed WARN 13:46:40,877 [Stream #7d0193a0-1945-11e3-ac84-f9df5751357f] Stream failed ERROR 13:46:40,877 [Stream #7d0193a0-1945-11e3-ac84-f9df5751357f] Streaming error occurred java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcherImpl.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(Unknown Source) at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source) at sun.nio.ch.IOUtil.write(Unknown Source) at sun.nio.ch.SocketChannelImpl.write(Unknown Source) at org.apache.cassandra.streaming.messages.StreamMessage.serialize(StreamMessage.java:43) at org.apache.cassandra.streaming.ConnectionHandler$OutgoingMessageHandler.sendMessage(ConnectionHandler.java:384) at org.apache.cassandra.streaming.ConnectionHandler$OutgoingMessageHandler.run(ConnectionHandler.java:372) at java.lang.Thread.run(Unknown Source) WARN 13:46:40,877 [Stream #7d0193a0-1945-11e3-ac84-f9df5751357f] Stream failed {quote} in the server log I have: {quote} ERROR [STREAM-IN-/172.27.14.242] 2013-09-09 13:46:40,859 StreamSession.java (line 409) [Stream #7d0193a0-1945-11e3-ac84-f9df5751357f] Streaming error occurred java.io.IOException: Too many retries for Header (cfId: 976cb58f-d1f4-39c6-b6cc-8aea7a64daca, #0, version: ja, estimated keys: 62208, transfer size: 54794676, compressed?: false) at org.apache.cassandra.streaming.StreamSession.doRetry(StreamSession.java:522) at org.apache.cassandra.streaming.messages.FileMessage$1.deserialize(FileMessage.java:59) at org.apache.cassandra.streaming.messages.FileMessage$1.deserialize(FileMessage.java:45) at org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:54) at org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:287) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.IllegalArgumentException at java.nio.Buffer.limit(Unknown Source) at org.apache.cassandra.db.marshal.AbstractCompositeType.getBytes(AbstractCompositeType.java:55) at org.apache.cassandra.db.marshal.AbstractCompositeType.getWithShortLength(AbstractCompositeType.java:64) at org.apache.cassandra.db.marshal.AbstractCompositeType.split(AbstractCompositeType.java:130) at org.apache.cassandra.io.sstable.ColumnNameHelper.minComponents(ColumnNameHelper.java:101) at
[2/2] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.0 Conflicts: CHANGES.txt src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/096f2bf9 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/096f2bf9 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/096f2bf9 Branch: refs/heads/cassandra-2.0 Commit: 096f2bf92049ad3d955eb1189526800c8292dd94 Parents: 52678a2 caef32e Author: Aleksey Yeschenko alek...@apache.org Authored: Tue Sep 10 17:58:19 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Tue Sep 10 17:58:19 2013 +0300 -- CHANGES.txt | 2 ++ .../apache/cassandra/db/ColumnFamilyStore.java | 2 +- .../db/index/composites/CompositesSearcher.java | 26 +--- 3 files changed, 14 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/096f2bf9/CHANGES.txt -- diff --cc CHANGES.txt index abbb4f9,2328bf7..22fa74b --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -23,54 -7,15 +23,56 @@@ Merged from 1.2 * Allow disabling SlabAllocator (CASSANDRA-5935) * Make user-defined compaction JMX blocking (CASSANDRA-4952) * Fix streaming does not transfer wrapped range (CASSANDRA-5948) + * Fix loading index summary containing empty key (CASSANDRA-5965) + * Correctly handle limits in CompositesSearcher (CASSANDRA-5975) -1.2.9 +2.0.0 + * Fix thrift validation when inserting into CQL3 tables (CASSANDRA-5138) + * Fix periodic memtable flushing behavior with clean memtables (CASSANDRA-5931) + * Fix dateOf() function for pre-2.0 timestamp columns (CASSANDRA-5928) + * Fix SSTable unintentionally loads BF when opened for batch (CASSANDRA-5938) + * Add stream session progress to JMX (CASSANDRA-4757) + * Fix NPE during CAS operation (CASSANDRA-5925) +Merged from 1.2: * Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900) - * migrate 1.1 schema_columnfamilies.key_alias column to key_aliases - (CASSANDRA-5800) - * add --migrate option to sstableupgrade and sstablescrub (CASSANDRA-5831) + * Don't announce schema version until we've loaded the changes locally + (CASSANDRA-5904) + * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) + * Properly handle parsing huge map and set literals (CASSANDRA-5893) + + +2.0.0-rc2 + * enable vnodes by default (CASSANDRA-5869) + * fix CAS contention timeout (CASSANDRA-5830) + * fix HsHa to respect max frame size (CASSANDRA-4573) + * Fix (some) 2i on composite components omissions (CASSANDRA-5851) + * cqlsh: add DESCRIBE FULL SCHEMA variant (CASSANDRA-5880) +Merged from 1.2: + * Correctly validate sparse composite cells in scrub (CASSANDRA-5855) + * Add KeyCacheHitRate metric to CF metrics (CASSANDRA-5868) + * cqlsh: add support for multiline comments (CASSANDRA-5798) + * Handle CQL3 SELECT duplicate IN restrictions on clustering columns + (CASSANDRA-5856) + + +2.0.0-rc1 + * improve DecimalSerializer performance (CASSANDRA-5837) + * fix potential spurious wakeup in AsyncOneResponse (CASSANDRA-5690) + * fix schema-related trigger issues (CASSANDRA-5774) + * Better validation when accessing CQL3 table from thrift (CASSANDRA-5138) + * Fix assertion error during repair (CASSANDRA-5801) + * Fix range tombstone bug (CASSANDRA-5805) + * DC-local CAS (CASSANDRA-5797) + * Add a native_protocol_version column to the system.local table (CASSANRDA-5819) + * Use index_interval from cassandra.yaml when upgraded (CASSANDRA-5822) + * Fix buffer underflow on socket close (CASSANDRA-5792) +Merged from 1.2: + * Fix reading DeletionTime from 1.1-format sstables (CASSANDRA-5814) + * cqlsh: add collections support to COPY (CASSANDRA-5698) + * retry important messages for any IOException (CASSANDRA-5804) + * Allow empty IN relations in SELECT/UPDATE/DELETE statements (CASSANDRA-5626) + * cqlsh: fix crashing on Windows due to libedit detection (CASSANDRA-5812) * fix bulk-loading compressed sstables (CASSANDRA-5820) * (Hadoop) fix quoting in CqlPagingRecordReader and CqlRecordWriter (CASSANDRA-5824) http://git-wip-us.apache.org/repos/asf/cassandra/blob/096f2bf9/src/java/org/apache/cassandra/db/ColumnFamilyStore.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/096f2bf9/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java -- diff --cc src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java index f9b7b11,1e9d59d..011839e ---
[jira] [Comment Edited] (CASSANDRA-5987) IllegalArgumentException when bulk loading
[ https://issues.apache.org/jira/browse/CASSANDRA-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13763092#comment-13763092 ] Henrik Baastrup edited comment on CASSANDRA-5987 at 9/10/13 3:00 PM: - Hi Yuki, I see your point! I have now simplified my program and table so I do not use composite keys, but only one primary key; I use a UUID I generate on the fly for this. The problem remain, I still get the IllegalArgumentException. I changed my create table statement as follow: {quote} CREATE TABLE nsmo_dns ( key uuid PRIMARY KEY, endtime bigint, lastframetime bigint, . . {quote} no PRIMARY KEY (callsequencenumber,moduleid). My SSTableSimpleUnsortedWriter create statement is as follow: {quote} new SSTableSimpleUnsortedWriter( directory, partitioner, keyspace, columnFamily, UUIDType.instance, null, BUFFER_SIZE); {quote} My write looks like this now: {quote} public void write(SSTableSimpleUnsortedWriter writer, long timestamp) throws IOException { writer.newRow(ByteBuffer.wrap(decompose(key))); writer.addColumn(bytes(endtime), bytes(endtime), timestamp); writer.addColumn(bytes(lastframetime), bytes(lastframetime), timestamp); writer.addColumn(bytes(begintime), bytes(begintime), timestamp); . . {quote} As I see it, either does SSTableSimpleUnsortedWriter not write the length of the column name in front of it, or the AbstractCompositeType in the Cassandra engine expect a length of the column name where there is none. Of cause, there exist also the possibility that I have missed something whats very likely ;) was (Author: hbaastrup): Hi Yuki, I see your point! I have now simplified my program and table so I do not use composite keys, but only one primary key; I use a UUID I generate on the fly for this. The problem remain, I still get the IllegalArgumentException. I changed my create table statement as follow: {quote} CREATE TABLE nsmo_dns ( key uuid PRIMARY KEY, endtime bigint, lastframetime bigint, . . {quote} and my SSTableSimpleUnsortedWriter create statement is as follow: {quote} new SSTableSimpleUnsortedWriter( directory, partitioner, keyspace, columnFamily, UUIDType.instance, null, BUFFER_SIZE); {quote} My write looks like this now: {quote} public void write(SSTableSimpleUnsortedWriter writer, long timestamp) throws IOException { writer.newRow(ByteBuffer.wrap(decompose(key))); writer.addColumn(toBufferWithShortLength(endtime), bytes(endtime), timestamp); writer.addColumn(toBufferWithShortLength(lastframetime), bytes(lastframetime), timestamp); writer.addColumn(bytes(begintime), bytes(begintime), timestamp); . . {quote} As I see it, either does SSTableSimpleUnsortedWriter not write the length of the column name in front of it, or the AbstractCompositeType in the Cassandra engine expect a length of the column name where there is none. Of cause, there exist also the possibility that I have missed something ;) IllegalArgumentException when bulk loading -- Key: CASSANDRA-5987 URL: https://issues.apache.org/jira/browse/CASSANDRA-5987 Project: Cassandra Issue Type: Bug Components: Core Environment: Cassandra 2.0.0 on Linux Reporter: Henrik Baastrup Attachments: CassandraLoader.tgz I have created SSTables with the org.apache.cassandra.io.sstable.SSTableSimpleUnsortedWriter class, but when I try to load the SSTables with sstableloader -d localhost nsmo_ds/nsmo_ds I get: WARN 13:46:40,875 [Stream #7d0193a0-1945-11e3-ac84-f9df5751357f] Stream failed Streaming to the following hosts failed: {quote} [/127.0.0.1] java.util.concurrent.ExecutionException: org.apache.cassandra.streaming.StreamException: Stream failed WARN 13:46:40,877 [Stream #7d0193a0-1945-11e3-ac84-f9df5751357f] Stream failed ERROR 13:46:40,877 [Stream #7d0193a0-1945-11e3-ac84-f9df5751357f] Streaming error occurred java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcherImpl.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(Unknown Source) at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source) at sun.nio.ch.IOUtil.write(Unknown Source) at sun.nio.ch.SocketChannelImpl.write(Unknown Source) at org.apache.cassandra.streaming.messages.StreamMessage.serialize(StreamMessage.java:43) at org.apache.cassandra.streaming.ConnectionHandler$OutgoingMessageHandler.sendMessage(ConnectionHandler.java:384) at org.apache.cassandra.streaming.ConnectionHandler$OutgoingMessageHandler.run(ConnectionHandler.java:372) at java.lang.Thread.run(Unknown Source) WARN 13:46:40,877 [Stream #7d0193a0-1945-11e3-ac84-f9df5751357f] Stream failed {quote} in
[1/3] git commit: Correctly handle limits in CompositesSearcher
Updated Branches: refs/heads/trunk 4f5242cfb - 36610aaf7 Correctly handle limits in CompositesSearcher patch by Aleksey Yeschenko; reviewed by Sylvain Lebresne for CASSANDRA-5975 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/caef32e5 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/caef32e5 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/caef32e5 Branch: refs/heads/trunk Commit: caef32e5d67c3b093de53bf99479cd457169178c Parents: 30f5e56 Author: Aleksey Yeschenko alek...@apache.org Authored: Tue Sep 10 17:41:04 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Tue Sep 10 17:41:04 2013 +0300 -- CHANGES.txt | 1 + .../apache/cassandra/db/ColumnFamilyStore.java | 2 +- .../db/index/composites/CompositesSearcher.java | 55 +++- 3 files changed, 33 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/caef32e5/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index a282670..2328bf7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,7 @@ * Make user-defined compaction JMX blocking (CASSANDRA-4952) * Fix streaming does not transfer wrapped range (CASSANDRA-5948) * Fix loading index summary containing empty key (CASSANDRA-5965) + * Correctly handle limits in CompositesSearcher (CASSANDRA-5975) 1.2.9 http://git-wip-us.apache.org/repos/asf/cassandra/blob/caef32e5/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 22b1dd5..745b5ba 100644 --- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java +++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java @@ -1497,7 +1497,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean try { -while (rowIterator.hasNext() rows.size() filter.maxRows() columnsCount filter.maxColumns()) +while (rowIterator.hasNext() matched filter.maxRows() columnsCount filter.maxColumns()) { // get the raw columns requested, and additional columns for the expressions if necessary Row rawRow = rowIterator.next(); http://git-wip-us.apache.org/repos/asf/cassandra/blob/caef32e5/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java -- diff --git a/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java b/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java index 4817a00..1e9d59d 100644 --- a/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java +++ b/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java @@ -21,6 +21,9 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.util.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.apache.cassandra.db.*; import org.apache.cassandra.db.filter.*; import org.apache.cassandra.db.index.AbstractSimplePerColumnSecondaryIndex; @@ -34,8 +37,6 @@ import org.apache.cassandra.dht.Range; import org.apache.cassandra.thrift.IndexExpression; import org.apache.cassandra.thrift.IndexOperator; import org.apache.cassandra.utils.ByteBufferUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class CompositesSearcher extends SecondaryIndexSearcher { @@ -111,10 +112,10 @@ public class CompositesSearcher extends SecondaryIndexSearcher final CompositeType baseComparator = (CompositeType)baseCfs.getComparator(); final CompositeType indexComparator = (CompositeType)index.getIndexCfs().getComparator(); -CompositeType.Builder builder = null; +final ByteBuffer startPrefix; if (startKey.remaining() 0) { -builder = indexComparator.builder().add(startKey); +CompositeType.Builder builder = indexComparator.builder().add(startKey); // For names filter, we have no choice but to query from the beginning of the key. This can be highly inefficient however. if (filter.originalFilter() instanceof SliceQueryFilter) { @@ -122,12 +123,17 @@ public class CompositesSearcher extends SecondaryIndexSearcher for (int i = 0; i Math.min(prefixSize, components.length); ++i) builder.add(components[i]); } +startPrefix = builder.build(); +} +else +{ +startPrefix =
[jira] [Resolved] (CASSANDRA-5991) COPY FROM failing on maps with Unmatched named substitution
[ https://issues.apache.org/jira/browse/CASSANDRA-5991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko resolved CASSANDRA-5991. -- Resolution: Won't Fix The issue is one of your map values: {result:27}. cassandra-dbapi2, the library used by cqlsh, treats it as a pseudo-prepared statement bound param. There is no easy fix for this, but the issue will go away once cqlsh is switched to the native python-driver in 2.1. COPY FROM failing on maps with Unmatched named substitution - Key: CASSANDRA-5991 URL: https://issues.apache.org/jira/browse/CASSANDRA-5991 Project: Cassandra Issue Type: Bug Environment: Cassandra 1.2.9 installed via Homebrew on OS X. Reporter: Christopher J. Bottaro Assignee: Aleksey Yeschenko I created a dump using COPY TO, but then the dump won't load with COPY FROM. $ echo COPY applications TO 'dev_development.csv'; | cqlsh -k dev_development localhost 776 rows exported in 7.935 seconds. $ echo COPY applications FROM 'dev_development.csv'; | cqlsh -k beta_development localhost stdin:2:Unmatched named substitution: '27' not given for 'INSERT INTO beta_development.applications (version, id, answers) VALUES (\'2013-01-22 13:52:11-0600\', 219, {1: \'{result:Izaiah}\', 2: \'{result:Maegan}\', 3: \'{result:Bergstrom}\', 4: \'{result:1-617-729-8621 x05429}\', 5: \'{result:Mailing/Shipping Address}\', 6: \'{result:257 O\'Reilly Tunnel}\', 7: \'{result:null}\', 8: \'{result:Sauerberg}\', 9: \'{result:null}\', 10: \'{result:Washington}\', 11: \'{result:99043-3492}\', 12: \'{result:Peru}\', 13: \'{result:null}\', 14: \'{result:Male}\', 15: \'{result:6/5/1980}\', 16: \'{result:American Indian or Alaska Native (not Hispanic or Latino)}\', 17: \'{result:Refugee or Protected Person}\', 18: \'{result:5/10/2011}\', 19: \'{result:[Indiana University-South Bend,IVY Tech-South Bend]}\', 20: \'{result:[Band,Basketball,Hockey]}\', 21: \'{result:Robertsville}\', 22: \'{result:null}\', 23: \'{result:OH}\', 24: \'{result:83615-4544}\', 25: \'{result:Planning to file}\', 26: \'{result:[]}\', 27: \'{result:null}\', 28: \'{result:null}\', 29: \'{result:Nemo odio et repellendus dolores quis non ut. Ut sint labore nostrum. Quo odit at explicabo veniam necessitatibus error aliquid.br /Magni saepe nam et deleniti. Laudantium aut rerum accusantium voluptatem voluptas. Incidunt facere rerum veritatis aliquid deleniti ut. Qui non ea dicta officiis deserunt.br /Aut voluptas sapiente non omnis optio illum laboriosam. Voluptatem veritatis quibusdam aperiam. Vero ipsum facere accusamus aut cumque vel.br /Dolorem tenetur ut occaecati quia eos assumenda. Officiis doloribus similique id harum corporis quas. Quis occaecati sint aut fugiat ut nisi voluptas culpa. Ea illo maxime ut nobis beatae qui. Velit est quasi earum autem totam ab repudiandae fuga.br /Maiores sint et sed. Non fugit esse molestiae. Eum praesentium quae sapiente repellendus. Aut ipsam alias dolor ducimus eum debitis eaque id.br /Et provident ad ut ullam mollitia laboriosam doloremque ex. Quo quia id qui omnis quos numquam. Cum ratione ab est. Quia aspernatur et cum iusto voluptas saepe voluptatem. Veniam et doloribus quam.br /Exercitationem quis reiciendis explicabo assumenda. Amet sit consequatur enim aut et veniam quia. Inventore et iusto autem ea praesentium voluptates. Nostrum vel minima quasi recusandae. Vel enim veniam omnis.br /Consequuntur modi laborum est aut repellendus occaecati. Vero hic mollitia consequuntur. Quas quia ut et. Sed sunt unde dolore. Explicabo amet error sunt.br /Sunt cupiditate provident aut. Aliquam suscipit quaerat culpa consectetur ab. Et optio nesciunt impedit doloremque quis facere quae dolorum.}\', 32: \'{result:678}\', 33: \'{result:84}\', 34: \'{result:1.52}\', 35: \'{result:Undergraduate Studies}\', 36: \'{result:5296}\', 37: \'{result:6612}\', 38: \'{result:1311}\', 39: \'{result:27}\'})' stdin:2:Aborting import at record #28 (line 29). Previously-inserted values still present. 28 rows imported in 0.325 seconds. Please let me know what other information I can provide. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5910) Most CQL3 functions should handle null gracefully
[ https://issues.apache.org/jira/browse/CASSANDRA-5910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13763139#comment-13763139 ] Aleksey Yeschenko commented on CASSANDRA-5910: -- +1 Most CQL3 functions should handle null gracefully - Key: CASSANDRA-5910 URL: https://issues.apache.org/jira/browse/CASSANDRA-5910 Project: Cassandra Issue Type: Bug Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.10 Attachments: 5910.txt, 5910-v2.txt Currently, we don't allow null parameters for functions. So {noformat} UPDATE test SET d=dateOf(null) WHERE k=0 {noformat} is basically an invalid query. Unfortunately, there's at least one case where we don't validate correctly, namely if we do: {noformat} SELECT k, dateOf(t) FROM test {noformat} In that case, if for any of the row {{t}} is null, we end up with a server side NPE. But more importantly, throwing an InvalidException in that case would be pretty inconvenient and actually somewhat wrong since the query is not invalid in itself. So, at least in that latter case, we want {{dateOf(t) == null}} when {{t == null}}. And if we do that, I suggest making it always the case (i.e. make the first query valid but assigning {{null}} to {{d}}). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
git commit: Correctly handle limits in CompositesSearcher
Updated Branches: refs/heads/cassandra-1.2 30f5e5613 - caef32e5d Correctly handle limits in CompositesSearcher patch by Aleksey Yeschenko; reviewed by Sylvain Lebresne for CASSANDRA-5975 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/caef32e5 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/caef32e5 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/caef32e5 Branch: refs/heads/cassandra-1.2 Commit: caef32e5d67c3b093de53bf99479cd457169178c Parents: 30f5e56 Author: Aleksey Yeschenko alek...@apache.org Authored: Tue Sep 10 17:41:04 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Tue Sep 10 17:41:04 2013 +0300 -- CHANGES.txt | 1 + .../apache/cassandra/db/ColumnFamilyStore.java | 2 +- .../db/index/composites/CompositesSearcher.java | 55 +++- 3 files changed, 33 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/caef32e5/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index a282670..2328bf7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,7 @@ * Make user-defined compaction JMX blocking (CASSANDRA-4952) * Fix streaming does not transfer wrapped range (CASSANDRA-5948) * Fix loading index summary containing empty key (CASSANDRA-5965) + * Correctly handle limits in CompositesSearcher (CASSANDRA-5975) 1.2.9 http://git-wip-us.apache.org/repos/asf/cassandra/blob/caef32e5/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 22b1dd5..745b5ba 100644 --- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java +++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java @@ -1497,7 +1497,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean try { -while (rowIterator.hasNext() rows.size() filter.maxRows() columnsCount filter.maxColumns()) +while (rowIterator.hasNext() matched filter.maxRows() columnsCount filter.maxColumns()) { // get the raw columns requested, and additional columns for the expressions if necessary Row rawRow = rowIterator.next(); http://git-wip-us.apache.org/repos/asf/cassandra/blob/caef32e5/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java -- diff --git a/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java b/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java index 4817a00..1e9d59d 100644 --- a/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java +++ b/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java @@ -21,6 +21,9 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.util.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.apache.cassandra.db.*; import org.apache.cassandra.db.filter.*; import org.apache.cassandra.db.index.AbstractSimplePerColumnSecondaryIndex; @@ -34,8 +37,6 @@ import org.apache.cassandra.dht.Range; import org.apache.cassandra.thrift.IndexExpression; import org.apache.cassandra.thrift.IndexOperator; import org.apache.cassandra.utils.ByteBufferUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class CompositesSearcher extends SecondaryIndexSearcher { @@ -111,10 +112,10 @@ public class CompositesSearcher extends SecondaryIndexSearcher final CompositeType baseComparator = (CompositeType)baseCfs.getComparator(); final CompositeType indexComparator = (CompositeType)index.getIndexCfs().getComparator(); -CompositeType.Builder builder = null; +final ByteBuffer startPrefix; if (startKey.remaining() 0) { -builder = indexComparator.builder().add(startKey); +CompositeType.Builder builder = indexComparator.builder().add(startKey); // For names filter, we have no choice but to query from the beginning of the key. This can be highly inefficient however. if (filter.originalFilter() instanceof SliceQueryFilter) { @@ -122,12 +123,17 @@ public class CompositesSearcher extends SecondaryIndexSearcher for (int i = 0; i Math.min(prefixSize, components.length); ++i) builder.add(components[i]); } +startPrefix = builder.build(); +} +else +{ +startPrefix =
[jira] [Updated] (CASSANDRA-5996) Remove leveled manifest json migration code
[ https://issues.apache.org/jira/browse/CASSANDRA-5996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcus Eriksson updated CASSANDRA-5996: --- Attachment: 0001-remove-old-json-manifest-migration-code.patch Remove leveled manifest json migration code --- Key: CASSANDRA-5996 URL: https://issues.apache.org/jira/browse/CASSANDRA-5996 Project: Cassandra Issue Type: Improvement Reporter: Marcus Eriksson Assignee: Marcus Eriksson Priority: Minor Fix For: 2.1 Attachments: 0001-remove-old-json-manifest-migration-code.patch We should remove the json leveled manifest migration code from 2.1 this will require users to atleast start 2.0 before upgrading to 2.1 (manifest is migrated on startup). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5894) CQL-aware SSTableWriter
[ https://issues.apache.org/jira/browse/CASSANDRA-5894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13763126#comment-13763126 ] Jeremiah Jordan commented on CASSANDRA-5894: The biggest issue I see with doing this is how you get the CQL3 aware SSTableWriter to know what schema to use when create an sstable. I would think the basic interface should be newRow(PRIMARY KEY COLUMNS), addColumn(name, value). CQL-aware SSTableWriter --- Key: CASSANDRA-5894 URL: https://issues.apache.org/jira/browse/CASSANDRA-5894 Project: Cassandra Issue Type: New Feature Components: Tools Reporter: Jonathan Ellis Priority: Minor SSTableSimple[Un]SortedWriter requires defining raw comparators and inserting raw data cells. We should create a CQL-aware alternative. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5994) Allow empty CQL3 batches (as no-op)
[ https://issues.apache.org/jira/browse/CASSANDRA-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13763122#comment-13763122 ] Aleksey Yeschenko commented on CASSANDRA-5994: -- +1 Allow empty CQL3 batches (as no-op) --- Key: CASSANDRA-5994 URL: https://issues.apache.org/jira/browse/CASSANDRA-5994 Project: Cassandra Issue Type: Improvement Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Trivial Fix For: 1.2.10 Attachments: 5994.txt The CQL3 parser doesn't allow empty batch statements and bitches with a parsing error. While clients should probably make sure they don't generate empty batches as it's useless, it's easy for client that general batch requests to forget handling the empty case, ending up sending an empty batch. it's a tad annoying to get a runtime error in production just for that. Let just it being a no-op. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-5996) Remove leveled manifest json migration code
Marcus Eriksson created CASSANDRA-5996: -- Summary: Remove leveled manifest json migration code Key: CASSANDRA-5996 URL: https://issues.apache.org/jira/browse/CASSANDRA-5996 Project: Cassandra Issue Type: Improvement Reporter: Marcus Eriksson Assignee: Marcus Eriksson Priority: Minor Fix For: 2.1 Attachments: 0001-remove-old-json-manifest-migration-code.patch We should remove the json leveled manifest migration code from 2.1 this will require users to atleast start 2.0 before upgrading to 2.1 (manifest is migrated on startup). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[5/6] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.0 Conflicts: src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/678aa37a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/678aa37a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/678aa37a Branch: refs/heads/cassandra-2.0 Commit: 678aa37af3322e805a3a639890e18391ce22426f Parents: 1ff0d8e 70297f9 Author: Brandon Williams brandonwilli...@apache.org Authored: Tue Sep 10 13:44:47 2013 -0500 Committer: Brandon Williams brandonwilli...@apache.org Committed: Tue Sep 10 13:44:47 2013 -0500 -- CHANGES.txt | 1 + .../hadoop/pig/AbstractCassandraStorage.java| 78 +++- .../apache/cassandra/hadoop/pig/CqlStorage.java | 78 +++- 3 files changed, 135 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/678aa37a/CHANGES.txt -- diff --cc CHANGES.txt index 22fa74b,4d5b446..f9a3b80 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -25,54 -9,14 +25,55 @@@ Merged from 1.2 * Fix streaming does not transfer wrapped range (CASSANDRA-5948) * Fix loading index summary containing empty key (CASSANDRA-5965) * Correctly handle limits in CompositesSearcher (CASSANDRA-5975) + * Pig: handle CQL collections (CASSANDRA-5867) -1.2.9 +2.0.0 + * Fix thrift validation when inserting into CQL3 tables (CASSANDRA-5138) + * Fix periodic memtable flushing behavior with clean memtables (CASSANDRA-5931) + * Fix dateOf() function for pre-2.0 timestamp columns (CASSANDRA-5928) + * Fix SSTable unintentionally loads BF when opened for batch (CASSANDRA-5938) + * Add stream session progress to JMX (CASSANDRA-4757) + * Fix NPE during CAS operation (CASSANDRA-5925) +Merged from 1.2: * Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900) - * migrate 1.1 schema_columnfamilies.key_alias column to key_aliases - (CASSANDRA-5800) - * add --migrate option to sstableupgrade and sstablescrub (CASSANDRA-5831) + * Don't announce schema version until we've loaded the changes locally + (CASSANDRA-5904) + * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) + * Properly handle parsing huge map and set literals (CASSANDRA-5893) + + +2.0.0-rc2 + * enable vnodes by default (CASSANDRA-5869) + * fix CAS contention timeout (CASSANDRA-5830) + * fix HsHa to respect max frame size (CASSANDRA-4573) + * Fix (some) 2i on composite components omissions (CASSANDRA-5851) + * cqlsh: add DESCRIBE FULL SCHEMA variant (CASSANDRA-5880) +Merged from 1.2: + * Correctly validate sparse composite cells in scrub (CASSANDRA-5855) + * Add KeyCacheHitRate metric to CF metrics (CASSANDRA-5868) + * cqlsh: add support for multiline comments (CASSANDRA-5798) + * Handle CQL3 SELECT duplicate IN restrictions on clustering columns + (CASSANDRA-5856) + + +2.0.0-rc1 + * improve DecimalSerializer performance (CASSANDRA-5837) + * fix potential spurious wakeup in AsyncOneResponse (CASSANDRA-5690) + * fix schema-related trigger issues (CASSANDRA-5774) + * Better validation when accessing CQL3 table from thrift (CASSANDRA-5138) + * Fix assertion error during repair (CASSANDRA-5801) + * Fix range tombstone bug (CASSANDRA-5805) + * DC-local CAS (CASSANDRA-5797) + * Add a native_protocol_version column to the system.local table (CASSANRDA-5819) + * Use index_interval from cassandra.yaml when upgraded (CASSANDRA-5822) + * Fix buffer underflow on socket close (CASSANDRA-5792) +Merged from 1.2: + * Fix reading DeletionTime from 1.1-format sstables (CASSANDRA-5814) + * cqlsh: add collections support to COPY (CASSANDRA-5698) + * retry important messages for any IOException (CASSANDRA-5804) + * Allow empty IN relations in SELECT/UPDATE/DELETE statements (CASSANDRA-5626) + * cqlsh: fix crashing on Windows due to libedit detection (CASSANDRA-5812) * fix bulk-loading compressed sstables (CASSANDRA-5820) * (Hadoop) fix quoting in CqlPagingRecordReader and CqlRecordWriter (CASSANDRA-5824) http://git-wip-us.apache.org/repos/asf/cassandra/blob/678aa37a/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/678aa37a/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java -- diff --cc src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java index 84d7a7a,a73e5a5..2b76b83 --- a/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java +++
[2/6] git commit: Pig support for CQL collections. Patch by Alex Liu, reviewed by brandonwilliams for CASSANDRA-5867
Pig support for CQL collections. Patch by Alex Liu, reviewed by brandonwilliams for CASSANDRA-5867 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/70297f9a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/70297f9a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/70297f9a Branch: refs/heads/cassandra-2.0 Commit: 70297f9ad44d52cc9612cd91e7305969fc86e204 Parents: caef32e Author: Brandon Williams brandonwilli...@apache.org Authored: Tue Sep 10 13:28:23 2013 -0500 Committer: Brandon Williams brandonwilli...@apache.org Committed: Tue Sep 10 13:28:23 2013 -0500 -- CHANGES.txt | 1 + .../hadoop/pig/AbstractCassandraStorage.java| 78 +++- .../apache/cassandra/hadoop/pig/CqlStorage.java | 78 +++- 3 files changed, 135 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/70297f9a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2328bf7..4d5b446 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ * Fix streaming does not transfer wrapped range (CASSANDRA-5948) * Fix loading index summary containing empty key (CASSANDRA-5965) * Correctly handle limits in CompositesSearcher (CASSANDRA-5975) + * Pig: handle CQL collections (CASSANDRA-5867) 1.2.9 http://git-wip-us.apache.org/repos/asf/cassandra/blob/70297f9a/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java -- diff --git a/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java b/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java index 59d7817..03805d2 100644 --- a/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java +++ b/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java @@ -330,7 +330,7 @@ public abstract class AbstractCassandraStorage extends LoadFunc implements Store return DataType.FLOAT; else if (type instanceof DoubleType) return DataType.DOUBLE; -else if (type instanceof AbstractCompositeType ) +else if (type instanceof AbstractCompositeType || type instanceof CollectionType) return DataType.TUPLE; return DataType.BYTEARRAY; @@ -401,30 +401,72 @@ public abstract class AbstractCassandraStorage extends LoadFunc implements Store return ByteBuffer.wrap(UUIDGen.decompose((UUID) o)); if(o instanceof Tuple) { ListObject objects = ((Tuple)o).getAll(); -ListByteBuffer serialized = new ArrayListByteBuffer(objects.size()); -int totalLength = 0; -for(Object sub : objects) +//collections +if (objects.size() 0 objects.get(0) instanceof String) { -ByteBuffer buffer = objToBB(sub); -serialized.add(buffer); -totalLength += 2 + buffer.remaining() + 1; -} -ByteBuffer out = ByteBuffer.allocate(totalLength); -for (ByteBuffer bb : serialized) -{ -int length = bb.remaining(); -out.put((byte) ((length 8) 0xFF)); -out.put((byte) (length 0xFF)); -out.put(bb); -out.put((byte) 0); +String collectionType = (String) objects.get(0); +if (set.equalsIgnoreCase(collectionType) || +list.equalsIgnoreCase(collectionType)) +return objToListOrSetBB(objects.subList(1, objects.size())); +else if (map.equalsIgnoreCase(collectionType)) +return objToMapBB(objects.subList(1, objects.size())); + } -out.flip(); -return out; +return objToCompositeBB(objects); } return ByteBuffer.wrap(((DataByteArray) o).get()); } +private ByteBuffer objToListOrSetBB(ListObject objects) +{ +ListByteBuffer serialized = new ArrayListByteBuffer(objects.size()); +for(Object sub : objects) +{ +ByteBuffer buffer = objToBB(sub); +serialized.add(buffer); +} +return CollectionType.pack(serialized, objects.size()); +} + +private ByteBuffer objToMapBB(ListObject objects) +{ +ListByteBuffer serialized = new ArrayListByteBuffer(objects.size() * 2); +for(Object sub : objects) +{ +ListObject keyValue = ((Tuple)sub).getAll(); +for (Object entry: keyValue) +{ +ByteBuffer buffer = objToBB(entry); +
[6/6] git commit: Merge branch 'cassandra-2.0' into trunk
Merge branch 'cassandra-2.0' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7246502e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7246502e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7246502e Branch: refs/heads/trunk Commit: 7246502e7f6cd1e98b5199412541b621d7f12ffa Parents: 3822612 678aa37 Author: Brandon Williams brandonwilli...@apache.org Authored: Tue Sep 10 13:45:13 2013 -0500 Committer: Brandon Williams brandonwilli...@apache.org Committed: Tue Sep 10 13:45:13 2013 -0500 -- CHANGES.txt | 1 + .../hadoop/pig/AbstractCassandraStorage.java| 78 +++- .../apache/cassandra/hadoop/pig/CqlStorage.java | 78 +++- 3 files changed, 135 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7246502e/CHANGES.txt --
[1/6] git commit: Pig support for CQL collections. Patch by Alex Liu, reviewed by brandonwilliams for CASSANDRA-5867
Updated Branches: refs/heads/cassandra-1.2 caef32e5d - 70297f9ad refs/heads/cassandra-2.0 1ff0d8e9f - 678aa37af refs/heads/trunk 382261218 - 7246502e7 Pig support for CQL collections. Patch by Alex Liu, reviewed by brandonwilliams for CASSANDRA-5867 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/70297f9a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/70297f9a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/70297f9a Branch: refs/heads/cassandra-1.2 Commit: 70297f9ad44d52cc9612cd91e7305969fc86e204 Parents: caef32e Author: Brandon Williams brandonwilli...@apache.org Authored: Tue Sep 10 13:28:23 2013 -0500 Committer: Brandon Williams brandonwilli...@apache.org Committed: Tue Sep 10 13:28:23 2013 -0500 -- CHANGES.txt | 1 + .../hadoop/pig/AbstractCassandraStorage.java| 78 +++- .../apache/cassandra/hadoop/pig/CqlStorage.java | 78 +++- 3 files changed, 135 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/70297f9a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2328bf7..4d5b446 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ * Fix streaming does not transfer wrapped range (CASSANDRA-5948) * Fix loading index summary containing empty key (CASSANDRA-5965) * Correctly handle limits in CompositesSearcher (CASSANDRA-5975) + * Pig: handle CQL collections (CASSANDRA-5867) 1.2.9 http://git-wip-us.apache.org/repos/asf/cassandra/blob/70297f9a/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java -- diff --git a/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java b/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java index 59d7817..03805d2 100644 --- a/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java +++ b/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java @@ -330,7 +330,7 @@ public abstract class AbstractCassandraStorage extends LoadFunc implements Store return DataType.FLOAT; else if (type instanceof DoubleType) return DataType.DOUBLE; -else if (type instanceof AbstractCompositeType ) +else if (type instanceof AbstractCompositeType || type instanceof CollectionType) return DataType.TUPLE; return DataType.BYTEARRAY; @@ -401,30 +401,72 @@ public abstract class AbstractCassandraStorage extends LoadFunc implements Store return ByteBuffer.wrap(UUIDGen.decompose((UUID) o)); if(o instanceof Tuple) { ListObject objects = ((Tuple)o).getAll(); -ListByteBuffer serialized = new ArrayListByteBuffer(objects.size()); -int totalLength = 0; -for(Object sub : objects) +//collections +if (objects.size() 0 objects.get(0) instanceof String) { -ByteBuffer buffer = objToBB(sub); -serialized.add(buffer); -totalLength += 2 + buffer.remaining() + 1; -} -ByteBuffer out = ByteBuffer.allocate(totalLength); -for (ByteBuffer bb : serialized) -{ -int length = bb.remaining(); -out.put((byte) ((length 8) 0xFF)); -out.put((byte) (length 0xFF)); -out.put(bb); -out.put((byte) 0); +String collectionType = (String) objects.get(0); +if (set.equalsIgnoreCase(collectionType) || +list.equalsIgnoreCase(collectionType)) +return objToListOrSetBB(objects.subList(1, objects.size())); +else if (map.equalsIgnoreCase(collectionType)) +return objToMapBB(objects.subList(1, objects.size())); + } -out.flip(); -return out; +return objToCompositeBB(objects); } return ByteBuffer.wrap(((DataByteArray) o).get()); } +private ByteBuffer objToListOrSetBB(ListObject objects) +{ +ListByteBuffer serialized = new ArrayListByteBuffer(objects.size()); +for(Object sub : objects) +{ +ByteBuffer buffer = objToBB(sub); +serialized.add(buffer); +} +return CollectionType.pack(serialized, objects.size()); +} + +private ByteBuffer objToMapBB(ListObject objects) +{ +ListByteBuffer serialized = new ArrayListByteBuffer(objects.size() * 2); +for(Object sub : objects) +{ +ListObject
[4/6] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.0 Conflicts: src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/678aa37a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/678aa37a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/678aa37a Branch: refs/heads/trunk Commit: 678aa37af3322e805a3a639890e18391ce22426f Parents: 1ff0d8e 70297f9 Author: Brandon Williams brandonwilli...@apache.org Authored: Tue Sep 10 13:44:47 2013 -0500 Committer: Brandon Williams brandonwilli...@apache.org Committed: Tue Sep 10 13:44:47 2013 -0500 -- CHANGES.txt | 1 + .../hadoop/pig/AbstractCassandraStorage.java| 78 +++- .../apache/cassandra/hadoop/pig/CqlStorage.java | 78 +++- 3 files changed, 135 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/678aa37a/CHANGES.txt -- diff --cc CHANGES.txt index 22fa74b,4d5b446..f9a3b80 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -25,54 -9,14 +25,55 @@@ Merged from 1.2 * Fix streaming does not transfer wrapped range (CASSANDRA-5948) * Fix loading index summary containing empty key (CASSANDRA-5965) * Correctly handle limits in CompositesSearcher (CASSANDRA-5975) + * Pig: handle CQL collections (CASSANDRA-5867) -1.2.9 +2.0.0 + * Fix thrift validation when inserting into CQL3 tables (CASSANDRA-5138) + * Fix periodic memtable flushing behavior with clean memtables (CASSANDRA-5931) + * Fix dateOf() function for pre-2.0 timestamp columns (CASSANDRA-5928) + * Fix SSTable unintentionally loads BF when opened for batch (CASSANDRA-5938) + * Add stream session progress to JMX (CASSANDRA-4757) + * Fix NPE during CAS operation (CASSANDRA-5925) +Merged from 1.2: * Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900) - * migrate 1.1 schema_columnfamilies.key_alias column to key_aliases - (CASSANDRA-5800) - * add --migrate option to sstableupgrade and sstablescrub (CASSANDRA-5831) + * Don't announce schema version until we've loaded the changes locally + (CASSANDRA-5904) + * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) + * Properly handle parsing huge map and set literals (CASSANDRA-5893) + + +2.0.0-rc2 + * enable vnodes by default (CASSANDRA-5869) + * fix CAS contention timeout (CASSANDRA-5830) + * fix HsHa to respect max frame size (CASSANDRA-4573) + * Fix (some) 2i on composite components omissions (CASSANDRA-5851) + * cqlsh: add DESCRIBE FULL SCHEMA variant (CASSANDRA-5880) +Merged from 1.2: + * Correctly validate sparse composite cells in scrub (CASSANDRA-5855) + * Add KeyCacheHitRate metric to CF metrics (CASSANDRA-5868) + * cqlsh: add support for multiline comments (CASSANDRA-5798) + * Handle CQL3 SELECT duplicate IN restrictions on clustering columns + (CASSANDRA-5856) + + +2.0.0-rc1 + * improve DecimalSerializer performance (CASSANDRA-5837) + * fix potential spurious wakeup in AsyncOneResponse (CASSANDRA-5690) + * fix schema-related trigger issues (CASSANDRA-5774) + * Better validation when accessing CQL3 table from thrift (CASSANDRA-5138) + * Fix assertion error during repair (CASSANDRA-5801) + * Fix range tombstone bug (CASSANDRA-5805) + * DC-local CAS (CASSANDRA-5797) + * Add a native_protocol_version column to the system.local table (CASSANRDA-5819) + * Use index_interval from cassandra.yaml when upgraded (CASSANDRA-5822) + * Fix buffer underflow on socket close (CASSANDRA-5792) +Merged from 1.2: + * Fix reading DeletionTime from 1.1-format sstables (CASSANDRA-5814) + * cqlsh: add collections support to COPY (CASSANDRA-5698) + * retry important messages for any IOException (CASSANDRA-5804) + * Allow empty IN relations in SELECT/UPDATE/DELETE statements (CASSANDRA-5626) + * cqlsh: fix crashing on Windows due to libedit detection (CASSANDRA-5812) * fix bulk-loading compressed sstables (CASSANDRA-5820) * (Hadoop) fix quoting in CqlPagingRecordReader and CqlRecordWriter (CASSANDRA-5824) http://git-wip-us.apache.org/repos/asf/cassandra/blob/678aa37a/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/678aa37a/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java -- diff --cc src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java index 84d7a7a,a73e5a5..2b76b83 --- a/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java +++
[3/6] git commit: Pig support for CQL collections. Patch by Alex Liu, reviewed by brandonwilliams for CASSANDRA-5867
Pig support for CQL collections. Patch by Alex Liu, reviewed by brandonwilliams for CASSANDRA-5867 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/70297f9a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/70297f9a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/70297f9a Branch: refs/heads/trunk Commit: 70297f9ad44d52cc9612cd91e7305969fc86e204 Parents: caef32e Author: Brandon Williams brandonwilli...@apache.org Authored: Tue Sep 10 13:28:23 2013 -0500 Committer: Brandon Williams brandonwilli...@apache.org Committed: Tue Sep 10 13:28:23 2013 -0500 -- CHANGES.txt | 1 + .../hadoop/pig/AbstractCassandraStorage.java| 78 +++- .../apache/cassandra/hadoop/pig/CqlStorage.java | 78 +++- 3 files changed, 135 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/70297f9a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2328bf7..4d5b446 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ * Fix streaming does not transfer wrapped range (CASSANDRA-5948) * Fix loading index summary containing empty key (CASSANDRA-5965) * Correctly handle limits in CompositesSearcher (CASSANDRA-5975) + * Pig: handle CQL collections (CASSANDRA-5867) 1.2.9 http://git-wip-us.apache.org/repos/asf/cassandra/blob/70297f9a/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java -- diff --git a/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java b/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java index 59d7817..03805d2 100644 --- a/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java +++ b/src/java/org/apache/cassandra/hadoop/pig/AbstractCassandraStorage.java @@ -330,7 +330,7 @@ public abstract class AbstractCassandraStorage extends LoadFunc implements Store return DataType.FLOAT; else if (type instanceof DoubleType) return DataType.DOUBLE; -else if (type instanceof AbstractCompositeType ) +else if (type instanceof AbstractCompositeType || type instanceof CollectionType) return DataType.TUPLE; return DataType.BYTEARRAY; @@ -401,30 +401,72 @@ public abstract class AbstractCassandraStorage extends LoadFunc implements Store return ByteBuffer.wrap(UUIDGen.decompose((UUID) o)); if(o instanceof Tuple) { ListObject objects = ((Tuple)o).getAll(); -ListByteBuffer serialized = new ArrayListByteBuffer(objects.size()); -int totalLength = 0; -for(Object sub : objects) +//collections +if (objects.size() 0 objects.get(0) instanceof String) { -ByteBuffer buffer = objToBB(sub); -serialized.add(buffer); -totalLength += 2 + buffer.remaining() + 1; -} -ByteBuffer out = ByteBuffer.allocate(totalLength); -for (ByteBuffer bb : serialized) -{ -int length = bb.remaining(); -out.put((byte) ((length 8) 0xFF)); -out.put((byte) (length 0xFF)); -out.put(bb); -out.put((byte) 0); +String collectionType = (String) objects.get(0); +if (set.equalsIgnoreCase(collectionType) || +list.equalsIgnoreCase(collectionType)) +return objToListOrSetBB(objects.subList(1, objects.size())); +else if (map.equalsIgnoreCase(collectionType)) +return objToMapBB(objects.subList(1, objects.size())); + } -out.flip(); -return out; +return objToCompositeBB(objects); } return ByteBuffer.wrap(((DataByteArray) o).get()); } +private ByteBuffer objToListOrSetBB(ListObject objects) +{ +ListByteBuffer serialized = new ArrayListByteBuffer(objects.size()); +for(Object sub : objects) +{ +ByteBuffer buffer = objToBB(sub); +serialized.add(buffer); +} +return CollectionType.pack(serialized, objects.size()); +} + +private ByteBuffer objToMapBB(ListObject objects) +{ +ListByteBuffer serialized = new ArrayListByteBuffer(objects.size() * 2); +for(Object sub : objects) +{ +ListObject keyValue = ((Tuple)sub).getAll(); +for (Object entry: keyValue) +{ +ByteBuffer buffer = objToBB(entry); +
[jira] [Created] (CASSANDRA-5997) -D option to change cluster name
Robert Coli created CASSANDRA-5997: -- Summary: -D option to change cluster name Key: CASSANDRA-5997 URL: https://issues.apache.org/jira/browse/CASSANDRA-5997 Project: Cassandra Issue Type: Improvement Reporter: Robert Coli Priority: Minor A steady trickle of users have a need to change the name of their cluster. Perhaps they accidentally started their cluster with the wrong name and now want to change it. http://wiki.apache.org/cassandra/FAQ#clustername_mismatch Has the old recommendation, which was to edit the cluster name in LocationInfo and then restart. http://comments.gmane.org/gmane.comp.db.cassandra.user/29753 Has the old workaround, which was to remove LocationInfo CF entirely. As this info now lives in a column called cluster_name in a row with key local in a CF called local in the keyspace system, one can no longer simply nuke LocationInfo. The only workaround remaining is to nuke the entire system Keyspace and re-coalesce the cluster, and then reload schema. The community continues to need to perform this operation and we do not want to tell them to nuke or manually modify the system keyspace (though it seems they have perms again to modify..). This ticket requests a new startup -D flag -Dcassandra.new_cluster_name which allows one to overwrite this value at startup time. This means a rolling restart will accomplish the rename my cluster task, with only the cost of split-cluster for the duration. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-5998) Filters
Matt Stump created CASSANDRA-5998: - Summary: Filters Key: CASSANDRA-5998 URL: https://issues.apache.org/jira/browse/CASSANDRA-5998 Project: Cassandra Issue Type: New Feature Reporter: Matt Stump As a counterpart to the functionality provided in triggers it is desirable to filter/mutate query results utilizing a user specified classes. Some example use cases include: Row or cell level permissions Ad-hoc aggregation or filtering of column values Proposed changes include the following: * Alter CF metadata to allow the specification of filter classes and options. * Modification of the CQL(3) grammar and addition of create/drop filter statements to allow the specification of filter classes. * Move cassandara/triggers/CustomClassLoader.java to cassandara/CustomClassLoader.java and use the class loader for both triggers and filters. * The addition of the following classes: FilterDefinition, FilterExecuter, and IFilter. * Modification of StorageProxy::fetchRows, such that if the CF has a filter specified, rows returned by the result set are run first through the filter which has the authority of either dropping or modifying rows from the result set. If no filter is specified then no filter will be invoked. * In order to enable the row/cell level authorization use case StorageProxy::fetchRows must be modified to also require the ClientState. Risks: My main concern with the current proposal is that the dependency on ClientState in order to satisfy the cell/row level permissions use case will introduce tight coupling between StorageProxy and ClientState. Another possibility yet to be investigated is to pass ClientState to the filter when the filter class is instantiated. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-5999) Modify PRSI interface and related callers to use the index method containing the updated key and cf.
Benjamin Coverston created CASSANDRA-5999: - Summary: Modify PRSI interface and related callers to use the index method containing the updated key and cf. Key: CASSANDRA-5999 URL: https://issues.apache.org/jira/browse/CASSANDRA-5999 Project: Cassandra Issue Type: Improvement Reporter: Benjamin Coverston Assignee: Benjamin Coverston Fix For: 1.2.10 This enhancement will allow for better support of custom indexes using CQL3. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (CASSANDRA-5847) Support thrift tables in Pig CqlStorage
[ https://issues.apache.org/jira/browse/CASSANDRA-5847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13729827#comment-13729827 ] Alex Liu edited comment on CASSANDRA-5847 at 9/10/13 9:14 PM: -- 001 patch fixes counter issue. 002 patch to support thrift tables in CqlStorage was (Author: alexliu68): patch on 1.2 branch is attached Support thrift tables in Pig CqlStorage --- Key: CASSANDRA-5847 URL: https://issues.apache.org/jira/browse/CASSANDRA-5847 Project: Cassandra Issue Type: Bug Affects Versions: 1.2.7 Reporter: Alex Liu Assignee: Alex Liu Attachments: 001_5847_patch.txt, 002_5847_patch.txt This is fix for Pig side of CASSANDRA-5752 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5847) Support thrift tables in Pig CqlStorage
[ https://issues.apache.org/jira/browse/CASSANDRA-5847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alex Liu updated CASSANDRA-5847: Reviewer: brandon.williams Support thrift tables in Pig CqlStorage --- Key: CASSANDRA-5847 URL: https://issues.apache.org/jira/browse/CASSANDRA-5847 Project: Cassandra Issue Type: Bug Components: Hadoop Affects Versions: 1.2.7 Reporter: Alex Liu Assignee: Alex Liu Attachments: 001_5847_patch.txt, 002_5847_patch.txt This is fix for Pig side of CASSANDRA-5752 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5847) Support thrift tables in Pig CqlStorage
[ https://issues.apache.org/jira/browse/CASSANDRA-5847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alex Liu updated CASSANDRA-5847: Attachment: 002_5847_patch.txt 001_5847_patch.txt Support thrift tables in Pig CqlStorage --- Key: CASSANDRA-5847 URL: https://issues.apache.org/jira/browse/CASSANDRA-5847 Project: Cassandra Issue Type: Bug Affects Versions: 1.2.7 Reporter: Alex Liu Assignee: Alex Liu Attachments: 001_5847_patch.txt, 002_5847_patch.txt This is fix for Pig side of CASSANDRA-5752 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5847) Support thrift tables in Pig CqlStorage
[ https://issues.apache.org/jira/browse/CASSANDRA-5847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alex Liu updated CASSANDRA-5847: Attachment: (was: 5847-1.2-branch.txt) Support thrift tables in Pig CqlStorage --- Key: CASSANDRA-5847 URL: https://issues.apache.org/jira/browse/CASSANDRA-5847 Project: Cassandra Issue Type: Bug Affects Versions: 1.2.7 Reporter: Alex Liu Assignee: Alex Liu Attachments: 001_5847_patch.txt, 002_5847_patch.txt This is fix for Pig side of CASSANDRA-5752 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CASSANDRA-5941) Incorrect Schema with PIG CqlStorage Queries
[ https://issues.apache.org/jira/browse/CASSANDRA-5941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alex Liu resolved CASSANDRA-5941. - Resolution: Implemented Fix Version/s: 2.0.1 1.2.10 It's fixed in CASSANDRA-5867 Incorrect Schema with PIG CqlStorage Queries Key: CASSANDRA-5941 URL: https://issues.apache.org/jira/browse/CASSANDRA-5941 Project: Cassandra Issue Type: Bug Reporter: James Schappet Assignee: Alex Liu Fix For: 1.2.10, 2.0.1 A = LOAD 'cql://my/data?where_clause=key%3D\'status\' ' USING CqlStorage() AS ( type:chararray, barcode:chararray, row_id:bytearray, key:chararray, status:chararray ); DESCRIBE A; --A: {type: chararray,barcode: chararray,row_id: bytearray,key: chararray,status: chararray} B = FOREACH A GENERATE FLATTEN( status ); I am trying to process the following data: B = FOREACH A GENERATE FLATTEN( status); DUMB B; (value,LIVING) (value,LIVING) (value,LIVING) (value,DECEASED) (value,LIVING) (value,DECEASED) (value,DECEASED) (value,LIVING) But when I try to filter it (FILTER A BY status MATCHES 'DECEASED') I get the following error: 2013-08-23 08:47:16,290 [Thread-4] WARN org.apache.hadoop.mapred.LocalJobRunner - job_local_0001 java.lang.ClassCastException: org.apache.pig.data.BinSedesTuple cannot be cast to java.lang.String at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.PORegexp.getNext(PORegexp.java:84) at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POFilter.getNext(POFilter.java:148) at org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.processInput(PhysicalOperator.java:290) at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:233) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce$Reduce.runPipeline(PigGenericMapReduce.java:460) ... There are two StackOverFlow questions related to this: http://stackoverflow.com/questions/18407248/cce-binsedestuple-cannot-be-cast-to-string?lq=1 http://stackoverflow.com/questions/18391552/cqlstorage-generates-wrong-pig-schema?lq=1 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5996) Remove leveled manifest json migration code
[ https://issues.apache.org/jira/browse/CASSANDRA-5996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13763504#comment-13763504 ] Jonathan Ellis commented on CASSANDRA-5996: --- Marcus points out that we're already going down this path with CASSANDRA-5960, so +1 in theory. Does this mean that we always create a LeveledManifest now? {code} +int maxSizeInMB = (int)((cfs.getCompactionStrategy().getMaxSSTableSize()) / (1024L * 1024L)); +LeveledManifest manifest = LeveledManifest.create(cfs, maxSizeInMB, sstables); {code} Remove leveled manifest json migration code --- Key: CASSANDRA-5996 URL: https://issues.apache.org/jira/browse/CASSANDRA-5996 Project: Cassandra Issue Type: Improvement Reporter: Marcus Eriksson Assignee: Marcus Eriksson Priority: Minor Fix For: 2.1 Attachments: 0001-remove-old-json-manifest-migration-code.patch We should remove the json leveled manifest migration code from 2.1 this will require users to atleast start 2.0 before upgrading to 2.1 (manifest is migrated on startup). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5999) Modify PRSI interface and related callers to use the index method containing the updated key and cf.
[ https://issues.apache.org/jira/browse/CASSANDRA-5999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-5999: - Reviewer: iamaleksey Modify PRSI interface and related callers to use the index method containing the updated key and cf. Key: CASSANDRA-5999 URL: https://issues.apache.org/jira/browse/CASSANDRA-5999 Project: Cassandra Issue Type: Improvement Reporter: Benjamin Coverston Assignee: Benjamin Coverston Fix For: 1.2.10 Attachments: cassandra-5999.patch This enhancement will allow for better support of custom indexes using CQL3. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5947) Sampling bug in metrics-core-2.0.3.jar used by Cassandra
[ https://issues.apache.org/jira/browse/CASSANDRA-5947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13763535#comment-13763535 ] Ravi Prasad commented on CASSANDRA-5947: Is it just me or anyone else seeing this issue: all mbean objectNames of org.apache.cassandra.metrics* have double quotes surrounding them after upgrading to metrics-core-2.2.0.jar. like org.apache.cassandra.metrics:type=DroppedMessage,scope=READ,name=Dropped ? Sampling bug in metrics-core-2.0.3.jar used by Cassandra Key: CASSANDRA-5947 URL: https://issues.apache.org/jira/browse/CASSANDRA-5947 Project: Cassandra Issue Type: Bug Components: Tools Reporter: J.B. Langston Assignee: Jonathan Ellis Priority: Minor Fix For: 1.2.10, 2.0.1 There is a sampling bug in the version of the metrics library we're using in Cassandra. See https://github.com/codahale/metrics/issues/421. ExponentiallyDecayingSample is used by the Timer's histogram that is used in stress tool, and according to [~brandon.williams] it is also in a few other places like the dynamic snitch. The statistical theory involved in this bug goes over my head so i'm not sure if this would bug would meaningfully affect its usage by Cassandra. One of the comments on the bug mentions that it affects slow sampling rates (10 samples/min was the example given). We're currently distributing metrics-core-2.0.3.jar and according to the release nodes, this bug is fixed in 2.1.3: http://metrics.codahale.com/about/release-notes/#v2-1-3-aug-06-2012 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-6001) Add a Tracing line for index/seq scan queries
Jonathan Ellis created CASSANDRA-6001: - Summary: Add a Tracing line for index/seq scan queries Key: CASSANDRA-6001 URL: https://issues.apache.org/jira/browse/CASSANDRA-6001 Project: Cassandra Issue Type: Improvement Reporter: Jonathan Ellis Assignee: Lyuben Todorov Fix For: 2.0.1, 1.2.10 Tracing should show the user why a specific index was selected. Something like {noformat} Index mean cardinality is {users_by_lastname: 100, users_by_state: 2000, users_by_birthdate: 1000}. Scanning with users_by_lastname. {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5953) Replication validation is broken
[ https://issues.apache.org/jira/browse/CASSANDRA-5953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13763145#comment-13763145 ] Brandon Williams commented on CASSANDRA-5953: - bq. I don't know how much that matters, but as far as I can tell, we've never validated such a thing I think we did but removed it in CASSANDRA-2129 Replication validation is broken Key: CASSANDRA-5953 URL: https://issues.apache.org/jira/browse/CASSANDRA-5953 Project: Cassandra Issue Type: Bug Components: Core Reporter: Jonathan Ellis Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.10 On my local, single node cluster, RF=3 inserts should not succeed: {noformat} cqlsh CREATE KEYSPACE mykeyspace WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 3 }; cqlsh use mykeyspace ; cqlsh:mykeyspace CREATE TABLE users ( ... user_id int PRIMARY KEY, ... fname text, ... lname text ... ); cqlsh:mykeyspace INSERT INTO users (user_id, fname, lname) ... VALUES (1745, 'john', 'smith'); cqlsh:mykeyspace select * from users; user_id | fname | lname -+---+--- 1745 | john | smith {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-6000) Enhance UntypedResultSet.Row by adding missing/additional helper methods
[ https://issues.apache.org/jira/browse/CASSANDRA-6000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Coverston updated CASSANDRA-6000: -- Attachment: cassandra-6000.patch Add support for getting list composition, and column metadata. Enhance UntypedResultSet.Row by adding missing/additional helper methods Key: CASSANDRA-6000 URL: https://issues.apache.org/jira/browse/CASSANDRA-6000 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Benjamin Coverston Fix For: 1.2.10 Attachments: cassandra-6000.patch Add missing getList method, in addition it would be nice to have a method that lets us get the column specifications. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5847) Support thrift tables in Pig CqlStorage
[ https://issues.apache.org/jira/browse/CASSANDRA-5847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alex Liu updated CASSANDRA-5847: Component/s: Hadoop Support thrift tables in Pig CqlStorage --- Key: CASSANDRA-5847 URL: https://issues.apache.org/jira/browse/CASSANDRA-5847 Project: Cassandra Issue Type: Bug Components: Hadoop Affects Versions: 1.2.7 Reporter: Alex Liu Assignee: Alex Liu Attachments: 001_5847_patch.txt, 002_5847_patch.txt This is fix for Pig side of CASSANDRA-5752 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5999) Modify PRSI interface and related callers to use the index method containing the updated key and cf.
[ https://issues.apache.org/jira/browse/CASSANDRA-5999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Coverston updated CASSANDRA-5999: -- Attachment: cassandra-5999.patch Modify PRSI interface and related callers to use the index method containing the updated key and cf. Key: CASSANDRA-5999 URL: https://issues.apache.org/jira/browse/CASSANDRA-5999 Project: Cassandra Issue Type: Improvement Reporter: Benjamin Coverston Assignee: Benjamin Coverston Fix For: 1.2.10 Attachments: cassandra-5999.patch This enhancement will allow for better support of custom indexes using CQL3. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-6002) CqlRecordWriter misses clusterClumns and partitionKeyColumns size issue for thrift tables
Alex Liu created CASSANDRA-6002: --- Summary: CqlRecordWriter misses clusterClumns and partitionKeyColumns size issue for thrift tables Key: CASSANDRA-6002 URL: https://issues.apache.org/jira/browse/CASSANDRA-6002 Project: Cassandra Issue Type: Bug Components: Hadoop Reporter: Alex Liu Assignee: Alex Liu Priority: Minor For thrift tables, partitionKeyColumns size need be set to the right value and clusterColumns are missing -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5877) Unclear FileNotFoundException stacktrace when system.log can't be created
[ https://issues.apache.org/jira/browse/CASSANDRA-5877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13763604#comment-13763604 ] Aled Sage commented on CASSANDRA-5877: -- This looks buried in org.apache.log4j code, so I think better to fix it there (and thus raise it as an issue there). I'm new to this code but looks like... CassandraDaemon just passes in the config file (e.g. log4j-server.properties) which has a property log4j.appender.R.File=/var/log/cassandra/system.log. So the file's path and its meaning are buried inside log4j. The only ways I see to fix this issue in cassandra would be: 1. catch the FileNotFoundException (checking the exception text, perhaps) to log an additional explanation; or 2. parse this config file and then check if we can create the given log file. Both of these sound like bad ideas to me. Thoughts? Unclear FileNotFoundException stacktrace when system.log can't be created - Key: CASSANDRA-5877 URL: https://issues.apache.org/jira/browse/CASSANDRA-5877 Project: Cassandra Issue Type: Bug Environment: Cassandra 2.0rc1 Reporter: Michaël Figuière Priority: Trivial When you start Cassandra with default settings without the appropriate permissions to write in {{/var/log/cassandra}} you end up with the following stacktrace: {code} log4j:ERROR setFile(null,true) call failed. java.io.FileNotFoundException: /var/log/cassandra/system.log (No such file or directory) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.init(FileOutputStream.java:206) at java.io.FileOutputStream.init(FileOutputStream.java:127) at org.apache.log4j.FileAppender.setFile(FileAppender.java:294) at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207) at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165) at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:809) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735) at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:395) at org.apache.log4j.PropertyWatchdog.doOnChange(PropertyConfigurator.java:922) at org.apache.log4j.helpers.FileWatchdog.checkAndConfigure(FileWatchdog.java:89) at org.apache.log4j.helpers.FileWatchdog.init(FileWatchdog.java:58) at org.apache.log4j.PropertyWatchdog.init(PropertyConfigurator.java:914) at org.apache.log4j.PropertyConfigurator.configureAndWatch(PropertyConfigurator.java:461) at org.apache.cassandra.service.CassandraDaemon.initLog4j(CassandraDaemon.java:121) at org.apache.cassandra.service.CassandraDaemon.clinit(CassandraDaemon.java:69) {code} While a stacktrace at startup may not be the most elegant mean of communication with the user - though at least it's visible - in this situation it doesn't make it clear that Cassandra couldn't create a file in the specified log directory. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-6002) CqlRecordWriter misses clusterClumns and partitionKeyColumns size issue for thrift tables
[ https://issues.apache.org/jira/browse/CASSANDRA-6002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alex Liu updated CASSANDRA-6002: Reviewer: jbellis CqlRecordWriter misses clusterClumns and partitionKeyColumns size issue for thrift tables - Key: CASSANDRA-6002 URL: https://issues.apache.org/jira/browse/CASSANDRA-6002 Project: Cassandra Issue Type: Bug Components: Hadoop Reporter: Alex Liu Assignee: Alex Liu Priority: Minor Attachments: 6002.txt For thrift tables, partitionKeyColumns size need be set to the right value and clusterColumns are missing -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-6002) CqlRecordWriter misses clusterClumns and partitionKeyColumns size issue for thrift tables
[ https://issues.apache.org/jira/browse/CASSANDRA-6002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alex Liu updated CASSANDRA-6002: Attachment: 6002.txt CqlRecordWriter misses clusterClumns and partitionKeyColumns size issue for thrift tables - Key: CASSANDRA-6002 URL: https://issues.apache.org/jira/browse/CASSANDRA-6002 Project: Cassandra Issue Type: Bug Components: Hadoop Reporter: Alex Liu Assignee: Alex Liu Priority: Minor Attachments: 6002.txt For thrift tables, partitionKeyColumns size need be set to the right value and clusterColumns are missing -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[1/2] git commit: Pass the updated cf to the PRSI index() method
Updated Branches: refs/heads/cassandra-2.0 678aa37af - f6fda9c69 Pass the updated cf to the PRSI index() method patch by Ben Coverston; reviewed by Aleksey Yeschenko for CASSANDRA-5999 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fd129664 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fd129664 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fd129664 Branch: refs/heads/cassandra-2.0 Commit: fd129664ca482181d2c794a68bbd5a5bcc2b01be Parents: 70297f9 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Sep 11 00:43:28 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Sep 11 00:43:28 2013 +0300 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/Table.java | 2 +- .../db/index/PerRowSecondaryIndex.java | 13 +++-- .../db/index/SecondaryIndexManager.java | 28 ++-- .../db/SecondaryIndexColumnSizeTest.java| 4 +-- .../db/index/PerRowSecondaryIndexTest.java | 21 ++- 6 files changed, 36 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd129664/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 4d5b446..12e2017 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,7 @@ * Fix loading index summary containing empty key (CASSANDRA-5965) * Correctly handle limits in CompositesSearcher (CASSANDRA-5975) * Pig: handle CQL collections (CASSANDRA-5867) + * Pass the updated cf to the PRSI index() method (CASSANDRA-5999) 1.2.9 http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd129664/src/java/org/apache/cassandra/db/Table.java -- diff --git a/src/java/org/apache/cassandra/db/Table.java b/src/java/org/apache/cassandra/db/Table.java index 99a3446..a851eee 100644 --- a/src/java/org/apache/cassandra/db/Table.java +++ b/src/java/org/apache/cassandra/db/Table.java @@ -385,7 +385,7 @@ public class Table } Tracing.trace(Adding to {} memtable, cf.metadata().cfName); -cfs.apply(key, cf, updateIndexes ? cfs.indexManager.updaterFor(key) : SecondaryIndexManager.nullUpdater); +cfs.apply(key, cf, updateIndexes ? cfs.indexManager.updaterFor(key, cf) : SecondaryIndexManager.nullUpdater); } } finally http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd129664/src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java -- diff --git a/src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java b/src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java index 0200667..1818473 100644 --- a/src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java +++ b/src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java @@ -19,9 +19,11 @@ package org.apache.cassandra.db.index; import java.nio.ByteBuffer; import java.nio.charset.CharacterCodingException; +import java.util.SortedSet; import org.apache.cassandra.db.ColumnFamily; import org.apache.cassandra.db.DecoratedKey; +import org.apache.cassandra.db.marshal.AbstractType; import org.apache.cassandra.thrift.Column; import org.apache.cassandra.utils.ByteBufferUtil; @@ -31,21 +33,14 @@ import org.apache.cassandra.utils.ByteBufferUtil; public abstract class PerRowSecondaryIndex extends SecondaryIndex { /** - * Index the given row for new index creation. @param cf will represent the entire row. + * Index the given row. * * @param rowKey the row key - * @param cf the current rows data + * @param cf the cf data to be indexed */ public abstract void index(ByteBuffer rowKey, ColumnFamily cf); /** - * Index the given row - * - * @param rowKey the row key - */ -public abstract void index(ByteBuffer rowKey); - -/** * cleans up deleted columns from cassandra cleanup compaction * * @param key http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd129664/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java -- diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java index 2f03515..52d2152 100644 --- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java +++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java @@ -29,6 +29,7 @@ import org.apache.cassandra.config.ColumnDefinition; import org.apache.cassandra.db.*; import
[2/2] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.0 Conflicts: src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f6fda9c6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f6fda9c6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f6fda9c6 Branch: refs/heads/cassandra-2.0 Commit: f6fda9c69c3aa38fbd66d9c005cdc08f81e32962 Parents: 678aa37 fd12966 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Sep 11 00:57:01 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Sep 11 00:57:01 2013 +0300 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/Keyspace.java | 2 +- .../db/index/PerRowSecondaryIndex.java | 11 +--- .../db/index/SecondaryIndexManager.java | 64 ++-- .../db/SecondaryIndexColumnSizeTest.java| 4 +- .../db/index/PerRowSecondaryIndexTest.java | 21 +++ 6 files changed, 46 insertions(+), 57 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f6fda9c6/CHANGES.txt -- diff --cc CHANGES.txt index f9a3b80,12e2017..808c558 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -26,54 -10,14 +26,55 @@@ Merged from 1.2 * Fix loading index summary containing empty key (CASSANDRA-5965) * Correctly handle limits in CompositesSearcher (CASSANDRA-5975) * Pig: handle CQL collections (CASSANDRA-5867) + * Pass the updated cf to the PRSI index() method (CASSANDRA-5999) -1.2.9 +2.0.0 + * Fix thrift validation when inserting into CQL3 tables (CASSANDRA-5138) + * Fix periodic memtable flushing behavior with clean memtables (CASSANDRA-5931) + * Fix dateOf() function for pre-2.0 timestamp columns (CASSANDRA-5928) + * Fix SSTable unintentionally loads BF when opened for batch (CASSANDRA-5938) + * Add stream session progress to JMX (CASSANDRA-4757) + * Fix NPE during CAS operation (CASSANDRA-5925) +Merged from 1.2: * Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900) - * migrate 1.1 schema_columnfamilies.key_alias column to key_aliases - (CASSANDRA-5800) - * add --migrate option to sstableupgrade and sstablescrub (CASSANDRA-5831) + * Don't announce schema version until we've loaded the changes locally + (CASSANDRA-5904) + * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) + * Properly handle parsing huge map and set literals (CASSANDRA-5893) + + +2.0.0-rc2 + * enable vnodes by default (CASSANDRA-5869) + * fix CAS contention timeout (CASSANDRA-5830) + * fix HsHa to respect max frame size (CASSANDRA-4573) + * Fix (some) 2i on composite components omissions (CASSANDRA-5851) + * cqlsh: add DESCRIBE FULL SCHEMA variant (CASSANDRA-5880) +Merged from 1.2: + * Correctly validate sparse composite cells in scrub (CASSANDRA-5855) + * Add KeyCacheHitRate metric to CF metrics (CASSANDRA-5868) + * cqlsh: add support for multiline comments (CASSANDRA-5798) + * Handle CQL3 SELECT duplicate IN restrictions on clustering columns + (CASSANDRA-5856) + + +2.0.0-rc1 + * improve DecimalSerializer performance (CASSANDRA-5837) + * fix potential spurious wakeup in AsyncOneResponse (CASSANDRA-5690) + * fix schema-related trigger issues (CASSANDRA-5774) + * Better validation when accessing CQL3 table from thrift (CASSANDRA-5138) + * Fix assertion error during repair (CASSANDRA-5801) + * Fix range tombstone bug (CASSANDRA-5805) + * DC-local CAS (CASSANDRA-5797) + * Add a native_protocol_version column to the system.local table (CASSANRDA-5819) + * Use index_interval from cassandra.yaml when upgraded (CASSANDRA-5822) + * Fix buffer underflow on socket close (CASSANDRA-5792) +Merged from 1.2: + * Fix reading DeletionTime from 1.1-format sstables (CASSANDRA-5814) + * cqlsh: add collections support to COPY (CASSANDRA-5698) + * retry important messages for any IOException (CASSANDRA-5804) + * Allow empty IN relations in SELECT/UPDATE/DELETE statements (CASSANDRA-5626) + * cqlsh: fix crashing on Windows due to libedit detection (CASSANDRA-5812) * fix bulk-loading compressed sstables (CASSANDRA-5820) * (Hadoop) fix quoting in CqlPagingRecordReader and CqlRecordWriter (CASSANDRA-5824) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f6fda9c6/src/java/org/apache/cassandra/db/Keyspace.java -- diff --cc src/java/org/apache/cassandra/db/Keyspace.java index 667a656,000..4914c11 mode 100644,00..100644 --- a/src/java/org/apache/cassandra/db/Keyspace.java +++
[jira] [Commented] (CASSANDRA-5874) exception on startup
[ https://issues.apache.org/jira/browse/CASSANDRA-5874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13763622#comment-13763622 ] Aled Sage commented on CASSANDRA-5874: -- Looks similar to https://issues.apache.org/jira/browse/CASSANDRA-5995 - is that a duplicate? exception on startup Key: CASSANDRA-5874 URL: https://issues.apache.org/jira/browse/CASSANDRA-5874 Project: Cassandra Issue Type: Bug Reporter: Radim Kolar INFO 10:10:34,375 Handshaking version with /10.0.0.3 WARN 10:10:43,734 Skipped default superuser setup: some nodes were not ready INFO 10:10:44,656 Node /10.0.0.3 has restarted, now UP INFO 10:10:44,687 Handshaking version with /10.0.0.3 ERROR 10:10:44,687 Exception in thread Thread[GossipStage:1,5,main] java.lang.NumberFormatException: For input string: at java.lang.NumberFormatException.forInputString(NumberFormatException. java:65) at java.lang.Long.parseLong(Long.java:453) at java.lang.Long.valueOf(Long.java:540) at org.apache.cassandra.dht.Murmur3Partitioner$1.fromString(Murmur3Parti tioner.java:183) at org.apache.cassandra.service.StorageService.handleStateRelocating(Sto rageService.java:1490) at org.apache.cassandra.service.StorageService.onChange(StorageService.j ava:1180) at org.apache.cassandra.service.StorageService.onJoin(StorageService.jav a:1888) at org.apache.cassandra.gms.Gossiper.handleMajorStateChange(Gossiper.jav a:844) at org.apache.cassandra.gms.Gossiper.applyStateLocally(Gossiper.java:895 ) at org.apache.cassandra.gms.GossipDigestAckVerbHandler.doVerb(GossipDige stAckVerbHandler.java:57) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask. java:56) 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:724) INFO 10:10:44,796 InetAddress /10.0.0.3 is now UP -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[1/3] git commit: Pass the updated cf to the PRSI index() method
Updated Branches: refs/heads/trunk 7246502e7 - 0132b71a0 Pass the updated cf to the PRSI index() method patch by Ben Coverston; reviewed by Aleksey Yeschenko for CASSANDRA-5999 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fd129664 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fd129664 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fd129664 Branch: refs/heads/trunk Commit: fd129664ca482181d2c794a68bbd5a5bcc2b01be Parents: 70297f9 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Sep 11 00:43:28 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Sep 11 00:43:28 2013 +0300 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/Table.java | 2 +- .../db/index/PerRowSecondaryIndex.java | 13 +++-- .../db/index/SecondaryIndexManager.java | 28 ++-- .../db/SecondaryIndexColumnSizeTest.java| 4 +-- .../db/index/PerRowSecondaryIndexTest.java | 21 ++- 6 files changed, 36 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd129664/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 4d5b446..12e2017 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,7 @@ * Fix loading index summary containing empty key (CASSANDRA-5965) * Correctly handle limits in CompositesSearcher (CASSANDRA-5975) * Pig: handle CQL collections (CASSANDRA-5867) + * Pass the updated cf to the PRSI index() method (CASSANDRA-5999) 1.2.9 http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd129664/src/java/org/apache/cassandra/db/Table.java -- diff --git a/src/java/org/apache/cassandra/db/Table.java b/src/java/org/apache/cassandra/db/Table.java index 99a3446..a851eee 100644 --- a/src/java/org/apache/cassandra/db/Table.java +++ b/src/java/org/apache/cassandra/db/Table.java @@ -385,7 +385,7 @@ public class Table } Tracing.trace(Adding to {} memtable, cf.metadata().cfName); -cfs.apply(key, cf, updateIndexes ? cfs.indexManager.updaterFor(key) : SecondaryIndexManager.nullUpdater); +cfs.apply(key, cf, updateIndexes ? cfs.indexManager.updaterFor(key, cf) : SecondaryIndexManager.nullUpdater); } } finally http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd129664/src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java -- diff --git a/src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java b/src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java index 0200667..1818473 100644 --- a/src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java +++ b/src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java @@ -19,9 +19,11 @@ package org.apache.cassandra.db.index; import java.nio.ByteBuffer; import java.nio.charset.CharacterCodingException; +import java.util.SortedSet; import org.apache.cassandra.db.ColumnFamily; import org.apache.cassandra.db.DecoratedKey; +import org.apache.cassandra.db.marshal.AbstractType; import org.apache.cassandra.thrift.Column; import org.apache.cassandra.utils.ByteBufferUtil; @@ -31,21 +33,14 @@ import org.apache.cassandra.utils.ByteBufferUtil; public abstract class PerRowSecondaryIndex extends SecondaryIndex { /** - * Index the given row for new index creation. @param cf will represent the entire row. + * Index the given row. * * @param rowKey the row key - * @param cf the current rows data + * @param cf the cf data to be indexed */ public abstract void index(ByteBuffer rowKey, ColumnFamily cf); /** - * Index the given row - * - * @param rowKey the row key - */ -public abstract void index(ByteBuffer rowKey); - -/** * cleans up deleted columns from cassandra cleanup compaction * * @param key http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd129664/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java -- diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java index 2f03515..52d2152 100644 --- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java +++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java @@ -29,6 +29,7 @@ import org.apache.cassandra.config.ColumnDefinition; import org.apache.cassandra.db.*; import
[3/3] git commit: Merge branch 'cassandra-2.0' into trunk
Merge branch 'cassandra-2.0' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0132b71a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0132b71a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0132b71a Branch: refs/heads/trunk Commit: 0132b71a05f2e2bfa6fcd5470024644a19a4456f Parents: 7246502 f6fda9c Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Sep 11 00:58:23 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Sep 11 00:58:23 2013 +0300 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/Keyspace.java | 2 +- .../db/index/PerRowSecondaryIndex.java | 11 +--- .../db/index/SecondaryIndexManager.java | 64 ++-- .../db/SecondaryIndexColumnSizeTest.java| 4 +- .../db/index/PerRowSecondaryIndexTest.java | 21 +++ 6 files changed, 46 insertions(+), 57 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/0132b71a/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/0132b71a/src/java/org/apache/cassandra/db/Keyspace.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/0132b71a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java -- diff --cc src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java index f6db9f9,eff9537..bec5894 --- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java +++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java @@@ -491,10 -496,10 +495,10 @@@ public class SecondaryIndexManage groupByIndexType.put(index.getClass().getCanonicalName(), columns); } -columns.add(ix.column_name); +columns.add(ix.column); } - ListSecondaryIndexSearcher indexSearchers = new ArrayListSecondaryIndexSearcher(groupByIndexType.size()); + ListSecondaryIndexSearcher indexSearchers = new ArrayList(groupByIndexType.size()); //create searcher per type for (SetByteBuffer column : groupByIndexType.values())
[jira] [Created] (CASSANDRA-6000) Enhance UntypedResultSet.Row by adding missing/additional helper methods
Benjamin Coverston created CASSANDRA-6000: - Summary: Enhance UntypedResultSet.Row by adding missing/additional helper methods Key: CASSANDRA-6000 URL: https://issues.apache.org/jira/browse/CASSANDRA-6000 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Benjamin Coverston Fix For: 1.2.10 Add missing getList method, in addition it would be nice to have a method that lets us get the column specifications. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[2/3] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.0 Conflicts: src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f6fda9c6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f6fda9c6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f6fda9c6 Branch: refs/heads/trunk Commit: f6fda9c69c3aa38fbd66d9c005cdc08f81e32962 Parents: 678aa37 fd12966 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Sep 11 00:57:01 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Sep 11 00:57:01 2013 +0300 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/Keyspace.java | 2 +- .../db/index/PerRowSecondaryIndex.java | 11 +--- .../db/index/SecondaryIndexManager.java | 64 ++-- .../db/SecondaryIndexColumnSizeTest.java| 4 +- .../db/index/PerRowSecondaryIndexTest.java | 21 +++ 6 files changed, 46 insertions(+), 57 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f6fda9c6/CHANGES.txt -- diff --cc CHANGES.txt index f9a3b80,12e2017..808c558 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -26,54 -10,14 +26,55 @@@ Merged from 1.2 * Fix loading index summary containing empty key (CASSANDRA-5965) * Correctly handle limits in CompositesSearcher (CASSANDRA-5975) * Pig: handle CQL collections (CASSANDRA-5867) + * Pass the updated cf to the PRSI index() method (CASSANDRA-5999) -1.2.9 +2.0.0 + * Fix thrift validation when inserting into CQL3 tables (CASSANDRA-5138) + * Fix periodic memtable flushing behavior with clean memtables (CASSANDRA-5931) + * Fix dateOf() function for pre-2.0 timestamp columns (CASSANDRA-5928) + * Fix SSTable unintentionally loads BF when opened for batch (CASSANDRA-5938) + * Add stream session progress to JMX (CASSANDRA-4757) + * Fix NPE during CAS operation (CASSANDRA-5925) +Merged from 1.2: * Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900) - * migrate 1.1 schema_columnfamilies.key_alias column to key_aliases - (CASSANDRA-5800) - * add --migrate option to sstableupgrade and sstablescrub (CASSANDRA-5831) + * Don't announce schema version until we've loaded the changes locally + (CASSANDRA-5904) + * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) + * Properly handle parsing huge map and set literals (CASSANDRA-5893) + + +2.0.0-rc2 + * enable vnodes by default (CASSANDRA-5869) + * fix CAS contention timeout (CASSANDRA-5830) + * fix HsHa to respect max frame size (CASSANDRA-4573) + * Fix (some) 2i on composite components omissions (CASSANDRA-5851) + * cqlsh: add DESCRIBE FULL SCHEMA variant (CASSANDRA-5880) +Merged from 1.2: + * Correctly validate sparse composite cells in scrub (CASSANDRA-5855) + * Add KeyCacheHitRate metric to CF metrics (CASSANDRA-5868) + * cqlsh: add support for multiline comments (CASSANDRA-5798) + * Handle CQL3 SELECT duplicate IN restrictions on clustering columns + (CASSANDRA-5856) + + +2.0.0-rc1 + * improve DecimalSerializer performance (CASSANDRA-5837) + * fix potential spurious wakeup in AsyncOneResponse (CASSANDRA-5690) + * fix schema-related trigger issues (CASSANDRA-5774) + * Better validation when accessing CQL3 table from thrift (CASSANDRA-5138) + * Fix assertion error during repair (CASSANDRA-5801) + * Fix range tombstone bug (CASSANDRA-5805) + * DC-local CAS (CASSANDRA-5797) + * Add a native_protocol_version column to the system.local table (CASSANRDA-5819) + * Use index_interval from cassandra.yaml when upgraded (CASSANDRA-5822) + * Fix buffer underflow on socket close (CASSANDRA-5792) +Merged from 1.2: + * Fix reading DeletionTime from 1.1-format sstables (CASSANDRA-5814) + * cqlsh: add collections support to COPY (CASSANDRA-5698) + * retry important messages for any IOException (CASSANDRA-5804) + * Allow empty IN relations in SELECT/UPDATE/DELETE statements (CASSANDRA-5626) + * cqlsh: fix crashing on Windows due to libedit detection (CASSANDRA-5812) * fix bulk-loading compressed sstables (CASSANDRA-5820) * (Hadoop) fix quoting in CqlPagingRecordReader and CqlRecordWriter (CASSANDRA-5824) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f6fda9c6/src/java/org/apache/cassandra/db/Keyspace.java -- diff --cc src/java/org/apache/cassandra/db/Keyspace.java index 667a656,000..4914c11 mode 100644,00..100644 --- a/src/java/org/apache/cassandra/db/Keyspace.java +++
[jira] [Commented] (CASSANDRA-5995) Cassandra-shuffle causes NumberFormatException
[ https://issues.apache.org/jira/browse/CASSANDRA-5995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13763625#comment-13763625 ] Aled Sage commented on CASSANDRA-5995: -- Looks similar to https://issues.apache.org/jira/browse/CASSANDRA-5874 Cassandra-shuffle causes NumberFormatException -- Key: CASSANDRA-5995 URL: https://issues.apache.org/jira/browse/CASSANDRA-5995 Project: Cassandra Issue Type: Bug Components: Tools Environment: Amazon EC2 Reporter: William Montaz Using Cassandra-shuffle create, then Cassandra-shuffle en causes a NumbertFormatException : Extract from output.log INFO 15:01:28,935 Enabling scheduled transfers of token ranges INFO 15:01:28,957 Initiating transfer of 3059156119944164299 (scheduled at Tue Sep 10 15:01:19 UTC 2013) WARN 15:01:28,962 Token 3059156119944164299 changing ownership from /10.36.194.173 to /10.39.67.29 WARN 15:01:28,967 Token 3059156119944164299 changing ownership from /10.36.194.173 to /10.39.67.29 INFO 15:01:28,968 RELOCATING: relocating [3059156119944164299] to 10.39.67.29 INFO 15:01:28,968 RELOCATING: Sleeping 3 ms before start streaming/fetching ranges ERROR 15:01:29,331 Exception in thread Thread[GossipStage:8,5,main] java.lang.NumberFormatException: For input string: at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Long.parseLong(Long.java:453) at java.lang.Long.valueOf(Long.java:540) at org.apache.cassandra.dht.Murmur3Partitioner$1.fromString(Murmur3Partitioner.java:183) at org.apache.cassandra.service.StorageService.handleStateRelocating(StorageService.java:1490) at org.apache.cassandra.service.StorageService.onChange(StorageService.java:1180) at org.apache.cassandra.gms.Gossiper.doNotifications(Gossiper.java:956) at org.apache.cassandra.gms.Gossiper.applyNewStates(Gossiper.java:947) at org.apache.cassandra.gms.Gossiper.applyStateLocally(Gossiper.java:905) at org.apache.cassandra.gms.GossipDigestAckVerbHandler.doVerb(GossipDigestAckVerbHandler.java:57) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:56) 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:724) ERROR 15:01:30,098 Exception in thread Thread[GossipStage:9,5,main] java.lang.NumberFormatException: For input string: at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Long.parseLong(Long.java:453) at java.lang.Long.valueOf(Long.java:540) at org.apache.cassandra.dht.Murmur3Partitioner$1.fromString(Murmur3Partitioner.java:183) at org.apache.cassandra.service.StorageService.handleStateRelocating(StorageService.java:1490) at org.apache.cassandra.service.StorageService.onChange(StorageService.java:1180) at org.apache.cassandra.gms.Gossiper.doNotifications(Gossiper.java:956) at org.apache.cassandra.gms.Gossiper.applyNewStates(Gossiper.java:947) at org.apache.cassandra.gms.Gossiper.applyStateLocally(Gossiper.java:905) at org.apache.cassandra.gms.GossipDigestAck2VerbHandler.doVerb(GossipDigestAck2VerbHandler.java:49) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:56) 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:724) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CASSANDRA-5999) Modify PRSI interface and related callers to use the index method containing the updated key and cf.
[ https://issues.apache.org/jira/browse/CASSANDRA-5999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko resolved CASSANDRA-5999. -- Resolution: Fixed Thanks, committed as fd129664ca482181d2c794a68bbd5a5bcc2b01be. Modify PRSI interface and related callers to use the index method containing the updated key and cf. Key: CASSANDRA-5999 URL: https://issues.apache.org/jira/browse/CASSANDRA-5999 Project: Cassandra Issue Type: Improvement Reporter: Benjamin Coverston Assignee: Benjamin Coverston Fix For: 1.2.10 Attachments: cassandra-5999.patch This enhancement will allow for better support of custom indexes using CQL3. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5947) Sampling bug in metrics-core-2.0.3.jar used by Cassandra
[ https://issues.apache.org/jira/browse/CASSANDRA-5947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ravi Prasad updated CASSANDRA-5947: --- Attachment: Screen Shot 2013-09-10 at 2.23.11 PM.png Screenshot of jconsole showing double quoted object names only for org.apache.cassandra.metrics yammer metrics in cassandra-1.2.10(latest cassandra-1.2 branch) with metrics-core-2.2.0.jar Sampling bug in metrics-core-2.0.3.jar used by Cassandra Key: CASSANDRA-5947 URL: https://issues.apache.org/jira/browse/CASSANDRA-5947 Project: Cassandra Issue Type: Bug Components: Tools Reporter: J.B. Langston Assignee: Jonathan Ellis Priority: Minor Fix For: 1.2.10, 2.0.1 Attachments: Screen Shot 2013-09-10 at 2.23.11 PM.png There is a sampling bug in the version of the metrics library we're using in Cassandra. See https://github.com/codahale/metrics/issues/421. ExponentiallyDecayingSample is used by the Timer's histogram that is used in stress tool, and according to [~brandon.williams] it is also in a few other places like the dynamic snitch. The statistical theory involved in this bug goes over my head so i'm not sure if this would bug would meaningfully affect its usage by Cassandra. One of the comments on the bug mentions that it affects slow sampling rates (10 samples/min was the example given). We're currently distributing metrics-core-2.0.3.jar and according to the release nodes, this bug is fixed in 2.1.3: http://metrics.codahale.com/about/release-notes/#v2-1-3-aug-06-2012 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-6003) CQL: Support NaN and inifinities in Double literals
Alex Cruise created CASSANDRA-6003: -- Summary: CQL: Support NaN and inifinities in Double literals Key: CASSANDRA-6003 URL: https://issues.apache.org/jira/browse/CASSANDRA-6003 Project: Cassandra Issue Type: Wish Components: Core Reporter: Alex Cruise My actual app uses a Map[UUID, Double], and in the upstream data source, unavailable data is encoded as Double.NaN. But when I try to insert them into C* (currently working with 2.0), I get a no viable alternative at the syntax immediately following the NaN value. Here's a tiny test case: {code} cqlsh create table test (pk timeuuid primary key, d double); cqlsh insert into test (pk, d) values (now(), NaN); Bad Request: line 1:43 no viable alternative at input ')' {code} The workaround suggested by 'iamaleksey' on IRC (Thanks!) allows the data to be inserted, but it's really ugly, and I'm not sure yet whether it will work OK on the read side: {code} // myStuff is a Map[UUID,Double] mySuff.mapValues { case x if x.isNaN = QueryBuilder.fcall(blobAsDouble, ByteBufferUtil.EMPTY_BYTE_BUFFER) case x = x: java.lang.Double // explicit boxing, maybe not necessary }.asJava {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
git commit: Pass the updated cf to the PRSI index() method
Updated Branches: refs/heads/cassandra-1.2 70297f9ad - fd129664c Pass the updated cf to the PRSI index() method patch by Ben Coverston; reviewed by Aleksey Yeschenko for CASSANDRA-5999 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fd129664 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fd129664 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fd129664 Branch: refs/heads/cassandra-1.2 Commit: fd129664ca482181d2c794a68bbd5a5bcc2b01be Parents: 70297f9 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Sep 11 00:43:28 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Sep 11 00:43:28 2013 +0300 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/Table.java | 2 +- .../db/index/PerRowSecondaryIndex.java | 13 +++-- .../db/index/SecondaryIndexManager.java | 28 ++-- .../db/SecondaryIndexColumnSizeTest.java| 4 +-- .../db/index/PerRowSecondaryIndexTest.java | 21 ++- 6 files changed, 36 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd129664/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 4d5b446..12e2017 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,7 @@ * Fix loading index summary containing empty key (CASSANDRA-5965) * Correctly handle limits in CompositesSearcher (CASSANDRA-5975) * Pig: handle CQL collections (CASSANDRA-5867) + * Pass the updated cf to the PRSI index() method (CASSANDRA-5999) 1.2.9 http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd129664/src/java/org/apache/cassandra/db/Table.java -- diff --git a/src/java/org/apache/cassandra/db/Table.java b/src/java/org/apache/cassandra/db/Table.java index 99a3446..a851eee 100644 --- a/src/java/org/apache/cassandra/db/Table.java +++ b/src/java/org/apache/cassandra/db/Table.java @@ -385,7 +385,7 @@ public class Table } Tracing.trace(Adding to {} memtable, cf.metadata().cfName); -cfs.apply(key, cf, updateIndexes ? cfs.indexManager.updaterFor(key) : SecondaryIndexManager.nullUpdater); +cfs.apply(key, cf, updateIndexes ? cfs.indexManager.updaterFor(key, cf) : SecondaryIndexManager.nullUpdater); } } finally http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd129664/src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java -- diff --git a/src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java b/src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java index 0200667..1818473 100644 --- a/src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java +++ b/src/java/org/apache/cassandra/db/index/PerRowSecondaryIndex.java @@ -19,9 +19,11 @@ package org.apache.cassandra.db.index; import java.nio.ByteBuffer; import java.nio.charset.CharacterCodingException; +import java.util.SortedSet; import org.apache.cassandra.db.ColumnFamily; import org.apache.cassandra.db.DecoratedKey; +import org.apache.cassandra.db.marshal.AbstractType; import org.apache.cassandra.thrift.Column; import org.apache.cassandra.utils.ByteBufferUtil; @@ -31,21 +33,14 @@ import org.apache.cassandra.utils.ByteBufferUtil; public abstract class PerRowSecondaryIndex extends SecondaryIndex { /** - * Index the given row for new index creation. @param cf will represent the entire row. + * Index the given row. * * @param rowKey the row key - * @param cf the current rows data + * @param cf the cf data to be indexed */ public abstract void index(ByteBuffer rowKey, ColumnFamily cf); /** - * Index the given row - * - * @param rowKey the row key - */ -public abstract void index(ByteBuffer rowKey); - -/** * cleans up deleted columns from cassandra cleanup compaction * * @param key http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd129664/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java -- diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java index 2f03515..52d2152 100644 --- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java +++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java @@ -29,6 +29,7 @@ import org.apache.cassandra.config.ColumnDefinition; import org.apache.cassandra.db.*; import
[jira] [Commented] (CASSANDRA-5947) Sampling bug in metrics-core-2.0.3.jar used by Cassandra
[ https://issues.apache.org/jira/browse/CASSANDRA-5947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13763765#comment-13763765 ] Ravi Prasad commented on CASSANDRA-5947: Sorry, missed Chris's comment above. If this is going to be the case, can we have the http://wiki.apache.org/cassandra/Metrics and NEWS.txt updated on this change. Sampling bug in metrics-core-2.0.3.jar used by Cassandra Key: CASSANDRA-5947 URL: https://issues.apache.org/jira/browse/CASSANDRA-5947 Project: Cassandra Issue Type: Bug Components: Tools Reporter: J.B. Langston Assignee: Jonathan Ellis Priority: Minor Fix For: 1.2.10, 2.0.1 Attachments: Screen Shot 2013-09-10 at 2.23.11 PM.png There is a sampling bug in the version of the metrics library we're using in Cassandra. See https://github.com/codahale/metrics/issues/421. ExponentiallyDecayingSample is used by the Timer's histogram that is used in stress tool, and according to [~brandon.williams] it is also in a few other places like the dynamic snitch. The statistical theory involved in this bug goes over my head so i'm not sure if this would bug would meaningfully affect its usage by Cassandra. One of the comments on the bug mentions that it affects slow sampling rates (10 samples/min was the example given). We're currently distributing metrics-core-2.0.3.jar and according to the release nodes, this bug is fixed in 2.1.3: http://metrics.codahale.com/about/release-notes/#v2-1-3-aug-06-2012 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-6004) Performing a Select count(*) when replication factor node count causes assertion error and timeout
James P created CASSANDRA-6004: -- Summary: Performing a Select count(*) when replication factor node count causes assertion error and timeout Key: CASSANDRA-6004 URL: https://issues.apache.org/jira/browse/CASSANDRA-6004 Project: Cassandra Issue Type: Bug Components: API Environment: Two node setup Ubuntu Server 12.04 Tested on JDK 1.6 and 1.7 Reporter: James P When performing a Select Count(*) query on a table belonging to a keyspace with a replication factor less than the total node count, the following error is encountered which ultimately results in an rpc_timeout for the request: ERROR 18:47:54,660 Exception in thread Thread[Thread-5,5,main] java.lang.AssertionError at org.apache.cassandra.db.filter.IDiskAtomFilter$Serializer.deserialize(IDiskAtomFilter.java:116) at org.apache.cassandra.db.RangeSliceCommandSerializer.deserialize(RangeSliceCommand.java:247) at org.apache.cassandra.db.RangeSliceCommandSerializer.deserialize(RangeSliceCommand.java:156) at org.apache.cassandra.net.MessageIn.read(MessageIn.java:99) at org.apache.cassandra.net.IncomingTcpConnection.receiveMessage(IncomingTcpConnection.java:148) at org.apache.cassandra.net.IncomingTcpConnection.handleModernVersion(IncomingTcpConnection.java:125) at org.apache.cassandra.net.IncomingTcpConnection.run(IncomingTcpConnection.java:73) The issue is not encountered when the replication factor is = node count To replicate the issue: 1) Create the keyspace: CREATE KEYSPACE demodb WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor': 1}; 2) Create the table CREATE TABLE users ( user_name varchar, password varchar, gender varchar, session_token varchar, state varchar, birth_year bigint, PRIMARY KEY (user_name)); 3) Do a CQL query: SELECT count(*) FROM demodb.users ; The issue is reproducible even if the table is empty. Both CQLSH and client (astyanax) api calls are affected. Tested on two different clusters (2-node and 8-node) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-6004) Performing a Select count(*) when replication factor node count causes assertion error and timeout
[ https://issues.apache.org/jira/browse/CASSANDRA-6004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James P updated CASSANDRA-6004: --- Description: When performing a Select Count() query on a table belonging to a keyspace with a replication factor less than the total node count, the following error is encountered which ultimately results in an rpc_timeout for the request: ERROR 18:47:54,660 Exception in thread Thread[Thread-5,5,main] java.lang.AssertionError at org.apache.cassandra.db.filter.IDiskAtomFilter$Serializer.deserialize(IDiskAtomFilter.java:116) at org.apache.cassandra.db.RangeSliceCommandSerializer.deserialize(RangeSliceCommand.java:247) at org.apache.cassandra.db.RangeSliceCommandSerializer.deserialize(RangeSliceCommand.java:156) at org.apache.cassandra.net.MessageIn.read(MessageIn.java:99) at org.apache.cassandra.net.IncomingTcpConnection.receiveMessage(IncomingTcpConnection.java:148) at org.apache.cassandra.net.IncomingTcpConnection.handleModernVersion(IncomingTcpConnection.java:125) at org.apache.cassandra.net.IncomingTcpConnection.run(IncomingTcpConnection.java:73) The issue is not encountered when the replication factor is = node count To replicate the issue: 1) Create the keyspace: CREATE KEYSPACE demodb WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor': 1}; 2) Create the table CREATE TABLE users ( user_name varchar, password varchar, gender varchar, session_token varchar, state varchar, birth_year bigint, PRIMARY KEY (user_name)); 3) Do a CQL query: SELECT count(*) FROM demodb.users ; The issue is reproducible even if the table is empty. Both CQLSH and client (astyanax) api calls are affected. Tested on two different clusters (2-node and 8-node) was: When performing a Select Count(*) query on a table belonging to a keyspace with a replication factor less than the total node count, the following error is encountered which ultimately results in an rpc_timeout for the request: ERROR 18:47:54,660 Exception in thread Thread[Thread-5,5,main] java.lang.AssertionError at org.apache.cassandra.db.filter.IDiskAtomFilter$Serializer.deserialize(IDiskAtomFilter.java:116) at org.apache.cassandra.db.RangeSliceCommandSerializer.deserialize(RangeSliceCommand.java:247) at org.apache.cassandra.db.RangeSliceCommandSerializer.deserialize(RangeSliceCommand.java:156) at org.apache.cassandra.net.MessageIn.read(MessageIn.java:99) at org.apache.cassandra.net.IncomingTcpConnection.receiveMessage(IncomingTcpConnection.java:148) at org.apache.cassandra.net.IncomingTcpConnection.handleModernVersion(IncomingTcpConnection.java:125) at org.apache.cassandra.net.IncomingTcpConnection.run(IncomingTcpConnection.java:73) The issue is not encountered when the replication factor is = node count To replicate the issue: 1) Create the keyspace: CREATE KEYSPACE demodb WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor': 1}; 2) Create the table CREATE TABLE users ( user_name varchar, password varchar, gender varchar, session_token varchar, state varchar, birth_year bigint, PRIMARY KEY (user_name)); 3) Do a CQL query: SELECT count(*) FROM demodb.users ; The issue is reproducible even if the table is empty. Both CQLSH and client (astyanax) api calls are affected. Tested on two different clusters (2-node and 8-node) Performing a Select count(*) when replication factor node count causes assertion error and timeout -- Key: CASSANDRA-6004 URL: https://issues.apache.org/jira/browse/CASSANDRA-6004 Project: Cassandra Issue Type: Bug Components: API Environment: Two node setup Ubuntu Server 12.04 Tested on JDK 1.6 and 1.7 Reporter: James P When performing a Select Count() query on a table belonging to a keyspace with a replication factor less than the total node count, the following error is encountered which ultimately results in an rpc_timeout for the request: ERROR 18:47:54,660 Exception in thread Thread[Thread-5,5,main] java.lang.AssertionError at org.apache.cassandra.db.filter.IDiskAtomFilter$Serializer.deserialize(IDiskAtomFilter.java:116) at org.apache.cassandra.db.RangeSliceCommandSerializer.deserialize(RangeSliceCommand.java:247) at org.apache.cassandra.db.RangeSliceCommandSerializer.deserialize(RangeSliceCommand.java:156) at org.apache.cassandra.net.MessageIn.read(MessageIn.java:99) at org.apache.cassandra.net.IncomingTcpConnection.receiveMessage(IncomingTcpConnection.java:148) at org.apache.cassandra.net.IncomingTcpConnection.handleModernVersion(IncomingTcpConnection.java:125) at
[jira] [Updated] (CASSANDRA-6004) Performing a Select count(*) when replication factor node count causes assertion error and timeout
[ https://issues.apache.org/jira/browse/CASSANDRA-6004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James P updated CASSANDRA-6004: --- Description: When performing a Select Count() query on a table belonging to a keyspace with a replication factor less than the total node count, the following error is encountered which ultimately results in an rpc_timeout for the request: ERROR 18:47:54,660 Exception in thread Thread[Thread-5,5,main] java.lang.AssertionError at org.apache.cassandra.db.filter.IDiskAtomFilter$Serializer.deserialize(IDiskAtomFilter.java:116) at org.apache.cassandra.db.RangeSliceCommandSerializer.deserialize(RangeSliceCommand.java:247) at org.apache.cassandra.db.RangeSliceCommandSerializer.deserialize(RangeSliceCommand.java:156) at org.apache.cassandra.net.MessageIn.read(MessageIn.java:99) at org.apache.cassandra.net.IncomingTcpConnection.receiveMessage(IncomingTcpConnection.java:148) at org.apache.cassandra.net.IncomingTcpConnection.handleModernVersion(IncomingTcpConnection.java:125) at org.apache.cassandra.net.IncomingTcpConnection.run(IncomingTcpConnection.java:73) The issue is not encountered when the replication factor is = node count To replicate the issue: 1) Create the keyspace: CREATE KEYSPACE demodb WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor': 1}; 2) Create the table CREATE TABLE users ( user_name varchar, password varchar, gender varchar, session_token varchar, state varchar, birth_year bigint, PRIMARY KEY (user_name)); 3) Do a CQL query: SELECT count( * ) FROM demodb.users ; The issue is reproducible even if the table is empty. Both CQLSH and client (astyanax) api calls are affected. Tested on two different clusters (2-node and 8-node) was: When performing a Select Count() query on a table belonging to a keyspace with a replication factor less than the total node count, the following error is encountered which ultimately results in an rpc_timeout for the request: ERROR 18:47:54,660 Exception in thread Thread[Thread-5,5,main] java.lang.AssertionError at org.apache.cassandra.db.filter.IDiskAtomFilter$Serializer.deserialize(IDiskAtomFilter.java:116) at org.apache.cassandra.db.RangeSliceCommandSerializer.deserialize(RangeSliceCommand.java:247) at org.apache.cassandra.db.RangeSliceCommandSerializer.deserialize(RangeSliceCommand.java:156) at org.apache.cassandra.net.MessageIn.read(MessageIn.java:99) at org.apache.cassandra.net.IncomingTcpConnection.receiveMessage(IncomingTcpConnection.java:148) at org.apache.cassandra.net.IncomingTcpConnection.handleModernVersion(IncomingTcpConnection.java:125) at org.apache.cassandra.net.IncomingTcpConnection.run(IncomingTcpConnection.java:73) The issue is not encountered when the replication factor is = node count To replicate the issue: 1) Create the keyspace: CREATE KEYSPACE demodb WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor': 1}; 2) Create the table CREATE TABLE users ( user_name varchar, password varchar, gender varchar, session_token varchar, state varchar, birth_year bigint, PRIMARY KEY (user_name)); 3) Do a CQL query: SELECT count(*) FROM demodb.users ; The issue is reproducible even if the table is empty. Both CQLSH and client (astyanax) api calls are affected. Tested on two different clusters (2-node and 8-node) Performing a Select count(*) when replication factor node count causes assertion error and timeout -- Key: CASSANDRA-6004 URL: https://issues.apache.org/jira/browse/CASSANDRA-6004 Project: Cassandra Issue Type: Bug Components: API Environment: Two node setup Ubuntu Server 12.04 Tested on JDK 1.6 and 1.7 Reporter: James P When performing a Select Count() query on a table belonging to a keyspace with a replication factor less than the total node count, the following error is encountered which ultimately results in an rpc_timeout for the request: ERROR 18:47:54,660 Exception in thread Thread[Thread-5,5,main] java.lang.AssertionError at org.apache.cassandra.db.filter.IDiskAtomFilter$Serializer.deserialize(IDiskAtomFilter.java:116) at org.apache.cassandra.db.RangeSliceCommandSerializer.deserialize(RangeSliceCommand.java:247) at org.apache.cassandra.db.RangeSliceCommandSerializer.deserialize(RangeSliceCommand.java:156) at org.apache.cassandra.net.MessageIn.read(MessageIn.java:99) at org.apache.cassandra.net.IncomingTcpConnection.receiveMessage(IncomingTcpConnection.java:148) at org.apache.cassandra.net.IncomingTcpConnection.handleModernVersion(IncomingTcpConnection.java:125) at
[3/3] git commit: Merge branch 'cassandra-2.0' into trunk
Merge branch 'cassandra-2.0' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/36610aaf Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/36610aaf Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/36610aaf Branch: refs/heads/trunk Commit: 36610aaf7e99348cae0a989cb28aa8caaa871848 Parents: 4f5242c 096f2bf Author: Aleksey Yeschenko alek...@apache.org Authored: Tue Sep 10 17:58:51 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Tue Sep 10 17:58:51 2013 +0300 -- CHANGES.txt | 2 ++ .../apache/cassandra/db/ColumnFamilyStore.java | 2 +- .../db/index/composites/CompositesSearcher.java | 26 +--- 3 files changed, 14 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/36610aaf/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/36610aaf/src/java/org/apache/cassandra/db/ColumnFamilyStore.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/36610aaf/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java --
[2/3] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.0 Conflicts: CHANGES.txt src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/096f2bf9 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/096f2bf9 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/096f2bf9 Branch: refs/heads/trunk Commit: 096f2bf92049ad3d955eb1189526800c8292dd94 Parents: 52678a2 caef32e Author: Aleksey Yeschenko alek...@apache.org Authored: Tue Sep 10 17:58:19 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Tue Sep 10 17:58:19 2013 +0300 -- CHANGES.txt | 2 ++ .../apache/cassandra/db/ColumnFamilyStore.java | 2 +- .../db/index/composites/CompositesSearcher.java | 26 +--- 3 files changed, 14 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/096f2bf9/CHANGES.txt -- diff --cc CHANGES.txt index abbb4f9,2328bf7..22fa74b --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -23,54 -7,15 +23,56 @@@ Merged from 1.2 * Allow disabling SlabAllocator (CASSANDRA-5935) * Make user-defined compaction JMX blocking (CASSANDRA-4952) * Fix streaming does not transfer wrapped range (CASSANDRA-5948) + * Fix loading index summary containing empty key (CASSANDRA-5965) + * Correctly handle limits in CompositesSearcher (CASSANDRA-5975) -1.2.9 +2.0.0 + * Fix thrift validation when inserting into CQL3 tables (CASSANDRA-5138) + * Fix periodic memtable flushing behavior with clean memtables (CASSANDRA-5931) + * Fix dateOf() function for pre-2.0 timestamp columns (CASSANDRA-5928) + * Fix SSTable unintentionally loads BF when opened for batch (CASSANDRA-5938) + * Add stream session progress to JMX (CASSANDRA-4757) + * Fix NPE during CAS operation (CASSANDRA-5925) +Merged from 1.2: * Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900) - * migrate 1.1 schema_columnfamilies.key_alias column to key_aliases - (CASSANDRA-5800) - * add --migrate option to sstableupgrade and sstablescrub (CASSANDRA-5831) + * Don't announce schema version until we've loaded the changes locally + (CASSANDRA-5904) + * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) + * Properly handle parsing huge map and set literals (CASSANDRA-5893) + + +2.0.0-rc2 + * enable vnodes by default (CASSANDRA-5869) + * fix CAS contention timeout (CASSANDRA-5830) + * fix HsHa to respect max frame size (CASSANDRA-4573) + * Fix (some) 2i on composite components omissions (CASSANDRA-5851) + * cqlsh: add DESCRIBE FULL SCHEMA variant (CASSANDRA-5880) +Merged from 1.2: + * Correctly validate sparse composite cells in scrub (CASSANDRA-5855) + * Add KeyCacheHitRate metric to CF metrics (CASSANDRA-5868) + * cqlsh: add support for multiline comments (CASSANDRA-5798) + * Handle CQL3 SELECT duplicate IN restrictions on clustering columns + (CASSANDRA-5856) + + +2.0.0-rc1 + * improve DecimalSerializer performance (CASSANDRA-5837) + * fix potential spurious wakeup in AsyncOneResponse (CASSANDRA-5690) + * fix schema-related trigger issues (CASSANDRA-5774) + * Better validation when accessing CQL3 table from thrift (CASSANDRA-5138) + * Fix assertion error during repair (CASSANDRA-5801) + * Fix range tombstone bug (CASSANDRA-5805) + * DC-local CAS (CASSANDRA-5797) + * Add a native_protocol_version column to the system.local table (CASSANRDA-5819) + * Use index_interval from cassandra.yaml when upgraded (CASSANDRA-5822) + * Fix buffer underflow on socket close (CASSANDRA-5792) +Merged from 1.2: + * Fix reading DeletionTime from 1.1-format sstables (CASSANDRA-5814) + * cqlsh: add collections support to COPY (CASSANDRA-5698) + * retry important messages for any IOException (CASSANDRA-5804) + * Allow empty IN relations in SELECT/UPDATE/DELETE statements (CASSANDRA-5626) + * cqlsh: fix crashing on Windows due to libedit detection (CASSANDRA-5812) * fix bulk-loading compressed sstables (CASSANDRA-5820) * (Hadoop) fix quoting in CqlPagingRecordReader and CqlRecordWriter (CASSANDRA-5824) http://git-wip-us.apache.org/repos/asf/cassandra/blob/096f2bf9/src/java/org/apache/cassandra/db/ColumnFamilyStore.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/096f2bf9/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java -- diff --cc src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java index f9b7b11,1e9d59d..011839e ---