baomingyu commented on code in PR #11804:
URL: https://github.com/apache/inlong/pull/11804#discussion_r1998076805
##########
inlong-sort/sort-formats/format-rowdata/format-inlongmsg-rowdata-base/src/main/java/org/apache/inlong/sort/formats/inlongmsg/AbstractInLongMsgFormatDeserializer.java:
##########
@@ -81,6 +88,21 @@ public List<InLongMsgWrap> preParse(byte[] bytes) throws
Exception {
final List<InLongMsgWrap> result = new ArrayList<>();
InLongMsg inLongMsg = InLongMsg.parseFrom(bytes);
+ if (inLongMsg == null) {
+ failureHandler.onParsingMsgFailure(bytes, new IOException(
+ String.format("Could not parse InLongMsg from bytes.
bytes={}.",
+ StringUtils.join(bytes))));
Review Comment:
This is the callback processing, no printing
##########
inlong-sort/sort-formats/format-rowdata/format-inlongmsg-rowdata-base/src/main/java/org/apache/inlong/sort/formats/inlongmsg/AbstractInLongMsgFormatDeserializer.java:
##########
@@ -81,6 +88,21 @@ public List<InLongMsgWrap> preParse(byte[] bytes) throws
Exception {
final List<InLongMsgWrap> result = new ArrayList<>();
InLongMsg inLongMsg = InLongMsg.parseFrom(bytes);
+ if (inLongMsg == null) {
+ failureHandler.onParsingMsgFailure(bytes, new IOException(
+ String.format("Could not parse InLongMsg from bytes.
bytes={}.",
+ StringUtils.join(bytes))));
+ return result;
+ }
+ try {
+ Set<String> set = inLongMsg.getAttrs();
+ } catch (Exception e) {
+ failureHandler.onParsingMsgFailure(bytes, new IOException(
+ String.format("Parse InLongMsg from bytes has exception.
bytes={}.",
+ StringUtils.join(bytes)),
Review Comment:
This is the callback processing, no printing
--
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]