You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/12/22 17:56:53 UTC

[GitHub] [pulsar] sijie commented on a change in pull request #8987: Support create and update sink with package name

sijie commented on a change in pull request #8987:
URL: https://github.com/apache/pulsar/pull/8987#discussion_r547418582



##########
File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/SinksImpl.java
##########
@@ -317,10 +321,14 @@ public void updateSink(final String tenant,
             // validate parameters
             try {
                 if (isNotBlank(sinkPkgUrl)) {
-                    try {
-                        componentPackageFile = FunctionCommon.extractFileFromPkgURL(sinkPkgUrl);
-                    } catch (Exception e) {
-                        throw new IllegalArgumentException(String.format("Encountered error \"%s\" when getting %s package from %s", e.getMessage(), ComponentTypeUtils.toString(componentType), sinkPkgUrl));
+                    if (hasPackageTypePrefix(sinkPkgUrl)) {
+                        componentPackageFile = downloadPackageFile(sinkPkgUrl);

Review comment:
       Same comment in apache/pulsar#8988. Why do we need to 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:
users@infra.apache.org