Re: Review Request 62437: RANGER-1779 : last resource gets duplicated during update policy if policy is created through public api rest call

2017-09-27 Thread Velmurugan Periasamy

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


Ship it!




Ship It!

- Velmurugan Periasamy


On Sept. 27, 2017, 10:11 a.m., Nikhil P wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62437/
> ---
> 
> (Updated Sept. 27, 2017, 10:11 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay 
> Kulkarni, Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan 
> Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1779
> https://issues.apache.org/jira/browse/RANGER-1779
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> 1) create a policy with multiple resource *,default using public api
> 2) go to ranger admin ui and update the policy without any change
> 3) again view the policy.
> Issue:
> default gets duplicated as resource in the policy.
> and even new entry is added in resource map table for the last resource.
> 
> 
> Diffs
> -
> 
>   security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
> 63fdf4f 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchForNifiResourceUpdateExclude_J10008.java
>  634082c 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchForNifiResourceUpdateExclude_J10011.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/62437/diff/4/
> 
> 
> Testing
> ---
> 
> 1)Verified if same resource does not get duplicated during create and update 
> policy.
> 2)Verified if resource duplication does not happen through public API and 
> Public APIv2 as well.
> 3)Verified if policies are getting created with multiple distinct resource.
> 
> 
> Thanks,
> 
> Nikhil P
> 
>



Re: Review Request 62437: RANGER-1779 : last resource gets duplicated during update policy if policy is created through public api rest call

2017-09-27 Thread Alejandro Fernandez

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




security-admin/src/main/java/org/apache/ranger/patch/PatchForNifiResourceUpdateExclude_J10011.java
Lines 108 (patched)


Might want to add some javadoc


- Alejandro Fernandez


On Sept. 27, 2017, 10:11 a.m., Nikhil P wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62437/
> ---
> 
> (Updated Sept. 27, 2017, 10:11 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay 
> Kulkarni, Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan 
> Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1779
> https://issues.apache.org/jira/browse/RANGER-1779
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> 1) create a policy with multiple resource *,default using public api
> 2) go to ranger admin ui and update the policy without any change
> 3) again view the policy.
> Issue:
> default gets duplicated as resource in the policy.
> and even new entry is added in resource map table for the last resource.
> 
> 
> Diffs
> -
> 
>   security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
> 63fdf4f 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchForNifiResourceUpdateExclude_J10008.java
>  634082c 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchForNifiResourceUpdateExclude_J10011.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/62437/diff/4/
> 
> 
> Testing
> ---
> 
> 1)Verified if same resource does not get duplicated during create and update 
> policy.
> 2)Verified if resource duplication does not happen through public API and 
> Public APIv2 as well.
> 3)Verified if policies are getting created with multiple distinct resource.
> 
> 
> Thanks,
> 
> Nikhil P
> 
>



Re: Review Request 62437: RANGER-1779 : last resource gets duplicated during update policy if policy is created through public api rest call

2017-09-27 Thread Nikhil P

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

(Updated Sept. 27, 2017, 3:41 p.m.)


Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay 
Kulkarni, Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, 
Sailaja Polavarapu, and Velmurugan Periasamy.


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


Repository: ranger


Description
---

1) create a policy with multiple resource *,default using public api
2) go to ranger admin ui and update the policy without any change
3) again view the policy.
Issue:
default gets duplicated as resource in the policy.
and even new entry is added in resource map table for the last resource.


Diffs (updated)
-

  security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
63fdf4f 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchForNifiResourceUpdateExclude_J10008.java
 634082c 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchForNifiResourceUpdateExclude_J10011.java
 PRE-CREATION 


Diff: https://reviews.apache.org/r/62437/diff/4/

Changes: https://reviews.apache.org/r/62437/diff/3-4/


Testing
---

1)Verified if same resource does not get duplicated during create and update 
policy.
2)Verified if resource duplication does not happen through public API and 
Public APIv2 as well.
3)Verified if policies are getting created with multiple distinct resource.


Thanks,

Nikhil P



Re: Review Request 62437: RANGER-1779 : last resource gets duplicated during update policy if policy is created through public api rest call

2017-09-26 Thread Nikhil P

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

(Updated Sept. 26, 2017, 10:03 p.m.)


Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay 
Kulkarni, Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, 
Sailaja Polavarapu, and Velmurugan Periasamy.


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


Repository: ranger


Description
---

1) create a policy with multiple resource *,default using public api
2) go to ranger admin ui and update the policy without any change
3) again view the policy.
Issue:
default gets duplicated as resource in the policy.
and even new entry is added in resource map table for the last resource.


Diffs (updated)
-

  security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
63fdf4f 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchForNifiResourceUpdateExclude_J10008.java
 634082c 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchForNifiResourceUpdateExclude_J10010.java
 PRE-CREATION 


Diff: https://reviews.apache.org/r/62437/diff/3/

Changes: https://reviews.apache.org/r/62437/diff/2-3/


Testing
---

1)Verified if same resource does not get duplicated during create and update 
policy.
2)Verified if resource duplication does not happen through public API and 
Public APIv2 as well.
3)Verified if policies are getting created with multiple distinct resource.


Thanks,

Nikhil P



Re: Review Request 62437: RANGER-1779 : last resource gets duplicated during update policy if policy is created through public api rest call

2017-09-21 Thread Nikhil P

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

(Updated Sept. 21, 2017, 6:50 p.m.)


Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay 
Kulkarni, Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, 
Sailaja Polavarapu, and Velmurugan Periasamy.


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


Repository: ranger


Description
---

1) create a policy with multiple resource *,default using public api
2) go to ranger admin ui and update the policy without any change
3) again view the policy.
Issue:
default gets duplicated as resource in the policy.
and even new entry is added in resource map table for the last resource.


Diffs (updated)
-

  security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
63fdf4f 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchForNifiResourceUpdateExclude_J10008.java
 634082c 


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

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


Testing
---

1)Verified if same resource does not get duplicated during create and update 
policy.
2)Verified if resource duplication does not happen through public API and 
Public APIv2 as well.
3)Verified if policies are getting created with multiple distinct resource.


Thanks,

Nikhil P



Re: Review Request 62437: RANGER-1779 : last resource gets duplicated during update policy if policy is created through public api rest call

2017-09-20 Thread Ramesh Mani

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




security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java
Line 2929 (original), 2930 (patched)


Please conside doing Set uniqueValues = new 
LinkedHashSet<>(values); and remove the code for finding the uniqueValues.
You can trim the output later when you sent it if needed.


- Ramesh Mani


On Sept. 20, 2017, 12:53 p.m., Nikhil P wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62437/
> ---
> 
> (Updated Sept. 20, 2017, 12:53 p.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay 
> Kulkarni, Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan 
> Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1779
> https://issues.apache.org/jira/browse/RANGER-1779
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> 1) create a policy with multiple resource *,default using public api
> 2) go to ranger admin ui and update the policy without any change
> 3) again view the policy.
> Issue:
> default gets duplicated as resource in the policy.
> and even new entry is added in resource map table for the last resource.
> 
> 
> Diffs
> -
> 
>   security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
> 63fdf4f 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchForNifiResourceUpdateExclude_J10008.java
>  634082c 
> 
> 
> Diff: https://reviews.apache.org/r/62437/diff/1/
> 
> 
> Testing
> ---
> 
> 1)Verified if same resource does not get duplicated during create and update 
> policy.
> 2)Verified if resource duplication does not happen through public API and 
> Public APIv2 as well.
> 3)Verified if policies are getting created with multiple distinct resource.
> 
> 
> Thanks,
> 
> Nikhil P
> 
>



Review Request 62437: RANGER-1779 : last resource gets duplicated during update policy if policy is created through public api rest call

2017-09-20 Thread Nikhil P

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

Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay 
Kulkarni, Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, 
Sailaja Polavarapu, and Velmurugan Periasamy.


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


Repository: ranger


Description
---

1) create a policy with multiple resource *,default using public api
2) go to ranger admin ui and update the policy without any change
3) again view the policy.
Issue:
default gets duplicated as resource in the policy.
and even new entry is added in resource map table for the last resource.


Diffs
-

  security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
63fdf4f 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchForNifiResourceUpdateExclude_J10008.java
 634082c 


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


Testing
---

1)Verified if same resource does not get duplicated during create and update 
policy.
2)Verified if resource duplication does not happen through public API and 
Public APIv2 as well.
3)Verified if policies are getting created with multiple distinct resource.


Thanks,

Nikhil P