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
Obtain the huaweicloud-dis-kafka-adapter-X.X.X package of the latest version from https://dis-publish.obs-website.cn-north-1.myhuaweicloud.com/. 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:
- 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.

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

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

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

Checking Authentication Information
The Access Key ID/Secret Access Key (AK/SK) or AuthToken can be used for authentication. By default, the AK/SK is used for authentication.
- If AK/SK is used for authentication, check the AK/SK.
AK/SK files are created by the Identity and Access Management (IAM) service to authenticate calls to application programming interfaces (APIs) on the public cloud.
- If AuthToken is used for authentication, check AuthType and AuthToken.
AuthType: authentication type. The value is set to authtoken.
AuthToken: created by the user in IAM and is valid for 24 hours.
- 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 .
Last Article: Kafka Adapter Overview
Next Article: Uploading Data
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.