-
Notifications
You must be signed in to change notification settings - Fork 744
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
Add retention job summary events #3683
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
|
||
import org.apache.gobblin.data.management.retention.dataset.CleanableDataset; | ||
|
||
|
||
/** | ||
* Holds event names and constants used in events submitted by a retention job. | ||
*/ | ||
|
@@ -34,6 +35,12 @@ static class CleanFailed { | |
*/ | ||
static final String FAILURE_CONTEXT_METADATA_KEY = "failureContext"; | ||
} | ||
|
||
static class RetentionJobSummary { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: |
||
static final String EVENT_NAME = "RetentionJobSummary"; | ||
static final String DATASET_VERSIONS_CLEANED_METADATA_KEY = "datasetsMarkedForCleaning"; | ||
} | ||
|
||
static final String NAMESPACE = "gobblin.data.management.retention"; | ||
static final String DATASET_URN_METADATA_KEY = "datasetUrn"; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
package org.apache.gobblin.data.management.retention.dataset; | ||
|
||
import java.io.IOException; | ||
|
||
import org.apache.gobblin.dataset.Dataset; | ||
|
||
|
||
|
@@ -28,10 +29,11 @@ | |
public interface CleanableDataset extends Dataset { | ||
|
||
/** | ||
* Cleans the {@link CleanableDataset}. In general, this means to apply a | ||
* Cleans the {@link CleanableDataset}. | ||
* Returns the number of versions marked for deletion | ||
* {@link org.apache.gobblin.data.management.retention.policy.RetentionPolicy} and delete files and directories that need deleting. | ||
Comment on lines
+32
to
34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks like new line 33 cut in mid-sentence to the prior javadoc. also, prefer a |
||
* @throws IOException | ||
*/ | ||
public void clean() throws IOException; | ||
public int clean() throws IOException; | ||
|
||
} |
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 it certain we'd only ever overwrite the summary, rather than potentially needing to add this new count to whatever accumulating sum was already tracked for the same dataset URN?