Why cannot find msiGetDataObjAVUs function after copy all libs from microservices-master?

53 views
Skip to first unread message

Felipe Gutierrez

unread,
Oct 31, 2016, 11:11:00 AM10/31/16
to iRODS-Chat

Hello, I download and compile the project https://github.com/DICE-UNC/microservices . After I had to go into the directory microservices/msi** and compile the cpp files and also copy the lib to irods directory  /var/lib/irods/plugins/microservices/. The other libs that I had problem now the irule can find but msiGetDataObjAVUs. All the cpp that I compile did not throw any error. Is there another lib project I should compile and import?


irule -F rulemsiLoadMetadataFromDataObj.r
ERROR
: rcExecMyRule error. status = -1097000 NO_RULE_OR_MSI_FUNCTION_FOUND_ERR
Level 0: DEBUG: error: cannot find rule for action "msiGetDataObjAVUs" available: 100.
line
10, col 2
 msiGetDataObjAVUs
(*Filepath,*Buf);
 
^




Terrell Russell

unread,
Oct 31, 2016, 11:19:00 AM10/31/16
to irod...@googlegroups.com
That microservice has been removed in 4.x - you can duplicate the functionality with a language integrated genQuery.


Terrell



--
--
"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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Felipe Gutierrez

unread,
Nov 1, 2016, 4:41:18 AM11/1/16
to iRODS-Chat
it does not seem to work too. I tried


irule -F rulemsiLoadMetadataFromDataObj.r
ERROR
: rcExecMyRule error. status = -1232000 RE_DYNAMIC_TYPE_ERROR
Level 0: DEBUG: Unable to get valid ICAT column index for META_DATA_ATTR_UNIT.
line
12, col 58
*rs = SELECT META_DATA_ATTR_NAME, META_DATA_ATTR_VALUE, META_DATA_ATTR_UNIT WHERE DATA_NAME = "metadata-target5.txt" AND COLL_NAME = "/tempZone/home/felipe"

I think we are talking different things. My irule just load the metadata into irods, which is working, and in the end print all data on the stdout.

cat rulemsiLoadMetadataFromDataObj.r
myTestRule
{
  msiLoadMetadataFromDataObj
(*Path,*Status);
 
# msiGetDataObjAVUs(*Filepath,*Buf);
 
# writeBytesBuf("stdout",*Buf);
}

Sorry if I am wrong. But I didnt understand the propose of genQuery here. Is genQuery useful for read metadata?

Thanks

To unsubscribe from this group and stop receiving emails from it, send an email to irod-chat+...@googlegroups.com.

de Torcy, Antoine

unread,
Nov 1, 2016, 7:56:52 AM11/1/16
to iRODS-Chat

You may want to try META_DATA_ATTR_UNITS as your column name, as per  https://github.com/irods/irods/blob/master/lib/core/include/rodsGenQueryNames.h#L105



From: irod...@googlegroups.com <irod...@googlegroups.com> on behalf of Felipe Gutierrez <felipe.o....@gmail.com>
Sent: Tuesday, November 1, 2016 4:41 AM
To: iRODS-Chat
Subject: Re: [iROD-Chat:15720] Why cannot find msiGetDataObjAVUs function after copy all libs from microservices-master?
 

Felipe Gutierrez

unread,
Nov 1, 2016, 8:45:25 AM11/1/16
to iRODS-Chat
Different error. Is there a specific format for the metadata file?

Other question I want to ask. How do I import metadata from a file that has 20 columns and each column is a different attribute for one different file? And has a lot of lines which each line is a metadata for a different file.

[root@fedora20 irules]# cat rulemsiLoadMetadataFromDataObj.r
myTestRule
{
 msiLoadMetadataFromDataObj
(*Path,*Status);
 
# msiGetDataObjAVUs(*Filepath,*Buf);
 
# writeBytesBuf("stdout",*Buf);
 
*rs = SELECT META_DATA_ATTR_NAME, META_DATA_ATTR_VALUE, META_DATA_ATTR_UNITS WHERE DATA_NAME = "metadata-target5.txt" AND COLL_NAME =  "/tempZone/home/felipe"
 
foreach(*row in *rs) {
  writeBytesBuf
("stdout", *row.META_DATA_ATTR_NAME ++ *row.META_DATA_ATTR_VALUE ++ *row.META_DATA_ATTR_UNITS);
 
}
}
INPUT
*Path="/tempZone/home/felipe/load-metadata.txt", *Filepath="/tempZone/home/felipe/metadata-target.txt"
OUTPUT ruleExecOut

[root@fedora20 irules]# cat metadata-target5.txt
felipe oliveira gutierrez
gutierrez ggg ffff
clube corinthians paulista
musica saudosa maloca
cantor
Adoniram Barbosa

[root@fedora20 irules]# irule -F rulemsiLoadMetadataFromDataObj.r
ERROR
: [-] iRODS/lib/core/src/procApiRequest.cpp:266:readAndProcApiReply : status [SYS_HEADER_READ_LEN_ERR] errno [] -- message []
[-] iRODS/lib/core/src/sockComm.cpp:199:readMsgHeader : status [SYS_HEADER_READ_LEN_ERR] errno [] -- message [failed to call 'read header']
[-] libssl.cpp:577:ssl_read_msg_header : status [SYS_HEADER_READ_LEN_ERR] errno [] -- message [read 0 expected 4]
ERROR
: rcExecMyRule error. status = -4000 SYS_HEADER_READ_LEN_ERR
ERROR
: [-] iRODS/lib/core/src/rcConnect.cpp:269:rcDisconnect : status [SYS_HEADER_WRITE_LEN_ERR] errno [Broken pipe] -- message []
[-] iRODS/lib/core/src/sockComm.cpp:1386:sendRodsMsg : status [SYS_HEADER_WRITE_LEN_ERR] errno [Broken pipe] -- message [failed to call 'write body']
[-] libssl.cpp:1058:ssl_send_rods_msg : status [SYS_HEADER_WRITE_LEN_ERR] errno [Broken pipe] -- message [Write message header failed.]
[-] iRODS/lib/core/src/sockComm.cpp:473:writeMsgHeader : status [SYS_HEADER_WRITE_LEN_ERR] errno [Broken pipe] -- message []
[-] libssl.cpp:1001:ssl_write_msg_header : status [SYS_HEADER_WRITE_LEN_ERR] errno [Broken pipe] -- message [Wrote -1 expected 140.]
ERROR
: [-] iRODS/lib/core/src/rcConnect.cpp:281:rcDisconnect : status [SSL_SHUTDOWN_ERROR] errno [] -- message []
[-] iRODS/lib/core/src/sockComm.cpp:100:sockClientStop : status [SSL_SHUTDOWN_ERROR] errno [] -- message [failed to call 'client stop']
[-] libssl.cpp:648:ssl_client_stop : status [SSL_SHUTDOWN_ERROR] errno [] -- message [error shutting down the SSL connection]



de Torcy, Antoine

unread,
Nov 1, 2016, 9:07:22 AM11/1/16
to iRODS-Chat

The input metadata file for that microservice should have one AVU per line. Each AVU line contains the target path, attribute name, attribute value, and attribute unit separated by pipe characters (which must be escaped with '\' when used inside the tokens). The target path can be a file or a collection and can be different for each line.


Example:


 C-/tempZone/home/rods/testColl |CollAttr000 |CollVal00 |CollUnits00
 /tempZone/home/rods/testColl/file00.txt |myAttr000 |myVal001
 /tempZone/home/rods/testColl/file00.txt |myAttr001 |myVal001 |myUnits001
 # Some comments
 /tempZone/home/rods/testColl/file01.txt |myAttr011 |myVal011
 /tempZone/home/rods/testColl/file01.txt |myAttr010 |myVal011




Sent: Tuesday, November 1, 2016 8:45 AM
To: iRODS-Chat
Subject: Re: [iROD-Chat:15722] Why cannot find msiGetDataObjAVUs function after copy all libs from microservices-master?
 

Felipe Gutierrez

unread,
Nov 1, 2016, 10:04:55 AM11/1/16
to iRODS-Chat
hummm, ok, seems there is no way to put all metadata in one line. So I will have to create a script to format my file like that.

Thanks.

de Torcy, Antoine

unread,
Nov 1, 2016, 10:34:36 AM11/1/16
to iRODS-Chat

This is fairly old stuff but that microservice may also work for you:

https://github.com/DICE-UNC/microservices/tree/master/microservices/msiLoadMetadataFromXml


Sent: Tuesday, November 1, 2016 10:04 AM
To: iRODS-Chat
Subject: Re: [iROD-Chat:15725] Why cannot find msiGetDataObjAVUs function after copy all libs from microservices-master?
 
Reply all
Reply to author
Forward
0 new messages