Updated Branches:
  refs/heads/trunk 14943766e -> 0f49210cb

r/m retrieveKeysForThriftTables since it is unneeded in 2.0


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

Branch: refs/heads/trunk
Commit: 0f49210cb6af7a57b9d8a37cab4f3b1edbd64ec1
Parents: 1494376
Author: Jonathan Ellis <jbel...@apache.org>
Authored: Wed Jul 31 18:23:39 2013 -0500
Committer: Jonathan Ellis <jbel...@apache.org>
Committed: Wed Jul 31 18:23:39 2013 -0500

----------------------------------------------------------------------
 .../cassandra/hadoop/cql3/CqlRecordWriter.java  | 33 --------------------
 1 file changed, 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0f49210c/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java 
b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
index 838dbda..4746f8a 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
@@ -26,9 +26,6 @@ import java.util.concurrent.ConcurrentHashMap;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.cassandra.config.CFMetaData;
-import org.apache.cassandra.cql3.CFDefinition;
-import org.apache.cassandra.cql3.ColumnIdentifier;
 import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.db.marshal.CompositeType;
 import org.apache.cassandra.db.marshal.LongType;
@@ -340,11 +337,6 @@ final class CqlRecordWriter extends 
AbstractColumnFamilyRecordWriter<Map<String,
         logger.debug("partition keys: " + keyString);
 
         List<String> keys = FBUtilities.fromJsonList(keyString);
-        if (keys.size() == 0)
-        {
-            retrieveKeysForThriftTables(client);
-            return;
-        }
         partitionKeyColumns = new String[keys.size()];
         int i = 0;
         for (String key : keys)
@@ -360,31 +352,6 @@ final class CqlRecordWriter extends 
AbstractColumnFamilyRecordWriter<Map<String,
         clusterColumns = FBUtilities.fromJsonList(clusterColumnString);
     }
 
-    /** 
-     * retrieve the fake partition keys and cluster keys for classic thrift 
table 
-     * use CFDefinition to get keys and columns
-     * */
-    private void retrieveKeysForThriftTables(Cassandra.Client client) throws 
Exception
-    {
-        String keyspace = ConfigHelper.getOutputKeyspace(conf);
-        String cfName = ConfigHelper.getOutputColumnFamily(conf);
-        KsDef ksDef = client.describe_keyspace(keyspace);
-        for (CfDef cfDef : ksDef.cf_defs)
-        {
-            if (cfDef.name.equalsIgnoreCase(cfName))
-            {
-                CFMetaData cfMeta = CFMetaData.fromThrift(cfDef);
-                CFDefinition cfDefinition = new CFDefinition(cfMeta);
-                int i = 0;
-                for (ColumnIdentifier column : cfDefinition.keys.keySet())
-                {
-                    partitionKeyColumns[i] = column.toString();
-                    i++;
-                }
-                return;
-            }
-        }
-    }
     private AbstractType<?> parseType(String type) throws 
ConfigurationException
     {
         try

Reply via email to