1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-01 22:56:38 +02:00
This commit is contained in:
Chris Lu 2019-12-25 09:56:42 -08:00
parent d960b3474a
commit eecad6062a
3 changed files with 6 additions and 6 deletions

View file

@ -109,8 +109,8 @@ func doVolumeTierDownload(ctx context.Context, commandEnv *CommandEnv, writer io
// copy the .dat file from remote tier to local
err = downloadDatFromRemoteTier(ctx, commandEnv.option.GrpcDialOption, writer, needle.VolumeId(vid), collection, loc.Url)
if err != nil {
return fmt.Errorf("download dat file for volume %d to %s: %v", vid, loc.Url, err)
}
return fmt.Errorf("download dat file for volume %d to %s: %v", vid, loc.Url, err)
}
}
return nil
@ -120,8 +120,8 @@ func downloadDatFromRemoteTier(ctx context.Context, grpcDialOption grpc.DialOpti
err := operation.WithVolumeServerClient(targetVolumeServer, grpcDialOption, func(volumeServerClient volume_server_pb.VolumeServerClient) error {
stream, downloadErr := volumeServerClient.VolumeTierMoveDatFromRemote(ctx, &volume_server_pb.VolumeTierMoveDatFromRemoteRequest{
VolumeId: uint32(volumeId),
Collection: collection,
VolumeId: uint32(volumeId),
Collection: collection,
})
var lastProcessed int64

View file

@ -42,7 +42,7 @@ func downloadFromS3(sess s3iface.S3API, destFileName string, sourceBucket string
}
// Download the file from S3.
fileSize, err = downloader.Download(fileWriter,&s3.GetObjectInput{
fileSize, err = downloader.Download(fileWriter, &s3.GetObjectInput{
Bucket: aws.String(sourceBucket),
Key: aws.String(sourceKey),
})

View file

@ -59,4 +59,4 @@ func deleteFromS3(sess s3iface.S3API, sourceBucket string, sourceKey string) (er
Key: aws.String(sourceKey),
})
return err
}
}