Skip to content
Open
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
4 changes: 4 additions & 0 deletions pkg/ddc/alluxio/ufs_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ func (e *AlluxioEngine) usedStorageBytesInternal() (value int64, err error) {
return
}

// freeStorageBytesInternal returns the number of bytes currently available in Alluxio storage.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The comment for freeStorageBytesInternal is incomplete as it does not mention that the function is currently a placeholder returning (0, nil). For consistency with the neighboring usedStorageBytesInternal function, it should explicitly state its placeholder status to avoid misleading future developers.

// freeStorageBytesInternal returns the number of bytes currently available in Alluxio storage.
// It currently returns (0, nil) as a placeholder; the actual implementation should query
// the Alluxio cluster to compute the free storage capacity.

func (e *AlluxioEngine) freeStorageBytesInternal() (value int64, err error) {
return
}

// totalStorageBytesInternal returns the total capacity in bytes of the Alluxio file system.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The term 'total capacity' in the comment is misleading. The implementation uses fileUitls.Count("/"), which returns the aggregate size of all files (data volume) in the file system, rather than the storage capacity (the upper limit of the storage medium). Describing it as the 'total size' would be more accurate.

Suggested change
// totalStorageBytesInternal returns the total capacity in bytes of the Alluxio file system.
// totalStorageBytesInternal returns the total size in bytes of the data in the Alluxio file system.

func (e *AlluxioEngine) totalStorageBytesInternal() (total int64, err error) {
podName, containerName := e.getMasterPodInfo()

Expand All @@ -61,6 +63,8 @@ func (e *AlluxioEngine) totalStorageBytesInternal() (total int64, err error) {
return
}

// totalFileNumsInternal returns the total number of files within the Alluxio file system.
// It queries the master pod via AlluxioFileUtils.GetFileCount.
func (e *AlluxioEngine) totalFileNumsInternal() (fileCount int64, err error) {
podName, containerName := e.getMasterPodInfo()

Expand Down
Loading