Re: Review Request 73643: RANGER-3182 Rename Prestosql to trino and fix classpath errors

2021-10-10 Thread Aakash Nand

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

(Updated Oct. 11, 2021, 5:03 a.m.)


Review request for ranger.


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


Repository: ranger


Description
---

Hi,
I have created a patch which migrates existing prestosql references to 
rebranded trino. I have also fixed some classpath errors in 
ranger-trino-plugin. This ensures the plugin works with new Trino version 361.


Diffs
-

  agents-common/scripts/enable-agent.sh ad021feee 
  
agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java
 7775b0871 
  agents-common/src/main/resources/log4j.properties PRE-CREATION 
  agents-common/src/main/resources/service-defs/ranger-servicedef-presto.json 
b16b02a7b 
  distro/pom.xml 0c65df251 
  distro/src/main/assembly/admin-web.xml 3fc054d7c 
  distro/src/main/assembly/plugin-presto.xml 3043777d6 
  plugin-presto/.gitignore  
  plugin-presto/conf/ranger-policymgr-ssl-changes.cfg  
  plugin-presto/conf/ranger-policymgr-ssl.xml 5ac7cf14c 
  plugin-presto/conf/ranger-presto-audit-changes.cfg  
  plugin-presto/conf/ranger-presto-audit.xml d335974f2 
  plugin-presto/conf/ranger-presto-security-changes.cfg 5a89cfa2d 
  plugin-presto/conf/ranger-presto-security.xml 9feae81a6 
  plugin-presto/pom.xml 3246eda1c 
  plugin-presto/scripts/install.properties 956533571 
  
plugin-presto/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControl.java
 f9f3e4fb5 
  
plugin-presto/src/main/java/org/apache/ranger/services/presto/RangerServicePresto.java
 164b8f930 
  
plugin-presto/src/main/java/org/apache/ranger/services/presto/client/PrestoClient.java
 352979381 
  
plugin-presto/src/main/java/org/apache/ranger/services/presto/client/PrestoConnectionManager.java
 4a642ea51 
  
plugin-presto/src/main/java/org/apache/ranger/services/presto/client/PrestoResourceManager.java
 c9f38266e 
  
plugin-presto/src/test/java/org/apache/ranger/authorization/presto/authorizer/RangerAdminClientImpl.java
 bcfaef05e 
  
plugin-presto/src/test/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControlTest.java
 ed8c837d5 
  plugin-presto/src/test/resources/log4j.properties  
  plugin-presto/src/test/resources/presto-policies.json 6dbaabb1c 
  plugin-presto/src/test/resources/ranger-presto-security.xml 8a1923d4d 
  plugin-trino/conf/ranger-trino-security-changes.cfg PRE-CREATION 
  pom.xml 626591d60 
  ranger-presto-plugin-shim/.gitignore  
  ranger-presto-plugin-shim/pom.xml 4117b0388 
  
ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/PrestoRangerPlugin.java
 fe707726d 
  
ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerConfig.java
 e0ab0f3ee 
  
ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControl.java
 40638701f 
  
ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControlFactory.java
 e446ada03 
  
ranger-presto-plugin-shim/src/main/resources/META-INF/services/io.prestosql.spi.Plugin
 ff40776aa 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchForPrestoToSupportPresto333_J10038.java
 f64773303 


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


Testing (updated)
---

For testing 
Along with this patch I built the ranger from source using master branch and 
tested by creating trino policies. It is working as expected.


Thanks,

Aakash Nand



[jira] [Commented] (RANGER-3182) Prestosql is renamed to Trino

2021-10-10 Thread Aakash Nand (Jira)


[ 
https://issues.apache.org/jira/browse/RANGER-3182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17426952#comment-17426952
 ] 

Aakash Nand commented on RANGER-3182:
-

I have submitted a review request here. Please review 
https://reviews.apache.org/r/73643/

> Prestosql is renamed to Trino
> -
>
> Key: RANGER-3182
> URL: https://issues.apache.org/jira/browse/RANGER-3182
> Project: Ranger
>  Issue Type: Improvement
>  Components: plugins
>Affects Versions: 2.1.0
>Reporter: Viacheslav Kriuchkov
>Priority: Blocker
> Attachments: 0001-RANGER-3182-Rename-Prestosql-to-Trino.patch, 
> ranger-commons-lang3-master.patch
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> All "prestosql" classes are "trino" now and Presto plugin can't integrate 
> with Trino because of that. It means all Presto deployments that use Ranger 
> are stuck on version 350 and can't upgrade further.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (RANGER-3182) Prestosql is renamed to Trino

2021-10-10 Thread Aakash Nand (Jira)


 [ 
https://issues.apache.org/jira/browse/RANGER-3182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aakash Nand updated RANGER-3182:

Attachment: 0001-RANGER-3182-Rename-Prestosql-to-Trino.patch

> Prestosql is renamed to Trino
> -
>
> Key: RANGER-3182
> URL: https://issues.apache.org/jira/browse/RANGER-3182
> Project: Ranger
>  Issue Type: Improvement
>  Components: plugins
>Affects Versions: 2.1.0
>Reporter: Viacheslav Kriuchkov
>Priority: Blocker
> Attachments: 0001-RANGER-3182-Rename-Prestosql-to-Trino.patch, 
> ranger-commons-lang3-master.patch
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> All "prestosql" classes are "trino" now and Presto plugin can't integrate 
> with Trino because of that. It means all Presto deployments that use Ranger 
> are stuck on version 350 and can't upgrade further.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (RANGER-3182) Prestosql is renamed to Trino

2021-10-10 Thread Aakash Nand (Jira)


 [ 
https://issues.apache.org/jira/browse/RANGER-3182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aakash Nand updated RANGER-3182:

Attachment: (was: 
0001-RANGER-3182-Rename-Presto-to-Trino-3.0.0-master.patch)

> Prestosql is renamed to Trino
> -
>
> Key: RANGER-3182
> URL: https://issues.apache.org/jira/browse/RANGER-3182
> Project: Ranger
>  Issue Type: Improvement
>  Components: plugins
>Affects Versions: 2.1.0
>Reporter: Viacheslav Kriuchkov
>Priority: Blocker
> Attachments: ranger-commons-lang3-master.patch
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> All "prestosql" classes are "trino" now and Presto plugin can't integrate 
> with Trino because of that. It means all Presto deployments that use Ranger 
> are stuck on version 350 and can't upgrade further.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (RANGER-3182) Prestosql is renamed to Trino

2021-10-10 Thread Aakash Nand (Jira)


 [ 
https://issues.apache.org/jira/browse/RANGER-3182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aakash Nand updated RANGER-3182:

Attachment: (was: 0001-RANGER-3182-Rename-Presto-to-Trino-2.1.0.patch)

> Prestosql is renamed to Trino
> -
>
> Key: RANGER-3182
> URL: https://issues.apache.org/jira/browse/RANGER-3182
> Project: Ranger
>  Issue Type: Improvement
>  Components: plugins
>Affects Versions: 2.1.0
>Reporter: Viacheslav Kriuchkov
>Priority: Blocker
> Attachments: ranger-commons-lang3-master.patch
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> All "prestosql" classes are "trino" now and Presto plugin can't integrate 
> with Trino because of that. It means all Presto deployments that use Ranger 
> are stuck on version 350 and can't upgrade further.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


Review Request 73643: RANGER-3182 Rename Prestosql to trino and fix classpath errors

2021-10-10 Thread Aakash Nand

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

Review request for ranger.


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


Repository: ranger


Description
---

Hi,
I have created a patch which migrates existing prestosql references to 
rebranded trino. I have also fixed some classpath errors in 
ranger-trino-plugin. This ensures the plugin works with new Trino version 361.


Diffs
-

  agents-common/scripts/enable-agent.sh ad021feee 
  
agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java
 7775b0871 
  agents-common/src/main/resources/log4j.properties PRE-CREATION 
  agents-common/src/main/resources/service-defs/ranger-servicedef-presto.json 
b16b02a7b 
  distro/pom.xml 0c65df251 
  distro/src/main/assembly/admin-web.xml 3fc054d7c 
  distro/src/main/assembly/plugin-presto.xml 3043777d6 
  plugin-presto/.gitignore  
  plugin-presto/conf/ranger-policymgr-ssl-changes.cfg  
  plugin-presto/conf/ranger-policymgr-ssl.xml 5ac7cf14c 
  plugin-presto/conf/ranger-presto-audit-changes.cfg  
  plugin-presto/conf/ranger-presto-audit.xml d335974f2 
  plugin-presto/conf/ranger-presto-security-changes.cfg 5a89cfa2d 
  plugin-presto/conf/ranger-presto-security.xml 9feae81a6 
  plugin-presto/pom.xml 3246eda1c 
  plugin-presto/scripts/install.properties 956533571 
  
plugin-presto/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControl.java
 f9f3e4fb5 
  
plugin-presto/src/main/java/org/apache/ranger/services/presto/RangerServicePresto.java
 164b8f930 
  
plugin-presto/src/main/java/org/apache/ranger/services/presto/client/PrestoClient.java
 352979381 
  
plugin-presto/src/main/java/org/apache/ranger/services/presto/client/PrestoConnectionManager.java
 4a642ea51 
  
plugin-presto/src/main/java/org/apache/ranger/services/presto/client/PrestoResourceManager.java
 c9f38266e 
  
plugin-presto/src/test/java/org/apache/ranger/authorization/presto/authorizer/RangerAdminClientImpl.java
 bcfaef05e 
  
plugin-presto/src/test/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControlTest.java
 ed8c837d5 
  plugin-presto/src/test/resources/log4j.properties  
  plugin-presto/src/test/resources/presto-policies.json 6dbaabb1c 
  plugin-presto/src/test/resources/ranger-presto-security.xml 8a1923d4d 
  plugin-trino/conf/ranger-trino-security-changes.cfg PRE-CREATION 
  pom.xml 626591d60 
  ranger-presto-plugin-shim/.gitignore  
  ranger-presto-plugin-shim/pom.xml 4117b0388 
  
ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/PrestoRangerPlugin.java
 fe707726d 
  
ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerConfig.java
 e0ab0f3ee 
  
ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControl.java
 40638701f 
  
ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControlFactory.java
 e446ada03 
  
ranger-presto-plugin-shim/src/main/resources/META-INF/services/io.prestosql.spi.Plugin
 ff40776aa 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchForPrestoToSupportPresto333_J10038.java
 f64773303 


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


Testing
---


Thanks,

Aakash Nand



[GitHub] [ranger] aakashnand edited a comment on pull request #120: RANGER-3182: Rename Prestosql to Trino

2021-10-10 Thread GitBox


aakashnand edited a comment on pull request #120:
URL: https://github.com/apache/ranger/pull/120#issuecomment-939674179


Could anyone please review this? I have migrated the existing presto plugin 
to the trino plugin and also have fixed some classpath errors. This works with 
the latest Trino version 361


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ranger.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ranger] aakashnand edited a comment on pull request #120: RANGER-3182: Rename Prestosql to Trino

2021-10-10 Thread GitBox


aakashnand edited a comment on pull request #120:
URL: https://github.com/apache/ranger/pull/120#issuecomment-939674179


Could you please review this? I have migrated the existing presto plugin to 
the trino plugin and also have fixed some classpath errors. This works with the 
latest Trino version 361


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ranger.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ranger] aakashnand commented on pull request #120: RANGER-3182: Rename Prestosql to Trino

2021-10-10 Thread GitBox


aakashnand commented on pull request #120:
URL: https://github.com/apache/ranger/pull/120#issuecomment-939674179


   @rameeshm Could you please review this? I have migrated the existing presto 
plugin to the trino plugin and also have fixed some classpath errors. This 
works with the latest Trino version 361


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ranger.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ranger] aakashnand opened a new pull request #120: RANGER-3182: Rename Prestosql to Trino

2021-10-10 Thread GitBox


aakashnand opened a new pull request #120:
URL: https://github.com/apache/ranger/pull/120


   Refactored prestosql plugin code to work with newly rebranded trino and
   fixed missing jars from classpath which are required to work with Trino
   version 361


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ranger.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Updated] (RANGER-3472) The createPolicy() method is not thread safe. In another word, we can create policies with same resources when creating policies concurrently

2021-10-10 Thread Xuze Yang (Jira)


 [ 
https://issues.apache.org/jira/browse/RANGER-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xuze Yang updated RANGER-3472:
--
Description: 
In our production environment, we happen to find that two policies exist with 
the same resources.In this case, when we want to modify either policy, ranger 
doesn't allow this operation and throws message like "*Error Code : 3010 
Another policy already exists for matching resource: policy-name=[hhh9], 
service=[default-Hdfs]*". 

I go through the source code about create policy, find that the createPolicy() 
in class ServiceREST is not thread safe. When we create policies concurrently, 
we may create several policies with the same resources.

  was:
In our production environment, we happen to find that two policies exist with 
the same resources.In this case, when we want to modify either policy, ranger 
doesn't allow this operation and throws message like "*Error Code : 3010 
Another policy already exists for matching resource: policy-name=[hhh9], 
service=[default-Hdfs]*". 

I go through the source code about create policy, find that the createPolicy() 
in class ServiceREST is not thread safe. When we create policies concurrently, 
we may create several same resource's policies.


> The createPolicy() method is not thread safe. In another word, we can create 
> policies with same resources when creating policies concurrently
> -
>
> Key: RANGER-3472
> URL: https://issues.apache.org/jira/browse/RANGER-3472
> Project: Ranger
>  Issue Type: Bug
>  Components: Ranger
>Affects Versions: 2.1.0
>Reporter: Xuze Yang
>Priority: Major
>
> In our production environment, we happen to find that two policies exist with 
> the same resources.In this case, when we want to modify either policy, ranger 
> doesn't allow this operation and throws message like "*Error Code : 3010 
> Another policy already exists for matching resource: policy-name=[hhh9], 
> service=[default-Hdfs]*". 
> I go through the source code about create policy, find that the 
> createPolicy() in class ServiceREST is not thread safe. When we create 
> policies concurrently, we may create several policies with the same resources.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)