[ 
https://issues.apache.org/jira/browse/SAMZA-1640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shanthoosh Venkataraman updated SAMZA-1640:
-------------------------------------------
    Description: 
*Problem:*

JobModel deserialization in ZkJobCoordinator throws the following exception in 
some scenarios.
{code:java}
org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field 
"task-partition-mappings" (Class org.apache.samza.job.model.JobModel), not 
marked as ignorable at [Source: java.io.StringReader@1f7030a6; line: 1, column: 
315] (through reference chain: 
org.apache.samza.job.model.JobModel["task-partition-mappings"]) at 
org.codehaus.jackson.map.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:53)
 at 
org.codehaus.jackson.map.deser.StdDeserializationContext.unknownFieldException(StdDeserializationContext.java:267)
 at 
org.codehaus.jackson.map.deser.std.StdDeserializer.reportUnknownProperty(StdDeserializer.java:673)
 at 
org.codehaus.jackson.map.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:659)
 at 
org.codehaus.jackson.map.deser.BeanDeserializer.handleUnknownProperty(BeanDeserializer.java:1365)
 at 
org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:652)
 at 
org.codehaus.jackson.map.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:923)
 at 
org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObjectUsingNonDefault(BeanDeserializer.java:739)
 at 
org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:683)
 at 
org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:580)
 at 
org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732) 
at 
org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1863) at 
{code}
*Reason:*

We started storing the field 'task-partition-mappings' in JobModel after 
SAMZA-1555.

Above exception occurs when we try to deserialize the new JobModel format with 
the old JobModel deserilization code(vice-versa).

Potentially can occur during rolling bounce upgrade/canary scenarios in 
standalone.

*Fix:* 
 A. Exclude task-partition-mappings field in deserialization/serialization 
path. `task-partition-mappings` is derived out of the containers field in 
JobModel. It doesn't add value to store it in JobModel.

B. Fix the test testContainerModelCompatible in TestSamzaObjectMapper which was 
supposed to validate this scenario.

  was:
*Problem:*

JobModel deserialization in ZkJobCoordinator throws the following exception in 
some scenarios.
{code:java}
org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field 
"task-partition-mappings" (Class org.apache.samza.job.model.JobModel), not 
marked as ignorable at [Source: java.io.StringReader@1f7030a6; line: 1, column: 
315] (through reference chain: 
org.apache.samza.job.model.JobModel["task-partition-mappings"]) at 
org.codehaus.jackson.map.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:53)
 at 
org.codehaus.jackson.map.deser.StdDeserializationContext.unknownFieldException(StdDeserializationContext.java:267)
 at 
org.codehaus.jackson.map.deser.std.StdDeserializer.reportUnknownProperty(StdDeserializer.java:673)
 at 
org.codehaus.jackson.map.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:659)
 at 
org.codehaus.jackson.map.deser.BeanDeserializer.handleUnknownProperty(BeanDeserializer.java:1365)
 at 
org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:652)
 at 
org.codehaus.jackson.map.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:923)
 at 
org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObjectUsingNonDefault(BeanDeserializer.java:739)
 at 
org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:683)
 at 
org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:580)
 at 
org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732) 
at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1863) at 
{code}
*Reason:*

We started storing the field 'task-partition-mappings' in JobModel after 
SAMZA-1555.

Above exception occurs when we try to deserialize the new JobModel format with 
the old JobModel deserilization code(vice-versa).

Potentially can occur during rolling bounce upgrade/canary scenarios in 
standalone.

*Fix:* 
 A. Exclude task-partition-mappings field in deserialization/serialization 
path. `task-partition-mappings` is derived out of the containers field in 
JobModel. It doesn't add value to store it in JobModel.

B. Fix the test testContainerModelCompatible in TestSamzaObjectMapper which was 
supposed to validate this scenario.


> JobModel Json deserialization error in standalone
> -------------------------------------------------
>
>                 Key: SAMZA-1640
>                 URL: https://issues.apache.org/jira/browse/SAMZA-1640
>             Project: Samza
>          Issue Type: Bug
>            Reporter: Shanthoosh Venkataraman
>            Assignee: Shanthoosh Venkataraman
>            Priority: Major
>
> *Problem:*
> JobModel deserialization in ZkJobCoordinator throws the following exception 
> in some scenarios.
> {code:java}
> org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized 
> field "task-partition-mappings" (Class org.apache.samza.job.model.JobModel), 
> not marked as ignorable at [Source: java.io.StringReader@1f7030a6; line: 1, 
> column: 315] (through reference chain: 
> org.apache.samza.job.model.JobModel["task-partition-mappings"]) at 
> org.codehaus.jackson.map.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:53)
>  at 
> org.codehaus.jackson.map.deser.StdDeserializationContext.unknownFieldException(StdDeserializationContext.java:267)
>  at 
> org.codehaus.jackson.map.deser.std.StdDeserializer.reportUnknownProperty(StdDeserializer.java:673)
>  at 
> org.codehaus.jackson.map.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:659)
>  at 
> org.codehaus.jackson.map.deser.BeanDeserializer.handleUnknownProperty(BeanDeserializer.java:1365)
>  at 
> org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:652)
>  at 
> org.codehaus.jackson.map.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:923)
>  at 
> org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObjectUsingNonDefault(BeanDeserializer.java:739)
>  at 
> org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:683)
>  at 
> org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:580)
>  at 
> org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732)
>  at 
> org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1863) at 
> {code}
> *Reason:*
> We started storing the field 'task-partition-mappings' in JobModel after 
> SAMZA-1555.
> Above exception occurs when we try to deserialize the new JobModel format 
> with the old JobModel deserilization code(vice-versa).
> Potentially can occur during rolling bounce upgrade/canary scenarios in 
> standalone.
> *Fix:* 
>  A. Exclude task-partition-mappings field in deserialization/serialization 
> path. `task-partition-mappings` is derived out of the containers field in 
> JobModel. It doesn't add value to store it in JobModel.
> B. Fix the test testContainerModelCompatible in TestSamzaObjectMapper which 
> was supposed to validate this scenario.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to