Skip to main content

Upgrades

1. Download Package

If you need to upgrade your StreamPark program, you can directly download the latest installation package from the official website. For example, if you are downloading version 2.1.5, the download link is: https://streampark.apache.org/download

Once the download is complete, extract the package:

# Extract the streampark installation package.
tar -zxvf apache-streampark_2.12-2.1.5-incubating-bin.tar.gz

The extracted directory structure will look like this:

├── bin
│ ├── startup.sh // Startup script
│ ├── shutdown.sh // Shutdown script
│ └── ......
├── conf
│ ├── config.yaml // Project configuration file
│ └── logback-spring.xml // Log configuration file
├── lib
│ └── *.jar // Project's JAR files
├── logs // Program log directory
├── script
│ ├── data
│ │ ├── mysql-data.sql // MySQL DDL creation SQL
│ │ └── pgsql-data.sql // PostgreSQL DDL creation SQL
│ ├── schema
│ │ ├── mysql-schema.sql // Full initialization data for MySQL
│ │ └── pgsql-schema.sql // Full initialization data for PostgreSQL
│ └── upgrade
│ ├── mysql
│ │ ├── 1.2.3.sql // SQL to upgrade to version 1.2.3
│ │ ├── 2.0.0.sql // SQL to upgrade to version 2.0.0
│ │ ├── 2.1.0.sql // SQL to upgrade to version 2.1.0
│ │ ├── 2.1.2.sql // SQL to upgrade to version 2.1.2
│ │ ├── 2.1.3.sql // SQL to upgrade to version 2.1.3
│ │ ├── 2.1.4.sql // SQL to upgrade to version 2.1.4
│ │ └── 2.1.5.sql // SQL to upgrade to version 2.1.5
│ └── pgsql
│ └── ......
└── temp // Temporary path used internally, do not delete
Note

The upgrade scripts are located in the script/upgrade folder.

2. Execute Upgrade Scripts

In the script/upgrade directory of the extracted installation package, you will see separate upgrade directories for MySQL and PostgreSQL, each containing multiple upgrade scripts.

......

├── script
│ ├── data
│ │ ├── mysql-data.sql // MySQL DDL creation SQL
│ │ └── pgsql-data.sql // PostgreSQL DDL creation SQL
│ ├── schema
│ │ ├── mysql-schema.sql // Full initialization data for MySQL
│ │ └── pgsql-schema.sql // Full initialization data for PostgreSQL
│ └── upgrade
│ ├── mysql
│ │ ├── 1.2.3.sql // SQL to upgrade to version 1.2.3
│ │ ├── 2.0.0.sql // SQL to upgrade to version 2.0.0
│ │ ├── 2.1.0.sql // SQL to upgrade to version 2.1.0
│ │ ├── 2.1.2.sql // SQL to upgrade to version 2.1.2
│ │ ├── 2.1.3.sql // SQL to upgrade to version 2.1.3
│ │ ├── 2.1.4.sql // SQL to upgrade to version 2.1.4
│ │ └── 2.1.5.sql // SQL to upgrade to version 2.1.5
│ └── pgsql
│ └── ......

......
Caution

These scripts need to be executed in order, based on the version before the upgrade.

For example, if the program uses an external MySQL database:

  • · If the current version is 2.1.2, you need to execute the scripts in the following order: 2.1.3.sql2.1.4.sql2.1.5.sql.
  • · If the current version is 2.1.3, you need to execute 2.1.4.sql2.1.5.sql.
  • · If the current version is 2.1.4, you only need to execute 2.1.5.sql.

3. Modify Configuration

Ensure that the latest configuration file (/conf/config.yaml) is consistent with the historical configuration:

......

├── conf
│ ├── config.yaml // Project configuration file

......

Finally, start the program to complete the upgrade and update operation!