cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/17] git commit: Merge branch 'cassandra-1.1' into trunk
Date Tue, 13 Mar 2012 13:16:57 GMT
Updated Branches:
  refs/heads/trunk a7b9d09b0 -> bc577bac0


Merge branch 'cassandra-1.1' into trunk

Conflicts:
	src/java/org/apache/cassandra/db/compaction/CompactionTask.java
	src/java/org/apache/cassandra/utils/BoundedStatsDeque.java


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

Branch: refs/heads/trunk
Commit: bc577bac07932b45385ea6647d9d27c57473e765
Parents: a7b9d09 073038c
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Tue Mar 13 14:16:42 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Tue Mar 13 14:16:42 2012 +0100

----------------------------------------------------------------------
 CHANGES.txt                                        |    5 +-
 src/java/org/apache/cassandra/config/Avro.java     |  193 ++++
 .../org/apache/cassandra/config/CFMetaData.java    |  727 +++++++--------
 .../apache/cassandra/config/ColumnDefinition.java  |  220 ++---
 .../org/apache/cassandra/config/KSMetaData.java    |  242 ++----
 .../cassandra/cql/CreateColumnFamilyStatement.java |    2 +-
 .../apache/cassandra/cql/DropIndexStatement.java   |    2 +-
 .../org/apache/cassandra/cql/QueryProcessor.java   |    4 +-
 .../org/apache/cassandra/cql3/QueryProcessor.java  |   29 +
 .../apache/cassandra/cql3/UntypedResultSet.java    |  110 +++
 .../cql3/statements/AlterTableStatement.java       |    2 +-
 .../statements/CreateColumnFamilyStatement.java    |    2 +-
 .../cql3/statements/CreateIndexStatement.java      |    2 +-
 .../cql3/statements/DropIndexStatement.java        |    2 +-
 .../cql3/statements/ModificationStatement.java     |    1 -
 .../cassandra/cql3/statements/SelectStatement.java |   19 +-
 .../cassandra/cql3/statements/UpdateStatement.java |   29 +-
 src/java/org/apache/cassandra/db/Column.java       |   48 +-
 src/java/org/apache/cassandra/db/DefsTable.java    |   71 +-
 .../org/apache/cassandra/db/DeletedColumn.java     |    5 +
 src/java/org/apache/cassandra/db/RowMutation.java  |   19 +
 .../db/index/MultiRowIndexSearcherIterator.java    |  225 +++++
 .../cassandra/db/index/keys/KeysSearcher.java      |  136 +---
 .../apache/cassandra/db/marshal/AbstractType.java  |    8 +-
 .../cassandra/db/marshal/DynamicCompositeType.java |    5 +
 .../cassandra/db/migration/AddColumnFamily.java    |    4 +-
 .../apache/cassandra/db/migration/AddKeyspace.java |    4 +-
 .../cassandra/db/migration/DropColumnFamily.java   |    4 +-
 .../cassandra/db/migration/DropKeyspace.java       |    4 +-
 .../apache/cassandra/db/migration/Migration.java   |   12 +-
 .../cassandra/db/migration/MigrationHelper.java    |  258 +-----
 .../cassandra/db/migration/UpdateColumnFamily.java |   14 +-
 .../cassandra/db/migration/UpdateKeyspace.java     |   13 +-
 .../io/compress/CompressionParameters.java         |   15 -
 .../apache/cassandra/service/MigrationManager.java |    2 +-
 .../apache/cassandra/thrift/CassandraServer.java   |    4 +-
 .../apache/cassandra/utils/BoundedStatsDeque.java  |    2 +-
 .../org/apache/cassandra/utils/ByteBufferUtil.java |    5 +-
 .../org/apache/cassandra/utils/FBUtilities.java    |   41 +
 .../apache/cassandra/config/CFMetaDataTest.java    |   15 +-
 .../unit/org/apache/cassandra/config/DefsTest.java |  590 ++++++++++++
 test/unit/org/apache/cassandra/db/DefsTest.java    |  622 ------------
 42 files changed, 1924 insertions(+), 1793 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/config/CFMetaData.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/config/ColumnDefinition.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/ColumnDefinition.java
index 0ea3d10,e47ac07..61d1100
--- a/src/java/org/apache/cassandra/config/ColumnDefinition.java
+++ b/src/java/org/apache/cassandra/config/ColumnDefinition.java
@@@ -7,17 -9,20 +7,18 @@@
   * "License"); you may not use this file except in compliance
   * with the License.  You may obtain a copy of the License at
   *
 - *   http://www.apache.org/licenses/LICENSE-2.0
 - *
 - * Unless required by applicable law or agreed to in writing,
 - * software distributed under the License is distributed on an
 - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 - * KIND, either express or implied.  See the License for the
 - * specific language governing permissions and limitations
 - * under the License.
 + *     http://www.apache.org/licenses/LICENSE-2.0
   *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
   */
 -
 +package org.apache.cassandra.config;
  
  import java.nio.ByteBuffer;
+ import java.nio.charset.CharacterCodingException;
  import java.util.*;
  
  import com.google.common.collect.Maps;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/config/KSMetaData.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/cql/DropIndexStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/cql/QueryProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/cql3/QueryProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/cql3/statements/CreateIndexStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/cql3/statements/DropIndexStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/db/Column.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/db/DefsTable.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/db/DeletedColumn.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/db/RowMutation.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/RowMutation.java
index 8251f03,a48e027..fb84e39
--- a/src/java/org/apache/cassandra/db/RowMutation.java
+++ b/src/java/org/apache/cassandra/db/RowMutation.java
@@@ -166,9 -169,24 +166,24 @@@ public class RowMutation implements IMu
              throw new IllegalArgumentException("ColumnFamily " + columnFamily + " already
has modifications in this mutation: " + prev);
      }
  
+     /**
+      * @return the ColumnFamily in this RowMutation corresponding to @param cfName, creating
an empty one if necessary.
+      */
+     public ColumnFamily addOrGet(String cfName)
+     {
 -        CFMetaData cfm = Schema.instance.getCFMetaData(table_, cfName);
 -        ColumnFamily cf = modifications_.get(cfm.cfId);
++        CFMetaData cfm = Schema.instance.getCFMetaData(table, cfName);
++        ColumnFamily cf = modifications.get(cfm.cfId);
+         if (cf == null)
+         {
+             cf = ColumnFamily.create(cfm);
 -            modifications_.put(cfm.cfId, cf);
++            modifications.put(cfm.cfId, cf);
+         }
+         return cf;
+     }
+ 
      public boolean isEmpty()
      {
 -        return modifications_.isEmpty();
 +        return modifications.isEmpty();
      }
  
      /*

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/db/marshal/AbstractType.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/db/marshal/DynamicCompositeType.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/db/migration/AddColumnFamily.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/db/migration/AddKeyspace.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/db/migration/DropColumnFamily.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/db/migration/DropKeyspace.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/db/migration/Migration.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/db/migration/MigrationHelper.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/db/migration/UpdateColumnFamily.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/db/migration/UpdateKeyspace.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/service/MigrationManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/thrift/CassandraServer.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/utils/BoundedStatsDeque.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/utils/BoundedStatsDeque.java
index 1d9bc7b,5d27608..43d2ce4
--- a/src/java/org/apache/cassandra/utils/BoundedStatsDeque.java
+++ b/src/java/org/apache/cassandra/utils/BoundedStatsDeque.java
@@@ -22,9 -23,9 +22,9 @@@ import java.util.NoSuchElementException
  import java.util.concurrent.LinkedBlockingDeque;
  
  /**
-  * threadsafe bounded deque with statistical functions
+  * bounded threadsafe deque
   */
 -public class BoundedStatsDeque extends AbstractStatsDeque
 +public class BoundedStatsDeque implements Iterable<Double>
  {
      protected final LinkedBlockingDeque<Double> deque;
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/utils/ByteBufferUtil.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc577bac/src/java/org/apache/cassandra/utils/FBUtilities.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/utils/FBUtilities.java
index 47fbfd3,38df00e..853e67e
--- a/src/java/org/apache/cassandra/utils/FBUtilities.java
+++ b/src/java/org/apache/cassandra/utils/FBUtilities.java
@@@ -56,12 -60,14 +59,14 @@@ import org.codehaus.jackson.type.TypeRe
  
  public class FBUtilities
  {
 -    private static Logger logger_ = LoggerFactory.getLogger(FBUtilities.class);
 +    private static final Logger logger = LoggerFactory.getLogger(FBUtilities.class);
  
+     private static ObjectMapper jsonMapper = new ObjectMapper(new JsonFactory());
+ 
      public static final BigInteger TWO = new BigInteger("2");
  
 -    private static volatile InetAddress localInetAddress_;
 -    private static volatile InetAddress broadcastInetAddress_;
 +    private static volatile InetAddress localInetAddress;
 +    private static volatile InetAddress broadcastInetAddress;
  
      private static final ThreadLocal<MessageDigest> localMD5Digest = new ThreadLocal<MessageDigest>()
      {


Mime
View raw message