Skip to content

Commit

Permalink
HDDS-11518. Recon OmDB Insights show isKey=true for directories (apac…
Browse files Browse the repository at this point in the history
  • Loading branch information
ArafatKhan2198 authored Oct 3, 2024
1 parent 5d2bbc3 commit 8747c0e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ public Response getOpenKeyInfo(
continue;
}
KeyEntityInfo keyEntityInfo = new KeyEntityInfo();
keyEntityInfo.setIsKey(omKeyInfo.isFile());
keyEntityInfo.setKey(key);
keyEntityInfo.setPath(omKeyInfo.getKeyName());
keyEntityInfo.setInStateSince(omKeyInfo.getCreationTime());
Expand Down Expand Up @@ -549,6 +550,7 @@ private void getPendingForDeletionDirInfo(
continue;
}
KeyEntityInfo keyEntityInfo = new KeyEntityInfo();
keyEntityInfo.setIsKey(omKeyInfo.isFile());
keyEntityInfo.setKey(omKeyInfo.getFileName());
keyEntityInfo.setPath(createPath(omKeyInfo));
keyEntityInfo.setInStateSince(omKeyInfo.getCreationTime());
Expand Down Expand Up @@ -1257,6 +1259,7 @@ private KeyEntityInfo createKeyEntityInfoFromOmKeyInfo(String dbKey,
OmKeyInfo keyInfo) throws IOException {
KeyEntityInfo keyEntityInfo = new KeyEntityInfo();
keyEntityInfo.setKey(dbKey); // Set the DB key
keyEntityInfo.setIsKey(keyInfo.isFile());
keyEntityInfo.setPath(ReconUtils.constructFullPath(keyInfo, reconNamespaceSummaryManager,
omMetadataManager));
keyEntityInfo.setSize(keyInfo.getDataSize());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ private KeyEntityInfo createKeyEntityInfoFromOmKeyInfo(String dbKey,
OmKeyInfo keyInfo) {
KeyEntityInfo keyEntityInfo = new KeyEntityInfo();
keyEntityInfo.setKey(dbKey); // Set the DB key
keyEntityInfo.setIsKey(keyInfo.isFile());
keyEntityInfo.setPath(keyInfo.getKeyName()); // Assuming path is the same as key name
keyEntityInfo.setInStateSince(keyInfo.getCreationTime());
keyEntityInfo.setSize(keyInfo.getDataSize());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public boolean isKey() {
return isKey;
}

public void setKey(boolean key) {
isKey = key;
public void setIsKey(boolean isKey) {
this.isKey = isKey;
}
}

0 comments on commit 8747c0e

Please sign in to comment.