[
https://issues.apache.org/jira/browse/ATLAS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Madhan Neethiraj resolved ATLAS-362.
------------------------------------
Resolution: Cannot Reproduce
This issue doesn't reproduce any more; and the referenced code is no more
present in Atlas.
> Non-String map keys allowed in type definition but cause error when storing
> entity
> ----------------------------------------------------------------------------------
>
> Key: ATLAS-362
> URL: https://issues.apache.org/jira/browse/ATLAS-362
> Project: Atlas
> Issue Type: Bug
> Affects Versions: 0.6-incubating
> Reporter: Dave Kantor
> Priority: Minor
>
> Atlas currently lets you define map types as having an arbitrary type for the
> key and the value. A type with map attribute with a non-string key can be
> registered without any problem. However, if you use anything other than a
> string as the key type and try to store a value in the map type you get an
> exception. Atlas should either correctly handle non-string keys or throw an
> exception when trying to register a type with a map attribute that uses a
> non-string key type.
> In our case, we created a type with an attribute of type map<byte,byte>
> without any error. However, storing entities with this attribute set fails
> with the following exception:
> java.lang.ClassCastException: java.lang.Byte incompatible with
> java.lang.String
> at
> org.apache.atlas.repository.graph.GraphBackedMetadataRepository$GraphToTypedInstanceMapper.mapVertexToMapInstance(GraphBackedMetadataRepository.java:1111)
> at
> org.apache.atlas.repository.graph.GraphBackedMetadataRepository$GraphToTypedInstanceMapper.mapVertexToAttribute(GraphBackedMetadataRepository.java:1002)
> at
> org.apache.atlas.repository.graph.GraphBackedMetadataRepository$GraphToTypedInstanceMapper.mapVertexToInstance(GraphBackedMetadataRepository.java:971)
> at
> org.apache.atlas.repository.graph.GraphBackedMetadataRepository$GraphToTypedInstanceMapper.mapGraphToTypedInstance(GraphBackedMetadataRepository.java:950)
> at
> org.apache.atlas.repository.graph.GraphBackedMetadataRepository$TypedInstanceToGraphMapper.getFullTextForVertex(GraphBackedMetadataRepository.java:522)
> at
> org.apache.atlas.repository.graph.GraphBackedMetadataRepository$TypedInstanceToGraphMapper.addFullTextProperty(GraphBackedMetadataRepository.java:515)
> at
> org.apache.atlas.repository.graph.GraphBackedMetadataRepository$TypedInstanceToGraphMapper.mapTypedInstanceToGraph(GraphBackedMetadataRepository.java:499)
> at
> org.apache.atlas.repository.graph.GraphBackedMetadataRepository$TypedInstanceToGraphMapper.access$100(GraphBackedMetadataRepository.java:471)
> at
> org.apache.atlas.repository.graph.GraphBackedMetadataRepository.createEntities(GraphBackedMetadataRepository.java:154)
> at
> org.apache.atlas.GraphTransactionInterceptor.invoke(GraphTransactionInterceptor.java:42)
> at
> org.apache.atlas.services.DefaultMetadataService.createEntities(DefaultMetadataService.java:251)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)