You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "David Radley (JIRA)" <ji...@apache.org> on 2016/08/19 14:13:20 UTC

[jira] [Created] (ATLAS-1130) Issue processing entity rest response in browser

David Radley created ATLAS-1130:
-----------------------------------

             Summary: Issue processing entity rest response in browser
                 Key: ATLAS-1130
                 URL: https://issues.apache.org/jira/browse/ATLAS-1130
             Project: Atlas
          Issue Type: Bug
            Reporter: David Radley


I issue call :
http://127.0.0.1:21000/api/atlas/ entities?type=hive_table
then issue another call to get the details of the Hive table:
http://127.0.0.1:21000/api/atlas/ entities/c702a914-942b-4b70-96dd-473dc484f10c

I am in Firefox debugging and see:
"definition":{
            "typeName":"hive_table",
            "id":{
                "typeName":"hive_table",
                "id":"c702a914-942b-4b70-96dd-473dc484f10c",
                "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
                "state":"ACTIVE",
                "version":0
            },
            "traitNames":["Fraud.Customer"],
            "values":{
                "createTime":"2016-07-22T12:21:27.000Z",
                "db":{
                    "typeName":"hive_db",
                    "id":"9b39b886-fa83-4f18-bbf2-f93b56d56dc0",
                    "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
                    "state":"ACTIVE",
                    "version":0
                },
                "lastAccessTime":"2016-07-22T12:21:27.000Z",
                "qualifiedName":"default.customer@Sandbox",
                "sd":{
                    "typeName":"hive_storagedesc",
                    "id":{
                        "typeName":"hive_storagedesc",
                        "id":"4390715e-b4d1-441c-87aa-e84b01a96f75",
                        "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
                        "state":"ACTIVE",
                        "version":0
                    },
                    "traitNames":[],
                    "values":{
                        "sortCols":null,
                        "compressed":false,
                        "serdeInfo":{
                            "typeName":"hive_serde",
                            "values":{
                                "serializationLib":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe",
                                "name":null,
                                "parameters":{
                                    "serialization.format":",
                                    ",
                                    "field.delim":",
                                    "
                                }
                            },
                            "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Struct"
                        },
                        "location":"hdfs:\/\/sandbox.hortonworks.com:8020\/apps\/hive\/warehouse\/customer",
                        "outputFormat":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat",
                        "bucketCols":null,
                        "qualifiedName":"default.customer@Sandbox_storage",
                        "storedAsSubDirectories":false,
                        "numBuckets":-1,
                        "inputFormat":"org.apache.hadoop.mapred.TextInputFormat",
                        "table":{
                            "typeName":"hive_table",
                            "id":"c702a914-942b-4b70-96dd-473dc484f10c",
                            "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
                            "state":"ACTIVE",
                            "version":0
                        },

the browser debugger errors Syntax Error: JSON parse bad control character in string literal at line 43 column 62 of the JSON data. It does not like the ":"," below:
   "parameters":{
                               "serialization.format":",
                                    ",

I have issued the rest call in JAVA and it tolerates this JSON. As a circumvention I am proxying the REST call in JAVA and removing the"sd" key (which is the key that has this offending JSON construct).  





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