cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [3/6] cassandra git commit: Fix sstableloader fail when using materialized view
Date Thu, 03 Mar 2016 00:58:34 GMT
Fix sstableloader fail when using materialized view

patch by Sergey Kirillov; reviewed by yukim for CASSANDRA-11275


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

Branch: refs/heads/trunk
Commit: 19bccb4eaea7a6b33b72bb55e6923206526009e8
Parents: 66d1b8f
Author: Sergey Kirillov <sergey.kirillov@gmail.com>
Authored: Mon Feb 29 20:42:25 2016 -0600
Committer: Yuki Morishita <yukim@apache.org>
Committed: Wed Mar 2 18:55:03 2016 -0600

----------------------------------------------------------------------
 CHANGES.txt                                                      | 1 +
 .../org/apache/cassandra/utils/NativeSSTableLoaderClient.java    | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/19bccb4e/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 0c721e8..520e66e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.5
+ * Fix sstableloader fail when using materialized view (CASSANDRA-11275)
 Merged from 2.2:
  * Only log yaml config once, at startup (CASSANDRA-11217)
  * Reference leak with parallel repairs on the same table (CASSANDRA-11215)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/19bccb4e/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
index 225e453..5bcbcf7 100644
--- a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
+++ b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
@@ -169,12 +169,12 @@ public class NativeSSTableLoaderClient extends SSTableLoader.Client
                                                   Types types)
     {
         UUID id = row.getUUID("id");
-        Set<CFMetaData.Flag> flags = CFMetaData.flagsFromStrings(row.getSet("flags",
String.class));
+        Set<CFMetaData.Flag> flags = isView ? Collections.emptySet() : CFMetaData.flagsFromStrings(row.getSet("flags",
String.class));
 
         boolean isSuper = flags.contains(CFMetaData.Flag.SUPER);
         boolean isCounter = flags.contains(CFMetaData.Flag.COUNTER);
         boolean isDense = flags.contains(CFMetaData.Flag.DENSE);
-        boolean isCompound = flags.contains(CFMetaData.Flag.COMPOUND);
+        boolean isCompound = isView || flags.contains(CFMetaData.Flag.COMPOUND);
 
         String columnsQuery = String.format("SELECT * FROM %s.%s WHERE keyspace_name = ?
AND table_name = ?",
                                             SchemaKeyspace.NAME,


Mime
View raw message