@Override
  public void refreshHFiles(RpcController controller,
    RefreshHFilesProtos.RefreshHFilesRequest request,
    RpcCallback<RefreshHFilesProtos.RefreshHFilesResponse> done) {
    try {
      for (Store store : env.getRegion().getStores()) {
        LOG.debug("Refreshing HFiles for region: " + store.getRegionInfo().getRegionNameAsString()
          + " and store: " + store.getColumnFamilyName() + "class:" + store.getClass());
        store.refreshStoreFiles();
      }
    } catch (IOException ioe) {
      LOG.error("Exception while trying to refresh store files: ", ioe);
      CoprocessorRpcUtils.setControllerException(controller, ioe);
    }
    done.run(RefreshHFilesProtos.RefreshHFilesResponse.getDefaultInstance());
  }
Coprocessor endpoint to refresh HFiles on replica.
<p>
<p>
For the protocol buffer definition of the RefreshHFilesService, see the source file located under
hbase-protocol/src/main/protobuf/RefreshHFiles.proto.
</p>
hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/RefreshHFilesEndpoint.java