Flatfile for Janusgraph Backend

Vivek Singh Raghuwanshi

Hi Team,
I am working on the issue and want to i am using HBase and Solr for our current setup of Janusgraph.
Is that possible to replace HBase with a flat-file, instead of an in-memory backend?


No, JanusGraph does not have a storage backend for a single-node cluster that persists to single file (such as sqlite would). It is possible though to have a single Cassandra instance co-hosted on your JanusGraph machine. In fact, Cassandra is included in the janusgraph-full distribution to enable this out of the box.

Best wishes,   Marc

Oleksandr Porunov


JanusGraph supports Oracle Berkeley DB which is embedded into Java and works either with a filesystem (by default) or in-memory (if configured so).
That's might be something what you are looking for. For BDB to work all you need to do is set 2 required parameters:
storage.directory = /path/to/directory/where/you/want/to/store/data/
storage.backend = berkeleyje

Thus, all your data will be stored in files on your local filesystem (or distributed if used with something like nfs, glusterfs, etc.).
That said, berkeleyje has some limitations. I would recommend testing your usecase strongly before considering using it in production as it's quite easy to corrupt your files with BDB.
You may also want to use configuration `storage.berkeleyje.lock-mode: LockMode.READ_UNCOMMITTED` as I remember I had some transaction problems without it but don't remember those problems anymore.

Hope it helps.

Best regards,
Oleksandr Porunov