wForget commented on PR #7616:
URL: https://github.com/apache/kyuubi/pull/7616#issuecomment-6465145457

   > 1. The root cause is in `ProcBuilder`: the trait body calls the 
overridable `appMgrInfo()` (`ProcBuilder.scala` L173-175) during construction, 
before subclass vals are initialized. Making `sparkHome` lazy covers only one 
field; any strict val reached via `appMgrInfo()` -> 
`clusterManager()`/`getSparkOption` hits the same issue. Consider fixing it in 
the trait, e.g. set `KYUUBI_ENGINE_APP_MGR_INFO_KEY` lazily in 
`start`/`processBuilder`.
   
   This is indeed the root cause, and it was fixed this way previously. 
However, as @aajisaka pointed out:
   
   > The reason is, `SparkProcessBuilder.commands` is cached, and the command 
line is materialized upon first access (`EngineRef.create`)—before `start` is 
called—which means the engine command line no longer contains `appMgrInfo`.
   
   Moving the setting of `KYUUBI_ENGINE_APP_MGR_INFO_KEY` into the 
`processBuilder.start` method would break #6008.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to