You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/06/19 00:14:33 UTC

[GitHub] [helix] pkuwm opened a new issue #1105: PropertyStoreAccessor could not handle zlib compressed data

pkuwm opened a new issue #1105:
URL: https://github.com/apache/helix/issues/1105


   When a Znode's data is NOT compressed by Helix gzip util but other compression lib like zlib, PropertyStoreAccessor and propertystore endpoint could not handle the decompression. Users would expect to keep the compressed data as a return and decompress it on users side.
   
   ```
   2020/06/19 00:03:18.519 ERROR [ZNRecordSerializer] [qtp609438896-279004] [helix-rest] [] Exception during deserialization of bytes: x???[o?F???+
                                                                                                                                                   =w???o???
   org.codehaus.jackson.JsonParseException: Unexpected character ('x' (code 120)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
    at [Source: java.io.ByteArrayInputStream@6fc4c1e3; line: 1, column: 2]
   	at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1433)
   	at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:521)
   	at org.codehaus.jackson.impl.JsonParserMinimalBase._reportUnexpectedChar(JsonParserMinimalBase.java:442)
   	at org.codehaus.jackson.impl.Utf8StreamParser._handleUnexpectedValue(Utf8StreamParser.java:2090)
   	at org.codehaus.jackson.impl.Utf8StreamParser._nextTokenNotInObject(Utf8StreamParser.java:606)
   	at org.codehaus.jackson.impl.Utf8StreamParser.nextToken(Utf8StreamParser.java:492)
   	at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2770)
   	at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2718)
   	at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1909)
   	at org.apache.helix.zookeeper.datamodel.serializer.ZNRecordSerializer.deserialize(ZNRecordSerializer.java:137)
   	at org.apache.helix.rest.server.resources.helix.PropertyStoreAccessor.getPropertyByPath(PropertyStoreAccessor.java:73)
   ```
   
   Solution:
   We should check the data is compressed by ZNRecord serializer. If not,  we should not try to deserialize it but return the data directly to users.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org