sharmaar12 commented on code in PR #8044: URL: https://github.com/apache/hbase/pull/8044#discussion_r3079240668
########## hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RefreshHFilesCallable.java: ########## @@ -0,0 +1,70 @@ +/* + * 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.hbase.regionserver; + +import java.io.IOException; +import org.apache.hadoop.hbase.client.RegionInfo; +import org.apache.hadoop.hbase.executor.EventType; +import org.apache.hadoop.hbase.procedure2.BaseRSProcedureCallable; +import org.apache.yetus.audience.InterfaceAudience; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil; +import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos; + +/** + * This is a RegionServer-side callable used by the HBase Master Procedure framework to perform the + * actual HFiles refresh operation on a specific region. It is dispatched from the + * {@link org.apache.hadoop.hbase.master.procedure.RefreshHFilesRegionProcedure} to the RegionServer + * and executes the logic to refresh store files in each store of the region. + */ + [email protected] +public class RefreshHFilesCallable extends BaseRSProcedureCallable { + private static final Logger LOG = LoggerFactory.getLogger(RefreshHFilesCallable.class); + + private RegionInfo regionInfo; + + @Override + protected byte[] doCall() throws Exception { + HRegion region = rs.getRegion(regionInfo.getEncodedName()); + LOG.debug("Starting refreshHfiles operation on region {}", region); + + try { + for (Store store : region.getStores()) { + store.refreshStoreFiles(); + } + } catch (IOException ioe) { + LOG.warn("Exception while trying to refresh store files: ", ioe); + } Review Comment: I agree we should send the exception to the user in case of failure. Will be resolved under [HBASE-30080](https://issues.apache.org/jira/browse/HBASE-30080). -- 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]
