Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error is reported when reading a file in the HAR package #333

Open
bigcat133 opened this issue Dec 13, 2023 · 0 comments
Open

An error is reported when reading a file in the HAR package #333

bigcat133 opened this issue Dec 13, 2023 · 0 comments

Comments

@bigcat133
Copy link

bigcat133 commented Dec 13, 2023

version info:
Hadoop 2.6.0-cdh5.11.0
github.com/colinmarc/hdfs v1.1.3
go 1.18

build env:
GIN_MODE=release &&
CGO_ENABLED=1 &&
GOOS=linux &&
GOARCH=amd64 && \

code:

func main() {
	config.SetConfigPath("./config.toml")

	file_path := "/user/poma/2023121001.har"
	file_name := "8a0c7e585f86c15ca1f1ce9b405a4a3f"

	client := hdfs.New("namenode2")
	f_info, err := client.Stat(file_path)
	if err != nil {
		fmt.Printf("stat err: %s\n", err.Error())
	} else {
		fmt.Printf("file info: %v\n", f_info)
		file_path = filepath.Join(file_path, file_name)
		file_path = fmt.Sprintf("har://%s", file_path)
		f_hand, err := client.Open(file_path)
		if err != nil {
			fmt.Printf("open err: %s\n", err.Error())
		} else {
			f_hand.Close()
		}
	}

}

Error Info:
open err: open har:///user/poma/2023121001.har/8a0c7e585f86c15ca1f1ce9b405a4a3f: getFileInfo call failed with ERROR_APPLICATION (org.apache.hadoop.fs.InvalidPathException)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant