ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kishor Gollapalliwar <kishor.gollapalli...@gmail.com>
Subject Re: Review Request 73033: RANGER-2972: REST api to delete service/ repo using cluster name
Date Wed, 09 Dec 2020 05:54:42 GMT

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

(Updated Dec. 9, 2020, 5:54 a.m.)


Review request for ranger, Dhaval Shah, Dineshkumar Yadav, Jayendra Parab, Abhay Kulkarni,
Madhan Neethiraj, Mehul Parikh, Ramesh Mani, Vishal Suvagia, and Velmurugan Periasamy.


Changes
-------

Created string literal constant and used constant instead of literal


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


Repository: ranger


Description
-------

Create REST api in ranger admin which will delete services/ repos associated with a cluster.


Diffs (updated)
-----

  agents-common/src/main/java/org/apache/ranger/plugin/model/ServiceDeleteResponse.java PRE-CREATION

  security-admin/src/main/java/org/apache/ranger/db/XXServiceConfigMapDao.java 4217473fe 
  security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 1049d16a5 
  security-admin/src/main/java/org/apache/ranger/security/context/RangerAPIList.java 1e38ef1b5

  security-admin/src/main/resources/META-INF/jpa_named_queries.xml 1ba652905 


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

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


Testing
-------

Existing Functionality:
1.CREATE service via UI
2.CREATE service via CURL
3.UPDATE service via UI
4.UPDATE service via CURL
5.DELETE service via UI
6.DELETE service via CURL

New Functinality:
1.Curl command to tear down cluster, with zero associated services
2.Curl command to tear down cluster, with more than 1 associated services (single cluster)
3.Curl command to tear down cluster, with more than 1 associated services (multi cluster)

Sample Curl Commands:
1. curl -v -u admin:admin123 -X POST -H "Accept:application/json" -H "Content-Type:application/json"
http://localhost:6080/service/plugins/services -d '{"name":"hive2","displayName":"hive2","description":"hive2","isEnabled":true,"tagService":"","configs":{"service.user.hive":"hive","service.user.group.hadoop":"hadoop","service.user.group.public":"public","username":"admin","password":"admin","jdbc.driverClassName":"org.apache.hive.jdbc.HiveDriver","jdbc.url":"jdbc://localhost:9083","cluster.name":"cluster3"},"type":"hive"}'
2. curl -v -u admin:admin123 -X PUT -H "Accept:application/json" -H "Content-Type:application/json"
"http://localhost:6080/service/plugins/services/12" -d '{"id":14,"guid":"43a890b3-a4c2-4ff8-95d7-1e7c3abb08c9","isEnabled":true,"createdBy":"Admin","updatedBy":"Admin","createTime":1606197964895,"updateTime":1606197964896,"version":1,"type":"hive","name":"hive2","displayName":"hive2","description":"hive2","configs":{"cluster.name":"cluster4","password":"*****","service.user.group.public":"public","service.user.hive":"hive","service.user.group.hadoop":"hadoop","jdbc.driverClassName":"org.apache.hive.jdbc.HiveDriver","jdbc.url":"jdbc://localhost:9083","username":"admin"},"policyVersion":1,"policyUpdateTime":1606197964897,"tagVersion":1,"tagUpdateTime":1606197964897}'
3. curl -iv -u admin:admin123 -X DELETE -H "Accept:application/json" -H "Content-Type:application/json"
http://localhost:6080/service/plugins/cluster-services/cluster3


Thanks,

Kishor Gollapalliwar


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message