Skip to content

Commit fbbac83

Browse files
authored
Add comments to GetHCFSStatus in pkg\ddc\goosefs\hcfs.go (#5056)
Signed-off-by: 15665794901 <120930189@qq.com>
1 parent 0ba1fe5 commit fbbac83

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

pkg/ddc/goosefs/hcfs.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@ import (
2424
"github.com/fluid-cloudnative/fluid/pkg/utils/kubeclient"
2525
)
2626

27+
// GetHCFSStatus retrieves the status information of HCFS (Hadoop Compatible File System)
28+
// This function queries the HCFS endpoint and the underlying filesystem compatible version
29+
//
30+
// Process flow:
31+
// 1. First calls queryHCFSEndpoint() to get the HCFS access endpoint
32+
// 2. If endpoint retrieval fails, logs the error and returns the error
33+
// 3. Calls queryCompatibleUFSVersion() to get the underlying filesystem compatible version
34+
// 4. If version retrieval fails, logs the error and returns the error
35+
// 5. Constructs the HCFSStatus struct and populates it with the retrieved information
36+
// 6. Returns the status information and nil error
37+
//
38+
// Returns:
39+
// - *datav1alpha1.HCFSStatus: Pointer to a struct containing HCFS status information,
40+
// including endpoint and version details
41+
// - error: Returns an error if any issues occur during the query process
42+
//
2743
// Query the hcfs status
2844
func (e *GooseFSEngine) GetHCFSStatus() (status *datav1alpha1.HCFSStatus, err error) {
2945
endpoint, err := e.queryHCFSEndpoint()

0 commit comments

Comments
 (0)