You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 14, 2021. It is now read-only.
hdfs usually use the New(address string) method to access a namenode node, the user will be the user running the code. If the address is an empty string, it will try to get the NameNode address from the Hadoop configuration file.
I proposal to add endpoint pair. It makes utils.go NewStorage method like
ep,err := endpoint.Parse(opt.Endpoint)
if err != nil {
return nil, err
}
var address string
switch ep.Protocol() {
case endpoint.ProtocolTcp:
address = ep.Tcp()
default:
return nil,services.PairUnsupportedError{Pair: ps.WithEndpoint(opt.Endpoint)}
}
store.hdfs,err = hdfs.New(address)
if err != nil {
return nil, errors.New("hdfs address is not exist")
}
return store,nil