You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/09/28 09:32:12 UTC
[GitHub] [hbase] GeorryHuang commented on a change in pull request #3700: HBASE-26263 [Rolling Upgrading] Persist the StoreFileTracker configur…
GeorryHuang commented on a change in pull request #3700:
URL: https://github.com/apache/hbase/pull/3700#discussion_r717397749
##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
##########
@@ -1218,6 +1219,32 @@ private void finishActiveMasterInitialization(MonitoredTask status) throws IOExc
LOG.debug("Balancer post startup initialization complete, took " + (
(EnvironmentEdgeManager.currentTime() - start) / 1000) + " seconds");
}
+
+ /*
+ A background thread to update all TableDescriptors that do not contain
+ StoreFileTracker implementation configuration. see HBASE-26263.
+ */
+ Thread STFChecking = new Thread(() -> {
+ try {
+ tableDescriptors.getAll().forEach((tableName, htd) -> {
+ if (StringUtils.isEmpty(htd.getValue(StoreFileTrackerFactory.TRACKER_IMPL))) {
+ TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(htd);
+ StoreFileTrackerFactory.persistTrackerConfig(this.conf, builder);
+ try {
+ tableDescriptors.update(builder.build());
+ LOG.info("Persist StoreFileTracker configurations to TableDescriptor for table {}",
+ tableName);
+ } catch (IOException ioe) {
+ LOG.warn("Failed to persist StoreFileTracker to table {}", tableName, ioe);
+ }
+ }
+ });
+ } catch (IOException e) {
+ LOG.error("Failed to run StoreFileTracker checking thread for existing tables!", e);
+ }
+ }, "StoreFileTrackerChecking");
+ STFChecking.setDaemon(true);
+ STFChecking.start();
Review comment:
Agree with you. Let me see if there is any way to solve it.
--
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: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org