This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 8999bc7cb9bb2f1e05977eaa16bd6172f3cf290e
Author: Liangjun He <[email protected]>
AuthorDate: Sun May 12 21:50:38 2024 +0800

    HBASE-28576 Remove FirstKeyValueMatchingQualifiersFilter (#5891)
    
    Signed-off-by: Duo Zhang <[email protected]>
    (cherry picked from commit 328df6abf3e1dca21fe882f4de2329aa9fd40616)
---
 .../FirstKeyValueMatchingQualifiersFilter.java     | 47 ----------------------
 .../hbase/TestPartialResultsFromClientSide.java    |  6 ---
 2 files changed, 53 deletions(-)

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 67354b304f5..00000000000
--- 
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 <a 
href="https://issues.apache.org/jira/browse/HBASE-13347";>HBASE-13347</a>
- */
[email protected]
-@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
-   *         <code>bytes</code>
-   * @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 1d50bfa37ba..299f833c7c8 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.assertArrayEquals;
 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.ColumnPrefixFilter;
 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 class TestPartialResultsFromClientSide {
     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 {

Reply via email to