sijie commented on a change in pull request #8988: URL: https://github.com/apache/pulsar/pull/8988#discussion_r548185541
########## File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/SourcesImpl.java ########## @@ -719,4 +728,14 @@ public SourceConfig getSourceInfo(final String tenant, worker().getWorkerConfig().getValidateConnectorConfig()); return SourceConfigUtils.convert(sourceConfig, sourceDetails); } + + private static boolean hasPackageTypePrefix(String destPkgUrl) { + return Arrays.stream(PackageType.values()).anyMatch(type -> destPkgUrl.startsWith(type.toString())); + } + + private File downloadPackageFile(String packageName) throws IOException, PulsarAdminException { Review comment: You need to validate the existence of the package. But I don't think you should download the package. ---------------------------------------------------------------- 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