|
1 | | -export function trinoUserDataCommands(instanceIndex: number): string[] { |
| 1 | +const TRINO_VERSION = 476 |
| 2 | + |
| 3 | +export function trinoUserDataCommands(instanceIndex: number, region: string): string[] { |
2 | 4 | const isCoordinator = instanceIndex === 0; |
3 | 5 |
|
4 | 6 | return [ |
5 | | - // Install Java 22 for Trino (Trino 461 requires Java 22+) |
6 | | - 'yum install -y java-22-amazon-corretto-headless python', |
| 7 | + // Install Java 24 for Trino (Trino 478 requires Java 24+) |
| 8 | + 'yum install -y java-24-amazon-corretto-headless python', |
7 | 9 |
|
8 | | - // Download and install Trino |
| 10 | + // Download and install Trino 478 (latest version) |
9 | 11 | 'cd /opt', |
10 | | - 'curl -L -o trino-server.tar.gz https://repo1.maven.org/maven2/io/trino/trino-server/461/trino-server-461.tar.gz', |
| 12 | + `curl -L -o trino-server.tar.gz https://repo1.maven.org/maven2/io/trino/trino-server/${TRINO_VERSION}/trino-server-${TRINO_VERSION}.tar.gz`, |
11 | 13 | 'tar -xzf trino-server.tar.gz', |
12 | | - 'mv trino-server-461 trino-server', |
| 14 | + `mv trino-server-${TRINO_VERSION} trino-server`, |
13 | 15 | 'rm trino-server.tar.gz', |
14 | 16 |
|
15 | 17 | // Create Trino directories |
@@ -49,15 +51,22 @@ http-server.http.port=8080 |
49 | 51 | discovery.uri=http://localhost:8080 |
50 | 52 | TRINO_EOF`, |
51 | 53 |
|
52 | | - // Configure Hive catalog for S3 Parquet files |
| 54 | + // Configure Hive catalog with AWS Glue metastore |
53 | 55 | `cat > /opt/trino-server/etc/catalog/hive.properties << 'TRINO_EOF' |
54 | 56 | connector.name=hive |
55 | | -hive.metastore=file |
56 | | -hive.metastore.catalog.dir=/var/trino/metastore |
| 57 | +hive.metastore=glue |
| 58 | +hive.metastore.glue.region=${region} |
| 59 | +fs.native-s3.enabled=true |
| 60 | +s3.region=${region} |
| 61 | +TRINO_EOF`, |
| 62 | + |
| 63 | + // Configure TPCH catalog for reference |
| 64 | + `cat > /opt/trino-server/etc/catalog/tpch.properties << 'TRINO_EOF' |
| 65 | +connector.name=tpch |
57 | 66 | TRINO_EOF`, |
58 | 67 |
|
59 | 68 | // Download Trino CLI |
60 | | - 'curl -L -o /usr/local/bin/trino https://repo1.maven.org/maven2/io/trino/trino-cli/461/trino-cli-461-executable.jar', |
| 69 | + 'curl -L -o /usr/local/bin/trino https://repo1.maven.org/maven2/io/trino/trino-cli/478/trino-cli-478-executable.jar', |
61 | 70 | 'chmod +x /usr/local/bin/trino', |
62 | 71 |
|
63 | 72 | // Create Trino systemd service |
|
0 commit comments