Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:Apache Dolphinscheduler Datasource Parameter Configuration

From Leeroopedia


Knowledge Sources
Domains Data_Integration, Configuration_Management
Last Updated 2026-02-10 00:00 GMT

Overview

A polymorphic parameter configuration pattern that models database connection details as typed DTOs with a common base, supporting both standard JDBC and Kerberos-secured HDFS-based datasources.

Description

The Datasource Parameter Configuration principle defines how DolphinScheduler captures and structures database connection parameters from user input. The system uses a two-tier DTO hierarchy: BaseDataSourceParamDTO provides standard fields (host, port, database, userName, password, other), while BaseHDFSDataSourceParamDTO extends it with Kerberos authentication fields (principal, keytab path, krb5 config) for Hadoop-ecosystem databases like Hive and Spark.

Parameters are received as JSON from the API layer and deserialized into the appropriate DTO subclass using the DataSourceProcessor.castDatasourceParamDTO() method. The DataSourceUtils.buildDatasourceParam() facade provides a convenient entry point.

Usage

This principle applies when a user configures a new datasource through the API or UI. The parameter configuration is the first step in the connection management lifecycle, providing the raw input that is subsequently validated and transformed.

Theoretical Basis

The configuration follows a Type-Safe Builder Pattern with polymorphic deserialization:

// Two-tier hierarchy
BaseDataSourceParamDTO           // Standard JDBC datasources
├── MySQLDataSourceParamDTO
├── PostgreSQLDataSourceParamDTO
└── BaseHDFSDataSourceParamDTO   // Kerberos-secured datasources
    ├── HiveDataSourceParamDTO
    └── SparkDataSourceParamDTO

// Deserialization flow
jsonString -> castDatasourceParamDTO(json) -> Typed DTO

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment