grouper-users - Re: [grouper-users] recipe to "start a loader job" from a Java application
Subject: Grouper Users - Open Discussion List
List archive
- From: "Waldbieser, Carl" <>
- To: "Carey M. Black" <>
- Cc: grouper-users <>
- Subject: Re: [grouper-users] recipe to "start a loader job" from a Java application
- Date: Thu, 1 Mar 2018 09:08:13 -0500 (EST)
- Ironport-phdr: 9a23:W5fnThO2fMK94t2T3NEl6mtUPXoX/o7sNwtQ0KIMzox0I/n+rarrMEGX3/hxlliBBdydt6ofzbKO+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1Ov71GonPhMiryuy+4ZLebxlGiTanfb9+MAi9oBnMuMURnYZsMLs6xAHTontPdeRWxGdoKkyWkh3h+Mq+/4Nt/jpJtf45+MFOTav1f6IjTbxFFzsmKHw65NfqtRbYUwSC4GYXX3gMnRpJBwjF6wz6Xov0vyDnuOdxxDWWMMvrRr0vRz+s87lkRwPpiCcfNj427mfXitBrjKlGpB6tvgFzz5LIbI2QMvd1Y6HTcs4ARWdZUMhfVzJPDIC+YIsBEuQOMvpXoYb8p1UJsRuzHhWsCeHzxTNUnHL6wa833uI8Gg/GxgwgGNcOvWzaoNr1LqgSVf26w7LJzTrddPNZxy395JDVeR0/u/6MR7ZwfcTMwkQoGQLKlFGQppH+MDOUyOsCr3OW7+56WuKhkWEmqx9+oiSzxsgykIXGmJ8ayk3d+Ch/3Y07K9q4SEthbt6lFptdry6aN5FxQsM/W2Fnpjw6xqcctp6jZCgG0JUnxxjDa/OZaYiI5AzsVPqPLTtimn1qZa+/iw698Uih1u38VtS0301QoiVZldnMs3YA3AHQ5MifUvZx40ms1DKV2wzO5exJI1o4mbfGJ5I737I9mZgevVzeEiL4nEj6lrKae0om9+Sy9ujqYq/qqoGAO4Nokg3yL6ojl8ilDeglPQUDXXKX9fmh2LH54EH0TqtGg/srmafDqp/aP94UpquhDg9VzIkj7xG/Ai+j0NQEh3YKLkhJeBadgIjnIV7PIO73Deujg1uyijtk2e3JPqD5DpXMKHjMjqvhcK5g50NSzAc/181T6p1WB70bPf7/R1X9uMHXAxI7KwC0xvzoCNR51oMQQ2KPBaqZPbvcsFCS4uIgPvKDZI4LtznhMPUl4+ThjXEjll4dY6apwYcXZ26iEvt4PkqZfGLggs0dHmcSogo+UOvqhUWNUT5JYHayQro86S8hCI6/EIfDXZ6igKaa3CqgGp1WZ3tGCkyXEXv2bYmEWvEMaD6MLc97lDwLS6ShR5E72R6wqQD61ukvEu2BsAYRr5/ynP0zr8fXnBoxv3QgBcCU2GLLFjsvtmQTWnk70L0p8mJnzVLWm5dxh/BSFNFI6ukNGiwzL5qWh7hlAtT+UAPMdf+NQVivU9i6HTx3Q94slYxdK31hEsmv20iQlxGhBKUYwvnSXMQ5
Cary,
I have the Jython equivalent on Github[1].
It looks like you just import
`edu.internet2.middleware.grouper.app.loader.GrouperLoader`.
Then call `GrouperLoader.runJobOnceForGroup(session, group)` where session is
the Grouper session and group is the group object.
[1]
https://github.com/cwaldbieser/grouper_jython_scripts/blob/master/gsh_utils/loader_tools.py
Thanks,
Carl Waldbieser
ITS Identity Management
Lafayette College
----- Original Message -----
From: "Carey M. Black"
<>
To: "grouper-users"
<>
Sent: Wednesday, February 28, 2018 11:24:55 PM
Subject: [grouper-users] recipe to "start a loader job" from a Java
application
Hello all,
I am hopeful that someone could share the recipe to "start a loader job" from
a Java application using the Grouper API.
REF:
https://spaces.internet2.edu/display/Grouper/Grouper+Loader+add+new+job
...
Log in to the daemon server where you run GSH:
....
"
gsh 0% grouperSession = GrouperSession.startRootSession();
edu.internet2.middleware.grouper.GrouperSession:
96f3d78c030b45f1b43f5d5d4a598448,'GrouperSystem','application'
gsh 1% loaderGroup = GroupFinder.findByName(grouperSession,
"some:group");
gsh 2% loaderRunOneJob(loaderGroup);
"
I likely can rip apart the gsh environment/code to work this out on my own.
But I thought I would ask in case someone already has the recipe already
worked out. :) And after all, maybe others will have the same question in
the future too. :)
I am looking for the ingredients list of:
Include these jars/config files/paths in your app.
Use this/these class(es)/methods....
The app will be running from one of the Grouper servers. So the code will
have access to all of the grouper config/files/secretes.
Why? ( I heard you ask that. )
I am working on a "how to load lots of data process" and I want to
dove tail the end of the "load lots of data" (into a cache of RDMBS tables)
with the "start of the loader job" (to ingest the data into grouper).
Yes, I could likely write more code and do what the loader would do
with those tables. However, that process is already written. If I can define
the job(s) then just start them. I think that would be "close enough" to
"in-line" for me. :) ( Well, for now. )
Thanks in advance.
--
Carey Matthew
- [grouper-users] recipe to "start a loader job" from a Java application, Black, Carey M., 03/01/2018
- Re: [grouper-users] recipe to "start a loader job" from a Java application, Waldbieser, Carl, 03/01/2018
Archive powered by MHonArc 2.6.19.