Connie,
Thanks for the update. I am not sure why/if attribute name ‘schema’ is treated special. Cab you please file a JIRA so that we track this issue? Madhan From: Connie Chen <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Wednesday, June 20, 2018 at 1:42 PM To: "[email protected]" <[email protected]> Subject: Re: After updating to 1.0.0 AtlasObjectId's no longer work We were able to figure out the issue, apparently the word `schema` has some special meaning and now cannot be used as an entity attribute name. As soon as we changed the attribute name to `schemaRef` everything worked again. Is this a bug or an oversight that I should file ticket for? Seems like something that should be in the release notes as a breaking change. Connie On Tue, Jun 19, 2018 at 5:26 PM, Connie Chen <[email protected]> wrote: Hi Madhan, yes I had it as a single `AtlasObjectId` before and it was complaining that `schema` is not of type `array<objectid>` but in my typedefs I clearly had a custom `schema` type. "Metadata service API org.apache.atlas.AtlasClientV2$API_V2@67d180e4 failed with status 404 (Not Found) Response Body ({\"errorCode\":\"ATLAS-404-00-007\",\"errorMessage\":\"Invalid instance creation/updation parameters passed : s3.schema={guid=e5e18526-ee5f-4080-be6b-65da1d2aeed9, typeName=schema}: invalid value for type array<objectid>\" Did anything change with Referenceable or Asset or the semantics of it? I couldn't find any release notes that might have caused this. All our typedefs remained the same, but some reference types seem to work and others don't. Connie On Tue, Jun 19, 2018 at 5:22 PM, Madhan Neethiraj <[email protected]> wrote: Connie, Perhaps a collection was sent, instead of a single object-id – looking at ‘[‘ and ‘]’ in the following message? org.apache.atlas.exception.AtlasBaseException: ObjectId is not valid [{guid=68fb7501-63be-44c5-9e96-823314ee614a, typeName=schema}] Can you please check? Thanks, Madhan From: <[email protected]> on behalf of Connie Chen <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Tuesday, June 19, 2018 at 3:47 PM To: "[email protected]" <[email protected]> Subject: Re: After updating to 1.0.0 AtlasObjectId's no longer work Here is the stacktrace, I don't see why it can't detect this as an `AtlasObjectId` 2018-06-19 22:43:40,509 ERROR - [pool-1-thread-4 - 9b1b9c88-a432-47e0-b02d-3b4086cb8986:] ~ graph rollback due to exception (GraphTransactionInterceptor:154) org.apache.atlas.exception.AtlasBaseException: ObjectId is not valid [{guid=68fb7501-63be-44c5-9e96-823314ee614a, typeName=schema}] at org.apache.atlas.repository.store.graph.v2.AtlasEntityGraphDiscoveryV2.visitReference(AtlasEntityGraphDiscoveryV2.java:199) at org.apache.atlas.repository.store.graph.v2.AtlasEntityGraphDiscoveryV2.visitAttribute(AtlasEntityGraphDiscoveryV2.java:234) at org.apache.atlas.repository.store.graph.v2.AtlasEntityGraphDiscoveryV2.visitEntity(AtlasEntityGraphDiscoveryV2.java:317) at org.apache.atlas.repository.store.graph.v2.AtlasEntityGraphDiscoveryV2.walkEntityGraph(AtlasEntityGraphDiscoveryV2.java:358) at org.apache.atlas.repository.store.graph.v2.AtlasEntityGraphDiscoveryV2.discover(AtlasEntityGraphDiscoveryV2.java:142) at org.apache.atlas.repository.store.graph.v2.AtlasEntityGraphDiscoveryV2.discoverEntities(AtlasEntityGraphDiscoveryV2.java:69) at org.apache.atlas.repository.store.graph.v2.AtlasEntityStoreV2.preCreateOrUpdate(AtlasEntityStoreV2.java:643) at org.apache.atlas.repository.store.graph.v2.AtlasEntityStoreV2.createOrUpdate(AtlasEntityStoreV2.java:579) at org.apache.atlas.repository.store.graph.v2.AtlasEntityStoreV2.createOrUpdate(AtlasEntityStoreV2.java:166) at org.apache.atlas.repository.store.graph.v2.AtlasEntityStoreV2$$FastClassBySpringCGLIB$$6861dca9.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:736) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.apache.atlas.GraphTransactionInterceptor.invoke(GraphTransactionInterceptor.java:75) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:671) at org.apache.atlas.repository.store.graph.v2.AtlasEntityStoreV2$$EnhancerBySpringCGLIB$$5ff9641e.createOrUpdate(<generated>) at org.apache.atlas.web.rest.EntityREST.createOrUpdate(EntityREST.java:272) at sun.reflect.GeneratedMethodAccessor84.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) On Tue, Jun 19, 2018 at 3:18 PM, Connie Chen <[email protected]> wrote: Hi, after we upgraded from 0.8.1 to 1.0.0, using `AtlasObjectId` in the `AtlasClientV2` no longer works, it gives this error {\"errorCode\":\"ATLAS-400-00-021\",\"errorMessage\":\"ObjectId is not valid [{guid=68fb7501-63be-44c5-9e96-823314ee614a, typeName=schema}]\"}) class java.lang.IllegalArgumentException"} Here is a debug line from Atlas 21848 DEBUG org.apache.atlas.AtlasBaseClient - Request : AtlasEntityWithExtInfo{entity=AtlasEntity{AtlasStruct{typeName='s3', attributes=[schema:[AtlasObjectId{guid='68fb7501-63be-44c5-9e96-823314ee614a', typeName='schema', uniqueAttributes={}}], awsRegion:us-east-1 ....} You can see that I am sending AtlasObjectId as before. I don't understand why this is suddenly happening, I looked at the examples in QuickStartV2 and for references it is still constructing `AtlasObjectId` in the same way with the guid and typeName, so why are my AtlasObjectId's now invalid? Connie
