Skip to content
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][Tool] Add connector check script #6199

Closed
2 of 3 tasks
Hisoka-X opened this issue Jan 13, 2024 · 11 comments · Fixed by #6635
Closed
2 of 3 tasks

[Feature][Tool] Add connector check script #6199

Hisoka-X opened this issue Jan 13, 2024 · 11 comments · Fixed by #6635
Assignees
Labels

Comments

@Hisoka-X
Copy link
Member

Hisoka-X commented Jan 13, 2024

Search before asking

  • I had searched in the feature and found no similar feature requirement.

Description

Add a new script, it can check which connector supported by now in /connector directory. Also support show connector option rule in shell command.

Usage Scenario

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@manauwarcode
Copy link

Hi @Hisoka-X Can you please elaborate where do i have to write it ?

@manauwarcode
Copy link

Hi @Hisoka-X if you explain i can definitely write it

@Hisoka-X
Copy link
Member Author

Hisoka-X commented Jan 21, 2024

Thanks @manauwarcode for your interest in this issue. Here are some QA which I hope can help you go on.

  1. how to get all support connectors and how do get the connector option rule??
    At now, we can get all support connectors and its option rule in /connector directory use
    public Map<PluginType, LinkedHashMap<PluginIdentifier, OptionRule>> getAllPlugin()

    we should return it and then display it in the console.
  2. where the code be put in?
    The new shell command should be in https://github.com/apache/seatunnel/tree/101e14731cfad6a46fc58c80f6604a5ef16b2231/seatunnel-core/seatunnel-starter/src/main/bin
    The new command code should be in https://github.com/apache/seatunnel/tree/101e14731cfad6a46fc58c80f6604a5ef16b2231/seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/command

@manauwarcode
Copy link

manauwarcode commented Jan 21, 2024

@Hisoka-X I have a doubt, when i see in the /connectors directory i have bunch of connector jar files, do i have to list these using command or something else, can you please elaborate what is the exact feature you wanted to add in details. Thank you!!

@Hisoka-X
Copy link
Member Author

@Hisoka-X I have a doubt, when i see in the /connectors directory i have bunch of connector jar files, do i have to list these using command or something else, can you please elaborate what is the exact feature you wanted to add in details. Thank you!!

The connector jar represents our currently supported connectors, but from the name of the connector jar we get very little information. The tool we developed can load these connectors through SPI and tell users which Sources/Transforms/Sinks are supported by the current connector, and the corresponding option rule.
Let call our new script plugin-helper.sh
eg:

ls connectors/
connector-amazonsqs-2.3.4.jar            connector-cdc-postgres-2.3.4.jar    connector-file-local2.3.4jar

./bin/plugin-helper.sh -l
Source:
AmazonSqs Postgres-CDC LocalFile
Sink:
AmazonSqs LocalFile
Transform:
SQL Split

./bin/plugin-helper.sh -o LocalFile
....(show localfile option rule)

@manauwarcode
Copy link

Hi @Hisoka-X can you please explain even more, i am new to shell just finished the tutorials , wanted to help in open source contribution, hope you understand. Thank You!!

@Hisoka-X
Copy link
Member Author

Hi @Hisoka-X can you please explain even more, i am new to shell just finished the tutorials , wanted to help in open source contribution, hope you understand. Thank You!!

Which part?

@manauwarcode
Copy link

Hi @Hisoka-X how do we find source sink and transform and explain LocalFile as well. Thank you!!

@Hisoka-X
Copy link
Member Author

Hi @Hisoka-X how do we find source sink and transform and explain LocalFile as well. Thank you!!

In principle, by searching for Java's SPI interface implementation, find the corresponding connector factory, and then call the corresponding method to obtain the option rule. Like

From a practical perspective, we only need to call the corresponding method of the Factory to get all the information we need (the logic of searching through SPI has been encapsulated), and then display it.

public Map<PluginType, LinkedHashMap<PluginIdentifier, OptionRule>> getAllPlugin()

Copy link

This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.

@github-actions github-actions bot added the stale label Feb 28, 2024
@Hisoka-X Hisoka-X removed the stale label Feb 28, 2024
@dailai
Copy link
Contributor

dailai commented Apr 1, 2024

@Hisoka-X Please assign it to me, I'll try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants