ESDM
Middleware for Earth System Data
Macros | Functions
mongodb.c File Reference

A data backend to provide POSIX compatibility. More...

#include <bson.h>
#include <esdm.h>
#include <fcntl.h>
#include <jansson.h>
#include <mongoc.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "mongodb.h"
Include dependency graph for mongodb.c:

Macros

#define _GNU_SOURCE   /* See feature_test_macros(7) */
 
#define DEBUG(msg)   log("[METADUMMY] %-30s %s:%d\n", msg, __FILE__, __LINE__)
 

Functions

esdm_backend_tmongodb_backend_init (esdm_config_backend_t *config)
 
int mongodb_finalize ()
 

Detailed Description

A data backend to provide POSIX compatibility.

Function Documentation

◆ mongodb_backend_init()

esdm_backend_t* mongodb_backend_init ( esdm_config_backend_t config)

Initializes the POSIX plugin. In particular this involves:

  • Load configuration of this backend
  • Load and potentially calibrate performance model
  • Connect with support services e.g. for technical metadata
  • Setup directory structures used by this POSIX specific backend
  • Populate esdm_backend_t struct and callbacks required for registration

Takes possession of the config object, pass a malloc()ed object.

Returns
pointer to backend struct

◆ mongodb_finalize()

int mongodb_finalize ( )

Initializes the POSIX plugin. In particular this involves: