Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] Change Log/Loader questions

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] Change Log/Loader questions

Chronological Thread 
  • From: Gagné Sébastien <>
  • To: "Klug, Lawrence" <>, <>
  • Subject: RE: [grouper-users] Change Log/Loader questions
  • Date: Tue, 23 Oct 2012 13:39:50 -0400

I’ll try to help with #2 :

Did you try caching all the subjects at startup ? One query for everything will be quicker than multiple queries for each subject. In our case the “search” function checks the login and displayname. The display name almost always contains a space so I get almost everybody that matters. Here is a sample of what I did :


String filter = " "; // Search regarde le diplayName qui contient toujours ou presque un espace


            Set<Subject> allSubjects = SourceManager.getInstance().getSource("ldap").search(filter);


            // == Mettre tous les sujets dans la cache avec leur login

            for (Subject sub : allSubjects) {

                  cacheSubject.put(sub.getId(), sub);



Then you first try the cache or you get it manually :


sujetAcad = cacheSubject.get(etu.getLogin());


            if (sujetAcad == null) {

                  try {

                        sujetAcad = SubjectFinder.findById(etu.getLogin(), true);

                        cacheSubject.put(etu.getLogin(), sujetAcad);


                  } catch (SubjectNotFoundException e) {


                        // Subject doesn’t exist

                        LOG.error("Sujet/personne introuvable : '" + etu.getLogin() + "(" + etu.getNoEtudiant() + ")'");





            // Add to group

            groupe.addMember(sujetAcad, false);



Caching everything only take 45sec and saves us about 2 hours at creation time. Another improvement was to limit the requests made to grouper, example : get all the group’s member and manually check if multiple members are there instead of doing multiple group.hasMember requests.



Hope that helps a little




De : [mailto:] De la part de Klug, Lawrence
Envoyé : 23 octobre 2012 12:30
À :
Objet : [grouper-users] Change Log/Loader questions


1.        When a 19-member group was added to another group we observed one record going into the grouper_change_log_entry_temp table and 35 events recorded in the Change Log Consumer.  Since we need only one event for our notification to the external application, is there a way to throttle or filter these events?


2.       How can I get our orgs loader job to play nice with our ChangeLogConsumer job?  The orgs job uses SubjectIdentifier to match subjects and is slow.  The ChangeLogConsumer job needs to handle real time Admin Ui changes.





Lawrence Klug

IMS Platform Development

310 825-2061

ext 52061


Archive powered by MHonArc 2.6.16.

Top of Page