Skip to content

feat: Implementation Datax doriswriter plugin#6107

Merged
morningman merged 5 commits intoapache:masterfrom
Kyofin:feat_doriswriter
Jul 8, 2021
Merged

feat: Implementation Datax doriswriter plugin#6107
morningman merged 5 commits intoapache:masterfrom
Kyofin:feat_doriswriter

Conversation

@Kyofin
Copy link
Contributor

@Kyofin Kyofin commented Jun 28, 2021

Proposed changes

Implementation datax doriswriter plugin.
To compile this plugin , you need to download Alibaba/Datax source and put plugin to that maven project.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have created an issue on (Fix #ISSUE) and described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • If these changes need document changes, I have updated the document

Further comments

Should I write a doc about how to install this plugin in Datax?

@Kyofin Kyofin changed the title feat: implementation datax doris writer plugin feat: implementation Datax doriswriter plugin Jun 28, 2021
@Kyofin Kyofin changed the title feat: implementation Datax doriswriter plugin feat: Implementation Datax doriswriter plugin Jun 28, 2021
@morningman
Copy link
Contributor

morningman commented Jun 30, 2021

Hi @huzk8 ,this PR #6111 has been merged, please move the doriswriter dir to the extension/DataX/doriswriter.
A little difference, it is extension/DataX, not extension/Datax

@morningman morningman added area/datax kind/feature Categorizes issue or PR as related to a new feature. labels Jun 30, 2021
Copy link
Contributor

@hf200012 hf200012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

public List<Configuration> split(int mandatoryNumber) {
List<Configuration> configurations = new ArrayList<>(mandatoryNumber);

for(int i = 0; i < mandatoryNumber; ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add space after for

}

private String getStreamLoadLabel() {
return UUID.randomUUID().toString();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Data import of datax can be uniformly started with datax_doris_writer_
eg:"datax_doris_writer_" + UUID.randomUUID().toString();

throw new IOException("None of the host in `beLoadUrl` could be connected.");
}
final String loadUrl = host + "/api/" + this.keys.getDatabase() + "/" + this.keys.getTable() + "/_stream_load";
LOG.debug(String.format("Start to join batch data: rows[%d] bytes[%d] label[%s].", flushData.getRows().size(), flushData.getBytes(), flushData.getLabel()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is recommended to use info here to facilitate troubleshooting
debug -> info

if (null == loadResult || !loadResult.containsKey(keyStatus)) {
throw new IOException("Unable to flush data to doris: unknown result status.");
}
LOG.debug("StreamLoad response:\n" + JSON.toJSONString(loadResult));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is recommended to use info here to facilitate troubleshooting
debug -> info

morningman
morningman previously approved these changes Jul 1, 2021
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@morningman morningman added the approved Indicates a PR has been approved by one committer. label Jul 7, 2021
@morningman morningman merged commit c33321f into apache:master Jul 8, 2021
@morningman morningman mentioned this pull request Oct 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/datax kind/feature Categorizes issue or PR as related to a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants