Skip to content

Commit 90a247d

Browse files
authored
fix(hbase): Removed test class and adjust operator-tools patches (#1426)
* hbase: removed test class that required test dependencies only available in 2.6.4 * changelog * correct line numbers for operator tools patches * missing text * spacing * reverted unecessary changes to patch * redo patch due to line numbers * add previously deleted comment
1 parent 089d432 commit 90a247d

File tree

6 files changed

+122
-17
lines changed

6 files changed

+122
-17
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ All notable changes to this project will be documented in this file.
6565

6666
- testing-tools: Re-add `pytest` Python package as well as `diffutils` package ([#1388]).
6767
- testing-tools: Move Kerberos packages from testing-tools/hive to parent since they provide `kinit` which is needed in other tests too (ex. HBase). ([#1389]).
68+
- hbase: Removed test class from backport HBASE-29797 to HBase version `2.6.3` ([#1426]).
6869

6970
[#1336]: https://github.com/stackabletech/docker-images/pull/1336
7071
[#1337]: https://github.com/stackabletech/docker-images/pull/1337
@@ -100,6 +101,7 @@ All notable changes to this project will be documented in this file.
100101
[#1422]: https://github.com/stackabletech/docker-images/pull/1422
101102
[#1424]: https://github.com/stackabletech/docker-images/pull/1424
102103
[#1425]: https://github.com/stackabletech/docker-images/pull/1425
104+
[#1426]: https://github.com/stackabletech/docker-images/pull/1426
103105

104106
## [25.11.0] - 2025-11-07
105107

hbase/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,9 @@ SDP 24.7 included Phoenix built from the master branch from commit [4afe457](htt
1212
Repository: [hbase-operator-tools](https://github.com/apache/hbase-operator-tools)
1313

1414
This is now mirrored and built from source using `patchable`.
15+
16+
## Back-porting upstream changes
17+
18+
Care needs to be taken when back-porting upstream changes due to changing dependencies.
19+
A patch for multiple versions (that share the same major.minor version) may not work if dependencies have been introduced in the meantime.
20+
e.g. HBASE-29797 can be applied to 2.6.4 directly, but not to 2.6.3 as test libraries were introduced between those versions.

hbase/hbase-operator-tools/stackable/patches/1.3.0/0001-Add-CycloneDX-plugin.patch

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
From 8616ee8b26bfbba285a36b91eb41a203a49b222a Mon Sep 17 00:00:00 2001
2-
From: dervoeti <lukas.krug@stackable.tech>
3-
Date: Thu, 13 Mar 2025 22:07:31 +0100
1+
From 44fd77d1f20a78dcc34ac9360ab8b4ed1e1d12af Mon Sep 17 00:00:00 2001
2+
From: Andrew Kenworthy <andrew.kenworthy@stackable.tech>
3+
Date: Mon, 9 Feb 2026 18:15:04 +0100
44
Subject: Add CycloneDX plugin
55

66
---
77
pom.xml | 17 +++++++++++++++++
88
1 file changed, 17 insertions(+)
99

1010
diff --git a/pom.xml b/pom.xml
11-
index caa032a..0025687 100644
11+
index 46e7f89..4903bb2 100644
1212
--- a/pom.xml
1313
+++ b/pom.xml
14-
@@ -549,6 +549,23 @@
14+
@@ -557,6 +557,23 @@
1515
</formats>
1616
</configuration>
1717
</plugin>
@@ -25,10 +25,10 @@ index caa032a..0025687 100644
2525
+ </configuration>
2626
+ <executions>
2727
+ <execution>
28-
+ <goals>
29-
+ <goal>makeBom</goal>
30-
+ </goals>
31-
+ <phase>package</phase>
28+
+ <goals>
29+
+ <goal>makeBom</goal>
30+
+ </goals>
31+
+ <phase>package</phase>
3232
+ </execution>
3333
+ </executions>
3434
+ </plugin>

hbase/hbase-operator-tools/stackable/patches/1.3.0/0002-Exclude-hbase-testing-utils-dependency-from-the-buil.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From f9e952767faf3032c0d4e729e51b5901fcf1a0e1 Mon Sep 17 00:00:00 2001
1+
From b589c5bae43f401c3c49a5c4b4d106c09343d32b Mon Sep 17 00:00:00 2001
22
From: Razvan-Daniel Mihai <[email protected]>
33
Date: Tue, 6 May 2025 17:58:34 +0200
44
Subject: Exclude hbase-testing-utils dependency from the build.
@@ -9,7 +9,7 @@ Subject: Exclude hbase-testing-utils dependency from the build.
99
2 files changed, 12 insertions(+), 4 deletions(-)
1010

1111
diff --git a/hbase-hbck2/pom.xml b/hbase-hbck2/pom.xml
12-
index 1d57225..fd0018c 100644
12+
index 69af92e..7bebf32 100644
1313
--- a/hbase-hbck2/pom.xml
1414
+++ b/hbase-hbck2/pom.xml
1515
@@ -114,12 +114,19 @@
@@ -35,7 +35,7 @@ index 1d57225..fd0018c 100644
3535
<groupId>org.mockito</groupId>
3636
<artifactId>mockito-core</artifactId>
3737
diff --git a/hbase-tools/pom.xml b/hbase-tools/pom.xml
38-
index 55ef075..eeebe14 100644
38+
index f9d94e8..1644c30 100644
3939
--- a/hbase-tools/pom.xml
4040
+++ b/hbase-tools/pom.xml
4141
@@ -103,12 +103,13 @@

hbase/hbase-operator-tools/stackable/patches/1.3.0/0003-Configure-git-commit-id-plugin-to-use-native-git.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From 187db522edc569def2aea3f9453ecb1a674592fe Mon Sep 17 00:00:00 2001
2-
From: Razvan-Daniel Mihai <[email protected]>
3-
Date: Wed, 7 May 2025 10:26:37 +0200
1+
From 923efe9f649c947de8809f78cbc899d238545d05 Mon Sep 17 00:00:00 2001
2+
From: Andrew Kenworthy <[email protected]>
3+
Date: Tue, 10 Feb 2026 11:35:36 +0100
44
Subject: Configure git-commit-id-plugin to use native git
55

66
This fixes the problem that jgit cannot handle worktrees and the build
@@ -13,10 +13,10 @@ https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/215
1313
1 file changed, 2 insertions(+), 1 deletion(-)
1414

1515
diff --git a/hbase-hbck2/pom.xml b/hbase-hbck2/pom.xml
16-
index fd0018c..f00bd18 100644
16+
index 7bebf32..e3c246f 100644
1717
--- a/hbase-hbck2/pom.xml
1818
+++ b/hbase-hbck2/pom.xml
19-
@@ -215,8 +215,9 @@
19+
@@ -214,8 +214,9 @@
2020
<plugin>
2121
<groupId>pl.project13.maven</groupId>
2222
<artifactId>git-commit-id-plugin</artifactId>
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
From 6d1c6b265a91a5e8496dccc3bceec656f15629be Mon Sep 17 00:00:00 2001
2+
From: Andrew Kenworthy <[email protected]>
3+
Date: Mon, 9 Feb 2026 15:47:22 +0100
4+
Subject: remove test class that requires jupiter libs
5+
6+
---
7+
.../hadoop/hbase/master/TestWALFencing.java | 81 -------------------
8+
1 file changed, 81 deletions(-)
9+
delete mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWALFencing.java
10+
11+
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWALFencing.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWALFencing.java
12+
deleted file mode 100644
13+
index 9341dcd5d9..0000000000
14+
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWALFencing.java
15+
+++ /dev/null
16+
@@ -1,81 +0,0 @@
17+
-/*
18+
- * Licensed to the Apache Software Foundation (ASF) under one
19+
- * or more contributor license agreements. See the NOTICE file
20+
- * distributed with this work for additional information
21+
- * regarding copyright ownership. The ASF licenses this file
22+
- * to you under the Apache License, Version 2.0 (the
23+
- * "License"); you may not use this file except in compliance
24+
- * with the License. You may obtain a copy of the License at
25+
- *
26+
- * http://www.apache.org/licenses/LICENSE-2.0
27+
- *
28+
- * Unless required by applicable law or agreed to in writing, software
29+
- * distributed under the License is distributed on an "AS IS" BASIS,
30+
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31+
- * See the License for the specific language governing permissions and
32+
- * limitations under the License.
33+
- */
34+
-package org.apache.hadoop.hbase.master;
35+
-
36+
-import static org.awaitility.Awaitility.await;
37+
-
38+
-import java.io.IOException;
39+
-import java.time.Duration;
40+
-import java.util.Collections;
41+
-import org.apache.hadoop.fs.FileStatus;
42+
-import org.apache.hadoop.fs.Path;
43+
-import org.apache.hadoop.hbase.HBaseTestingUtility;
44+
-import org.apache.hadoop.hbase.TableName;
45+
-import org.apache.hadoop.hbase.client.RegionInfo;
46+
-import org.apache.hadoop.hbase.regionserver.HRegionServer;
47+
-import org.apache.hadoop.hbase.regionserver.Region;
48+
-import org.apache.hadoop.hbase.testclassification.MasterTests;
49+
-import org.apache.hadoop.hbase.testclassification.MediumTests;
50+
-import org.apache.hadoop.hbase.util.RecoverLeaseFSUtils;
51+
-import org.junit.jupiter.api.AfterAll;
52+
-import org.junit.jupiter.api.BeforeAll;
53+
-import org.junit.jupiter.api.Tag;
54+
-import org.junit.jupiter.api.Test;
55+
-
56+
-/**
57+
- * Testcase for HBASE-29797, where the lazy initialized WALProvider may recreate the WAL directory
58+
- * and cause our fencing way loses efficacy.
59+
- */
60+
-@Tag(MasterTests.TAG)
61+
-@Tag(MediumTests.TAG)
62+
-public class TestWALFencing {
63+
-
64+
- private static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
65+
-
66+
- @BeforeAll
67+
- public static void setUp() throws Exception {
68+
- UTIL.startMiniCluster(3);
69+
- UTIL.getAdmin().balancerSwitch(false, true);
70+
- }
71+
-
72+
- @AfterAll
73+
- public static void tearDown() throws IOException {
74+
- UTIL.shutdownMiniCluster();
75+
- }
76+
-
77+
- @Test
78+
- public void testMoveMeta() throws Exception {
79+
- HRegionServer metaRs = UTIL.getRSForFirstRegionInTable(TableName.META_TABLE_NAME);
80+
- HRegionServer otherRs = UTIL.getOtherRegionServer(metaRs);
81+
- // do fencing here, i.e, kill otherRs
82+
- Path splittingDir = UTIL.getMiniHBaseCluster().getMaster().getMasterWalManager()
83+
- .getLogDirs(Collections.singleton(otherRs.getServerName())).get(0);
84+
- for (FileStatus walFile : otherRs.getWALFileSystem().listStatus(splittingDir)) {
85+
- RecoverLeaseFSUtils.recoverFileLease(otherRs.getWALFileSystem(), walFile.getPath(),
86+
- otherRs.getConfiguration());
87+
- }
88+
- // move meta region to otherRs, which should fail and crash otherRs, and then master will try to
89+
- // assign meta region to another rs
90+
- RegionInfo metaRegionInfo = metaRs.getRegions().stream().map(Region::getRegionInfo)
91+
- .filter(RegionInfo::isMetaRegion).findAny().get();
92+
- UTIL.getAdmin().move(metaRegionInfo.getEncodedNameAsBytes(), otherRs.getServerName());
93+
- // make sure that meta region is not on otherRs
94+
- await().during(Duration.ofSeconds(5)).atMost(Duration.ofSeconds(6))
95+
- .until(() -> otherRs.getRegions(TableName.META_TABLE_NAME).isEmpty());
96+
- }
97+
-}

0 commit comments

Comments
 (0)