Re: Review Request 70456: RANGER-2374

2019-04-17 Thread Qiang Zhang

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




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


Please add license header


- Qiang Zhang


On April 11, 2019, 9 p.m., Austin Nobis wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70456/
> ---
> 
> (Updated April 11, 2019, 9 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-2374
> https://issues.apache.org/jira/browse/RANGER-2374
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Created a patch file for the Hive Service Definition to add the Refresh 
> access type. This is to support sharing a service definition between Apache 
> Hive and Apache Impala.
> 
> 
> Diffs
> -
> 
>   agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json 
> b0f877a01 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
> 2eaffccac 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
> 5ca1e3667 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
> 51f4999f7 
>   
> security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
>  5f64a2dba 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
> fc21cec3e 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchForHiveServiceDefUpdate_J10027.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70456/diff/6/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Austin Nobis
> 
>



Re: Review Request 70456: RANGER-2374

2019-04-16 Thread Ramesh Mani

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


Ship it!




Ship It!

- Ramesh Mani


On April 11, 2019, 9 p.m., Austin Nobis wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70456/
> ---
> 
> (Updated April 11, 2019, 9 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-2374
> https://issues.apache.org/jira/browse/RANGER-2374
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Created a patch file for the Hive Service Definition to add the Refresh 
> access type. This is to support sharing a service definition between Apache 
> Hive and Apache Impala.
> 
> 
> Diffs
> -
> 
>   agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json 
> b0f877a01 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
> 2eaffccac 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
> 5ca1e3667 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
> 51f4999f7 
>   
> security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
>  5f64a2dba 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
> fc21cec3e 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchForHiveServiceDefUpdate_J10027.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70456/diff/6/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Austin Nobis
> 
>



Re: Review Request 70456: RANGER-2374

2019-04-11 Thread Austin Nobis via Review Board

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

(Updated April 11, 2019, 9 p.m.)


Review request for ranger.


Changes
---

Change itemId for refresh access type.


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


Repository: ranger


Description
---

Created a patch file for the Hive Service Definition to add the Refresh access 
type. This is to support sharing a service definition between Apache Hive and 
Apache Impala.


Diffs (updated)
-

  agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json 
b0f877a01 
  security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 2eaffccac 
  security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
5ca1e3667 
  security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
51f4999f7 
  
security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 
5f64a2dba 
  security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
fc21cec3e 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchForHiveServiceDefUpdate_J10027.java
 PRE-CREATION 


Diff: https://reviews.apache.org/r/70456/diff/6/

Changes: https://reviews.apache.org/r/70456/diff/5-6/


Testing
---


Thanks,

Austin Nobis



Re: Review Request 70456: RANGER-2374

2019-04-11 Thread Ramesh Mani

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




agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json
Lines 182 (patched)


Please make the itemId:14.

Couple of JIRAs has additional permissionsto Service Def
https://issues.apache.org/jira/browse/RANGER-2389
https://issues.apache.org/jira/browse/RANGER-2391
and it using 11,12,and 13 numbers.
So I would suggest to use 14 for this change.


- Ramesh Mani


On April 11, 2019, 6:47 p.m., Austin Nobis wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70456/
> ---
> 
> (Updated April 11, 2019, 6:47 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-2374
> https://issues.apache.org/jira/browse/RANGER-2374
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Created a patch file for the Hive Service Definition to add the Refresh 
> access type. This is to support sharing a service definition between Apache 
> Hive and Apache Impala.
> 
> 
> Diffs
> -
> 
>   agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json 
> b0f877a01 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
> 2eaffccac 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
> 5ca1e3667 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
> 51f4999f7 
>   
> security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
>  5f64a2dba 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
> fc21cec3e 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchForHiveServiceDefUpdate_J10027.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70456/diff/5/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Austin Nobis
> 
>



Re: Review Request 70456: RANGER-2374

2019-04-11 Thread Austin Nobis via Review Board

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

(Updated April 11, 2019, 6:47 p.m.)


Review request for ranger.


Changes
---

Add short circuit fail for null xXServiceDefObj.


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


Repository: ranger


Description
---

Created a patch file for the Hive Service Definition to add the Refresh access 
type. This is to support sharing a service definition between Apache Hive and 
Apache Impala.


Diffs (updated)
-

  agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json 
b0f877a01 
  security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 2eaffccac 
  security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
5ca1e3667 
  security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
51f4999f7 
  
security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 
5f64a2dba 
  security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
fc21cec3e 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchForHiveServiceDefUpdate_J10027.java
 PRE-CREATION 


Diff: https://reviews.apache.org/r/70456/diff/5/

Changes: https://reviews.apache.org/r/70456/diff/4-5/


Testing
---


Thanks,

Austin Nobis



Re: Review Request 70456: RANGER-2374

2019-04-11 Thread Austin Nobis via Review Board

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

(Updated April 11, 2019, 6:43 p.m.)


Review request for ranger.


Changes
---

Fix "all" access type impliedGrants.


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


Repository: ranger


Description
---

Created a patch file for the Hive Service Definition to add the Refresh access 
type. This is to support sharing a service definition between Apache Hive and 
Apache Impala.


Diffs (updated)
-

  agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json 
b0f877a01 
  security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 2eaffccac 
  security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
5ca1e3667 
  security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
51f4999f7 
  
security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 
5f64a2dba 
  security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
fc21cec3e 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchForHiveServiceDefUpdate_J10027.java
 PRE-CREATION 


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

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


Testing
---


Thanks,

Austin Nobis



Re: Review Request 70456: RANGER-2374

2019-04-11 Thread Austin Nobis via Review Board

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

(Updated April 11, 2019, 6:42 p.m.)


Review request for ranger.


Changes
---

Address Ramesh and Velmurugan comments.


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


Repository: ranger


Description
---

Created a patch file for the Hive Service Definition to add the Refresh access 
type. This is to support sharing a service definition between Apache Hive and 
Apache Impala.


Diffs (updated)
-

  agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json 
b0f877a01 
  security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 2eaffccac 
  security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
5ca1e3667 
  security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
51f4999f7 
  
security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 
5f64a2dba 
  security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
fc21cec3e 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchForHiveServiceDefUpdate_J10027.java
 PRE-CREATION 


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

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


Testing
---


Thanks,

Austin Nobis



Re: Review Request 70456: RANGER-2374

2019-04-11 Thread Velmurugan Periasamy

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




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


-- Usually the patches are also added in consolidated db script. Please 
take a look at 
security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql as an 
example. This needs to be done in all DB flavors. 
-- Are you not planning to update hive service definition also 
./agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json ?


- Velmurugan Periasamy


On April 11, 2019, 5:06 p.m., Austin Nobis wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70456/
> ---
> 
> (Updated April 11, 2019, 5:06 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-2374
> https://issues.apache.org/jira/browse/RANGER-2374
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Created a patch file for the Hive Service Definition to add the Refresh 
> access type. This is to support sharing a service definition between Apache 
> Hive and Apache Impala.
> 
> 
> Diffs
> -
> 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchForHiveServiceDefUpdate_J10027.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70456/diff/2/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Austin Nobis
> 
>



Re: Review Request 70456: RANGER-2374

2019-04-11 Thread Ramesh Mani

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




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


Since the JIRA is for adding Refresh access Type, we should have this 
access Type added in Service Definition

https://github.com/apache/ranger/blob/master/agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json


- Ramesh Mani


On April 11, 2019, 5:06 p.m., Austin Nobis wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70456/
> ---
> 
> (Updated April 11, 2019, 5:06 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-2374
> https://issues.apache.org/jira/browse/RANGER-2374
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Created a patch file for the Hive Service Definition to add the Refresh 
> access type. This is to support sharing a service definition between Apache 
> Hive and Apache Impala.
> 
> 
> Diffs
> -
> 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchForHiveServiceDefUpdate_J10027.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70456/diff/2/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Austin Nobis
> 
>



Re: Review Request 70456: RANGER-2374

2019-04-11 Thread Austin Nobis via Review Board

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

(Updated April 11, 2019, 5:06 p.m.)


Review request for ranger.


Changes
---

Address Abhay's comments


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


Repository: ranger


Description
---

Created a patch file for the Hive Service Definition to add the Refresh access 
type. This is to support sharing a service definition between Apache Hive and 
Apache Impala.


Diffs (updated)
-

  
security-admin/src/main/java/org/apache/ranger/patch/PatchForHiveServiceDefUpdate_J10027.java
 PRE-CREATION 


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

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


Testing
---


Thanks,

Austin Nobis



Re: Review Request 70456: RANGER-2374

2019-04-11 Thread Abhay Kulkarni

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




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


If xXServiceDefObj is null (hive-service-definition does not exist in the 
database), should the patch flag error and fail (by throwing exception)? It is 
not supposed to happen, right?



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


Same as comment for line 116. Further, on line 139, NPE may be thrown if 
dbHiveServiceDef is null.



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


Are lines 128-130 necessary? The only expected change is for Access-Types. 
Resource-Definitions are not expected to change for this patch. We should 
preserve Resource-Definitions across this migration.



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


If embeddedHiveAccessTypes is expected to be null, method 
checkNewAccessTypesPresent() - line 170 - does not seem to consider that. 
Please review.



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


Same comment as before (lines 116, 123).


- Abhay Kulkarni


On April 11, 2019, 2:32 p.m., Austin Nobis wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70456/
> ---
> 
> (Updated April 11, 2019, 2:32 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-2374
> https://issues.apache.org/jira/browse/RANGER-2374
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Created a patch file for the Hive Service Definition to add the Refresh 
> access type. This is to support sharing a service definition between Apache 
> Hive and Apache Impala.
> 
> 
> Diffs
> -
> 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchForHiveServiceDefUpdate_J10027.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70456/diff/1/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Austin Nobis
> 
>



Review Request 70456: RANGER-2374

2019-04-11 Thread Austin Nobis via Review Board

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

Review request for ranger.


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


Repository: ranger


Description
---

Created a patch file for the Hive Service Definition to add the Refresh access 
type. This is to support sharing a service definition between Apache Hive and 
Apache Impala.


Diffs
-

  
security-admin/src/main/java/org/apache/ranger/patch/PatchForHiveServiceDefUpdate_J10027.java
 PRE-CREATION 


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


Testing
---


Thanks,

Austin Nobis