-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Feature][Connector-V2]Support datahub sink #2558
Conversation
This reverts commit 84f6b17
…into dev � Conflicts: � plugin-mapping.properties � seatunnel-connectors-v2-dist/pom.xml � seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/FileSystemType.java � seatunnel-connectors-v2/connector-file/pom.xml
…into dev � Conflicts: � plugin-mapping.properties
@CalvinKirs please help me review the datahub connector code, the previous pr #2529 has been closed, I have optimized the code as your advice. Example and unit case of this connector is not convenient to provide,because it need to personal datahub account ,include a accessKey and accessSecret. |
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.
Please add e2e test for this connector.
Need add this connector to seatunnel-connector-v2-dist/pom.xml
docs/en/connector-v2/sink/Datahub.md
Outdated
| retryTimes | int | yes | - | | ||
|
||
### url [string] | ||
i |
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.
What's the i
mean?
int i = result.getFailedRecordCount(); | ||
if (i > 0) { | ||
LOG.info("begin to retry for putting failed record"); | ||
if (retry(result.getFailedRecords(), retryTimes, project, topic)) { |
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.
I suggest use RetryUtils
to do retry.
<dependency> | ||
<groupId>com.aliyun.datahub</groupId> | ||
<artifactId>aliyun-sdk-datahub</artifactId> | ||
<version>2.19.0-public</version> | ||
</dependency> |
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.
hi, Our versions are managed uniformly in the root pom (dependency.managent)
plugin-mapping.properties
Outdated
@@ -121,4 +121,5 @@ seatunnel.sink.IoTDB = connector-iotdb | |||
seatunnel.sink.Neo4j = connector-neo4j | |||
seatunnel.sink.FtpFile = connector-file-ftp | |||
seatunnel.sink.Socket = connector-socket | |||
seatunnel.sink.datahub = connector-datahub |
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.
seatunnel.sink.datahub
rename to seatunnel.sink.DataHub
it's better,We'd better be consistent with pluginname
*/ | ||
public class DataHubWriter extends AbstractSinkWriter<SeaTunnelRow, Void> { | ||
|
||
private static final Logger LOG = LoggerFactory.getLogger(DataHubWriter.class); |
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.
We can use lombok's @slf4j annotation instead of manually declaring
update plugin-mapping.properties
} | ||
|
||
# If you would like to get more information about how to configure seatunnel and see full list of sink plugins, | ||
# please go to https://seatunnel.apache.org/docs/category/sink-v2 |
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.
This url is not right.
https://seatunnel.apache.org/docs/connector-v2/sink
may more suitable
@@ -1,4 +1,4 @@ | |||
COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 | |||
COMMON DEVELOPMENT AND DISTtRIBUTION LICENSE (CDDL) Version 1.0 |
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.
please check this.
Hi, You are right, can you disable your e2e and then delete your key or replace it with XXX. I'm concerned about the security of your account key. |
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.
LGTM
endpoint="http://dh-cn-hangzhou.aliyuncs.com" | ||
accessId="LTAIMHD6kepeaI53" | ||
accessKey="SoEU2dIeVGBIfM3LSB8G7QSrwGZLlO" |
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.
hi,for security reasons, you need to replace the key information with XXXhi,
|
||
import java.io.IOException; | ||
|
||
@Disabled |
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.
Hi, can you add a comment to explain why?
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.
LGTM, thx
Co-authored-by: zhoulw11 <zhoulw11@chinatelecom.cn>
Co-authored-by: zhoulw11 <zhoulw11@chinatelecom.cn>
Co-authored-by: zhoulw11 <zhoulw11@chinatelecom.cn>
Co-authored-by: zhoulw11 <zhoulw11@chinatelecom.cn>
**Support datahub sink #1946
Purpose of this pull request
Check list
New License Guide