-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaskmanager.sh
More file actions
33 lines (21 loc) · 1.05 KB
/
taskmanager.sh
File metadata and controls
33 lines (21 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
echo "Downloading JDBC drivers..."
# Download PostgreSQL JDBC driver
if [ ! -f "/opt/flink/lib/postgresql-42.7.1.jar" ]; then
echo "Downloading PostgreSQL JDBC driver..."
wget -O /opt/flink/lib/postgresql-42.7.1.jar https://jdbc.postgresql.org/download/postgresql-42.7.1.jar
fi
# Download MSSQL JDBC driver
if [ ! -f "/opt/flink/lib/mssql-jdbc-12.4.1.jre11.jar" ]; then
echo "Downloading MSSQL JDBC driver..."
wget -O /opt/flink/lib/mssql-jdbc-12.4.1.jre11.jar https://repo1.maven.org/maven2/com/microsoft/sqlserver/mssql-jdbc/12.4.1.jre11/mssql-jdbc-12.4.1.jre11.jar
fi
# Download Flink SQL Gateway API
if [ ! -f "/opt/flink/lib/flink-sql-gateway-api-1.20.0.jar" ]; then
echo "Downloading Flink SQL Gateway API..."
wget -O /opt/flink/lib/flink-sql-gateway-api-1.20.0.jar https://repo1.maven.org/maven2/org/apache/flink/flink-sql-gateway-api/1.20.0/flink-sql-gateway-api-1.20.0.jar
fi
echo "JDBC drivers downloaded successfully"
# Start taskmanager
echo "Starting Flink TaskManager..."
exec /docker-entrypoint.sh taskmanager