mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
upload respect master default replication setting
This commit is contained in:
parent
5e3b6e968a
commit
b409ccc5ab
|
@ -25,7 +25,7 @@ func init() {
|
|||
server = cmdUpload.Flag.String("server", "localhost:9333", "weedfs master location")
|
||||
uploadDir = cmdUpload.Flag.String("dir", "", "Upload the whole folder recursively if specified.")
|
||||
include = cmdUpload.Flag.String("include", "", "pattens of files to upload, e.g., *.pdf, *.html, ab?d.txt, works together with -dir")
|
||||
uploadReplication = cmdUpload.Flag.String("replication", "000", "replication type(000,001,010,100,110,200)")
|
||||
uploadReplication = cmdUpload.Flag.String("replication", "", "replication type(000,001,010,100,110,200)")
|
||||
}
|
||||
|
||||
var cmdUpload = &Command{
|
||||
|
@ -49,7 +49,9 @@ type AssignResult struct {
|
|||
func assign(count int) (*AssignResult, error) {
|
||||
values := make(url.Values)
|
||||
values.Add("count", strconv.Itoa(count))
|
||||
if *uploadReplication != "" {
|
||||
values.Add("replication", *uploadReplication)
|
||||
}
|
||||
jsonBlob, err := util.Post("http://"+*server+"/dir/assign", values)
|
||||
debug("assign result :", string(jsonBlob))
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue