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

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


The following commit(s) were added to refs/heads/master by this push:
     new 337faadec0b Adding new API to register backward compatible class names 
(#17772)
337faadec0b is described below

commit 337faadec0bd749f3c8f44cff857d5bf773fe66a
Author: Xiang Fu <[email protected]>
AuthorDate: Fri Feb 27 16:01:00 2026 -0800

    Adding new API to register backward compatible class names (#17772)
---
 .../main/java/org/apache/pinot/spi/plugin/PluginManager.java | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git 
a/pinot-spi/src/main/java/org/apache/pinot/spi/plugin/PluginManager.java 
b/pinot-spi/src/main/java/org/apache/pinot/spi/plugin/PluginManager.java
index 4f7caa6db8c..a8ae0bdc70b 100644
--- a/pinot-spi/src/main/java/org/apache/pinot/spi/plugin/PluginManager.java
+++ b/pinot-spi/src/main/java/org/apache/pinot/spi/plugin/PluginManager.java
@@ -496,4 +496,16 @@ public class PluginManager {
       
INPUT_FORMAT_TO_RECORD_READER_CONFIG_CLASS_NAME_MAP.put(inputFormat.toLowerCase(),
 recordReaderConfigClass);
     }
   }
+
+  // Register plugin class names when users try to deprecate old 
plugins/libraries.
+  public void registerBackwardCompatibleClassName(String oldClassName, String 
newClassName) {
+    String existingNewClassName = 
PLUGINS_BACKWARD_COMPATIBLE_CLASS_NAME_MAP.put(oldClassName, newClassName);
+    if (existingNewClassName != null) {
+      LOGGER.warn("There is already a mapping for backward compatible class 
from old [{}] to [{}], override it to [{}]",
+          oldClassName, existingNewClassName, newClassName);
+    } else {
+      LOGGER.info("Registered backward compatible class name mapping from old 
[{}] to new [{}]", oldClassName,
+          newClassName);
+    }
+  }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to