You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2012/01/27 00:00:18 UTC

[4/7] git commit: r/m unnecessary throws clause

r/m unnecessary throws clause


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

Branch: refs/heads/trunk
Commit: bbd493cd4330c39fc7b5e83f98b108039e266b0d
Parents: 93fa8d8
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Jan 26 15:37:26 2012 -0600
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Jan 26 15:37:26 2012 -0600

----------------------------------------------------------------------
 .../org/apache/cassandra/config/CFMetaData.java    |   30 +++++----------
 .../apache/cassandra/config/ColumnDefinition.java  |    7 +--
 2 files changed, 12 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/bbd493cd/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 dc50102..56ee2c9 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -78,7 +78,16 @@ public final class CFMetaData
     public static final CFMetaData SchemaCf = newSystemMetadata(Migration.SCHEMA_CF, 3, "current state of the schema", UTF8Type.instance, null);
     public static final CFMetaData IndexCf = newSystemMetadata(SystemTable.INDEX_CF, 5, "indexes that have been completed", UTF8Type.instance, null);
     public static final CFMetaData NodeIdCf = newSystemMetadata(SystemTable.NODE_ID_CF, 6, "nodeId and their metadata", TimeUUIDType.instance, null);
-    public static final CFMetaData VersionCf = newSystemMetadata(SystemTable.VERSION_CF, 7, "server version information", UTF8Type.instance, null);
+    public static final CFMetaData VersionCf =
+            newSystemMetadata(SystemTable.VERSION_CF, 7, "server version information", UTF8Type.instance, null)
+            .keyAlias(ByteBufferUtil.bytes("component"))
+            .keyValidator(UTF8Type.instance)
+            .columnMetadata(Collections.singletonMap(ByteBufferUtil.bytes("version"),
+                                                     new ColumnDefinition(ByteBufferUtil.bytes("version"),
+                                                                          UTF8Type.instance,
+                                                                          null,
+                                                                          null,
+                                                                          null)));
     public static final CFMetaData SchemaKeyspacesCf = schemaCFDefinition(SystemTable.SCHEMA_KEYSPACES_CF, 8, "keyspace attributes of the schema", AsciiType.instance, 1);
     public static final CFMetaData SchemaColumnFamiliesCf = schemaCFDefinition(SystemTable.SCHEMA_COLUMNFAMILIES_CF, 9, "ColumnFamily attributes of the schema", AsciiType.instance, 2);
     public static final CFMetaData SchemaColumnsCf = schemaCFDefinition(SystemTable.SCHEMA_COLUMNS_CF, 10, "ColumnFamily column attributes of the schema", AsciiType.instance, 3);
@@ -110,25 +119,6 @@ public final class CFMetaData
                                  .defaultValidator(UTF8Type.instance);
     }
 
-    static
-    {
-        try
-        {
-            VersionCf.keyAlias(ByteBufferUtil.bytes("component"))
-                     .keyValidator(UTF8Type.instance)
-                     .columnMetadata(Collections.singletonMap(ByteBufferUtil.bytes("version"),
-                                                              new ColumnDefinition(ByteBufferUtil.bytes("version"),
-                                                                                   UTF8Type.instance,
-                                                                                   null,
-                                                                                   null,
-                                                                                   null)));
-        }
-        catch (ConfigurationException e)
-        {
-            throw new RuntimeException(e);
-        }
-    }
-
     public enum Caching
     {
         ALL, KEYS_ONLY, ROWS_ONLY, NONE;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bbd493cd/src/java/org/apache/cassandra/config/ColumnDefinition.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/ColumnDefinition.java b/src/java/org/apache/cassandra/config/ColumnDefinition.java
index 927ca39..68875d6 100644
--- a/src/java/org/apache/cassandra/config/ColumnDefinition.java
+++ b/src/java/org/apache/cassandra/config/ColumnDefinition.java
@@ -46,7 +46,7 @@ public class ColumnDefinition
     private Map<String,String> index_options;
     private String index_name;
     
-    public ColumnDefinition(ByteBuffer name, AbstractType<?> validator, IndexType index_type, Map<String, String> index_options, String index_name) throws ConfigurationException
+    public ColumnDefinition(ByteBuffer name, AbstractType<?> validator, IndexType index_type, Map<String, String> index_options, String index_name)
     {
         this.name = name;
         this.index_name = index_name;
@@ -223,9 +223,6 @@ public class ColumnDefinition
     /**
      * Deserialize columns from low-level representation
      *
-     * @param ksName The corresponding Keyspace
-     * @param cfName The name of the parent ColumnFamily
-     *
      * @return Thrift-based deserialized representation of the column
      */
     public static List<ColumnDef> fromSchema(ColumnFamily columns)
@@ -291,7 +288,7 @@ public class ColumnDefinition
         index_name = s;
     }
 
-    public void setIndexType(IndexType index_type, Map<String,String> index_options) throws ConfigurationException
+    public void setIndexType(IndexType index_type, Map<String,String> index_options)
     {
         this.index_type = index_type;
         this.index_options = index_options;