ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "WangYuan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (RANGER-1877) The ranger policies json file should be formatted when exported at ranger service manager.
Date Wed, 08 Nov 2017 06:33:00 GMT

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

WangYuan updated RANGER-1877:
-----------------------------
    Attachment: 0001-RANGER-1877-The-ranger-policies-json-file-should-be-.patch

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

> --------------------------------------------------------------------------------------------
>
>                 Key: RANGER-1877
>                 URL: https://issues.apache.org/jira/browse/RANGER-1877
>             Project: Ranger
>          Issue Type: Bug
>          Components: admin, Ranger
>    Affects Versions: master
>            Reporter: WangYuan
>            Assignee: WangYuan
>            Priority: Minor
>         Attachments: 0001-RANGER-1877-The-ranger-policies-json-file-should-be-.patch
>
>
> 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}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message