Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -1896,9 +1896,8 @@ public List<OmKeyInfo> getPendingDeletionSubFiles(long volumeId,
parentInfo.getObjectID())) {
break;
}
fileInfo.setFileName(fileInfo.getKeyName());
String fullKeyPath = OMFileRequest.getAbsolutePath(
parentInfo.getKeyName(), fileInfo.getKeyName());
parentInfo.getKeyName(), fileInfo.getFileName());
fileInfo.setKeyName(fullKeyPath);

files.add(fileInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,8 @@ public OzoneFileStatus getStatus(String prefixPath, long scmBlockSize,
} else {
Preconditions.checkArgument(value instanceof OmKeyInfo);
keyInfo = (OmKeyInfo) value;
keyInfo.setFileName(keyInfo.getKeyName());
String fullKeyPath = OMFileRequest.getAbsolutePath(prefixPath,
keyInfo.getKeyName());
keyInfo.getFileName());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing this, I think it's better to have tool which should correct metadata. This will just avoid one problem but metadata will remain in corrupt state.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can refer tools like #4337.

keyInfo.setKeyName(fullKeyPath);
}
return new OzoneFileStatus(keyInfo, scmBlockSize, entryType.isDir());
Expand Down