Data Handlers#
BinaryFileWritingDataHandler#
This Data Handler class writes serialized data into a file on the filesystem. The name of each file is generated by joining a string identifying the MPI rank of the process writing the file with a counter that increases by one for each file written by the same process. A suffix is appended to the resulting string, and optionally a prefix can be prepended to it.
Configuration Parameters for BinaryFileWritingDataHandler#
file_prefix(str): This parameter is optional. It defines a prefix that is prepended to the name of each file written by the Data Handler. If the prefix does not already end with an underscore, one is added automatically as a separator. The default value is""(an empty string, meaning no prefix is added). Example:processed_file_suffix(str): This parameter is optional. It defines the suffix (extension) for the files written by the Data Handler, without the leading dot. The default value ish5(i.e. an.h5extension is used for the files). Example:datawrite_directory(str): This parameter is optional. It defines the directory where the Data Handler writes the files. The directory is created, including any missing parent directories, if it does not already exist. The default value of this parameter is the current working directory. Example:/data/output
BinaryDataStreamingDataHandler#
This Data Handler class sends serialized data through a network socket, to be consumed
by an external application. The handler creates or connects to sockets using the ZMQ
library. The socket provides backstop capabilities: if nothing is receiving data on the
other side of the socket, sending will block and eventually time out rather than
silently dropping data.
Configuration Parameters for BinaryDataStreamingDataHandler#
urls(list of str): This parameter defines the list of URIs where the Data Handler opens or connects its sockets. Each URI must be in a format compatible with theZMQlibrary (e.g.tcp://localhost:5555). This parameter must always be provided as a list, even if only one URI is specified. Example:urls: - tcp://localhost:5555
role(str): This parameter is optional. It specifies whether the Data Handler should create a socket or connect to an already existing one. The parameter can only take two values:server(the handler binds the socket, i.e. performs a ZMQbindoperation) orclient(the handler connects to an existing socket, i.e. performs a ZMQconnectoperation). The default value of this parameter isserver. Example:clientlibrary(str): This parameter is optional. It dictates which library the handler uses to manage the socket. Currently only the valuezmqis supported. The default value of this parameter iszmq. Example:zmqsocket_type(str): This parameter is optional. It determines the type of socket that the handler creates. Currently only thePUSHsocket type is supported, and this parameter can only take the valuepush. The default value of this parameter ispush. Example:push