You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by chaitali <ch...@freestoneinfotech.com> on 2020/10/09 10:45:55 UTC
Review Request 72943: ATLAS-3988 : REST GET entity API with type's
GUID throws NPE
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72943/
-----------------------------------------------------------
Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath Subramanian.
Bugs: ATLAS-3988
https://issues.apache.org/jira/browse/ATLAS-3988
Repository: atlas
Description
-------
Issue :
GET on /api/atlas/v2/entity/guid/<invalid_GUID> throws invalid GUID exception.
BUT GET on /api/atlas/v2/entity/guid/<valid_type_GUID> throws NPE.
2020-01-14 02:19:07,272 ERROR - [pool-2-thread-3 - a0b7457e-d43f-4fca-9581-8db695ef7af3:] ~ graph rollback due to exception (GraphTransactionInterceptor:167)
java.lang.NullPointerException
at org.apache.atlas.type.AtlasTypeRegistry.getType(AtlasTypeRegistry.java:94)
at org.apache.atlas.repository.store.graph.v2.EntityGraphRetriever.mapAttributes(EntityGraphRetriever.java:608)
at org.apache.atlas.repository.store.graph.v2.EntityGraphRetriever.mapVertexToAtlasEntity(EntityGraphRetriever.java:448)
This patch fixes the issue by adding a null check for typename exists or not for the guid passed.
Diffs
-----
intg/src/main/java/org/apache/atlas/AtlasErrorCode.java a14e43a1e
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 00146b106
Diff: https://reviews.apache.org/r/72943/diff/1/
Testing
-------
Tested with GET call GET on /api/atlas/v2/entity/guid/<invalid_GUID> by passing typename guid to this entity call.
Thanks,
chaitali