[jira] [Commented] (ATLAS-285) Hive process lineage graph API request is broken, it always returns 404.

2015-11-05 Thread Shwetha G S (JIRA)

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

Shwetha G S commented on ATLAS-285:
---

The lineage API is on data set which is hive_table in this case. Its not on 
process. So, the argument should be hive table name of format 
clustername.dbname.tablename. Its documented in 
https://github.com/apache/incubator-atlas/blob/master/docs/src/site/twiki/Bridge-Hive.twiki

> Hive process lineage graph API request is broken, it always returns 404.
> 
>
> Key: ATLAS-285
> URL: https://issues.apache.org/jira/browse/ATLAS-285
> Project: Atlas
>  Issue Type: Bug
>Affects Versions: 0.5-incubating
>Reporter: Ayub Khan
>Assignee: Erik Bergenholtz
> Attachments: application.log.attach
>
>
> Hive process lineage graph API request is broken, it always returns 404.
> 1. Hive: create table as select 
> create table table_1265 as select employee.salary as salary from employee
> 2. Check the table is created in ATLAS
> {noformat}
> curl 
> 'http://localhost:21000/api/atlas/entities/ff0d1738-d672-4906-a761-4ea419f58518'
>  -H 'Accept: application/json, text/plain, */*' -H 'Connection: keep-alive' 
> -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Referer: 
> http://localhost:21000/' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: 
> Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, 
> like Gecko) Chrome/46.0.2490.80 Safari/537.36' --compressed | python -m 
> json.tool
>   % Total% Received % Xferd  Average Speed   TimeTime Time  
> Current
>  Dload  Upload   Total   SpentLeft  Speed
> 100  13990  13990 0  35155  0 --:--:-- --:--:-- --:--:-- 35871
> {
> "GUID": "ff0d1738-d672-4906-a761-4ea419f58518",
> "definition": {
> "id": {
> "id": "ff0d1738-d672-4906-a761-4ea419f58518",
> "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": "823df549-29ae-4926-bb46-4f4c73c4657a",
> "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": "salary",
> "type": "string"
> }
> }
> ],
> "comment": null,
> "createTime": 1446751132,
> "db": {
> "id": "37199c37-919e-499c-b7df-d14aad02a67f",
> "jsonClass": 
> "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
> "typeName": "hive_db",
> "version": 0
> },
> "description": null,
> "lastAccessTime": 0,
> "name": "primary.default.table_1265",
> "owner": "apathan",
> "parameters": {
> "COLUMN_STATS_ACCURATE": "true",
> "numFiles": "1",
> "numRows": "0",
> "rawDataSize": "0",
> "totalSize": "0",
> "transient_lastDdlTime": "1446751132"
> },
> "partitionKeys": null,
> "retention": 0,
> "sd": null,
> "tableName": "table_1265",
> "tableType": "MANAGED_TABLE",
> "temporary": false,
> "viewExpandedText": null,
> "viewOriginalText": null
> }
> },
> "requestId": "qtp1610708593-14 - 65774a18-33e9-4195-8ad4-914e20dd59f8"
> }
> {noformat}
> 3. Now query for the corresponding hive process graph, it always returns 404..
> {noformat}
> curl -v 
> 'http://localhost:21000/api/atlas/lineage/hive/table/create%20table%20table_1265%20as%20select%20employee.salary%20as%20salary%20from%20employee/outputs/graph'
>  -H 'Accept: application/json, text/plain, */*' -H 'Connection: keep-alive' 
> -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Referer: 
> http://localhost:21000/' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: 
> 

[jira] [Commented] (ATLAS-285) Hive process lineage graph API request is broken, it always returns 404.

2015-11-05 Thread Shwetha G S (JIRA)

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

Shwetha G S commented on ATLAS-285:
---

{noformat}
curl -v 
'http://localhost:21000/api/atlas/lineage/hive/table/create%20table%20table_1265%20as%20select%20employee.salary%20as%20salary%20from%20employee/outputs/graph
{noformat}
The table name in the path above should be tablename. Why is it CTAS query? Is 
this on trunk?

> Hive process lineage graph API request is broken, it always returns 404.
> 
>
> Key: ATLAS-285
> URL: https://issues.apache.org/jira/browse/ATLAS-285
> Project: Atlas
>  Issue Type: Bug
>Affects Versions: 0.5-incubating
>Reporter: Ayub Khan
>Assignee: Erik Bergenholtz
> Attachments: application.log.attach
>
>
> Hive process lineage graph API request is broken, it always returns 404.
> 1. Hive: create table as select 
> create table table_1265 as select employee.salary as salary from employee
> 2. Check the table is created in ATLAS
> {noformat}
> curl 
> 'http://localhost:21000/api/atlas/entities/ff0d1738-d672-4906-a761-4ea419f58518'
>  -H 'Accept: application/json, text/plain, */*' -H 'Connection: keep-alive' 
> -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Referer: 
> http://localhost:21000/' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: 
> Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, 
> like Gecko) Chrome/46.0.2490.80 Safari/537.36' --compressed | python -m 
> json.tool
>   % Total% Received % Xferd  Average Speed   TimeTime Time  
> Current
>  Dload  Upload   Total   SpentLeft  Speed
> 100  13990  13990 0  35155  0 --:--:-- --:--:-- --:--:-- 35871
> {
> "GUID": "ff0d1738-d672-4906-a761-4ea419f58518",
> "definition": {
> "id": {
> "id": "ff0d1738-d672-4906-a761-4ea419f58518",
> "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": "823df549-29ae-4926-bb46-4f4c73c4657a",
> "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": "salary",
> "type": "string"
> }
> }
> ],
> "comment": null,
> "createTime": 1446751132,
> "db": {
> "id": "37199c37-919e-499c-b7df-d14aad02a67f",
> "jsonClass": 
> "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
> "typeName": "hive_db",
> "version": 0
> },
> "description": null,
> "lastAccessTime": 0,
> "name": "primary.default.table_1265",
> "owner": "apathan",
> "parameters": {
> "COLUMN_STATS_ACCURATE": "true",
> "numFiles": "1",
> "numRows": "0",
> "rawDataSize": "0",
> "totalSize": "0",
> "transient_lastDdlTime": "1446751132"
> },
> "partitionKeys": null,
> "retention": 0,
> "sd": null,
> "tableName": "table_1265",
> "tableType": "MANAGED_TABLE",
> "temporary": false,
> "viewExpandedText": null,
> "viewOriginalText": null
> }
> },
> "requestId": "qtp1610708593-14 - 65774a18-33e9-4195-8ad4-914e20dd59f8"
> }
> {noformat}
> 3. Now query for the corresponding hive process graph, it always returns 404..
> {noformat}
> curl -v 
> 'http://localhost:21000/api/atlas/lineage/hive/table/create%20table%20table_1265%20as%20select%20employee.salary%20as%20salary%20from%20employee/outputs/graph'
>  -H 'Accept: application/json, text/plain, */*' -H 'Connection: keep-alive' 
> -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Referer: 
> http://localhost:21000/' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: 
>