adoroszlai commented on code in PR #9541:
URL: https://github.com/apache/ozone/pull/9541#discussion_r2640378516
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmDirectoryInfo.java:
##########
@@ -51,12 +52,14 @@ public final class OmDirectoryInfo extends
WithParentObjectId {
private final long modificationTime;
private final ImmutableList<OzoneAcl> acls;
+ private final ImmutableMap<String, String> tags;
Review Comment:
I was wrong in the Jira description, `OMFileRequest.getDirectoryInfo` does
not copy `tags`, since `OmDirectoryInfo` does not have tags at all. It only
copies `acls` and `metadata`. So we don't need to add tags here. Sorry for
the confusion.
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/AclListBuilder.java:
##########
@@ -43,6 +43,19 @@ public static AclListBuilder of(ImmutableList<OzoneAcl>
list) {
return new AclListBuilder(list);
}
+ /**
+ * Overload accepting List instead of ImmutableList for binary compatibility
+ * across different Guava versions (especially for Hadoop 2.x compatibility).
+ * This method can be removed when Hadoop 2.x support is dropped and all
+ * callers are guaranteed to use the same Guava version.
+ */
+ public static AclListBuilder of(List<OzoneAcl> list) {
+ if (list instanceof ImmutableList) {
+ return new AclListBuilder((ImmutableList<OzoneAcl>) list);
+ }
+ return new AclListBuilder(list == null ? ImmutableList.of() :
ImmutableList.copyOf(list));
Review Comment:
nit:
```suggestion
return copyOf(list);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]