diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-08-29 18:41:29 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-08-29 18:41:29 -0700 |
| commit | 001a472057f01b3ac2d3edb59b3d5fb0a141cddd (patch) | |
| tree | b9bac6f68ab44cb2d0fee5df0db69ba589ff69b0 /weed/shell/command_remote_mount.go | |
| parent | 05d27741179b199608d0c5c5373bf3c8939c1697 (diff) | |
| download | seaweedfs-001a472057f01b3ac2d3edb59b3d5fb0a141cddd.tar.xz seaweedfs-001a472057f01b3ac2d3edb59b3d5fb0a141cddd.zip | |
cloud mount: remote storage support hdfs
Diffstat (limited to 'weed/shell/command_remote_mount.go')
| -rw-r--r-- | weed/shell/command_remote_mount.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/weed/shell/command_remote_mount.go b/weed/shell/command_remote_mount.go index d1b282d9c..3e92428d9 100644 --- a/weed/shell/command_remote_mount.go +++ b/weed/shell/command_remote_mount.go @@ -60,15 +60,17 @@ func (c *commandRemoteMount) Do(args []string, commandEnv *CommandEnv, writer io return err } - remoteStorageLocation := remote_storage.ParseLocation(*remote) - // find configuration for remote storage - // remotePath is /<bucket>/path/to/dir - remoteConf, err := c.findRemoteStorageConfiguration(commandEnv, writer, remoteStorageLocation) + remoteConf, err := filer.ReadRemoteStorageConf(commandEnv.option.GrpcDialOption, commandEnv.option.FilerAddress, remote_storage.ParseLocationName(*remote)) if err != nil { return fmt.Errorf("find configuration for %s: %v", *remote, err) } + remoteStorageLocation, err := remote_storage.ParseRemoteLocation(remoteConf.Type, *remote) + if err != nil { + return err + } + // sync metadata from remote if err = c.syncMetadata(commandEnv, writer, *dir, *nonEmpty, remoteConf, remoteStorageLocation); err != nil { return fmt.Errorf("pull metadata: %v", err) |
