diff --git a/core/docker/default/etc/jvm.config b/core/docker/default/etc/jvm.config index 9d1a5afd54d7..0a6bca1bc2fa 100644 --- a/core/docker/default/etc/jvm.config +++ b/core/docker/default/etc/jvm.config @@ -17,7 +17,3 @@ -XX:GCLockerRetryAllocationCount=32 # Allow loading dynamic agent used by JOL -XX:+EnableDynamicAgentLoading -# Trino server behavior does generally not depend on locale settings. -# Use en_US as this is what Trino is tested with. --Duser.language=en --Duser.region=US diff --git a/core/trino-main/src/main/java/io/trino/server/Server.java b/core/trino-main/src/main/java/io/trino/server/Server.java index d9a343d87cd3..13b797fd67ba 100644 --- a/core/trino-main/src/main/java/io/trino/server/Server.java +++ b/core/trino-main/src/main/java/io/trino/server/Server.java @@ -74,6 +74,7 @@ import java.nio.file.Paths; import java.util.Collection; import java.util.List; +import java.util.Locale; import java.util.Optional; import java.util.Set; @@ -95,6 +96,10 @@ public final void start(String trinoVersion) private void doStart(String trinoVersion) { + // Trino server behavior does not depend on locale settings. + // Use en_US as this is what Trino is tested with. + Locale.setDefault(Locale.US); + long startTime = System.nanoTime(); verifyJvmRequirements(); verifySystemTimeIsReasonable(); diff --git a/core/trino-main/src/main/java/io/trino/server/TrinoSystemRequirements.java b/core/trino-main/src/main/java/io/trino/server/TrinoSystemRequirements.java index 462cc7bdb33e..d3ec3cba1792 100644 --- a/core/trino-main/src/main/java/io/trino/server/TrinoSystemRequirements.java +++ b/core/trino-main/src/main/java/io/trino/server/TrinoSystemRequirements.java @@ -39,7 +39,6 @@ final class TrinoSystemRequirements { private static final int MIN_FILE_DESCRIPTORS = 4096; private static final int RECOMMENDED_FILE_DESCRIPTORS = 8192; - private static final Locale EN_US = Locale.of("en", "US"); private TrinoSystemRequirements() {} @@ -53,7 +52,6 @@ public static void verifyJvmRequirements() verifyFileDescriptor(); verifySlice(); verifyUtf8(); - verifyLocale(); } private static void verify64BitJvm() @@ -164,14 +162,6 @@ private static void verifyUtf8() } } - private static void verifyLocale() - { - Locale defaultLocale = Locale.getDefault(); - if (!defaultLocale.equals(EN_US)) { - failRequirement("Trino requires that the default locale is ENGLISH (found %s). This can be set with the JVM command line option -Duser.language=en -Duser.region=US", defaultLocale); - } - } - /** * Perform a sanity check to make sure that the year is reasonably current, to guard against * issues in third party libraries. diff --git a/core/trino-main/src/main/java/io/trino/server/testing/TestingTrinoServer.java b/core/trino-main/src/main/java/io/trino/server/testing/TestingTrinoServer.java index 2e4898f375b3..d23e5ff40a2a 100644 --- a/core/trino-main/src/main/java/io/trino/server/testing/TestingTrinoServer.java +++ b/core/trino-main/src/main/java/io/trino/server/testing/TestingTrinoServer.java @@ -126,6 +126,7 @@ import java.time.Instant; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Optional; import java.util.concurrent.CountDownLatch; @@ -152,6 +153,10 @@ public class TestingTrinoServer Logging logging = Logging.initialize(); logging.setLevel("io.trino.event.QueryMonitor", Level.ERROR); logging.setLevel("org.eclipse.jetty", Level.ERROR); + + // Trino server behavior does not depend on locale settings. + // Use en_US as this is what Trino is tested with. + Locale.setDefault(Locale.US); } public static final String SESSION_START_TIME_PROPERTY = "session_start_time"; diff --git a/core/trino-server-rpm/src/main/resources/dist/config/jvm.config b/core/trino-server-rpm/src/main/resources/dist/config/jvm.config index 49bf611a9e92..f9d739fbd3ab 100644 --- a/core/trino-server-rpm/src/main/resources/dist/config/jvm.config +++ b/core/trino-server-rpm/src/main/resources/dist/config/jvm.config @@ -16,7 +16,3 @@ -XX:GCLockerRetryAllocationCount=32 # Allow loading dynamic agent used by JOL -XX:+EnableDynamicAgentLoading -# Trino server behavior does generally not depend on locale settings. -# Use en_US as this is what Trino is tested with. --Duser.language=en --Duser.region=US diff --git a/docs/src/main/sphinx/installation/deployment.md b/docs/src/main/sphinx/installation/deployment.md index 9ec523682802..71514738ba68 100644 --- a/docs/src/main/sphinx/installation/deployment.md +++ b/docs/src/main/sphinx/installation/deployment.md @@ -147,10 +147,6 @@ The following provides a good starting point for creating `etc/jvm.config`: -XX:GCLockerRetryAllocationCount=32 # Allow loading dynamic agent used by JOL -XX:+EnableDynamicAgentLoading -# Trino server behavior does generally not depend on locale settings. -# Use en_US as this is what Trino is tested with. --Duser.language=en --Duser.region=US ``` You must adjust the value for the memory used by Trino, specified with `-Xmx` diff --git a/testing/trino-product-tests-launcher/src/main/resources/docker/presto-product-tests/conf/environment/multinode-all/jvm.config b/testing/trino-product-tests-launcher/src/main/resources/docker/presto-product-tests/conf/environment/multinode-all/jvm.config index 67e8936000b6..13a9f69d5853 100644 --- a/testing/trino-product-tests-launcher/src/main/resources/docker/presto-product-tests/conf/environment/multinode-all/jvm.config +++ b/testing/trino-product-tests-launcher/src/main/resources/docker/presto-product-tests/conf/environment/multinode-all/jvm.config @@ -17,7 +17,3 @@ -XX:ErrorFile=/docker/logs/product-tests-presto-jvm-error-file.log # Allow loading dynamic agent used by JOL -XX:+EnableDynamicAgentLoading -# Trino server behavior does generally not depend on locale settings. -# Use en_US as this is what Trino is tested with. --Duser.language=en --Duser.region=US diff --git a/testing/trino-product-tests-launcher/src/main/resources/docker/presto-product-tests/conf/presto/etc/jvm.config b/testing/trino-product-tests-launcher/src/main/resources/docker/presto-product-tests/conf/presto/etc/jvm.config index 95aab7948283..313933a433ba 100644 --- a/testing/trino-product-tests-launcher/src/main/resources/docker/presto-product-tests/conf/presto/etc/jvm.config +++ b/testing/trino-product-tests-launcher/src/main/resources/docker/presto-product-tests/conf/presto/etc/jvm.config @@ -16,7 +16,3 @@ -XX:ErrorFile=/docker/logs/product-tests-presto-jvm-error-file.log # Allow loading dynamic agent used by JOL -XX:+EnableDynamicAgentLoading -# Trino server behavior does generally not depend on locale settings. -# Use en_US as this is what Trino is tested with. --Duser.language=en --Duser.region=US