aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-12-04 00:13:40 -0800
committerChris Lu <chris.lu@gmail.com>2018-12-04 00:13:40 -0800
commitb0838db5a8809606183dba0d0dddbc641b17b0f7 (patch)
tree80ccbc2ebe29317674d4815c60e8e98478227c6c
parentce566f579eace4d767713aaeb3ad37c180589a32 (diff)
downloadseaweedfs-b0838db5a8809606183dba0d0dddbc641b17b0f7.tar.xz
seaweedfs-b0838db5a8809606183dba0d0dddbc641b17b0f7.zip
support hdfs user name and group names
-rw-r--r--weed/filer2/entry.go2
-rw-r--r--weed/filer2/entry_codec.go4
2 files changed, 6 insertions, 0 deletions
diff --git a/weed/filer2/entry.go b/weed/filer2/entry.go
index 11318a3ae..f5c883d44 100644
--- a/weed/filer2/entry.go
+++ b/weed/filer2/entry.go
@@ -17,6 +17,8 @@ type Attr struct {
Replication string // replication
Collection string // collection name
TtlSec int32 // ttl in seconds
+ UserName string
+ GroupNames []string
}
func (attr Attr) IsDirectory() bool {
diff --git a/weed/filer2/entry_codec.go b/weed/filer2/entry_codec.go
index baa6a9440..71b0dea40 100644
--- a/weed/filer2/entry_codec.go
+++ b/weed/filer2/entry_codec.go
@@ -44,6 +44,8 @@ func EntryAttributeToPb(entry *Entry) *filer_pb.FuseAttributes {
Collection: entry.Attr.Collection,
Replication: entry.Attr.Replication,
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.Replication = attr.Replication
t.TtlSec = attr.TtlSec
+ t.UserName = attr.UserName
+ t.GroupNames = attr.GroupName
return t
}