diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java index c93ed3caba..149f558268 100644 --- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java +++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java @@ -1377,7 +1377,7 @@ public final class OzoneManagerProtocolClientSideTranslatorPB SetAclRequest.Builder builder = SetAclRequest.newBuilder() .setObj(OzoneObj.toProtobuf(obj)); - acls.parallelStream().forEach(a -> builder.addAcl(OzoneAcl.toProtobuf(a))); + acls.forEach(a -> builder.addAcl(OzoneAcl.toProtobuf(a))); OMRequest omRequest = createOMRequest(Type.SetAcl) .setSetAclRequest(builder.build()) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientAbstract.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientAbstract.java index 2a03107254..b0f7888c3b 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientAbstract.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientAbstract.java @@ -2291,9 +2291,13 @@ public abstract class TestOzoneRpcClientAbstract { expectedAcls.forEach(a -> assertTrue(finalNewAcls.contains(a))); // Reset acl's. - store.setAcl(ozObj, new ArrayList<>()); + OzoneAcl ua = new OzoneAcl(ACLIdentityType.USER, "userx", ACLType.READ_ACL); + OzoneAcl ug = new OzoneAcl(ACLIdentityType.GROUP, "userx", ACLType.ALL); + store.setAcl(ozObj, Arrays.asList(ua, ug)); newAcls = store.getAcl(ozObj); - assertTrue(newAcls.size() == 0); + assertTrue(newAcls.size() == 2); + assertTrue(newAcls.contains(ua)); + assertTrue(newAcls.contains(ug)); } private void writeKey(String key1, OzoneBucket bucket) throws IOException { diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerRequestHandler.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerRequestHandler.java index 568262f555..6ea1a2b6d7 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerRequestHandler.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerRequestHandler.java @@ -411,8 +411,7 @@ public class OzoneManagerRequestHandler implements RequestHandler { private SetAclResponse setAcl(SetAclRequest req) throws IOException { List ozoneAcl = new ArrayList<>(); - req.getAclList().parallelStream().forEach(a -> - ozoneAcl.add(OzoneAcl.fromProtobuf(a))); + req.getAclList().forEach(a -> ozoneAcl.add(OzoneAcl.fromProtobuf(a))); boolean response = impl.setAcl(OzoneObjInfo.fromProtobuf(req.getObj()), ozoneAcl); return SetAclResponse.newBuilder().setResponse(response).build();