How to use the pygw.config.config.MODULE__rocksdb_config.RocksDBOptions function in pygw

To help you get started, we’ve selected a few pygw examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github locationtech / geowave / python / src / main / python / pygw / stores.py View on Github external
def __init__(self, gw_namespace=None, dir="rocksdb", compact_on_write=True, batch_write_size=1000):
        """
        Create a RocksDB datastore.

        Args:
            gw_namespace (string) : namespace 
            dir (str) : directory of datastore
            compact_on_write (bool)
            batch_write_size (int)
        """
        if gw_namespace:
            j_rock_opts = config.MODULE__rocksdb_config.RocksDBOptions(gw_namespace)
        else:
            j_rock_opts = config.MODULE__rocksdb_config.RocksDBOptions()
        if dir != "rocksdb":
            j_rock_opts.setDirectory(dir)
        if not compact_on_write:
            j_rock_opts.setCompactOnWrite(compact_on_write)
        if batch_write_size != 1000:
            j_rock_opts.setBatchWriteSize(batch_write_size)
        j_ds = config.MODULE__core_store.DataStoreFactory.createDataStore(j_rock_opts)
        super().__init__(config.GATEWAY, j_ds)
github locationtech / geowave / python / src / main / python / pygw / stores.py View on Github external
def __init__(self, gw_namespace=None, dir="rocksdb", compact_on_write=True, batch_write_size=1000):
        """
        Create a RocksDB datastore.

        Args:
            gw_namespace (string) : namespace 
            dir (str) : directory of datastore
            compact_on_write (bool)
            batch_write_size (int)
        """
        if gw_namespace:
            j_rock_opts = config.MODULE__rocksdb_config.RocksDBOptions(gw_namespace)
        else:
            j_rock_opts = config.MODULE__rocksdb_config.RocksDBOptions()
        if dir != "rocksdb":
            j_rock_opts.setDirectory(dir)
        if not compact_on_write:
            j_rock_opts.setCompactOnWrite(compact_on_write)
        if batch_write_size != 1000:
            j_rock_opts.setBatchWriteSize(batch_write_size)
        j_ds = config.MODULE__core_store.DataStoreFactory.createDataStore(j_rock_opts)
        super().__init__(config.GATEWAY, j_ds)