Skip to content

Conversation

@kabhishek4
Copy link
Contributor

@kabhishek4 kabhishek4 commented Jan 24, 2025

Add support for custom meta table name and ability to start cluster on the same storage location.

New config setting:

hbase.meta.table.suffix default "" Adds a suffix to the meta table name: value=’test’ -> ‘hbase:meta_test’

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

* Added in HBASE-XXXXX to support having multiple hbase:meta tables (with distinct names )to
* enable storage sharing by more than one clusters.
*/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove empty line

String suffix_val = String.valueOf(conf.getStrings(
HConstants.HBASE_META_TABLE_SUFFIX, HConstants.HBASE_META_TABLE_SUFFIX_DEFAULT_VALUE));

if (suffix_val == null||suffix_val.isEmpty()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use proper formatting:

if (suffix_val == null || suffix_val.isEmpty()) {

Comment on lines 86 to 89
LOG.debug("Default value for Hbase meta table is being chosen.");
return TableName.META_TABLE_NAME;
}
LOG.debug("Suffix value for Hbase meta table is being chosen.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of emitting 2 separate log messages, add a single one at INFO level.

LOG.info("Meta table name: {}", META_TABLE_NAME);

Comment on lines 75 to 82
String suffix_val = String.valueOf(conf.getStrings(
HConstants.HBASE_META_TABLE_SUFFIX, HConstants.HBASE_META_TABLE_SUFFIX_DEFAULT_VALUE));

if (suffix_val == null||suffix_val.isEmpty()) {
return TableName.META_TABLE_NAME;
}
return valueOf(NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR, "meta_"
+ suffix_val);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't duplicate the logic, put it at a common place: keep it here or in the other class, or put it in a common utility.

Path tableDir = CommonFSUtils.getTableDir(rootDir, TableName.META_TABLE_NAME);
if (fs.exists(tableDir) && !fs.delete(tableDir, true)) {
LOG.warn("Can not delete partial created meta table, continue...");
throw new HBaseIOException("Specified meta table already exists.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might not need this I believe for 2 reasons:

  • we should keep the original logic here for backward compatiblity,
  • you throw this exception only in the case when HBase tried to delete tableDir, but it wasn't successful

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

}

public static TableName initializeHbaseMetaTableName(Configuration conf) {
String suffix_val = String.valueOf(conf.getStrings(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meta table suffix is just a string. I think this should be conf.get(...)

Comment on lines 67 to 71
protected final Configuration conf;
public InitMetaProcedure(Configuration conf) {
this.conf = conf;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably don't need this constructor at all if you return TableName.META_TABLE_NAME in getTableName() method. Actually don't need to modify this class at all.

@anmolnar
Copy link
Contributor

my patch: #6683

Comment on lines 94 to 100
if (suffix_val == null || suffix_val.isEmpty()) {
LOG.info("Meta table name: {}", META_TABLE_NAME);
return TableName.META_TABLE_NAME;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect: META_TABLE_NAME is being initialized in this method, so you end up returning null value.

@kabhishek4 kabhishek4 force-pushed the rorep branch 2 times, most recently from f388c45 to 0462bc4 Compare February 24, 2025 16:19
@anmolnar anmolnar marked this pull request as ready for review February 24, 2025 17:54
@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@anmolnar
Copy link
Contributor

anmolnar commented Mar 4, 2025

retest

@kabhishek4 kabhishek4 force-pushed the rorep branch 2 times, most recently from 87203d4 to 89b52aa Compare March 5, 2025 09:22
@kabhishek4 kabhishek4 force-pushed the rorep branch 2 times, most recently from 7ab9d52 to a19b106 Compare March 5, 2025 10:49
@PDavid
Copy link
Contributor

PDavid commented Mar 6, 2025

The PR build had issues which are already fixed by @ndimiduk on master. See: https://issues.apache.org/jira/browse/HBASE-29163

@ndimiduk
Copy link
Member

ndimiduk commented Mar 6, 2025

Yep if you pull and rebase you'll have necessary fixes to the build env on all branches.

@anmolnar
Copy link
Contributor

anmolnar commented Mar 6, 2025

@kabhishek4 I've updated the feature branch, please rebase your patch.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 52s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
_ HBASE-29081 Compile Tests _
+0 🆗 mvndep 1m 7s Maven dependency ordering for branch
+1 💚 mvninstall 4m 48s HBASE-29081 passed
+1 💚 compile 3m 44s HBASE-29081 passed
+1 💚 checkstyle 0m 50s HBASE-29081 passed
+1 💚 spotbugs 2m 4s HBASE-29081 passed
+1 💚 spotless 0m 45s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for patch
+1 💚 mvninstall 2m 59s the patch passed
+1 💚 compile 3m 42s the patch passed
+1 💚 javac 3m 42s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 48s the patch passed
+1 💚 spotbugs 2m 14s the patch passed
+1 💚 hadoopcheck 11m 47s Patch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 💚 spotless 0m 44s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 18s The patch does not generate ASF License warnings.
44m 55s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6632/16/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #6632
JIRA Issue HBASE-29082
Optional Tests dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
uname Linux da1f224e4935 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision HBASE-29081 / a7445fa
Default Java Eclipse Adoptium-17.0.11+9
Max. process+thread count 85 (vs. ulimit of 30000)
modules C: hbase-common hbase-server U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6632/16/console
versions git=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 12s Docker mode activated.
-0 ⚠️ yetus 0m 2s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ HBASE-29081 Compile Tests _
+0 🆗 mvndep 0m 10s Maven dependency ordering for branch
+1 💚 mvninstall 3m 25s HBASE-29081 passed
+1 💚 compile 1m 17s HBASE-29081 passed
+1 💚 javadoc 0m 44s HBASE-29081 passed
+1 💚 shadedjars 5m 57s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for patch
+1 💚 mvninstall 3m 29s the patch passed
+1 💚 compile 1m 15s the patch passed
+1 💚 javac 1m 15s the patch passed
+1 💚 javadoc 0m 44s the patch passed
+1 💚 shadedjars 5m 49s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 2m 13s hbase-common in the patch passed.
-1 ❌ unit 238m 48s /patch-unit-hbase-server.txt hbase-server in the patch failed.
271m 56s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6632/16/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR #6632
JIRA Issue HBASE-29082
Optional Tests javac javadoc unit compile shadedjars
uname Linux ad1810e61bf2 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision HBASE-29081 / a7445fa
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6632/16/testReport/
Max. process+thread count 5500 (vs. ulimit of 30000)
modules C: hbase-common hbase-server U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6632/16/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@anmolnar
Copy link
Contributor

Failing tests are either flaky or also failing on the master branch. We're going to raise new jira ticket to fix them. Merging this PR to move forward.

@anmolnar anmolnar merged commit adbc821 into apache:HBASE-29081 Mar 11, 2025
1 check failed
anmolnar pushed a commit that referenced this pull request May 16, 2025
anmolnar pushed a commit that referenced this pull request Aug 18, 2025
anmolnar pushed a commit that referenced this pull request Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants