ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zsombor Gegesy <zsom...@apache.org>
Subject Review Request 67196: RANGER-2107 - use spring for injecting DAO by generic parameters, and remove the unnecessary code
Date Thu, 17 May 2018 21:56:12 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67196/
-----------------------------------------------------------

Review request for ranger.


Bugs: RANGER-2107
    https://issues.apache.org/jira/browse/RANGER-2107


Repository: ranger


Description
-------

Currently, instead of relying on Spring to inject the DAOs internally, Ranger use a RangerDaoManager
to create and acquire objects, which lead to a lot of unnecessary generic code which complicates
the code.
 Instead of this, all the 'DAO' needs a simple '@Service' annotation, and RangerBaseModelService.entityDao
and AbstractBaseResourceService.entityDao can be marked as @Autowired - and Spring will do
her job. (Spring before 4.0 were unable to autowire fields based on the generic parameters).


Diffs
-----

  security-admin/src/main/java/org/apache/ranger/biz/RangerBizUtil.java da7144673 
  security-admin/src/main/java/org/apache/ranger/common/RangerSearchUtil.java 94374ab2f 
  security-admin/src/main/java/org/apache/ranger/common/SearchUtil.java 2c918fdc3 
  security-admin/src/main/java/org/apache/ranger/db/RangerDaoManager.java fddfda399 
  security-admin/src/main/java/org/apache/ranger/db/RangerDaoManagerBase.java c57ecc84a 
  security-admin/src/main/java/org/apache/ranger/db/XXAssetDao.java cf25c8eef 
  security-admin/src/main/java/org/apache/ranger/db/XXAuditMapDao.java 113dbca75 
  security-admin/src/main/java/org/apache/ranger/db/XXAuthSessionDao.java 475b27846 
  security-admin/src/main/java/org/apache/ranger/db/XXContextEnricherDefDao.java c3d322dc4

  security-admin/src/main/java/org/apache/ranger/db/XXCredentialStoreDao.java 1e6c443e2 
  security-admin/src/main/java/org/apache/ranger/db/XXDBBaseDao.java 2a64c8952 
  security-admin/src/main/java/org/apache/ranger/db/XXDataHistDao.java b5e785569 
  security-admin/src/main/java/org/apache/ranger/db/XXDataMaskTypeDefDao.java f6e1aff0b 
  security-admin/src/main/java/org/apache/ranger/db/XXEnumDefDao.java 2590455ac 
  security-admin/src/main/java/org/apache/ranger/db/XXEnumElementDefDao.java 4b7fb708c 
  security-admin/src/main/java/org/apache/ranger/db/XXGroupDao.java 19e2e11f3 
  security-admin/src/main/java/org/apache/ranger/db/XXGroupGroupDao.java cbe95f93b 
  security-admin/src/main/java/org/apache/ranger/db/XXGroupPermissionDao.java 9281cb5e5 
  security-admin/src/main/java/org/apache/ranger/db/XXGroupUserDao.java c8c105de4 
  security-admin/src/main/java/org/apache/ranger/db/XXModuleDefDao.java 85f284690 
  security-admin/src/main/java/org/apache/ranger/db/XXPermMapDao.java c455fdc45 
  security-admin/src/main/java/org/apache/ranger/db/XXPluginInfoDao.java 8eb163605 
  security-admin/src/main/java/org/apache/ranger/db/XXPolicyConditionDefDao.java 21afcac89

  security-admin/src/main/java/org/apache/ranger/db/XXPolicyDao.java 562351710 
  security-admin/src/main/java/org/apache/ranger/db/XXPolicyExportAuditDao.java d2fc6e2d7

  security-admin/src/main/java/org/apache/ranger/db/XXPolicyItemAccessDao.java de37e10cd 
  security-admin/src/main/java/org/apache/ranger/db/XXPolicyItemConditionDao.java 11596ef4d

  security-admin/src/main/java/org/apache/ranger/db/XXPolicyItemDao.java 567717333 
  security-admin/src/main/java/org/apache/ranger/db/XXPolicyItemDataMaskInfoDao.java a8418c626

  security-admin/src/main/java/org/apache/ranger/db/XXPolicyItemGroupPermDao.java 8c05699b2

  security-admin/src/main/java/org/apache/ranger/db/XXPolicyItemRowFilterInfoDao.java 4618e7dc7

  security-admin/src/main/java/org/apache/ranger/db/XXPolicyItemUserPermDao.java 40a0da13b

  security-admin/src/main/java/org/apache/ranger/db/XXPolicyResourceDao.java 4b04b9664 
  security-admin/src/main/java/org/apache/ranger/db/XXPolicyResourceMapDao.java 70657370a

  security-admin/src/main/java/org/apache/ranger/db/XXPolicyWithAssignedIdDao.java 2353bf0b7

  security-admin/src/main/java/org/apache/ranger/db/XXPortalUserDao.java 98411317e 
  security-admin/src/main/java/org/apache/ranger/db/XXPortalUserRoleDao.java adf100ad6 
  security-admin/src/main/java/org/apache/ranger/db/XXResourceDao.java 9fa77f20a 
  security-admin/src/main/java/org/apache/ranger/db/XXResourceDefDao.java aee56e833 
  security-admin/src/main/java/org/apache/ranger/db/XXServiceConfigDefDao.java 30a9ce8e0 
  security-admin/src/main/java/org/apache/ranger/db/XXServiceConfigMapDao.java 9f97b6073 
  security-admin/src/main/java/org/apache/ranger/db/XXServiceDao.java 93c65a840 
  security-admin/src/main/java/org/apache/ranger/db/XXServiceDefDao.java dd32c3a41 
  security-admin/src/main/java/org/apache/ranger/db/XXServiceDefWithAssignedIdDao.java 7e866d295

  security-admin/src/main/java/org/apache/ranger/db/XXServiceResourceDao.java f87c0ae59 
  security-admin/src/main/java/org/apache/ranger/db/XXServiceResourceElementDao.java 72fe2140b

  security-admin/src/main/java/org/apache/ranger/db/XXServiceResourceElementValueDao.java
e726d047c 
  security-admin/src/main/java/org/apache/ranger/db/XXServiceVersionInfoDao.java 0098bff23

  security-admin/src/main/java/org/apache/ranger/db/XXServiceWithAssignedIdDao.java b02787234

  security-admin/src/main/java/org/apache/ranger/db/XXTagAttributeDao.java e361b33bd 
  security-admin/src/main/java/org/apache/ranger/db/XXTagAttributeDefDao.java 145399f1c 
  security-admin/src/main/java/org/apache/ranger/db/XXTagDao.java 77428dbf9 
  security-admin/src/main/java/org/apache/ranger/db/XXTagDefDao.java dfd2fcb5d 
  security-admin/src/main/java/org/apache/ranger/db/XXTagResourceMapDao.java bbcd54618 
  security-admin/src/main/java/org/apache/ranger/db/XXTrxLogDao.java b376abe71 
  security-admin/src/main/java/org/apache/ranger/db/XXUserDao.java 7af1bf96a 
  security-admin/src/main/java/org/apache/ranger/db/XXUserPermissionDao.java 017c4fbd6 
  security-admin/src/main/java/org/apache/ranger/service/AbstractBaseResourceService.java
4157fc77d 
  security-admin/src/main/java/org/apache/ranger/service/AuthSessionService.java 1b6b77c2a

  security-admin/src/main/java/org/apache/ranger/service/RangerBaseModelService.java 482f10cee

  security-admin/src/main/java/org/apache/ranger/service/RangerPluginInfoService.java d4d060551

  security-admin/src/main/java/org/apache/ranger/service/RangerServiceDefService.java 1e385a024

  security-admin/src/test/java/org/apache/ranger/biz/TestRangerBizUtil.java 7dda83e2a 
  security-admin/src/test/java/org/apache/ranger/service/TestRangerServiceDefService.java
685c8ea03 
  security-admin/src/test/java/org/apache/ranger/service/TestRangerServiceDefServiceBase.java
a56809d41 
  security-admin/src/test/java/org/apache/ranger/service/TestRangerServiceServiceBase.java
43c49e401 


Diff: https://reviews.apache.org/r/67196/diff/1/


Testing
-------

Tested locally and as a server with a cluster


Thanks,

Zsombor Gegesy


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message