Metagraph-DB is a distributed database designed for storing and querying metagraph data. It can be configured using a YAML configuration file and/or environment variables.
Caution
IN-MEMORY STORAGE IS UNIMPLEMENTED YET
By default, the application looks for a configuration file named config.yaml. You can specify a different file path using the --config flag.
config.yamlnode_storage:
dirpath: "/path/to/node/storage"
in_memory: false
edge_storage:
dirpath: "/path/to/edge/storage"
in_memory: true
attribute_storage:
dirpath: "/path/to/attribute/storage"
in_memory: false
fragment_storage:
dirpath: "/path/to/fragment/storage"
in_memory: true
metastore:
dirpath: "/path/to/metastore"
in_memory: false
system:
machine_id: 1
clear_on_start: false
port: 8000
logging:
level: "trace"
./main --config /path/to/config.yaml
Environment variables can be used to override values specified in the configuration file or to provide configuration when no file is used. The environment variable names should be prefixed with MDB and use underscores as delimiters.
export MDB_NODE_STORAGE_DIRPATH=/path/to/node/storage
export MDB_NODE_STORAGE_IN_MEMORY=false
export MDB_EDGE_STORAGE_DIRPATH=/path/to/edge/storage
export MDB_EDGE_STORAGE_IN_MEMORY=true
export MDB_ATTRIBUTE_STORAGE_DIRPATH=/path/to/attribute/storage
export MDB_ATTRIBUTE_STORAGE_IN_MEMORY=false
export MDB_FRAGMENT_STORAGE_DIRPATH=/path/to/fragment/storage
export MDB_FRAGMENT_STORAGE_IN_MEMORY=true
export MDB_METASTORE_DIRPATH=/path/to/metastore
export MDB_METASTORE_IN_MEMORY=false
export MDB_SYSTEM_MACHINE_ID=1
export MDB_SYSTEM_CLEAR_ON_START=false
export MDB_LOGGING_LEVEL=info
export MDB_NODE_STORAGE_DIRPATH=/path/to/node/storage
export MDB_EDGE_STORAGE_DIRPATH=/path/to/edge/storage
export MDB_ATTRIBUTE_STORAGE_DIRPATH=/path/to/attribute/storage
export MDB_FRAGMENT_STORAGE_DIRPATH=/path/to/fragment/storage
export MDB_METASTORE_DIRPATH=/path/to/metastore
export MDB_SYSTEM_MACHINE_ID=1
export MDB_SYSTEM_CLEAR_ON_START=false
./main
-v flag to enable verbose (debug) logging.-log flag.If no configuration file or environment variables are provided, the application will use default values. However, it is recommended to provide a configuration to ensure the application behaves as expected.
# Configuration File
node_storage:
dirpath: "/path/to/node/storage"
in_memory: false
edge_storage:
dirpath: "/path/to/edge/storage"
in_memory: true
attribute_storage:
dirpath: "/path/to/attribute/storage"
in_memory: false
fragment_storage:
dirpath: "/path/to/fragment/storage"
in_memory: true
metastore:
dirpath: "/path/to/metastore"
in_memory: false
system:
machine_id: 1
clear_on_start: false
# Environment Variables
export MDB_SYSTEM_MACHINE_ID=2
export MDB_SYSTEM_CLEAR_ON_START=true
./main --config /path/to/config.yaml
In this example, the system.machine_id and system.clear_on_start values from the configuration file will be overridden by the environment variables.
Content type
Image
Digest
sha256:5dcc9e6d8…
Size
150.5 MB
Last updated
8 months ago
docker pull daniknik/metagraph_db