cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] git commit: Fix CASSANDRA-6000 and CASSANDRA-5990 merges
Date Thu, 12 Sep 2013 15:38:22 GMT
Updated Branches:
  refs/heads/trunk 0ec68f557 -> c1c29d847


Fix CASSANDRA-6000 and CASSANDRA-5990 merges


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

Branch: refs/heads/trunk
Commit: 349d5dbeadfa2abca1b2d067f2e796aa41f06e8d
Parents: 7cb57db
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Thu Sep 12 18:37:21 2013 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Thu Sep 12 18:37:21 2013 +0300

----------------------------------------------------------------------
 .../org/apache/cassandra/config/CFMetaData.java |  4 ++-
 .../apache/cassandra/cql3/UntypedResultSet.java | 14 +++-----
 .../cassandra/hadoop/pig/CassandraStorage.java  | 34 ++++----------------
 3 files changed, 13 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/349d5dbe/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 e912505..be3da21 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -936,7 +936,9 @@ public final class CFMetaData
             for (org.apache.cassandra.thrift.Column column : row.getColumns())
                 columns.put(ByteBufferUtil.string(column.bufferForName()), column.value);
         }
-        catch (CharacterCodingException ignore) {}
+        catch (CharacterCodingException ignore)
+        {
+        }
         UntypedResultSet.Row cql3row = new UntypedResultSet.Row(columns);
         return fromSchemaNoColumnsNoTriggers(cql3row);
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/349d5dbe/src/java/org/apache/cassandra/cql3/UntypedResultSet.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/UntypedResultSet.java b/src/java/org/apache/cassandra/cql3/UntypedResultSet.java
index da76f2b..e5bd863 100644
--- a/src/java/org/apache/cassandra/cql3/UntypedResultSet.java
+++ b/src/java/org/apache/cassandra/cql3/UntypedResultSet.java
@@ -20,13 +20,7 @@ package org.apache.cassandra.cql3;
 
 import java.net.InetAddress;
 import java.nio.ByteBuffer;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
+import java.util.*;
 
 import com.google.common.collect.AbstractIterator;
 
@@ -77,8 +71,8 @@ public class UntypedResultSet implements Iterable<UntypedResultSet.Row>
 
     public static class Row
     {
-        final Map<String, ByteBuffer> data = new HashMap<String, ByteBuffer>();
-        final List<ColumnSpecification> columns;
+        private final Map<String, ByteBuffer> data = new HashMap<>();
+        private final List<ColumnSpecification> columns = new ArrayList<>();
 
         public Row(Map<String, ByteBuffer> data)
         {
@@ -87,7 +81,7 @@ public class UntypedResultSet implements Iterable<UntypedResultSet.Row>
 
         public Row(List<ColumnSpecification> names, List<ByteBuffer> columns)
         {
-            this.columns = names;
+            this.columns.addAll(names);
             for (int i = 0; i < names.size(); i++)
                 data.put(names.get(i).toString(), columns.get(i));
         }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/349d5dbe/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
index 577fd38..62f25cd 100644
--- a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
+++ b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@ -22,27 +22,15 @@ import java.nio.ByteBuffer;
 import java.nio.charset.CharacterCodingException;
 import java.util.*;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.db.Column;
 import org.apache.cassandra.db.marshal.*;
 import org.apache.cassandra.exceptions.ConfigurationException;
+import org.apache.cassandra.exceptions.InvalidRequestException;
 import org.apache.cassandra.hadoop.*;
-import org.apache.cassandra.thrift.Cassandra;
-import org.apache.cassandra.thrift.CfDef;
-import org.apache.cassandra.thrift.ColumnDef;
-import org.apache.cassandra.thrift.ColumnOrSuperColumn;
-import org.apache.cassandra.thrift.Deletion;
-import org.apache.cassandra.thrift.IndexClause;
-import org.apache.cassandra.thrift.IndexExpression;
-import org.apache.cassandra.thrift.IndexOperator;
-import org.apache.cassandra.thrift.InvalidRequestException;
-import org.apache.cassandra.thrift.Mutation;
-import org.apache.cassandra.thrift.SchemaDisagreementException;
-import org.apache.cassandra.thrift.SlicePredicate;
-import org.apache.cassandra.thrift.SliceRange;
-import org.apache.cassandra.thrift.SuperColumn;
-import org.apache.cassandra.thrift.TimedOutException;
-import org.apache.cassandra.thrift.UnavailableException;
+import org.apache.cassandra.thrift.*;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.utils.Hex;
@@ -57,8 +45,6 @@ import org.apache.thrift.TDeserializer;
 import org.apache.thrift.TException;
 import org.apache.thrift.TSerializer;
 import org.apache.thrift.protocol.TBinaryProtocol;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * A LoadStoreFunc for retrieving data from and storing data to Cassandra
@@ -714,18 +700,10 @@ public class CassandraStorage extends AbstractCassandraStorage
 
     /** get a list of column for the column family */
     protected List<ColumnDef> getColumnMetadata(Cassandra.Client client, boolean cql3Table)

-            throws InvalidRequestException, 
-            UnavailableException, 
-            TimedOutException, 
-            SchemaDisagreementException, 
-            TException,
-            CharacterCodingException,
-            org.apache.cassandra.exceptions.InvalidRequestException,
-            ConfigurationException,
-            NotFoundException
+    throws TException, CharacterCodingException, InvalidRequestException, ConfigurationException
     {
         if (cql3Table)
-            return new ArrayList<ColumnDef>();
+            return new ArrayList<>();
         
         return getColumnMeta(client, true);
     }


Mime
View raw message