mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-07-02 07:06:44 +02:00
support hdfs user name and group names
This commit is contained in:
parent
ce566f579e
commit
b0838db5a8
|
@ -17,6 +17,8 @@ type Attr struct {
|
||||||
Replication string // replication
|
Replication string // replication
|
||||||
Collection string // collection name
|
Collection string // collection name
|
||||||
TtlSec int32 // ttl in seconds
|
TtlSec int32 // ttl in seconds
|
||||||
|
UserName string
|
||||||
|
GroupNames []string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (attr Attr) IsDirectory() bool {
|
func (attr Attr) IsDirectory() bool {
|
||||||
|
|
|
@ -44,6 +44,8 @@ func EntryAttributeToPb(entry *Entry) *filer_pb.FuseAttributes {
|
||||||
Collection: entry.Attr.Collection,
|
Collection: entry.Attr.Collection,
|
||||||
Replication: entry.Attr.Replication,
|
Replication: entry.Attr.Replication,
|
||||||
TtlSec: entry.Attr.TtlSec,
|
TtlSec: entry.Attr.TtlSec,
|
||||||
|
UserName: entry.Attr.UserName,
|
||||||
|
GroupName: entry.Attr.GroupNames,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,6 +62,8 @@ func PbToEntryAttribute(attr *filer_pb.FuseAttributes) Attr {
|
||||||
t.Collection = attr.Collection
|
t.Collection = attr.Collection
|
||||||
t.Replication = attr.Replication
|
t.Replication = attr.Replication
|
||||||
t.TtlSec = attr.TtlSec
|
t.TtlSec = attr.TtlSec
|
||||||
|
t.UserName = attr.UserName
|
||||||
|
t.GroupNames = attr.GroupName
|
||||||
|
|
||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue