You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/01/02 09:29:50 UTC
[GitHub] [incubator-doris] weajun opened a new pull request #7568: [Optimize][Extension] optimize extension datax doriswriter
weajun opened a new pull request #7568:
URL: https://github.com/apache/incubator-doris/pull/7568
1.Remove import doris via csv in Dataxwriter, only support via json;
2.Format Dataxwriter code;
3.Optimize exception handling and reduce multiple output of exception logs;
4.Update the dataxwriter's documentation;
## Proposed changes
Close related #issue (replace it with issue number if it exists).
Describe the overview of changes, and introduce why we need it.
## Types of changes
What types of changes does your code introduce to Doris?
_Put an `x` in the boxes that apply_
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [x] Documentation Update (if none of the other choices apply)
- [x] Code refactor (Modify the code structure, format the code, etc...)
- [x] Optimization. Including functional usability improvements and performance improvements.
- [ ] Dependency. Such as changes related to third-party components.
- [ ] Other.
## Checklist
_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
- [ ] I have created an issue on (Fix #ISSUE) and described the bug/feature there in detail
- [x] Compiling and unit tests pass locally with my changes
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] If these changes need document changes, I have updated the document
- [ ] Any dependent changes have been merged
## Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] morningman commented on a change in pull request #7568: [Optimize][Extension] optimize extension datax doriswriter
Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #7568:
URL: https://github.com/apache/incubator-doris/pull/7568#discussion_r777796598
##########
File path: extension/DataX/doriswriter/doc/doriswriter.md
##########
@@ -166,16 +166,10 @@ DorisWriter 通过Doris原生支持Stream load方式导入数据, DorisWriter
* **format**
- - 描述:导入数据的格式, 可以使是json或者csv。
+ - 描述:导入数据的格式, 目前支持json。
Review comment:
I think we can just delete this config.
##########
File path: extension/DataX/doriswriter/doc/doriswriter.md
##########
@@ -166,16 +166,10 @@ DorisWriter 通过Doris原生支持Stream load方式导入数据, DorisWriter
Review comment:
I think the default lineDelimiter can be `\x02\x03`?
So to avoid `\n` appeared in user's data.
##########
File path: extension/DataX/doriswriter/src/main/java/com/alibaba/datax/plugin/writer/doriswriter/DorisJsonCodec.java
##########
@@ -46,5 +44,4 @@ public String serialize(final Record row) {
}
return JSON.toJSONString(rowMap);
}
-
-}
\ No newline at end of file
+}
Review comment:
We can create `final Map<String, Object> rowMap` in constructor of `DorisJsonCodec` and reuse it in `serialize()`.
No need to create it for every row.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #7568: [Optimize][Extension] optimize extension datax doriswriter
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7568:
URL: https://github.com/apache/incubator-doris/pull/7568#issuecomment-1007421067
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] hf200012 merged pull request #7568: [Optimize][Extension] optimize extension datax doriswriter
Posted by GitBox <gi...@apache.org>.
hf200012 merged pull request #7568:
URL: https://github.com/apache/incubator-doris/pull/7568
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] weajun commented on a change in pull request #7568: [Optimize][Extension] optimize extension datax doriswriter
Posted by GitBox <gi...@apache.org>.
weajun commented on a change in pull request #7568:
URL: https://github.com/apache/incubator-doris/pull/7568#discussion_r780125445
##########
File path: extension/DataX/doriswriter/doc/doriswriter.md
##########
@@ -166,16 +166,10 @@ DorisWriter 通过Doris原生支持Stream load方式导入数据, DorisWriter
* **format**
- - 描述:导入数据的格式, 可以使是json或者csv。
+ - 描述:导入数据的格式, 目前支持json。
Review comment:
> I think we can just delete this config.
thanks,I have deleted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #7568: [Optimize][Extension] optimize extension datax doriswriter
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7568:
URL: https://github.com/apache/incubator-doris/pull/7568#issuecomment-1007421067
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] weajun commented on a change in pull request #7568: [Optimize][Extension] optimize extension datax doriswriter
Posted by GitBox <gi...@apache.org>.
weajun commented on a change in pull request #7568:
URL: https://github.com/apache/incubator-doris/pull/7568#discussion_r780127972
##########
File path: extension/DataX/doriswriter/src/main/java/com/alibaba/datax/plugin/writer/doriswriter/DorisJsonCodec.java
##########
@@ -46,5 +44,4 @@ public String serialize(final Record row) {
}
return JSON.toJSONString(rowMap);
}
-
-}
\ No newline at end of file
+}
Review comment:
> We can create `final Map<String, Object> rowMap` in constructor of `DorisJsonCodec` and reuse it in `serialize()`. No need to create it for every row.
thanks,I have optimized.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] weajun commented on a change in pull request #7568: [Optimize][Extension] optimize extension datax doriswriter
Posted by GitBox <gi...@apache.org>.
weajun commented on a change in pull request #7568:
URL: https://github.com/apache/incubator-doris/pull/7568#discussion_r780125445
##########
File path: extension/DataX/doriswriter/doc/doriswriter.md
##########
@@ -166,16 +166,10 @@ DorisWriter 通过Doris原生支持Stream load方式导入数据, DorisWriter
* **format**
- - 描述:导入数据的格式, 可以使是json或者csv。
+ - 描述:导入数据的格式, 目前支持json。
Review comment:
> I think we can just delete this config.
thanks,I have deleted.
##########
File path: extension/DataX/doriswriter/src/main/java/com/alibaba/datax/plugin/writer/doriswriter/DorisJsonCodec.java
##########
@@ -46,5 +44,4 @@ public String serialize(final Record row) {
}
return JSON.toJSONString(rowMap);
}
-
-}
\ No newline at end of file
+}
Review comment:
> We can create `final Map<String, Object> rowMap` in constructor of `DorisJsonCodec` and reuse it in `serialize()`. No need to create it for every row.
thanks,I have optimized.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org