Help Center/
MapReduce Service/
Developer Guide (LTS)/
Flink Development Guide (Normal Mode)/
Developing an Application/
Flink Reading Data from and Writing Data to HBase/
Scenario Description
Updated on 2023-04-28 GMT+08:00
Scenario Description
This section applies to MRS 3.2.0 or later.
Typical Scenario Description
Use Flink API jobs to read data from and write data to HBase.
Data Preparation
Prepare the HBase configuration file and download the cluster configuration on FusionInsight Manager to obtain the hbase-site.xml file.
Development Guideline
- Writes data to HBase:
- Specify the parent directory of the hbase-site.xml file. Flink Sink can obtain the HBase connection.
- Use the connection to determine whether a table exists. If it does not, create one.
- Convert received data into Put objects and writes the Put objects to HBase.
- Reads data from HBase:
- Specify the parent directory of the hbase-site.xml file. Flink Source can obtain the HBase connection.
- Use the connection to determine whether a table exists. If it does not, the job fails. In this case, you need to create a table in HBase shell or an upstream job.
- Read data from HBase, converts result data into Row objects, and sends the Row objects to downstream operators.
Parent topic: Flink Reading Data from and Writing Data to HBase
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.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot