Skip to content
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
4 changes: 4 additions & 0 deletions core/docker/default/etc/jvm.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@
-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
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ 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() {}

Expand All @@ -52,6 +53,7 @@ public static void verifyJvmRequirements()
verifyFileDescriptor();
verifySlice();
verifyUtf8();
verifyLocale();
}

private static void verify64BitJvm()
Expand Down Expand Up @@ -162,6 +164,14 @@ 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@
-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
4 changes: 4 additions & 0 deletions docs/src/main/sphinx/installation/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ 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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@
-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
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@
-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