mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 00:13:49 +01:00
hdfs: added support for list of namenodes in hdfs remote config
Users can now input a comma separated list of namenodes when writing config for hdfs remotes. This is required when you have multiple namenodes in your hdfs cluster and cannot be certain which namenodes will be in 'standby' or 'active' states. This was available before but wasn't documented and didn't use the correct rclone interfaces.
This commit is contained in:
parent
ad83ff769b
commit
0548e61910
@ -93,7 +93,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
|
||||
}
|
||||
|
||||
options := hdfs.ClientOptions{
|
||||
Addresses: []string{opt.Namenode},
|
||||
Addresses: opt.Namenode,
|
||||
UseDatanodeHostname: false,
|
||||
}
|
||||
|
||||
|
@ -20,9 +20,10 @@ func init() {
|
||||
NewFs: NewFs,
|
||||
Options: []fs.Option{{
|
||||
Name: "namenode",
|
||||
Help: "Hadoop name node and port.\n\nE.g. \"namenode:8020\" to connect to host namenode at port 8020.",
|
||||
Help: "Hadoop name nodes and ports.\n\nE.g. \"namenode-1:8020,namenode-2:8020,...\" to connect to host namenodes at port 8020.",
|
||||
Required: true,
|
||||
Sensitive: true,
|
||||
Default: fs.CommaSepList{},
|
||||
}, {
|
||||
Name: "username",
|
||||
Help: "Hadoop user name.",
|
||||
@ -65,7 +66,7 @@ and 'privacy'. Used only with KERBEROS enabled.`,
|
||||
|
||||
// Options for this backend
|
||||
type Options struct {
|
||||
Namenode string `config:"namenode"`
|
||||
Namenode fs.CommaSepList `config:"namenode"`
|
||||
Username string `config:"username"`
|
||||
ServicePrincipalName string `config:"service_principal_name"`
|
||||
DataTransferProtection string `config:"data_transfer_protection"`
|
||||
|
Loading…
Reference in New Issue
Block a user