Preparations

Configuring the pom.xml File

If a maven project exists, use the following dependency in pom.xml:

<dependency>
    <groupId>com.huaweicloud.dis</groupId>
    <artifactId>huaweicloud-dis-kafka-adapter</artifactId>
    <version>1.2.9</version>
</dependency>

Using the DIS Sample Project

Click https://dis-publish.obs-website.cn-north-1.myhwclouds.com/ to obtain the latest version of huaweicloud-dis-kafka-adapter-X.X.X. The package contains two directories.

  • The huaweicloud-dis-kafka-adapter-X.X.X directory contains all JAR packages. If a non-maven project is used, import all JAR packages in the lib directory to the environment.
  • huaweicloud-dis-kafka-adapter--X.X.X-demo is a sample project and is compiled using maven.

You can use IntelliJ IDEA to import the sample project as follows:

  1. Run IntelliJ IDEA and choose File > Open.

    In the displayed dialog box, expand huaweicloud-dis-kafka-adapter-X.X.X-demo and double-click pom.xml.

  2. When the following dialog box is displayed, select Open as Project.

  3. Click New Window to open the project in a new window.

  4. Wait when IntelliJ IDEA is building the project. After the project is built, the directory and files are displayed.

Checking Authentication Information

  • AK/SK file

    Access Key ID/Secret Access Key (AK/SK) files are created by the Identity and Access Management (IAM) service to authenticate calls to application programming interfaces (APIs) on the cloud. To obtain AK/SK, choose My Credential > Access Keys.

  • Project ID

    A project is a group of tenant resources. A tenant can have multiple projects, one for each region. Each region has a unique Project ID. To view the project IDs of different regions, choose .