Trystan created FLINK-33926:
-------------------------------

             Summary: Can't start a job with a jar in the system classpath in 
native k8s mode
                 Key: FLINK-33926
                 URL: https://issues.apache.org/jira/browse/FLINK-33926
             Project: Flink
          Issue Type: Bug
    Affects Versions: kubernetes-operator-1.6.0
            Reporter: Trystan


It appears that the combination of the running operator-controlled jobs in 
native k8s mode + using a job jar in the classpath is invalid. Avoiding dynamic 
classloading (as specified in the 
[docs|https://nightlies.apache.org/flink/flink-docs-release-1.16/docs/ops/debugging/debugging_classloading/#avoiding-dynamic-classloading-for-user-code])
 is beneficial for some jobs. This affects at least Flink 1.16.1.

 

[FLINK-29288|https://issues.apache.org/jira/browse/FLINK-29288] addressed this 
for standalone mode.

 

Perhaps related, the [spec 
documentation|https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-main/docs/custom-resource/reference/#jobspec]
 declares it optional, but isn't clear about under what conditions that applies.
 * Putting the jar in the system classpath and pointing *jarURI* to that jar 
leads to linkage errors.
 * Not including *jarURI* leads to NullPointerExceptions in the operator:

{code:java}
{"type":"org.apache.flink.kubernetes.operator.exception.ReconciliationException","message":"java.lang.NullPointerException","stackTrace":"org.apache.flink.kubernetes.operator.exception.ReconciliationException:
 java.lang.NullPointerException\n\tat 
org.apache.flink.kubernetes.operator.controller.FlinkDeploymentController.reconcile(FlinkDeploymentController.java:148)\n\tat
 
org.apache.flink.kubernetes.operator.controller.FlinkDeploymentController.reconcile(FlinkDeploymentController.java:56)\n\tat
 
io.javaoperatorsdk.operator.processing.Controller$1.execute(Controller.java:138)\n\tat
 
io.javaoperatorsdk.operator.processing.Controller$1.execute(Controller.java:96)\n\tat
 
org.apache.flink.kubernetes.operator.metrics.OperatorJosdkMetrics.timeControllerExecution(OperatorJosdkMetrics.java:80)\n\tat
 
io.javaoperatorsdk.operator.processing.Controller.reconcile(Controller.java:95)\n\tat
 
io.javaoperatorsdk.operator.processing.event.ReconciliationDispatcher.reconcileExecution(ReconciliationDispatcher.java:139)\n\tat
 
io.javaoperatorsdk.operator.processing.event.ReconciliationDispatcher.handleReconcile(ReconciliationDispatcher.java:119)\n\tat
 
io.javaoperatorsdk.operator.processing.event.ReconciliationDispatcher.handleDispatch(ReconciliationDispatcher.java:89)\n\tat
 
io.javaoperatorsdk.operator.processing.event.ReconciliationDispatcher.handleExecution(ReconciliationDispatcher.java:62)\n\tat
 
io.javaoperatorsdk.operator.processing.event.EventProcessor$ReconcilerExecutor.run(EventProcessor.java:414)\n\tat
 java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown 
Source)\n\tat 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
Source)\n\tat java.base/java.lang.Thread.run(Unknown Source)\nCaused by: 
java.lang.NullPointerException\n\tat 
org.apache.flink.kubernetes.utils.KubernetesUtils.checkJarFileForApplicationMode(KubernetesUtils.java:407)\n\tat
 
org.apache.flink.kubernetes.KubernetesClusterDescriptor.deployApplicationCluster(KubernetesClusterDescriptor.java:207)\n\tat
 
org.apache.flink.client.deployment.application.cli.ApplicationClusterDeployer.run(ApplicationClusterDeployer.java:67)\n\tat
 
org.apache.flink.kubernetes.operator.service.NativeFlinkService.deployApplicationCluster(Native","additionalMetadata":{},"throwableList":[{"type":"java.lang.NullPointerException","additionalMetadata":{}}]}
  {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to