baomingyu opened a new issue, #12065:
URL: https://github.com/apache/inlong/issues/12065
### Description
Sort Format supports outputting complete row information when errors occur
in field parsing.eg:
It only prints the field information when parsing fails.
```
try {
return ((BasicFormatInfo<?>)
fieldFormatInfo).deserialize(fieldText);
} catch (Exception e) {
if (failureHandler != null) {
failureHandler.onConvertingFieldFailure(fieldName,
fieldText, fieldFormatInfo, e);
} else {
LOG.warn("Could not properly deserialize the" + "text:
{},for field:{}",
fieldText, fieldName, e);
}
}
```
It is expected to output the complete row information when an error occurs.
such as
```
try {
return ((BasicFormatInfo<?>)
fieldFormatInfo).deserialize(fieldText);
} catch (Exception e) {
if (failureHandler != null) {
failureHandler.onConvertingFieldFailure(fieldName,
fieldText, fieldFormatInfo,
head, inLongMsgBody, originBody, e);
} else {
LOG.warn("Could not properly deserialize the" + "text:
{},for field:{}"
+ ". predefinedFields = {},fields = {}, attr={},
originBody={}",
fieldText, fieldName,
head == null ? "" : head.getPredefinedFields(),
inLongMsgBody == null ? "" :
inLongMsgBody.getFields(),
head == null ? "" : head.getAttributes(),
originBody == null ? (inLongMsgBody == null ? "" :
new String(inLongMsgBody.getDataBytes()))
: originBody,
e);
}
}
```
### InLong Component
InLong Sort
### Are you willing to submit PR?
- [x] Yes, I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of
Conduct](https://www.apache.org/foundation/policies/conduct)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]