-
Notifications
You must be signed in to change notification settings - Fork 587
HDDS-12849. On demand container scanner should not be static #8296
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
Changes from 8 commits
834be96
e73757e
f0d8efe
4cb054c
8abedb6
577a075
4c8d843
0bd4127
28b3230
4c08e7f
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 |
|---|---|---|
|
|
@@ -121,6 +121,7 @@ public class OzoneContainer { | |
| private final XceiverServerSpi readChannel; | ||
| private final ContainerController controller; | ||
| private BackgroundContainerMetadataScanner metadataScanner; | ||
| private OnDemandContainerDataScanner onDemandScanner; | ||
| private List<BackgroundContainerDataScanner> dataScanners; | ||
| private List<AbstractBackgroundContainerScanner> backgroundScanners; | ||
| private final BlockDeletingService blockDeletingService; | ||
|
|
@@ -432,7 +433,8 @@ private void initOnDemandContainerScanner(ContainerScannerConfiguration c) { | |
| "so the on-demand container data scanner will not start."); | ||
| return; | ||
| } | ||
| OnDemandContainerDataScanner.init(c, controller); | ||
| onDemandScanner = new OnDemandContainerDataScanner(c, controller); | ||
| containerSet.registerContainerScanHandler(onDemandScanner::scanContainer); | ||
|
Member
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. Can we pass the
Contributor
Author
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. We could, but I would rather keep the coupling between the two classes looser. We could make a scanner interface but it would only have one method and only be used here. The consumer was a light-weight way to get this same functionality. |
||
| } | ||
|
|
||
| /** | ||
|
|
@@ -451,7 +453,7 @@ private void stopContainerScrub() { | |
| for (BackgroundContainerDataScanner s : dataScanners) { | ||
| s.shutdown(); | ||
| } | ||
| OnDemandContainerDataScanner.shutdown(); | ||
| onDemandScanner.shutdown(); | ||
| } | ||
|
|
||
| @VisibleForTesting | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.