Skip to content
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

HDDS-9534. Support namespace summaries (du, dist & counts) for LEGACY buckets with file system disabled #5517

Merged
merged 19 commits into from
Mar 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Renamed a variable
  • Loading branch information
ArafatKhan2198 committed Mar 7, 2024
commit ab9cb00e382b8194e16cc8b13921d0730c132224
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@
*/
public class NSSummaryTaskWithLegacy extends NSSummaryTaskDbEventHandler {

private static final BucketLayout BUCKET_LAYOUT = BucketLayout.LEGACY;
private static final BucketLayout LEGACY_BUCKET_LAYOUT = BucketLayout.LEGACY;

private static final Logger LOG =
LoggerFactory.getLogger(NSSummaryTaskWithLegacy.class);
@@ -242,7 +242,7 @@ public boolean reprocessWithLegacy(OMMetadataManager omMetadataManager) {

try {
Table<String, OmKeyInfo> keyTable =
omMetadataManager.getKeyTable(BUCKET_LAYOUT);
omMetadataManager.getKeyTable(LEGACY_BUCKET_LAYOUT);

try (TableIterator<String, ? extends Table.KeyValue<String, OmKeyInfo>>
keyTableIter = keyTable.iterator()) {
@@ -320,7 +320,7 @@ private void setParentDirectoryId(OmKeyInfo keyInfo) throws IOException {
getReconOMMetadataManager().getOzoneKey(keyInfo.getVolumeName(),
keyInfo.getBucketName(), parentKeyName);
OmKeyInfo parentKeyInfo = getReconOMMetadataManager()
.getKeyTable(BUCKET_LAYOUT)
.getKeyTable(LEGACY_BUCKET_LAYOUT)
.getSkipCache(fullParentKeyName);

if (parentKeyInfo != null) {
@@ -369,7 +369,7 @@ private boolean isBucketLayoutValid(ReconOMMetadataManager metadataManager,
OmBucketInfo omBucketInfo =
metadataManager.getBucketTable().getSkipCache(bucketDBKey);

if (omBucketInfo.getBucketLayout() != BUCKET_LAYOUT) {
if (omBucketInfo.getBucketLayout() != LEGACY_BUCKET_LAYOUT) {
LOG.debug(
ArafatKhan2198 marked this conversation as resolved.
Show resolved Hide resolved
"Skipping processing for bucket {} as bucket layout is not LEGACY",
bucketName);