cassandra git commit: remove dead code
Repository: cassandra Updated Branches: refs/heads/trunk 6afe13f6f -> 4864ccf61 remove dead code Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4864ccf6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4864ccf6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4864ccf6 Branch: refs/heads/trunk Commit: 4864ccf61811f0469dfc77fc83c5313bb77213ee Parents: 6afe13f Author: Dave Brosius Authored: Sat Sep 30 19:08:04 2017 -0400 Committer: Dave Brosius Committed: Sat Sep 30 19:08:04 2017 -0400 -- src/java/org/apache/cassandra/db/commitlog/CommitLogReader.java | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4864ccf6/src/java/org/apache/cassandra/db/commitlog/CommitLogReader.java -- diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLogReader.java b/src/java/org/apache/cassandra/db/commitlog/CommitLogReader.java index 75ef8e9..078bb53 100644 --- a/src/java/org/apache/cassandra/db/commitlog/CommitLogReader.java +++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogReader.java @@ -81,7 +81,6 @@ public class CommitLogReader private static boolean shouldSkip(File file) throws IOException, ConfigurationException { -CommitLogDescriptor desc = CommitLogDescriptor.fromFileName(file.getName()); try(RandomAccessReader reader = RandomAccessReader.open(file)) { CommitLogDescriptor.readHeader(reader, DatabaseDescriptor.getEncryptionContext()); - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
cassandra git commit: remove dead code
Repository: cassandra Updated Branches: refs/heads/trunk 74647a8cc -> da995b72e remove dead code Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/da995b72 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/da995b72 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/da995b72 Branch: refs/heads/trunk Commit: da995b72e3577a058606afbbb82a873089c47a80 Parents: 74647a8 Author: Dave Brosius Authored: Wed Jul 13 01:04:03 2016 -0400 Committer: Dave Brosius Committed: Wed Jul 13 01:04:34 2016 -0400 -- .../apache/cassandra/db/filter/ClusteringIndexSliceFilter.java | 5 - 1 file changed, 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/da995b72/src/java/org/apache/cassandra/db/filter/ClusteringIndexSliceFilter.java -- diff --git a/src/java/org/apache/cassandra/db/filter/ClusteringIndexSliceFilter.java b/src/java/org/apache/cassandra/db/filter/ClusteringIndexSliceFilter.java index ba30dcf..02a44d7 100644 --- a/src/java/org/apache/cassandra/db/filter/ClusteringIndexSliceFilter.java +++ b/src/java/org/apache/cassandra/db/filter/ClusteringIndexSliceFilter.java @@ -94,11 +94,6 @@ public class ClusteringIndexSliceFilter extends AbstractClusteringIndexFilter // the range extend) and it's harmless to leave them. class FilterNotIndexed extends Transformation { -public boolean isDoneForPartition() -{ -return tester.isDone(); -} - @Override public Row applyToRow(Row row) {
cassandra git commit: remove dead code
Repository: cassandra Updated Branches: refs/heads/trunk fe5ef557c -> f2251aa41 remove dead code Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f2251aa4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f2251aa4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f2251aa4 Branch: refs/heads/trunk Commit: f2251aa41a766bf65363540608909238685a6b1a Parents: fe5ef55 Author: Dave Brosius Authored: Wed Jun 15 20:29:34 2016 -0400 Committer: Dave Brosius Committed: Wed Jun 15 20:29:34 2016 -0400 -- src/java/org/apache/cassandra/db/view/View.java | 8 1 file changed, 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2251aa4/src/java/org/apache/cassandra/db/view/View.java -- diff --git a/src/java/org/apache/cassandra/db/view/View.java b/src/java/org/apache/cassandra/db/view/View.java index 771c242..8babc99 100644 --- a/src/java/org/apache/cassandra/db/view/View.java +++ b/src/java/org/apache/cassandra/db/view/View.java @@ -17,9 +17,7 @@ */ package org.apache.cassandra.db.view; -import java.nio.ByteBuffer; import java.util.*; -import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import javax.annotation.Nullable; @@ -31,16 +29,11 @@ import org.apache.cassandra.cql3.statements.ParsedStatement; import org.apache.cassandra.cql3.statements.SelectStatement; import org.apache.cassandra.db.*; import org.apache.cassandra.config.*; -import org.apache.cassandra.cql3.ColumnIdentifier; import org.apache.cassandra.db.compaction.CompactionManager; -import org.apache.cassandra.db.partitions.*; import org.apache.cassandra.db.rows.*; import org.apache.cassandra.schema.KeyspaceMetadata; import org.apache.cassandra.service.ClientState; -import org.apache.cassandra.service.pager.QueryPager; -import org.apache.cassandra.transport.Server; import org.apache.cassandra.utils.FBUtilities; -import org.apache.cassandra.utils.btree.BTreeSet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -96,7 +89,6 @@ public class View { this.definition = definition; -CFMetaData viewCfm = definition.metadata; List nonPKDefPartOfViewPK = new ArrayList<>(); for (ColumnDefinition baseColumn : baseCfs.metadata.allColumns()) {
[1/5] cassandra git commit: Remove dead code
Repository: cassandra Updated Branches: refs/heads/trunk 966bea74b -> 829b9b78c Remove dead code Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6a86d221 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6a86d221 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6a86d221 Branch: refs/heads/trunk Commit: 6a86d221a5b4dc11784a022917d0e4c6845e03aa Parents: 796b0f2 Author: Sylvain Lebresne Authored: Wed Sep 2 17:22:53 2015 +0200 Committer: Sylvain Lebresne Committed: Wed Sep 2 17:22:53 2015 +0200 -- src/java/org/apache/cassandra/db/ReadCommand.java | 9 - 1 file changed, 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6a86d221/src/java/org/apache/cassandra/db/ReadCommand.java -- diff --git a/src/java/org/apache/cassandra/db/ReadCommand.java b/src/java/org/apache/cassandra/db/ReadCommand.java index 0bc8cea..0ccd229 100644 --- a/src/java/org/apache/cassandra/db/ReadCommand.java +++ b/src/java/org/apache/cassandra/db/ReadCommand.java @@ -971,21 +971,12 @@ public abstract class ReadCommand implements ReadQuery LegacyLayout.LegacyBound startBound = LegacyLayout.decodeBound(metadata, ByteBufferUtil.readWithShortLength(in), true); ByteBufferUtil.readWithShortLength(in); // the composite "stop", which isn't actually needed -// pre-3.0 nodes will sometimes use a clustering prefix for the Command-level start and stop, but in all -// cases this should also be represented by the ClusteringIndexFilter, so we can ignore them -Clustering startClustering; -if (startBound == LegacyLayout.LegacyBound.BOTTOM || startBound.bound.size() < metadata.comparator.size()) -startClustering = Clustering.EMPTY; -else -startClustering = startBound.getAsClustering(metadata); - ColumnFilter selection = LegacyRangeSliceCommandSerializer.getColumnSelectionForSlice(filter, compositesToGroup, metadata); RowFilter rowFilter = LegacyRangeSliceCommandSerializer.deserializeRowFilter(in, metadata); int maxResults = in.readInt(); in.readBoolean(); // countCQL3Rows - boolean selectsStatics = (!selection.fetchedColumns().statics.isEmpty() || filter.selects(Clustering.STATIC_CLUSTERING)); boolean isDistinct = compositesToGroup == -2 || (perPartitionLimit == 1 && selectsStatics); DataLimits limits;
cassandra git commit: Remove dead code
Repository: cassandra Updated Branches: refs/heads/cassandra-3.0 796b0f26a -> 6a86d221a Remove dead code Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6a86d221 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6a86d221 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6a86d221 Branch: refs/heads/cassandra-3.0 Commit: 6a86d221a5b4dc11784a022917d0e4c6845e03aa Parents: 796b0f2 Author: Sylvain Lebresne Authored: Wed Sep 2 17:22:53 2015 +0200 Committer: Sylvain Lebresne Committed: Wed Sep 2 17:22:53 2015 +0200 -- src/java/org/apache/cassandra/db/ReadCommand.java | 9 - 1 file changed, 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6a86d221/src/java/org/apache/cassandra/db/ReadCommand.java -- diff --git a/src/java/org/apache/cassandra/db/ReadCommand.java b/src/java/org/apache/cassandra/db/ReadCommand.java index 0bc8cea..0ccd229 100644 --- a/src/java/org/apache/cassandra/db/ReadCommand.java +++ b/src/java/org/apache/cassandra/db/ReadCommand.java @@ -971,21 +971,12 @@ public abstract class ReadCommand implements ReadQuery LegacyLayout.LegacyBound startBound = LegacyLayout.decodeBound(metadata, ByteBufferUtil.readWithShortLength(in), true); ByteBufferUtil.readWithShortLength(in); // the composite "stop", which isn't actually needed -// pre-3.0 nodes will sometimes use a clustering prefix for the Command-level start and stop, but in all -// cases this should also be represented by the ClusteringIndexFilter, so we can ignore them -Clustering startClustering; -if (startBound == LegacyLayout.LegacyBound.BOTTOM || startBound.bound.size() < metadata.comparator.size()) -startClustering = Clustering.EMPTY; -else -startClustering = startBound.getAsClustering(metadata); - ColumnFilter selection = LegacyRangeSliceCommandSerializer.getColumnSelectionForSlice(filter, compositesToGroup, metadata); RowFilter rowFilter = LegacyRangeSliceCommandSerializer.deserializeRowFilter(in, metadata); int maxResults = in.readInt(); in.readBoolean(); // countCQL3Rows - boolean selectsStatics = (!selection.fetchedColumns().statics.isEmpty() || filter.selects(Clustering.STATIC_CLUSTERING)); boolean isDistinct = compositesToGroup == -2 || (perPartitionLimit == 1 && selectsStatics); DataLimits limits;
cassandra git commit: remove dead code
Repository: cassandra Updated Branches: refs/heads/trunk f55a4f451 -> 48c25ba2e remove dead code Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/48c25ba2 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/48c25ba2 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/48c25ba2 Branch: refs/heads/trunk Commit: 48c25ba2e6595331191b8bdb7787bf8a593d8607 Parents: f55a4f4 Author: Dave Brosius Authored: Thu May 28 22:34:00 2015 -0400 Committer: Dave Brosius Committed: Thu May 28 22:34:00 2015 -0400 -- .../cassandra/cql3/statements/DropFunctionStatement.java | 8 1 file changed, 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/48c25ba2/src/java/org/apache/cassandra/cql3/statements/DropFunctionStatement.java -- diff --git a/src/java/org/apache/cassandra/cql3/statements/DropFunctionStatement.java b/src/java/org/apache/cassandra/cql3/statements/DropFunctionStatement.java index edd8a65..3957d97 100644 --- a/src/java/org/apache/cassandra/cql3/statements/DropFunctionStatement.java +++ b/src/java/org/apache/cassandra/cql3/statements/DropFunctionStatement.java @@ -162,14 +162,6 @@ public final class DropFunctionStatement extends SchemaAlteringStatement return sb.toString(); } -private String typeKeyspace(CQL3Type.Raw rawType) -{ -String ks = rawType.keyspace(); -if (ks != null) -return ks; -return functionName.keyspace; -} - private Function findFunction() { Function old;
cassandra git commit: remove dead code
Repository: cassandra Updated Branches: refs/heads/trunk 792446a5a -> 5023e620d remove dead code Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5023e620 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5023e620 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5023e620 Branch: refs/heads/trunk Commit: 5023e620db0c975150d40dbd4c4bc86200c3527d Parents: 792446a Author: Dave Brosius Authored: Thu Apr 23 22:55:35 2015 -0400 Committer: Dave Brosius Committed: Thu Apr 23 22:55:35 2015 -0400 -- .../apache/cassandra/serializers/ListSerializer.java | 14 -- .../apache/cassandra/serializers/MapSerializer.java | 15 --- .../apache/cassandra/serializers/SetSerializer.java | 13 - 3 files changed, 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/5023e620/src/java/org/apache/cassandra/serializers/ListSerializer.java -- diff --git a/src/java/org/apache/cassandra/serializers/ListSerializer.java b/src/java/org/apache/cassandra/serializers/ListSerializer.java index 2bbb6d4..aeee2b9 100644 --- a/src/java/org/apache/cassandra/serializers/ListSerializer.java +++ b/src/java/org/apache/cassandra/serializers/ListSerializer.java @@ -112,20 +112,6 @@ public class ListSerializer extends CollectionSerializer> } /** - * Deserializes a serialized list and returns a list of unserialized (ByteBuffer) elements. - */ -public List deserializeToByteBufferCollection(ByteBuffer bytes, int version) -{ -ByteBuffer input = bytes.duplicate(); -int n = readCollectionSize(input, version); -List l = new ArrayList<>(n); -for (int i = 0; i < n; i++) -l.add(readValue(input, version)); - -return l; -} - -/** * Returns the element at the given index in a list. * @param serializedList a serialized list * @param index the index to get http://git-wip-us.apache.org/repos/asf/cassandra/blob/5023e620/src/java/org/apache/cassandra/serializers/MapSerializer.java -- diff --git a/src/java/org/apache/cassandra/serializers/MapSerializer.java b/src/java/org/apache/cassandra/serializers/MapSerializer.java index 87b620a..8350f66 100644 --- a/src/java/org/apache/cassandra/serializers/MapSerializer.java +++ b/src/java/org/apache/cassandra/serializers/MapSerializer.java @@ -116,21 +116,6 @@ public class MapSerializer extends CollectionSerializer> } /** - * Deserializes a serialized map and returns a map of unserialized (ByteBuffer) keys and values. - */ -public Map deserializeToByteBufferCollection(ByteBuffer bytes, int protocolVersion) -{ -ByteBuffer input = bytes.duplicate(); -int n = readCollectionSize(input, protocolVersion); -Map m = new LinkedHashMap<>(n); - -for (int i = 0; i < n; i++) -m.put(readValue(input, protocolVersion), readValue(input, protocolVersion)); - -return m; -} - -/** * Given a serialized map, gets the value associated with a given key. * @param serializedMap a serialized map * @param serializedKey a serialized key http://git-wip-us.apache.org/repos/asf/cassandra/blob/5023e620/src/java/org/apache/cassandra/serializers/SetSerializer.java -- diff --git a/src/java/org/apache/cassandra/serializers/SetSerializer.java b/src/java/org/apache/cassandra/serializers/SetSerializer.java index 970cfab..21f5075 100644 --- a/src/java/org/apache/cassandra/serializers/SetSerializer.java +++ b/src/java/org/apache/cassandra/serializers/SetSerializer.java @@ -98,19 +98,6 @@ public class SetSerializer extends CollectionSerializer> } } -/** - * Deserializes a serialized set and returns a set of unserialized (ByteBuffer) elements. - */ -public Set deserializeToByteBufferCollection(ByteBuffer bytes, int version) -{ -ByteBuffer input = bytes.duplicate(); -int n = readCollectionSize(input, version); -Set s = new LinkedHashSet<>(n); -for (int i = 0; i < n; i++) -s.add(readValue(input, version)); -return s; -} - public String toString(Set value) { StringBuilder sb = new StringBuilder();
cassandra git commit: remove dead code left over from removal of commitlog_periodic_queue_size setting see cassandra-8697
Repository: cassandra Updated Branches: refs/heads/trunk 5de72e548 -> 9bba842c1 remove dead code left over from removal of commitlog_periodic_queue_size setting see cassandra-8697 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9bba842c Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9bba842c Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9bba842c Branch: refs/heads/trunk Commit: 9bba842c1c50bf944f449d2662a54284b4d5f74b Parents: 5de72e5 Author: Dave Brosius Authored: Fri Apr 17 02:03:00 2015 -0400 Committer: Dave Brosius Committed: Fri Apr 17 02:03:00 2015 -0400 -- src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 5 - 1 file changed, 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/9bba842c/src/java/org/apache/cassandra/config/DatabaseDescriptor.java -- diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java index fd1faeb..76ef4c5 100644 --- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java +++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java @@ -1274,11 +1274,6 @@ public class DatabaseDescriptor conf.commitlog_sync_period_in_ms = periodMillis; } -public static int getCommitLogPeriodicQueueSize() -{ -return conf.commitlog_periodic_queue_size; -} - public static Config.CommitLogSync getCommitLogSync() { return conf.commitlog_sync;
cassandra git commit: remove dead code
Repository: cassandra Updated Branches: refs/heads/trunk e4b158f6a -> 7f0a8542d remove dead code Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7f0a8542 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7f0a8542 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7f0a8542 Branch: refs/heads/trunk Commit: 7f0a8542d684d3bd9b597b5eab332355315c4942 Parents: e4b158f Author: Dave Brosius Authored: Tue Mar 31 23:53:31 2015 -0400 Committer: Dave Brosius Committed: Tue Mar 31 23:53:31 2015 -0400 -- src/java/org/apache/cassandra/thrift/CassandraServer.java | 7 --- 1 file changed, 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7f0a8542/src/java/org/apache/cassandra/thrift/CassandraServer.java -- diff --git a/src/java/org/apache/cassandra/thrift/CassandraServer.java b/src/java/org/apache/cassandra/thrift/CassandraServer.java index e92e0c6..c6d2600 100644 --- a/src/java/org/apache/cassandra/thrift/CassandraServer.java +++ b/src/java/org/apache/cassandra/thrift/CassandraServer.java @@ -581,13 +581,6 @@ public class CassandraServer implements Cassandra.Iface } } -private static ByteBuffer getName(ColumnOrSuperColumn cosc) -{ -return cosc.isSetSuper_column() ? cosc.super_column.name : - (cosc.isSetColumn() ? cosc.column.name : - (cosc.isSetCounter_column() ? cosc.counter_column.name : cosc.counter_super_column.name)); -} - public Map multiget_count(List keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException {
cassandra git commit: remove dead code
Repository: cassandra Updated Branches: refs/heads/trunk c0fc8d823 -> 7ea642c89 remove dead code Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7ea642c8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7ea642c8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7ea642c8 Branch: refs/heads/trunk Commit: 7ea642c89c124f0515754ceb8a163370e8d74578 Parents: c0fc8d8 Author: Dave Brosius Authored: Sun Mar 29 20:35:24 2015 -0400 Committer: Dave Brosius Committed: Sun Mar 29 20:35:24 2015 -0400 -- src/java/org/apache/cassandra/utils/IntervalTree.java | 9 - 1 file changed, 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7ea642c8/src/java/org/apache/cassandra/utils/IntervalTree.java -- diff --git a/src/java/org/apache/cassandra/utils/IntervalTree.java b/src/java/org/apache/cassandra/utils/IntervalTree.java index 0c3c611..4522e27 100644 --- a/src/java/org/apache/cassandra/utils/IntervalTree.java +++ b/src/java/org/apache/cassandra/utils/IntervalTree.java @@ -47,19 +47,10 @@ public class IntervalTree, D, I extends Interval protected IntervalTree(Collection intervals) { -final IntervalTree it = this; this.head = intervals == null || intervals.isEmpty() ? null : new IntervalNode(intervals); this.count = intervals == null ? 0 : intervals.size(); } -public static , D, I extends Interval> IntervalTree build(Collection intervals, Comparator comparator) -{ -if (intervals == null || intervals.isEmpty()) -return emptyTree(); - -return new IntervalTree(intervals); -} - public static , D, I extends Interval> IntervalTree build(Collection intervals) { if (intervals == null || intervals.isEmpty())
cassandra git commit: remove dead code
Repository: cassandra Updated Branches: refs/heads/trunk 5a09483df -> 45259f095 remove dead code Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/45259f09 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/45259f09 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/45259f09 Branch: refs/heads/trunk Commit: 45259f0958b5b8b43af0d399bb71c24bf9b53322 Parents: 5a09483 Author: Dave Brosius Authored: Tue Mar 17 22:17:21 2015 -0400 Committer: Dave Brosius Committed: Tue Mar 17 22:17:21 2015 -0400 -- .../org/apache/cassandra/db/DataTracker.java | 18 +- .../apache/cassandra/service/StorageService.java | 19 --- 2 files changed, 1 insertion(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/45259f09/src/java/org/apache/cassandra/db/DataTracker.java -- diff --git a/src/java/org/apache/cassandra/db/DataTracker.java b/src/java/org/apache/cassandra/db/DataTracker.java index 19f027c..ca96a38 100644 --- a/src/java/org/apache/cassandra/db/DataTracker.java +++ b/src/java/org/apache/cassandra/db/DataTracker.java @@ -205,7 +205,7 @@ public class DataTracker if (Iterables.any(sstables, Predicates.in(currentView.compacting))) return false; -Predicate live = new Predicate() +Predicate live = new Predicate() { public boolean apply(SSTableReader sstable) { @@ -774,22 +774,6 @@ public class DataTracker return new View(liveMemtables, flushingMemtables, sstablesMap, compactingNew, shadowed, intervalTree); } -private Set newSSTables(Collection oldSSTables, Iterable replacements) -{ -ImmutableSet oldSet = ImmutableSet.copyOf(oldSSTables); -int newSSTablesSize = sstables.size() - oldSSTables.size() + Iterables.size(replacements); -assert newSSTablesSize >= Iterables.size(replacements) : String.format("Incoherent new size %d replacing %s by %s in %s", newSSTablesSize, oldSSTables, replacements, this); -Set newSSTables = new HashSet<>(newSSTablesSize); - -for (SSTableReader sstable : sstables) -if (!oldSet.contains(sstable)) -newSSTables.add(sstable); - -Iterables.addAll(newSSTables, replacements); -assert newSSTables.size() == newSSTablesSize : String.format("Expecting new size of %d, got %d while replacing %s by %s in %s", newSSTablesSize, newSSTables.size(), oldSSTables, replacements, this); -return ImmutableSet.copyOf(newSSTables); -} - @Override public String toString() { http://git-wip-us.apache.org/repos/asf/cassandra/blob/45259f09/src/java/org/apache/cassandra/service/StorageService.java -- diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java index 19e0a5a..b1f352c 100644 --- a/src/java/org/apache/cassandra/service/StorageService.java +++ b/src/java/org/apache/cassandra/service/StorageService.java @@ -2600,7 +2600,6 @@ public class StorageService extends NotificationBroadcasterSupport implements IE * @param endToken end token of the range * @return collection of ranges that match ring layout in TokenMetadata */ -@SuppressWarnings("unchecked") @VisibleForTesting Collection> createRepairRangeFrom(String beginToken, String endToken) { @@ -3631,24 +3630,6 @@ public class StorageService extends NotificationBroadcasterSupport implements IE return finalOwnership; } - -private boolean hasSameReplication(List list) -{ -if (list.isEmpty()) -return false; - -for (int i = 0; i < list.size() -1; i++) -{ -KSMetaData ksm1 = Schema.instance.getKSMetaData(list.get(i)); -KSMetaData ksm2 = Schema.instance.getKSMetaData(list.get(i + 1)); -if (!ksm1.strategyClass.equals(ksm2.strategyClass) || - !Iterators.elementsEqual(ksm1.strategyOptions.entrySet().iterator(), - ksm2.strategyOptions.entrySet().iterator())) -return false; -} -return true; -} - public List getKeyspaces() { List keyspaceNamesList = new ArrayList<>(Schema.instance.getKeyspaces());
cassandra git commit: remove dead code
Repository: cassandra Updated Branches: refs/heads/trunk 217721ae9 -> ca41972ea remove dead code Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ca41972e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ca41972e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ca41972e Branch: refs/heads/trunk Commit: ca41972ea011ee9e082c02afb1c37e1151b8cd2d Parents: 217721a Author: Dave Brosius Authored: Fri Feb 6 08:13:44 2015 -0500 Committer: Dave Brosius Committed: Fri Feb 6 08:13:44 2015 -0500 -- .../org/apache/cassandra/service/StorageServiceServerTest.java | 2 -- 1 file changed, 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ca41972e/test/unit/org/apache/cassandra/service/StorageServiceServerTest.java -- diff --git a/test/unit/org/apache/cassandra/service/StorageServiceServerTest.java b/test/unit/org/apache/cassandra/service/StorageServiceServerTest.java index d1a4d85..a20fa6c 100644 --- a/test/unit/org/apache/cassandra/service/StorageServiceServerTest.java +++ b/test/unit/org/apache/cassandra/service/StorageServiceServerTest.java @@ -476,8 +476,6 @@ public class StorageServiceServerTest metadata.updateNormalToken(new LongToken(3000L), InetAddress.getByName("127.0.0.3")); metadata.updateNormalToken(new LongToken(4000L), InetAddress.getByName("127.0.0.4")); -Map configOptions = new HashMap(); -configOptions.put("replication_factor", "3"); Collection> repairRangeFrom = StorageService.instance.createRepairRangeFrom("1500", "3700"); assert repairRangeFrom.size() == 3; assert repairRangeFrom.contains(new Range(new LongToken(1500L), new LongToken(2000L)));
cassandra git commit: remove dead code
Repository: cassandra Updated Branches: refs/heads/trunk 64e39a039 -> 02367e78b remove dead code Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/02367e78 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/02367e78 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/02367e78 Branch: refs/heads/trunk Commit: 02367e78b573925a864ab8f94ba0a69950ca74f5 Parents: 64e39a0 Author: Dave Brosius Authored: Tue Jan 27 20:35:18 2015 -0500 Committer: Dave Brosius Committed: Tue Jan 27 20:36:45 2015 -0500 -- test/unit/org/apache/cassandra/Util.java | 37 --- 1 file changed, 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/02367e78/test/unit/org/apache/cassandra/Util.java -- diff --git a/test/unit/org/apache/cassandra/Util.java b/test/unit/org/apache/cassandra/Util.java index cdb7ac6..24e334a 100644 --- a/test/unit/org/apache/cassandra/Util.java +++ b/test/unit/org/apache/cassandra/Util.java @@ -211,27 +211,6 @@ public class Util return cfStore.getColumnFamily(QueryFilter.getIdentityFilter(key, cfName, System.currentTimeMillis())); } -public static byte[] concatByteArrays(byte[] first, byte[]... remaining) -{ -int length = first.length; -for (byte[] array : remaining) -{ -length += array.length; -} - -byte[] result = new byte[length]; -System.arraycopy(first, 0, result, 0, first.length); -int offset = first.length; - -for (byte[] array : remaining) -{ -System.arraycopy(array, 0, result, offset, array.length); -offset += array.length; -} - -return result; -} - public static boolean equalsCounterId(CounterId n, ByteBuffer context, int offset) { return CounterId.wrap(context, context.position() + offset).equals(n); @@ -313,22 +292,6 @@ public class Util assert thrown : exception.getName() + " not received"; } -public static ByteBuffer serializeForSSTable(ColumnFamily cf) -{ -try -{ -DataOutputBuffer out = new DataOutputBuffer(); - DeletionTime.serializer.serialize(cf.deletionInfo().getTopLevelDeletion(), out); -out.writeInt(cf.getColumnCount()); -new ColumnIndex.Builder(cf, ByteBufferUtil.EMPTY_BYTE_BUFFER, out).build(cf); -return ByteBuffer.wrap(out.toByteArray()); -} -catch (IOException e) -{ -throw new RuntimeException(e); -} -} - public static QueryFilter namesQueryFilter(ColumnFamilyStore cfs, DecoratedKey key) { SortedSet s = new TreeSet(cfs.getComparator());