cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject cassandra git commit: remove unused legacy migration code
Date Mon, 23 Jan 2017 01:59:43 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 09dd72a8d -> bb8283850


remove unused legacy migration code


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

Branch: refs/heads/trunk
Commit: bb8283850c41fba247f5d77c9c22385098ce70f0
Parents: 09dd72a
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Sun Jan 22 20:59:11 2017 -0500
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Sun Jan 22 20:59:11 2017 -0500

----------------------------------------------------------------------
 .../apache/cassandra/schema/IndexMetadata.java  | 38 +-------------------
 1 file changed, 1 insertion(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/bb828385/src/java/org/apache/cassandra/schema/IndexMetadata.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/schema/IndexMetadata.java b/src/java/org/apache/cassandra/schema/IndexMetadata.java
index 04e06ab..b8c4854 100644
--- a/src/java/org/apache/cassandra/schema/IndexMetadata.java
+++ b/src/java/org/apache/cassandra/schema/IndexMetadata.java
@@ -47,7 +47,7 @@ import org.apache.cassandra.utils.UUIDSerializer;
 public final class IndexMetadata
 {
     private static final Logger logger = LoggerFactory.getLogger(IndexMetadata.class);
-    
+
     private static final Pattern PATTERN_NON_WORD_CHAR = Pattern.compile("\\W");
     private static final Pattern PATTERN_WORD_CHARS = Pattern.compile("\\w+");
 
@@ -76,42 +76,6 @@ public final class IndexMetadata
         this.kind = kind;
     }
 
-    public static IndexMetadata fromLegacyMetadata(CFMetaData cfm,
-                                                   ColumnDefinition column,
-                                                   String name,
-                                                   Kind kind,
-                                                   Map<String, String> options)
-    {
-        Map<String, String> newOptions = new HashMap<>();
-        if (options != null)
-            newOptions.putAll(options);
-
-        IndexTarget target;
-        if (newOptions.containsKey(IndexTarget.INDEX_KEYS_OPTION_NAME))
-        {
-            newOptions.remove(IndexTarget.INDEX_KEYS_OPTION_NAME);
-            target = new IndexTarget(column.name, IndexTarget.Type.KEYS);
-        }
-        else if (newOptions.containsKey(IndexTarget.INDEX_ENTRIES_OPTION_NAME))
-        {
-            newOptions.remove(IndexTarget.INDEX_KEYS_OPTION_NAME);
-            target = new IndexTarget(column.name, IndexTarget.Type.KEYS_AND_VALUES);
-        }
-        else
-        {
-            if (column.type.isCollection() && !column.type.isMultiCell())
-            {
-                target = new IndexTarget(column.name, IndexTarget.Type.FULL);
-            }
-            else
-            {
-                target = new IndexTarget(column.name, IndexTarget.Type.VALUES);
-            }
-        }
-        newOptions.put(IndexTarget.TARGET_OPTION_NAME, target.asCqlString(cfm));
-        return new IndexMetadata(name, newOptions, kind);
-    }
-
     public static IndexMetadata fromSchemaMetadata(String name, Kind kind, Map<String,
String> options)
     {
         return new IndexMetadata(name, options, kind);


Mime
View raw message