Storage API interface

Class description goes here.

storage.api.finish(**kwargs)

Master-side initialization.

Identical to finishworker (right now, may change).

storage.api.finishWorker(**kwargs)

Worker-side finalization.

Parameters:kwargs – Additional arguments, currently unused. For future use and/or other Persistent Object Library requirements.
storage.api.finishWorkerPostFork()

Worker-side finalization per forked process.

This finalization must be done before the finishWorker. This must be called once per forked process, and must match the calls of initWorkerPostFork.

That means that each call to initWorkerPostFork must have its “related” (i.e. called from the same process) call to finishWorkerPostFork.

storage.api.getByID(object_strid)

Get a Persistent Object from its OID. :param object_strid: The string identifying object (contains both ObjectID and hint) :return: The (Persistent) DataClayObject

storage.api.init(config_file_path=None, **kwargs)

Master-side initialization.

Identical to initWorker (right now, may change).

storage.api.initWorker(config_file_path, **kwargs)

Worker-side initialization.

CURRENT BEHAVIOUR IMPORTANT CONSIDERATIONS

This initialization is not a complete one, this performs a per_network_init`ialization. This is done because it is assumed that COMPSs will proceed to fork the process and then call the `initWorkerPostFort.

Be sure to leave all the process fragile stuff in the other call. But keep in mind that calling to initWorkerPostFor is not optional –after this init the library is not in a consistent state.

Parameters:
  • config_file_path – Path to storage.properties configuration file.
  • kwargs – Additional arguments, currently unused. For future use and/or other Persistent Object Library requirements.
storage.api.initWorkerPostFork()

Worker-side initialization after forking the process.

CURRENT BEHAVIOUR IMPORTANT CONSIDERATIONS

This initialization must be done after the initWorker and all the libraries that are “fork-fragile” must be addressed here.

To this date, only gRPC client is initialized here because they are not process-safe.

Once this method is called, dataClay can be considered “initialized”.