Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 01975200D33 for ; Wed, 8 Nov 2017 07:55:27 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id F3F8B160BE0; Wed, 8 Nov 2017 06:55:26 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 453AA160BDA for ; Wed, 8 Nov 2017 07:55:26 +0100 (CET) Received: (qmail 55432 invoked by uid 500); 8 Nov 2017 06:55:25 -0000 Mailing-List: contact dev-help@ranger.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ranger.apache.org Delivered-To: mailing list dev@ranger.apache.org Received: (qmail 55421 invoked by uid 99); 8 Nov 2017 06:55:25 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Nov 2017 06:55:24 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 0BA0DCFAC6; Wed, 8 Nov 2017 06:55:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.2 X-Spam-Level: *** X-Spam-Status: No, score=3.2 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_MANYTO=0.2, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 50uj_IUlU_0K; Wed, 8 Nov 2017 06:55:22 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 9F39A6D659; Wed, 8 Nov 2017 06:31:02 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 1CFB8E0555; Wed, 8 Nov 2017 06:31:00 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id AFE2EC410AA; Wed, 8 Nov 2017 06:31:00 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============2367346431348129605==" MIME-Version: 1.0 Subject: Review Request 63657: The ranger policies json file should be formatted when exported at ranger service manager. From: wang yuan To: Gautam Borad , Alok Lal , Ramesh Mani , Velmurugan Periasamy , pengjianhua , Colm O hEigeartaigh , Selvamohan Neethiraj , Ankita Sinha , Madhan Neethiraj , Qiang Zhang , Don Bosco Durai Cc: ranger , wang yuan Date: Wed, 08 Nov 2017 06:31:00 -0000 Message-ID: <20171108063100.35837.34967@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: wang yuan X-ReviewGroup: ranger X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/63657/ X-Sender: wang yuan Reply-To: wang yuan X-ReviewRequest-Repository: ranger archived-at: Wed, 08 Nov 2017 06:55:27 -0000 --===============2367346431348129605== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- 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 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 --===============2367346431348129605==--