You can perform secondary development based on Flink APIs to build your own Jar packages and submit them to the DLI queues to interact with data sources such as MRS Kafka, HBase, Hive, HDFS, GaussDB(DWS), and DCS.
This section describes how to interact with MRS through a custom job.
The .keytab file of a human-machine account becomes invalid when the user password expires. Use a machine-machine account for configuration.
For details about how to create an enhanced datasource connection, see Enhanced Datasource Connections in the Data Lake Insight User Guide.
For details about how to configure security group rules, see "Security Group" in Virtual Private Cloud User Guide.
For details about how to add an IP-domain mapping, see Modifying the Host Information in the Data Lake Insight User Guide.
If the Kafka server listens on the port using hostname, you need to add the mapping between the hostname and IP address of the Kafka Broker node to the DLI queue. Contact the Kafka service deployment personnel to obtain the hostname and IP address of the Kafka Broker node.
DLI does not support the download function. If you need to modify the uploaded data file, edit the local file and upload it again.
Parameter |
Description |
---|---|
Type |
Select Flink Jar. |
Name |
Job name, which contains 1 to 57 characters and consists of only letters, digits, hyphens (-), and underscores (_). NOTE:
The job name must be globally unique. |
Description |
Description of the job, which contains 0 to 512 characters. |
Parameter |
Description |
---|---|
Application |
User-defined package. Before selecting a package, upload the corresponding JAR package to the OBS bucket and create a package on the Data Management > Package Management page. |
Main Class |
Name of the main class of the JAR package to be loaded, for example, KafkaMessageStreaming.
NOTE:
When a class belongs to a package, the package path must be carried, for example, packagePath.KafkaMessageStreaming. |
Class Arguments |
List of arguments of a specified class. The arguments are separated by spaces. |
JAR Package Dependencies |
User-defined dependencies. Before selecting a package, upload the corresponding JAR package to the OBS bucket and create a JAR package on the Data Management > Package Management page. |
Other Dependencies |
User-defined dependency files. Before selecting a file, upload the corresponding file to the OBS bucket and create a package of any type on the Data Management > Package Management page. You can add the following content to the application to access the corresponding dependency file: fileName indicates the name of the file to be accessed, and ClassName indicates the name of the class that needs to access the file. ClassName.class.getClassLoader().getResource("userData/fileName") |
Flink Version |
Before selecting a Flink version, you need to select the queue to which the Flink version belongs. Currently, the following versions are supported: 1.10. |
Parameter |
Description |
---|---|
CUs |
One CU has one vCPU and 4 GB memory. The number of CUs ranges from 2 to 400. |
Job Manager CUs |
Set the number of CUs on a management unit. The value ranges from 1 to 4. The default value is 1. |
Parallelism |
Maximum number of parallel operators in a job. NOTE:
|
Task Manager Configuration |
Whether to set Task Manager resource parameters. If this option is selected, you need to set the following parameters:
|
Save Job Log |
Whether to save the job running logs to OBS. If this option is selected, you need to set the following parameters: OBS Bucket: Select an OBS bucket to store user job logs. If the selected OBS bucket is not authorized, click Authorize. |
Alarm Generation upon Job Exception |
Whether to report job exceptions, for example, abnormal job running or exceptions due to an insufficient balance, to users via SMS or email. If this option is selected, you need to set the following parameters: SMN Topic Select a user-defined SMN topic. For details about how to customize SMN topics, see "Creating a Topic" in the Simple Message Notification User Guide. |
Auto Restart upon Exception |
Whether to enable automatic restart. If this function is enabled, jobs will be automatically restarted and restored when exceptions occur. If this option is selected, you need to set the following parameters:
|
After the job is started, the system automatically switches to the
page, and the created job is displayed in the job list. You can view the job status in the column. After a job is successfully submitted, the job status will change from to . After the execution is complete, the message Completed is displayed.If the job status is to copy these details. After handling the fault based on the provided information, resubmit the job.
Other buttons are as follows:
Save As: Save the created job as a new job.
List of parameters of a specified class. The parameters are separated by spaces.
Parameter input format: --Key 1 Value 1 --Key 2 Value 2
For example, if you enter the following parameters on the console:
--bootstrap.server 192.168.168.xxx:9092
The parameters are parsed by ParameterTool as follows:
Only the latest run logs are displayed. For more information, see the OBS bucket that stores logs.