-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native-image i.e. GraalVM builds of Zookeeper and CLIs #29
Conversation
…ssing at runtime now
and nativeagent manually because for now we'll have to craft the native-image Dockerfiles
missing at runtime now. We'll probably get a lot of these when we run with --allow-incomplete-classpath
in both the entrypoint step and native-image
the slf4j impl with slf4j-simple
This reverts commit b39dd5f3d6dd04bbeb8a74a795f73c98e9c586c8.
type during parsing: io.netty.util.internal.logging.Log4J2Logger. To diagnose the issue you can use the --allow-incomplete-classpath option
Current status is that 9c702d5 had to be added because of e2695a3. That flag increases the need for testing with real use cases. Both admin CLIs and Zookeeper log JMX errors. I assume that no native-image user will want JMX, and the errors seem to have no side effects (other than performance?) but look ugly in logs and for zookeeper actually makes the logs difficult to read. We probably need to start writing @Substitute code to get rid of these errors. |
though here it might not make any difference
Note that both solsson/kafka:native-cli (including images for individual admin commands) and solsson/kafka:native-zookeeper-server-start use hard coded logging settings, i.e. The resulting builds from this PR are |
Faster startup and less resource consumption matters a lot for things we start often; not so much for actual Kafka brokers. This PR replaces #25.
We're actually running native zookeeper on GKE now in a test cluster. JMX isn't working so logs frequently spit out the below stack trace, but the clusters do work. The experiment lives in Yolean/kubernetes-kafka#311, note the
scale-6-9
variant. An exploration of the entrypoints that the Kafka distribution's various./bin/*.sh
wrapper scripts generate is inherent in our work here because with native-image a lot of the options to java processes must be set at compile time. IMO the shell script are a layer of hidden assumptions when running in containers, and because they generate the same startup command every time given the same pod spec this exposure of the actual args allows for better understanding and more clear customizations.More effort must be spent to make logging work. Ideally with the log4j.properties files that JVM images use, but for now it's quite adequate to chose between slf4j-nop and slf4j-simple (none or info-level logging respectively). The zookeeper build uses slf4j-simple.