[jira] [Commented] (CASSANDRA-5576) CREATE/DROP TRIGGER in CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13684088#comment-13684088 ] Vijay commented on CASSANDRA-5576: -- Pushed the schema change to the same branch. Thanks! > CREATE/DROP TRIGGER in CQL > -- > > Key: CASSANDRA-5576 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5576 > Project: Cassandra > Issue Type: Bug > Components: API, Core >Reporter: Jonathan Ellis >Assignee: Vijay > Fix For: 2.0 > > -- 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-5576) CREATE/DROP TRIGGER in CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13684083#comment-13684083 ] Aleksey Yeschenko commented on CASSANDRA-5576: -- Mentioned it to highlight how important getting the schema of system tables right the first time is. Changing it is hard. Removing columns - almost impossible. If we can have one less from the start, I'd much rather prefer it. And we *will* add trigger parametrization in the future - so why not add trigger_options map right now and keep the class there, instead of having a separate trigger_class column? Not having to touch schema_triggers schema in the future = win. > CREATE/DROP TRIGGER in CQL > -- > > Key: CASSANDRA-5576 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5576 > Project: Cassandra > Issue Type: Bug > Components: API, Core >Reporter: Jonathan Ellis >Assignee: Vijay > Fix For: 2.0 > > -- 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-5576) CREATE/DROP TRIGGER in CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13684080#comment-13684080 ] Aleksey Yeschenko commented on CASSANDRA-5576: -- I'm talking about removing columns from schema of system tables themselves, not the values (say, getting rid of schema_columnfamilies.compaction_strategy_class column altogether). Values, sure. > CREATE/DROP TRIGGER in CQL > -- > > Key: CASSANDRA-5576 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5576 > Project: Cassandra > Issue Type: Bug > Components: API, Core >Reporter: Jonathan Ellis >Assignee: Vijay > Fix For: 2.0 > > -- 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-5642) StorageProxy.insertLocal should not drop mutation
Boole Guo created CASSANDRA-5642: Summary: StorageProxy.insertLocal should not drop mutation Key: CASSANDRA-5642 URL: https://issues.apache.org/jira/browse/CASSANDRA-5642 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.9 Environment: centos cassandra-1.1.9 Reporter: Boole Guo The insertLocal should not drop mutations, for it would cause lose 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] [Commented] (CASSANDRA-5576) CREATE/DROP TRIGGER in CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13684077#comment-13684077 ] Vijay commented on CASSANDRA-5576: -- {quote} dropping them isn't. {quote} With range tombstone we just delete all the Composite columns with a prefix "where trigger_name='xyz'"... thats what the patch does :) > CREATE/DROP TRIGGER in CQL > -- > > Key: CASSANDRA-5576 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5576 > Project: Cassandra > Issue Type: Bug > Components: API, Core >Reporter: Jonathan Ellis >Assignee: Vijay > Fix For: 2.0 > > -- 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-5641) CQL 2 when use 'ALTER COLUMNFAMILY/table DROP ' would not delete values
[ https://issues.apache.org/jira/browse/CASSANDRA-5641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13684075#comment-13684075 ] Boole Guo commented on CASSANDRA-5641: -- But when use cql 3, this problem do not exist. > CQL 2 when use 'ALTER COLUMNFAMILY/table DROP ' would not delete > values > > > Key: CASSANDRA-5641 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5641 > Project: Cassandra > Issue Type: Bug > Components: Core >Affects Versions: 1.1.9 > Environment: centos cassandra-1.1.9 >Reporter: Boole Guo > Labels: CQL > > cqlsh:testcql> insert into data (key, field0, field1, field2) values > ('user1', 'hello', 'ycsb', 'write'); > cqlsh:testcql> select * from data; > KEY | field0 | field1 | field2 > ---+++ > user1 | hello | ycsb | write > cqlsh:testcql> ALTER COLUMNFAMILY data DROP field1; > cqlsh:testcql> select * from data; > KEY | field0 | field1 | field2 > ---+++ > user1 | hello | ycsb | write > cqlsh:testcql> -- 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-5641) CQL 2 when use 'ALTER COLUMNFAMILY/table DROP ' would not delete values
Boole Guo created CASSANDRA-5641: Summary: CQL 2 when use 'ALTER COLUMNFAMILY/table DROP ' would not delete values Key: CASSANDRA-5641 URL: https://issues.apache.org/jira/browse/CASSANDRA-5641 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.9 Environment: centos cassandra-1.1.9 Reporter: Boole Guo cqlsh:testcql> insert into data (key, field0, field1, field2) values ('user1', 'hello', 'ycsb', 'write'); cqlsh:testcql> select * from data; KEY | field0 | field1 | field2 ---+++ user1 | hello | ycsb | write cqlsh:testcql> ALTER COLUMNFAMILY data DROP field1; cqlsh:testcql> select * from data; KEY | field0 | field1 | field2 ---+++ user1 | hello | ycsb | write cqlsh:testcql> -- 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-5576) CREATE/DROP TRIGGER in CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13684073#comment-13684073 ] Aleksey Yeschenko commented on CASSANDRA-5576: -- Yes, options should definitely be a map. Question is, should class be a separate column or should it be simply one of the options in that map. Cases where class is part of the options and not a separate column: - custom 2i (schema_columns.index_options) - compression (schema_columnfamilies.compression_parameters) Cases where class is a separate column: - replication (schema_keyspaces.strategy_class) - compaction (schema_columnfamilies.compaction_strategy_class) In the last two cases, even though they are stored separately, in CQL3 CREATE/ALTER the class is still conceptually part of the options map: - CREATE KEYSPACE WITH replication = {'class': 'path.to.strategy.class', 'option1': 'value1', 'optionX': ...} - ALTER TABLE WITH compaction = {'class': 'SizeTieredCompactionStrategy', 'option1': 'value1', 'optionX': ...} Now, once we add parameters support to triggers, we could just add trigger_options map and to keep all but class there. Adding columns to system tables is okay, dropping them isn't. But adding trigger_options map right now and storing the class there (with 'class' key) will let us to leave schema_triggers schema like this forever, future-proofing it (this is what I suggested in https://issues.apache.org/jira/browse/CASSANDRA-5576?focusedCommentId=13681562&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13681562 and in https://issues.apache.org/jira/browse/CASSANDRA-5576?focusedCommentId=13669381&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13669381 before that). > CREATE/DROP TRIGGER in CQL > -- > > Key: CASSANDRA-5576 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5576 > Project: Cassandra > Issue Type: Bug > Components: API, Core >Reporter: Jonathan Ellis >Assignee: Vijay > Fix For: 2.0 > > -- 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-5378) Fat Client: No longer works in 1.2
[ https://issues.apache.org/jira/browse/CASSANDRA-5378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carl Yeksigian updated CASSANDRA-5378: -- Attachment: 5378-schema-writing.patch > Fat Client: No longer works in 1.2 > -- > > Key: CASSANDRA-5378 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5378 > Project: Cassandra > Issue Type: Bug >Affects Versions: 1.2.0 >Reporter: Carl Yeksigian >Assignee: Carl Yeksigian > Labels: client > Fix For: 1.2.4 > > Attachments: 5378-1.2.txt, 5378-schema-writing.patch, 5378.txt, > 5378-v2.txt > > > The current client only example doesn't compile. After doing some updates, > the fat client still won't work, mainly because the schema is not being > pushed to the fat client. > I've made changes to the client to support CQL3 commands, to the > ServiceManager to wait until a migration has completed before starting the > client, and to the MigrationManager to not try to pull schemas from a fat > client. -- 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-5378) Fat Client: No longer works in 1.2
[ https://issues.apache.org/jira/browse/CASSANDRA-5378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13684024#comment-13684024 ] Carl Yeksigian commented on CASSANDRA-5378: --- I'm attaching a fix that adds back the Schema.instance.updateVersion(), but prevents writing out to disk by that call. This fixes the test, and the startup of the fat client. > Fat Client: No longer works in 1.2 > -- > > Key: CASSANDRA-5378 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5378 > Project: Cassandra > Issue Type: Bug >Affects Versions: 1.2.0 >Reporter: Carl Yeksigian >Assignee: Carl Yeksigian > Labels: client > Fix For: 1.2.4 > > Attachments: 5378-1.2.txt, 5378-schema-writing.patch, 5378.txt, > 5378-v2.txt > > > The current client only example doesn't compile. After doing some updates, > the fat client still won't work, mainly because the schema is not being > pushed to the fat client. > I've made changes to the client to support CQL3 commands, to the > ServiceManager to wait until a migration has completed before starting the > client, and to the MigrationManager to not try to pull schemas from a fat > client. -- 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-4495) Don't tie client side use of AbstractType to JDBC
[ https://issues.apache.org/jira/browse/CASSANDRA-4495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carl Yeksigian updated CASSANDRA-4495: -- Attachment: 4495-v2.patch > Don't tie client side use of AbstractType to JDBC > - > > Key: CASSANDRA-4495 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4495 > Project: Cassandra > Issue Type: Improvement >Reporter: Sylvain Lebresne >Assignee: Carl Yeksigian >Priority: Minor > Fix For: 2.0 > > Attachments: 4495.patch, 4495-v2.patch > > > We currently expose the AbstractType to java clients that want to reuse them > though the cql.jdbc.* classes. I think this shouldn't be tied to the JDBC > standard. JDBC was make for SQL DB, which Cassandra is not (CQL is not SQL > and will never be). Typically, there is a fair amount of the JDBC standard > that cannot be implemented with C*, and there is a number of specificity of > C* that are not in JDBC (typically the set and maps collections). > So I propose to extract simple type classes with just a compose and decompose > method (but without ties to jdbc, which would allow all the jdbc specific > method those types have) in the purpose of exporting that in a separate jar > for clients (we could put that in a org.apache.cassandra.type package for > instance). We could then deprecate the jdbc classes with basically the same > schedule than CQL2. > Let me note that this is *not* saying there shouldn't be a JDBC driver for > Cassandra. -- 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-4495) Don't tie client side use of AbstractType to JDBC
[ https://issues.apache.org/jira/browse/CASSANDRA-4495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13684002#comment-13684002 ] Carl Yeksigian commented on CASSANDRA-4495: --- This adds validate to the composer. A couple of things to be aware of: - Replaced o.a.c.db.marshal.MarshalException with o.a.c.types.MarshalException as it may be thrown to a client - Collection composer validate no ops, reasoning below I'm not sure that there is any reason to validate the Collections. It seems that the previous validation would fail on, for example, Map, TimeUUID>, as the validation of a Map is actually validating using the Value type of the Map, rather than iterating through the values and making sure that an entry is valid. This entry-wise validation happens when we call compose. > Don't tie client side use of AbstractType to JDBC > - > > Key: CASSANDRA-4495 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4495 > Project: Cassandra > Issue Type: Improvement >Reporter: Sylvain Lebresne >Assignee: Carl Yeksigian >Priority: Minor > Fix For: 2.0 > > Attachments: 4495.patch > > > We currently expose the AbstractType to java clients that want to reuse them > though the cql.jdbc.* classes. I think this shouldn't be tied to the JDBC > standard. JDBC was make for SQL DB, which Cassandra is not (CQL is not SQL > and will never be). Typically, there is a fair amount of the JDBC standard > that cannot be implemented with C*, and there is a number of specificity of > C* that are not in JDBC (typically the set and maps collections). > So I propose to extract simple type classes with just a compose and decompose > method (but without ties to jdbc, which would allow all the jdbc specific > method those types have) in the purpose of exporting that in a separate jar > for clients (we could put that in a org.apache.cassandra.type package for > instance). We could then deprecate the jdbc classes with basically the same > schedule than CQL2. > Let me note that this is *not* saying there shouldn't be a JDBC driver for > Cassandra. -- 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-5576) CREATE/DROP TRIGGER in CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683934#comment-13683934 ] Jonathan Ellis commented on CASSANDRA-5576: --- bq. the options can be additional columns which can be defined later I think compaction options is a better example -- valid options are defined by the implementing class, so we just want a Map that we can pass to the constructor. > CREATE/DROP TRIGGER in CQL > -- > > Key: CASSANDRA-5576 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5576 > Project: Cassandra > Issue Type: Bug > Components: API, Core >Reporter: Jonathan Ellis >Assignee: Vijay > Fix For: 2.0 > > -- 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: cqlsh: Add row count to SELECT output
Updated Branches: refs/heads/trunk 241e82d71 -> 629abfb52 cqlsh: Add row count to SELECT output patch by Aleksey Yeschenko; reviewed by Brandon Williams for CASSANDRA-5636 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/629abfb5 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/629abfb5 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/629abfb5 Branch: refs/heads/trunk Commit: 629abfb52dc1a24c2dbd2e9316ca2fb77e593554 Parents: 241e82d Author: Aleksey Yeschenko Authored: Sat Jun 15 01:53:40 2013 +0300 Committer: Aleksey Yeschenko Committed: Sat Jun 15 01:53:40 2013 +0300 -- CHANGES.txt | 1 + bin/cqlsh| 8 ++- pylib/cqlshlib/test/test_cqlsh_output.py | 91 +-- 3 files changed, 80 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/629abfb5/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 3ccfdf2..4bc15f9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -57,6 +57,7 @@ * Support native link w/o JNA in Java7 (CASSANDRA-3734) * Use SASL authentication in binary protocol v2 (CASSANDRA-5545) * Replace Thrift HsHa with LMAX Disruptor based implementation (CASSANDRA-5582) + * cqlsh: Add row count to SELECT output (CASSANDRA-5636) 1.2.6 * Reduce SSTableLoader memory usage (CASSANDRA-) http://git-wip-us.apache.org/repos/asf/cassandra/blob/629abfb5/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index 98403d6..c2defd5 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -891,7 +891,7 @@ class Shell(cmd.Cmd): self.printerr(traceback.format_exc()) return False -if self.cursor.description is not _VOID_DESCRIPTION: +if statement[:6].lower() == 'select': self.print_result(self.cursor, with_default_limit) self.flush_output() return True @@ -911,7 +911,9 @@ class Shell(cmd.Cmd): self.decoding_errors = [] self.writeresult("") -self.print_static_result(cursor) +if cursor.rowcount != 0: +self.print_static_result(cursor) +self.writeresult("(%d rows)" % cursor.rowcount) self.writeresult("") if self.decoding_errors: @@ -962,6 +964,8 @@ class Shell(cmd.Cmd): line = ' | '.join(col.rjust(w, color=self.color) for (col, w) in zip(row, widths)) self.writeresult(' ' + line) +self.writeresult("") + def print_formatted_result_vertically(self, formatted_names, formatted_values): max_col_width = max([n.displaywidth for n in formatted_names]) max_val_width = max([n.displaywidth for row in formatted_values for n in row]) http://git-wip-us.apache.org/repos/asf/cassandra/blob/629abfb5/pylib/cqlshlib/test/test_cqlsh_output.py -- diff --git a/pylib/cqlshlib/test/test_cqlsh_output.py b/pylib/cqlshlib/test/test_cqlsh_output.py index a1922b4..b74c895 100644 --- a/pylib/cqlshlib/test/test_cqlsh_output.py +++ b/pylib/cqlshlib/test/test_cqlsh_output.py @@ -71,8 +71,7 @@ class TestCqlshOutput(BaseTestCase): for ver in cqlver: self.assertQueriesGiveColoredOutput(queries_and_expected_outputs, cqlver=ver, **kwargs) -def assertQueriesGiveColoredOutput(self, queries_and_expected_outputs, - sort_results=False, **kwargs): +def assertQueriesGiveColoredOutput(self, queries_and_expected_outputs, **kwargs): """ Allow queries and expected output to be specified in structured tuples, along with expected color information. @@ -84,17 +83,6 @@ class TestCqlshOutput(BaseTestCase): c_output = ColoredText(output) pairs = at_a_time(dedent(expected).split('\n'), 2) outlines = c_output.splitlines() -if sort_results: -if outlines[1].plain().startswith('---'): -firstpart = outlines[:2] -sortme = outlines[2:] -else: -firstpart = [] -sortme = outlines -lastpart = [] -while sortme[-1].plain() == '': -lastpart.append(sortme.pop(-1)) -outlines = firstpart + sorted(sortme, key=lambda c:c.plain()) + lastpart for (plain, colorcodes), outputline in zip(pairs, outlines): self.assertEqual(outputline.plain().rstrip(), plain) self.assertColorFromTags(output
[jira] [Commented] (CASSANDRA-5234) Table created through CQL3 are not accessble to Pig 0.10
[ https://issues.apache.org/jira/browse/CASSANDRA-5234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683591#comment-13683591 ] Cyril Scetbon commented on CASSANDRA-5234: -- Okay, I'll give it a try :) thanks > Table created through CQL3 are not accessble to Pig 0.10 > > > Key: CASSANDRA-5234 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5234 > Project: Cassandra > Issue Type: Bug > Components: Hadoop >Affects Versions: 1.2.1 > Environment: Red hat linux 5 >Reporter: Shamim Ahmed > Fix For: 1.2.6 > > Attachments: 5234-1.2-patch.txt, 5234.tx > > > Hi, > i have faced a bug when creating table through CQL3 and trying to load data > through pig 0.10 as follows: > java.lang.RuntimeException: Column family 'abc' not found in keyspace 'XYZ' > at > org.apache.cassandra.hadoop.pig.CassandraStorage.initSchema(CassandraStorage.java:1112) > at > org.apache.cassandra.hadoop.pig.CassandraStorage.setLocation(CassandraStorage.java:615). > This effects from Simple table to table with compound key. -- 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-5640) Allow JOIN on partition key for tables in the same keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-5640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683569#comment-13683569 ] Jonathan Ellis commented on CASSANDRA-5640: --- I've had the same thought but I hate cluttering Jira with "maybe someday" ponies. :P > Allow JOIN on partition key for tables in the same keyspace > --- > > Key: CASSANDRA-5640 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5640 > Project: Cassandra > Issue Type: New Feature > Components: API >Reporter: Jeremiah Jordan >Priority: Minor > Labels: ponies > > People whine about there not being any JOIN in CQL a lot. I was thinking we > could add JOIN with the restriction that you can only join on partition key, > and only if the tables are in the same keyspace. That way it could be done > local to each node, and would not need to be a true distributed join. > Feel free to shoot me down ;) -- 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-5640) Allow JOIN on partition key for tables in the same keyspace
Jeremiah Jordan created CASSANDRA-5640: -- Summary: Allow JOIN on partition key for tables in the same keyspace Key: CASSANDRA-5640 URL: https://issues.apache.org/jira/browse/CASSANDRA-5640 Project: Cassandra Issue Type: New Feature Components: API Reporter: Jeremiah Jordan Priority: Minor People whine about there not being any JOIN in CQL a lot. I was thinking we could add JOIN with the restriction that you can only join on partition key, and only if the tables are in the same keyspace. That way it could be done local to each node, and would not need to be a true distributed join. Feel free to shoot me down ;) -- 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-5357) Query cache
[ https://issues.apache.org/jira/browse/CASSANDRA-5357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683536#comment-13683536 ] Vijay commented on CASSANDRA-5357: -- Hi Jonathan, The plan is to make the Entry offheap (with FM in the heap) of the map of heap after promoting the query filter. I might end up removing the CLHM and implement a Concurrent HM to reduce the over head... Let me know if it is fine. > Query cache > --- > > Key: CASSANDRA-5357 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5357 > Project: Cassandra > Issue Type: Bug >Reporter: Jonathan Ellis >Assignee: Vijay > > I think that most people expect the row cache to act like a query cache, > because that's a reasonable model. Caching the entire partition is, in > retrospect, not really reasonable, so it's not surprising that it catches > people off guard, especially given the confusion we've inflicted on ourselves > as to what a "row" constitutes. > I propose replacing it with a true query cache. -- 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-5576) CREATE/DROP TRIGGER in CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683534#comment-13683534 ] Vijay commented on CASSANDRA-5576: -- [~jjordan] the options can be additional columns which can be defined later (same way we do SCHEMA_COLUMNFAMILIES_CF) when we add them we need to validate them anyways If they are dynamic then they can be additional columns like list> i believe this schema provides a lot of flexibility for now. I really dont have a lot of opinion on it, it just was more logical with the rest of the code (Specially with querying and dropping etc)... if you want to change it, i can change it. Then we just need to special case trigger name from the map etc.. > CREATE/DROP TRIGGER in CQL > -- > > Key: CASSANDRA-5576 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5576 > Project: Cassandra > Issue Type: Bug > Components: API, Core >Reporter: Jonathan Ellis >Assignee: Vijay > Fix For: 2.0 > > -- 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: Revert "Remove nonexistent drop column from cqlsh help"
Updated Branches: refs/heads/trunk 3de315723 -> 241e82d71 Revert "Remove nonexistent drop column from cqlsh help" This reverts commit 473713f461524c10b5f403ac84d821e26aec6df2. Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/241e82d7 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/241e82d7 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/241e82d7 Branch: refs/heads/trunk Commit: 241e82d71925161ba13336f7a6ab356023490569 Parents: 3de3157 Author: Brandon Williams Authored: Fri Jun 14 11:46:05 2013 -0500 Committer: Brandon Williams Committed: Fri Jun 14 11:46:05 2013 -0500 -- pylib/cqlshlib/helptopics.py | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/241e82d7/pylib/cqlshlib/helptopics.py -- diff --git a/pylib/cqlshlib/helptopics.py b/pylib/cqlshlib/helptopics.py index 0d1a92d..fb769f3 100644 --- a/pylib/cqlshlib/helptopics.py +++ b/pylib/cqlshlib/helptopics.py @@ -270,6 +270,7 @@ class CQLHelpTopics(object): print """ ALTER TABLE ALTER TYPE ; ALTER TABLE ADD ; +ALTER TABLE DROP ; ALTER TABLE WITH = [AND = [...]]; An ALTER statement is used to manipulate table metadata. It allows you
[2/4] git commit: Remove nonexistent drop column from cqlsh help
Remove nonexistent drop column from cqlsh help Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/473713f4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/473713f4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/473713f4 Branch: refs/heads/trunk Commit: 473713f461524c10b5f403ac84d821e26aec6df2 Parents: 7eec23e Author: Brandon Williams Authored: Fri Jun 14 11:44:23 2013 -0500 Committer: Brandon Williams Committed: Fri Jun 14 11:44:23 2013 -0500 -- pylib/cqlshlib/helptopics.py | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/473713f4/pylib/cqlshlib/helptopics.py -- diff --git a/pylib/cqlshlib/helptopics.py b/pylib/cqlshlib/helptopics.py index 775c7de..c9dae31 100644 --- a/pylib/cqlshlib/helptopics.py +++ b/pylib/cqlshlib/helptopics.py @@ -270,7 +270,6 @@ class CQLHelpTopics(object): print """ ALTER TABLE ALTER TYPE ; ALTER TABLE ADD ; -ALTER TABLE DROP ; ALTER TABLE WITH = [AND = [...]]; An ALTER statement is used to manipulate table metadata. It allows you
[3/4] git commit: Remove nonexistent drop column from cqlsh help
Remove nonexistent drop column from cqlsh help Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/473713f4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/473713f4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/473713f4 Branch: refs/heads/cassandra-1.2 Commit: 473713f461524c10b5f403ac84d821e26aec6df2 Parents: 7eec23e Author: Brandon Williams Authored: Fri Jun 14 11:44:23 2013 -0500 Committer: Brandon Williams Committed: Fri Jun 14 11:44:23 2013 -0500 -- pylib/cqlshlib/helptopics.py | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/473713f4/pylib/cqlshlib/helptopics.py -- diff --git a/pylib/cqlshlib/helptopics.py b/pylib/cqlshlib/helptopics.py index 775c7de..c9dae31 100644 --- a/pylib/cqlshlib/helptopics.py +++ b/pylib/cqlshlib/helptopics.py @@ -270,7 +270,6 @@ class CQLHelpTopics(object): print """ ALTER TABLE ALTER TYPE ; ALTER TABLE ADD ; -ALTER TABLE DROP ; ALTER TABLE WITH = [AND = [...]]; An ALTER statement is used to manipulate table metadata. It allows you
[4/4] git commit: Merge branch 'cassandra-1.2' into trunk
Merge branch 'cassandra-1.2' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3de31572 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3de31572 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3de31572 Branch: refs/heads/trunk Commit: 3de315723624d80769b9a803a695b803117a51da Parents: 47d5f12 473713f Author: Brandon Williams Authored: Fri Jun 14 11:44:29 2013 -0500 Committer: Brandon Williams Committed: Fri Jun 14 11:44:29 2013 -0500 -- pylib/cqlshlib/helptopics.py | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/3de31572/pylib/cqlshlib/helptopics.py --
[1/4] git commit: Allow GPFS to reconnect to the internal IP. Patch by Chris Burroughs, reviewed by brandonwilliams for CASSANDRA-5630
Updated Branches: refs/heads/cassandra-1.2 7eec23eb2 -> 473713f46 refs/heads/trunk 47d5f124d -> 3de315723 Allow GPFS to reconnect to the internal IP. Patch by Chris Burroughs, reviewed by brandonwilliams for CASSANDRA-5630 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7eec23eb Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7eec23eb Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7eec23eb Branch: refs/heads/trunk Commit: 7eec23eb27d1f6a75f55a0aeb89aaccde3a6bda0 Parents: 30b093a Author: Brandon Williams Authored: Fri Jun 14 11:19:56 2013 -0500 Committer: Brandon Williams Committed: Fri Jun 14 11:21:52 2013 -0500 -- CHANGES.txt | 1 + conf/cassandra-rackdc.properties| 3 + .../locator/GossipingPropertyFileSnitch.java| 72 +++- 3 files changed, 74 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7eec23eb/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index a063d69..a1fc8ce 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -22,6 +22,7 @@ * Evaluate now() function at execution time (CASSANDRA-5616) * Expose detailed read repair metrics (CASSANDRA-5618) * Correct blob literal + ReversedType parsing (CASSANDRA-5629) + * Allow GPFS to prefer the internal IP like EC2MRS (CASSANDRA-5630) Merged from 1.1: * Remove buggy thrift max message length option (CASSANDRA-5529) * Fix NPE in Pig's widerow mode (CASSANDRA-5488) http://git-wip-us.apache.org/repos/asf/cassandra/blob/7eec23eb/conf/cassandra-rackdc.properties -- diff --git a/conf/cassandra-rackdc.properties b/conf/cassandra-rackdc.properties index be2e7d2..f0a0d55 100644 --- a/conf/cassandra-rackdc.properties +++ b/conf/cassandra-rackdc.properties @@ -22,3 +22,6 @@ rack=RAC1 # Add a suffix to a datacenter name. Used by the Ec2Snitch and Ec2MultiRegionSnitch # to append a string to the EC2 region name. #dc_suffix= + +# Uncomment the following line to make this snitch prefer the internal ip when possible, as the Ec2MultiRegionSnitch does. +# prefer_local=true http://git-wip-us.apache.org/repos/asf/cassandra/blob/7eec23eb/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java -- diff --git a/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java b/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java index e08a27e..071cd09 100644 --- a/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java +++ b/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java @@ -19,6 +19,7 @@ package org.apache.cassandra.locator; import java.net.InetAddress; +import java.net.UnknownHostException; import java.util.Map; import org.apache.cassandra.db.SystemTable; @@ -29,9 +30,14 @@ import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.cassandra.gms.ApplicationState; import org.apache.cassandra.gms.EndpointState; import org.apache.cassandra.gms.Gossiper; +import org.apache.cassandra.gms.IEndpointStateChangeSubscriber; +import org.apache.cassandra.gms.VersionedValue; +import org.apache.cassandra.net.MessagingService; import org.apache.cassandra.utils.FBUtilities; +import org.apache.cassandra.service.StorageService; -public class GossipingPropertyFileSnitch extends AbstractNetworkTopologySnitch + +public class GossipingPropertyFileSnitch extends AbstractNetworkTopologySnitch implements IEndpointStateChangeSubscriber { private static final Logger logger = LoggerFactory.getLogger(GossipingPropertyFileSnitch.class); @@ -41,6 +47,7 @@ public class GossipingPropertyFileSnitch extends AbstractNetworkTopologySnitch private Map> savedEndpoints; private String DEFAULT_DC = "UNKNOWN_DC"; private String DEFAULT_RACK = "UNKNOWN_RACK"; +private boolean preferLocal; public GossipingPropertyFileSnitch() throws ConfigurationException { @@ -51,7 +58,7 @@ public class GossipingPropertyFileSnitch extends AbstractNetworkTopologySnitch myDC = myDC.trim(); myRack = myRack.trim(); - +preferLocal = Boolean.parseBoolean(SnitchProperties.get("prefer_local", "false")); try { psnitch = new PropertyFileSnitch(); @@ -118,4 +125,65 @@ public class GossipingPropertyFileSnitch extends AbstractNetworkTopologySnitch } return epState.getApplicationState(ApplicationState.RACK).value; } + +// IEndpointStateChangeSubscriber methods + +public void onJoin(InetAddress endpoint, EndpointState epState) +
[jira] [Commented] (CASSANDRA-5576) CREATE/DROP TRIGGER in CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683509#comment-13683509 ] Jeremiah Jordan commented on CASSANDRA-5576: [~vijay2...@yahoo.com] I think the change he is refering to is using: {noformat} trigger_options map, {noformat} instead of {noformat} trigger_class text, {noformat} So that adding more parameters later doesn't require a schema change. > CREATE/DROP TRIGGER in CQL > -- > > Key: CASSANDRA-5576 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5576 > Project: Cassandra > Issue Type: Bug > Components: API, Core >Reporter: Jonathan Ellis >Assignee: Vijay > Fix For: 2.0 > > -- 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-5576) CREATE/DROP TRIGGER in CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683495#comment-13683495 ] Vijay commented on CASSANDRA-5576: -- Yep, We do have it in https://github.com/Vijay2win/cassandra/commit/ee36fe0fe99252f7ca7268863f33a9bc585a4c58#L0R165 i separated into 2 commits but will squash before merging to trunk. > CREATE/DROP TRIGGER in CQL > -- > > Key: CASSANDRA-5576 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5576 > Project: Cassandra > Issue Type: Bug > Components: API, Core >Reporter: Jonathan Ellis >Assignee: Vijay > Fix For: 2.0 > > -- 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-5630) config option to allow GossipingPropertyFileSnitch to use the "reconnect trick"
[ https://issues.apache.org/jira/browse/CASSANDRA-5630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams updated CASSANDRA-5630: Tester: enigmacurry > config option to allow GossipingPropertyFileSnitch to use the "reconnect > trick" > --- > > Key: CASSANDRA-5630 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5630 > Project: Cassandra > Issue Type: Improvement > Components: Core >Affects Versions: 1.1.1 >Reporter: Chris Burroughs >Assignee: Chris Burroughs >Priority: Minor > Fix For: 1.2.6 > > Attachments: CASSANDRA-5630-v1.patch > > > Currently we have two instances of the "use the local ip inside the same > datacenter trick": > * Ec2MultiRegionSnitch -- which is obviously EC2 specific > * YamlFileNetworkTopologySnitch -- which is powerful but verbose > There is no reason that GossipingPropertyFileSnitch could not (optionally) do > the same. Attached is a patch that adds a preferLocal > (default==false==current-behavior) property to GossipingPropertyFileSnitch > and does the IEndpointStateChangeSubscriber reconnect dance. I based it on > the other snitches but admit that they still seem fairly magical to me. This > could be a new class that extends GossipingPropertyFileSnitch, but I could > not think of a name that wasn't absurdly long. -- 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] [Reopened] (CASSANDRA-5630) config option to allow GossipingPropertyFileSnitch to use the "reconnect trick"
[ https://issues.apache.org/jira/browse/CASSANDRA-5630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams reopened CASSANDRA-5630: - > config option to allow GossipingPropertyFileSnitch to use the "reconnect > trick" > --- > > Key: CASSANDRA-5630 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5630 > Project: Cassandra > Issue Type: Improvement > Components: Core >Affects Versions: 1.1.1 >Reporter: Chris Burroughs >Assignee: Chris Burroughs >Priority: Minor > Fix For: 1.2.6 > > Attachments: CASSANDRA-5630-v1.patch > > > Currently we have two instances of the "use the local ip inside the same > datacenter trick": > * Ec2MultiRegionSnitch -- which is obviously EC2 specific > * YamlFileNetworkTopologySnitch -- which is powerful but verbose > There is no reason that GossipingPropertyFileSnitch could not (optionally) do > the same. Attached is a patch that adds a preferLocal > (default==false==current-behavior) property to GossipingPropertyFileSnitch > and does the IEndpointStateChangeSubscriber reconnect dance. I based it on > the other snitches but admit that they still seem fairly magical to me. This > could be a new class that extends GossipingPropertyFileSnitch, but I could > not think of a name that wasn't absurdly long. -- 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: Allow GPFS to reconnect to the internal IP. Patch by Chris Burroughs, reviewed by brandonwilliams for CASSANDRA-5630
Updated Branches: refs/heads/cassandra-1.2 30b093a71 -> 7eec23eb2 Allow GPFS to reconnect to the internal IP. Patch by Chris Burroughs, reviewed by brandonwilliams for CASSANDRA-5630 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7eec23eb Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7eec23eb Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7eec23eb Branch: refs/heads/cassandra-1.2 Commit: 7eec23eb27d1f6a75f55a0aeb89aaccde3a6bda0 Parents: 30b093a Author: Brandon Williams Authored: Fri Jun 14 11:19:56 2013 -0500 Committer: Brandon Williams Committed: Fri Jun 14 11:21:52 2013 -0500 -- CHANGES.txt | 1 + conf/cassandra-rackdc.properties| 3 + .../locator/GossipingPropertyFileSnitch.java| 72 +++- 3 files changed, 74 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7eec23eb/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index a063d69..a1fc8ce 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -22,6 +22,7 @@ * Evaluate now() function at execution time (CASSANDRA-5616) * Expose detailed read repair metrics (CASSANDRA-5618) * Correct blob literal + ReversedType parsing (CASSANDRA-5629) + * Allow GPFS to prefer the internal IP like EC2MRS (CASSANDRA-5630) Merged from 1.1: * Remove buggy thrift max message length option (CASSANDRA-5529) * Fix NPE in Pig's widerow mode (CASSANDRA-5488) http://git-wip-us.apache.org/repos/asf/cassandra/blob/7eec23eb/conf/cassandra-rackdc.properties -- diff --git a/conf/cassandra-rackdc.properties b/conf/cassandra-rackdc.properties index be2e7d2..f0a0d55 100644 --- a/conf/cassandra-rackdc.properties +++ b/conf/cassandra-rackdc.properties @@ -22,3 +22,6 @@ rack=RAC1 # Add a suffix to a datacenter name. Used by the Ec2Snitch and Ec2MultiRegionSnitch # to append a string to the EC2 region name. #dc_suffix= + +# Uncomment the following line to make this snitch prefer the internal ip when possible, as the Ec2MultiRegionSnitch does. +# prefer_local=true http://git-wip-us.apache.org/repos/asf/cassandra/blob/7eec23eb/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java -- diff --git a/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java b/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java index e08a27e..071cd09 100644 --- a/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java +++ b/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java @@ -19,6 +19,7 @@ package org.apache.cassandra.locator; import java.net.InetAddress; +import java.net.UnknownHostException; import java.util.Map; import org.apache.cassandra.db.SystemTable; @@ -29,9 +30,14 @@ import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.cassandra.gms.ApplicationState; import org.apache.cassandra.gms.EndpointState; import org.apache.cassandra.gms.Gossiper; +import org.apache.cassandra.gms.IEndpointStateChangeSubscriber; +import org.apache.cassandra.gms.VersionedValue; +import org.apache.cassandra.net.MessagingService; import org.apache.cassandra.utils.FBUtilities; +import org.apache.cassandra.service.StorageService; -public class GossipingPropertyFileSnitch extends AbstractNetworkTopologySnitch + +public class GossipingPropertyFileSnitch extends AbstractNetworkTopologySnitch implements IEndpointStateChangeSubscriber { private static final Logger logger = LoggerFactory.getLogger(GossipingPropertyFileSnitch.class); @@ -41,6 +47,7 @@ public class GossipingPropertyFileSnitch extends AbstractNetworkTopologySnitch private Map> savedEndpoints; private String DEFAULT_DC = "UNKNOWN_DC"; private String DEFAULT_RACK = "UNKNOWN_RACK"; +private boolean preferLocal; public GossipingPropertyFileSnitch() throws ConfigurationException { @@ -51,7 +58,7 @@ public class GossipingPropertyFileSnitch extends AbstractNetworkTopologySnitch myDC = myDC.trim(); myRack = myRack.trim(); - +preferLocal = Boolean.parseBoolean(SnitchProperties.get("prefer_local", "false")); try { psnitch = new PropertyFileSnitch(); @@ -118,4 +125,65 @@ public class GossipingPropertyFileSnitch extends AbstractNetworkTopologySnitch } return epState.getApplicationState(ApplicationState.RACK).value; } + +// IEndpointStateChangeSubscriber methods + +public void onJoin(InetAddress endpoint, EndpointState epState) +{ +if (preferLocal &&
[2/2] git commit: Merge branch 'cassandra-1.2' into trunk
Merge branch 'cassandra-1.2' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/47d5f124 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/47d5f124 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/47d5f124 Branch: refs/heads/trunk Commit: 47d5f124da702ca5014ef561939bf30e56ce5183 Parents: 4bdf38b 4ef8a8a Author: Brandon Williams Authored: Fri Jun 14 11:21:33 2013 -0500 Committer: Brandon Williams Committed: Fri Jun 14 11:21:33 2013 -0500 -- CHANGES.txt | 1 + conf/cassandra-rackdc.properties| 3 + .../locator/GossipingPropertyFileSnitch.java| 72 +++- 3 files changed, 74 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/47d5f124/CHANGES.txt --
[1/2] git commit: Allow GPFS to reconnect to the internal IP. Patch by Chris Burroughs, reviewed by brandonwilliams for CASSANDRA-5630
Updated Branches: refs/heads/trunk 4bdf38b5c -> 47d5f124d Allow GPFS to reconnect to the internal IP. Patch by Chris Burroughs, reviewed by brandonwilliams for CASSANDRA-5630 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4ef8a8a1 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4ef8a8a1 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4ef8a8a1 Branch: refs/heads/trunk Commit: 4ef8a8a19412adcca4b0225756d5940a2cb1427a Parents: f51c962 Author: Brandon Williams Authored: Fri Jun 14 11:19:56 2013 -0500 Committer: Brandon Williams Committed: Fri Jun 14 11:21:17 2013 -0500 -- CHANGES.txt | 1 + conf/cassandra-rackdc.properties| 3 + .../locator/GossipingPropertyFileSnitch.java| 72 +++- 3 files changed, 74 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4ef8a8a1/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index a063d69..a1fc8ce 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -22,6 +22,7 @@ * Evaluate now() function at execution time (CASSANDRA-5616) * Expose detailed read repair metrics (CASSANDRA-5618) * Correct blob literal + ReversedType parsing (CASSANDRA-5629) + * Allow GPFS to prefer the internal IP like EC2MRS (CASSANDRA-5630) Merged from 1.1: * Remove buggy thrift max message length option (CASSANDRA-5529) * Fix NPE in Pig's widerow mode (CASSANDRA-5488) http://git-wip-us.apache.org/repos/asf/cassandra/blob/4ef8a8a1/conf/cassandra-rackdc.properties -- diff --git a/conf/cassandra-rackdc.properties b/conf/cassandra-rackdc.properties index be2e7d2..f0a0d55 100644 --- a/conf/cassandra-rackdc.properties +++ b/conf/cassandra-rackdc.properties @@ -22,3 +22,6 @@ rack=RAC1 # Add a suffix to a datacenter name. Used by the Ec2Snitch and Ec2MultiRegionSnitch # to append a string to the EC2 region name. #dc_suffix= + +# Uncomment the following line to make this snitch prefer the internal ip when possible, as the Ec2MultiRegionSnitch does. +# prefer_local=true http://git-wip-us.apache.org/repos/asf/cassandra/blob/4ef8a8a1/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java -- diff --git a/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java b/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java index e08a27e..071cd09 100644 --- a/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java +++ b/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java @@ -19,6 +19,7 @@ package org.apache.cassandra.locator; import java.net.InetAddress; +import java.net.UnknownHostException; import java.util.Map; import org.apache.cassandra.db.SystemTable; @@ -29,9 +30,14 @@ import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.cassandra.gms.ApplicationState; import org.apache.cassandra.gms.EndpointState; import org.apache.cassandra.gms.Gossiper; +import org.apache.cassandra.gms.IEndpointStateChangeSubscriber; +import org.apache.cassandra.gms.VersionedValue; +import org.apache.cassandra.net.MessagingService; import org.apache.cassandra.utils.FBUtilities; +import org.apache.cassandra.service.StorageService; -public class GossipingPropertyFileSnitch extends AbstractNetworkTopologySnitch + +public class GossipingPropertyFileSnitch extends AbstractNetworkTopologySnitch implements IEndpointStateChangeSubscriber { private static final Logger logger = LoggerFactory.getLogger(GossipingPropertyFileSnitch.class); @@ -41,6 +47,7 @@ public class GossipingPropertyFileSnitch extends AbstractNetworkTopologySnitch private Map> savedEndpoints; private String DEFAULT_DC = "UNKNOWN_DC"; private String DEFAULT_RACK = "UNKNOWN_RACK"; +private boolean preferLocal; public GossipingPropertyFileSnitch() throws ConfigurationException { @@ -51,7 +58,7 @@ public class GossipingPropertyFileSnitch extends AbstractNetworkTopologySnitch myDC = myDC.trim(); myRack = myRack.trim(); - +preferLocal = Boolean.parseBoolean(SnitchProperties.get("prefer_local", "false")); try { psnitch = new PropertyFileSnitch(); @@ -118,4 +125,65 @@ public class GossipingPropertyFileSnitch extends AbstractNetworkTopologySnitch } return epState.getApplicationState(ApplicationState.RACK).value; } + +// IEndpointStateChangeSubscriber methods + +public void onJoin(InetAddress endpoint, EndpointState epState) +{ +if (preferLocal && epState.getAppli
[jira] [Commented] (CASSANDRA-5636) Add row count to select output a la psql
[ https://issues.apache.org/jira/browse/CASSANDRA-5636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683477#comment-13683477 ] Brandon Williams commented on CASSANDRA-5636: - +1 > Add row count to select output a la psql > > > Key: CASSANDRA-5636 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5636 > Project: Cassandra > Issue Type: New Feature > Components: Tools >Reporter: Jonathan Ellis >Assignee: Aleksey Yeschenko >Priority: Minor > Labels: cqlsh > Fix For: 2.0 > > Attachments: 5636.txt > > > This is handy since counting rows that look mostly alike can be painful; it > also makes it clear that cqlsh isn't ignoring you when you select something > that doesn't exist. > Here is what psql does: > {noformat} > company=> select fname, salary from employee; > fname | salary > + > John|3.00 > Franklin|4.00 > Alica |25000.00 > Jennifer|43000.00 > Ramish |38000.00 > Joyce |25000.00 > Ahmad |25000.00 > James |55000.00 > (8 rows) > {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-5576) CREATE/DROP TRIGGER in CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683474#comment-13683474 ] Jonathan Ellis commented on CASSANDRA-5576: --- I don't see Aleksey's schema change; am I missing something? > CREATE/DROP TRIGGER in CQL > -- > > Key: CASSANDRA-5576 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5576 > Project: Cassandra > Issue Type: Bug > Components: API, Core >Reporter: Jonathan Ellis >Assignee: Vijay > Fix For: 2.0 > > -- 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-5234) Table created through CQL3 are not accessble to Pig 0.10
[ https://issues.apache.org/jira/browse/CASSANDRA-5234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeremiah Jordan updated CASSANDRA-5234: --- Fix Version/s: (was: 1.2.2) 1.2.6 > Table created through CQL3 are not accessble to Pig 0.10 > > > Key: CASSANDRA-5234 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5234 > Project: Cassandra > Issue Type: Bug > Components: Hadoop >Affects Versions: 1.2.1 > Environment: Red hat linux 5 >Reporter: Shamim Ahmed > Fix For: 1.2.6 > > Attachments: 5234-1.2-patch.txt, 5234.tx > > > Hi, > i have faced a bug when creating table through CQL3 and trying to load data > through pig 0.10 as follows: > java.lang.RuntimeException: Column family 'abc' not found in keyspace 'XYZ' > at > org.apache.cassandra.hadoop.pig.CassandraStorage.initSchema(CassandraStorage.java:1112) > at > org.apache.cassandra.hadoop.pig.CassandraStorage.setLocation(CassandraStorage.java:615). > This effects from Simple table to table with compound key. -- 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-5234) Table created through CQL3 are not accessble to Pig 0.10
[ https://issues.apache.org/jira/browse/CASSANDRA-5234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683447#comment-13683447 ] Alex Liu commented on CASSANDRA-5234: - yes, I have done some testing. > Table created through CQL3 are not accessble to Pig 0.10 > > > Key: CASSANDRA-5234 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5234 > Project: Cassandra > Issue Type: Bug > Components: Hadoop >Affects Versions: 1.2.1 > Environment: Red hat linux 5 >Reporter: Shamim Ahmed > Fix For: 1.2.2 > > Attachments: 5234-1.2-patch.txt, 5234.tx > > > Hi, > i have faced a bug when creating table through CQL3 and trying to load data > through pig 0.10 as follows: > java.lang.RuntimeException: Column family 'abc' not found in keyspace 'XYZ' > at > org.apache.cassandra.hadoop.pig.CassandraStorage.initSchema(CassandraStorage.java:1112) > at > org.apache.cassandra.hadoop.pig.CassandraStorage.setLocation(CassandraStorage.java:615). > This effects from Simple table to table with compound key. -- 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-5427) CustomTThreadPoolServer.java (line 210) Error occurred during processing of message.
[ https://issues.apache.org/jira/browse/CASSANDRA-5427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683430#comment-13683430 ] Tushar Agrawal commented on CASSANDRA-5427: --- Thank you. > CustomTThreadPoolServer.java (line 210) Error occurred during processing of > message. > > > Key: CASSANDRA-5427 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5427 > Project: Cassandra > Issue Type: Bug > Components: Config, Core >Affects Versions: 1.1.9 > Environment: DSE 3.0, Hector Client 1.1-2, Cassandra 1.1.9, Linux 64 > bit, Heap 4 GB, Total RAM 8 GB, 2 Core (its a test environment). >Reporter: Tushar Agrawal > > We are getting lot of following errors. We tried to change the > thrift_framed_transport_size_in_mb and thrift_max_message_length_in_mb to 30 > and 32 respectively without any success. > Our message size is about 20 KB and we even tried to reduce it to 10 KB. We > have 27 fixed columns and no secondary indexes. > ERROR [Thrift:110] 2013-04-04 19:11:40,882 CustomTThreadPoolServer.java (line > 210) Error occurred during processing of message. > java.lang.RuntimeException: Failed to open server transport. > at > com.datastax.bdp.transport.server.TNegotiatingServerTransport$Factory.getTransport(TNegotiatingServerTransport.java:285) > at > com.datastax.bdp.transport.server.TNegotiatingServerTransport$Factory.getTransport(TNegotiatingServerTransport.java:257) > at > org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:184) > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown > Source) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) > at java.lang.Thread.run(Unknown Source) > Caused by: org.apache.thrift.transport.TTransportException: > java.net.SocketException: Connection reset > at > org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:129) > at > com.datastax.bdp.transport.server.TPreviewableTransport.read(TPreviewableTransport.java:88) > at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) > at > com.datastax.bdp.transport.server.TPreviewableTransport.preview(TPreviewableTransport.java:44) > at > com.datastax.bdp.transport.server.TNegotiatingServerTransport.open(TNegotiatingServerTransport.java:169) > at > com.datastax.bdp.transport.server.TNegotiatingServerTransport$Factory.getTransport(TNegotiatingServerTransport.java:278) > ... 5 more > Caused by: java.net.SocketException: Connection reset > at java.net.SocketInputStream.read(Unknown Source) > at java.io.BufferedInputStream.fill(Unknown Source) > at java.io.BufferedInputStream.read1(Unknown Source) > at java.io.BufferedInputStream.read(Unknown Source) > at > org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:127) > ... 10 more -- 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-5149) Respect slice count even if column expire mid-request
[ https://issues.apache.org/jira/browse/CASSANDRA-5149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683332#comment-13683332 ] Sylvain Lebresne commented on CASSANDRA-5149: - The overall approach looks good to me, though: * I'd feel a bit better if we were just removing the isMarkedForDelete() (without arguments) call in Column, so that every caller knows he has to deal with it. It's otherwise hard to make sure we never call the no-argument version by accident. There's probably a few other places too (Row for instance) where I'd prefer avoiding having a shortcut calling System.currentTimeMillis(). * In RowIteratorFactory, I think it would make sense to use the filter timestamp rather than relying on System.currentTimeMillis() for gcBefore. * There is possibly a few places where a function takes 'gcBefore' and 'now', either directly (collectReducedColumns), or because they have a filter and gcBefore (CFS.filterColumnFamily()). Maybe we could drop the gcBefore and just rely on the timestamp. > Respect slice count even if column expire mid-request > - > > Key: CASSANDRA-5149 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5149 > Project: Cassandra > Issue Type: Bug >Affects Versions: 0.7.0 >Reporter: Sylvain Lebresne >Assignee: Aleksey Yeschenko > Fix For: 2.0 > > > This is a follow-up of CASSANDRA-5099. > If a column expire just while a slice query is performed, it is possible for > replicas to count said column as live but to have the coordinator seeing it > as dead when building the final result. The effect that the query might > return strictly less columns that the requested slice count even though there > is some live columns matching the slice predicate but not returned in the > result. -- 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-5234) Table created through CQL3 are not accessble to Pig 0.10
[ https://issues.apache.org/jira/browse/CASSANDRA-5234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683236#comment-13683236 ] Cyril Scetbon commented on CASSANDRA-5234: -- Do you think I can test them now ? > Table created through CQL3 are not accessble to Pig 0.10 > > > Key: CASSANDRA-5234 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5234 > Project: Cassandra > Issue Type: Bug > Components: Hadoop >Affects Versions: 1.2.1 > Environment: Red hat linux 5 >Reporter: Shamim Ahmed > Fix For: 1.2.2 > > Attachments: 5234-1.2-patch.txt, 5234.tx > > > Hi, > i have faced a bug when creating table through CQL3 and trying to load data > through pig 0.10 as follows: > java.lang.RuntimeException: Column family 'abc' not found in keyspace 'XYZ' > at > org.apache.cassandra.hadoop.pig.CassandraStorage.initSchema(CassandraStorage.java:1112) > at > org.apache.cassandra.hadoop.pig.CassandraStorage.setLocation(CassandraStorage.java:615). > This effects from Simple table to table with compound key. -- 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