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

TypeExtractor - Improving log message

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: API / DataStream
    • Labels:
      None

      Description

      org.apache.flink.api.java.typeutils.TypeExtractor is checking if a field in a class is a "valid POJO field" .

      The method that is responsible for this is:  

      isValidPojoField

      When isValidPojoField find an invalid field a log message is written (see below) but the log message does not tell which field is invalid...

      So now the developer needs to find out the "bad" field.

      Adding the field info to the log message is easy and save the developer time.

       

       

      for (Field field : fields) {
         Type fieldType = field.getGenericType();
         if(!isValidPojoField(field, clazz, typeHierarchy) && clazz != Row.class) {
            LOG.info("Class " + clazz + " cannot be used as a POJO type because not all fields are valid POJO fields, " +
               "and must be processed as GenericType. Please read the Flink documentation " +
               "on \"Data Types & Serialization\" for details of the effect on performance.");
            return null;
         }
      

       

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              balderman Avishay Balderman

              Dates

              • Created:
                Updated:

                Issue deployment