diff --git a/build.xml b/build.xml index 23fc59f947..9c9447acf2 100644 --- a/build.xml +++ b/build.xml @@ -527,7 +527,6 @@ - @@ -591,13 +590,15 @@ + - - + + @@ -785,7 +786,6 @@ - diff --git a/src/java/org/apache/cassandra/db/streaming/CassandraStreamWriter.java b/src/java/org/apache/cassandra/db/streaming/CassandraStreamWriter.java index 6481f4b976..b5b671d269 100644 --- a/src/java/org/apache/cassandra/db/streaming/CassandraStreamWriter.java +++ b/src/java/org/apache/cassandra/db/streaming/CassandraStreamWriter.java @@ -73,8 +73,6 @@ public class CassandraStreamWriter /** * Stream file of specified sections to given channel. * - * CassandraStreamWriter uses LZF compression on wire to decrease size to transfer. - * * @param output where this writes data to * @throws IOException on any I/O error */ diff --git a/src/java/org/apache/cassandra/utils/TestRateLimiter.java b/src/java/org/apache/cassandra/utils/TestRateLimiter.java deleted file mode 100644 index a9eb871a63..0000000000 --- a/src/java/org/apache/cassandra/utils/TestRateLimiter.java +++ /dev/null @@ -1,58 +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.utils; - -import java.util.concurrent.atomic.AtomicReference; - -import com.google.common.annotations.VisibleForTesting; -import com.google.common.util.concurrent.RateLimiter; - -import org.jboss.byteman.rule.Rule; -import org.jboss.byteman.rule.helper.Helper; - -/** - * Helper class to apply rate limiting during fault injection testing; - * for an example script, see test/resources/byteman/mutation_limiter.btm. - */ -@VisibleForTesting -public class TestRateLimiter extends Helper -{ - private static final AtomicReference ref = new AtomicReference<>(); - - protected TestRateLimiter(Rule rule) - { - super(rule); - } - - /** - * Acquires a single unit at the given rate. If the rate changes between calls, a new rate limiter is created - * and the old one is discarded. - */ - public void acquire(double rate) - { - RateLimiter limiter = ref.get(); - if (limiter == null || limiter.getRate() != rate) - { - ref.compareAndSet(limiter, RateLimiter.create(rate)); - limiter = ref.get(); - } - limiter.acquire(1); - } -} diff --git a/test/resources/byteman/mutation_limiter.btm b/test/resources/byteman/mutation_limiter.btm deleted file mode 100644 index fb33b284d7..0000000000 --- a/test/resources/byteman/mutation_limiter.btm +++ /dev/null @@ -1,26 +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. -# - -RULE mutation_limiter -CLASS org.apache.cassandra.db.MutationVerbHandler -METHOD doVerb -HELPER org.apache.cassandra.utils.TestRateLimiter -AT ENTRY -IF TRUE -DO acquire(1000.0) -ENDRULE \ No newline at end of file