Return-Path: X-Original-To: apmail-ranger-commits-archive@www.apache.org Delivered-To: apmail-ranger-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2F7401840A for ; Thu, 11 Feb 2016 23:39:03 +0000 (UTC) Received: (qmail 72720 invoked by uid 500); 11 Feb 2016 23:39:03 -0000 Delivered-To: apmail-ranger-commits-archive@ranger.apache.org Received: (qmail 72690 invoked by uid 500); 11 Feb 2016 23:39:02 -0000 Mailing-List: contact commits-help@ranger.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ranger.incubator.apache.org Delivered-To: mailing list commits@ranger.incubator.apache.org Received: (qmail 72681 invoked by uid 99); 11 Feb 2016 23:39:02 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Feb 2016 23:39:02 +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 6A060C1A22 for ; Thu, 11 Feb 2016 23:39:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.454 X-Spam-Level: X-Spam-Status: No, score=-3.454 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.234] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id nP96ETCoKBUn for ; Thu, 11 Feb 2016 23:39:01 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id A381A20428 for ; Thu, 11 Feb 2016 23:39:01 +0000 (UTC) Received: (qmail 72678 invoked by uid 99); 11 Feb 2016 23:39:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Feb 2016 23:39:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4CFCBE0534; Thu, 11 Feb 2016 23:39:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vel@apache.org To: commits@ranger.incubator.apache.org Message-Id: <539d551504fc41bda8642a9a902db6c9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-ranger git commit: RANGER-827: Add default value for min group id to support existing deployments without any config changes Date: Thu, 11 Feb 2016 23:39:01 +0000 (UTC) Repository: incubator-ranger Updated Branches: refs/heads/master 658f2310d -> 63c547296 RANGER-827: Add default value for min group id to support existing deployments without any config changes Signed-off-by: Velmurugan Periasamy Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/63c54729 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/63c54729 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/63c54729 Branch: refs/heads/master Commit: 63c54729603323d8b625ae6941aea0abe80df2b3 Parents: 658f231 Author: Velmurugan Periasamy Authored: Thu Feb 11 18:07:14 2016 -0500 Committer: Velmurugan Periasamy Committed: Thu Feb 11 18:38:32 2016 -0500 ---------------------------------------------------------------------- .../ranger/unixusersync/config/UserGroupSyncConfig.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/63c54729/ugsync/src/main/java/org/apache/ranger/unixusersync/config/UserGroupSyncConfig.java ---------------------------------------------------------------------- diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/config/UserGroupSyncConfig.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/config/UserGroupSyncConfig.java index 9bcf767..43cd982 100644 --- a/ugsync/src/main/java/org/apache/ranger/unixusersync/config/UserGroupSyncConfig.java +++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/config/UserGroupSyncConfig.java @@ -60,7 +60,8 @@ public class UserGroupSyncConfig { public static final String UGSYNC_MIN_USERID_PROP = "ranger.usersync.unix.minUserId" ; public static final String UGSYNC_MIN_GROUPID_PROP = "ranger.usersync.unix.minGroupId" ; - + public static final String DEFAULT_UGSYNC_MIN_GROUPID = "0" ; + public static final String UGSYNC_MAX_RECORDS_PER_API_CALL_PROP = "ranger.usersync.policymanager.maxrecordsperapicall" ; public static final String UGSYNC_MOCK_RUN_PROP = "ranger.usersync.policymanager.mockrun" ; @@ -370,7 +371,13 @@ public class UserGroupSyncConfig { return prop.getProperty(UGSYNC_MIN_USERID_PROP) ; } - public String getMinGroupId() { return prop.getProperty(UGSYNC_MIN_GROUPID_PROP) ; } + public String getMinGroupId() { + String mgid = prop.getProperty(UGSYNC_MIN_GROUPID_PROP); + if (mgid == null) { + mgid = DEFAULT_UGSYNC_MIN_GROUPID; + } + return mgid; + } public String getMaxRecordsPerAPICall() { return prop.getProperty(UGSYNC_MAX_RECORDS_PER_API_CALL_PROP) ;