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
8 changes: 8 additions & 0 deletions pkg/ddc/alluxio/operations/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,14 @@ func (a AlluxioFileUtils) LoadMetaData(alluxioPath string, sync bool) (err error
return
}

// Mkdir creates a directory in Alluxio at the specified path.
// It executes the `alluxio fs mkdir <alluxioPath>` command inside the Alluxio pod's container.
//
// Parameters:
// - alluxioPath (string): The Alluxio path to create.
//
// Returns:
// - err (error): Non-nil if the mkdir command fails or if executing the command returns an error.
Comment on lines +471 to +478
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 added documentation style using explicit "Parameters" and "Returns" sections is inconsistent with the rest of the file and idiomatic Go practices. In this repository, function comments are typically concise sentences starting with the function name. Consider simplifying the comment to maintain consistency with existing documentation in base.go.

Suggested change
// Mkdir creates a directory in Alluxio at the specified path.
// It executes the `alluxio fs mkdir <alluxioPath>` command inside the Alluxio pod's container.
//
// Parameters:
// - alluxioPath (string): The Alluxio path to create.
//
// Returns:
// - err (error): Non-nil if the mkdir command fails or if executing the command returns an error.
// Mkdir creates a directory in Alluxio at the specified path.
// It executes the alluxio fs mkdir <alluxioPath> command inside the Alluxio pod's container.

func (a AlluxioFileUtils) Mkdir(alluxioPath string) (err error) {
var (
command = []string{"alluxio", "fs", "mkdir", alluxioPath}
Expand Down
Loading