atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suma Shivaprasad (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ATLAS-636) Tags/Traits associated with partitionkeys should be retained after rename table.
Date Mon, 18 Apr 2016 17:22:25 GMT

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

Suma Shivaprasad commented on ATLAS-636:
----------------------------------------

This will be fixed as part of ATLAS-583

> Tags/Traits associated with partitionkeys should be retained after rename table.
> --------------------------------------------------------------------------------
>
>                 Key: ATLAS-636
>                 URL: https://issues.apache.org/jira/browse/ATLAS-636
>             Project: Atlas
>          Issue Type: Bug
>    Affects Versions: trunk
>            Reporter: Ayub Khan
>            Assignee: Suma Shivaprasad
>             Fix For: trunk
>
>
> Partition keys tag/trait association is lost when a table is renamed.
> Hive table entity has tags associated to partition keys..
> {noformat}
> curl 'http://localhost:21000/api/atlas/entities/b70c53b1-e6a1-4811-9cfd-5d1aa52a353f'
-H 'Accept: application/json, text/plain, */*' -H 'Referer: http://localhost:21000/' -H 'Cache-Control:
no-cache' --compressed | python -m json.tool
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100  3355    0  3355    0     0   103k      0 --:--:-- --:--:-- --:--:--  105k
> {
>     "GUID": "b70c53b1-e6a1-4811-9cfd-5d1aa52a353f",
>     "definition": {
>         "id": {
>             "id": "b70c53b1-e6a1-4811-9cfd-5d1aa52a353f",
>             "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>             "typeName": "hive_table",
>             "version": 0
>         },
>         "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>         "traitNames": [],
>         "traits": {},
>         "typeName": "hive_table",
>         "values": {
>             "columns": [
>                 {
>                     "id": {
>                         "id": "6600947f-c9d0-4158-82d1-54406401df46",
>                         "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>                         "typeName": "hive_column",
>                         "version": 0
>                     },
>                     "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>                     "traitNames": [],
>                     "traits": {},
>                     "typeName": "hive_column",
>                     "values": {
>                         "comment": null,
>                         "name": "s",
>                         "qualifiedName": "d2.p2.s@primary",
>                         "type": "string"
>                     }
>                 }
>             ],
>             "comment": null,
>             "createTime": 1459845523,
>             "db": {
>                 "id": "9a2c114d-dbb9-41c6-86bf-fbdb52f93ef2",
>                 "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>                 "typeName": "hive_db",
>                 "version": 0
>             },
>             "description": null,
>             "lastAccessTime": 0,
>             "name": "d2.p2@primary",
>             "owner": "apathan",
>             "parameters": {
>                 "last_modified_by": "apathan",
>                 "last_modified_time": "1459845523",
>                 "transient_lastDdlTime": "1459845523"
>             },
>             "partitionKeys": [
>                 {
>                     "id": {
>                         "id": "726fa937-8131-4d48-8c21-ce0ebed965ca",
>                         "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>                         "typeName": "hive_column",
>                         "version": 0
>                     },
>                     "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>                     "traitNames": [
>                         "DataProducer"
>                     ],
>                     "traits": {
>                         "DataProducer": {
>                             "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
>                             "typeName": "DataProducer",
>                             "values": {}
>                         }
>                     },
>                     "typeName": "hive_column",
>                     "values": {
>                         "comment": null,
>                         "name": "month",
>                         "qualifiedName": "d2.p2.month@primary",
>                         "type": "int"
>                     }
>                 },
>                 {
>                     "id": {
>                         "id": "83e0c544-1e06-48bf-865d-d2ce09084943",
>                         "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>                         "typeName": "hive_column",
>                         "version": 0
>                     },
>                     "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>                     "traitNames": [
>                         "DataProcessor"
>                     ],
>                     "traits": {
>                         "DataProcessor": {
>                             "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
>                             "typeName": "DataProcessor",
>                             "values": {}
>                         }
>                     },
>                     "typeName": "hive_column",
>                     "values": {
>                         "comment": null,
>                         "name": "day",
>                         "qualifiedName": "d2.p2.day@primary",
>                         "type": "int"
>                     }
>                 }
>             ],
>             "retention": 0,
>             "sd": {
>                 "id": {
>                     "id": "24107d4f-13fc-4cf2-b920-1c1ddcac474f",
>                     "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>                     "typeName": "hive_storagedesc",
>                     "version": 0
>                 },
>                 "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>                 "traitNames": [],
>                 "traits": {},
>                 "typeName": "hive_storagedesc",
>                 "values": {
>                     "bucketCols": null,
>                     "compressed": false,
>                     "inputFormat": "org.apache.hadoop.mapred.TextInputFormat",
>                     "location": "hdfs://localhost:9000/user/hive/warehouse/d2.db/p2",
>                     "numBuckets": -1,
>                     "outputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat",
>                     "parameters": null,
>                     "qualifiedName": "d2.p2@primary",
>                     "serdeInfo": {
>                         "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
>                         "typeName": "hive_serde",
>                         "values": {
>                             "name": null,
>                             "parameters": {
>                                 "serialization.format": "1"
>                             },
>                             "serializationLib": "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"
>                         }
>                     },
>                     "sortCols": null,
>                     "storedAsSubDirectories": false
>                 }
>             },
>             "tableName": "p2",
>             "tableType": "MANAGED_TABLE",
>             "temporary": false,
>             "viewExpandedText": null,
>             "viewOriginalText": null
>         }
>     },
>     "requestId": "qtp90706399-222 - 54a59a5d-0d6f-4257-a80f-d65d88842351"
> }
> {noformat}
> After table rename, tags associated to partition keys are lost
> {noformat}
> curl 'http://localhost:21000/api/atlas/entities/b70c53b1-e6a1-4811-9cfd-5d1aa52a353f'
-H 'Accept: application/json, text/plain, */*' -H 'Referer: http://localhost:21000/' -H 'Cache-Control:
no-cache' --compressed | python -m json.tool
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100  3062    0  3062    0     0   1967      0 --:--:--  0:00:01 --:--:--  1966
> {
>     "GUID": "b70c53b1-e6a1-4811-9cfd-5d1aa52a353f",
>     "definition": {
>         "id": {
>             "id": "b70c53b1-e6a1-4811-9cfd-5d1aa52a353f",
>             "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>             "typeName": "hive_table",
>             "version": 0
>         },
>         "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>         "traitNames": [],
>         "traits": {},
>         "typeName": "hive_table",
>         "values": {
>             "columns": [
>                 {
>                     "id": {
>                         "id": "d45c0d6d-a693-4acf-8007-24f8f65238c7",
>                         "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>                         "typeName": "hive_column",
>                         "version": 0
>                     },
>                     "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>                     "traitNames": [],
>                     "traits": {},
>                     "typeName": "hive_column",
>                     "values": {
>                         "comment": null,
>                         "name": "s",
>                         "qualifiedName": "d2.p1.s@primary",
>                         "type": "string"
>                     }
>                 }
>             ],
>             "comment": null,
>             "createTime": 1459846073,
>             "db": {
>                 "id": "9a2c114d-dbb9-41c6-86bf-fbdb52f93ef2",
>                 "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>                 "typeName": "hive_db",
>                 "version": 0
>             },
>             "description": null,
>             "lastAccessTime": 0,
>             "name": "d2.p1@primary",
>             "owner": "apathan",
>             "parameters": {
>                 "last_modified_by": "apathan",
>                 "last_modified_time": "1459846073",
>                 "transient_lastDdlTime": "1459846073"
>             },
>             "partitionKeys": [
>                 {
>                     "id": {
>                         "id": "31b86a69-8b25-4348-a58a-29671a1ff29c",
>                         "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>                         "typeName": "hive_column",
>                         "version": 0
>                     },
>                     "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>                     "traitNames": [],
>                     "traits": {},
>                     "typeName": "hive_column",
>                     "values": {
>                         "comment": null,
>                         "name": "month",
>                         "qualifiedName": "d2.p1.month@primary",
>                         "type": "int"
>                     }
>                 },
>                 {
>                     "id": {
>                         "id": "0c536e31-616e-47b9-8735-6d87e99d555b",
>                         "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>                         "typeName": "hive_column",
>                         "version": 0
>                     },
>                     "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>                     "traitNames": [],
>                     "traits": {},
>                     "typeName": "hive_column",
>                     "values": {
>                         "comment": null,
>                         "name": "day",
>                         "qualifiedName": "d2.p1.day@primary",
>                         "type": "int"
>                     }
>                 }
>             ],
>             "retention": 0,
>             "sd": {
>                 "id": {
>                     "id": "aa5a898d-e6f0-4b1e-b0ce-b117c5b36599",
>                     "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>                     "typeName": "hive_storagedesc",
>                     "version": 0
>                 },
>                 "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>                 "traitNames": [],
>                 "traits": {},
>                 "typeName": "hive_storagedesc",
>                 "values": {
>                     "bucketCols": null,
>                     "compressed": false,
>                     "inputFormat": "org.apache.hadoop.mapred.TextInputFormat",
>                     "location": "hdfs://localhost:9000/user/hive/warehouse/d2.db/p1",
>                     "numBuckets": -1,
>                     "outputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat",
>                     "parameters": null,
>                     "qualifiedName": "d2.p1@primary",
>                     "serdeInfo": {
>                         "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
>                         "typeName": "hive_serde",
>                         "values": {
>                             "name": null,
>                             "parameters": {
>                                 "serialization.format": "1"
>                             },
>                             "serializationLib": "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"
>                         }
>                     },
>                     "sortCols": null,
>                     "storedAsSubDirectories": false
>                 }
>             },
>             "tableName": "p1",
>             "tableType": "MANAGED_TABLE",
>             "temporary": false,
>             "viewExpandedText": null,
>             "viewOriginalText": null
>         }
>     },
>     "requestId": "qtp90706399-222 - af0119c3-2ee7-4607-989d-cbcc066cdd60"
> }
> {noformat}



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

Mime
View raw message