cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject cassandra git commit: Make all existing virtual tables use LocalPartitioner
Date Tue, 14 Aug 2018 13:23:39 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk ed806594e -> 35750e805


Make all existing virtual tables use LocalPartitioner

patch by Chris Lohfink; reviewed by Aleksey Yeschenko for CASSANDRA-14640


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

Branch: refs/heads/trunk
Commit: 35750e80589e61dbef0c85f20691764a6c7c3f81
Parents: ed80659
Author: Chris Lohfink <clohfink@apple.com>
Authored: Tue Aug 14 14:11:57 2018 +0100
Committer: Aleksey Yeshchenko <aleksey@apple.com>
Committed: Tue Aug 14 14:11:57 2018 +0100

----------------------------------------------------------------------
 CHANGES.txt                                                      | 1 +
 src/java/org/apache/cassandra/db/virtual/ClientsTable.java       | 2 ++
 src/java/org/apache/cassandra/db/virtual/SSTableTasksTable.java  | 2 ++
 .../org/apache/cassandra/db/virtual/VirtualSchemaKeyspace.java   | 4 ++++
 4 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/35750e80/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 6a45f95..52933c8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.0
+ * Make all existing virtual tables use LocalPartitioner (CASSANDRA-14640)
  * Revert 4.0 GC alg back to CMS (CASANDRA-14636)
  * Remove hardcoded java11 jvm args in idea workspace files (CASSANDRA-14627)
  * Update netty to 4.1.128 (CASSANDRA-14633)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/35750e80/src/java/org/apache/cassandra/db/virtual/ClientsTable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/virtual/ClientsTable.java b/src/java/org/apache/cassandra/db/virtual/ClientsTable.java
index 98d1a28..40e175b 100644
--- a/src/java/org/apache/cassandra/db/virtual/ClientsTable.java
+++ b/src/java/org/apache/cassandra/db/virtual/ClientsTable.java
@@ -20,6 +20,7 @@ package org.apache.cassandra.db.virtual;
 import java.net.InetSocketAddress;
 
 import org.apache.cassandra.db.marshal.*;
+import org.apache.cassandra.dht.LocalPartitioner;
 import org.apache.cassandra.metrics.ClientMetrics;
 import org.apache.cassandra.schema.TableMetadata;
 import org.apache.cassandra.transport.ConnectedClient;
@@ -44,6 +45,7 @@ final class ClientsTable extends AbstractVirtualTable
         super(TableMetadata.builder(keyspace, "clients")
                            .comment("currently connected clients")
                            .kind(TableMetadata.Kind.VIRTUAL)
+                           .partitioner(new LocalPartitioner(InetAddressType.instance))
                            .addPartitionKeyColumn(ADDRESS, InetAddressType.instance)
                            .addClusteringColumn(PORT, Int32Type.instance)
                            .addRegularColumn(HOSTNAME, UTF8Type.instance)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/35750e80/src/java/org/apache/cassandra/db/virtual/SSTableTasksTable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/virtual/SSTableTasksTable.java b/src/java/org/apache/cassandra/db/virtual/SSTableTasksTable.java
index 8fb12ba..b387b88 100644
--- a/src/java/org/apache/cassandra/db/virtual/SSTableTasksTable.java
+++ b/src/java/org/apache/cassandra/db/virtual/SSTableTasksTable.java
@@ -22,6 +22,7 @@ import org.apache.cassandra.db.compaction.CompactionManager;
 import org.apache.cassandra.db.marshal.LongType;
 import org.apache.cassandra.db.marshal.UTF8Type;
 import org.apache.cassandra.db.marshal.UUIDType;
+import org.apache.cassandra.dht.LocalPartitioner;
 import org.apache.cassandra.schema.TableMetadata;
 
 final class SSTableTasksTable extends AbstractVirtualTable
@@ -39,6 +40,7 @@ final class SSTableTasksTable extends AbstractVirtualTable
         super(TableMetadata.builder(keyspace, "sstable_tasks")
                            .comment("current sstable tasks")
                            .kind(TableMetadata.Kind.VIRTUAL)
+                           .partitioner(new LocalPartitioner(UTF8Type.instance))
                            .addPartitionKeyColumn(KEYSPACE_NAME, UTF8Type.instance)
                            .addClusteringColumn(TABLE_NAME, UTF8Type.instance)
                            .addClusteringColumn(TASK_ID, UUIDType.instance)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/35750e80/src/java/org/apache/cassandra/db/virtual/VirtualSchemaKeyspace.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/virtual/VirtualSchemaKeyspace.java b/src/java/org/apache/cassandra/db/virtual/VirtualSchemaKeyspace.java
index 299cc00..4255e2d 100644
--- a/src/java/org/apache/cassandra/db/virtual/VirtualSchemaKeyspace.java
+++ b/src/java/org/apache/cassandra/db/virtual/VirtualSchemaKeyspace.java
@@ -22,6 +22,7 @@ import com.google.common.collect.ImmutableList;
 import org.apache.cassandra.db.marshal.BytesType;
 import org.apache.cassandra.db.marshal.Int32Type;
 import org.apache.cassandra.db.marshal.UTF8Type;
+import org.apache.cassandra.dht.LocalPartitioner;
 import org.apache.cassandra.schema.ColumnMetadata;
 import org.apache.cassandra.schema.KeyspaceMetadata;
 import org.apache.cassandra.schema.Schema;
@@ -49,6 +50,7 @@ public final class VirtualSchemaKeyspace extends VirtualKeyspace
             super(builder(keyspace, "keyspaces")
                  .comment("virtual keyspace definitions")
                  .kind(TableMetadata.Kind.VIRTUAL)
+                 .partitioner(new LocalPartitioner(UTF8Type.instance))
                  .addPartitionKeyColumn(KEYSPACE_NAME, UTF8Type.instance)
                  .build());
         }
@@ -73,6 +75,7 @@ public final class VirtualSchemaKeyspace extends VirtualKeyspace
             super(builder(keyspace, "tables")
                  .comment("virtual table definitions")
                  .kind(TableMetadata.Kind.VIRTUAL)
+                 .partitioner(new LocalPartitioner(UTF8Type.instance))
                  .addPartitionKeyColumn(KEYSPACE_NAME, UTF8Type.instance)
                  .addClusteringColumn(TABLE_NAME, UTF8Type.instance)
                  .addRegularColumn(COMMENT, UTF8Type.instance)
@@ -112,6 +115,7 @@ public final class VirtualSchemaKeyspace extends VirtualKeyspace
             super(builder(keyspace, "columns")
                  .comment("virtual column definitions")
                  .kind(TableMetadata.Kind.VIRTUAL)
+                 .partitioner(new LocalPartitioner(UTF8Type.instance))
                  .addPartitionKeyColumn(KEYSPACE_NAME, UTF8Type.instance)
                  .addClusteringColumn(TABLE_NAME, UTF8Type.instance)
                  .addClusteringColumn(COLUMN_NAME, UTF8Type.instance)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message