ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v..@apache.org
Subject ranger git commit: RANGER-1366: Plugin-status page shows incorrect last-update time
Date Fri, 10 Feb 2017 23:03:28 GMT
Repository: ranger
Updated Branches:
  refs/heads/ranger-0.7 3d158d51a -> 436b1fa9e


RANGER-1366: Plugin-status page shows incorrect last-update time

Signed-off-by: Velmurugan Periasamy <vel@apache.org>
(cherry picked from commit fbc7f19db32200bc35211cbe6c309e8a3e53fed0)


Project: http://git-wip-us.apache.org/repos/asf/ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/436b1fa9
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/436b1fa9
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/436b1fa9

Branch: refs/heads/ranger-0.7
Commit: 436b1fa9ed1b5c915129cd83017eef657aff25ac
Parents: 3d158d5
Author: Abhay Kulkarni <akulkarni@hortonworks.com>
Authored: Wed Feb 8 16:28:58 2017 -0800
Committer: Velmurugan Periasamy <vel@apache.org>
Committed: Fri Feb 10 18:03:18 2017 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/ranger/biz/ServiceDBStore.java | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/436b1fa9/security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java b/security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java
index cb67b6a..15f205a 100644
--- a/security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java
+++ b/security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java
@@ -2690,8 +2690,8 @@ public class ServiceDBStore extends AbstractServiceStore {
 			serviceVersionInfoDbObj = new XXServiceVersionInfo();
 			serviceVersionInfoDbObj.setServiceId(serviceDbObj.getId());
 			serviceVersionInfoDbObj.setPolicyVersion(getNextVersion(serviceDbObj.getPolicyVersion()));
-			serviceVersionInfoDbObj.setTagVersion(serviceDbObj.getTagVersion());
 			serviceVersionInfoDbObj.setPolicyUpdateTime(new Date());
+			serviceVersionInfoDbObj.setTagVersion(serviceDbObj.getTagVersion());
 			serviceVersionInfoDbObj.setTagUpdateTime(serviceDbObj.getTagUpdateTime());
 
 			serviceVersionInfoDao.create(serviceVersionInfoDbObj);
@@ -2709,11 +2709,11 @@ public class ServiceDBStore extends AbstractServiceStore {
 					if (serviceVersionInfoDbObj != null) {
 
 						serviceVersionInfoDbObj.setPolicyVersion(getNextVersion(serviceVersionInfoDbObj.getPolicyVersion()));
-						serviceVersionInfoDbObj.setPolicyUpdateTime(service.getPolicyUpdateTime());
+						serviceVersionInfoDbObj.setPolicyUpdateTime(new Date());
 
 						if (filterForServicePlugin && isTagVersionUpdateNeeded) {
 							serviceVersionInfoDbObj.setTagVersion(getNextVersion(serviceVersionInfoDbObj.getTagVersion()));
-							serviceVersionInfoDbObj.setTagUpdateTime(service.getTagUpdateTime());
+							serviceVersionInfoDbObj.setTagUpdateTime(new Date());
 						}
 						serviceVersionInfoDao.update(serviceVersionInfoDbObj);
 					} else {
@@ -2721,14 +2721,14 @@ public class ServiceDBStore extends AbstractServiceStore {
 						serviceVersionInfoDbObj = new XXServiceVersionInfo();
 						serviceVersionInfoDbObj.setServiceId(referringService.getId());
 						serviceVersionInfoDbObj.setPolicyVersion(getNextVersion(referringService.getPolicyVersion()));
+						serviceVersionInfoDbObj.setPolicyUpdateTime(new Date());
 						if (filterForServicePlugin && isTagVersionUpdateNeeded) {
 							serviceVersionInfoDbObj.setTagVersion(getNextVersion(referringService.getTagVersion()));
+							serviceVersionInfoDbObj.setTagUpdateTime(new Date());
 						} else {
 							serviceVersionInfoDbObj.setTagVersion(referringService.getTagVersion());
+							serviceVersionInfoDbObj.setTagUpdateTime(referringService.getTagUpdateTime());
 						}
-						serviceVersionInfoDbObj.setPolicyUpdateTime(new Date());
-						serviceVersionInfoDbObj.setTagUpdateTime(referringService.getTagUpdateTime());
-
 						serviceVersionInfoDao.create(serviceVersionInfoDbObj);
 					}
 				}


Mime
View raw message