Connect Apache Flink to LindormTable and use Lindorm tables as dimension tables or result tables in your Flink jobs. You can access these tables using Flink SQL or Flink DataStream.
Which Flink variant to use
LindormTable supports two Flink variants with different capabilities:
| Open source Apache Flink | Realtime Compute for Apache Flink | |
|---|---|---|
| Table types supported | HBase-like tables only | All Lindorm tables |
| LindormTable version required | 2.4.3 or later | No version restriction |
| Connector modification needed | N/A | None (use the Lindorm connector as-is with Flink SQL) |
| lindorm-cli SQL tables as dimension/result tables | Not supported | Supported |
Open source Flink limitation: Only HBase-like tables created using HBase Shell can be specified as dimension tables or result tables. SQL tables created with lindorm-cli are not supported.
Prerequisites
Before you begin, ensure that you have:
-
A LindormTable version that meets the requirement for your Flink variant (see the table above)
-
The IP address of your Flink client added to the whitelist of your Lindorm instance — see Configure whitelists
-
Read and write permissions granted to any newly created account used to access Lindorm tables — see Grant permissions to a user
Network requirements
Internet access or single-node instances: If you access Lindorm over the Internet, or the target Lindorm instance is a single-node instance, upgrade your SDK and update the connection configuration before proceeding. See Step 1 in Use the ApsaraDB for HBase API for Java to connect to and use LindormTable.
Elastic Compute Service (ECS)-deployed applications: Deploy the Lindorm instance and the ECS instance in the same region and the same Virtual Private Cloud (VPC). Deploying them in the same zone reduces network latency.
Get the LindormTable endpoint
Flink accesses Lindorm tables using the LindormTable endpoint for HBase APIs. To find your endpoint, go to the Lindorm console.
If you access Lindorm tables using a newly created account, make sure the account has read and write permissions on the Flink tables before connecting. See Grant permissions to a user.
Create a dimension table
-
Open source Apache Flink: Follow the steps in Create a dimension table in the Apache Flink documentation.
-
Realtime Compute for Apache Flink: Follow the steps in Create a Lindorm dimension table in the Alibaba Cloud documentation.
Create a result table
-
Open source Apache Flink: Follow the steps in Create a result table in the Apache Flink documentation.
-
Realtime Compute for Apache Flink: Follow the steps in Create a Lindorm result table in the Alibaba Cloud documentation.
What's next
-
To view or upgrade your LindormTable version, see Release notes of LindormTable and Upgrade the minor engine version of a Lindorm instance.