-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e3a924
commit a25477c
Showing
18 changed files
with
465 additions
and
7 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# StarRocks | ||
|
||
![starrocks](../../../../img/new_ui/dev/datasource/starrocks.png) | ||
|
||
## Datasource Parameters | ||
|
||
| **Datasource** | **Description** | | ||
|----------------------------|--------------------------------------------------------------| | ||
| Datasource | Select StarRocks. | | ||
| Datasource name | Enter the name of the DataSource. | | ||
| Description | Enter a description of the DataSource. | | ||
| IP/Host Name | Enter the StarRocks service IP. | | ||
| Port | Enter the StarRocks service port. | | ||
| Username | Set the username for StarRocks connection. | | ||
| Password | Set the password for StarRocks connection. | | ||
| Database name | Enter the database name of the StarRocks connection. | | ||
| Jdbc connection parameters | Parameter settings for StarRocks connection, in JSON format. | | ||
|
||
## Native Supported | ||
|
||
No, you need to import Mysql jdbc driver first, read section example in [datasource-setting](../howto/datasource-setting.md) `DataSource Center` section to import Mysql JDBC Driver. | ||
|
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,17 @@ | ||
# StarRocks数据源 | ||
|
||
![starrocks](../../../../img/new_ui/dev/datasource/starrocks.png) | ||
|
||
- 数据源:选择 STARROCKS | ||
- 数据源名称:输入数据源的名称 | ||
- 描述:输入数据源的描述 | ||
- IP 主机名:输入连接 STARROCKS 的 IP | ||
- 端口:输入连接 STARROCKS 的端口 | ||
- 用户名:设置连接 STARROCKS 的用户名 | ||
- 密码:设置连接 STARROCKS 的密码 | ||
- 数据库名:输入连接 STARROCKS 的数据库名称 | ||
- Jdbc 连接参数:用于 STARROCKS 连接的参数设置,以 JSON 形式填写 | ||
|
||
## 是否原生支持 | ||
|
||
否,StarRocks使用Mysql JDBC Driver, 使用前需请参考 [数据源配置](../howto/datasource-setting.md) 中的 "数据源中心" 章节激活Mysql JDBC Driver。 |
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
42 changes: 42 additions & 0 deletions
42
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-starrocks/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,42 @@ | ||
<?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-starrocks</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.dolphinscheduler</groupId> | ||
<artifactId>dolphinscheduler-datasource-api</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>mysql</groupId> | ||
<artifactId>mysql-connector-java</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
31 changes: 31 additions & 0 deletions
31
...a/org/apache/dolphinscheduler/plugin/datasource/starrocks/StarRocksDataSourceChannel.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,31 @@ | ||
/* | ||
* 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.starrocks; | ||
|
||
import org.apache.dolphinscheduler.spi.datasource.BaseConnectionParam; | ||
import org.apache.dolphinscheduler.spi.datasource.DataSourceChannel; | ||
import org.apache.dolphinscheduler.spi.datasource.DataSourceClient; | ||
import org.apache.dolphinscheduler.spi.enums.DbType; | ||
|
||
public class StarRocksDataSourceChannel implements DataSourceChannel { | ||
|
||
@Override | ||
public DataSourceClient createDataSourceClient(BaseConnectionParam baseConnectionParam, DbType dbType) { | ||
return new StarRocksDataSourceClient(baseConnectionParam, dbType); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
...pache/dolphinscheduler/plugin/datasource/starrocks/StarRocksDataSourceChannelFactory.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.starrocks; | ||
|
||
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 StarRocksDataSourceChannelFactory implements DataSourceChannelFactory { | ||
|
||
@Override | ||
public DataSourceChannel create() { | ||
return new StarRocksDataSourceChannel(); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return DbType.STARROCKS.getDescp(); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...va/org/apache/dolphinscheduler/plugin/datasource/starrocks/StarRocksDataSourceClient.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,30 @@ | ||
/* | ||
* 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.starrocks; | ||
|
||
import org.apache.dolphinscheduler.plugin.datasource.api.client.CommonDataSourceClient; | ||
import org.apache.dolphinscheduler.spi.datasource.BaseConnectionParam; | ||
import org.apache.dolphinscheduler.spi.enums.DbType; | ||
|
||
public class StarRocksDataSourceClient extends CommonDataSourceClient { | ||
|
||
public StarRocksDataSourceClient(BaseConnectionParam baseConnectionParam, DbType dbType) { | ||
super(baseConnectionParam, dbType); | ||
} | ||
|
||
} |
37 changes: 37 additions & 0 deletions
37
...g/apache/dolphinscheduler/plugin/datasource/starrocks/param/StarRocksConnectionParam.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.starrocks.param; | ||
|
||
import org.apache.dolphinscheduler.spi.datasource.BaseConnectionParam; | ||
|
||
public class StarRocksConnectionParam extends BaseConnectionParam { | ||
|
||
@Override | ||
public String toString() { | ||
return "StarRocksConnectionParam{" + | ||
"user='" + user + '\'' + | ||
", address='" + address + '\'' + | ||
", database='" + database + '\'' + | ||
", jdbcUrl='" + jdbcUrl + '\'' + | ||
", driverLocation='" + driverLocation + '\'' + | ||
", driverClassName='" + driverClassName + '\'' + | ||
", validationQuery='" + validationQuery + '\'' + | ||
", other=" + other + | ||
'}'; | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
...pache/dolphinscheduler/plugin/datasource/starrocks/param/StarRocksDataSourceParamDTO.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,45 @@ | ||
/* | ||
* 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.starrocks.param; | ||
|
||
import org.apache.dolphinscheduler.plugin.datasource.api.datasource.BaseDataSourceParamDTO; | ||
import org.apache.dolphinscheduler.spi.enums.DbType; | ||
|
||
public class StarRocksDataSourceParamDTO extends BaseDataSourceParamDTO { | ||
|
||
@Override | ||
public String toString() { | ||
return "StarRocksDataSourceParamDTO{" + | ||
"id=" + id + | ||
", name='" + name + '\'' + | ||
", note='" + note + '\'' + | ||
", host='" + host + '\'' + | ||
", port=" + port + | ||
", database='" + database + '\'' + | ||
", userName='" + userName + '\'' + | ||
", testFlag=" + testFlag + | ||
", bindTestId=" + bindTestId + | ||
", other=" + other + | ||
'}'; | ||
} | ||
|
||
@Override | ||
public DbType getType() { | ||
return DbType.STARROCKS; | ||
} | ||
} |
Oops, something went wrong.