-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[feat](hdfs)Add HDFS HA Configuration Validation #55675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 34289 ms |
TPC-DS: Total hot run time: 186978 ms |
ClickBench: Total hot run time: 33.32 s |
FE UT Coverage ReportIncrement line coverage |
|
run buildall |
TPC-H: Total hot run time: 34151 ms |
TPC-DS: Total hot run time: 186671 ms |
ClickBench: Total hot run time: 32.84 s |
FE Regression Coverage ReportIncrement line coverage |
|
run buildall |
1 similar comment
|
run buildall |
TPC-H: Total hot run time: 34052 ms |
TPC-DS: Total hot run time: 186927 ms |
ClickBench: Total hot run time: 33.52 s |
FE UT Coverage ReportIncrement line coverage |
Previously, HDFS High Availability (HA) configuration checks were only performed for the HMS catalog. This PR extends HA validation to all components that interact with HDFS, including: - All catalog types (HMS, Hive, Iceberg, etc.) - Table-valued functions (TVFs) accessing HDFS resources - Any future features that depend on HDFS HA
c0d9a6d to
d36a192
Compare
|
run buildall |
TPC-H: Total hot run time: 34136 ms |
TPC-DS: Total hot run time: 186680 ms |
ClickBench: Total hot run time: 29.8 s |
FE UT Coverage ReportIncrement line coverage |
FE Regression Coverage ReportIncrement line coverage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR extends HDFS High Availability (HA) configuration validation from HMS catalog-only to all catalog types that interact with HDFS. The implementation introduces a centralized validation utility and updates test files to include proper HA configuration properties.
- Adds centralized HDFS HA configuration validation in
HdfsPropertiesUtils.checkHaConfig() - Extends validation to all catalog types (HMS, Iceberg, Paimon) and HDFS properties
- Updates test files to include proper HA configuration properties for validation
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| fe/fe-core/src/main/java/org/apache/doris/datasource/property/storage/HdfsPropertiesUtils.java | Adds centralized HDFS HA configuration validation method |
| fe/fe-core/src/main/java/org/apache/doris/datasource/property/storage/HdfsProperties.java | Integrates HA validation into HDFS properties initialization |
| fe/fe-core/src/main/java/org/apache/doris/datasource/CatalogProperty.java | Adds generic validation method for metastore and storage properties |
| fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalCatalog.java | Refactors to use centralized validation |
| fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergExternalCatalog.java | Adds HA validation support |
| fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/PaimonExternalCatalog.java | Adds HA validation support |
| fe/fe-core/src/test/java/org/apache/doris/datasource/property/storage/HdfsPropertiesUtilsTest.java | Adds comprehensive unit tests for HA validation |
| fe/fe-core/src/test/java/org/apache/doris/datasource/property/storage/HdfsPropertiesTest.java | Updates tests with proper HA configuration |
| fe/fe-core/src/test/java/org/apache/doris/common/util/LocationPathTest.java | Updates tests with valid HA configuration properties |
| regression-test/suites/auth_call/test_ddl_catalog_auth.groovy | Adds required metastore URI property |
| regression-test/suites/auth_call/test_assistant_command_auth.groovy | Adds required metastore URI property |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| static { | ||
| Map<String, String> props = new HashMap<>(); | ||
| props.put("dfs.nameservices", "namenode:8020"); |
Copilot
AI
Sep 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate key 'dfs.nameservices' - the second assignment on line 42 overwrites the first assignment on line 41. Remove line 41.
| props.put("dfs.nameservices", "namenode:8020"); |
| "Metastore properties type is not correct. Expected %s but got %s" | ||
| + msClass.getName() | ||
| + msProperties.getClass().getName()); |
Copilot
AI
Sep 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message string formatting is incorrect. It contains '%s' placeholders but no corresponding arguments are provided. Either use String.format() with proper arguments or remove the placeholders.
| "Metastore properties type is not correct. Expected %s but got %s" | |
| + msClass.getName() | |
| + msProperties.getClass().getName()); | |
| String.format("Metastore properties type is not correct. Expected %s but got %s", | |
| msClass.getName(), msProperties.getClass().getName())); |
| LOG.warn("Failed to create metastore properties", e); | ||
| throw new RuntimeException("Failed to create metastore properties", e); | ||
| throw new RuntimeException("Failed to create metastore properties, error: " | ||
| + ExceptionUtils.getRootCause(e), e); |
Copilot
AI
Sep 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent exception handling - line 133 uses ExceptionUtils.getRootCauseMessage(e) while line 178 uses ExceptionUtils.getRootCause(e). Use getRootCauseMessage() consistently for string concatenation.
| + ExceptionUtils.getRootCause(e), e); | |
| + ExceptionUtils.getRootCauseMessage(e), e); |
|
run buildall |
|
run buildall |
TPC-H: Total hot run time: 34547 ms |
TPC-DS: Total hot run time: 189614 ms |
ClickBench: Total hot run time: 29.79 s |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
FE Regression Coverage ReportIncrement line coverage |
### What problem does this PR solve? Previously, HDFS High Availability (HA) configuration checks were only performed for the HMS catalog. This PR extends HA validation to all components that interact with HDFS, including: - All catalog types (HMS, Hive, Iceberg, etc.) - Table-valued functions (TVFs) accessing HDFS resources - Any future features that depend on HDFS HA
What problem does this PR solve?
Previously, HDFS High Availability (HA) configuration checks were only performed for the HMS catalog. This PR extends HA validation to all components that interact with HDFS, including:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)