[ 
https://issues.apache.org/jira/browse/ATLAS-285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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   Time    Time     Time  
> Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100  1399    0  1399    0     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: 
> 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
> *   Trying ::1...
> * Connected to localhost (::1) port 21000 (#0)
> > GET 
> > /api/atlas/lineage/hive/table/create%20table%20table_1265%20as%20select%20employee.salary%20as%20salary%20from%20employee/outputs/graph
> >  HTTP/1.1
> > Host: localhost:21000
> > Accept: application/json, text/plain, */*
> > Connection: keep-alive
> > Accept-Encoding: gzip, deflate, sdch
> > Referer: http://localhost:21000/
> > Accept-Language: en-US,en;q=0.8
> > 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
> >
> < HTTP/1.1 404 Not Found
> < Date: Thu, 05 Nov 2015 19:35:57 GMT
> < Content-Type: application/json; charset=UTF-8
> < Transfer-Encoding: chunked
> < Server: Jetty(9.2.12.v20150709)
> <
> {"error":"create table table_1265 as select employee.salary as salary from 
> employee does not 
> exist","stackTrace":"org.apache.atlas.repository.EntityNotFoundException: 
> create table table_1265 as select employee.salary as salary from employee 
> does not exist\n\tat 
> org.apache.atlas.discovery.HiveLineageService.validateTableExists(HiveLineageService.java:216)\n\tat
>  
> org.apache.atlas.discovery.HiveLineageService.getOutputsGraph(HiveLineageService.java:135)\n\tat
>  
> org.apache.atlas.GraphTransactionInterceptor.invoke(GraphTransactionInterceptor.java:42)\n\tat
>  
> org.apache.atlas.web.resources.HiveLineageResource.outputsGraph(HiveLineageResource.java:113)\n\tat
>  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n\tat
>  
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat
>  java.lang.reflect.Method.invoke(Method.java:606)\n\tat 
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)\n\tat
>  
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)\n\tat
>  
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)\n\tat
>  
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)\n\tat
>  
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)\n\tat
>  
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)\n\tat
>  
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)\n\tat
>  
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)\n\tat
>  
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)\n\tat
>  
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)\n\tat
>  
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)\n\tat
>  
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)\n\tat
>  
> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)\n\tat
>  
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)\n\tat
>  
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)\n\tat
>  javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\n\tat 
> com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:287)\n\tat
>  
> com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:277)\n\tat
>  
> com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:182)\n\tat
>  
> com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)\n\tat
>  
> com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)\n\tat
>  org.apache.atlas.web.filters.AuditFilter.doFilter(AuditFilter.java:67)\n\tat 
> com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)\n\tat
>  
> com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:119)\n\tat
>  com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)\n\tat 
> com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)\n\tat 
> com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)\n\tat
>  com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)\n\tat 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\n\tat
>  
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)\n\tat
>  
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat
>  
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)\n\tat
>  
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)\n\tat
>  org.eclipse.jetty.server.* Connection #0 to host localhost left intact
> handler.ContextHandler.doHandle(ContextHandler.java:1127)\n\tat 
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\n\tat
>  
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat
>  
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)\n\tat
>  
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat
>  
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\n\tat
>  org.eclipse.jetty.server.Server.handle(Server.java:499)\n\tat 
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)\n\tat 
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)\n\tat
>  
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\n\tat
>  
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)\n\tat
>  
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)\n\tat
>  java.lang.Thread.run(Thread.java:745)\n"}
> {noformat}



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

Reply via email to