diff --git a/.build/cassandra-deps-template.xml b/.build/cassandra-deps-template.xml index a9a713f101..79593cf36f 100644 --- a/.build/cassandra-deps-template.xml +++ b/.build/cassandra-deps-template.xml @@ -48,10 +48,6 @@ org.lz4 lz4-java - - com.ning - compress-lzf - com.google.guava guava diff --git a/.build/checkstyle.xml b/.build/checkstyle.xml index 2998ebe428..70ea98381d 100644 --- a/.build/checkstyle.xml +++ b/.build/checkstyle.xml @@ -94,7 +94,7 @@ - + diff --git a/.build/parent-pom-template.xml b/.build/parent-pom-template.xml index 4c9f72e8ec..74e4c01b34 100644 --- a/.build/parent-pom-template.xml +++ b/.build/parent-pom-template.xml @@ -298,12 +298,6 @@ lz4-java 1.8.0 - - com.ning - compress-lzf - 0.8.4 - provided - com.github.luben zstd-jni @@ -618,6 +612,8 @@ + org.jboss.byteman byteman-install @@ -646,11 +642,13 @@ net.bytebuddy byte-buddy ${bytebuddy.version} + test net.bytebuddy byte-buddy-agent ${bytebuddy.version} + test org.openjdk.jmh diff --git a/src/java/org/apache/cassandra/db/streaming/CassandraStreamWriter.java b/src/java/org/apache/cassandra/db/streaming/CassandraStreamWriter.java index 3e98c7dbda..cae6fefb2d 100644 --- a/src/java/org/apache/cassandra/db/streaming/CassandraStreamWriter.java +++ b/src/java/org/apache/cassandra/db/streaming/CassandraStreamWriter.java @@ -70,8 +70,6 @@ public class CassandraStreamWriter /** * Stream file of specified sections to given channel. * - * CassandraStreamWriter uses LZF compression on wire to decrease size to transfer. - * * @param out 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