You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "EMsnap (via GitHub)" <gi...@apache.org> on 2023/11/23 07:09:44 UTC
[PR] [INLONG-9205][Sort] Fix Hudi connector primary key doesn't exist error [inlong]
EMsnap opened a new pull request, #9323:
URL: https://github.com/apache/inlong/pull/9323
### Prepare a Pull Request
- Fixes #9205
### Motivation
Fix Hudi connector primary key doesn't exist error
### Modifications
Fix Hudi connector primary key doesn't exist error
### Documentation
- Does this pull request introduce a new feature? (no)
--
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@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [INLONG-9205][Sort] Fix Hudi connector primary key doesn't exist error [inlong]
Posted by "e-mhui (via GitHub)" <gi...@apache.org>.
e-mhui commented on code in PR #9323:
URL: https://github.com/apache/inlong/pull/9323#discussion_r1403009486
##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/HudiLoadNode.java:
##########
@@ -160,7 +160,9 @@ public Map<String, String> tableOptions() {
options.put(HUDI_OPTION_DATABASE_NAME, dbName);
options.put(HUDI_OPTION_TABLE_NAME, tableName);
- options.put(HUDI_OPTION_RECORD_KEY_FIELD_NAME, primaryKey);
+ if (StringUtils.isNotEmpty(primaryKey)) {
Review Comment:
Using `isNotEmpty` without considering the situation of ' ', using `isNotBlank` may be better.
```java
System.out.println(StringUtils.isNotBlank(" ")); // output: false
System.out.println(StringUtils.isNotEmpty(" ")) // output: true
```
--
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@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [INLONG-9205][Sort] Fix Hudi connector primary key doesn't exist error [inlong]
Posted by "e-mhui (via GitHub)" <gi...@apache.org>.
e-mhui commented on code in PR #9323:
URL: https://github.com/apache/inlong/pull/9323#discussion_r1403009486
##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/HudiLoadNode.java:
##########
@@ -160,7 +160,9 @@ public Map<String, String> tableOptions() {
options.put(HUDI_OPTION_DATABASE_NAME, dbName);
options.put(HUDI_OPTION_TABLE_NAME, tableName);
- options.put(HUDI_OPTION_RECORD_KEY_FIELD_NAME, primaryKey);
+ if (StringUtils.isNotEmpty(primaryKey)) {
Review Comment:
Using `isNotEmpty` without considering the situation of '', using `isNotBlank` may be better.
--
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@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [INLONG-9205][Sort] Fix Hudi connector primary key doesn't exist error [inlong]
Posted by "EMsnap (via GitHub)" <gi...@apache.org>.
EMsnap commented on code in PR #9323:
URL: https://github.com/apache/inlong/pull/9323#discussion_r1403300012
##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/HudiLoadNode.java:
##########
@@ -160,7 +160,9 @@ public Map<String, String> tableOptions() {
options.put(HUDI_OPTION_DATABASE_NAME, dbName);
options.put(HUDI_OPTION_TABLE_NAME, tableName);
- options.put(HUDI_OPTION_RECORD_KEY_FIELD_NAME, primaryKey);
+ if (StringUtils.isNotEmpty(primaryKey)) {
Review Comment:
fixed thanks
--
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@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [INLONG-9205][Sort] Fix Hudi connector primary key doesn't exist error [inlong]
Posted by "EMsnap (via GitHub)" <gi...@apache.org>.
EMsnap merged PR #9323:
URL: https://github.com/apache/inlong/pull/9323
--
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@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [INLONG-9205][Sort] Fix Hudi connector primary key doesn't exist error [inlong]
Posted by "e-mhui (via GitHub)" <gi...@apache.org>.
e-mhui commented on code in PR #9323:
URL: https://github.com/apache/inlong/pull/9323#discussion_r1403009486
##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/HudiLoadNode.java:
##########
@@ -160,7 +160,9 @@ public Map<String, String> tableOptions() {
options.put(HUDI_OPTION_DATABASE_NAME, dbName);
options.put(HUDI_OPTION_TABLE_NAME, tableName);
- options.put(HUDI_OPTION_RECORD_KEY_FIELD_NAME, primaryKey);
+ if (StringUtils.isNotEmpty(primaryKey)) {
Review Comment:
Using `isNotEmpty` without considering the situation of " ", using `isNotBlank` may be better.
```java
System.out.println(StringUtils.isNotBlank(" ")); // output: false
System.out.println(StringUtils.isNotEmpty(" ")) // output: true
```
--
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@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [INLONG-9205][Sort] Fix Hudi connector primary key doesn't exist error [inlong]
Posted by "e-mhui (via GitHub)" <gi...@apache.org>.
e-mhui commented on code in PR #9323:
URL: https://github.com/apache/inlong/pull/9323#discussion_r1403009486
##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/HudiLoadNode.java:
##########
@@ -160,7 +160,9 @@ public Map<String, String> tableOptions() {
options.put(HUDI_OPTION_DATABASE_NAME, dbName);
options.put(HUDI_OPTION_TABLE_NAME, tableName);
- options.put(HUDI_OPTION_RECORD_KEY_FIELD_NAME, primaryKey);
+ if (StringUtils.isNotEmpty(primaryKey)) {
Review Comment:
Using `isNotEmpty` without considering the situation of ' ', using `isNotBlank` may be better.
![Uploading image.png…]()
--
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@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [INLONG-9205][Sort] Fix Hudi connector primary key doesn't exist error [inlong]
Posted by "e-mhui (via GitHub)" <gi...@apache.org>.
e-mhui commented on code in PR #9323:
URL: https://github.com/apache/inlong/pull/9323#discussion_r1403009486
##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/HudiLoadNode.java:
##########
@@ -160,7 +160,9 @@ public Map<String, String> tableOptions() {
options.put(HUDI_OPTION_DATABASE_NAME, dbName);
options.put(HUDI_OPTION_TABLE_NAME, tableName);
- options.put(HUDI_OPTION_RECORD_KEY_FIELD_NAME, primaryKey);
+ if (StringUtils.isNotEmpty(primaryKey)) {
Review Comment:
Using `isNotEmpty` without considering the situation of ' ', using `isNotBlank` may be better.
--
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@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org