You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "Dream95 (via GitHub)" <gi...@apache.org> on 2026/05/26 02:51:05 UTC
Re: [PR] [improve][fn] #25791 functions incremental reload [pulsar]
Dream95 commented on code in PR #25868:
URL: https://github.com/apache/pulsar/pull/25868#discussion_r3300898124
##########
pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/functions/FunctionUtils.java:
##########
@@ -42,6 +46,17 @@ public class FunctionUtils {
private static final String PULSAR_IO_SERVICE_NAME = "pulsar-io.yaml";
+ /**
+ * Computes MD5 digest of a file as lower-case hex (for function archive identity on reload).
+ */
+ public static String computeArchiveMd5Hex(Path path) throws IOException {
+ return calculateMd5Hex(path.toAbsolutePath().normalize().toFile());
+ }
+
+ private static String calculateMd5Hex(File file) throws IOException {
+ return HexFormat.of().formatHex(FileUtils.calculateMd5sum(file));
Review Comment:
Since this mirrors ConnectorUtils.reloadConnectors, extracting a shared helper maybe better
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org