Re: [iROD-Chat:17825] Meta data creation in event handler

56 views
Skip to first unread message

Terrell Russell

unread,
Nov 29, 2018, 9:15:22 PM11/29/18
to irod...@googlegroups.com
Hi Omar,


The example on that page `stat`s each file on the disk after it is put into the vault and registered in the catalog, and adds five pieces of stat information to the metadata (just as you expected, it seems).

You're not reproducing the results as seen on https://slides.com/irods/sc18-automated-ingest#/18 ?

Two things to try...
 - first, check the /var/lib/irods/log/rodsLog* for surprising output.
 - second, use the --log_filename and --log_level options when running the ingest to see if the python or celery or redis is not happy for some reason


The "hdlr_mod" is simply the event handler module itself as it's referenced and passed around between the functions.
The "meta" is a dictionary of all the state that is kept throughout the ingest tool.

Terrell




On Thu, Nov 29, 2018 at 2:03 PM P_Atreides <oamo...@gmail.com> wrote:
I'm a new iRODS user, I've been reading the training manual and following various slide decks.  I ran into an issue while following the automated ingest slides.  I created a new collection, storage vault and staged the data ( a bunch of 'dummy" files). The files transfer with no problem when I call stat_eventhandler.py file.  However the metadata is not created or attached to the files.  If you run an imeta ls -d command on the files in their collection it shows no metadata. I've gone through the eventhandler throughly and I'm not sure why it is not creating and attaching the metadata.  Can anyone help or point me to documentation for creating event handlers that generate and attach metadata to files as they are ingested?  Thanks!  Also wondering what the "hdlr_mod" and "meta" arguments passed into the post_data_obj_create function are.

--
--
"iRODS: the Integrated Rule-Oriented Data-management System; A community driven, open source, data grid software solution"   https://www.irods.org

 iROD-Chat:  http://groups.google.com/group/iROD-Chat

---
You received this message because you are subscribed to the Google Groups "iRODS-Chat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to irod-chat+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Omar Morris

unread,
Nov 30, 2018, 3:01:12 PM11/30/18
to irod...@googlegroups.com
That's correct,  when I check the metadata in the collection, the files are there but it returns a message that there is not metadat attched to the ingested files.

Omar Morris

unread,
Nov 30, 2018, 3:06:02 PM11/30/18
to irod...@googlegroups.com
I used the --log_filename  (and chose the name statlog for the logfile) option because there were no error logs being created.  I ran the ingest tool again and it created the log file "statlog".  This file was blank and showed no errors.  I can't get the tool to add metadata.  I found another way to do it but I have to hardcode in the path for the object.  When I use the python-irodsclient, I can start a seesion and then pass that session into an object and manipulate it.  I use:  
from irods.session import iRODSSession
>>> with iRODSSession(host='localhost', port=1247, user='rods', password='rods', zone='tempZone') as session:
    obj = session.data_objects.get("/tempZone/home/rods/reg_coll/dir1/mesh3.msh")

as you can see I had to hard code the path, this would be fine for a single file, but  I want to iterate and apply metadata to each file in the folder the way the example does.

On Thu, Nov 29, 2018 at 8:15 PM Terrell Russell <terrell...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages