diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FirstKeyValueMatchingQualifiersFilter.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FirstKeyValueMatchingQualifiersFilter.java deleted file mode 100644 index 67354b304f5a..000000000000 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FirstKeyValueMatchingQualifiersFilter.java +++ /dev/null @@ -1,47 +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.hadoop.hbase.filter; - -import org.apache.hadoop.hbase.exceptions.DeserializationException; -import org.apache.yetus.audience.InterfaceAudience; - -/** - * This filter was deprecated in 2.0.0 and should be removed in 3.0.0. We keep the code here to - * prevent the proto serialization exceptions puzzle those users who use older version clients to - * communicate with newer version servers. - * @deprecated Deprecated in 2.0.0 and will be removed in 3.0.0. - * @see HBASE-13347 - */ -@InterfaceAudience.Public -@Deprecated -public class FirstKeyValueMatchingQualifiersFilter extends FirstKeyOnlyFilter { - - /** - * Parses a serialized representation of {@link FirstKeyValueMatchingQualifiersFilter} - * @param pbBytes A pb serialized {@link FirstKeyValueMatchingQualifiersFilter} instance - * @return An instance of {@link FirstKeyValueMatchingQualifiersFilter} made from - * bytes - * @throws DeserializationException if an error occurred - * @see #toByteArray - */ - public static FirstKeyValueMatchingQualifiersFilter parseFrom(final byte[] pbBytes) - throws DeserializationException { - throw new DeserializationException( - "Stop using FirstKeyValueMatchingQualifiersFilter, which has been permanently removed"); - } -} diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java index 1d50bfa37ba0..299f833c7c81 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java @@ -21,7 +21,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -39,7 +38,6 @@ import org.apache.hadoop.hbase.filter.ColumnRangeFilter; import org.apache.hadoop.hbase.filter.Filter; import org.apache.hadoop.hbase.filter.FirstKeyOnlyFilter; -import org.apache.hadoop.hbase.filter.FirstKeyValueMatchingQualifiersFilter; import org.apache.hadoop.hbase.filter.RandomRowFilter; import org.apache.hadoop.hbase.testclassification.LargeTests; import org.apache.hadoop.hbase.util.Bytes; @@ -774,10 +772,6 @@ public void testPartialResultsWithColumnFilter() throws Exception { testPartialResultsWithColumnFilter(new ColumnPrefixFilter(Bytes.toBytes("testQualifier5"))); testPartialResultsWithColumnFilter(new ColumnRangeFilter(Bytes.toBytes("testQualifer1"), true, Bytes.toBytes("testQualifier7"), true)); - - // Throw an Exception to the old version client to remind them not to use this filter anymore - assertThrows("Stop using", DoNotRetryIOException.class, - () -> testPartialResultsWithColumnFilter(new FirstKeyValueMatchingQualifiersFilter())); } public void testPartialResultsWithColumnFilter(Filter filter) throws Exception {