morningman commented on a change in pull request #2463: Add fe plugin framework URL: https://github.com/apache/incubator-doris/pull/2463#discussion_r395082752
########## File path: fe/src/main/java/org/apache/doris/catalog/Catalog.java ########## @@ -6515,6 +6546,77 @@ public void replayReplaceTempPartition(ReplacePartitionOperationLog replaceTempP } } + public void installPlugin(InstallPluginStmt stmt) throws UserException, IOException { + PluginInfo pluginInfo = pluginMgr.installPlugin(stmt); + if (Config.plugin_enable) { + editLog.logInstallPlugin(pluginInfo); + } + LOG.info("install plugin = " + pluginInfo.getName()); + } + + public long savePlugins(DataOutputStream dos, long checksum) throws IOException { + if (!Config.plugin_enable) { + return checksum; + } + + List<PluginInfo> list = pluginMgr.getAllDynamicPluginInfo(); + + int size = list.size(); + checksum ^= size; + + dos.writeInt(size); + + for (PluginInfo pc : list) { + pc.write(dos); + } + + return checksum; + } + + public long loadPlugins(DataInputStream dis, long checksum) throws IOException { + if (!Config.plugin_enable) { Review comment: And this method can be put into pluginMgr ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org