use of org.apache.hadoop.hdfs.protocol.proto.AclProtos.AclStatusProto in project hadoop by apache.
the class PBHelperClient method convert.
public static AclStatus convert(GetAclStatusResponseProto e) {
AclStatusProto r = e.getResult();
AclStatus.Builder builder = new AclStatus.Builder();
builder.owner(r.getOwner()).group(r.getGroup()).stickyBit(r.getSticky()).addEntries(convertAclEntry(r.getEntriesList()));
if (r.hasPermission()) {
builder.setPermission(convert(r.getPermission()));
}
return builder.build();
}
use of org.apache.hadoop.hdfs.protocol.proto.AclProtos.AclStatusProto in project hadoop by apache.
the class PBHelperClient method convert.
public static GetAclStatusResponseProto convert(AclStatus e) {
AclStatusProto.Builder builder = AclStatusProto.newBuilder();
builder.setOwner(e.getOwner()).setGroup(e.getGroup()).setSticky(e.isStickyBit()).addAllEntries(convertAclEntryProto(e.getEntries()));
if (e.getPermission() != null) {
builder.setPermission(convert(e.getPermission()));
}
AclStatusProto r = builder.build();
return GetAclStatusResponseProto.newBuilder().setResult(r).build();
}
Aggregations