Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-23237

Add log to print data that failed to deserialize when ignore-parse-error=true

    XMLWordPrintableJSON

    Details

      Description

      Add log to print error data that failed to deserialize when set `ignore-parse-error` = `true`

       

      public RowData deserialize(@Nullable byte[] message) throws IOException {
          if (message == null) {
              return null;
          }
          try {
              final JsonNode root = objectReader.readValue(message);
              return (RowData) runtimeConverter.convert(root);
          } catch (Throwable t) {
              if (ignoreParseErrors) {
                  return null;
              }
              throw new IOException(
                      String.format("Failed to deserialize CSV row '%s'.", new String(message)), t);
          }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hehuiyuan hehuiyuan
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: