Skip to content
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

Use /pulsar/instances/deps/* instead of /pulsar/lib/* in classpath #787

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ spec:
java:
jar: pulsar-functions-api-examples.jar
jarLocation: function://public/default/test-java-function
log:
javaLog4JConfigFileType: "yaml"
# to be delete & use admission hook
clusterName: test
autoAck: true
Expand Down
2 changes: 1 addition & 1 deletion controllers/spec/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ func getProcessJavaRuntimeArgs(name, packageName, clusterName, logLevel, details
state *v1alpha1.Stateful,
tlsConfig TLSConfig, authConfig *v1alpha1.AuthConfig,
maxPendingAsyncRequests *int32, logConfigFileName string) []string {
classPath := "/pulsar/instances/java-instance.jar:/pulsar/lib/*"
classPath := "/pulsar/instances/java-instance.jar:/pulsar/instances/deps/*"
javaLogConfigPath := logConfigFileName
if javaLogConfigPath == "" {
javaLogConfigPath = DefaultJavaLogConfigPath
Expand Down
3 changes: 3 additions & 0 deletions images/pulsar-functions-java-runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ FROM pulsar-functions-runner-base:latest
COPY --from=pulsar --chown=$UID:$GID /pulsar/instances/java-instance.jar /pulsar/instances/java-instance.jar
COPY --from=pulsar --chown=$UID:$GID /pulsar/instances/deps /pulsar/instances/deps

RUN cp /pulsar/lib/com.fasterxml.jackson.dataformat-jackson-dataformat-yaml-*.jar /pulsar/instances/deps/dataformat-jackson-dataformat-yaml.jar \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

used to load yaml format log4j config file

&& cp /pulsar/lib/org.yaml-snakeyaml-*.jar /pulsar/instances/deps/org.yaml-snakeyaml.jar

WORKDIR /pulsar

USER $USER
3 changes: 3 additions & 0 deletions images/pulsar-functions-java-runner/pulsarctl.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ RUN rm -rf /pulsar/lib/io.vertx-vertx-core-*.jar || true
RUN rm -rf /pulsar/lib/presto || true
RUN rm -rf /pulsar/conf/presto || true

RUN cp /pulsar/lib/com.fasterxml.jackson.dataformat-jackson-dataformat-yaml-*.jar /pulsar/instances/deps/dataformat-jackson-dataformat-yaml.jar \
&& cp /pulsar/lib/org.yaml-snakeyaml-*.jar /pulsar/instances/deps/org.yaml-snakeyaml.jar

ENV PULSAR_ROOT_LOGGER=INFO,CONSOLE
ENV java.io.tmpdir=/pulsar/tmp/

Expand Down
Loading