[jira] [Commented] (CASSANDRA-4648) Unable to start Cassandra with simple authentication enabled
[ https://issues.apache.org/jira/browse/CASSANDRA-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13464525#comment-13464525 ] Sylvain Lebresne commented on CASSANDRA-4648: - bq. Is permissionalteringstatement related or just a refactor that happened to be included in this patch? It was meant to make it easier to add executeInternal, i.e. adding it to PermissionAlteringStatement only instead of all its subclasses. And since it factor a few other methods too ... Unable to start Cassandra with simple authentication enabled Key: CASSANDRA-4648 URL: https://issues.apache.org/jira/browse/CASSANDRA-4648 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 beta 1 Environment: Mac OS X Reporter: John Sanda Assignee: Sylvain Lebresne Labels: security Fix For: 1.2.0 beta 2 Attachments: 4648.txt I followed the steps for enabling simple authentication as described here, http://www.datastax.com/docs/1.1/configuration/authentication. I tried starting Cassandra with, cassandra -f -Dpasswd.properties=conf/passwd.properties -Daccess.properties=conf/access.properties Start up failed with this exception in my log: ERROR [main] 2012-09-11 15:03:04,642 CassandraDaemon.java (line 403) Exception encountered during startup java.lang.AssertionError: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:136) at org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:298) at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:203) at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:386) at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:429) Caused by: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in at org.apache.cassandra.service.ClientState.validateLogin(ClientState.java:254) at org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:235) at org.apache.cassandra.cql3.statements.SelectStatement.checkAccess(SelectStatement.java:105) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:106) at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:124) ... 4 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] [Updated] (CASSANDRA-4416) Include metadata for system keyspace itself in schema_* tables
[ https://issues.apache.org/jira/browse/CASSANDRA-4416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-4416: Fix Version/s: 1.2.0 Include metadata for system keyspace itself in schema_* tables -- Key: CASSANDRA-4416 URL: https://issues.apache.org/jira/browse/CASSANDRA-4416 Project: Cassandra Issue Type: Improvement Components: Core Affects Versions: 1.2.0 beta 1 Reporter: paul cannon Priority: Minor Labels: cql, cql3 Fix For: 1.2.0 The `system.schema_keyspaces`, `system.schema_columnfamilies`, and `system.schema_columns` virtual tables allow clients to query schema and layout information through CQL. This will be invaluable when users start to make more use of the CQL-only protocol (CASSANDRA-2478), since there will be no other way to determine certain information about available columnfamilies, keyspaces, or show metadata about them. However, the system keyspace itself, and all the columnfamilies in it, are not represented in the schema_* tables: {noformat} cqlsh select * from system.schema_keyspaces where keyspace = 'system'; cqlsh cqlsh select * from system.schema_columnfamilies where keyspace = 'system'; cqlsh cqlsh select * from system.schema_columns where keyspace = 'system'; cqlsh {noformat} It would be greatly helpful to clients which do more introspection than the minimum (say, for example, cqlsh) to be able to get information on the structure and availability of schema-definition tables. -- 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-4584) Add cqlsh syntax to enable request tracing
[ https://issues.apache.org/jira/browse/CASSANDRA-4584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-4584: Summary: Add cqlsh syntax to enable request tracing (was: Add CQL syntax to enable request tracing) Add cqlsh syntax to enable request tracing -- Key: CASSANDRA-4584 URL: https://issues.apache.org/jira/browse/CASSANDRA-4584 Project: Cassandra Issue Type: Sub-task Affects Versions: 1.2.0 beta 1 Reporter: Jonathan Ellis Assignee: Aleksey Yeschenko Labels: cql3 Fix For: 1.2.0 beta 2 Attachments: 4584.patch, 4584.patch, 4584.patch, 4584.patch, 4584.patch -- 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 bug starting C* with simple authentication
Updated Branches: refs/heads/trunk 822ee88a3 - c74a871e7 Fix bug starting C* with simple authentication patch by slebresne; reviewed by jbellis for CASSANDRA-4648 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c74a871e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c74a871e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c74a871e Branch: refs/heads/trunk Commit: c74a871e7a5882802de46550ea5bab0220f16883 Parents: 822ee88 Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Sep 12 14:21:17 2012 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Thu Sep 27 11:02:03 2012 +0200 -- CHANGES.txt|2 + .../org/apache/cassandra/cql3/CQLStatement.java|7 + .../org/apache/cassandra/cql3/QueryProcessor.java |5 +- .../cassandra/cql3/statements/BatchStatement.java |4 +- .../cassandra/cql3/statements/CFStatement.java |1 + .../cassandra/cql3/statements/DeleteStatement.java |4 +- .../cassandra/cql3/statements/GrantStatement.java | 19 +--- .../cql3/statements/ListGrantsStatement.java | 15 +-- .../cql3/statements/ModificationStatement.java | 19 ++- .../statements/PermissionAlteringStatement.java| 48 ++ .../cassandra/cql3/statements/RevokeStatement.java | 21 +--- .../cql3/statements/SchemaAlteringStatement.java | 11 +- .../cassandra/cql3/statements/SelectStatement.java | 111 +-- .../cql3/statements/TruncateStatement.java |5 + .../cassandra/cql3/statements/UpdateStatement.java |4 +- .../cassandra/cql3/statements/UseStatement.java|6 + .../cassandra/service/RangeSliceVerbHandler.java |2 +- 17 files changed, 170 insertions(+), 114 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c74a871e/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 4d8eb91..576f7a6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,8 @@ * Fix scrubbing of CQL3 created tables (CASSANDRA-4685) * (CQL3) Fix validation when using counter and regular columns in the same table (CASSANDRA-4706) + * Fix bug starting Cassandra with simple authentication (CASSANDRA-4648 + * ) 1.2-beta1 * add atomic_batch_mutate (CASSANDRA-4542, -4635) http://git-wip-us.apache.org/repos/asf/cassandra/blob/c74a871e/src/java/org/apache/cassandra/cql3/CQLStatement.java -- diff --git a/src/java/org/apache/cassandra/cql3/CQLStatement.java b/src/java/org/apache/cassandra/cql3/CQLStatement.java index d0889bc..00fb406 100644 --- a/src/java/org/apache/cassandra/cql3/CQLStatement.java +++ b/src/java/org/apache/cassandra/cql3/CQLStatement.java @@ -54,4 +54,11 @@ public interface CQLStatement * can assume that each bound term have a corresponding value. */ public ResultMessage execute(ClientState state, ListByteBuffer variables) throws RequestValidationException, RequestExecutionException; + +/** + * Variante of execute used for internal query against the system tables, and thus only query the local node. + * + * @param state the current client state + */ +public ResultMessage executeInternal(ClientState state) throws RequestValidationException, RequestExecutionException; } http://git-wip-us.apache.org/repos/asf/cassandra/blob/c74a871e/src/java/org/apache/cassandra/cql3/QueryProcessor.java -- diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java b/src/java/org/apache/cassandra/cql3/QueryProcessor.java index 856f6fd..58a8f44 100644 --- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java +++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java @@ -143,7 +143,10 @@ public class QueryProcessor try { ClientState state = new ClientState(true); -ResultMessage result = processStatement(getStatement(query, state).statement, state, Collections.ByteBufferemptyList()); +state.setKeyspace(Table.SYSTEM_KS); +CQLStatement statement = getStatement(query, state).statement; +statement.validate(state); +ResultMessage result = statement.executeInternal(state); if (result instanceof ResultMessage.Rows) return new UntypedResultSet(((ResultMessage.Rows)result).result); else http://git-wip-us.apache.org/repos/asf/cassandra/blob/c74a871e/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java -- diff --git
git commit: Fix error message formatting
Updated Branches: refs/heads/trunk c74a871e7 - c7c396d2b Fix error message formatting Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c7c396d2 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c7c396d2 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c7c396d2 Branch: refs/heads/trunk Commit: c7c396d2bcd92cf38efc3ad90508646d594d8911 Parents: c74a871 Author: Sylvain Lebresne sylv...@datastax.com Authored: Thu Sep 27 11:08:22 2012 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Thu Sep 27 11:08:22 2012 +0200 -- .../exceptions/PreparedQueryNotFoundException.java |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7c396d2/src/java/org/apache/cassandra/exceptions/PreparedQueryNotFoundException.java -- diff --git a/src/java/org/apache/cassandra/exceptions/PreparedQueryNotFoundException.java b/src/java/org/apache/cassandra/exceptions/PreparedQueryNotFoundException.java index 07502c8..7a165f4 100644 --- a/src/java/org/apache/cassandra/exceptions/PreparedQueryNotFoundException.java +++ b/src/java/org/apache/cassandra/exceptions/PreparedQueryNotFoundException.java @@ -32,9 +32,9 @@ public class PreparedQueryNotFoundException extends RequestValidationException private static String makeMsg(MD5Digest id) { -return String.format(Prepared query with ID %d not found + +return String.format(Prepared query with ID %s not found + (either the query was not prepared on this host (maybe the host has been restarted?) + - or you have prepared more than %d queries and queries %d has been evicted from the internal cache), + or you have prepared more than %d queries and query %s has been evicted from the internal cache), id, QueryProcessor.MAX_CACHE_PREPARED, id); } }
git commit: Avoid ConcurrentModificationExceptions on relocateTokens patch by dbrosius reviewed by jbellis for CASSANDRA-4727
Updated Branches: refs/heads/trunk c7c396d2b - 1078e6f51 Avoid ConcurrentModificationExceptions on relocateTokens patch by dbrosius reviewed by jbellis for CASSANDRA-4727 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1078e6f5 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1078e6f5 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1078e6f5 Branch: refs/heads/trunk Commit: 1078e6f514bcfbcaadb2517099baab5f3d21d510 Parents: c7c396d Author: Dave Brosius dbros...@apache.org Authored: Thu Sep 27 08:07:43 2012 -0400 Committer: Dave Brosius dbros...@apache.org Committed: Thu Sep 27 08:07:43 2012 -0400 -- .../apache/cassandra/service/StorageService.java | 20 -- 1 files changed, 11 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1078e6f5/src/java/org/apache/cassandra/service/StorageService.java -- diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java index 61d7619..e800d88 100644 --- a/src/java/org/apache/cassandra/service/StorageService.java +++ b/src/java/org/apache/cassandra/service/StorageService.java @@ -859,7 +859,7 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe Gossiper.instance.addLocalApplicationState(ApplicationState.SEVERITY, updated); return true; } - + public double getSeverity(InetAddress endpoint) { VersionedValue event; @@ -1255,7 +1255,7 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe } }, RING_DELAY, TimeUnit.MILLISECONDS); -// We used to own this token; This token will need to be removed from system.local +// We used to own this token; This token will need to be removed from system.local if (currentOwner.equals(FBUtilities.getBroadcastAddress())) localTokensToRemove.add(token); @@ -1391,7 +1391,7 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe /** * Handle one or more ranges (tokens) moving from their respective endpoints, to another. - * + * * @param endpoint the destination of the move * @param pieces STATE_RELOCATING,token,token,... */ @@ -1576,7 +1576,7 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe for (InetAddress endpoint : bootstrapTokens.inverse().keySet()) { CollectionToken tokens = bootstrapTokens.inverse().get(endpoint); - + allLeftMetadata.updateNormalTokens(tokens, endpoint); for (RangeToken range : strategy.getAddressRanges(allLeftMetadata).get(endpoint)) pendingRanges.put(range, endpoint); @@ -2584,7 +2584,7 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe logger.error(Invalid request to move(Token); This node has more than one token and cannot be moved thusly.); throw new UnsupportedOperationException(This node has more than one token and cannot be moved thusly.); } - + ListString tablesToProcess = Schema.instance.getNonSystemTables(); // checking if data is moving to this node @@ -2761,11 +2761,13 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe CollectionToken localTokens = getTokenMetadata().getTokens(localAddress); SetToken tokens = new HashSetToken(srcTokens); -for (Token srcT : tokens) +IteratorToken it = tokens.iterator(); +while (it.hasNext()) { +Token srcT = it.next(); if (localTokens.contains(srcT)) { -tokens.remove(srcT); +it.remove(); logger.warn(cannot move {}; source and destination match, srcT); } } @@ -3103,7 +3105,7 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe * total ownership will be a multiple of the number of DC's and this value will then go up within each DC depending * on the number of replicas within itself. For DC unaware replication strategies, ownership without replication * will be 100%. - * + * * @throws ConfigurationException */ public LinkedHashMapInetAddress, Float effectiveOwnership(String keyspace) throws ConfigurationException @@ -3114,7 +3116,7 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe throw new ConfigurationException(Non System
[jira] [Commented] (CASSANDRA-4727) Avoid ConcurrentModificationExceptions on relocateTokens
[ https://issues.apache.org/jira/browse/CASSANDRA-4727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13464655#comment-13464655 ] Dave Brosius commented on CASSANDRA-4727: - committed to trunk as 1078e6f514bcfbcaadb2517099baab5f3d21d510 Avoid ConcurrentModificationExceptions on relocateTokens Key: CASSANDRA-4727 URL: https://issues.apache.org/jira/browse/CASSANDRA-4727 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 beta 1 Reporter: Dave Brosius Assignee: Dave Brosius Priority: Trivial Fix For: 1.2.0 beta 2 Attachments: cme_patch.txt code loops over a HashMap and deletes items from the hashmap without using the iterator. will result in ConcurrentModificationExceptions... remove thru the iterator instead. -- 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-4727) Avoid ConcurrentModificationExceptions on relocateTokens
[ https://issues.apache.org/jira/browse/CASSANDRA-4727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dave Brosius updated CASSANDRA-4727: Reviewer: jbellis (was: urandom) Avoid ConcurrentModificationExceptions on relocateTokens Key: CASSANDRA-4727 URL: https://issues.apache.org/jira/browse/CASSANDRA-4727 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 beta 1 Reporter: Dave Brosius Assignee: Dave Brosius Priority: Trivial Fix For: 1.2.0 beta 2 Attachments: cme_patch.txt code loops over a HashMap and deletes items from the hashmap without using the iterator. will result in ConcurrentModificationExceptions... remove thru the iterator instead. -- 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-4208) ColumnFamilyOutputFormat should support writing to multiple column families
[ https://issues.apache.org/jira/browse/CASSANDRA-4208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robbie Strickland updated CASSANDRA-4208: - Attachment: trunk-4208-v3.txt I've attached the new patch (v3) rebased against trunk. ColumnFamilyOutputFormat should support writing to multiple column families --- Key: CASSANDRA-4208 URL: https://issues.apache.org/jira/browse/CASSANDRA-4208 Project: Cassandra Issue Type: Improvement Components: Hadoop Affects Versions: 1.1.0 Reporter: Robbie Strickland Attachments: cassandra-1.1-4208.txt, cassandra-1.1-4208-v2.txt, cassandra-1.1-4208-v3.txt, cassandra-1.1-4208-v4.txt, trunk-4208.txt, trunk-4208-v2.txt, trunk-4208-v3.txt It is not currently possible to output records to more than one column family in a single reducer. Considering that writing values to Cassandra often involves multiple column families (i.e. updating your index when you insert a new value), this seems overly restrictive. I am submitting a patch that moves the specification of column family from the job configuration to the write() call in ColumnFamilyRecordWriter. -- 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-4608) Add thrift server factory to CassandraDaemon
[ https://issues.apache.org/jira/browse/CASSANDRA-4608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Brown updated CASSANDRA-4608: --- Attachment: 4608_cassandra-1.1.patch Reworked this patch by removed the dependency of thrift SSL (as per previous comment), so the thrift server factory aspect can go into c* 1.1. Created a TServerFactory interface, and it is implemented by the o.a.c.t.CustomT* classes (with a nested Factory class). Removed the logic of building the TServer from CassandraDaemon to those Factory implementions. TServerCustomFactory chooses the correct TServerFactory to use: it supports the rpc_server_type sync/async/hsha from the yaml, as well as allowing a custom implementation to be passed in. Added notes in the yaml for roc_server_type that you can pass in a custom TServerFactory class name. Add thrift server factory to CassandraDaemon Key: CASSANDRA-4608 URL: https://issues.apache.org/jira/browse/CASSANDRA-4608 Project: Cassandra Issue Type: Sub-task Reporter: T Jake Luciani Assignee: Jason Brown Fix For: 1.2.0 beta 2 Attachments: 0002-CASSANDRA-4608-Add-thrift-server-factory-to-Cassandr.patch, 4608_cassandra-1.1.patch Add factory class for CassandraServer Default impl will be the current thrift server types. -- 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-4608) Add thrift server factory to CassandraDaemon
[ https://issues.apache.org/jira/browse/CASSANDRA-4608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13464719#comment-13464719 ] Jason Brown edited comment on CASSANDRA-4608 at 9/28/12 12:30 AM: -- Reworked this patch by removed the dependency of thrift SSL (as per previous comment), so the thrift server factory aspect can go into c* 1.1. Created a TServerFactory interface, and it is implemented by the o.a.c.t.CustomT* classes (with a nested Factory class). Removed the logic of building the TServer from CassandraDaemon to those Factory implementions. TServerCustomFactory chooses the correct TServerFactory to use: it supports the rpc_server_type sync/async/hsha from the yaml, as well as allowing a custom implementation to be passed in. Added notes in the yaml for rpc_server_type that you can pass in a custom TServerFactory class name. was (Author: jasobrown): Reworked this patch by removed the dependency of thrift SSL (as per previous comment), so the thrift server factory aspect can go into c* 1.1. Created a TServerFactory interface, and it is implemented by the o.a.c.t.CustomT* classes (with a nested Factory class). Removed the logic of building the TServer from CassandraDaemon to those Factory implementions. TServerCustomFactory chooses the correct TServerFactory to use: it supports the rpc_server_type sync/async/hsha from the yaml, as well as allowing a custom implementation to be passed in. Added notes in the yaml for roc_server_type that you can pass in a custom TServerFactory class name. Add thrift server factory to CassandraDaemon Key: CASSANDRA-4608 URL: https://issues.apache.org/jira/browse/CASSANDRA-4608 Project: Cassandra Issue Type: Sub-task Reporter: T Jake Luciani Assignee: Jason Brown Fix For: 1.1.6 Attachments: 0002-CASSANDRA-4608-Add-thrift-server-factory-to-Cassandr.patch, 4608_cassandra-1.1.patch Add factory class for CassandraServer Default impl will be the current thrift server types. -- 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-4608) Add thrift server factory to CassandraDaemon
[ https://issues.apache.org/jira/browse/CASSANDRA-4608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Brown updated CASSANDRA-4608: --- Fix Version/s: (was: 1.2.0 beta 2) 1.1.6 Add thrift server factory to CassandraDaemon Key: CASSANDRA-4608 URL: https://issues.apache.org/jira/browse/CASSANDRA-4608 Project: Cassandra Issue Type: Sub-task Reporter: T Jake Luciani Assignee: Jason Brown Fix For: 1.1.6 Attachments: 0002-CASSANDRA-4608-Add-thrift-server-factory-to-Cassandr.patch, 4608_cassandra-1.1.patch Add factory class for CassandraServer Default impl will be the current thrift server types. -- 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-4608) Add thrift server factory to CassandraDaemon
[ https://issues.apache.org/jira/browse/CASSANDRA-4608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13464719#comment-13464719 ] Jason Brown edited comment on CASSANDRA-4608 at 9/28/12 12:31 AM: -- Reworked this patch by removing the dependency of thrift SSL (as per previous comment), so the thrift server factory aspect can go into c* 1.1. Created a TServerFactory interface, and it is implemented by the o.a.c.t.CustomT* classes (with a nested Factory class). Removed the logic of building the TServer from CassandraDaemon to those Factory implementions. TServerCustomFactory chooses the correct TServerFactory to use: it supports the rpc_server_type sync/async/hsha from the yaml, as well as allowing a custom implementation to be passed in. Added notes in the yaml for rpc_server_type that you can pass in a custom TServerFactory class name. was (Author: jasobrown): Reworked this patch by removed the dependency of thrift SSL (as per previous comment), so the thrift server factory aspect can go into c* 1.1. Created a TServerFactory interface, and it is implemented by the o.a.c.t.CustomT* classes (with a nested Factory class). Removed the logic of building the TServer from CassandraDaemon to those Factory implementions. TServerCustomFactory chooses the correct TServerFactory to use: it supports the rpc_server_type sync/async/hsha from the yaml, as well as allowing a custom implementation to be passed in. Added notes in the yaml for rpc_server_type that you can pass in a custom TServerFactory class name. Add thrift server factory to CassandraDaemon Key: CASSANDRA-4608 URL: https://issues.apache.org/jira/browse/CASSANDRA-4608 Project: Cassandra Issue Type: Sub-task Reporter: T Jake Luciani Assignee: Jason Brown Fix For: 1.1.6 Attachments: 0002-CASSANDRA-4608-Add-thrift-server-factory-to-Cassandr.patch, 4608_cassandra-1.1.patch Add factory class for CassandraServer Default impl will be the current thrift server types. -- 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 re-created keyspace disappering after 1.1.5 upgrade patch by Pavel Yaskevich; reviewed by Jonathan Ellis for CASSANDRA-4698
Updated Branches: refs/heads/cassandra-1.1 e752de96f - 988ea81d4 fix re-created keyspace disappering after 1.1.5 upgrade patch by Pavel Yaskevich; reviewed by Jonathan Ellis for CASSANDRA-4698 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/988ea81d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/988ea81d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/988ea81d Branch: refs/heads/cassandra-1.1 Commit: 988ea81d409968614d84dacb3a022dcb156172c3 Parents: e752de9 Author: Pavel Yaskevich xe...@apache.org Authored: Thu Sep 27 17:16:55 2012 +0300 Committer: Pavel Yaskevich xe...@apache.org Committed: Thu Sep 27 17:16:55 2012 +0300 -- CHANGES.txt|1 + .../org/apache/cassandra/db/ColumnSerializer.java |5 -- src/java/org/apache/cassandra/db/RowMutation.java | 46 +++ .../apache/cassandra/service/MigrationManager.java |2 +- 4 files changed, 48 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/988ea81d/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 96e266a..eeb59e1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ * Automatic fixing of overlapping leveled sstables (CASSANDRA-4644) * fix error when using ORDER BY with extended selections (CASSANDRA-4689) * (CQL3) Fix validation for IN queries for non-PK cols (CASSANDRA-4709) + * fix re-created keyspace disappering after 1.1.5 upgrade (CASSANDRA-4698) Merged from 1.0: * Switch from NBHM to CHM in MessagingService's callback map, which prevents OOM in long-running instances (CASSANDRA-4708) http://git-wip-us.apache.org/repos/asf/cassandra/blob/988ea81d/src/java/org/apache/cassandra/db/ColumnSerializer.java -- diff --git a/src/java/org/apache/cassandra/db/ColumnSerializer.java b/src/java/org/apache/cassandra/db/ColumnSerializer.java index d5011aa..b6c71bb 100644 --- a/src/java/org/apache/cassandra/db/ColumnSerializer.java +++ b/src/java/org/apache/cassandra/db/ColumnSerializer.java @@ -117,11 +117,6 @@ public class ColumnSerializer implements IColumnSerializer else { long ts = dis.readLong(); -long now = FBUtilities.timestampMicros(); - -if (ts now) // fixing the timestamp from the future to be 'now' in micros -ts = now; // helps with CASSANDRA-4561 as remote nodes can send schema with wrong nanoTime() timestamps - ByteBuffer value = ByteBufferUtil.readWithLength(dis); return (b COUNTER_UPDATE_MASK) != 0 ? new CounterUpdateColumn(name, value, ts) http://git-wip-us.apache.org/repos/asf/cassandra/blob/988ea81d/src/java/org/apache/cassandra/db/RowMutation.java -- diff --git a/src/java/org/apache/cassandra/db/RowMutation.java b/src/java/org/apache/cassandra/db/RowMutation.java index a48e027..51dac68 100644 --- a/src/java/org/apache/cassandra/db/RowMutation.java +++ b/src/java/org/apache/cassandra/db/RowMutation.java @@ -442,6 +442,52 @@ public class RowMutation implements IMutation, MessageProducer return new RowMutation(table, key, modifications); } +/** + * Used only by o.a.c.service.MigrationManager to fix possibly broken System.nanoTime() timestamps + * of the schema migrations from remote nodes + * + * @param dis The source of the data + * @param version The version of remote node + * + * @return row mutation with fixed internal timestamps + * + * @throws IOException If data could not be read + */ +public RowMutation deserializeFixingTimestamps(DataInput dis, int version) throws IOException +{ +RowMutation mutation = deserialize(dis, version); + +long now = FBUtilities.timestampMicros(); +MapInteger, ColumnFamily fixedModifications = new HashMapInteger, ColumnFamily(); + +for (Map.EntryInteger, ColumnFamily modification : mutation.modifications_.entrySet()) +{ +ColumnFamily cf = ColumnFamily.create(modification.getValue().metadata()); + +if (cf.isMarkedForDelete()) +cf.delete(cf.getLocalDeletionTime(), cf.getMarkedForDeleteAt() now ? now : cf.getMarkedForDeleteAt()); + +for (IColumn column : modification.getValue().columns) +{ +// don't clone if column already has a correct timestamp +if (column.timestamp() = now) +{ +
[jira] [Updated] (CASSANDRA-4728) NPE with some load of writes, but possible snitch setting issue for a cluster
[ https://issues.apache.org/jira/browse/CASSANDRA-4728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-4728: -- Attachment: (was: system.log.2.zip) NPE with some load of writes, but possible snitch setting issue for a cluster - Key: CASSANDRA-4728 URL: https://issues.apache.org/jira/browse/CASSANDRA-4728 Project: Cassandra Issue Type: Bug Affects Versions: 1.0.10 Reporter: Alex Liu Priority: Critical The following errors are showing under height load ERROR [MutationStage:8294] 2012-09-25 22:01:47,628 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:8294,5,main] java.lang.NullPointerException at org.apache.cassandra.locator.PropertyFileSnitch.getDatacenter(PropertyFileSnitch.java:104) at com.datastax.bdp.snitch.DseDelegateSnitch.getDatacenter(DseDelegateSnitch.java:69) at org.apache.cassandra.locator.DynamicEndpointSnitch.getDatacenter(DynamicEndpointSnitch.java:122) at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:93) at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1984) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1972) at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:262) at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:248) at org.apache.cassandra.service.StorageProxy.applyCounterMutationOnLeader(StorageProxy.java:505) at org.apache.cassandra.db.CounterMutationVerbHandler.doVerb(CounterMutationVerbHandler.java:56) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:59) 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) ERROR [MutationStage:13164] 2012-09-25 22:19:06,486 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13164,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [Thrift:12] 2012-09-25 22:19:07,433 Cassandra.java (line 3462) Internal error processing batch_mutate java.lang.NullPointerException ERROR [Thrift:16] 2012-09-25 22:19:07,437 Cassandra.java (line 2999) Internal error processing get java.lang.NullPointerException INFO [GossipStage:280] 2012-09-26 00:15:15,371 Gossiper.java (line 818) InetAddress /172.16.233.208 is now dead. ERROR [GossipStage:280] 2012-09-26 00:15:15,372 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:280,5,main] j ERROR [MutationStage:40529] 2012-09-26 00:15:21,527 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:40529,5,main] java.lang.NullPointerException INFO [GossipStage:281] 2012-09-26 00:15:23,013 Gossiper.java (line 818) InetAddress /172.16.232.159 is now dead. ERROR [GossipStage:281] 2012-09-26 00:15:23,014 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:281,5,main] -- 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-4728) NPE with some load of writes, but possible snitch setting issue for a cluster
[ https://issues.apache.org/jira/browse/CASSANDRA-4728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-4728: -- Attachment: (was: system.log.3.zip) NPE with some load of writes, but possible snitch setting issue for a cluster - Key: CASSANDRA-4728 URL: https://issues.apache.org/jira/browse/CASSANDRA-4728 Project: Cassandra Issue Type: Bug Affects Versions: 1.0.10 Reporter: Alex Liu Priority: Critical The following errors are showing under height load ERROR [MutationStage:8294] 2012-09-25 22:01:47,628 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:8294,5,main] java.lang.NullPointerException at org.apache.cassandra.locator.PropertyFileSnitch.getDatacenter(PropertyFileSnitch.java:104) at com.datastax.bdp.snitch.DseDelegateSnitch.getDatacenter(DseDelegateSnitch.java:69) at org.apache.cassandra.locator.DynamicEndpointSnitch.getDatacenter(DynamicEndpointSnitch.java:122) at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:93) at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1984) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1972) at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:262) at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:248) at org.apache.cassandra.service.StorageProxy.applyCounterMutationOnLeader(StorageProxy.java:505) at org.apache.cassandra.db.CounterMutationVerbHandler.doVerb(CounterMutationVerbHandler.java:56) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:59) 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) ERROR [MutationStage:13164] 2012-09-25 22:19:06,486 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13164,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [Thrift:12] 2012-09-25 22:19:07,433 Cassandra.java (line 3462) Internal error processing batch_mutate java.lang.NullPointerException ERROR [Thrift:16] 2012-09-25 22:19:07,437 Cassandra.java (line 2999) Internal error processing get java.lang.NullPointerException INFO [GossipStage:280] 2012-09-26 00:15:15,371 Gossiper.java (line 818) InetAddress /172.16.233.208 is now dead. ERROR [GossipStage:280] 2012-09-26 00:15:15,372 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:280,5,main] j ERROR [MutationStage:40529] 2012-09-26 00:15:21,527 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:40529,5,main] java.lang.NullPointerException INFO [GossipStage:281] 2012-09-26 00:15:23,013 Gossiper.java (line 818) InetAddress /172.16.232.159 is now dead. ERROR [GossipStage:281] 2012-09-26 00:15:23,014 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:281,5,main] -- 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-4728) NPE with some load of writes, but possible snitch setting issue for a cluster
[ https://issues.apache.org/jira/browse/CASSANDRA-4728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-4728: -- Attachment: (was: system.log.1.zip) NPE with some load of writes, but possible snitch setting issue for a cluster - Key: CASSANDRA-4728 URL: https://issues.apache.org/jira/browse/CASSANDRA-4728 Project: Cassandra Issue Type: Bug Affects Versions: 1.0.10 Reporter: Alex Liu Priority: Critical The following errors are showing under height load ERROR [MutationStage:8294] 2012-09-25 22:01:47,628 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:8294,5,main] java.lang.NullPointerException at org.apache.cassandra.locator.PropertyFileSnitch.getDatacenter(PropertyFileSnitch.java:104) at com.datastax.bdp.snitch.DseDelegateSnitch.getDatacenter(DseDelegateSnitch.java:69) at org.apache.cassandra.locator.DynamicEndpointSnitch.getDatacenter(DynamicEndpointSnitch.java:122) at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:93) at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1984) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1972) at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:262) at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:248) at org.apache.cassandra.service.StorageProxy.applyCounterMutationOnLeader(StorageProxy.java:505) at org.apache.cassandra.db.CounterMutationVerbHandler.doVerb(CounterMutationVerbHandler.java:56) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:59) 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) ERROR [MutationStage:13164] 2012-09-25 22:19:06,486 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13164,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [Thrift:12] 2012-09-25 22:19:07,433 Cassandra.java (line 3462) Internal error processing batch_mutate java.lang.NullPointerException ERROR [Thrift:16] 2012-09-25 22:19:07,437 Cassandra.java (line 2999) Internal error processing get java.lang.NullPointerException INFO [GossipStage:280] 2012-09-26 00:15:15,371 Gossiper.java (line 818) InetAddress /172.16.233.208 is now dead. ERROR [GossipStage:280] 2012-09-26 00:15:15,372 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:280,5,main] j ERROR [MutationStage:40529] 2012-09-26 00:15:21,527 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:40529,5,main] java.lang.NullPointerException INFO [GossipStage:281] 2012-09-26 00:15:23,013 Gossiper.java (line 818) InetAddress /172.16.232.159 is now dead. ERROR [GossipStage:281] 2012-09-26 00:15:23,014 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:281,5,main] -- 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-4723) Improve write timeout exceptions
[ https://issues.apache.org/jira/browse/CASSANDRA-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-4723: Attachment: 4723-v2.txt You are right, the guaranteedAtomicity boolean is not enough information. Basically, I do want to distinguish between: # I'm atomic and something has been written: that includes the case of logged batches where the batch log has been successfully written, but also the single inserts. In that case, your asked CL hasn't been achieve but there is almost point in retrying (right away) given how writes work. You might want to log that the CL hasn't been achieved or something but at least you're pretty sure everything has been persisted and will be replicated eventually. # I'm a logged batch but it's the log write that timeouted: in that case you should always retry. # I'm an unlogged batch: in that case, not cool. There is almost no point in retrying right away with the same CL for the same reasons that in the first case. However, contrarily to the first case, some part of the batch may have not been persisted at all, so you might want to do something about that (schedule retries for later, retry with a lower CL so that even if you can't achieve the CL guaranteed required by your application, at least you know everything is persisted, ...). So anyway, I don't think we can do that with a single boolean, and beside there is also the counter case so I'm attaching a (imho cleaner) v2 patch that use an enum to tell exactly in which case we are (single mutation, unlogged batch, logged batch but were the log write was successful, failure during the batch log write, counter). Improve write timeout exceptions - Key: CASSANDRA-4723 URL: https://issues.apache.org/jira/browse/CASSANDRA-4723 Project: Cassandra Issue Type: Improvement Affects Versions: 1.2.0 beta 1 Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.0 beta 2 Attachments: 4723-alternative.txt, 4723.txt, 4723-v2.txt Through the binary protocol (and to a lesser extend in thrift), we now expose more information with a timeout, so that clients can take the right decision as far as retrying the operation is concerned. Concerning write timeouts, there is two places where I think we should improve that a bit: * regarding batchlog writes: what clients are interested in is to know if the option was atomic basically. If it was, there is no good reason to retry the write, otherwise, you should (or at least you know there might be inconsistencies if you don't). * we should return a separate exception for counter writes as in that case no retry should ever be done. -- 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/5] git commit: NTS will default unconfigured DC replicas to zero patch by jbellis; reviewed by brandonwilliams for CASSANDRA-4675
NTS will default unconfigured DC replicas to zero patch by jbellis; reviewed by brandonwilliams for CASSANDRA-4675 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/93bd3d89 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/93bd3d89 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/93bd3d89 Branch: refs/heads/cassandra-1.1 Commit: 93bd3d896f828b1c2f8b02d7361f33aa67fcbc2b Parents: 988ea81 Author: Jonathan Ellis jbel...@apache.org Authored: Thu Sep 27 09:29:20 2012 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Thu Sep 27 09:29:20 2012 -0500 -- CHANGES.txt|1 + .../cassandra/locator/NetworkTopologyStrategy.java |3 ++- 2 files changed, 3 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/93bd3d89/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index eeb59e1..e48fbfd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 1.1.6 + * NTS will default unconfigured DC replicas to zero (CASSANDRA-4675) * use default consistency level in counter validation if none is explicitly provide (CASSANDRA-4700) * Improve IAuthority interface by introducing fine-grained http://git-wip-us.apache.org/repos/asf/cassandra/blob/93bd3d89/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java -- diff --git a/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java b/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java index 2f0fed1..b30262c 100644 --- a/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java +++ b/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java @@ -140,7 +140,8 @@ public class NetworkTopologyStrategy extends AbstractReplicationStrategy public int getReplicationFactor(String dc) { -return datacenters.get(dc); +Integer replicas = datacenters.get(dc); +return replicas == null ? 0 : replicas; } public SetString getDatacenters()
[1/5] git commit: merge from 1.1
Updated Branches: refs/heads/cassandra-1.1 988ea81d4 - 93bd3d896 refs/heads/trunk 1078e6f51 - 5df3f13b6 merge from 1.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5df3f13b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5df3f13b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5df3f13b Branch: refs/heads/trunk Commit: 5df3f13b6ca993c9987c4e4b0319e01ff3895d54 Parents: 1078e6f 93bd3d8 Author: Jonathan Ellis jbel...@apache.org Authored: Thu Sep 27 09:30:28 2012 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Thu Sep 27 09:30:28 2012 -0500 -- CHANGES.txt|2 + .../org/apache/cassandra/db/ColumnSerializer.java |5 -- src/java/org/apache/cassandra/db/RowMutation.java | 46 +++ .../cassandra/locator/NetworkTopologyStrategy.java |3 +- 4 files changed, 50 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/5df3f13b/CHANGES.txt -- diff --cc CHANGES.txt index 576f7a6,e48fbfd..f50f368 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,85 -1,5 +1,86 @@@ +1.2-beta2 + * optimize single-row PK lookups (CASSANDRA-4710) + * adjust blockFor calculation to account for pending ranges due to node + movement (CASSANDRA-833) + * Change CQL version to 3.0.0 and stop accepting 3.0.0-beta1 (CASSANDRA-4649) + * (CQL3) Make prepared statement global instead of per connection (CASSANDRA-4449) + * Fix scrubbing of CQL3 created tables (CASSANDRA-4685) + * (CQL3) Fix validation when using counter and regular columns in the same table + (CASSANDRA-4706) + * Fix bug starting Cassandra with simple authentication (CASSANDRA-4648 + * ) + +1.2-beta1 + * add atomic_batch_mutate (CASSANDRA-4542, -4635) + * increase default max_hint_window_in_ms to 3h (CASSANDRA-4632) + * include message initiation time to replicas so they can more + accurately drop timed-out requests (CASSANDRA-2858) + * fix clientutil.jar dependencies (CASSANDRA-4566) + * optimize WriteResponse (CASSANDRA-4548) + * new metrics (CASSANDRA-4009) + * redesign KEYS indexes to avoid read-before-write (CASSANDRA-2897) + * debug tracing (CASSANDRA-1123) + * parallelize row cache loading (CASSANDRA-4282) + * Make compaction, flush JBOD-aware (CASSANDRA-4292) + * run local range scans on the read stage (CASSANDRA-3687) + * clean up ioexceptions (CASSANDRA-2116) + * add disk_failure_policy (CASSANDRA-2118) + * Introduce new json format with row level deletion (CASSANDRA-4054) + * remove redundant name column from schema_keyspaces (CASSANDRA-4433) + * improve nodetool ring handling of multi-dc clusters (CASSANDRA-3047) + * update NTS calculateNaturalEndpoints to be O(N log N) (CASSANDRA-3881) + * add UseCondCardMark XX jvm settings on jdk 1.7 (CASSANDRA-4366) + * split up rpc timeout by operation type (CASSANDRA-2819) + * rewrite key cache save/load to use only sequential i/o (CASSANDRA-3762) + * update MS protocol with a version handshake + broadcast address id + (CASSANDRA-4311) + * multithreaded hint replay (CASSANDRA-4189) + * add inter-node message compression (CASSANDRA-3127) + * remove COPP (CASSANDRA-2479) + * Track tombstone expiration and compact when tombstone content is + higher than a configurable threshold, default 20% (CASSANDRA-3442, 4234) + * update MurmurHash to version 3 (CASSANDRA-2975) + * (CLI) track elapsed time for `delete' operation (CASSANDRA-4060) + * (CLI) jline version is bumped to 1.0 to properly support + 'delete' key function (CASSANDRA-4132) + * Save IndexSummary into new SSTable 'Summary' component (CASSANDRA-2392, 4289) + * Add support for range tombstones (CASSANDRA-3708) + * Improve MessagingService efficiency (CASSANDRA-3617) + * Avoid ID conflicts from concurrent schema changes (CASSANDRA-3794) + * Set thrift HSHA server thread limit to unlimited by default (CASSANDRA-4277) + * Avoids double serialization of CF id in RowMutation messages + (CASSANDRA-4293) + * stream compressed sstables directly with java nio (CASSANDRA-4297) + * Support multiple ranges in SliceQueryFilter (CASSANDRA-3885) + * Add column metadata to system column families (CASSANDRA-4018) + * (cql3) Always use composite types by default (CASSANDRA-4329) + * (cql3) Add support for set, map and list (CASSANDRA-3647) + * Validate date type correctly (CASSANDRA-4441) + * (cql3) Allow definitions with only a PK (CASSANDRA-4361) + * (cql3) Add support for row key composites (CASSANDRA-4179) + * improve DynamicEndpointSnitch by using reservoir sampling (CASSANDRA-4038) + * (cql3) Add support for 2ndary indexes (CASSANDRA-3680) + * (cql3) fix defining more than one PK to be invalid
[5/5] git commit: fix listEndpointsPendingHints to generate String representation of the tokens for which we have hints
fix listEndpointsPendingHints to generate String representation of the tokens for which we have hints Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e752de96 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e752de96 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e752de96 Branch: refs/heads/trunk Commit: e752de96f7e3ae676b5dba0564e1321d6661a0cc Parents: 83b6f22 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Sep 26 10:03:57 2012 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Sep 26 10:05:50 2012 -0500 -- .../apache/cassandra/db/HintedHandOffManager.java | 19 +++ 1 files changed, 9 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e752de96/src/java/org/apache/cassandra/db/HintedHandOffManager.java -- diff --git a/src/java/org/apache/cassandra/db/HintedHandOffManager.java b/src/java/org/apache/cassandra/db/HintedHandOffManager.java index 3e5e2d5..a26894e 100644 --- a/src/java/org/apache/cassandra/db/HintedHandOffManager.java +++ b/src/java/org/apache/cassandra/db/HintedHandOffManager.java @@ -446,32 +446,31 @@ public class HintedHandOffManager implements HintedHandOffManagerMBean public ListString listEndpointsPendingHints() { -ListRow rows = getHintsSlice(1); +Token.TokenFactory tokenFactory = StorageService.getPartitioner().getTokenFactory(); // Extract the keys as strings to be reported. LinkedListString result = new LinkedListString(); -for (Row r : rows) +for (Row row : getHintsSlice(1)) { -if (r.cf != null) //ignore removed rows -result.addFirst(new String(r.key.key.array())); +if (row.cf != null) //ignore removed rows +result.addFirst(tokenFactory.toString(row.key.token)); } return result; } public MapString, Integer countPendingHints() { -ListRow rows = getHintsSlice(Integer.MAX_VALUE); +Token.TokenFactory tokenFactory = StorageService.getPartitioner().getTokenFactory(); MapString, Integer result = new HashMapString, Integer(); -Token.TokenFactory tokenFactory = StorageService.getPartitioner().getTokenFactory(); -for (Row r : rows) +for (Row row : getHintsSlice(Integer.MAX_VALUE)) { -if (r.cf == null) // ignore removed rows +if (row.cf == null) // ignore removed rows continue; -int count = r.cf.getColumnCount(); +int count = row.cf.getColumnCount(); if (count 0) -result.put(tokenFactory.toString(r.key.token), count); +result.put(tokenFactory.toString(row.key.token), count); } return result; }
[4/5] git commit: fix re-created keyspace disappering after 1.1.5 upgrade patch by Pavel Yaskevich; reviewed by Jonathan Ellis for CASSANDRA-4698
fix re-created keyspace disappering after 1.1.5 upgrade patch by Pavel Yaskevich; reviewed by Jonathan Ellis for CASSANDRA-4698 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/988ea81d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/988ea81d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/988ea81d Branch: refs/heads/trunk Commit: 988ea81d409968614d84dacb3a022dcb156172c3 Parents: e752de9 Author: Pavel Yaskevich xe...@apache.org Authored: Thu Sep 27 17:16:55 2012 +0300 Committer: Pavel Yaskevich xe...@apache.org Committed: Thu Sep 27 17:16:55 2012 +0300 -- CHANGES.txt|1 + .../org/apache/cassandra/db/ColumnSerializer.java |5 -- src/java/org/apache/cassandra/db/RowMutation.java | 46 +++ .../apache/cassandra/service/MigrationManager.java |2 +- 4 files changed, 48 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/988ea81d/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 96e266a..eeb59e1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ * Automatic fixing of overlapping leveled sstables (CASSANDRA-4644) * fix error when using ORDER BY with extended selections (CASSANDRA-4689) * (CQL3) Fix validation for IN queries for non-PK cols (CASSANDRA-4709) + * fix re-created keyspace disappering after 1.1.5 upgrade (CASSANDRA-4698) Merged from 1.0: * Switch from NBHM to CHM in MessagingService's callback map, which prevents OOM in long-running instances (CASSANDRA-4708) http://git-wip-us.apache.org/repos/asf/cassandra/blob/988ea81d/src/java/org/apache/cassandra/db/ColumnSerializer.java -- diff --git a/src/java/org/apache/cassandra/db/ColumnSerializer.java b/src/java/org/apache/cassandra/db/ColumnSerializer.java index d5011aa..b6c71bb 100644 --- a/src/java/org/apache/cassandra/db/ColumnSerializer.java +++ b/src/java/org/apache/cassandra/db/ColumnSerializer.java @@ -117,11 +117,6 @@ public class ColumnSerializer implements IColumnSerializer else { long ts = dis.readLong(); -long now = FBUtilities.timestampMicros(); - -if (ts now) // fixing the timestamp from the future to be 'now' in micros -ts = now; // helps with CASSANDRA-4561 as remote nodes can send schema with wrong nanoTime() timestamps - ByteBuffer value = ByteBufferUtil.readWithLength(dis); return (b COUNTER_UPDATE_MASK) != 0 ? new CounterUpdateColumn(name, value, ts) http://git-wip-us.apache.org/repos/asf/cassandra/blob/988ea81d/src/java/org/apache/cassandra/db/RowMutation.java -- diff --git a/src/java/org/apache/cassandra/db/RowMutation.java b/src/java/org/apache/cassandra/db/RowMutation.java index a48e027..51dac68 100644 --- a/src/java/org/apache/cassandra/db/RowMutation.java +++ b/src/java/org/apache/cassandra/db/RowMutation.java @@ -442,6 +442,52 @@ public class RowMutation implements IMutation, MessageProducer return new RowMutation(table, key, modifications); } +/** + * Used only by o.a.c.service.MigrationManager to fix possibly broken System.nanoTime() timestamps + * of the schema migrations from remote nodes + * + * @param dis The source of the data + * @param version The version of remote node + * + * @return row mutation with fixed internal timestamps + * + * @throws IOException If data could not be read + */ +public RowMutation deserializeFixingTimestamps(DataInput dis, int version) throws IOException +{ +RowMutation mutation = deserialize(dis, version); + +long now = FBUtilities.timestampMicros(); +MapInteger, ColumnFamily fixedModifications = new HashMapInteger, ColumnFamily(); + +for (Map.EntryInteger, ColumnFamily modification : mutation.modifications_.entrySet()) +{ +ColumnFamily cf = ColumnFamily.create(modification.getValue().metadata()); + +if (cf.isMarkedForDelete()) +cf.delete(cf.getLocalDeletionTime(), cf.getMarkedForDeleteAt() now ? now : cf.getMarkedForDeleteAt()); + +for (IColumn column : modification.getValue().columns) +{ +// don't clone if column already has a correct timestamp +if (column.timestamp() = now) +{ +cf.addColumn(column); +continue; +
[3/5] git commit: NTS will default unconfigured DC replicas to zero patch by jbellis; reviewed by brandonwilliams for CASSANDRA-4675
NTS will default unconfigured DC replicas to zero patch by jbellis; reviewed by brandonwilliams for CASSANDRA-4675 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/93bd3d89 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/93bd3d89 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/93bd3d89 Branch: refs/heads/trunk Commit: 93bd3d896f828b1c2f8b02d7361f33aa67fcbc2b Parents: 988ea81 Author: Jonathan Ellis jbel...@apache.org Authored: Thu Sep 27 09:29:20 2012 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Thu Sep 27 09:29:20 2012 -0500 -- CHANGES.txt|1 + .../cassandra/locator/NetworkTopologyStrategy.java |3 ++- 2 files changed, 3 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/93bd3d89/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index eeb59e1..e48fbfd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 1.1.6 + * NTS will default unconfigured DC replicas to zero (CASSANDRA-4675) * use default consistency level in counter validation if none is explicitly provide (CASSANDRA-4700) * Improve IAuthority interface by introducing fine-grained http://git-wip-us.apache.org/repos/asf/cassandra/blob/93bd3d89/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java -- diff --git a/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java b/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java index 2f0fed1..b30262c 100644 --- a/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java +++ b/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java @@ -140,7 +140,8 @@ public class NetworkTopologyStrategy extends AbstractReplicationStrategy public int getReplicationFactor(String dc) { -return datacenters.get(dc); +Integer replicas = datacenters.get(dc); +return replicas == null ? 0 : replicas; } public SetString getDatacenters()
git commit: adopt RM code of CASSANDRA-4698 to trunk
Updated Branches: refs/heads/trunk 5df3f13b6 - a0d7d9713 adopt RM code of CASSANDRA-4698 to trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a0d7d971 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a0d7d971 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a0d7d971 Branch: refs/heads/trunk Commit: a0d7d9713d776506ce6c2eea577eea3b7c5099bd Parents: 5df3f13 Author: Pavel Yaskevich xe...@apache.org Authored: Thu Sep 27 17:35:05 2012 +0300 Committer: Pavel Yaskevich xe...@apache.org Committed: Thu Sep 27 17:35:05 2012 +0300 -- src/java/org/apache/cassandra/db/RowMutation.java | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a0d7d971/src/java/org/apache/cassandra/db/RowMutation.java -- diff --git a/src/java/org/apache/cassandra/db/RowMutation.java b/src/java/org/apache/cassandra/db/RowMutation.java index 695c96d..1a5f871 100644 --- a/src/java/org/apache/cassandra/db/RowMutation.java +++ b/src/java/org/apache/cassandra/db/RowMutation.java @@ -431,14 +431,18 @@ public class RowMutation implements IMutation RowMutation mutation = deserialize(dis, version); long now = FBUtilities.timestampMicros(); -MapInteger, ColumnFamily fixedModifications = new HashMapInteger, ColumnFamily(); +MapUUID, ColumnFamily fixedModifications = new HashMapUUID, ColumnFamily(); -for (Map.EntryInteger, ColumnFamily modification : mutation.modifications_.entrySet()) +for (Map.EntryUUID, ColumnFamily modification : mutation.modifications.entrySet()) { ColumnFamily cf = ColumnFamily.create(modification.getValue().metadata()); if (cf.isMarkedForDelete()) -cf.delete(cf.getLocalDeletionTime(), cf.getMarkedForDeleteAt() now ? now : cf.getMarkedForDeleteAt()); +{ +DeletionTime delTime = cf.deletionInfo().getTopLevelDeletion(); +cf.delete(new DeletionInfo(delTime.markedForDeleteAt now ? now : delTime.markedForDeleteAt, + delTime.localDeletionTime)); +} for (IColumn column : modification.getValue().columns) {
[jira] [Commented] (CASSANDRA-4698) Keyspace disappears when upgrading node from cassandra-1.1.1 to cassandra-1.1.5
[ https://issues.apache.org/jira/browse/CASSANDRA-4698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13464801#comment-13464801 ] Hudson commented on CASSANDRA-4698: --- Integrated in Cassandra #2190 (See [https://builds.apache.org/job/Cassandra/2190/]) adopt RM code of CASSANDRA-4698 to trunk (Revision a0d7d9713d776506ce6c2eea577eea3b7c5099bd) Result = ABORTED xedin : Files : * src/java/org/apache/cassandra/db/RowMutation.java Keyspace disappears when upgrading node from cassandra-1.1.1 to cassandra-1.1.5 --- Key: CASSANDRA-4698 URL: https://issues.apache.org/jira/browse/CASSANDRA-4698 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.5 Environment: ubuntu. JNA not installed. Reporter: Tyler Patterson Assignee: Pavel Yaskevich Fix For: 1.1.6 Attachments: CASSANDRA-4698.patch, start_1.1.1_system.log, start_1.1.5_system.log Here is how I got the problem to happen: 1. Get this zipped data directory (about 33Mb): scp cass@50.57.69.32:/home/cass/cassandra.zip ./ (password cass) 2. Unzip it in /var/lib/ 3. clone the cassandra git repo 4. git checkout cassandra-1.1.1; ant jar; 5. bin/cassandra 6. Run cqlsh -3, then DESC COLUMNFAMILIES; Note the presence of Keyspace performance_tests 7. pkill -f cassandra; git checkout cassandra-1.1.5; ant realclean; ant jar; 8. bin/cassandra 9. Run cqlsh -3, then DESC COLUMNFAMILIES; Note that there is no performance_tests keyspace -- 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-4545) add cql support for batchlog
[ https://issues.apache.org/jira/browse/CASSANDRA-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13464852#comment-13464852 ] Sylvain Lebresne commented on CASSANDRA-4545: - Unfortunately that patch already need rebase. Also, we don't want to completely refuse counters in batches, we want to refuse batches that mix counters and regular inserts. add cql support for batchlog Key: CASSANDRA-4545 URL: https://issues.apache.org/jira/browse/CASSANDRA-4545 Project: Cassandra Issue Type: Sub-task Reporter: Jonathan Ellis Assignee: Aleksey Yeschenko Attachments: CASSANDRA-4545.txt Need to expose the equivalent of atomic_batch_mutate (CASSANDRA-4542) to 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] [Resolved] (CASSANDRA-4728) NPE with some load of writes, but possible snitch setting issue for a cluster
[ https://issues.apache.org/jira/browse/CASSANDRA-4728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams resolved CASSANDRA-4728. - Resolution: Duplicate Duplicate of CASSANDRA-4675 NPE with some load of writes, but possible snitch setting issue for a cluster - Key: CASSANDRA-4728 URL: https://issues.apache.org/jira/browse/CASSANDRA-4728 Project: Cassandra Issue Type: Bug Affects Versions: 1.0.10 Reporter: Alex Liu Priority: Critical The following errors are showing under height load ERROR [MutationStage:8294] 2012-09-25 22:01:47,628 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:8294,5,main] java.lang.NullPointerException at org.apache.cassandra.locator.PropertyFileSnitch.getDatacenter(PropertyFileSnitch.java:104) at com.datastax.bdp.snitch.DseDelegateSnitch.getDatacenter(DseDelegateSnitch.java:69) at org.apache.cassandra.locator.DynamicEndpointSnitch.getDatacenter(DynamicEndpointSnitch.java:122) at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:93) at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1984) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1972) at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:262) at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:248) at org.apache.cassandra.service.StorageProxy.applyCounterMutationOnLeader(StorageProxy.java:505) at org.apache.cassandra.db.CounterMutationVerbHandler.doVerb(CounterMutationVerbHandler.java:56) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:59) 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) ERROR [MutationStage:13164] 2012-09-25 22:19:06,486 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13164,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [Thrift:12] 2012-09-25 22:19:07,433 Cassandra.java (line 3462) Internal error processing batch_mutate java.lang.NullPointerException ERROR [Thrift:16] 2012-09-25 22:19:07,437 Cassandra.java (line 2999) Internal error processing get java.lang.NullPointerException INFO [GossipStage:280] 2012-09-26 00:15:15,371 Gossiper.java (line 818) InetAddress /172.16.233.208 is now dead. ERROR [GossipStage:280] 2012-09-26 00:15:15,372 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:280,5,main] j ERROR [MutationStage:40529] 2012-09-26 00:15:21,527 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:40529,5,main] java.lang.NullPointerException INFO [GossipStage:281] 2012-09-26 00:15:23,013 Gossiper.java (line 818) InetAddress /172.16.232.159 is now dead. ERROR [GossipStage:281] 2012-09-26 00:15:23,014 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:281,5,main] -- 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-4728) NPE with some load of writes, but possible snitch setting issue for a cluster
[ https://issues.apache.org/jira/browse/CASSANDRA-4728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis reopened CASSANDRA-4728: --- Actually not a duplicate, this is a PFS NPE for an unknown host. NPE with some load of writes, but possible snitch setting issue for a cluster - Key: CASSANDRA-4728 URL: https://issues.apache.org/jira/browse/CASSANDRA-4728 Project: Cassandra Issue Type: Bug Affects Versions: 1.0.10 Reporter: Alex Liu Priority: Critical The following errors are showing under height load ERROR [MutationStage:8294] 2012-09-25 22:01:47,628 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:8294,5,main] java.lang.NullPointerException at org.apache.cassandra.locator.PropertyFileSnitch.getDatacenter(PropertyFileSnitch.java:104) at com.datastax.bdp.snitch.DseDelegateSnitch.getDatacenter(DseDelegateSnitch.java:69) at org.apache.cassandra.locator.DynamicEndpointSnitch.getDatacenter(DynamicEndpointSnitch.java:122) at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:93) at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1984) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1972) at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:262) at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:248) at org.apache.cassandra.service.StorageProxy.applyCounterMutationOnLeader(StorageProxy.java:505) at org.apache.cassandra.db.CounterMutationVerbHandler.doVerb(CounterMutationVerbHandler.java:56) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:59) 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) ERROR [MutationStage:13164] 2012-09-25 22:19:06,486 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13164,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [Thrift:12] 2012-09-25 22:19:07,433 Cassandra.java (line 3462) Internal error processing batch_mutate java.lang.NullPointerException ERROR [Thrift:16] 2012-09-25 22:19:07,437 Cassandra.java (line 2999) Internal error processing get java.lang.NullPointerException INFO [GossipStage:280] 2012-09-26 00:15:15,371 Gossiper.java (line 818) InetAddress /172.16.233.208 is now dead. ERROR [GossipStage:280] 2012-09-26 00:15:15,372 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:280,5,main] j ERROR [MutationStage:40529] 2012-09-26 00:15:21,527 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:40529,5,main] java.lang.NullPointerException INFO [GossipStage:281] 2012-09-26 00:15:23,013 Gossiper.java (line 818) InetAddress /172.16.232.159 is now dead. ERROR [GossipStage:281] 2012-09-26 00:15:23,014 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:281,5,main] -- 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-4545) add cql support for batchlog
[ https://issues.apache.org/jira/browse/CASSANDRA-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13464898#comment-13464898 ] Aleksey Yeschenko commented on CASSANDRA-4545: -- I'm pretty sure we DO want to forbid counter mutations in batches entirely. Counter mutations are not idempotent and therefore not safe to replay. As for rebasing the patch - will do. add cql support for batchlog Key: CASSANDRA-4545 URL: https://issues.apache.org/jira/browse/CASSANDRA-4545 Project: Cassandra Issue Type: Sub-task Reporter: Jonathan Ellis Assignee: Aleksey Yeschenko Attachments: CASSANDRA-4545.txt Need to expose the equivalent of atomic_batch_mutate (CASSANDRA-4542) to 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-4545) add cql support for batchlog
[ https://issues.apache.org/jira/browse/CASSANDRA-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13464921#comment-13464921 ] Sylvain Lebresne commented on CASSANDRA-4545: - I'll reformulate: we don't want to completely refuse counters, at least not in unlogged batches. Sure batch of counters shouldn't be replay, but that's not a good reason to refuse batches in the first place. Typically CASSANDRA-4723 exists exactly so user can know it was a counter batch and should not be replay. Or to be more precise, if you timeout with counters you're screwed, them being in batch or not, so allowing batch of counters is not worst than allowing counters in the first place, so why forbid them? Especially since with CQL3, you often have to use a BATCH even to insert data in the same Cassandra row, and so disallowing BATCH of counters would be a major regression compared to what you can do with thrift. It's true though that we need to decide if we allow the BEGIN BATCH for counters, or only the BEGIN UNLOGGED BATCH one, or both. We could even say that counter batch needs to use a specific syntax like BEGIN COUNTER BATCH. Given that counter are a specific case anyway as far as failed write is concerned, I think just allowing BEGIN BATCH would probably not be a big deal, though I do kind of like the idea of a BEGIN COUNTER BATCH syntax as it highlight the fact that counter and regular column cannot be mixed. I don't care too much one way or the other. add cql support for batchlog Key: CASSANDRA-4545 URL: https://issues.apache.org/jira/browse/CASSANDRA-4545 Project: Cassandra Issue Type: Sub-task Reporter: Jonathan Ellis Assignee: Aleksey Yeschenko Attachments: CASSANDRA-4545.txt Need to expose the equivalent of atomic_batch_mutate (CASSANDRA-4542) to 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-4261) [patch] Support consistency-latency prediction in nodetool
[ https://issues.apache.org/jira/browse/CASSANDRA-4261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13464925#comment-13464925 ] Shivaram Venkataraman commented on CASSANDRA-4261: -- Remove trialALatencies and trialSLatencies as they weren't required. v6 attached [patch] Support consistency-latency prediction in nodetool -- Key: CASSANDRA-4261 URL: https://issues.apache.org/jira/browse/CASSANDRA-4261 Project: Cassandra Issue Type: New Feature Components: Tools Reporter: Peter Bailis Assignee: Peter Bailis Priority: Minor Fix For: 1.2.0 beta 2 Attachments: 4261-v4.txt, 4261-v5.txt, 4261-v6.txt, demo-pbs-v3.sh, pbs-nodetool-v3.patch h3. Introduction Cassandra supports a variety of replication configurations: ReplicationFactor is set per-ColumnFamily and ConsistencyLevel is set per-request. Setting {{ConsistencyLevel}} to {{QUORUM}} for reads and writes ensures strong consistency, but {{QUORUM}} is often slower than {{ONE}}, {{TWO}}, or {{THREE}}. What should users choose? This patch provides a latency-consistency analysis within {{nodetool}}. Users can accurately predict Cassandra's behavior in their production environments without interfering with performance. What's the probability that we'll read a write t seconds after it completes? What about reading one of the last k writes? This patch provides answers via {{nodetool predictconsistency}}: {{nodetool predictconsistency ReplicationFactor TimeAfterWrite Versions}} \\ \\ {code:title=Example output|borderStyle=solid} //N == ReplicationFactor //R == read ConsistencyLevel //W == write ConsistencyLevel user@test:$ nodetool predictconsistency 3 100 1 Performing consistency prediction 100ms after a given write, with maximum version staleness of k=1 N=3, R=1, W=1 Probability of consistent reads: 0.678900 Average read latency: 5.377900ms (99.900th %ile 40ms) Average write latency: 36.971298ms (99.900th %ile 294ms) N=3, R=1, W=2 Probability of consistent reads: 0.791600 Average read latency: 5.372500ms (99.900th %ile 39ms) Average write latency: 303.630890ms (99.900th %ile 357ms) N=3, R=1, W=3 Probability of consistent reads: 1.00 Average read latency: 5.426600ms (99.900th %ile 42ms) Average write latency: 1382.650879ms (99.900th %ile 629ms) N=3, R=2, W=1 Probability of consistent reads: 0.915800 Average read latency: 11.091000ms (99.900th %ile 348ms) Average write latency: 42.663101ms (99.900th %ile 284ms) N=3, R=2, W=2 Probability of consistent reads: 1.00 Average read latency: 10.606800ms (99.900th %ile 263ms) Average write latency: 310.117615ms (99.900th %ile 335ms) N=3, R=3, W=1 Probability of consistent reads: 1.00 Average read latency: 52.657501ms (99.900th %ile 565ms) Average write latency: 39.949799ms (99.900th %ile 237ms) {code} h3. Demo Here's an example scenario you can run using [ccm|https://github.com/pcmanus/ccm]. The prediction is fast: {code:borderStyle=solid} cd cassandra-source-dir with patch applied ant ccm create consistencytest --cassandra-dir=. ccm populate -n 5 ccm start # if start fails, you might need to initialize more loopback interfaces # e.g., sudo ifconfig lo0 alias 127.0.0.2 # use stress to get some sample latency data tools/bin/stress -d 127.0.0.1 -l 3 -n 1 -o insert tools/bin/stress -d 127.0.0.1 -l 3 -n 1 -o read bin/nodetool -h 127.0.0.1 -p 7100 predictconsistency 3 100 1 {code} h3. What and Why We've implemented [Probabilistically Bounded Staleness|http://pbs.cs.berkeley.edu/#demo], a new technique for predicting consistency-latency trade-offs within Cassandra. Our [paper|http://arxiv.org/pdf/1204.6082.pdf] will appear in [VLDB 2012|http://www.vldb2012.org/], and, in it, we've used PBS to profile a range of Dynamo-style data store deployments at places like LinkedIn and Yammer in addition to profiling our own Cassandra deployments. In our experience, prediction is both accurate and much more lightweight than profiling and manually testing each possible replication configuration (especially in production!). This analysis is important for the many users we've talked to and heard about who use partial quorum operation (e.g., non-{{QUORUM}} {{ConsistencyLevel}}). Should they use CL={{ONE}}? CL={{TWO}}? It likely depends on their runtime environment and, short of profiling in production, there's no existing way to answer these questions. (Keep in mind, Cassandra defaults to CL={{ONE}}, meaning users don't know how stale their data will be.) We outline limitations of the current approach after describing how it's done. We believe that this is a useful feature that can provide guidance and fairly accurate
[jira] [Updated] (CASSANDRA-4261) [patch] Support consistency-latency prediction in nodetool
[ https://issues.apache.org/jira/browse/CASSANDRA-4261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shivaram Venkataraman updated CASSANDRA-4261: - Attachment: 4261-v6.txt [patch] Support consistency-latency prediction in nodetool -- Key: CASSANDRA-4261 URL: https://issues.apache.org/jira/browse/CASSANDRA-4261 Project: Cassandra Issue Type: New Feature Components: Tools Reporter: Peter Bailis Assignee: Peter Bailis Priority: Minor Fix For: 1.2.0 beta 2 Attachments: 4261-v4.txt, 4261-v5.txt, 4261-v6.txt, demo-pbs-v3.sh, pbs-nodetool-v3.patch h3. Introduction Cassandra supports a variety of replication configurations: ReplicationFactor is set per-ColumnFamily and ConsistencyLevel is set per-request. Setting {{ConsistencyLevel}} to {{QUORUM}} for reads and writes ensures strong consistency, but {{QUORUM}} is often slower than {{ONE}}, {{TWO}}, or {{THREE}}. What should users choose? This patch provides a latency-consistency analysis within {{nodetool}}. Users can accurately predict Cassandra's behavior in their production environments without interfering with performance. What's the probability that we'll read a write t seconds after it completes? What about reading one of the last k writes? This patch provides answers via {{nodetool predictconsistency}}: {{nodetool predictconsistency ReplicationFactor TimeAfterWrite Versions}} \\ \\ {code:title=Example output|borderStyle=solid} //N == ReplicationFactor //R == read ConsistencyLevel //W == write ConsistencyLevel user@test:$ nodetool predictconsistency 3 100 1 Performing consistency prediction 100ms after a given write, with maximum version staleness of k=1 N=3, R=1, W=1 Probability of consistent reads: 0.678900 Average read latency: 5.377900ms (99.900th %ile 40ms) Average write latency: 36.971298ms (99.900th %ile 294ms) N=3, R=1, W=2 Probability of consistent reads: 0.791600 Average read latency: 5.372500ms (99.900th %ile 39ms) Average write latency: 303.630890ms (99.900th %ile 357ms) N=3, R=1, W=3 Probability of consistent reads: 1.00 Average read latency: 5.426600ms (99.900th %ile 42ms) Average write latency: 1382.650879ms (99.900th %ile 629ms) N=3, R=2, W=1 Probability of consistent reads: 0.915800 Average read latency: 11.091000ms (99.900th %ile 348ms) Average write latency: 42.663101ms (99.900th %ile 284ms) N=3, R=2, W=2 Probability of consistent reads: 1.00 Average read latency: 10.606800ms (99.900th %ile 263ms) Average write latency: 310.117615ms (99.900th %ile 335ms) N=3, R=3, W=1 Probability of consistent reads: 1.00 Average read latency: 52.657501ms (99.900th %ile 565ms) Average write latency: 39.949799ms (99.900th %ile 237ms) {code} h3. Demo Here's an example scenario you can run using [ccm|https://github.com/pcmanus/ccm]. The prediction is fast: {code:borderStyle=solid} cd cassandra-source-dir with patch applied ant ccm create consistencytest --cassandra-dir=. ccm populate -n 5 ccm start # if start fails, you might need to initialize more loopback interfaces # e.g., sudo ifconfig lo0 alias 127.0.0.2 # use stress to get some sample latency data tools/bin/stress -d 127.0.0.1 -l 3 -n 1 -o insert tools/bin/stress -d 127.0.0.1 -l 3 -n 1 -o read bin/nodetool -h 127.0.0.1 -p 7100 predictconsistency 3 100 1 {code} h3. What and Why We've implemented [Probabilistically Bounded Staleness|http://pbs.cs.berkeley.edu/#demo], a new technique for predicting consistency-latency trade-offs within Cassandra. Our [paper|http://arxiv.org/pdf/1204.6082.pdf] will appear in [VLDB 2012|http://www.vldb2012.org/], and, in it, we've used PBS to profile a range of Dynamo-style data store deployments at places like LinkedIn and Yammer in addition to profiling our own Cassandra deployments. In our experience, prediction is both accurate and much more lightweight than profiling and manually testing each possible replication configuration (especially in production!). This analysis is important for the many users we've talked to and heard about who use partial quorum operation (e.g., non-{{QUORUM}} {{ConsistencyLevel}}). Should they use CL={{ONE}}? CL={{TWO}}? It likely depends on their runtime environment and, short of profiling in production, there's no existing way to answer these questions. (Keep in mind, Cassandra defaults to CL={{ONE}}, meaning users don't know how stale their data will be.) We outline limitations of the current approach after describing how it's done. We believe that this is a useful feature that can provide guidance and fairly accurate estimation for most users. h3. Interface This patch allows users to perform this prediction in production using
[jira] [Updated] (CASSANDRA-4729) remove vestiges of Thrift unframed mode
[ https://issues.apache.org/jira/browse/CASSANDRA-4729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-4729: -- Attachment: 4729.txt patch to revise yaml comments + remove unframed mode from cli etc remove vestiges of Thrift unframed mode --- Key: CASSANDRA-4729 URL: https://issues.apache.org/jira/browse/CASSANDRA-4729 Project: Cassandra Issue Type: Improvement Reporter: Jonathan Ellis Assignee: Jonathan Ellis Priority: Minor Labels: thrift Fix For: 1.2.0 beta 2 Attachments: 4729.txt cassandra.yaml comments incorrectly imply that Cassandra can listen for unframed thrift connections by setting the frame size to zero. But DatabaseDescriptor has this check since 0.8: {code} . if (conf.thrift_framed_transport_size_in_mb = 0) throw new ConfigurationException(thrift_framed_transport_size_in_mb must be positive); {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
[jira] [Commented] (CASSANDRA-4728) NPE with some load of writes, but possible snitch setting issue for a cluster
[ https://issues.apache.org/jira/browse/CASSANDRA-4728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13464933#comment-13464933 ] Jonathan Ellis commented on CASSANDRA-4728: --- Would it be sufficient for each (server-mode) node to check that it's present in the PFS file when starting up? NPE with some load of writes, but possible snitch setting issue for a cluster - Key: CASSANDRA-4728 URL: https://issues.apache.org/jira/browse/CASSANDRA-4728 Project: Cassandra Issue Type: Bug Affects Versions: 1.0.10 Reporter: Alex Liu Priority: Critical The following errors are showing under height load ERROR [MutationStage:8294] 2012-09-25 22:01:47,628 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:8294,5,main] java.lang.NullPointerException at org.apache.cassandra.locator.PropertyFileSnitch.getDatacenter(PropertyFileSnitch.java:104) at com.datastax.bdp.snitch.DseDelegateSnitch.getDatacenter(DseDelegateSnitch.java:69) at org.apache.cassandra.locator.DynamicEndpointSnitch.getDatacenter(DynamicEndpointSnitch.java:122) at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:93) at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1984) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1972) at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:262) at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:248) at org.apache.cassandra.service.StorageProxy.applyCounterMutationOnLeader(StorageProxy.java:505) at org.apache.cassandra.db.CounterMutationVerbHandler.doVerb(CounterMutationVerbHandler.java:56) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:59) 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) ERROR [MutationStage:13164] 2012-09-25 22:19:06,486 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13164,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [Thrift:12] 2012-09-25 22:19:07,433 Cassandra.java (line 3462) Internal error processing batch_mutate java.lang.NullPointerException ERROR [Thrift:16] 2012-09-25 22:19:07,437 Cassandra.java (line 2999) Internal error processing get java.lang.NullPointerException INFO [GossipStage:280] 2012-09-26 00:15:15,371 Gossiper.java (line 818) InetAddress /172.16.233.208 is now dead. ERROR [GossipStage:280] 2012-09-26 00:15:15,372 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:280,5,main] j ERROR [MutationStage:40529] 2012-09-26 00:15:21,527 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:40529,5,main] java.lang.NullPointerException INFO [GossipStage:281] 2012-09-26 00:15:23,013 Gossiper.java (line 818) InetAddress /172.16.232.159 is now dead. ERROR [GossipStage:281] 2012-09-26 00:15:23,014 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:281,5,main] -- 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-4545) add cql support for batchlog
[ https://issues.apache.org/jira/browse/CASSANDRA-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13464935#comment-13464935 ] Jonathan Ellis commented on CASSANDRA-4545: --- Is the overhead saved by BATCH large enough that we care about allowing counters in BATCHes? since they can't be either atomic or replayable the only reason left to allow batch is performance, and I'm not sure that's a good enough reason to give people a gun to shoot their feet with, particularly now that we have prepared statements. add cql support for batchlog Key: CASSANDRA-4545 URL: https://issues.apache.org/jira/browse/CASSANDRA-4545 Project: Cassandra Issue Type: Sub-task Reporter: Jonathan Ellis Assignee: Aleksey Yeschenko Attachments: CASSANDRA-4545.txt Need to expose the equivalent of atomic_batch_mutate (CASSANDRA-4542) to 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-4545) add cql support for batchlog
[ https://issues.apache.org/jira/browse/CASSANDRA-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13464961#comment-13464961 ] Sylvain Lebresne commented on CASSANDRA-4545: - bq. Is the overhead saved by BATCH large enough that we care about allowing counters in BATCHes? There is no doubt it is. Again, keep in mind that even for inserts within the same row key you will have to use BATCH most of the time. In that case, it's clear shoving all insert inside the same IMutation will be way faster than doing back and forth with the client. That's even more true for counter where each of those back and forth would include a local read (that is also batched if everything is in the same mutation). add cql support for batchlog Key: CASSANDRA-4545 URL: https://issues.apache.org/jira/browse/CASSANDRA-4545 Project: Cassandra Issue Type: Sub-task Reporter: Jonathan Ellis Assignee: Aleksey Yeschenko Attachments: CASSANDRA-4545.txt Need to expose the equivalent of atomic_batch_mutate (CASSANDRA-4542) to 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-4545) add cql support for batchlog
[ https://issues.apache.org/jira/browse/CASSANDRA-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13464964#comment-13464964 ] Jonathan Ellis commented on CASSANDRA-4545: --- bq. even for inserts within the same row key you will have to use BATCH most of the time Why is that? Can't I write {{UPDATE foo SET x = x + 1, y = y + 2, ...}} ? add cql support for batchlog Key: CASSANDRA-4545 URL: https://issues.apache.org/jira/browse/CASSANDRA-4545 Project: Cassandra Issue Type: Sub-task Reporter: Jonathan Ellis Assignee: Aleksey Yeschenko Attachments: CASSANDRA-4545.txt Need to expose the equivalent of atomic_batch_mutate (CASSANDRA-4542) to 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-4545) add cql support for batchlog
[ https://issues.apache.org/jira/browse/CASSANDRA-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13465018#comment-13465018 ] Sylvain Lebresne commented on CASSANDRA-4545: - bq. Why is that? Can't I write UPDATE foo SET x = x + 1, y = y + 2, ... ? Sure you can, but that only works for columns in the same CQL row. If you have a wide row (a.k.a a composite PK), you can't update multiple ones without a BATCH (and for *the* good use case of counters, realtime analytics, doing time series of counter is really useful). And without a BATCH, you do lose the atomicity and isolation we currently have in that case (on top of the performance penalty). bq. to give people a gun to shoot their feet with I'm not sure I understand why that's so much a gun to shoot their feet with. As far as I can tell, allowing counter batches adds no foot shooting over allowing counters (which have by themsleves some foot shooting involved, but that's another problem). You should not replay counter inserts, but whether they are in batch or not don't make a whole of a difference (in both case you don't know what insert went in or not). add cql support for batchlog Key: CASSANDRA-4545 URL: https://issues.apache.org/jira/browse/CASSANDRA-4545 Project: Cassandra Issue Type: Sub-task Reporter: Jonathan Ellis Assignee: Aleksey Yeschenko Attachments: CASSANDRA-4545.txt Need to expose the equivalent of atomic_batch_mutate (CASSANDRA-4542) to 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-4729) remove vestiges of Thrift unframed mode
[ https://issues.apache.org/jira/browse/CASSANDRA-4729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13465019#comment-13465019 ] Brandon Williams commented on CASSANDRA-4729: - +1 remove vestiges of Thrift unframed mode --- Key: CASSANDRA-4729 URL: https://issues.apache.org/jira/browse/CASSANDRA-4729 Project: Cassandra Issue Type: Improvement Reporter: Jonathan Ellis Assignee: Jonathan Ellis Priority: Minor Labels: thrift Fix For: 1.2.0 beta 2 Attachments: 4729.txt cassandra.yaml comments incorrectly imply that Cassandra can listen for unframed thrift connections by setting the frame size to zero. But DatabaseDescriptor has this check since 0.8: {code} . if (conf.thrift_framed_transport_size_in_mb = 0) throw new ConfigurationException(thrift_framed_transport_size_in_mb must be positive); {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
[jira] [Commented] (CASSANDRA-4728) NPE with some load of writes, but possible snitch setting issue for a cluster
[ https://issues.apache.org/jira/browse/CASSANDRA-4728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13465027#comment-13465027 ] Brandon Williams commented on CASSANDRA-4728: - That sounds like a good solution. NPE with some load of writes, but possible snitch setting issue for a cluster - Key: CASSANDRA-4728 URL: https://issues.apache.org/jira/browse/CASSANDRA-4728 Project: Cassandra Issue Type: Bug Affects Versions: 1.0.10 Reporter: Alex Liu Priority: Critical The following errors are showing under height load ERROR [MutationStage:8294] 2012-09-25 22:01:47,628 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:8294,5,main] java.lang.NullPointerException at org.apache.cassandra.locator.PropertyFileSnitch.getDatacenter(PropertyFileSnitch.java:104) at com.datastax.bdp.snitch.DseDelegateSnitch.getDatacenter(DseDelegateSnitch.java:69) at org.apache.cassandra.locator.DynamicEndpointSnitch.getDatacenter(DynamicEndpointSnitch.java:122) at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:93) at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1984) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1972) at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:262) at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:248) at org.apache.cassandra.service.StorageProxy.applyCounterMutationOnLeader(StorageProxy.java:505) at org.apache.cassandra.db.CounterMutationVerbHandler.doVerb(CounterMutationVerbHandler.java:56) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:59) 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) ERROR [MutationStage:13164] 2012-09-25 22:19:06,486 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13164,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [Thrift:12] 2012-09-25 22:19:07,433 Cassandra.java (line 3462) Internal error processing batch_mutate java.lang.NullPointerException ERROR [Thrift:16] 2012-09-25 22:19:07,437 Cassandra.java (line 2999) Internal error processing get java.lang.NullPointerException INFO [GossipStage:280] 2012-09-26 00:15:15,371 Gossiper.java (line 818) InetAddress /172.16.233.208 is now dead. ERROR [GossipStage:280] 2012-09-26 00:15:15,372 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:280,5,main] j ERROR [MutationStage:40529] 2012-09-26 00:15:21,527 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:40529,5,main] java.lang.NullPointerException INFO [GossipStage:281] 2012-09-26 00:15:23,013 Gossiper.java (line 818) InetAddress /172.16.232.159 is now dead. ERROR [GossipStage:281] 2012-09-26 00:15:23,014 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:281,5,main] -- 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 vestiges of Thrift unframed mode patch by jbellis; reviewed by brandonwilliams for CASSANDRA-4729
Updated Branches: refs/heads/trunk a0d7d9713 - 6ca75ef9b remove vestiges of Thrift unframed mode patch by jbellis; reviewed by brandonwilliams for CASSANDRA-4729 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6ca75ef9 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6ca75ef9 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6ca75ef9 Branch: refs/heads/trunk Commit: 6ca75ef9ba0fff52741f25b1b1350a0c10f17b68 Parents: a0d7d97 Author: Jonathan Ellis jbel...@apache.org Authored: Thu Sep 27 13:00:22 2012 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Thu Sep 27 15:25:07 2012 -0500 -- CHANGES.txt|1 + conf/cassandra.yaml|2 -- examples/hadoop_word_count/src/WordCountSetup.java |7 +++ src/java/org/apache/cassandra/cli/CliMain.java |9 + src/java/org/apache/cassandra/cli/CliOptions.java |9 - .../org/apache/cassandra/cli/CliSessionState.java |1 - .../cassandra/config/DatabaseDescriptor.java |6 ++ .../org/apache/cassandra/thrift/ThriftServer.java |2 +- .../src/org/apache/cassandra/stress/Session.java | 12 +--- 9 files changed, 9 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6ca75ef9/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index f50f368..6d044af 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 1.2-beta2 + * remove vestiges of Thrift unframed mode (CASSANDRA-4729) * optimize single-row PK lookups (CASSANDRA-4710) * adjust blockFor calculation to account for pending ranges due to node movement (CASSANDRA-833) http://git-wip-us.apache.org/repos/asf/cassandra/blob/6ca75ef9/conf/cassandra.yaml -- diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml index 058cd81..cbcb7b2 100644 --- a/conf/cassandra.yaml +++ b/conf/cassandra.yaml @@ -368,8 +368,6 @@ rpc_server_type: sync # rpc_recv_buff_size_in_bytes: # Frame size for thrift (maximum field length). -# 0 disables TFramedTransport in favor of TSocket. This option -# is deprecated; we strongly recommend using Framed mode. thrift_framed_transport_size_in_mb: 15 # The max length of a thrift message, including all fields and http://git-wip-us.apache.org/repos/asf/cassandra/blob/6ca75ef9/examples/hadoop_word_count/src/WordCountSetup.java -- diff --git a/examples/hadoop_word_count/src/WordCountSetup.java b/examples/hadoop_word_count/src/WordCountSetup.java index e8711b2..6837bec 100644 --- a/examples/hadoop_word_count/src/WordCountSetup.java +++ b/examples/hadoop_word_count/src/WordCountSetup.java @@ -191,14 +191,13 @@ public class WordCountSetup logger.warn(cassandra.host or cassandra.port is not defined, using default); } return createConnection(System.getProperty(cassandra.host, localhost), - Integer.valueOf(System.getProperty(cassandra.port, 9160)), - Boolean.valueOf(System.getProperty(cassandra.framed, true))); + Integer.valueOf(System.getProperty(cassandra.port, 9160))); } -private static Cassandra.Client createConnection(String host, Integer port, boolean framed) throws TTransportException +private static Cassandra.Client createConnection(String host, Integer port) throws TTransportException { TSocket socket = new TSocket(host, port); -TTransport trans = framed ? new TFramedTransport(socket) : socket; +TTransport trans = new TFramedTransport(socket); trans.open(); TProtocol protocol = new TBinaryProtocol(trans); http://git-wip-us.apache.org/repos/asf/cassandra/blob/6ca75ef9/src/java/org/apache/cassandra/cli/CliMain.java -- diff --git a/src/java/org/apache/cassandra/cli/CliMain.java b/src/java/org/apache/cassandra/cli/CliMain.java index ac7a3c3..9a4edc9 100644 --- a/src/java/org/apache/cassandra/cli/CliMain.java +++ b/src/java/org/apache/cassandra/cli/CliMain.java @@ -61,14 +61,7 @@ public class CliMain if (transport != null) transport.close(); -if (sessionState.framed) -{ -transport = new TFramedTransport(socket); -} -else -{ -transport = socket; -} +transport = new TFramedTransport(socket); TBinaryProtocol binaryProtocol = new TBinaryProtocol(transport, true, true); Cassandra.Client
git commit: add PBSPredictor consistency modeler patch by Peter Bailis and Shivaram Venkataraman; reviewed by jbellis for CASSANDRA-4261
Updated Branches: refs/heads/trunk 6ca75ef9b - 0b94b191d add PBSPredictor consistency modeler patch by Peter Bailis and Shivaram Venkataraman; reviewed by jbellis for CASSANDRA-4261 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0b94b191 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0b94b191 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0b94b191 Branch: refs/heads/trunk Commit: 0b94b191d803f2a59e39c0e14fca45f5fb2ceb65 Parents: 6ca75ef Author: Jonathan Ellis jbel...@apache.org Authored: Thu Sep 27 15:28:25 2012 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Thu Sep 27 15:28:25 2012 -0500 -- CHANGES.txt|1 + build.xml |5 + .../org/apache/cassandra/net/MessagingService.java | 34 +- .../cassandra/service/PBSPredictionResult.java | 127 +++ .../org/apache/cassandra/service/PBSPredictor.java | 636 +++ .../cassandra/service/PBSPredictorMBean.java | 35 + .../apache/cassandra/service/StorageService.java |2 + src/java/org/apache/cassandra/tools/NodeCmd.java | 65 ++- src/java/org/apache/cassandra/tools/NodeProbe.java |8 + .../org/apache/cassandra/tools/NodeToolHelp.yaml |4 +- .../apache/cassandra/service/PBSPredictorTest.java | 114 +++ 11 files changed, 1023 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/0b94b191/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 6d044af..fa8b8cb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 1.2-beta2 + * add PBSPredictor consistency modeler (CASSANDRA-4261) * remove vestiges of Thrift unframed mode (CASSANDRA-4729) * optimize single-row PK lookups (CASSANDRA-4710) * adjust blockFor calculation to account for pending ranges due to node http://git-wip-us.apache.org/repos/asf/cassandra/blob/0b94b191/build.xml -- diff --git a/build.xml b/build.xml index 1477a4a..7c288cc 100644 --- a/build.xml +++ b/build.xml @@ -1134,6 +1134,11 @@ /testmacro /target + target name=pbs-test depends=build-test description=Tests PBS predictor +testmacro suitename=unit inputdir=${test.unit.src} + timeout=15000 filter=**/PBSPredictorTest.java/ + /target + target name=long-test depends=build-test description=Execute functional tests testmacro suitename=long inputdir=${test.long.src} timeout=${test.long.timeout} http://git-wip-us.apache.org/repos/asf/cassandra/blob/0b94b191/src/java/org/apache/cassandra/net/MessagingService.java -- diff --git a/src/java/org/apache/cassandra/net/MessagingService.java b/src/java/org/apache/cassandra/net/MessagingService.java index a2c5939..63d6e38 100644 --- a/src/java/org/apache/cassandra/net/MessagingService.java +++ b/src/java/org/apache/cassandra/net/MessagingService.java @@ -36,18 +36,17 @@ import javax.management.ObjectName; import com.google.common.base.Function; import com.google.common.collect.Lists; -import org.cliffc.high_scale_lib.NonBlockingHashMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor; import org.apache.cassandra.concurrent.Stage; import org.apache.cassandra.concurrent.StageManager; -import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.cassandra.config.DatabaseDescriptor; import org.apache.cassandra.config.EncryptionOptions; import org.apache.cassandra.db.*; import org.apache.cassandra.dht.BootStrapper; +import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.cassandra.gms.GossipDigestAck; import org.apache.cassandra.gms.GossipDigestAck2; import org.apache.cassandra.gms.GossipDigestSyn; @@ -58,14 +57,12 @@ import org.apache.cassandra.metrics.ConnectionMetrics; import org.apache.cassandra.metrics.DroppedMessageMetrics; import org.apache.cassandra.net.sink.SinkManager; import org.apache.cassandra.security.SSLFactory; -import org.apache.cassandra.service.AntiEntropyService; -import org.apache.cassandra.service.MigrationManager; -import org.apache.cassandra.service.StorageProxy; -import org.apache.cassandra.service.StorageService; +import org.apache.cassandra.service.*; import org.apache.cassandra.streaming.*; import org.apache.cassandra.streaming.compress.CompressedFileStreamTask; import org.apache.cassandra.tracing.Tracing; import org.apache.cassandra.utils.*; +import org.cliffc.high_scale_lib.NonBlockingHashMap; public final class MessagingService implements
[jira] [Commented] (CASSANDRA-4545) add cql support for batchlog
[ https://issues.apache.org/jira/browse/CASSANDRA-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13465059#comment-13465059 ] Aleksey Yeschenko commented on CASSANDRA-4545: -- If we end up allowing counter batches, which I don't want to do at all, then we should at least require explicit BEGIN COUNTER BATCH statement, this is where I agree with Sylvain. add cql support for batchlog Key: CASSANDRA-4545 URL: https://issues.apache.org/jira/browse/CASSANDRA-4545 Project: Cassandra Issue Type: Sub-task Reporter: Jonathan Ellis Assignee: Aleksey Yeschenko Attachments: CASSANDRA-4545.txt Need to expose the equivalent of atomic_batch_mutate (CASSANDRA-4542) to 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-4545) add cql support for batchlog
[ https://issues.apache.org/jira/browse/CASSANDRA-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13465062#comment-13465062 ] Jonathan Ellis commented on CASSANDRA-4545: --- I'll buy that we should do it for performance, or we force counter users to stay on Thrift. add cql support for batchlog Key: CASSANDRA-4545 URL: https://issues.apache.org/jira/browse/CASSANDRA-4545 Project: Cassandra Issue Type: Sub-task Reporter: Jonathan Ellis Assignee: Aleksey Yeschenko Attachments: CASSANDRA-4545.txt Need to expose the equivalent of atomic_batch_mutate (CASSANDRA-4542) to 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-4545) add cql support for batchlog
[ https://issues.apache.org/jira/browse/CASSANDRA-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13465067#comment-13465067 ] Aleksey Yeschenko commented on CASSANDRA-4545: -- Yes, batch_mutate still allows counter mutations and that shouldn't be changed. atomic_batch_mutate rejected them since day one. If someone really needs that performance then there is always thrift (and for now - cql2, too). And cql can be used for everything else. I doubt counter mutations in batches are used by many people anyway, especially with cql. add cql support for batchlog Key: CASSANDRA-4545 URL: https://issues.apache.org/jira/browse/CASSANDRA-4545 Project: Cassandra Issue Type: Sub-task Reporter: Jonathan Ellis Assignee: Aleksey Yeschenko Attachments: CASSANDRA-4545.txt Need to expose the equivalent of atomic_batch_mutate (CASSANDRA-4542) to 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-4545) add cql support for batchlog
[ https://issues.apache.org/jira/browse/CASSANDRA-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13465070#comment-13465070 ] Jonathan Ellis commented on CASSANDRA-4545: --- To clarify: moving people away from Thrift is a Good Thing, so my position is we should support batched counters so cql3 is a realistic option for counter users. add cql support for batchlog Key: CASSANDRA-4545 URL: https://issues.apache.org/jira/browse/CASSANDRA-4545 Project: Cassandra Issue Type: Sub-task Reporter: Jonathan Ellis Assignee: Aleksey Yeschenko Attachments: CASSANDRA-4545.txt Need to expose the equivalent of atomic_batch_mutate (CASSANDRA-4542) to 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-4545) add cql support for batchlog
[ https://issues.apache.org/jira/browse/CASSANDRA-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13465074#comment-13465074 ] Aleksey Yeschenko commented on CASSANDRA-4545: -- Right. Still don't want to do that. But I'm outnumbered here. All right. So BEGIN COUNTER BATCH it is, an option that allows counters. Should COUNTER BATCH reject regular row mutations? I don't see why it should, but need your opinion on this. add cql support for batchlog Key: CASSANDRA-4545 URL: https://issues.apache.org/jira/browse/CASSANDRA-4545 Project: Cassandra Issue Type: Sub-task Reporter: Jonathan Ellis Assignee: Aleksey Yeschenko Attachments: CASSANDRA-4545.txt Need to expose the equivalent of atomic_batch_mutate (CASSANDRA-4542) to 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-4728) NPE with some load of writes, but possible snitch setting issue for a cluster
[ https://issues.apache.org/jira/browse/CASSANDRA-4728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-4728: -- Attachment: 4728.txt attached, with extra assert for good measure. NPE with some load of writes, but possible snitch setting issue for a cluster - Key: CASSANDRA-4728 URL: https://issues.apache.org/jira/browse/CASSANDRA-4728 Project: Cassandra Issue Type: Bug Affects Versions: 1.0.10 Reporter: Alex Liu Priority: Critical Attachments: 4728.txt The following errors are showing under height load ERROR [MutationStage:8294] 2012-09-25 22:01:47,628 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:8294,5,main] java.lang.NullPointerException at org.apache.cassandra.locator.PropertyFileSnitch.getDatacenter(PropertyFileSnitch.java:104) at com.datastax.bdp.snitch.DseDelegateSnitch.getDatacenter(DseDelegateSnitch.java:69) at org.apache.cassandra.locator.DynamicEndpointSnitch.getDatacenter(DynamicEndpointSnitch.java:122) at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:93) at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1984) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1972) at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:262) at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:248) at org.apache.cassandra.service.StorageProxy.applyCounterMutationOnLeader(StorageProxy.java:505) at org.apache.cassandra.db.CounterMutationVerbHandler.doVerb(CounterMutationVerbHandler.java:56) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:59) 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) ERROR [MutationStage:13164] 2012-09-25 22:19:06,486 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13164,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [Thrift:12] 2012-09-25 22:19:07,433 Cassandra.java (line 3462) Internal error processing batch_mutate java.lang.NullPointerException ERROR [Thrift:16] 2012-09-25 22:19:07,437 Cassandra.java (line 2999) Internal error processing get java.lang.NullPointerException INFO [GossipStage:280] 2012-09-26 00:15:15,371 Gossiper.java (line 818) InetAddress /172.16.233.208 is now dead. ERROR [GossipStage:280] 2012-09-26 00:15:15,372 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:280,5,main] j ERROR [MutationStage:40529] 2012-09-26 00:15:21,527 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:40529,5,main] java.lang.NullPointerException INFO [GossipStage:281] 2012-09-26 00:15:23,013 Gossiper.java (line 818) InetAddress /172.16.232.159 is now dead. ERROR [GossipStage:281] 2012-09-26 00:15:23,014 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:281,5,main] -- 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-4545) add cql support for batchlog
[ https://issues.apache.org/jira/browse/CASSANDRA-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13465088#comment-13465088 ] Jonathan Ellis commented on CASSANDRA-4545: --- IMO it should reject them, since there is no reason to allow them. :) add cql support for batchlog Key: CASSANDRA-4545 URL: https://issues.apache.org/jira/browse/CASSANDRA-4545 Project: Cassandra Issue Type: Sub-task Reporter: Jonathan Ellis Assignee: Aleksey Yeschenko Attachments: CASSANDRA-4545.txt Need to expose the equivalent of atomic_batch_mutate (CASSANDRA-4542) to 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-4310) Multiple independent Level Compactions in Parallel
[ https://issues.apache.org/jira/browse/CASSANDRA-4310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yuki Morishita updated CASSANDRA-4310: -- Attachment: 4310-v2.txt v2 attached. In this version, LeveledCompactionTask can run in parallel using CompactionExecutor. CM#submitBackground submits task when submitted CF is not currently compacting, and it fills up threads with compaction task when there is room. Multiple independent Level Compactions in Parallel -- Key: CASSANDRA-4310 URL: https://issues.apache.org/jira/browse/CASSANDRA-4310 Project: Cassandra Issue Type: New Feature Components: Core Affects Versions: 1.0.0 Reporter: sankalp kohli Assignee: Yuki Morishita Labels: compaction, features, leveled, performance, ssd Fix For: 1.2.1 Attachments: 4310.txt, 4310-v2.txt Problem: If you are inserting data into cassandra and level compaction cannot catchup, you will create lot of files in L0. Here is a solution which will help here and also increase the performance of level compaction. We can do many compactions in parallel for unrelated data. 1) For no over lapping levels. Ex: when L0 stable is compacting with L1, we can do compactions in other levels like L2 and L3 if they are eligible. 2) We can also do compactions with files in L1 which are not participating in L0 compactions. This is specially useful if you are using SSD and is not bottlenecked by IO. I am seeing this issue in my cluster. The compactions pending are more than 50k and the disk usage is not that much(I am using SSD). I am doing multithreaded to true and also not throttling the IO by putting the value as 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-4608) Add thrift server factory to CassandraDaemon
[ https://issues.apache.org/jira/browse/CASSANDRA-4608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Brown updated CASSANDRA-4608: --- Attachment: 4608_cassandra-1.2.patch rebased 4608_cassandra-1.1.patch and created 4608_cassandra-1.2.patch against trunk. Add thrift server factory to CassandraDaemon Key: CASSANDRA-4608 URL: https://issues.apache.org/jira/browse/CASSANDRA-4608 Project: Cassandra Issue Type: Sub-task Reporter: T Jake Luciani Assignee: Jason Brown Fix For: 1.1.6, 1.2.0 beta 2 Attachments: 0002-CASSANDRA-4608-Add-thrift-server-factory-to-Cassandr.patch, 4608_cassandra-1.1.patch, 4608_cassandra-1.2.patch Add factory class for CassandraServer Default impl will be the current thrift server types. -- 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-4608) Add thrift server factory to CassandraDaemon
[ https://issues.apache.org/jira/browse/CASSANDRA-4608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Brown updated CASSANDRA-4608: --- Fix Version/s: 1.2.0 beta 2 Add thrift server factory to CassandraDaemon Key: CASSANDRA-4608 URL: https://issues.apache.org/jira/browse/CASSANDRA-4608 Project: Cassandra Issue Type: Sub-task Reporter: T Jake Luciani Assignee: Jason Brown Fix For: 1.1.6, 1.2.0 beta 2 Attachments: 0002-CASSANDRA-4608-Add-thrift-server-factory-to-Cassandr.patch, 4608_cassandra-1.1.patch, 4608_cassandra-1.2.patch Add factory class for CassandraServer Default impl will be the current thrift server types. -- 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-4728) NPE with some load of writes, but possible snitch setting issue for a cluster
[ https://issues.apache.org/jira/browse/CASSANDRA-4728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13465130#comment-13465130 ] Brandon Williams commented on CASSANDRA-4728: - +1 NPE with some load of writes, but possible snitch setting issue for a cluster - Key: CASSANDRA-4728 URL: https://issues.apache.org/jira/browse/CASSANDRA-4728 Project: Cassandra Issue Type: Bug Affects Versions: 1.0.10 Reporter: Alex Liu Priority: Critical Attachments: 4728.txt The following errors are showing under height load ERROR [MutationStage:8294] 2012-09-25 22:01:47,628 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:8294,5,main] java.lang.NullPointerException at org.apache.cassandra.locator.PropertyFileSnitch.getDatacenter(PropertyFileSnitch.java:104) at com.datastax.bdp.snitch.DseDelegateSnitch.getDatacenter(DseDelegateSnitch.java:69) at org.apache.cassandra.locator.DynamicEndpointSnitch.getDatacenter(DynamicEndpointSnitch.java:122) at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:93) at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1984) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1972) at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:262) at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:248) at org.apache.cassandra.service.StorageProxy.applyCounterMutationOnLeader(StorageProxy.java:505) at org.apache.cassandra.db.CounterMutationVerbHandler.doVerb(CounterMutationVerbHandler.java:56) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:59) 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) ERROR [MutationStage:13164] 2012-09-25 22:19:06,486 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13164,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [MutationStage:13170] 2012-09-25 22:19:07,349 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:13170,5,main] java.lang.NullPointerException ERROR [Thrift:12] 2012-09-25 22:19:07,433 Cassandra.java (line 3462) Internal error processing batch_mutate java.lang.NullPointerException ERROR [Thrift:16] 2012-09-25 22:19:07,437 Cassandra.java (line 2999) Internal error processing get java.lang.NullPointerException INFO [GossipStage:280] 2012-09-26 00:15:15,371 Gossiper.java (line 818) InetAddress /172.16.233.208 is now dead. ERROR [GossipStage:280] 2012-09-26 00:15:15,372 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:280,5,main] j ERROR [MutationStage:40529] 2012-09-26 00:15:21,527 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:40529,5,main] java.lang.NullPointerException INFO [GossipStage:281] 2012-09-26 00:15:23,013 Gossiper.java (line 818) InetAddress /172.16.232.159 is now dead. ERROR [GossipStage:281] 2012-09-26 00:15:23,014 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[GossipStage:281,5,main] -- 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: display elapsed time in 2 fraction digits in cli; patch by Radim Kolar, reviewed by yukim for CASSANDRA-3460
display elapsed time in 2 fraction digits in cli; patch by Radim Kolar, reviewed by yukim for CASSANDRA-3460 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c7ce11f0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c7ce11f0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c7ce11f0 Branch: refs/heads/trunk Commit: c7ce11f0031c81311a359de03380860fa4e366a5 Parents: 93bd3d8 Author: Yuki Morishita yu...@apache.org Authored: Thu Sep 27 16:57:37 2012 -0500 Committer: Yuki Morishita yu...@apache.org Committed: Thu Sep 27 16:57:37 2012 -0500 -- CHANGES.txt |1 + src/java/org/apache/cassandra/cli/CliClient.java | 28 +--- 2 files changed, 23 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7ce11f0/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index e48fbfd..f598aa2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,7 @@ * fix error when using ORDER BY with extended selections (CASSANDRA-4689) * (CQL3) Fix validation for IN queries for non-PK cols (CASSANDRA-4709) * fix re-created keyspace disappering after 1.1.5 upgrade (CASSANDRA-4698) + * (CLI) display elapsed time in 2 fraction digits (CASSANDRA-3460) Merged from 1.0: * Switch from NBHM to CHM in MessagingService's callback map, which prevents OOM in long-running instances (CASSANDRA-4708) http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7ce11f0/src/java/org/apache/cassandra/cli/CliClient.java -- diff --git a/src/java/org/apache/cassandra/cli/CliClient.java b/src/java/org/apache/cassandra/cli/CliClient.java index d0fb543..b32b0f7 100644 --- a/src/java/org/apache/cassandra/cli/CliClient.java +++ b/src/java/org/apache/cassandra/cli/CliClient.java @@ -461,7 +461,7 @@ public class CliClient throws InvalidRequestException, UnavailableException, TimedOutException, TException, IllegalAccessException, NotFoundException, InstantiationException, NoSuchFieldException { -long startTime = System.currentTimeMillis(); +long startTime = System.nanoTime(); ColumnParent parent = new ColumnParent(columnFamily); if(superColumnName != null) parent.setSuper_column(superColumnName); @@ -565,7 +565,7 @@ public class CliClient { if (!CliMain.isConnected() || !hasKeySpace()) return; -long startTime = System.currentTimeMillis(); +long startTime = System.nanoTime(); Tree columnFamilySpec = statement.getChild(0); String columnFamily = CliCompiler.getColumnFamily(columnFamilySpec, keyspacesMap.get(keySpace).cf_defs); ByteBuffer key = getKeyAsBytes(columnFamily, columnFamilySpec.getChild(1)); @@ -734,7 +734,7 @@ public class CliClient if (!CliMain.isConnected() || !hasKeySpace()) return; -long startTime = System.currentTimeMillis(); +long startTime = System.nanoTime(); IndexClause clause = new IndexClause(); String columnFamily = CliCompiler.getColumnFamily(statement, keyspacesMap.get(keySpace).cf_defs); @@ -828,7 +828,7 @@ public class CliClient if (!CliMain.isConnected() || !hasKeySpace()) return; -long startTime = System.currentTimeMillis(); +long startTime = System.nanoTime(); // ^(NODE_COLUMN_ACCESS cf key column) Tree columnFamilySpec = statement.getChild(0); Tree keyTree = columnFamilySpec.getChild(1); // could be a function or regular text @@ -1323,7 +1323,7 @@ public class CliClient if (!CliMain.isConnected() || !hasKeySpace()) return; -long startTime = System.currentTimeMillis(); +long startTime = System.nanoTime(); // extract column family String columnFamily = CliCompiler.getColumnFamily(statement, keyspacesMap.get(keySpace).cf_defs); @@ -2968,9 +2968,25 @@ public class CliClient return false; } +/** + * Print elapsed time. Print 2 fraction digits if eta is under 10 ms. + * @param startTime starting time in nanoseconds + */ private void elapsedTime(long startTime) { -sessionState.out.println(Elapsed time: + (System.currentTimeMillis() - startTime) + msec(s).); +/** time elapsed in nanoseconds */ +long eta = System.nanoTime() - startTime; + +sessionState.out.print(Elapsed time: ); +if (eta 1000) +{ +sessionState.out.print(Math.round(eta/1.0)/100.0); +} +else +{ +
[3/3] git commit: display elapsed time in 2 fraction digits in cli; patch by Radim Kolar, reviewed by yukim for CASSANDRA-3460
display elapsed time in 2 fraction digits in cli; patch by Radim Kolar, reviewed by yukim for CASSANDRA-3460 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c7ce11f0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c7ce11f0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c7ce11f0 Branch: refs/heads/cassandra-1.1 Commit: c7ce11f0031c81311a359de03380860fa4e366a5 Parents: 93bd3d8 Author: Yuki Morishita yu...@apache.org Authored: Thu Sep 27 16:57:37 2012 -0500 Committer: Yuki Morishita yu...@apache.org Committed: Thu Sep 27 16:57:37 2012 -0500 -- CHANGES.txt |1 + src/java/org/apache/cassandra/cli/CliClient.java | 28 +--- 2 files changed, 23 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7ce11f0/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index e48fbfd..f598aa2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,7 @@ * fix error when using ORDER BY with extended selections (CASSANDRA-4689) * (CQL3) Fix validation for IN queries for non-PK cols (CASSANDRA-4709) * fix re-created keyspace disappering after 1.1.5 upgrade (CASSANDRA-4698) + * (CLI) display elapsed time in 2 fraction digits (CASSANDRA-3460) Merged from 1.0: * Switch from NBHM to CHM in MessagingService's callback map, which prevents OOM in long-running instances (CASSANDRA-4708) http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7ce11f0/src/java/org/apache/cassandra/cli/CliClient.java -- diff --git a/src/java/org/apache/cassandra/cli/CliClient.java b/src/java/org/apache/cassandra/cli/CliClient.java index d0fb543..b32b0f7 100644 --- a/src/java/org/apache/cassandra/cli/CliClient.java +++ b/src/java/org/apache/cassandra/cli/CliClient.java @@ -461,7 +461,7 @@ public class CliClient throws InvalidRequestException, UnavailableException, TimedOutException, TException, IllegalAccessException, NotFoundException, InstantiationException, NoSuchFieldException { -long startTime = System.currentTimeMillis(); +long startTime = System.nanoTime(); ColumnParent parent = new ColumnParent(columnFamily); if(superColumnName != null) parent.setSuper_column(superColumnName); @@ -565,7 +565,7 @@ public class CliClient { if (!CliMain.isConnected() || !hasKeySpace()) return; -long startTime = System.currentTimeMillis(); +long startTime = System.nanoTime(); Tree columnFamilySpec = statement.getChild(0); String columnFamily = CliCompiler.getColumnFamily(columnFamilySpec, keyspacesMap.get(keySpace).cf_defs); ByteBuffer key = getKeyAsBytes(columnFamily, columnFamilySpec.getChild(1)); @@ -734,7 +734,7 @@ public class CliClient if (!CliMain.isConnected() || !hasKeySpace()) return; -long startTime = System.currentTimeMillis(); +long startTime = System.nanoTime(); IndexClause clause = new IndexClause(); String columnFamily = CliCompiler.getColumnFamily(statement, keyspacesMap.get(keySpace).cf_defs); @@ -828,7 +828,7 @@ public class CliClient if (!CliMain.isConnected() || !hasKeySpace()) return; -long startTime = System.currentTimeMillis(); +long startTime = System.nanoTime(); // ^(NODE_COLUMN_ACCESS cf key column) Tree columnFamilySpec = statement.getChild(0); Tree keyTree = columnFamilySpec.getChild(1); // could be a function or regular text @@ -1323,7 +1323,7 @@ public class CliClient if (!CliMain.isConnected() || !hasKeySpace()) return; -long startTime = System.currentTimeMillis(); +long startTime = System.nanoTime(); // extract column family String columnFamily = CliCompiler.getColumnFamily(statement, keyspacesMap.get(keySpace).cf_defs); @@ -2968,9 +2968,25 @@ public class CliClient return false; } +/** + * Print elapsed time. Print 2 fraction digits if eta is under 10 ms. + * @param startTime starting time in nanoseconds + */ private void elapsedTime(long startTime) { -sessionState.out.println(Elapsed time: + (System.currentTimeMillis() - startTime) + msec(s).); +/** time elapsed in nanoseconds */ +long eta = System.nanoTime() - startTime; + +sessionState.out.print(Elapsed time: ); +if (eta 1000) +{ +sessionState.out.print(Math.round(eta/1.0)/100.0); +} +else +{ +
[1/3] git commit: Merge branch 'cassandra-1.1' into trunk
Updated Branches: refs/heads/cassandra-1.1 93bd3d896 - c7ce11f00 refs/heads/trunk 0b94b191d - 29353b8aa Merge branch 'cassandra-1.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/29353b8a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/29353b8a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/29353b8a Branch: refs/heads/trunk Commit: 29353b8aa230db77f173dde334be9531ad32bdf0 Parents: 0b94b19 c7ce11f Author: Yuki Morishita yu...@apache.org Authored: Thu Sep 27 16:57:51 2012 -0500 Committer: Yuki Morishita yu...@apache.org Committed: Thu Sep 27 16:59:33 2012 -0500 -- CHANGES.txt |1 + src/java/org/apache/cassandra/cli/CliClient.java | 30 + 2 files changed, 24 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/29353b8a/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/29353b8a/src/java/org/apache/cassandra/cli/CliClient.java -- diff --cc src/java/org/apache/cassandra/cli/CliClient.java index 0c3e133,b32b0f7..87981fe --- a/src/java/org/apache/cassandra/cli/CliClient.java +++ b/src/java/org/apache/cassandra/cli/CliClient.java @@@ -398,8 -402,6 +398,8 @@@ public class CliClien return; } - long startTime = System.currentTimeMillis(); ++long startTime = System.nanoTime(); + Tree columnTree = (columnSpecCnt = 1) ? columnFamilySpec.getChild(2) : null; @@@ -2930,11 -2968,27 +2930,27 @@@ return false; } + /** + * Print elapsed time. Print 2 fraction digits if eta is under 10 ms. + * @param startTime starting time in nanoseconds + */ private void elapsedTime(long startTime) { - sessionState.out.println(Elapsed time: + (System.currentTimeMillis() - startTime) + msec(s).); + /** time elapsed in nanoseconds */ + long eta = System.nanoTime() - startTime; + + sessionState.out.print(Elapsed time: ); + if (eta 1000) + { + sessionState.out.print(Math.round(eta/1.0)/100.0); + } + else + { + sessionState.out.print(Math.round(eta/100.0)); + } + sessionState.out.println( msec(s).); } - + class CfAssumptions { //MapKeySpace, MapColumnFamily, MapProperty, Value
[jira] [Commented] (CASSANDRA-3460) Increase precision of elapsed time in casandra-cli
[ https://issues.apache.org/jira/browse/CASSANDRA-3460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13465169#comment-13465169 ] Hudson commented on CASSANDRA-3460: --- Integrated in Cassandra #2192 (See [https://builds.apache.org/job/Cassandra/2192/]) display elapsed time in 2 fraction digits in cli; patch by Radim Kolar, reviewed by yukim for CASSANDRA-3460 (Revision c7ce11f0031c81311a359de03380860fa4e366a5) Result = ABORTED yukim : Files : * src/java/org/apache/cassandra/cli/CliClient.java * CHANGES.txt Increase precision of elapsed time in casandra-cli -- Key: CASSANDRA-3460 URL: https://issues.apache.org/jira/browse/CASSANDRA-3460 Project: Cassandra Issue Type: Improvement Components: Tools Reporter: Radim Kolar Assignee: Radim Kolar Priority: Minor Labels: cli Fix For: 1.1.6 Attachments: cassandra-nanoseconds.txt Cassandra often return response in less then 1 ms from another datacenter [default@test] get sipdb[23]; Returned 0 results. Elapsed time: 219 msec(s). from own dataceter [default@test] get sipdb[13]; Returned 0 results. Elapsed time: 0 msec(s). Precession of this timer needs to be increased a bit, while looking at network latency adding 1 number should be enough like : 0.2 ms should be sufficient. It would be good to display sub milliseconds only if time elapsed is 1 ms. -- 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-4730) CommitLogReplayer should report the bad CRC checksum in the log
Arya Goudarzi created CASSANDRA-4730: Summary: CommitLogReplayer should report the bad CRC checksum in the log Key: CASSANDRA-4730 URL: https://issues.apache.org/jira/browse/CASSANDRA-4730 Project: Cassandra Issue Type: Bug Affects Versions: 1.1.5 Environment: Cassandra 1.1.5 Reporter: Arya Goudarzi If commit log isn't fully fsynced, the record which fails the checksum is not replayed do this logic. It would be beneficial to log that as an error so that user can know easily what happened. ./src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java line 188 of 287 --65%-- col 54 -- 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-4687) Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)
[ https://issues.apache.org/jira/browse/CASSANDRA-4687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13465299#comment-13465299 ] Tyler Patterson commented on CASSANDRA-4687: I just spent a day trying to reproduce this error, to no avail. Here is what I tried for reference: I wrote a python stress script, then ran it in 50 threads from 3 different EC2 instances, all stressing one EC2 node running cassandra-1.1.5. The processor load on the cassandra node was pegged at 100% (or very close to) the entire time each test was running. The first version of the python stress script created text keys varying in length up to 1 chars. It inserted and read one key at a time, where keys were randomly chosen from a pool of 10,000,000 keys. Cassandra had a key_cache size of 10mb. This test used cql, and inserted and read one key and column at a time. The second version of the stress script worked the same as the first, but used pycassa. Version 3 also used pycassa, but did batch_insert and multiget, each with 1000 keys at a time. It also deleted a random key after every batch_insert and multiget. For this test I also ran cassandra-stress --operation=COUNTER_ADD and cassandra-stress --operation-COUNTER_GET version 4 was the similar to version 3, but used int32 keys instead of text. I played with some other settings like key_cache and compaction_strategy_class during some of the tests. I never was able to get the error to happen. Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk) --- Key: CASSANDRA-4687 URL: https://issues.apache.org/jira/browse/CASSANDRA-4687 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.5 Environment: CentOS 6.3 64-bit, Oracle JRE 1.6.0.33 64-bit, single node cluster Reporter: Leonid Shalupov Assignee: Pavel Yaskevich Priority: Critical Fix For: 1.1.6 Attachments: 4687-debugging.txt Under heavy write load sometimes cassandra fails with assertion error. git bisect leads to commit 295aedb278e7a495213241b66bc46d763fd4ce66. works fine if global key/row caches disabled in code. {quote} java.lang.AssertionError: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk) in /var/lib/cassandra/data/...-he-1-Data.db at org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:60) at org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:67) at org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79) at org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256) at org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64) at org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345) at org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1207) at org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1142) at org.apache.cassandra.db.Table.getRow(Table.java:378) at org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:69) at org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:819) at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1253) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) {quote} -- 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-4545) add cql support for batchlog
[ https://issues.apache.org/jira/browse/CASSANDRA-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13465389#comment-13465389 ] Sylvain Lebresne commented on CASSANDRA-4545: - bq. Should COUNTER BATCH reject regular row mutations? I don't see why it should Agreed, it should reject them. add cql support for batchlog Key: CASSANDRA-4545 URL: https://issues.apache.org/jira/browse/CASSANDRA-4545 Project: Cassandra Issue Type: Sub-task Reporter: Jonathan Ellis Assignee: Aleksey Yeschenko Attachments: CASSANDRA-4545.txt Need to expose the equivalent of atomic_batch_mutate (CASSANDRA-4542) to 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