Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-609

Properties not encoded properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.8.0
    • None
    • container
    • None

    Description

      Passing a complex configuration:

      filter.map.filter1.property=xpath("name") in ("uiBrowseStartup.ended",
      "subscription.ended", "uiStartup.ended") or xpath("category") =
      "uiIntent"
      

      This property is understood by Java properties (Verified), however when used in Samza, it breaks with the following error:

       Exception in thread "main" org.codehaus.jackson.JsonParseException: Unrecognized character escape ')' (code 41)
       at [Source: java.io.StringReader@409bf450; line: 1, column: 46]
      	at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1291)
      	at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:385)
      	at org.codehaus.jackson.impl.JsonParserMinimalBase._handleUnrecognizedCharacterEscape(JsonParserMinimalBase.java:360)
      	at org.codehaus.jackson.impl.ReaderBasedParser._decodeEscaped(ReaderBasedParser.java:1062)
      	at org.codehaus.jackson.impl.ReaderBasedParser._finishString2(ReaderBasedParser.java:783)
      	at org.codehaus.jackson.impl.ReaderBasedParser._finishString(ReaderBasedParser.java:760)
      	at org.codehaus.jackson.impl.ReaderBasedParser.getText(ReaderBasedParser.java:85)
      	at org.codehaus.jackson.map.deser.UntypedObjectDeserializer.deserialize(UntypedObjectDeserializer.java:39)
      	at org.codehaus.jackson.map.deser.MapDeserializer._readAndBind(MapDeserializer.java:235)
      	at org.codehaus.jackson.map.deser.MapDeserializer.deserialize(MapDeserializer.java:165)
      	at org.codehaus.jackson.map.deser.MapDeserializer.deserialize(MapDeserializer.java:25)
      	at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2395)
      	at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1595)
      	at org.apache.samza.config.serializers.JsonConfigSerializer$.fromJson(JsonConfigSerializer.scala:34)
      	at org.apache.samza.job.yarn.SamzaAppMaster$.main(SamzaAppMaster.scala:72)
      	at org.apache.samza.job.yarn.SamzaAppMaster.main(SamzaAppMaster.scala)
      

      To reproduce, just paste the config in hello-samza as a property.

      Attachments

        Activity

          People

            Unassigned Unassigned
            naveenatceg Naveen Somasundaram
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: