Giter Site home page Giter Site logo

Comments (3)

trel avatar trel commented on September 24, 2024

with this Python rule...

def pep_api_data_obj_read_pre(rule_args, callback, rei):
    callback.writeLine("serverLog", rule_args[2])

I see...

Attempted to extract a boost::python::object containing a non-conforming type


with iRODS Rule Language...

pep_api_data_obj_read_pre(*INSTANCE, *COMM, *DATAOBJREADINP, *BUFF){
  writeLine("serverLog", *DATAOBJREADINP)
}

I see...

"log_message":"writeLine: inString = KeyValue[7]:bytesWritten=0;keyValPair_t=nullptr;l1descInx=3;len=12;offset=0;oprType=0;whence=0;\n"

So, indeed, object path does not appear to be there...

And looking at that data structure... indeed it is not...

typedef struct OpenedDataObjInp {
int l1descInx; /* for read, write, close */
int len; /* length of operation for read, write */
int whence; /* used for lseek */
int oprType;
rodsLong_t offset;
rodsLong_t bytesWritten; /* for close */
keyValPair_t condInput; /* include chksum flag and value */
} openedDataObjInp_t;

So... the question is how do we get that information?

from irods.

alanking avatar alanking commented on September 24, 2024

With the l1 descriptor, one can use msi_get_file_descriptor_info to get the obj path and much more:

https://docs.irods.org/4.3.2/doxygen/microservices_2src_2get__file__descriptor__info_8cpp.html#ac1cf34b6716c433bfc8cf0b6a020b95b

As it returns a JSON object, you may also need to use the JSON microservices to get at the information.

It shouldn't be very expensive because the l1 descriptor is in the same agent process. Also, I haven't tested this. :)

from irods.

trel avatar trel commented on September 24, 2024

Oh, nice. Sounds like we need an example in the docs somewhere once we see it work.

from irods.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.