cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [1/5] git commit: make 2i CFMetaData have parent's CF ID
Date Wed, 15 Jan 2014 03:13:22 GMT
Updated Branches:
  refs/heads/trunk 9dc585413 -> ea565aac9


make 2i CFMetaData have parent's CF ID


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

Branch: refs/heads/trunk
Commit: 3e31143e1c8658e9ab529fe6f705bf836e7f7a64
Parents: 9dc5854
Author: Yuki Morishita <yukim@apache.org>
Authored: Thu Jan 9 11:20:31 2014 -0600
Committer: Yuki Morishita <yukim@apache.org>
Committed: Tue Jan 14 20:22:37 2014 -0600

----------------------------------------------------------------------
 src/java/org/apache/cassandra/config/CFMetaData.java | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3e31143e/src/java/org/apache/cassandra/config/CFMetaData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java
index 78ee300..3dc7022 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -558,6 +558,15 @@ public final class CFMetaData
                 .memtableFlushPeriod(3600 * 1000);
     }
 
+    /**
+     * Creates CFMetaData for secondary index CF.
+     * Secondary index CF has the same CF ID as parent's.
+     *
+     * @param parent Parent CF where secondary index is created
+     * @param info Column definition containing secondary index definition
+     * @param indexComparator Comparator for secondary index
+     * @return CFMetaData for secondary index
+     */
     public static CFMetaData newIndexMetadata(CFMetaData parent, ColumnDefinition info, CellNameType
indexComparator)
     {
         // Depends on parent's cache setting, turn on its index CF's cache.
@@ -566,7 +575,7 @@ public final class CFMetaData
                              ? Caching.KEYS_ONLY
                              : Caching.NONE;
 
-        return new CFMetaData(parent.ksName, parent.indexColumnFamilyName(info), ColumnFamilyType.Standard,
indexComparator)
+        return new CFMetaData(parent.ksName, parent.indexColumnFamilyName(info), ColumnFamilyType.Standard,
indexComparator, parent.cfId)
                              .keyValidator(info.type)
                              .readRepairChance(0.0)
                              .dcLocalReadRepairChance(0.0)


Mime
View raw message