atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeffrey Hagelberg (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ATLAS-474) Server does not start if the type is updated with same super type class information
Date Wed, 24 Feb 2016 17:45:18 GMT

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

Jeffrey Hagelberg commented on ATLAS-474:
-----------------------------------------

We are seeing the same issue with traits.  We've seen it with both hbase and berkelydb as
the backend.  Use case:

1.  Create type with definition {"enumTypes":[],"structTypes":[],"traitTypes":[{"superTypes":[],"hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.TraitType","typeName":"AuthorizationPackage_Tenant1","attributeDefinitions":[]}],"classTypes":[]}

2.  Create type with definition {"enumTypes":[],"structTypes":[],"traitTypes":[{"superTypes":[],"hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.TraitType","typeName":"AuthorizationPackage_User1","attributeDefinitions":[]}],"classTypes":[]}


3.  Update type with definition {"enumTypes":[],"structTypes":[],"traitTypes":[{"superTypes":["AuthorizationPackage_User1"],"hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.TraitType","typeName":"AuthorizationPackage_Tenant1","attributeDefinitions":[]}],"classTypes":[]}

4.  Update type with definition {"enumTypes":[],"structTypes":[],"traitTypes":[{"superTypes":["AuthorizationPackage_User2","AuthorizationPackage_User1"],"hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.TraitType","typeName":"AuthorizationPackage_Tenant1","attributeDefinitions":[]}],"classTypes":[]}


5.  Restart Atlas

Result: Atlas fails to start.  application.log has the following error:

1) Error injecting constructor, java.lang.RuntimeException: org.apache.atlas.AtlasException:
Type AuthorizationPackage_Tenant1 extends superType AuthorizationPackage_User1 multiple times
  at org.apache.atlas.services.DefaultMetadataService.<init>(DefaultMetadataService.java:95)
  at org.apache.atlas.services.DefaultMetadataService.class(DefaultMetadataService.java:82)
  while locating org.apache.atlas.services.DefaultMetadataService
  at org.apache.atlas.RepositoryMetadataModule.configure(RepositoryMetadataModule.java:72)
  while locating org.apache.atlas.services.MetadataService



1 error

	at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:466)
	at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:184)
	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
	at com.google.inject.Guice.createInjector(Guice.java:96)
	at com.google.inject.Guice.createInjector(Guice.java:73)
	at com.google.inject.Guice.createInjector(Guice.java:62)
	at org.apache.atlas.web.listeners.GuiceServletConfig.getInjector(GuiceServletConfig.java:78)
	at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:47)
	at org.apache.atlas.web.listeners.GuiceServletConfig.contextInitialized(GuiceServletConfig.java:118)
	at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800)
	at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444)
	at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
	at org.eclipse.jetty.server.Server.start(Server.java:387)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
	at org.eclipse.jetty.server.Server.doStart(Server.java:354)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.apache.atlas.web.service.EmbeddedServer.start(EmbeddedServer.java:88)
	at org.apache.atlas.Atlas.main(Atlas.java:106)
Caused by: java.lang.RuntimeException: org.apache.atlas.AtlasException: Type AuthorizationPackage_Tenant1
extends superType AuthorizationPackage_User1 multiple times

	at org.apache.atlas.services.DefaultMetadataService.restoreTypeSystem(DefaultMetadataService.java:115)
	at org.apache.atlas.services.DefaultMetadataService.<init>(DefaultMetadataService.java:102)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:68)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:528)
	at com.google.inject.internal.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:86)
	at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
	at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
	at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
	at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
	at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
	at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
	... 24 more

Caused by: org.apache.atlas.AtlasException: Type AuthorizationPackage_Tenant1 extends superType
AuthorizationPackage_User1 multiple times
	at org.apache.atlas.typesystem.types.TypeSystem$TransientTypeSystem.validateSuperTypes(TypeSystem.java:398)
	at org.apache.atlas.typesystem.types.TypeSystem$TransientTypeSystem.step2(TypeSystem.java:426)
	at org.apache.atlas.typesystem.types.TypeSystem$TransientTypeSystem.defineTypes(TypeSystem.java:567)
	at org.apache.atlas.typesystem.types.TypeSystem$TransientTypeSystem.defineTypes(TypeSystem.java:562)
	at org.apache.atlas.typesystem.types.TypeSystem.defineTypes(TypeSystem.java:255)
	at org.apache.atlas.typesystem.types.TypeSystem.defineTypes(TypeSystem.java:247)
	at org.apache.atlas.services.DefaultMetadataService.restoreTypeSystem(DefaultMetadataService.java:109)

> Server does not start if the type is updated with same super type class information
> -----------------------------------------------------------------------------------
>
>                 Key: ATLAS-474
>                 URL: https://issues.apache.org/jira/browse/ATLAS-474
>             Project: Atlas
>          Issue Type: Bug
>    Affects Versions: trunk
>         Environment: sandbox
>            Reporter: Chethana
>            Priority: Blocker
>
> Create a class with a superType class.
> Use update API and do not change the request used.
> Restart atlas server 
> Fails with exception
> K":1},"pattern":"static","timestamp":"1454921806183"} stored data: {"version":1,"subscription":{"ATLAS_HOOK":1},"pattern":"static","timestamp":"1454921372384"}
(ZkUtils$:68)
> 2016-02-09 00:00:02,149 INFO  - [ZkClient-EventThread-91-localhost:9026:] ~ I wrote this
conflicted ephemeral node [{"version":1,"subscription":{"ATLAS_HOOK":1},"pattern":"static","timestamp":"1454921806183"}]
at /consumers/atlas/ids/atlas_Chethanas-MBP.local-1454412213224-de1ce8e6 a while back in a
different session, hence I will backoff for this node to be deleted by Zookeeper and retry
(ZkUtils$:68)
> 2016-02-09 00:00:02,554 INFO  - [ProcessThread(sid:0 cport:-1)::] ~ Got user-level KeeperException
when processing sessionid:0x152a1b9238e0051 type:create cxid:0x3f0bf zxid:0x1c0ec txntype:-1
reqpath:n/a Error Path:/consumers/atlas/ids/atlas_Chethanas-MBP.local-1454412213224-de1ce8e6
Error:KeeperErrorCode = NodeExists for /consumers/atlas/ids/atlas_Chethanas-MBP.local-1454412213224-de1ce8e6
(PrepRequest...skipping...
>         at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
>         at org.eclipse.jetty.server.Server.doStart(Server.java:354)
>         at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
>         at org.apache.atlas.web.service.EmbeddedServer.start(EmbeddedServer.java:88)
>         at org.apache.atlas.Atlas.main(Atlas.java:107)
> Caused by: java.lang.RuntimeException: org.apache.atlas.AtlasException: Type classa3ozcd7yra
extends superType superClassa3ozcd7yra multiple times
>         at org.apache.atlas.services.DefaultMetadataService.restoreTypeSystem(DefaultMetadataService.java:113)
>         at org.apache.atlas.services.DefaultMetadataService.<init>(DefaultMetadataService.java:100)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>         at com.google.inject.internal.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:86)
>         at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)



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

Mime
View raw message