-
Notifications
You must be signed in to change notification settings - Fork 305
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
[AMORO-2875] Added metric for orphan file action #3004
Conversation
d03922e
to
061e1f1
Compare
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.
we can try to collect more detailed information, such as the size of deleted files
docs/user-guides/metrics.md
Outdated
| table_slated_orphan_content_file_cleaning_count | Counter | catalog, database, table | Slated Count of orphan content files cleaned in the table since ams started | | ||
| table_slated_orphan_metadata_file_cleaning_count | Counter | catalog, database, table | Slated Count of orphan metadata files cleaned in the table since ams started | |
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.
What does slated_orphan_content_file
and slated_orpha_metadata_file
means?
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.
Indicates the calculated number of files expected to be deleted. Failure may occur during the deletion process, so there will also be an metric of the actual number of deleted files.
https://iceberg.apache.org/docs/nightly/spark-procedures/#output_7 |
Hi, @huyuanfeng2018 |
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 left some small suggestion about the metric name, PTAL.
} | ||
|
||
public static final MetricDefine TABLE_ORPHAN_CONTENT_FILE_CLEANING_COUNT = | ||
defineCounter("table_orphan_content_cleaning_count") |
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.
Is table_orphan_content_file_cleaning_count
proper here, being consistent with the table_orphan_metadata_file_cleanning_count
?
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.
Well, there was a mistake here, it's been fixed
.build(); | ||
|
||
public static final MetricDefine TABLE_SLATED_ORPHAN_CONTENT_FILE_CLEANING_COUNT = | ||
defineCounter("table_slated_orphan_content_file_cleaning_count") |
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.
Is the name table_expected_orphan_content_file_cleaning_count
easier to understand here?
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 originally inherited the style of the old code and named it slated
, but now it seems expected
is easier to understand.
8542efa
to
8f7f213
Compare
@huyuanfeng2018 Some conflicts seem to need to be fixed. |
# Conflicts: # amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/table/TableRuntime.java
fixed & PTAL. |
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.
LGTM.
Why are the changes needed?
Close #2875
Brief change log
TableOrphanFilesCleaningMetrics
used to collect metrics generated by cleaning orphan filesHow 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