jarredhj0214 commented on code in PR #12288: URL: https://github.com/apache/gravitino/pull/12288#discussion_r3746235242
########## core/src/main/java/org/apache/gravitino/bulk/BulkManager.java: ########## @@ -0,0 +1,136 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.gravitino.bulk; + +import java.util.List; +import java.util.Optional; +import org.apache.gravitino.Config; +import org.apache.gravitino.Configs; +import org.apache.gravitino.MetadataObject; +import org.apache.gravitino.MetadataObjects; +import org.apache.gravitino.authorization.AccessControlDispatcher; +import org.apache.gravitino.authorization.Owner; +import org.apache.gravitino.authorization.OwnerDispatcher; +import org.apache.gravitino.authorization.User; +import org.apache.gravitino.dto.responses.BulkError; +import org.apache.gravitino.dto.responses.ErrorConstants; +import org.apache.gravitino.exceptions.AlreadyExistsException; +import org.apache.gravitino.exceptions.ForbiddenException; +import org.apache.gravitino.exceptions.NotFoundException; +import org.apache.gravitino.exceptions.NotInUseException; +import org.apache.gravitino.metalake.MetalakeManager; + +/** Manages best-effort bulk operations. */ +public class BulkManager { + Review Comment: > This class can add a new method checkBulkSize and BulkOperations can use this method. Sorry for the late response. I was on vacation last week. I have fixed the review comments: - Moved `accessControlDispatcher` and `ownerDispatcher` back to `BulkOperations`. - Initialized them in the `BulkOperations` constructor. - Removed `addUsers` and `removeUsers` from `BulkManager`. - Kept `checkBulkSize` in `BulkManager` and now `BulkOperations` uses it. I also rebased this PR on the latest `apache/main` and resolved the conflicts. Tests passed: ```bash ./gradlew :server:test --tests org.apache.gravitino.server.web.rest.TestBulkOperations :core:test --tests org.apache.gravitino.authorization.TestAccessControlManager.testBulkAddUsers --tests org.apache.gravitino.authorization.TestAccessControlManager.testBulkRemoveUsers :docs:build -PskipITs -- 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]
