This is an automated email from the ASF dual-hosted git repository.

gavinchou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new adbb927632e [fix](fe) Remove cloudWarmUpJob from 
DEPRECATED_MODULES_NAMES (#37203)
adbb927632e is described below

commit adbb927632ec773bbc595a16d6069d2a16f901e3
Author: walter <w41te...@gmail.com>
AuthorDate: Thu Jul 4 22:31:55 2024 +0800

    [fix](fe) Remove cloudWarmUpJob from DEPRECATED_MODULES_NAMES (#37203)
    
    It was accidentally introduced in PR #32804.
---
 .../org/apache/doris/persist/meta/MetaPersistMethod.java   |  9 +++++----
 .../org/apache/doris/persist/meta/PersistMetaModules.java  | 14 +++++++++++++-
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/persist/meta/MetaPersistMethod.java 
b/fe/fe-core/src/main/java/org/apache/doris/persist/meta/MetaPersistMethod.java
index 80a4c8410cf..d2b8737b6a3 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/persist/meta/MetaPersistMethod.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/persist/meta/MetaPersistMethod.java
@@ -18,6 +18,7 @@
 package org.apache.doris.persist.meta;
 
 import org.apache.doris.catalog.Env;
+import org.apache.doris.cloud.catalog.CloudEnv;
 import org.apache.doris.common.io.CountingDataOutputStream;
 
 import java.io.DataInputStream;
@@ -78,10 +79,10 @@ public class MetaPersistMethod {
                         Env.class.getDeclaredMethod("saveAlterJob", 
CountingDataOutputStream.class, long.class);
                 break;
             case "cloudWarmUpJob":
-                metaPersistMethod.readMethod =
-                        Env.class.getDeclaredMethod("loadCloudWarmUpJob", 
DataInputStream.class, long.class);
-                metaPersistMethod.writeMethod =
-                        Env.class.getDeclaredMethod("saveCloudWarmUpJob", 
CountingDataOutputStream.class, long.class);
+                metaPersistMethod.readMethod = 
CloudEnv.class.getDeclaredMethod(
+                        "loadCloudWarmUpJob", DataInputStream.class, 
long.class);
+                metaPersistMethod.writeMethod = 
CloudEnv.class.getDeclaredMethod(
+                        "saveCloudWarmUpJob", CountingDataOutputStream.class, 
long.class);
                 break;
             case "recycleBin":
                 metaPersistMethod.readMethod =
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/persist/meta/PersistMetaModules.java
 
b/fe/fe-core/src/main/java/org/apache/doris/persist/meta/PersistMetaModules.java
index 404d78cd55e..9f0f0aff0ec 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/persist/meta/PersistMetaModules.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/persist/meta/PersistMetaModules.java
@@ -17,6 +17,8 @@
 
 package org.apache.doris.persist.meta;
 
+import org.apache.doris.common.Config;
+
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
@@ -42,9 +44,12 @@ public class PersistMetaModules {
             "binlogs", "resourceGroups", "AnalysisMgrV2", "AsyncJobManager", 
"workloadSchedPolicy",
             "insertOverwrite", "plsql");
 
+    // The modules in `CloudEnv`.
+    public static final ImmutableList<String> CLOUD_MODULE_NAMES = 
ImmutableList.of("cloudWarmUpJob");
+
     // Modules in this list is deprecated and will not be saved in meta file. 
(also should not be in MODULE_NAMES)
     public static final ImmutableList<String> DEPRECATED_MODULE_NAMES = 
ImmutableList.of(
-            "loadJob", "cooldownJob", "AnalysisMgr", "mtmvJobManager", 
"JobTaskManager", "cloudWarmUpJob");
+            "loadJob", "cooldownJob", "AnalysisMgr", "mtmvJobManager", 
"JobTaskManager");
 
     static {
         MODULES_MAP = Maps.newHashMap();
@@ -55,6 +60,13 @@ public class PersistMetaModules {
                 MODULES_MAP.put(name, persistMethod);
                 MODULES_IN_ORDER.add(persistMethod);
             }
+            if (Config.isCloudMode()) {
+                for (String name : CLOUD_MODULE_NAMES) {
+                    MetaPersistMethod persistMethod = 
MetaPersistMethod.create(name);
+                    MODULES_MAP.put(name, persistMethod);
+                    MODULES_IN_ORDER.add(persistMethod);
+                }
+            }
         } catch (NoSuchMethodException e) {
             throw new RuntimeException(e);
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to