BBoxDB contains a CLI (command line interface) to execute simple administration tasks and to perform queries. The CLI can be executed by running the script $BBOXDB_HOME/bin/cli.sh.

$ $BBOXDB_HOME/bin/cli.sh

usage: CLI
BBoxDB command line interace (CLI)

Available actions are: [import, query, delete, insert, create_dgroup, delete_dgroup, show_dgroup, show_instances]
Supported import formats: [geojson, syntheticdata, yellowtaxi_point, yellowtaxi_range, tpch_lineitem_point, tpch_lineitem_range]

 -action <action>                         The CLI action to execute
 -bbox <bounding box>                     The bounding box of the tuple
 -cluster <clustername>                   The name of the cluster (default: mycluster)
 -dgroup <distributiongroup>              The distribution group
 -file <file>                             The file to read
 -format <format>                         The format of the file
 -help                                    Show this help
 -host <host>                             The Zookeeper endpoint to connect to (default: 127.0.0.1:2181)
 -key <key>                               The name of the key
 -replicationfactor <replicationfactor>   The replication factor
 -table <table>                           The table to carry out the action
 -time <timestamp>                        The version time stamp of the tuple
 -value <value>                           The value of the tuple
 -verbose                                 Be verbose

Please report issues at https://github.com/jnidzwetzki/bboxdb/issues

Show all discovered BBoxDB instances

$ $BBOXDB_HOME/bin/cli.sh -action show_instances

Create a distribution group

$ $BBOXDB_HOME/bin/cli.sh -action create_dgroup -dgroup mydgroup -replicationfactor 2 -dimensions 2

Show the state of a distribution group

$ $BBOXDB_HOME/bin/cli.sh -action show_dgroup -dgroup mydgroup

Delete a distribution group

$ $BBOXDB_HOME/bin/cli.sh -action delete_dgroup -dgroup mydgroup

Insert a tuple

$ $BBOXDB_HOME/bin/cli.sh -action insert -table mydgroup_table1 -key key1 -bbox [[1,2]:[1,2]] -value mydata

Execute a key query

$ $BBOXDB_HOME/bin/cli.sh -action query -table mydgroup_table1 -key key1

Execute a bounding box query

$ $BBOXDB_HOME/bin/cli.sh -action query -table mydgroup_table1 -bbox [[1,4]:[1,4]]

Delete a tuple

$ $BBOXDB_HOME/bin/cli.sh -action delete -table mydgroup_table1 -key key1

Data Import

$ $BBOXDB_HOME/bin/cli.sh -action import -file /path/to/TREE -format geojson -table mydgroup2_tree

Supported input formats:

Format Description Bounding Box
geojson Read n-dimensional GeoSON data from the input file. Determined by the GeoJSON object.
synthetic Read n-dimensional synthetic data from the input file. Determined by the synthetic data object.
yellowtaxi_point Read the yellow taxi format. A point in 3-dimensional space (trip-begin: longitude, latitude, time).
yellowtaxi_range Read the yellow taxi format. A rectangle in 3-dimensional space (trip-begin: longitude, latitude, time - trip-end: longitude, latitude, time).
rometaxi_point Read the rome taxi format. A point in 3-dimensional space (trip-begin: longitude, latitude, time).
rometaxi_range Read the rome taxi format. A range in the 3-dimensional space, determined by the units (a linear movement) og the taxis.
tpch_lineitem_point Read the lineitem relation generated by the TPC-H benchmark data generator. A point in 1-dimensional space (Ship date).
tpch_lineitem_range Read the lineitem relation generated by the TPC-H benchmark data generator. An range in 1-dimensional space (Ship date - Receipt date).