Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-2900

Regression: Export Connected Generates Incorrect Content

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0, 0.8.3, trunk
    • 1.0.0, 0.8.3, 2.0.0, trunk
    • atlas-core
    • None

    Description

      Steps to Duplicate

      Using Beeline, create the following entities in Hive.

      create database stocks; 
      use stocks; 
      create table daily (dt string, open string, high string, low string, close string, volume string, adj_close string); 
      create view daily_rpt as select * from daily;
      
      

      Perform export with following options:

      { 
      "itemsToExport": [ { "typeName": "hive_table", "uniqueAttributes": { "qualifiedName": "stocks.daily@cl1" } } ], 
      "options": { "fetchType": "connected" } 
      }
      
      

      Expected result: Exported output should be 'import' able in another Atlas instance where the database with same guid is already present.

      Actual result: 

      On Importing the attached zip file , request fails with

      2018-09-26 23:02:50,705 INFO  - [pool-2-thread-18 - 84ea8d84-ead8-428d-a4db-4451812dd241:] ~ ==> import(user=admin, from=10.22.16.153, request=AtlasImportRequest{options={}}) (ImportService:89)
      2018-09-26 23:02:50,864 INFO  - [pool-2-thread-18 - 84ea8d84-ead8-428d-a4db-4451812dd241:] ~ bulkImport(): progress: 14% (of 7) - entity:last-imported:hive_table:[1]:(d7773c32-ce56-4d8a-96c1-5a4aa97e982e) (AtlasEntityStoreV1:146)
      2018-09-26 23:02:50,865 ERROR - [pool-2-thread-18 - 84ea8d84-ead8-428d-a4db-4451812dd241:] ~ getNextEntityWithExtInfo (ZipSource:213)
      org.apache.atlas.exception.AtlasBaseException: Error converting file to JSON.
      	at org.apache.atlas.repository.impexp.ZipSource.convertFromJson(ZipSource.java:177)
      	at org.apache.atlas.repository.impexp.ZipSource.getEntityWithExtInfo(ZipSource.java:139)
      	at org.apache.atlas.repository.impexp.ZipSource.getNextEntityWithExtInfo(ZipSource.java:211)
      	at org.apache.atlas.repository.store.graph.v1.BulkImporterImpl$EntityImportStreamWithResidualList.getNextEntityWithExtInfo(BulkImporterImpl.java:183)
      	at org.apache.atlas.repository.store.graph.v1.BulkImporterImpl.bulkImport(BulkImporterImpl.java:72)
      	at org.apache.atlas.repository.impexp.ImportService.processEntities(ImportService.java:213)
      	at org.apache.atlas.repository.impexp.ImportService.run(ImportService.java:100)
      	at org.apache.atlas.web.resources.AdminResource.importData(AdminResource.java:390)
      	at sun.reflect.GeneratedMethodAccessor227.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
      	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
      	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
      	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
      	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
      	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
      	at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
      	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
      	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1507)
      	at org.apache.atlas.web.filters.AuditFilter.doFilter(AuditFilter.java:76)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1495)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
      	at org.apache.atlas.web.filters.AtlasAuthorizationFilter.doFilter(AtlasAuthorizationFilter.java:157)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
      	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.apache.atlas.web.filters.AtlasCSRFPreventionFilter$ServletFilterHttpInteraction.proceed(AtlasCSRFPreventionFilter.java:235)
      	at org.apache.atlas.web.filters.AtlasCSRFPreventionFilter.handleHttpInteraction(AtlasCSRFPreventionFilter.java:177)
      	at org.apache.atlas.web.filters.AtlasCSRFPreventionFilter.doFilter(AtlasCSRFPreventionFilter.java:190)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.apache.atlas.web.filters.AtlasAuthenticationFilter.doFilter(AtlasAuthenticationFilter.java:373)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.apache.atlas.web.filters.StaleTransactionCleanupFilter.doFilter(StaleTransactionCleanupFilter.java:55)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.apache.atlas.web.filters.ActiveServerFilter.doFilter(ActiveServerFilter.java:85)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:215)
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.apache.atlas.web.filters.AtlasKnoxSSOAuthenticationFilter.doFilter(AtlasKnoxSSOAuthenticationFilter.java:146)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
      	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
      	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
      	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1487)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:427)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      	at org.eclipse.jetty.server.Server.handle(Server.java:370)
      	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
      	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:984)
      	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1045)
      	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
      	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:236)
      	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.NullPointerException
      	at java.io.StringReader.<init>(StringReader.java:50)
      	at org.codehaus.jackson.JsonFactory.createJsonParser(JsonFactory.java:636)
      	at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1863)
      	at org.apache.atlas.type.AtlasType.fromJson(AtlasType.java:116)
      	at org.apache.atlas.repository.impexp.ZipSource.convertFromJson(ZipSource.java:174)
      	... 97 more
      2018-09-26 23:02:51,037 INFO  - [pool-2-thread-18 - 84ea8d84-ead8-428d-a4db-4451812dd241:] ~ bulkImport(): progress: 57% (of 7) - entity:last-imported:hive_table:[4]:(a9a0eb48-b18c-42b1-8871-f320398f4f47) (AtlasEntityStoreV1:146)
      2018-09-26 23:02:51,107 INFO  - [pool-2-thread-18 - 84ea8d84-ead8-428d-a4db-4451812dd241:] ~ bulkImport(): progress: 71% (of 7) - entity:last-imported:hive_column_lineage:[5]:(ffaf4e7a-4fa6-4d1b-b4bb-ae4b0839b240) (AtlasEntityStoreV1:146)
      2018-09-26 23:02:51,161 INFO  - [pool-2-thread-18 - 84ea8d84-ead8-428d-a4db-4451812dd241:] ~ bulkImport(): progress: 85% (of 7) - entity:last-imported:hive_column_lineage:[6]:(584b3d03-efb8-4efc-a757-d9e979a468a0) (AtlasEntityStoreV1:146)
      2018-09-26 23:02:51,161 INFO  - [pool-2-thread-18 - 84ea8d84-ead8-428d-a4db-4451812dd241:] ~ bulkImport(): done. Total number of entities (including referred entities) imported: 12 (AtlasEntityStoreV1:105)
      2018-09-26 23:02:51,262 INFO  - [pool-2-thread-18 - 84ea8d84-ead8-428d-a4db-4451812dd241:] ~ addAuditEntry: user: admin, source: , target: cl1, operation: IMPORT (ExportImportAuditService:161)
      

      Attachments

        1. ATLAS-2900-Export-connected-addressed-case-where-imp.patch
          10 kB
          Ashutosh Mestry
        2. uPqvN.zip
          8 kB
          Sharmadha S

        Activity

          People

            amestry Ashutosh Mestry
            sharmadhas Sharmadha S
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: