srkukarni commented on a change in pull request #1385: remove function package 
on function delete
URL: https://github.com/apache/incubator-pulsar/pull/1385#discussion_r174635439
 
 

 ##########
 File path: 
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java
 ##########
 @@ -178,16 +178,31 @@ private void startFunction(FunctionRuntimeInfo 
functionRuntimeInfo) throws Excep
         runtimeSpawner.start();
     }
 
-    private boolean stopFunction(FunctionRuntimeInfo functionRuntimeInfo) {
+    private void stopFunction(FunctionRuntimeInfo functionRuntimeInfo) {
         Function.Instance instance = functionRuntimeInfo.getFunctionInstance();
         FunctionMetaData functionMetaData = instance.getFunctionMetaData();
         log.info("Stopping function {} - {}...",
                 functionMetaData.getFunctionConfig().getName(), 
instance.getInstanceId());
         if (functionRuntimeInfo.getRuntimeSpawner() != null) {
             functionRuntimeInfo.getRuntimeSpawner().close();
             functionRuntimeInfo.setRuntimeSpawner(null);
-            return true;
         }
-        return false;
+
+        // clean up function package
+        File pkgDir = new File(
+                workerConfig.getDownloadDirectory(),
+                StringUtils.join(
+                        new String[]{
 
 Review comment:
   Do you want to refactor this + create/update place where you determine the 
file name?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to