jerqi commented on code in PR #7850: URL: https://github.com/apache/gravitino/pull/7850#discussion_r2268526776
########## core/src/main/java/org/apache/gravitino/stats/storage/PartitionStatisticStorage.java: ########## @@ -0,0 +1,112 @@ +/* + * 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.stats.storage; + +import com.google.common.collect.Lists; +import java.io.Closeable; +import java.util.List; +import java.util.stream.Collectors; +import org.apache.gravitino.MetadataObject; +import org.apache.gravitino.stats.PartitionRange; +import org.apache.gravitino.stats.PartitionStatisticsDrop; + +/** Interface for managing partition statistics in a storage system. */ +public interface PartitionStatisticStorage extends Closeable { + + /** + * Lists statistics for a given metadata object within a specified range of partition names. The + * implementation should guarantee the thread safe. + * + * @param metalake the name of the metalake + * @param metadataObject the metadata object for which statistics are being listed + * @param partitionRange the range of partition names for which statistics are being listed + * @return a list of {@link PersistedPartitionStatistics} objects, each containing the partition + * name + */ + List<PersistedPartitionStatistics> listStatistics( + String metalake, MetadataObject metadataObject, PartitionRange partitionRange); Review Comment: I prefer using metadata object here. Because we have defined many classes which contained the metadata object. If we uses entity, we need to convert them and create many extra classes. I don't think it's necessary. Only the entityStore prefer using entity. Other interfaces, we can use metadata objects. But we should avoid mixing metadata object and entities in interfaces of the same class. -- 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]
