diff options
| -rw-r--r-- | README.md | 15 | ||||
| -rw-r--r-- | weed/command/filer_copy.go | 2 | ||||
| -rw-r--r-- | weed/operation/upload_content.go | 3 | ||||
| -rw-r--r-- | weed/topology/store_replicate.go | 1 |
4 files changed, 12 insertions, 9 deletions
@@ -58,11 +58,11 @@ Your support will be really appreciated by me and other supporters! Table of Contents ================= +* [Quick Start](#quick-start) * [Introduction](#introduction) * [Features](#features) * [Additional Features](#additional-features) * [Filer Features](#filer-features) -* [Quick Start](#quick-start) * [Example: Using Seaweed Object Store](#example-Using-Seaweed-Object-Store) * [Architecture](#architecture) * [Compared to Other File Systems](#compared-to-other-file-systems) @@ -76,6 +76,13 @@ Table of Contents * [Benchmark](#Benchmark) * [License](#license) + +## Quick Start ## +* Download the latest binary from https://github.com/chrislusf/seaweedfs/releases and unzip a single binary file `weed` or `weed.exe` +* Run `weed server -dir=/some/data/dir -s3` to start one master, one volume server, one filer, and one S3 gateway. + +Also, to increase capacity, just add more volume servers by `weed volume -dir="/some/data/dir2" -mserver="<master_host>:9333" -port=8081` locally or a different machine. That is it! + ## Introduction ## SeaweedFS is a simple and highly scalable distributed file system. There are two objectives: @@ -142,12 +149,6 @@ On top of the object store, optional [Filer] can support directories and POSIX a [Back to TOC](#table-of-contents) -## Quick Start ## -* Download the latest binary from https://github.com/chrislusf/seaweedfs/releases and unzip a single binary file `weed` or `weed.exe` -* Run `weed server -dir=/some/data/dir -s3` to start one master, one volume server, one filer, and one S3 gateway. - -Also, to increase capacity, just add more volume servers by `weed volume -dir="/some/data/dir2" -mserver="<master_host>:9333" -port=8081` locally or a different machine. That is it! - ## Example: Using Seaweed Object Store ## By default, the master node runs on port 9333, and the volume nodes run on port 8080. diff --git a/weed/command/filer_copy.go b/weed/command/filer_copy.go index 9afa65d23..322e5418d 100644 --- a/weed/command/filer_copy.go +++ b/weed/command/filer_copy.go @@ -122,7 +122,7 @@ func runCopy(cmd *Command, args []string) bool { expectedBucket := restPath[:strings.Index(restPath, "/")] if *copy.collection == "" { *copy.collection = expectedBucket - } else { + } else if *copy.collection != expectedBucket { fmt.Printf("destination %s uses collection \"%s\": unexpected collection \"%v\"\n", urlPath, expectedBucket, *copy.collection) return true } diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go index ac0b477cb..fccc24b16 100644 --- a/weed/operation/upload_content.go +++ b/weed/operation/upload_content.go @@ -169,7 +169,7 @@ func doUploadData(uploadUrl string, filename string, cipher bool, data []byte, i uploadResult, err = upload_content(uploadUrl, func(w io.Writer) (err error) { _, err = w.Write(data) return - }, filename, contentIsGzipped, 0, mtype, pairMap, jwt) + }, filename, contentIsGzipped, len(data), mtype, pairMap, jwt) } if uploadResult == nil { @@ -190,6 +190,7 @@ func upload_content(uploadUrl string, fillBufferFunction func(w io.Writer) error body_writer := multipart.NewWriter(buf) h := make(textproto.MIMEHeader) h.Set("Content-Disposition", fmt.Sprintf(`form-data; name="file"; filename="%s"`, fileNameEscaper.Replace(filename))) + h.Set("Idempotency-Key", uploadUrl) if mtype == "" { mtype = mime.TypeByExtension(strings.ToLower(filepath.Ext(filename))) } diff --git a/weed/topology/store_replicate.go b/weed/topology/store_replicate.go index faa16e2f6..6b4076913 100644 --- a/weed/topology/store_replicate.go +++ b/weed/topology/store_replicate.go @@ -81,6 +81,7 @@ func ReplicatedWrite(masterNode string, s *storage.Store, volumeId needle.Volume } // volume server do not know about encryption + // TODO optimize here to compress data only once _, err := operation.UploadData(u.String(), string(n.Name), false, n.Data, n.IsCompressed(), string(n.Mime), pairMap, jwt) return err }); err != nil { |
