Commissioning Applications
ClickHouse applications can run in a Linux environment. After the application code is developed, you can upload the JAR package to the prepared Linux environment. The environment must be in the same VPC and security group as the clickhouse cluster to ensure network connectivity.
Prerequisites
JDK has been installed on Linux. The version must be the same as JDK version of the JAR file exported from IntelliJ IDEA. Java environment variables have been set.
Compiling and Running Applications
- Export the JAR file.
- Log in to IntelliJ IDEA and choose File > Project Structure > Artifacts.
- Click the plus sign (+) and choose JAR > From modules with dependencies.
- Choose com.xxx.clickhouse.examples.Demo from the Main Class drop-down list and click OK.
- Choose Build > Build Artifacts.... After the compilation is successful, view and obtain all JAR files in the clickhouse-examples\out\artifacts\clickhouse_examples_jar directory.
- Copy all JAR files in the clickhouse-examples\out\artifacts\clickhouse_examples.jar directory and the conf folder in the clickhouse-examples directory to the same directory of the ECS.
- Log in to the client node, go to the directory where the JAR file is uploaded, and change the file permission to 700.
- In the client directory where clickhouse_examples.jar is stored, run the following commands to run the JAR file:
java -cp ./*:conf/clickhouse-example.properties com.xxx.clickhouse.examples.Demo
Viewing Commissioning Results
If no exception or failure information is displayed, the application running is successful.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot