You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "bhavik patel (JIRA)" <ji...@apache.org> on 2017/11/08 07:00:00 UTC

[jira] [Commented] (RANGER-1877) The ranger policies json file should be formatted when exported at ranger service manager.

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

bhavik patel commented on RANGER-1877:
--------------------------------------

It is not an kind of bug!!! 
It is good to have this feature so can you please update jira type from Bug to Improvement.

> 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)