You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2026/02/25 14:37:34 UTC
(hbase) branch branch-3 updated (25b85b51c11 -> 46d4aed0f57)
This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a change to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hbase.git
from 25b85b51c11 HBASE-29843 HBaseRPCController.setPriority(final TableName tn) is never called on branch-3+ (#7692)
new ea245c5c721 HBASE-29919 Test case TestSecureIPC#testRpcServerDisallowFallbackToSimpleAuth failed (#7794)
new 2faf4cf89b3 HBASE-29915 Rewrite TestMultiRowResource and TestSchemaResource (#7783)
new 46d4aed0f57 HBASE-29874 Removing the useless parameters from ScanQueryMatcher.isCellTTLExpired (#7720)
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../org/apache/hadoop/hbase/rest/RESTServer.java | 6 +--
...Resource.java => MultiRowResourceTestBase.java} | 49 +++++++---------------
...maResource.java => SchemaResourceTestBase.java} | 26 +++---------
.../rest/TestMultiRowResourceCsrfDisabled.java | 15 +++----
.../rest/TestMultiRowResourceCsrfEnabled.java | 15 +++----
.../hbase/rest/TestSchemaResourceCsrfDisabled.java | 17 ++++----
.../hbase/rest/TestSchemaResourceCsrfEnabled.java | 17 ++++----
.../querymatcher/ScanQueryMatcher.java | 5 +--
.../hbase/security/AbstractTestSecureIPC.java | 8 ++--
9 files changed, 61 insertions(+), 97 deletions(-)
rename hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/{TestMultiRowResource.java => MultiRowResourceTestBase.java} (93%)
rename hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/{TestSchemaResource.java => SchemaResourceTestBase.java} (93%)
copy hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java => hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResourceCsrfDisabled.java (74%)
copy hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java => hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResourceCsrfEnabled.java (74%)
copy hbase-client/src/main/java/org/apache/hadoop/hbase/security/SaslStatus.java => hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSchemaResourceCsrfDisabled.java (75%)
copy hbase-client/src/main/java/org/apache/hadoop/hbase/security/SaslStatus.java => hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSchemaResourceCsrfEnabled.java (75%)
(hbase) 02/03: HBASE-29915 Rewrite TestMultiRowResource and TestSchemaResource (#7783)
Posted by zh...@apache.org.
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 2faf4cf89b316db3f53c13a060f1594d9d81ed9a
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Wed Feb 25 21:07:21 2026 +0800
HBASE-29915 Rewrite TestMultiRowResource and TestSchemaResource (#7783)
Signed-off-by: Dávid Paksy <pa...@apache.org>
Signed-off-by: Nick Dimiduk <nd...@apache.org>
Reviewed-by: Liu Xiao <li...@qq.com>
(cherry picked from commit 64be26f07496a46d607af0df30fabb10fba99022)
---
.../org/apache/hadoop/hbase/rest/RESTServer.java | 6 +--
...Resource.java => MultiRowResourceTestBase.java} | 49 +++++++---------------
...maResource.java => SchemaResourceTestBase.java} | 26 +++---------
.../rest/TestMultiRowResourceCsrfDisabled.java | 34 +++++++++++++++
.../rest/TestMultiRowResourceCsrfEnabled.java | 34 +++++++++++++++
.../hbase/rest/TestSchemaResourceCsrfDisabled.java | 29 +++++++++++++
.../hbase/rest/TestSchemaResourceCsrfEnabled.java | 29 +++++++++++++
7 files changed, 150 insertions(+), 57 deletions(-)
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java
index 666c994d692..149d634cbd5 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java
@@ -55,10 +55,10 @@ import org.slf4j.LoggerFactory;
import org.apache.hbase.thirdparty.com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
import org.apache.hbase.thirdparty.com.google.common.base.Preconditions;
import org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine;
+import org.apache.hbase.thirdparty.org.apache.commons.cli.DefaultParser;
import org.apache.hbase.thirdparty.org.apache.commons.cli.HelpFormatter;
import org.apache.hbase.thirdparty.org.apache.commons.cli.Options;
import org.apache.hbase.thirdparty.org.apache.commons.cli.ParseException;
-import org.apache.hbase.thirdparty.org.apache.commons.cli.PosixParser;
import org.apache.hbase.thirdparty.org.eclipse.jetty.ee8.servlet.FilterHolder;
import org.apache.hbase.thirdparty.org.eclipse.jetty.ee8.servlet.ServletContextHandler;
import org.apache.hbase.thirdparty.org.eclipse.jetty.ee8.servlet.ServletHolder;
@@ -132,7 +132,7 @@ public class RESTServer implements Constants {
System.exit(exitCode);
}
- void addCSRFFilter(ServletContextHandler ctxHandler, Configuration conf) {
+ private void addCSRFFilter(ServletContextHandler ctxHandler, Configuration conf) {
restCSRFEnabled = conf.getBoolean(REST_CSRF_ENABLED_KEY, REST_CSRF_ENABLED_DEFAULT);
if (restCSRFEnabled) {
Map<String, String> restCsrfParams =
@@ -181,7 +181,7 @@ public class RESTServer implements Constants {
CommandLine commandLine = null;
try {
- commandLine = new PosixParser().parse(options, args);
+ commandLine = new DefaultParser().parse(options, args);
} catch (ParseException e) {
LOG.error("Could not parse: ", e);
printUsageAndExit(options, -1);
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/MultiRowResourceTestBase.java
similarity index 93%
rename from hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java
rename to hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/MultiRowResourceTestBase.java
index ef9d7d8084c..1e66ee735cf 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/MultiRowResourceTestBase.java
@@ -25,9 +25,7 @@ import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.Base64.Encoder;
-import java.util.stream.Stream;
import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseParameterizedTestTemplate;
import org.apache.hadoop.hbase.HBaseTestingUtil;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Admin;
@@ -40,24 +38,16 @@ import org.apache.hadoop.hbase.rest.client.Response;
import org.apache.hadoop.hbase.rest.model.CellModel;
import org.apache.hadoop.hbase.rest.model.CellSetModel;
import org.apache.hadoop.hbase.rest.model.RowModel;
-import org.apache.hadoop.hbase.testclassification.MediumTests;
-import org.apache.hadoop.hbase.testclassification.RestTests;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.http.Header;
import org.apache.http.message.BasicHeader;
import org.junit.jupiter.api.AfterAll;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Tag;
-import org.junit.jupiter.api.TestTemplate;
-import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.api.Test;
import org.apache.hbase.thirdparty.com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
-@Tag(RestTests.TAG)
-@Tag(MediumTests.TAG)
-@HBaseParameterizedTestTemplate(name = "{index}: csrfEnabled = {0}")
-public class TestMultiRowResource {
+public class MultiRowResourceTestBase {
private static final TableName TABLE = TableName.valueOf("TestRowResource");
private static final String CFA = "a";
@@ -78,21 +68,12 @@ public class TestMultiRowResource {
private static Configuration conf;
private static Header extraHdr = null;
- private static boolean csrfEnabled = true;
+ protected static boolean csrfEnabled = true;
- public TestMultiRowResource(boolean csrf) {
- csrfEnabled = csrf;
- }
-
- public static Stream<Arguments> parameters() {
- return Stream.of(Arguments.of(false), Arguments.of(true));
- }
-
- @BeforeAll
- public static void setUpBeforeClass() throws Exception {
+ protected static void initialize() throws Exception {
conf = TEST_UTIL.getConfiguration();
- conf.setBoolean(RESTServer.REST_CSRF_ENABLED_KEY, TestMultiRowResource.csrfEnabled);
- if (TestMultiRowResource.csrfEnabled) {
+ conf.setBoolean(RESTServer.REST_CSRF_ENABLED_KEY, csrfEnabled);
+ if (csrfEnabled) {
conf.set(RESTServer.REST_CSRF_BROWSER_USERAGENTS_REGEX_KEY, ".*");
}
extraHdr = new BasicHeader(RESTServer.REST_CSRF_CUSTOM_HEADER_DEFAULT, "");
@@ -113,12 +94,12 @@ public class TestMultiRowResource {
}
@AfterAll
- public static void tearDownAfterClass() throws Exception {
+ public static void tearDownAfterAll() throws Exception {
REST_TEST_UTIL.shutdownServletContainer();
TEST_UTIL.shutdownMiniCluster();
}
- @TestTemplate
+ @Test
public void testMultiCellGetJSON() throws IOException {
String row_5_url = "/" + TABLE + "/" + ROW_1 + "/" + COLUMN_1;
String row_6_url = "/" + TABLE + "/" + ROW_2 + "/" + COLUMN_2;
@@ -171,7 +152,7 @@ public class TestMultiRowResource {
}
// See https://issues.apache.org/jira/browse/HBASE-28174
- @TestTemplate
+ @Test
public void testMultiCellGetJSONB64() throws IOException {
String row_5_url = "/" + TABLE + "/" + ROW_1 + "/" + COLUMN_1;
String row_6_url = "/" + TABLE + "/" + ROW_2 + "/" + COLUMN_2;
@@ -217,7 +198,7 @@ public class TestMultiRowResource {
client.delete(row_6_url, extraHdr);
}
- @TestTemplate
+ @Test
public void testMultiCellGetNoKeys() throws IOException {
StringBuilder path = new StringBuilder();
path.append("/");
@@ -228,7 +209,7 @@ public class TestMultiRowResource {
assertEquals(404, response.getCode());
}
- @TestTemplate
+ @Test
public void testMultiCellGetXML() throws IOException {
String row_5_url = "/" + TABLE + "/" + ROW_1 + "/" + COLUMN_1;
String row_6_url = "/" + TABLE + "/" + ROW_2 + "/" + COLUMN_2;
@@ -252,7 +233,7 @@ public class TestMultiRowResource {
client.delete(row_6_url, extraHdr);
}
- @TestTemplate
+ @Test
public void testMultiCellGetWithColsJSON() throws IOException {
String row_5_url = "/" + TABLE + "/" + ROW_1 + "/" + COLUMN_1;
String row_6_url = "/" + TABLE + "/" + ROW_2 + "/" + COLUMN_2;
@@ -285,7 +266,7 @@ public class TestMultiRowResource {
client.delete(row_6_url, extraHdr);
}
- @TestTemplate
+ @Test
public void testMultiCellGetJSONNotFound() throws IOException {
String row_5_url = "/" + TABLE + "/" + ROW_1 + "/" + COLUMN_1;
@@ -309,7 +290,7 @@ public class TestMultiRowResource {
client.delete(row_5_url, extraHdr);
}
- @TestTemplate
+ @Test
public void testMultiCellGetWithColsInQueryPathJSON() throws IOException {
String row_5_url = "/" + TABLE + "/" + ROW_1 + "/" + COLUMN_1;
String row_6_url = "/" + TABLE + "/" + ROW_2 + "/" + COLUMN_2;
@@ -342,7 +323,7 @@ public class TestMultiRowResource {
client.delete(row_6_url, extraHdr);
}
- @TestTemplate
+ @Test
public void testMultiCellGetFilterJSON() throws IOException {
String row_5_url = "/" + TABLE + "/" + ROW_1 + "/" + COLUMN_1;
String row_6_url = "/" + TABLE + "/" + ROW_2 + "/" + COLUMN_2;
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSchemaResource.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/SchemaResourceTestBase.java
similarity index 93%
rename from hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSchemaResource.java
rename to hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/SchemaResourceTestBase.java
index a7394e96127..0076afc4fbd 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSchemaResource.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/SchemaResourceTestBase.java
@@ -24,11 +24,9 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.StringWriter;
-import java.util.stream.Stream;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseParameterizedTestTemplate;
import org.apache.hadoop.hbase.HBaseTestingUtil;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Admin;
@@ -45,15 +43,12 @@ import org.apache.http.Header;
import org.apache.http.message.BasicHeader;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
-import org.junit.jupiter.api.TestTemplate;
-import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.api.Test;
@Tag(RestTests.TAG)
@Tag(MediumTests.TAG)
-@HBaseParameterizedTestTemplate(name = "{index}: csrfEnabled = {0}")
-public class TestSchemaResource {
+public class SchemaResourceTestBase {
private static String TABLE1 = "TestSchemaResource1";
private static String TABLE2 = "TestSchemaResource2";
@@ -66,18 +61,9 @@ public class TestSchemaResource {
private static TestTableSchemaModel testTableSchemaModel;
private static Header extraHdr = null;
- private static boolean csrfEnabled = true;
+ protected static boolean csrfEnabled = true;
- public TestSchemaResource(boolean csrf) {
- csrfEnabled = csrf;
- }
-
- public static Stream<Arguments> parameters() {
- return Stream.of(Arguments.of(false), Arguments.of(true));
- }
-
- @BeforeAll
- public static void setUpBeforeClass() throws Exception {
+ protected static void initialize() throws Exception {
conf = TEST_UTIL.getConfiguration();
conf.setBoolean(RESTServer.REST_CSRF_ENABLED_KEY, csrfEnabled);
if (csrfEnabled) {
@@ -123,7 +109,7 @@ public class TestSchemaResource {
.unmarshal(new ByteArrayInputStream(content));
}
- @TestTemplate
+ @Test
public void testTableCreateAndDeleteXML() throws IOException, JAXBException {
String schemaPath = "/" + TABLE1 + "/schema";
TableSchemaModel model;
@@ -184,7 +170,7 @@ public class TestSchemaResource {
assertFalse(admin.tableExists(TableName.valueOf(TABLE1)));
}
- @TestTemplate
+ @Test
public void testTableCreateAndDeletePB() throws IOException {
String schemaPath = "/" + TABLE2 + "/schema";
TableSchemaModel model;
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResourceCsrfDisabled.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResourceCsrfDisabled.java
new file mode 100644
index 00000000000..c3b788f7d35
--- /dev/null
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResourceCsrfDisabled.java
@@ -0,0 +1,34 @@
+/*
+ * 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.rest;
+
+import org.apache.hadoop.hbase.testclassification.MediumTests;
+import org.apache.hadoop.hbase.testclassification.RestTests;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Tag;
+
+@Tag(RestTests.TAG)
+@Tag(MediumTests.TAG)
+public class TestMultiRowResourceCsrfDisabled extends MultiRowResourceTestBase {
+
+ @BeforeAll
+ public static void setUpBeforeAll() throws Exception {
+ csrfEnabled = false;
+ initialize();
+ }
+}
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResourceCsrfEnabled.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResourceCsrfEnabled.java
new file mode 100644
index 00000000000..e56286a2ca6
--- /dev/null
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResourceCsrfEnabled.java
@@ -0,0 +1,34 @@
+/*
+ * 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.rest;
+
+import org.apache.hadoop.hbase.testclassification.MediumTests;
+import org.apache.hadoop.hbase.testclassification.RestTests;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Tag;
+
+@Tag(RestTests.TAG)
+@Tag(MediumTests.TAG)
+public class TestMultiRowResourceCsrfEnabled extends MultiRowResourceTestBase {
+
+ @BeforeAll
+ public static void setUpBeforeAll() throws Exception {
+ csrfEnabled = true;
+ initialize();
+ }
+}
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSchemaResourceCsrfDisabled.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSchemaResourceCsrfDisabled.java
new file mode 100644
index 00000000000..13faea51858
--- /dev/null
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSchemaResourceCsrfDisabled.java
@@ -0,0 +1,29 @@
+/*
+ * 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.rest;
+
+import org.junit.jupiter.api.BeforeAll;
+
+public class TestSchemaResourceCsrfDisabled extends SchemaResourceTestBase {
+
+ @BeforeAll
+ public static void setUpBeforeAll() throws Exception {
+ csrfEnabled = false;
+ initialize();
+ }
+}
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSchemaResourceCsrfEnabled.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSchemaResourceCsrfEnabled.java
new file mode 100644
index 00000000000..0b1a9e5ea71
--- /dev/null
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSchemaResourceCsrfEnabled.java
@@ -0,0 +1,29 @@
+/*
+ * 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.rest;
+
+import org.junit.jupiter.api.BeforeAll;
+
+public class TestSchemaResourceCsrfEnabled extends SchemaResourceTestBase {
+
+ @BeforeAll
+ public static void setUpBeforeAll() throws Exception {
+ csrfEnabled = true;
+ initialize();
+ }
+}
(hbase) 01/03: HBASE-29919 Test case TestSecureIPC#testRpcServerDisallowFallbackToSimpleAuth failed (#7794)
Posted by zh...@apache.org.
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 ea245c5c7218d154632e9bd88aa39f251af3a4bf
Author: Liu Xiao <42...@users.noreply.github.com>
AuthorDate: Wed Feb 25 21:04:31 2026 +0800
HBASE-29919 Test case TestSecureIPC#testRpcServerDisallowFallbackToSimpleAuth failed (#7794)
Signed-off-by: Duo Zhang <zh...@apache.org>
(cherry picked from commit 80303ee66b6b2dba19f74a9c4da000314f5407b6)
---
.../org/apache/hadoop/hbase/security/AbstractTestSecureIPC.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/AbstractTestSecureIPC.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/AbstractTestSecureIPC.java
index ad61b8131fe..a783f53cec0 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/AbstractTestSecureIPC.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/AbstractTestSecureIPC.java
@@ -39,6 +39,7 @@ import java.io.IOException;
import java.lang.reflect.Field;
import java.net.InetAddress;
import java.net.InetSocketAddress;
+import java.net.SocketException;
import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
import java.util.Collections;
@@ -196,10 +197,11 @@ public class AbstractTestSecureIPC {
serverConf.setBoolean(RpcServer.FALLBACK_TO_INSECURE_CLIENT_AUTH, false);
IOException error =
assertThrows(IOException.class, () -> callRpcService(User.create(clientUgi)));
- // server just closes the connection, so we could get broken pipe, or EOF, or connection closed
+ // server just closes the connection, so we could get broken pipe, or EOF, or connection closed,
+ // or socket exception
if (error.getMessage() == null || !error.getMessage().contains("Broken pipe")) {
- assertThat(error,
- either(instanceOf(EOFException.class)).or(instanceOf(ConnectionClosedException.class)));
+ assertThat(error, either(instanceOf(EOFException.class))
+ .or(instanceOf(ConnectionClosedException.class)).or(instanceOf(SocketException.class)));
}
}
(hbase) 03/03: HBASE-29874 Removing the useless parameters from ScanQueryMatcher.isCellTTLExpired (#7720)
Posted by zh...@apache.org.
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 46d4aed0f5708f5f3235c2488487838b48c9ee55
Author: Liu Xiao <42...@users.noreply.github.com>
AuthorDate: Wed Feb 25 22:17:18 2026 +0800
HBASE-29874 Removing the useless parameters from ScanQueryMatcher.isCellTTLExpired (#7720)
Signed-off-by: Duo Zhang <zh...@apache.org>
Signed-off-by: Junegunn Choi <ju...@apache.org>
(cherry picked from commit e2cfd2c8cfa7689360b161c6f4a7fa3829ed5685)
---
.../hadoop/hbase/regionserver/querymatcher/ScanQueryMatcher.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/ScanQueryMatcher.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/ScanQueryMatcher.java
index 587b784a7d8..4f6168b1e92 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/ScanQueryMatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/ScanQueryMatcher.java
@@ -140,8 +140,7 @@ public abstract class ScanQueryMatcher implements ShipperListener {
}
/** Returns true if the cell is expired */
- private static boolean isCellTTLExpired(final ExtendedCell cell, final long oldestTimestamp,
- final long now) {
+ private static boolean isCellTTLExpired(final ExtendedCell cell, final long now) {
// Look for a TTL tag first. Use it instead of the family setting if
// found. If a cell has multiple TTLs, resolve the conflict by using the
// first tag encountered.
@@ -176,7 +175,7 @@ public abstract class ScanQueryMatcher implements ShipperListener {
}
// check if the cell is expired by cell TTL
- if (isCellTTLExpired(cell, this.oldestUnexpiredTS, this.now)) {
+ if (isCellTTLExpired(cell, this.now)) {
return MatchCode.SKIP;
}