Updated on 2023-04-28 GMT+08:00

Preparing the Development and Running Environment

Table 1 describes the environment required for application development.

Table 1 Development environment

Item

Description

OS

  • Development environment: Windows 7 or later versions
  • Operating environment: Windows or Linux

    If the program needs to be commissioned locally, the operating environment must be able to communicate with network on the cluster service plane.

JDK

Basic configurations of the development and operating environments. The version requirements are as follows:

The server and client support only built-in OpenJDK 1.8.0_272.

Customers' applications that need to reference the JAR files of SDK to run in the application processes support Oracle JDK, IBM JDK, and OpenJDK.

x86 client: Oracle JDK 1.8; IBM JDK: 1.8.5.11.

NOTE:

For security purposes, the server supports only TLS V1.2 or later.

By default, the IBM JDK supports only TLS V1.0. If the IBM JDK is used, set the startup parameter com.ibm.jsse2.overrideDefaultTLS to true. After the setting, the IBM JDK supports TLS V1.0, TLS V1.1, and TLS V1.2. For details, see https://www.ibm.com/docs/en/sdk-java-technology/8?topic=customization-matching-behavior-sslcontextgetinstancetls-oracle#matchsslcontext_tls.

IntelliJ IDEA

Tool used for developing IoTDB applications. The version must be 2019.1 or other compatible version.

NOTE:
  • If you use IBM JDK, ensure that the JDK configured in IntelliJ IDEA is IBM JDK.
  • If you use Oracle JDK, ensure that the JDK configured in IntelliJ IDEA is Oracle JDK.
  • If you use OpenJDK, ensure that the JDK configured in IntelliJ IDEA is OpenJDK.
  • Do not use the same workspace and the sample project in the same path for different IntelliJ IDEA programs.

Maven

Basic configurations of the development environment. Maven is used for project management throughout the lifecycle of software development.

7-zip

This tool is used to decompress *.zip and *.rar files. 7-Zip 16.04 is supported.

Preparing an Operating Environment

During application development, prepare the code running and commissioning environment to verify that the application is running properly.

  • If the local Windows development environment can communicate with the cluster service plane network, download the cluster client to the local host; obtain the cluster configuration file required by the commissioning application; configure the network connection, and commission the application in Windows.
    1. and choose Cluster > Dashboard > More > Download Client. Set Select Client Type to Configuration Files Only. Select the platform type based on the type of the node where the client is to be installed (select x86_64 for the x86 architecture and aarch64 for the Arm architecture) and click OK. After the client files are packaged and generated, download the client to the local PC as prompted and decompress it.

      For example, if the client configuration file package is FusionInsight_Cluster_1_Services_Client.tar, decompress it to obtain FusionInsight_Cluster_1_Services_ClientConfig_ConfigFiles.tar. Then, decompress FusionInsight_Cluster_1_Services_ClientConfig_ConfigFiles.tar Decompress the package to the D:\FusionInsight_Cluster_1_Services_ClientConfig_ConfigFiles directory on the local PC.

    2. During application development, if you need to commission the application in the local Windows system, copy the content in the hosts file in the decompression directory to the hosts file of the node where the client is located. Ensure that the local host can communicate correctly with the hosts listed in the hosts file in the decompression directory.
      • If the host where the client is installed is not a node in the cluster, configure network connections for the client to prevent errors when you run commands on the client.
      • The local hosts file in a Windows environment is stored in, for example, C:\WINDOWS\system32\drivers\etc\hosts.
  • If you use the Linux environment for commissioning, prepare the Linux node where the cluster client is to be installed and obtain related configuration files.
    1. Install the client in a directory, for example, /opt/client, on the node.

      Ensure that the difference between the client time and the cluster time is less than 5 minutes.

      For details about how to use a client on the master or core nodes inside a cluster, see Using an MRS Client on Nodes Inside a Cluster. For details about how to use a client outside a cluster, see Using an MRS Client on Nodes Outside a Cluster.

    2. Log in to FusionInsight Manager. Download the cluster client software package to the active management node and decompress it. Then log in to the active management node as user root. Go to the decompression directory of the cluster client, and copy all configuration files in the FusionInsight_Cluster_1_Services_ClientConfig/IoTDB/config directory to the client node to the conf directory where the compiled JAR package is stored, for example, /opt/client/conf, for subsequent commissioning.

      For example, if the client software package is FusionInsight_Cluster_1_Services_Client.tar and it is downloaded to the /tmp/FusionInsight-Client directory on the active management node, run the following commands:

      cd /tmp/FusionInsight-Client

      tar -xvf FusionInsight_Cluster_1_Services_Client.tar

      tar -xvf FusionInsight_Cluster_1_Services_ClientConfig.tar

      cd FusionInsight_Cluster_1_Services_ClientConfig

      scp IoTDB/config/* root@IP address of the client node:/opt/client/conf

      The keytab file obtained in Preparing the Developer Account is also stored in this directory.

    3. Check the network connection of the client node.

      During the client installation, the system automatically configures the hosts file on the client node. You are advised to check whether the /etc/hosts file contains the host names of the nodes in the cluster. If no, manually copy the content in the hosts file in the decompression directory to the hosts file on the node where the client is located, to ensure that the local host can communicate with each host in the cluster.