atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neeru Gupta (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ATLAS-723) JSON deserialization regression
Date Fri, 29 Apr 2016 19:43:13 GMT

    [ https://issues.apache.org/jira/browse/ATLAS-723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15264621#comment-15264621
] 

Neeru Gupta commented on ATLAS-723:
-----------------------------------

This fix has been verified by rpeorter [~jnhagelb]. 

> JSON deserialization regression
> -------------------------------
>
>                 Key: ATLAS-723
>                 URL: https://issues.apache.org/jira/browse/ATLAS-723
>             Project: Atlas
>          Issue Type: Bug
>    Affects Versions: trunk
>            Reporter: Jeffrey Hagelberg
>            Assignee: Neeru Gupta
>            Priority: Blocker
>         Attachments: InstanceSerializationTest.scala, rb46849.patch
>
>
> Some json that could be deserialized prior to the implementation of soft delete can no
longer be deserialized.  This seems to be related to the addition of the "state" field in
the id.  Furthermore, it seems to be restricted to cases where the object has an array reference.
> Here's an example of a JSON object whose deserialization now fails:
> {noformat}
>  {
>         "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>         "id": {
>             "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>             "id": "6765f7c6-cc11-4575-8c13-8bab9b3d86a2",
>             "version": 0,
>             "typeName": "LoadProcess"
>         },
>         "typeName": "LoadProcess",
>         "values": {
>             "inputTables": [{
>                     "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>                     "id": "bacfa996-e88e-4d7e-9630-68c9829b10b4",
>                     "version": 0,
>                     "typeName": "Table"
>                 }, {
>                     "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>                     "id": "6da06805-3f56-446f-8831-672a65ac2199",
>                     "version": 0,
>                     "typeName": "Table"
>                 }
>             ],
>             "outputTable": {
>                 "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>                 "id": "d5c3d6d0-aa10-44c1-b05d-ed9400d2a5ac",
>                 "version": 0,
>                 "typeName": "Table"
>             },
>             "name": "loadSalesDaily"
>         },
>         "traitNames": [
>             "ETL"
>         ],
>         "traits": {
>             "ETL": {
>                 "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
>                 "typeName": "ETL",
>                 "values": {
>                 }
>             }
>         }
>     }
> {noformat}
> (Note that this depends on the referenced Table objects having been previously saved
into Atlas)
> I spent some time debugging this today, it seems to be a regression in the InstanceSerialization
class.  It seems to be related to InstanceJavaConversion.state and InstanceJavaConversion.convertId



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message