Command-line interface

swh graph

Software Heritage graph tools.

swh graph [OPTIONS] COMMAND [ARGS]...

Options

-C, --config-file <config_file>

YAML configuration file

compress

Compress a graph using WebGraph

Input: a directory containing a graph dataset in ORC format

Output: a directory containing a WebGraph compressed graph

Compression steps are: (1) extract_nodes, (2) mph, (3) bv, (4) bfs, (5) permute_bfs, (6) transpose_bfs, (7) simplify, (8) llp, (9) permute_llp, (10) obl, (11) compose_orders, (12) stats, (13) transpose, (14) transpose_obl, (15) maps, (16) extract_persons, (17) mph_persons, (18) node_properties, (19) mph_labels, (20) fcl_labels, (21) edge_labels, (22) edge_labels_obl, (23) edge_labels_transpose_obl, (24) clean_tmp. Compression steps can be selected by name or number using –steps, separating them with commas; step ranges (e.g., 3-9, 6-, etc.) are also supported.

swh graph compress [OPTIONS]

Options

-i, --input-dataset <input_dataset>

Required graph dataset directory, in ORC format

-o, --output-directory <output_directory>

Required directory where to store compressed graph

-g, --graph-name <NAME>

name of the output graph (default: ‘graph’)

-s, --steps <STEPS>

run only these compression steps (default: all steps)

rpc-serve

run the graph RPC service

swh graph rpc-serve [OPTIONS]

Options

-h, --host <IP>

host IP address to bind the server on

Default

0.0.0.0

-p, --port <PORT>

port to bind the server on

Default

5009

-g, --graph <GRAPH>

Required compressed graph basename