You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ty...@apache.org on 2014/06/25 17:44:04 UTC

[1/7] git commit: Fix CompositeType columns in DESCRIBE TABLE output

Repository: cassandra
Updated Branches:
  refs/heads/trunk a06fc1e54 -> d583c9dca


Fix CompositeType columns in DESCRIBE TABLE output

Patch by Mikhail Stepura; reviewed by Tyler Hobbs for CASSANDRA-7399


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

Branch: refs/heads/trunk
Commit: 66e1e4610983d827b8d120b44d1709c406d8bf9b
Parents: e39e9e5
Author: Mikhail Stepura <mi...@apache.org>
Authored: Wed Jun 25 09:52:08 2014 -0500
Committer: Tyler Hobbs <ty...@datastax.com>
Committed: Wed Jun 25 09:52:08 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt | 1 +
 bin/cqlsh   | 2 ++
 2 files changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/66e1e461/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f837515..6adef97 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.17
+ * cqlsh: Fix CompositeType columns in DESCRIBE TABLE output (CASSANDRA-7399)
  * Expose global ColmunFamily metrics (CASSANDRA-7273)
  * Handle possible integer overflow in FastByteArrayOutputStream (CASSANDRA-7373)
  * cqlsh: 'ascii' values weren't formatted as text (CASSANDRA-7407)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/66e1e461/bin/cqlsh
----------------------------------------------------------------------
diff --git a/bin/cqlsh b/bin/cqlsh
index cec9aac..bb0ffdf 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -552,6 +552,8 @@ class Shell(cmd.Cmd):
         self.stdin = stdin
         self.query_out = sys.stdout
         self.statement_error = False
+        # see CASSANDRA-7399
+        cql.cqltypes.CompositeType.cql_parameterized_type = classmethod(lambda cls: "'%s'" % cls.cass_parameterized_type_with(cls.subtypes, True))
 
     def set_expanded_cql_version(self, ver):
         ver, vertuple = full_cql_version(ver)


[2/7] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0

Posted by ty...@apache.org.
Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
	CHANGES.txt
	bin/cqlsh


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

Branch: refs/heads/trunk
Commit: c656ffe4d32db92bd95be001745b857cc6c0962b
Parents: 94ff639 66e1e46
Author: Tyler Hobbs <ty...@datastax.com>
Authored: Wed Jun 25 09:54:20 2014 -0500
Committer: Tyler Hobbs <ty...@datastax.com>
Committed: Wed Jun 25 09:54:20 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt | 1 +
 bin/cqlsh   | 2 ++
 2 files changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c656ffe4/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index d23ce37,6adef97..1ff5675
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,27 -1,6 +1,28 @@@
 -1.2.17
 +2.0.9
 + * Fix assertion error in CL.ANY timeout handling (CASSANDRA-7364)
 + * Handle empty CFs in Memtable#maybeUpdateLiveRatio() (CASSANDRA-7401)
 + * Fix native protocol CAS batches (CASSANDRA-7337)
 + * Add per-CF range read request latency metrics (CASSANDRA-7338)
 + * Fix NPE in StreamTransferTask.createMessageForRetry() (CASSANDRA-7323)
 + * Add conditional CREATE/DROP USER support (CASSANDRA-7264)
 + * Swap local and global default read repair chances (CASSANDRA-7320)
 + * Add missing iso8601 patterns for date strings (CASSANDRA-6973)
 + * Support selecting multiple rows in a partition using IN (CASSANDRA-6875)
 + * cqlsh: always emphasize the partition key in DESC output (CASSANDRA-7274)
 + * Copy compaction options to make sure they are reloaded (CASSANDRA-7290)
 + * Add option to do more aggressive tombstone compactions (CASSANDRA-6563)
 + * Don't try to compact already-compacting files in HHOM (CASSANDRA-7288)
 + * Add authentication support to shuffle (CASSANDRA-6484)
 + * Cqlsh counts non-empty lines for "Blank lines" warning (CASSANDRA-7325)
 + * Make StreamSession#closeSession() idempotent (CASSANDRA-7262)
 + * Fix infinite loop on exception while streaming (CASSANDRA-7330)
 + * Reference sstables before populating key cache (CASSANDRA-7234)
 + * Account for range tombstones in min/max column names (CASSANDRA-7235)
 + * Improve sub range repair validation (CASSANDRA-7317)
 + * Accept subtypes for function results, type casts (CASSANDRA-6766)
 +Merged from 1.2:
 + * Expose global ColumnFamily metrics (CASSANDRA-7273)
+  * cqlsh: Fix CompositeType columns in DESCRIBE TABLE output (CASSANDRA-7399)
 - * Expose global ColmunFamily metrics (CASSANDRA-7273)
   * Handle possible integer overflow in FastByteArrayOutputStream (CASSANDRA-7373)
   * cqlsh: 'ascii' values weren't formatted as text (CASSANDRA-7407)
   * cqlsh: ignore .cassandra permission errors (CASSANDRA-7266)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c656ffe4/bin/cqlsh
----------------------------------------------------------------------
diff --cc bin/cqlsh
index 5484021,bb0ffdf..360c64e
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@@ -524,9 -551,9 +524,11 @@@ class Shell(cmd.Cmd)
              self.show_line_nums = True
          self.stdin = stdin
          self.query_out = sys.stdout
 +        self.empty_lines = 0
          self.statement_error = False
 +        self.single_statement = single_statement
+         # see CASSANDRA-7399
+         cql.cqltypes.CompositeType.cql_parameterized_type = classmethod(lambda cls: "'%s'" % cls.cass_parameterized_type_with(cls.subtypes, True))
  
      def set_expanded_cql_version(self, ver):
          ver, vertuple = full_cql_version(ver)


[5/7] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0

Posted by ty...@apache.org.
Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
	src/java/org/apache/cassandra/config/DatabaseDescriptor.java
	src/java/org/apache/cassandra/service/StorageService.java


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

Branch: refs/heads/trunk
Commit: 2ab7b07accf43c6831339ad80646220d9c1821ae
Parents: c656ffe d84b692
Author: Tyler Hobbs <ty...@datastax.com>
Authored: Wed Jun 25 10:40:35 2014 -0500
Committer: Tyler Hobbs <ty...@datastax.com>
Committed: Wed Jun 25 10:40:35 2014 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 2 --
 src/java/org/apache/cassandra/service/StorageService.java    | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2ab7b07a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2ab7b07a/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/service/StorageService.java
index 13dd3b7,1f3d1e1..77ad4f0
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@@ -627,64 -597,50 +627,66 @@@ public class StorageService extends Not
          }
      }
  
 -    private void joinTokenRing(int delay) throws ConfigurationException
 +    private boolean shouldBootstrap()
      {
 -        joined = true;
 +        return DatabaseDescriptor.isAutoBootstrap() && !SystemKeyspace.bootstrapComplete() && !DatabaseDescriptor.getSeeds().contains(FBUtilities.getBroadcastAddress());
 +    }
  
 -        Collection<Token> tokens = null;
 -        Map<ApplicationState, VersionedValue> appStates = new HashMap<ApplicationState, VersionedValue>();
 -
 -        if (DatabaseDescriptor.getReplaceTokens().size() > 0 || DatabaseDescriptor.getReplaceNode() != null)
 -            throw new RuntimeException("Replace method removed; use cassandra.replace_address instead");
 -        if (DatabaseDescriptor.isReplacing())
 -        {
 -            if (SystemTable.bootstrapComplete())
 -                throw new RuntimeException("Cannot replace address with a node that is already bootstrapped");
 -            if (!DatabaseDescriptor.isAutoBootstrap())
 -                throw new RuntimeException("Trying to replace_address with auto_bootstrap disabled will not work, check your configuration");
 -            tokens = prepareReplacementInfo();
 -            appStates.put(ApplicationState.STATUS, valueFactory.hibernate(true));
 -            appStates.put(ApplicationState.TOKENS, valueFactory.tokens(tokens));
 -        }
 -        // have to start the gossip service before we can see any info on other nodes.  this is necessary
 -        // for bootstrap to get the load info it needs.
 -        // (we won't be part of the storage ring though until we add a counterId to our state, below.)
 -        // Seed the host ID-to-endpoint map with our own ID.
 -        UUID localHostId = SystemTable.getLocalHostId();
 -        getTokenMetadata().updateHostId(localHostId, FBUtilities.getBroadcastAddress());
 -        appStates.put(ApplicationState.NET_VERSION, valueFactory.networkVersion());
 -        appStates.put(ApplicationState.HOST_ID, valueFactory.hostId(localHostId));
 -        appStates.put(ApplicationState.RPC_ADDRESS, valueFactory.rpcaddress(DatabaseDescriptor.getRpcAddress()));
 -        appStates.put(ApplicationState.RELEASE_VERSION, valueFactory.releaseVersion());
 -        logger.info("Starting up server gossip");
 -        Gossiper.instance.register(this);
 -        Gossiper.instance.start(SystemTable.incrementAndGetGeneration(), appStates); // needed for node-ring gathering.
 -        // gossip snitch infos (local DC and rack)
 -        gossipSnitchInfo();
 -        // gossip Schema.emptyVersion forcing immediate check for schema updates (see MigrationManager#maybeScheduleSchemaPull)
 -        Schema.instance.updateVersionAndAnnounce(); // Ensure we know our own actual Schema UUID in preparation for updates
 +    private void prepareToJoin() throws ConfigurationException
 +    {
 +        if (!joined)
 +        {
 +            Map<ApplicationState, VersionedValue> appStates = new HashMap<ApplicationState, VersionedValue>();
 +
 +            if (DatabaseDescriptor.isReplacing() && !(Boolean.parseBoolean(System.getProperty("cassandra.join_ring", "true"))))
 +                throw new ConfigurationException("Cannot set both join_ring=false and attempt to replace a node");
 +            if (DatabaseDescriptor.getReplaceTokens().size() > 0 || DatabaseDescriptor.getReplaceNode() != null)
 +                throw new RuntimeException("Replace method removed; use cassandra.replace_address instead");
 +            if (DatabaseDescriptor.isReplacing())
 +            {
++                if (SystemKeyspace.bootstrapComplete())
++                    throw new RuntimeException("Cannot replace address with a node that is already bootstrapped");
 +                if (!DatabaseDescriptor.isAutoBootstrap())
 +                    throw new RuntimeException("Trying to replace_address with auto_bootstrap disabled will not work, check your configuration");
 +                bootstrapTokens = prepareReplacementInfo();
 +                appStates.put(ApplicationState.STATUS, valueFactory.hibernate(true));
 +                appStates.put(ApplicationState.TOKENS, valueFactory.tokens(bootstrapTokens));
 +            }
 +            else if (shouldBootstrap())
 +            {
 +                checkForEndpointCollision();
 +            }
 +            // have to start the gossip service before we can see any info on other nodes.  this is necessary
 +            // for bootstrap to get the load info it needs.
 +            // (we won't be part of the storage ring though until we add a counterId to our state, below.)
 +            // Seed the host ID-to-endpoint map with our own ID.
 +            UUID localHostId = SystemKeyspace.getLocalHostId();
 +            getTokenMetadata().updateHostId(localHostId, FBUtilities.getBroadcastAddress());
 +            appStates.put(ApplicationState.NET_VERSION, valueFactory.networkVersion());
 +            appStates.put(ApplicationState.HOST_ID, valueFactory.hostId(localHostId));
 +            appStates.put(ApplicationState.RPC_ADDRESS, valueFactory.rpcaddress(DatabaseDescriptor.getRpcAddress()));
 +            appStates.put(ApplicationState.RELEASE_VERSION, valueFactory.releaseVersion());
 +            logger.info("Starting up server gossip");
 +            Gossiper.instance.register(this);
 +            Gossiper.instance.start(SystemKeyspace.incrementAndGetGeneration(), appStates); // needed for node-ring gathering.
 +            // gossip snitch infos (local DC and rack)
 +            gossipSnitchInfo();
 +            // gossip Schema.emptyVersion forcing immediate check for schema updates (see MigrationManager#maybeScheduleSchemaPull)
 +            Schema.instance.updateVersionAndAnnounce(); // Ensure we know our own actual Schema UUID in preparation for updates
  
  
 -        if (!MessagingService.instance().isListening())
 -            MessagingService.instance().listen(FBUtilities.getLocalAddress());
 -        LoadBroadcaster.instance.startBroadcasting();
 +            if (!MessagingService.instance().isListening())
 +                MessagingService.instance().listen(FBUtilities.getLocalAddress());
 +            LoadBroadcaster.instance.startBroadcasting();
 +
 +            HintedHandOffManager.instance.start();
 +            BatchlogManager.instance.start();
 +        }
 +    }
  
 -        HintedHandOffManager.instance.start();
 -        BatchlogManager.instance.start();
 +    private void joinTokenRing(int delay) throws ConfigurationException
 +    {
 +        joined = true;
  
          // We bootstrap if we haven't successfully bootstrapped before, as long as we are not a seed.
          // If we are a seed, or if the user manually sets auto_bootstrap to false,


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

Posted by ty...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/trunk
Commit: 1fb88c0b5ade4e7e6e9e8ed1f13fb9d102d99c3b
Parents: 82754e1 2ab7b07
Author: Tyler Hobbs <ty...@datastax.com>
Authored: Wed Jun 25 10:41:02 2014 -0500
Committer: Tyler Hobbs <ty...@datastax.com>
Committed: Wed Jun 25 10:41:02 2014 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 2 --
 src/java/org/apache/cassandra/service/StorageService.java    | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1fb88c0b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1fb88c0b/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------


[4/7] git commit: Fix replace_address after CASSANDRA-7356 broke it

Posted by ty...@apache.org.
Fix replace_address after CASSANDRA-7356 broke it

Patch by Tyler Hobbs and Marcus Eriksson; reviewed by Brandon Williams for CASSANDRA-7356


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

Branch: refs/heads/trunk
Commit: d84b692eb1cc0fbc55f047ec61c6a1c2cabe8b46
Parents: 66e1e46
Author: Tyler Hobbs <ty...@datastax.com>
Authored: Wed Jun 25 10:34:30 2014 -0500
Committer: Tyler Hobbs <ty...@datastax.com>
Committed: Wed Jun 25 10:34:30 2014 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 2 --
 src/java/org/apache/cassandra/service/StorageService.java    | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d84b692e/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 3c58b57..1e534f9 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -777,8 +777,6 @@ public class DatabaseDescriptor
             logger.info("Replace address on first boot requested; this node is already bootstrapped");
             return false;
         }
-        if (getReplaceAddress() != null && SystemTable.bootstrapComplete())
-            throw new RuntimeException("Cannot replace address with a node that is already bootstrapped");
         return getReplaceAddress() != null;
     }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d84b692e/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 449a371..1f3d1e1 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -608,6 +608,8 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
             throw new RuntimeException("Replace method removed; use cassandra.replace_address instead");
         if (DatabaseDescriptor.isReplacing())
         {
+            if (SystemTable.bootstrapComplete())
+                throw new RuntimeException("Cannot replace address with a node that is already bootstrapped");
             if (!DatabaseDescriptor.isAutoBootstrap())
                 throw new RuntimeException("Trying to replace_address with auto_bootstrap disabled will not work, check your configuration");
             tokens = prepareReplacementInfo();


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

Posted by ty...@apache.org.
Merge branch 'cassandra-2.1' into trunk

Conflicts:
	CHANGES.txt


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

Branch: refs/heads/trunk
Commit: d583c9dcad9fc03f034c496ee69d1ba68b7a6878
Parents: a06fc1e 1fb88c0
Author: Tyler Hobbs <ty...@datastax.com>
Authored: Wed Jun 25 10:43:49 2014 -0500
Committer: Tyler Hobbs <ty...@datastax.com>
Committed: Wed Jun 25 10:43:49 2014 -0500

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


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

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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d583c9dc/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------


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

Posted by ty...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
	bin/cqlsh


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

Branch: refs/heads/trunk
Commit: 82754e1ac554d4b75d0a0a55542da6ac7fdc7fc6
Parents: d27cd39 c656ffe
Author: Tyler Hobbs <ty...@datastax.com>
Authored: Wed Jun 25 09:56:14 2014 -0500
Committer: Tyler Hobbs <ty...@datastax.com>
Committed: Wed Jun 25 09:56:14 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


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