sap1ens commented on code in PR #370:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/370#discussion_r973753540


##########
flink-kubernetes-standalone/src/main/java/org/apache/flink/kubernetes/operator/kubeclient/parameters/StandaloneKubernetesJobManagerParameters.java:
##########
@@ -87,4 +88,8 @@ public Boolean getAllowNonRestoredState() {
         }
         return null;
     }
+
+    public Boolean isPipelineClasspathDefined() {
+        return flinkConfig.contains(PipelineOptions.CLASSPATHS);
+    }

Review Comment:
   > Why can't we always mount the usrlib dir?
   
   Great question! Check the end of my PR description for more context. It 
turns out, when 
[StandaloneApplicationClusterEntryPoint](https://github.com/apache/flink/blob/40d50f177c8ac63057dea2c755173a0dc138ede5/flink-container/src/main/java/org/apache/flink/container/entrypoint/StandaloneApplicationClusterEntryPoint.java#L104)
 starts, it tries to find the `usrlib` folder. And if it's not null [it'll be 
used for loading the classes, not the system 
classpath](https://github.com/apache/flink/blob/40d50f177c8ac63057dea2c755173a0dc138ede5/flink-clients/src/main/java/org/apache/flink/client/program/DefaultPackagedProgramRetriever.java#L143-L147).
 So, we simply can't have a `usrlib` folder when we want to load classes from 
`/opt/flink/lib`.
   
   > What if PipelineOptions.CLASSPATHS points to a directory outside usrlib?
   
   Exactly. I don't know the context and all the use-cases, but in my mind 
`UserLibMountDecorator` shouldn't be part of the operator - let the user 
create/mount the right folder and place jars there. But deleting it in the 
context of this PR is a big change IMO, so added a check based on the comment 
on the `UserLibMountDecorator` class: `Mount the Flink User Lib directory to 
enable Flink to pick up a Jars defined in pipeline.classpaths.`. Which is think 
is misleading. WDYT?



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to