-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DSIP-83][datasource-plugin] Add DolphinDB datasource #16962
Open
eco8848
wants to merge
3
commits into
apache:dev
Choose a base branch
from
eco8848:Feature-15953
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# DolphinDB | ||
|
||
![dolphindb](../../../../img/new_ui/dev/datasource/dolphindb-en.png) | ||
|
||
## Datasource Parameters | ||
|
||
| **Parameter** | **Description** | | ||
|----------------------------|--------------------------------------------------------------| | ||
| Datasource | Select DOLPHINDB. | | ||
| Datasource Name | Enter the name of the DataSource. | | ||
| Description | Enter a description of the DataSource. | | ||
| IP/Host Name | Enter the DolphinDB service IP. | | ||
| Port | Enter the DolphinDB service port. | | ||
| Username | Set the username for DolphinDB connection. | | ||
| Password | Set the password for DolphinDB connection. | | ||
| Jdbc connection parameters | Parameter settings for DolphinDB connection, in JSON format. | | ||
|
||
## Native Supported | ||
|
||
Yes, could use this datasource by default. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# DOLPHINDB 数据源 | ||
|
||
![dolphindb](../../../../img/new_ui/dev/datasource/dolphindb-zh.png) | ||
|
||
| **参数名称** | **参数描述** | | ||
|-----------|----------------------------------| | ||
| 数据源 | 选择 DOLPHINDB | | ||
| 数据源名称 | 输入数据源的名称 | | ||
| 描述 | 输入数据源的描述 | | ||
| IP 主机名 | 输入连接 DOLPHINDB 的 IP | | ||
| 端口 | 输入连接 DOLPHINDB 的端口 | | ||
| 用户名 | 设置连接 DOLPHINDB 的用户名 | | ||
| 密码 | 设置连接 DOLPHINDB 的密码 | | ||
| JDBC 连接参数 | 用于 DOLPHINDB 连接的参数设置,以 JSON 形式填写 | | ||
|
||
## 是否原生支持 | ||
|
||
是,数据源不需要任务附加操作即可使用。 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-dolphindb/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
~ contributor license agreements. See the NOTICE file distributed with | ||
~ this work for additional information regarding copyright ownership. | ||
~ The ASF licenses this file to You under the Apache License, Version 2.0 | ||
~ (the "License"); you may not use this file except in compliance with | ||
~ the License. You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.apache.dolphinscheduler</groupId> | ||
<artifactId>dolphinscheduler-datasource-plugin</artifactId> | ||
<version>dev-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>dolphinscheduler-datasource-dolphindb</artifactId> | ||
<packaging>jar</packaging> | ||
<name>${project.artifactId}</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.dolphinscheduler</groupId> | ||
<artifactId>dolphinscheduler-spi</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.dolphinscheduler</groupId> | ||
<artifactId>dolphinscheduler-datasource-api</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.dolphinscheduler</groupId> | ||
<artifactId>dolphinscheduler-common</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.dolphindb</groupId> | ||
<artifactId>jdbc</artifactId> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
</project> |
29 changes: 29 additions & 0 deletions
29
...g/apache/dolphinscheduler/plugin/datasource/dolphindb/DolphinDBAdHocDataSourceClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.dolphinscheduler.plugin.datasource.dolphindb; | ||
|
||
import org.apache.dolphinscheduler.plugin.datasource.api.client.BaseAdHocDataSourceClient; | ||
import org.apache.dolphinscheduler.spi.datasource.BaseConnectionParam; | ||
import org.apache.dolphinscheduler.spi.enums.DbType; | ||
|
||
public class DolphinDBAdHocDataSourceClient extends BaseAdHocDataSourceClient { | ||
|
||
public DolphinDBAdHocDataSourceClient(BaseConnectionParam baseConnectionParam, DbType dbType) { | ||
super(baseConnectionParam, dbType); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...a/org/apache/dolphinscheduler/plugin/datasource/dolphindb/DolphinDBDataSourceChannel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.dolphinscheduler.plugin.datasource.dolphindb; | ||
|
||
import org.apache.dolphinscheduler.spi.datasource.AdHocDataSourceClient; | ||
import org.apache.dolphinscheduler.spi.datasource.BaseConnectionParam; | ||
import org.apache.dolphinscheduler.spi.datasource.DataSourceChannel; | ||
import org.apache.dolphinscheduler.spi.datasource.PooledDataSourceClient; | ||
import org.apache.dolphinscheduler.spi.enums.DbType; | ||
|
||
public class DolphinDBDataSourceChannel implements DataSourceChannel { | ||
|
||
@Override | ||
public AdHocDataSourceClient createAdHocDataSourceClient(BaseConnectionParam baseConnectionParam, DbType dbType) { | ||
return new DolphinDBAdHocDataSourceClient(baseConnectionParam, dbType); | ||
} | ||
|
||
@Override | ||
public PooledDataSourceClient createPooledDataSourceClient(BaseConnectionParam baseConnectionParam, DbType dbType) { | ||
return new DolphinDBPooledDataSourceClient(baseConnectionParam, dbType); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
...pache/dolphinscheduler/plugin/datasource/dolphindb/DolphinDBDataSourceChannelFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.dolphinscheduler.plugin.datasource.dolphindb; | ||
|
||
import org.apache.dolphinscheduler.spi.datasource.DataSourceChannel; | ||
import org.apache.dolphinscheduler.spi.datasource.DataSourceChannelFactory; | ||
import org.apache.dolphinscheduler.spi.enums.DbType; | ||
|
||
import com.google.auto.service.AutoService; | ||
|
||
@AutoService(DataSourceChannelFactory.class) | ||
public class DolphinDBDataSourceChannelFactory implements DataSourceChannelFactory { | ||
|
||
@Override | ||
public String getName() { | ||
return DbType.DOLPHINDB.getName(); | ||
} | ||
|
||
@Override | ||
public DataSourceChannel create() { | ||
return new DolphinDBDataSourceChannel(); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
.../apache/dolphinscheduler/plugin/datasource/dolphindb/DolphinDBPooledDataSourceClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.dolphinscheduler.plugin.datasource.dolphindb; | ||
|
||
import org.apache.dolphinscheduler.plugin.datasource.api.client.BasePooledDataSourceClient; | ||
import org.apache.dolphinscheduler.spi.datasource.BaseConnectionParam; | ||
import org.apache.dolphinscheduler.spi.enums.DbType; | ||
|
||
public class DolphinDBPooledDataSourceClient extends BasePooledDataSourceClient { | ||
|
||
public DolphinDBPooledDataSourceClient(BaseConnectionParam baseConnectionParam, DbType dbType) { | ||
super(baseConnectionParam, dbType); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...g/apache/dolphinscheduler/plugin/datasource/dolphindb/param/DolphinDBConnectionParam.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.dolphinscheduler.plugin.datasource.dolphindb.param; | ||
|
||
import org.apache.dolphinscheduler.spi.datasource.BaseConnectionParam; | ||
|
||
public class DolphinDBConnectionParam extends BaseConnectionParam { | ||
|
||
@Override | ||
public String toString() { | ||
return "DolphinDBConnectionParam{" | ||
+ "user='" + user + '\'' | ||
+ ", password='" + password + '\'' | ||
+ ", address='" + address + '\'' | ||
+ ", jdbcUrl='" + jdbcUrl + '\'' | ||
+ ", driverLocation='" + driverLocation + '\'' | ||
+ ", driverClassName='" + driverClassName + '\'' | ||
+ ", validationQuery='" + validationQuery + '\'' | ||
+ ", other='" + other + '\'' | ||
+ '}'; | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use the latest version 3.00.0.2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already added
dolphinscheduler-datasource-dolphindb
to plugins_config. The jdbc version used during development and testing is 3.00.0.1.