dengzhhu653 commented on code in PR #3861: URL: https://github.com/apache/hive/pull/3861#discussion_r1051880403
########## standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/events/ReloadEvent.java: ########## @@ -0,0 +1,106 @@ +/* + * 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.hadoop.hive.metastore.events; + +import com.google.common.collect.Lists; +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.classification.InterfaceStability; +import org.apache.hadoop.hive.metastore.IHMSHandler; +import org.apache.hadoop.hive.metastore.api.ClientCapabilities; +import org.apache.hadoop.hive.metastore.api.ClientCapability; +import org.apache.hadoop.hive.metastore.api.GetTableRequest; +import org.apache.hadoop.hive.metastore.api.MetaException; +import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; +import org.apache.hadoop.hive.metastore.api.Partition; +import org.apache.hadoop.hive.metastore.api.Table; +import org.apache.hadoop.hive.metastore.utils.MetaStoreUtils; +import org.apache.thrift.TException; + +import java.util.List; +import java.util.Map; + [email protected] [email protected] +public class ReloadEvent extends ListenerEvent { + private final Table tableObj; + private final Partition ptnObj; + private final boolean refreshEvent; + + /** + * @param catName name of the catalog + * @param db name of the database the table is in + * @param table name of the table being inserted into + * @param partVals list of partition values, can be null + * @param status status of insert, true = success, false = failure + * @param refreshEvent status of insert, + * @param handler handler that is firing the event + */ + public ReloadEvent(String catName, String db, String table, List<String> partVals, boolean status, + boolean refreshEvent, Map<String, String> tblParams, IHMSHandler handler) throws MetaException, + NoSuchObjectException { + super(status, handler); + + GetTableRequest req = new GetTableRequest(db, table); Review Comment: Why do we need to fetch the table/partitions given that this is a refresh or invalidate command? For refreshEvent = false, is `db` or `table` nullable? I wondering how the client(impala) suppose to use this? do they receive the notification, then extract the `table` or `partition` from the message, or do they request `HMS` for the meta? -- 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]
