「Trino」:修訂間差異
跳至導覽
跳至搜尋
第24行: | 第24行: | ||
node.id=$(uuidgen) | node.id=$(uuidgen) | ||
node.data-dir=/opt/trino-server/data | node.data-dir=/opt/trino-server/data | ||
EOF; sudo tee etc/jvm.config > /dev/null <<EOF | |||
-server | |||
-Xmx1G | |||
-XX:-UseBiasedLocking | |||
-XX:+UseG1GC | |||
-XX:G1HeapRegionSize=32M | |||
-XX:+ExplicitGCInvokesConcurrent | |||
-XX:+ExitOnOutOfMemoryError | |||
-XX:+HeapDumpOnOutOfMemoryError | |||
-XX:-OmitStackTraceInFastThrow | |||
-XX:ReservedCodeCacheSize=512M | |||
-XX:PerMethodRecompilationCutoff=10000 | |||
-XX:PerBytecodeRecompilationCutoff=10000 | |||
-Djdk.attach.allowAttachSelf=true | |||
-Djdk.nio.maxCachedBufferSize=2000000 | |||
EOF | EOF | ||
</syntaxhighlight> | </syntaxhighlight> |
於 2021年8月10日 (二) 03:03 的修訂
Trino是一套SQL查詢引擎,舊名PrestoSQL,是源自於Presto的引擎。
簡介
PrestoSQL是fork自Presto的專案,後來成立公司。在2018年時Facebook出面阻止使用其商標營利,改名為Trino。
安裝
在Ubuntu類的系統上沒有套件可以裝,這邊建議直接下載並且安裝到/opt
下(另外需要Java 11):
sudo apt install -y openjdk-11-jre; cd /tmp; wget https://repo1.maven.org/maven2/io/trino/trino-server/360/trino-server-360.tar.gz; cd /opt; sudo tar xvf /tmp/trino-server-360.tar.gz; sudo mkdir trino-server; cd trino-server; sudo ln -s ../trino-server-360/{bin,lib,plugin} .
設定
這邊有些設定要注意的:
etc/node.properties
的node.environment
。
cd /opt/trino-server; sudo mkdir etc; sudo tee etc/node.properties > /dev/null <<EOF
node.environment=production
node.id=$(uuidgen)
node.data-dir=/opt/trino-server/data
EOF; sudo tee etc/jvm.config > /dev/null <<EOF
-server
-Xmx1G
-XX:-UseBiasedLocking
-XX:+UseG1GC
-XX:G1HeapRegionSize=32M
-XX:+ExplicitGCInvokesConcurrent
-XX:+ExitOnOutOfMemoryError
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:ReservedCodeCacheSize=512M
-XX:PerMethodRecompilationCutoff=10000
-XX:PerBytecodeRecompilationCutoff=10000
-Djdk.attach.allowAttachSelf=true
-Djdk.nio.maxCachedBufferSize=2000000
EOF