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 2021/02/04 01:19:13 UTC

[GitHub] [pulsar] nlu90 commented on a change in pull request #9377: [fix #9315] Add downloadDirectory support to function k8s runtime

nlu90 commented on a change in pull request #9377:
URL: https://github.com/apache/pulsar/pull/9377#discussion_r569875200



##########
File path: pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/KubernetesRuntime.java
##########
@@ -200,7 +204,11 @@
         this.pulsarRootDir = pulsarRootDir;
         this.configAdminCLI = configAdminCLI;
         this.userCodePkgUrl = userCodePkgUrl;
-        this.originalCodeFileName = pulsarRootDir + "/" + originalCodeFileName;
+        this.downloadDirectory = this.pulsarRootDir; // for backward comp
+        if (StringUtils.isNotBlank(downloadDirectory)) {
+            this.downloadDirectory = downloadDirectory;
+        }

Review comment:
       how about `this.downloadDirectory = StringUtils.isNotBlank(downloadDirectory)?downloadDirectory:this.pulsarRootDir;` to avoid some confusion reading this part of code?




----------------------------------------------------------------
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