-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-12185. Enhance FileSizeCountTask for Faster Processing. #7796
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
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
5a70ca7
HDDS-12185. Enhance FileSizeCountTask for Faster Processing.
ArafatKhan2198 7aca9f2
Made code changes
ArafatKhan2198 4b1da9f
Also fixed the testcases
ArafatKhan2198 c8b2e47
Made final review changes
ArafatKhan2198 68b8948
Passing the executor from the injector
ArafatKhan2198 9e00401
Removed unwanted changes
ArafatKhan2198 991c7d5
Removed unwanted import
ArafatKhan2198 1166bce
Fixd checkstyle and using injectors
ArafatKhan2198 678ddb2
more changes
ArafatKhan2198 978c160
Merge branch 'master' into HDDS-12185
ArafatKhan2198 4719546
Changed log levels
ArafatKhan2198 ce7e523
Split the FilesizecountTask into two separate tasks
ArafatKhan2198 0a845bc
Fixed checkstyle
ArafatKhan2198 1608468
Refactored code to a helper class
ArafatKhan2198 b7883ec
Fixed checkstyle issues
ArafatKhan2198 a426eb3
Fixed unit tests
ArafatKhan2198 46a0b26
Fixed doc
ArafatKhan2198 dbd54c2
Merge remote-tracking branch 'origin/master' into HDDS-12185
adoroszlai d31e450
Ensure shared synchronization for table truncation in FileSizeCount t…
ArafatKhan2198 3484f2a
Changed parameter name
ArafatKhan2198 e80362c
Ensure proper error handling in table truncation and reprocess by res…
ArafatKhan2198 ad3e6c1
Added the excpetion propagation test case
ArafatKhan2198 5e6fdc3
Fixed checkstyle
ArafatKhan2198 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
...p-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/FileSizeCountTaskFSO.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package org.apache.hadoop.ozone.recon.tasks; | ||
|
|
||
| import com.google.inject.Inject; | ||
| import org.apache.commons.lang3.tuple.Pair; | ||
| import org.apache.hadoop.ozone.om.OMMetadataManager; | ||
| import org.apache.hadoop.ozone.om.OmMetadataManagerImpl; | ||
| import org.apache.hadoop.ozone.om.helpers.BucketLayout; | ||
| import org.hadoop.ozone.recon.schema.UtilizationSchemaDefinition; | ||
| import org.hadoop.ozone.recon.schema.tables.daos.FileCountBySizeDao; | ||
| import org.jooq.DSLContext; | ||
|
|
||
| /** | ||
| * Task for FileSystemOptimized (FSO) which processes the FILE_TABLE. | ||
| */ | ||
| public class FileSizeCountTaskFSO implements ReconOmTask { | ||
|
|
||
| private final FileCountBySizeDao fileCountBySizeDao; | ||
| private final DSLContext dslContext; | ||
|
|
||
| @Inject | ||
| public FileSizeCountTaskFSO(FileCountBySizeDao fileCountBySizeDao, | ||
| UtilizationSchemaDefinition utilizationSchemaDefinition) { | ||
| this.fileCountBySizeDao = fileCountBySizeDao; | ||
| this.dslContext = utilizationSchemaDefinition.getDSLContext(); | ||
| } | ||
|
|
||
| @Override | ||
| public Pair<String, Boolean> reprocess(OMMetadataManager omMetadataManager) { | ||
| return FileSizeCountTaskHelper.reprocess( | ||
| omMetadataManager, | ||
| dslContext, | ||
| fileCountBySizeDao, | ||
| BucketLayout.FILE_SYSTEM_OPTIMIZED, | ||
| getTaskName() | ||
| ); | ||
| } | ||
|
|
||
| @Override | ||
| public Pair<String, Boolean> process(OMUpdateEventBatch events) { | ||
| // This task listens only on the FILE_TABLE. | ||
| return FileSizeCountTaskHelper.processEvents( | ||
| events, | ||
| OmMetadataManagerImpl.FILE_TABLE, | ||
| dslContext, | ||
| fileCountBySizeDao, | ||
| getTaskName()); | ||
| } | ||
|
|
||
| @Override | ||
| public String getTaskName() { | ||
| return "FileSizeCountTaskFSO"; | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.