ian910297 commented on code in PR #4102: URL: https://github.com/apache/gravitino/pull/4102#discussion_r1674033339
########## core/src/main/java/com/datastrato/gravitino/listener/api/info/PartitionInfo.java: ########## @@ -0,0 +1,74 @@ +/* + * 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 com.datastrato.gravitino.listener.api.info; + +import com.datastrato.gravitino.annotation.DeveloperApi; +import com.datastrato.gravitino.rel.partitions.Partition; +import com.google.common.collect.ImmutableMap; +import java.util.Map; + +/** + * Provides access to metadata about a Partition instance, designed for use by event listeners. This + * class encapsulates the essential attributes of a Partition, including its name and properties + * information. + */ +@DeveloperApi +public final class PartitionInfo { + private final String name; + private final Map<String, String> properties; + + /** + * Constructs PartitionInfo from an existing Partition object. + * + * @param partition The Partition instance to extract information from. + */ + public PartitionInfo(Partition partition) { Review Comment: This means that a separate PartitionInfo class will be created for each of the three data structures, e.g., ListPartitionInfo, RangePartitionInfo, and IdentityPartitionInfo? Or is it that polymorphism will be implemented within the PartitionInfo 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]
