Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-5284

RunMongoAggregation uses ObjectIdSerializer & SimpleDateFormat

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.6.0
    • 1.7.0
    • Extensions
    • None

    Description

      The RunMongoAggregation processor uses Jackson to serialize the document to JSON. However, the default serialization for Jackson on Mongo ObjectId and dates leaves a lot to be desired. The ObjectId's are serialized into the decimal representation of each component of the ObjectId instead of the hex string of the full byte array. Mongo dates are being serialized as unix time as opposed to ISO8601 zulu string.

      It looks like the GetMongo processor has set the correct serializer flags on Jackson to fix this. The fix for GetMongo is here. https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/GetMongo.java#L213

      Attachments

        Issue Links

          Activity

            People

              sivaprasanna Sivaprasanna Sethuraman
              Zambonilli Zambonilli
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: