Skip to content

Commit

Permalink
Allow Kafka's SASL to use security manager under JDK 23
Browse files Browse the repository at this point in the history
  • Loading branch information
wendigo committed Oct 4, 2024
1 parent 7a9158d commit 012cd02
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import static io.trino.tests.product.launcher.env.EnvironmentContainers.WORKER;
import static io.trino.tests.product.launcher.env.EnvironmentContainers.configureTempto;
import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_TRINO_ETC;
import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_TRINO_JVM_CONFIG;
import static java.util.Objects.requireNonNull;
import static org.testcontainers.utility.MountableFile.forHostPath;

Expand All @@ -49,8 +50,8 @@ public EnvMultinodeKafkaSaslPlaintext(KafkaSaslPlaintext kafka, StandardMultinod
@Override
public void extendEnvironment(Environment.Builder builder)
{
builder.configureContainer(COORDINATOR, this::addCatalogs);
builder.configureContainer(WORKER, this::addCatalogs);
builder.configureContainer(COORDINATOR, this::configureTrino);
builder.configureContainer(WORKER, this::configureTrino);
builder.addConnector("kafka");

configureTempto(builder, configDir);
Expand All @@ -60,7 +61,7 @@ public void extendEnvironment(Environment.Builder builder)
CONTAINER_TRINO_ETC + "/kafka-configuration.properties"));
}

private void addCatalogs(DockerContainer container)
private void configureTrino(DockerContainer container)
{
container
.withCopyFileToContainer(
Expand All @@ -71,6 +72,8 @@ private void addCatalogs(DockerContainer container)
CONTAINER_TRINO_ETC + "/catalog/kafka.properties")
.withCopyFileToContainer(
forHostPath(configDir.getPath("kafka-configuration.properties")),
CONTAINER_TRINO_ETC + "/kafka-configuration.properties");
CONTAINER_TRINO_ETC + "/kafka-configuration.properties")
.withCopyFileToContainer(forHostPath(configDir.getPath("jvm.config")),
CONTAINER_TRINO_JVM_CONFIG);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-server
-Xmx2G
-XX:G1HeapRegionSize=32M
-XX:+ExplicitGCInvokesConcurrent
-XX:+ExitOnOutOfMemoryError
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:ReservedCodeCacheSize=150M
-XX:PerMethodRecompilationCutoff=10000
-XX:PerBytecodeRecompilationCutoff=10000
-Djdk.attach.allowAttachSelf=true
# jdk.nio.maxCachedBufferSize controls what buffers can be allocated in per-thread "temporary buffer cache" (sun.nio.ch.Util). Value of 0 disables the cache.
-Djdk.nio.maxCachedBufferSize=0
-DHADOOP_USER_NAME=hive
-Duser.timezone=Asia/Kathmandu
-XX:ErrorFile=/docker/logs/product-tests-presto-jvm-error-file.log
# Allow loading dynamic agent used by JOL
-XX:+EnableDynamicAgentLoading
-XX:+UnlockDiagnosticVMOptions
# https://bugs.openjdk.org/browse/JDK-8327134a
-Djava.security.manager=allow

0 comments on commit 012cd02

Please sign in to comment.