filer: remove replication, collection, disk_type info from entry metadata
these metadata can change and are not used
This commit is contained in:
@@ -34,9 +34,6 @@ func (c *commandS3BucketCreate) Do(args []string, commandEnv *CommandEnv, writer
|
||||
|
||||
bucketCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
|
||||
bucketName := bucketCommand.String("name", "", "bucket name")
|
||||
replication := bucketCommand.String("replication", "", "replication setting for the bucket, if not set "+
|
||||
"it will honor the value defined by the filer if it exists, "+
|
||||
"else it will honor the value defined on the master")
|
||||
if err = bucketCommand.Parse(args); err != nil {
|
||||
return nil
|
||||
}
|
||||
@@ -59,11 +56,9 @@ func (c *commandS3BucketCreate) Do(args []string, commandEnv *CommandEnv, writer
|
||||
Name: *bucketName,
|
||||
IsDirectory: true,
|
||||
Attributes: &filer_pb.FuseAttributes{
|
||||
Mtime: time.Now().Unix(),
|
||||
Crtime: time.Now().Unix(),
|
||||
FileMode: uint32(0777 | os.ModeDir),
|
||||
Collection: *bucketName,
|
||||
Replication: *replication,
|
||||
Mtime: time.Now().Unix(),
|
||||
Crtime: time.Now().Unix(),
|
||||
FileMode: uint32(0777 | os.ModeDir),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -67,9 +67,6 @@ func (c *commandS3BucketList) Do(args []string, commandEnv *CommandEnv, writer i
|
||||
if entry.Quota > 0 {
|
||||
fmt.Fprintf(writer, "\tquota:%d\tusage:%.2f%%", entry.Quota, float64(collectionSize)*100/float64(entry.Quota))
|
||||
}
|
||||
if entry.Attributes.Replication != "" && entry.Attributes.Replication != "000" {
|
||||
fmt.Fprintf(writer, "\treplication:%s", entry.Attributes.Replication)
|
||||
}
|
||||
fmt.Fprintln(writer)
|
||||
return nil
|
||||
}, "", false, math.MaxUint32)
|
||||
|
||||
Reference in New Issue
Block a user