cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject git commit: Actually remove UnsortedColumns (CASSANDRA-6630 followup)
Date Thu, 06 Feb 2014 04:02:38 GMT
Updated Branches:
  refs/heads/trunk 0b738073a -> fc01759f4


Actually remove UnsortedColumns (CASSANDRA-6630 followup)


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

Branch: refs/heads/trunk
Commit: fc01759f41f253f7c850ed17e939b610812925e5
Parents: 0b73807
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Thu Feb 6 07:01:46 2014 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Thu Feb 6 07:02:15 2014 +0300

----------------------------------------------------------------------
 .../apache/cassandra/db/UnsortedColumns.java    | 145 -------------------
 1 file changed, 145 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc01759f/src/java/org/apache/cassandra/db/UnsortedColumns.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/UnsortedColumns.java b/src/java/org/apache/cassandra/db/UnsortedColumns.java
deleted file mode 100644
index ddd7827..0000000
--- a/src/java/org/apache/cassandra/db/UnsortedColumns.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "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.
- */
-package org.apache.cassandra.db;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
-import com.google.common.base.Function;
-import com.google.common.collect.Iterables;
-
-import org.apache.cassandra.config.CFMetaData;
-import org.apache.cassandra.db.composites.CellName;
-import org.apache.cassandra.db.filter.ColumnSlice;
-import org.apache.cassandra.utils.memory.AbstractAllocator;
-
-/**
- * A ColumnFamily that allows inserting in any order, even unsorted.
- *
- * Operations that require sorting (getSortedColumns) or that cannot be efficient without
it
- * (replace, getColumn, etc.) are not supported.
- */
-public class UnsortedColumns extends AbstractThreadUnsafeSortedColumns
-{
-    private final ArrayList<Cell> cells;
-
-    public static final Factory<UnsortedColumns> factory = new Factory<UnsortedColumns>()
-    {
-        public UnsortedColumns create(CFMetaData metadata, boolean insertReversed)
-        {
-            assert !insertReversed;
-            return new UnsortedColumns(metadata);
-        }
-    };
-
-    private UnsortedColumns(CFMetaData metadata)
-    {
-        this(metadata, new ArrayList<Cell>());
-    }
-
-    private UnsortedColumns(CFMetaData metadata, ArrayList<Cell> cells)
-    {
-        super(metadata);
-        this.cells = cells;
-    }
-
-    public Factory getFactory()
-    {
-        return factory;
-    }
-
-    public ColumnFamily cloneMe()
-    {
-        return new UnsortedColumns(metadata, new ArrayList<Cell>(cells));
-    }
-
-    public boolean isInsertReversed()
-    {
-        return false;
-    }
-
-    public void clear()
-    {
-        cells.clear();
-    }
-
-    public void addColumn(Cell cell, AbstractAllocator allocator)
-    {
-        cells.add(cell);
-    }
-
-    public void addAll(ColumnFamily cm, AbstractAllocator allocator, Function<Cell, Cell>
transformation)
-    {
-        delete(cm.deletionInfo());
-        for (Cell cell : cm)
-            addColumn(cell);
-    }
-
-    public Iterator<Cell> iterator()
-    {
-        return cells.iterator();
-    }
-
-    public boolean replace(Cell oldCell, Cell newCell)
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public Cell getColumn(CellName name)
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public Iterable<CellName> getColumnNames()
-    {
-        return Iterables.transform(cells, new Function<Cell, CellName>()
-        {
-            public CellName apply(Cell cell)
-            {
-                return cell.name;
-            }
-        });
-    }
-
-    public Collection<Cell> getSortedColumns()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public Collection<Cell> getReverseSortedColumns()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public int getColumnCount()
-    {
-        return cells.size();
-    }
-
-    public Iterator<Cell> iterator(ColumnSlice[] slices)
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public Iterator<Cell> reverseIterator(ColumnSlice[] slices)
-    {
-        throw new UnsupportedOperationException();
-    }
-
-}


Mime
View raw message