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

Creation of type with attributes having nested collection datatype fails

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8.1
    • 0.8.2, 1.0.0
    • atlas-core
    • None

    Description

      Attempts to create a type with attributes having nested collection datatype, like map<string,array<string>> fails with the following error in Atlas log:

      2018-01-02 21:14:25,954 ERROR - [pool-2-thread-6 - 0b384d25-de77-4e6b-a05d-e997c8e46f41:] ~ Failed to restore type-system after TypeRegistry changes (DefaultMetadataService:829)
      org.apache.atlas.typesystem.exception.TypeNotFoundException: Unknown datatype: map<string,array<string>>
              at org.apache.atlas.typesystem.types.TypeSystem.getDataType(TypeSystem.java:189)
              at org.apache.atlas.typesystem.types.TypeSystem$TransientTypeSystem.getDataType(TypeSystem.java:695)
              at org.apache.atlas.typesystem.types.TypeSystem.getDataType(TypeSystem.java:194)
              at org.apache.atlas.typesystem.types.AttributeInfo.<init>(AttributeInfo.java:47)
              at org.apache.atlas.typesystem.types.TypeSystem$TransientTypeSystem.constructAttributeInfo(TypeSystem.java:525)
              at org.apache.atlas.typesystem.types.TypeSystem$TransientTypeSystem.constructHierarchicalType(TypeSystem.java:569)
              at org.apache.atlas.typesystem.types.TypeSystem$TransientTypeSystem.orderAndConstructTypes(TypeSystem.java:612)
              at org.apache.atlas.typesystem.types.TypeSystem$TransientTypeSystem.verifyTypes(TypeSystem.java:735)
              at org.apache.atlas.typesystem.types.TypeSystem.createTransientTypeSystem(TypeSystem.java:353)
              at org.apache.atlas.services.DefaultMetadataService.onChange(DefaultMetadataService.java:823)
              at org.apache.atlas.repository.store.graph.AtlasTypeDefGraphStore$TypeRegistryUpdateHook.notifyListeners(AtlasTypeDefGraphStore.java:848)
              at org.apache.atlas.repository.store.graph.AtlasTypeDefGraphStore$TypeRegistryUpdateHook.onComplete(AtlasTypeDefGraphStore.java:832)
              at org.apache.atlas.GraphTransactionInterceptor.invoke(GraphTransactionInterceptor.java:77)
              at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:77)
              at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55)
              at org.apache.atlas.repository.store.graph.v1.AtlasTypeDefGraphStoreV1$$EnhancerByGuice$$7922922.createTypesDef(<generated>)
              at org.apache.atlas.web.rest.TypesREST.createAtlasTypeDefs(TypesREST.java:296)
              at org.apache.atlas.web.resources.TypesResource.submit(TypesResource.java:109)
      

      Here is the sample typedef JSON:

      {
        "classTypes": [
          {
            "typeName":                 "ComplexEntity",
            "hierarchicalMetaTypeName": "org.apache.atlas.typesystem.types.ClassType",
            "superTypes":               [ "Referenceable" ],
            "typeDescription":          null,
            "attributeDefinitions": [
              {
                "name":         "mapOfArrays",
                "dataTypeName": "map<string,array<string>>",
                "multiplicity": "optional",
                "isComposite":  false,
                "isUnique":     false,
                "isIndexable":  false,
                "reverseAttributeName": null
              }
            ]
          }
        ],
        "enumTypes": [],
        "structTypes": [],
        "traitTypes": []
      }
      

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            madhan Madhan Neethiraj
            madhan Madhan Neethiraj
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment