Re: Review Request 72943: ATLAS-3988 : REST GET entity API with type's GUID throws NPE

2020-11-03 Thread Ashutosh Mestry via Review Board

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72943/#review222164
---




intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
Line 173 (original)


nit: Blank change.


- Ashutosh Mestry


On Oct. 21, 2020, 6:51 a.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72943/
> ---
> 
> (Updated Oct. 21, 2020, 6:51 a.m.)
> 
> 
> Review request for atlas, Jayendra Parab, 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/ throws invalid GUID exception.
> 
> BUT GET on /api/atlas/v2/entity/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
>  2199277ad 
> 
> 
> Diff: https://reviews.apache.org/r/72943/diff/2/
> 
> 
> Testing
> ---
> 
> Tested with GET call GET on /api/atlas/v2/entity/guid/  by 
> passing typename guid to this entity call.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72943: ATLAS-3988 : REST GET entity API with type's GUID throws NPE

2020-11-03 Thread Nixon Rodrigues

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72943/#review222163
---


Ship it!




Ship It!

- Nixon Rodrigues


On Oct. 21, 2020, 6:51 a.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72943/
> ---
> 
> (Updated Oct. 21, 2020, 6:51 a.m.)
> 
> 
> Review request for atlas, Jayendra Parab, 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/ throws invalid GUID exception.
> 
> BUT GET on /api/atlas/v2/entity/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
>  2199277ad 
> 
> 
> Diff: https://reviews.apache.org/r/72943/diff/2/
> 
> 
> Testing
> ---
> 
> Tested with GET call GET on /api/atlas/v2/entity/guid/  by 
> passing typename guid to this entity call.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72943: ATLAS-3988 : REST GET entity API with type's GUID throws NPE

2020-11-03 Thread Nixon Rodrigues

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72943/#review222162
---


Ship it!




Ship It!

- Nixon Rodrigues


On Oct. 21, 2020, 6:51 a.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72943/
> ---
> 
> (Updated Oct. 21, 2020, 6:51 a.m.)
> 
> 
> Review request for atlas, Jayendra Parab, 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/ throws invalid GUID exception.
> 
> BUT GET on /api/atlas/v2/entity/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
>  2199277ad 
> 
> 
> Diff: https://reviews.apache.org/r/72943/diff/2/
> 
> 
> Testing
> ---
> 
> Tested with GET call GET on /api/atlas/v2/entity/guid/  by 
> passing typename guid to this entity call.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72943: ATLAS-3988 : REST GET entity API with type's GUID throws NPE

2020-10-21 Thread Sarath Subramanian

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72943/#review222096
---


Ship it!




Ship It!

- Sarath Subramanian


On Oct. 20, 2020, 11:51 p.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72943/
> ---
> 
> (Updated Oct. 20, 2020, 11:51 p.m.)
> 
> 
> Review request for atlas, Jayendra Parab, 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/ throws invalid GUID exception.
> 
> BUT GET on /api/atlas/v2/entity/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
>  2199277ad 
> 
> 
> Diff: https://reviews.apache.org/r/72943/diff/2/
> 
> 
> Testing
> ---
> 
> Tested with GET call GET on /api/atlas/v2/entity/guid/  by 
> passing typename guid to this entity call.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72943: ATLAS-3988 : REST GET entity API with type's GUID throws NPE

2020-10-21 Thread chaitali

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72943/
---

(Updated Oct. 21, 2020, 6:51 a.m.)


Review request for atlas, Jayendra Parab, 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/ throws invalid GUID exception.

BUT GET on /api/atlas/v2/entity/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 (updated)
-

  intg/src/main/java/org/apache/atlas/AtlasErrorCode.java a14e43a1e 
  
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
 2199277ad 


Diff: https://reviews.apache.org/r/72943/diff/2/

Changes: https://reviews.apache.org/r/72943/diff/1-2/


Testing
---

Tested with GET call GET on /api/atlas/v2/entity/guid/  by 
passing typename guid to this entity call.


Thanks,

chaitali



Re: Review Request 72943: ATLAS-3988 : REST GET entity API with type's GUID throws NPE

2020-10-20 Thread Sarath Subramanian

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72943/#review222088
---




repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
Lines 382 (patched)


consider replacing if condition check with:

=> StringUtils.isEmpty(GraphHelper.getTypeName(ret))


- Sarath Subramanian


On Oct. 9, 2020, 3:46 a.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72943/
> ---
> 
> (Updated Oct. 9, 2020, 3:46 a.m.)
> 
> 
> Review request for atlas, Jayendra Parab, 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/ throws invalid GUID exception.
> 
> BUT GET on /api/atlas/v2/entity/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/  by 
> passing typename guid to this entity call.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72943: ATLAS-3988 : REST GET entity API with type's GUID throws NPE

2020-10-20 Thread Sarath Subramanian

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72943/#review222087
---




intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
Lines 197 (patched)


"entityguid" => "entity with guid: {0}"


- Sarath Subramanian


On Oct. 9, 2020, 3:46 a.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72943/
> ---
> 
> (Updated Oct. 9, 2020, 3:46 a.m.)
> 
> 
> Review request for atlas, Jayendra Parab, 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/ throws invalid GUID exception.
> 
> BUT GET on /api/atlas/v2/entity/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/  by 
> passing typename guid to this entity call.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Review Request 72943: ATLAS-3988 : REST GET entity API with type's GUID throws NPE

2020-10-09 Thread chaitali

---
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/ throws invalid GUID exception.

BUT GET on /api/atlas/v2/entity/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/  by 
passing typename guid to this entity call.


Thanks,

chaitali