-
Notifications
You must be signed in to change notification settings - Fork 377
[AMORO-4034][Improvement]: MaintainerMetrics Unified interface and Report #4045
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #4045 +/- ##
============================================
+ Coverage 22.12% 22.53% +0.40%
- Complexity 2461 2570 +109
============================================
Files 445 459 +14
Lines 40897 42239 +1342
Branches 5767 5924 +157
============================================
+ Hits 9050 9520 +470
- Misses 31089 31902 +813
- Partials 758 817 +59
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f9cfd81 to
a4468f3
Compare
a4468f3 to
0cfa9a4
Compare
majin1102
left a comment
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.
Thanks for working on this. Left some comments
...ceberg/src/main/java/org/apache/amoro/formats/iceberg/maintainer/IcebergTableMaintainer.java
Outdated
Show resolved
Hide resolved
...ceberg/src/main/java/org/apache/amoro/formats/iceberg/maintainer/IcebergTableMaintainer.java
Outdated
Show resolved
Hide resolved
| * | ||
| * <p>Note: All metrics include the table_format tag to distinguish Iceberg and Paimon tables | ||
| */ | ||
| public abstract class AbstractTableMaintainerMetrics extends AbstractTableMetrics |
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.
Wondering this abstraction is really necessary if we put that format field into AbstractTableMetrics. Could you elaborate more on this?
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.
I'm worried that on different lake formats, there might be some unique indicators of their own, so it's abstract. Although we have added the TableFormat identifier inside, this is only for monitoring and distinction. In terms of code, we cannot isolate and distinguish it.
| defineCounter("table_orphan_data_files_cleaned_count") | ||
| .withDescription("Count of orphan data files cleaned") | ||
| .withTags("catalog", "database", "table", "table_format") | ||
| .build(); |
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.
This seems a break change from table_orphan_content_file_cleaning_count. This might lead to backforward compatibility issue
| @FunctionalInterface | ||
| public interface MaintainerOperation { | ||
| /** Executes the operation. */ | ||
| void execute() throws Throwable; |
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.
I think It's a little strange to declare as throws Throwable.
Does any project declare like this?
And I think we could just use some interfaces JDK provides, like Runnable?
amoro-common/src/main/java/org/apache/amoro/maintainer/MaintainerOperationTemplate.java
Outdated
Show resolved
Hide resolved
| if (totalDeleteFiles.isPresent() && Long.parseLong(totalDeleteFiles.get()) > 0) { | ||
| // clear dangling delete files | ||
| doCleanDanglingDeleteFiles(); | ||
| LOG.info("Starting cleaning dangling delete files for table {}", table.name()); |
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.
So why we don't use the new interfaces and wireness?
amoro-common/src/main/java/org/apache/amoro/maintainer/MaintainerOperationTemplate.java
Outdated
Show resolved
Hide resolved
amoro-common/src/main/java/org/apache/amoro/maintainer/MaintainerOperationTemplate.java
Outdated
Show resolved
Hide resolved
1a85b2d to
2e57523
Compare
[Improvement]: MaintainerMetrics Unified interface and Report (#4034)
Why are the changes needed?
Close #4034 .
Brief change log
How was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before making a pull request
Documentation