ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wang yuan <wang.yua...@zte.com.cn>
Subject Review Request 63657: The ranger policies json file should be formatted when exported at ranger service manager.
Date Wed, 08 Nov 2017 06:31:00 GMT

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

Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O hEigeartaigh, Gautam
Borad, Madhan Neethiraj, pengjianhua, Ramesh Mani, Selvamohan Neethiraj, Velmurugan Periasamy,
and Qiang Zhang.


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


Repository: ranger


Description
-------

The ranger policies json file should be formatted when exported  at ranger service manager.

I found  it's difficult to edit the unformatted json file.

{code:title=ServiceDBStore.java|borderStyle=solid}
private void writeJson(List<RangerPolicy> policies, String jsonFileName,
			HttpServletResponse response) throws JSONException, IOException {
		... ...
		//Gson gson = new Gson();      //shoud be replaced:
                Gson gson = new GsonBuilder().setPrettyPrinting().create();
		
                String json = gson.toJson(rangerExportPolicyList, RangerExportPolicyList.class);
                ... ...
{code}


Diffs
-----

  security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 195510dc 


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


Testing
-------


Thanks,

wang yuan


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