Flink Doris Connector now support flink version from 1.11 to 1.20.
If you wish to contribute or use a connector from flink 1.13 (and earlier), please use the branch-for-flink-before-1.13
More information about compilation and usage, please visit Flink Doris Connector
You need to copy customer_env.sh.tpl to customer_env.sh before build and you need to configure it before build.
git clone [email protected]:apache/doris-flink-connector.git
cd doris-flink-connector/flink-doris-connector
./build.sh
You need to install the google-java-format plugin. Spotless together with google-java-format is used to format the codes.
It is recommended to automatically format your code by applying the following settings:
- Go to "Settings" → "Other Settings" → "google-java-format Settings".
- Tick the checkbox to enable the plugin.
- Change the code style to "Android Open Source Project (AOSP) style".
- Go to "Settings" → "Tools" → "Actions on Save".
- Under "Formatting Actions", select "Optimize imports" and "Reformat file".
- From the "All file types list" next to "Reformat code", select "Java".
For earlier IntelliJ IDEA versions, the step 4 to 7 will be changed as follows.
- 4.Go to "Settings" → "Other Settings" → "Save Actions".
- 5.Under "General", enable your preferred settings for when to format the code, e.g. "Activate save actions on save".
- 6.Under "Formatting Actions", select "Optimize imports" and "Reformat file".
- 7.Under "File Path Inclusions", add an entry for
.*\.java
to avoid formatting other file types. Then the whole project could be formatted by commandmvn spotless:apply
.
Checkstyle is used to enforce static coding guidelines.
- Go to "Settings" → "Tools" → "Checkstyle".
- Set "Scan Scope" to "Only Java sources (including tests)".
- For "Checkstyle Version" select "8.14".
- Under "Configuration File" click the "+" icon to add a new configuration.
- Set "Description" to "doris-flink-connector".
- Select "Use a local Checkstyle file" and link it to the file
tools/maven/checkstyle.xml
which is located within your cloned repository. - Select "Store relative to project location" and click "Next".
- Configure the property
checkstyle.suppressions.file
with the valuesuppressions.xml
and click "Next". - Click "Finish".
- Select "doris-flink-connector" as the only active configuration file and click "Apply".
You can now import the Checkstyle configuration for the Java code formatter.
- Go to "Settings" → "Editor" → "Code Style" → "Java".
- Click the gear icon next to "Scheme" and select "Import Scheme" → "Checkstyle Configuration".
- Navigate to and select
tools/maven/checkstyle.xml
located within your cloned repository.
Then you could click "View" → "Tool Windows" → "Checkstyle" and find the "Check Module" button in the opened tool window to validate checkstyle. Or you can use the command mvn clean compile checkstyle:checkstyle
to validate.
If you find any bugs, feel free to file a GitHub issue or fix it by submitting a pull request.
Contact us through the following mailing list.
Name | Scope | |||
---|---|---|---|---|
[email protected] | Development-related discussions | Subscribe | Unsubscribe | Archives |
- Doris official site - https://doris.apache.org
- Developer Mailing list - [email protected]. Mail to [email protected], follow the reply to subscribe the mail list.
- Slack channel - Join the Slack