Re: Review Request 65828: Update tagsync to handle Atlas notifications of type V1 and V2

2018-02-28 Thread Abhay Kulkarni


> On Feb. 28, 2018, 6:28 a.m., Madhan Neethiraj wrote:
> > tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/EntityNotificationWrapper.java
> > Lines 47 (patched)
> > 
> >
> > Consider extracting fields in the constructor itself and storing them 
> > as members, so that accessor methods can simply return them:
> > - RangerAtlasEntityentity;
> > - String   entityTypeName;
> > - entityNotificationType   notificationType;
> > - Map> allClassifications;
> > - boolean  isEntityTypeHandled;
> > - boolean  isEntityDeleteOp;

Added following data items as members and initialized them in the constructor. 
Provided accessors for these members.

RangerAtlasEntity rangerAtlasEntity;
String entityTypeName;
EntityNotification.EntityNotificationType notificationType;
boolean isEntityTypeHandled;
boolean isEntityDeleteOp;
boolean isEmptyClassifications;


- Abhay


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


On Feb. 28, 2018, 3:11 a.m., Abhay Kulkarni wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65828/
> ---
> 
> (Updated Feb. 28, 2018, 3:11 a.m.)
> 
> 
> Review request for ranger and Madhan Neethiraj.
> 
> 
> Bugs: RANGER-1997
> https://issues.apache.org/jira/browse/RANGER-1997
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Atlas is upgraded to emit more efficient Entity Notifications (of type V2). 
> Tagsync is updated to handle them.
> 
> 
> Diffs
> -
> 
>   
> tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java
>  91cf606af 
>   
> tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasTagSource.java
>  8c15ee58b 
>   
> tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/EntityNotificationWrapper.java
>  PRE-CREATION 
>   
> tagsync/src/main/java/org/apache/ranger/tagsync/source/atlasrest/RangerAtlasEntityWithTags.java
>  b25a24127 
> 
> 
> Diff: https://reviews.apache.org/r/65828/diff/1/
> 
> 
> Testing
> ---
> 
> Tested with local VM
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>



Re: Review Request 65828: Update tagsync to handle Atlas notifications of type V1 and V2

2018-02-28 Thread Abhay Kulkarni

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

(Updated Feb. 28, 2018, 8:40 p.m.)


Review request for ranger and Madhan Neethiraj.


Changes
---

Addressed review comments


Bugs: RANGER-1997
https://issues.apache.org/jira/browse/RANGER-1997


Repository: ranger


Description
---

Atlas is upgraded to emit more efficient Entity Notifications (of type V2). 
Tagsync is updated to handle them.


Diffs (updated)
-

  
tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java
 91cf606af 
  
tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasTagSource.java
 8c15ee58b 
  
tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/EntityNotificationWrapper.java
 PRE-CREATION 
  
tagsync/src/main/java/org/apache/ranger/tagsync/source/atlasrest/RangerAtlasEntityWithTags.java
 b25a24127 


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

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


Testing
---

Tested with local VM


Thanks,

Abhay Kulkarni



Re: Review Request 65828: Update tagsync to handle Atlas notifications of type V1 and V2

2018-02-27 Thread Madhan Neethiraj

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


Fix it, then Ship it!





tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/EntityNotificationWrapper.java
Lines 47 (patched)


Consider extracting fields in the constructor itself and storing them as 
members, so that accessor methods can simply return them:
- RangerAtlasEntityentity;
- String   entityTypeName;
- entityNotificationType   notificationType;
- Map> allClassifications;
- boolean  isEntityTypeHandled;
- boolean  isEntityDeleteOp;



tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/EntityNotificationWrapper.java
Lines 158 (patched)


allClassifications could be null. Please update to handle this case.



tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/EntityNotificationWrapper.java
Lines 176 (patched)


allTraits could be null. Please update to handle this case.


- Madhan Neethiraj


On Feb. 28, 2018, 3:11 a.m., Abhay Kulkarni wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65828/
> ---
> 
> (Updated Feb. 28, 2018, 3:11 a.m.)
> 
> 
> Review request for ranger and Madhan Neethiraj.
> 
> 
> Bugs: RANGER-1997
> https://issues.apache.org/jira/browse/RANGER-1997
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Atlas is upgraded to emit more efficient Entity Notifications (of type V2). 
> Tagsync is updated to handle them.
> 
> 
> Diffs
> -
> 
>   
> tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java
>  91cf606af 
>   
> tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasTagSource.java
>  8c15ee58b 
>   
> tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/EntityNotificationWrapper.java
>  PRE-CREATION 
>   
> tagsync/src/main/java/org/apache/ranger/tagsync/source/atlasrest/RangerAtlasEntityWithTags.java
>  b25a24127 
> 
> 
> Diff: https://reviews.apache.org/r/65828/diff/1/
> 
> 
> Testing
> ---
> 
> Tested with local VM
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>



Review Request 65828: Update tagsync to handle Atlas notifications of type V1 and V2

2018-02-27 Thread Abhay Kulkarni

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

Review request for ranger and Madhan Neethiraj.


Bugs: RANGER-1997
https://issues.apache.org/jira/browse/RANGER-1997


Repository: ranger


Description
---

Atlas is upgraded to emit more efficient Entity Notifications (of type V2). 
Tagsync is updated to handle them.


Diffs
-

  
tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java
 91cf606af 
  
tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasTagSource.java
 8c15ee58b 
  
tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/EntityNotificationWrapper.java
 PRE-CREATION 
  
tagsync/src/main/java/org/apache/ranger/tagsync/source/atlasrest/RangerAtlasEntityWithTags.java
 b25a24127 


Diff: https://reviews.apache.org/r/65828/diff/1/


Testing
---

Tested with local VM


Thanks,

Abhay Kulkarni