Lakestream
Ursa

Command-line tools

The ursa launcher and the ursa-admin subcommands for inspecting streams, compaction tasks and tables.

Ursa ships a command-line launcher with administrative subcommands for inspecting streams, compaction tasks and locks, and benchmark tools for measuring throughput.

These tools are not on Maven Central

ursa-storage-tools is excluded from the published artifacts, so the launcher and its subcommands come from a source build rather than a dependency. See build from source.

Building produces ursa-storage-<version>-bin.tar.gz under ursa-storage-tools/target. Unpack it and run bin/ursa from the resulting directory.

The launcher

bin/ursa <command> [options]
CommandRuns
produceBenchmark producer.
consumeBenchmark consumer.
tailing-readBenchmark tailing reader.
storageObject-store benchmark.
perfCombined benchmark driver.
adminThe ursa-admin subcommands below.

Anything else is treated as a fully-qualified class name with a main method, which is how the internal tools are reached.

Library settings come from conf/ursa-storage.conf beside the launcher. Environment variables URSA_STORAGE_CONF, URSA_STORAGE_LOG_CONF, URSA_STORAGE_MEM, URSA_STORAGE_GC, URSA_STORAGE_GC_LOG, URSA_STORAGE_EXTRA_OPTS and URSA_STORAGE_EXTRA_CLASSPATH override the defaults, and can also be set in conf/ursa-storage-perf-env.sh.

Administration

bin/ursa admin [-c <configuration-file>] <subcommand> [options]

-c / --config is inherited by every subcommand.

Streams

SubcommandPurpose
listList all streams.
readRead entries from a stream. Requires -s / --stream-id and -o / --offset.
deleteDelete a stream. Requires -s / --stream-id.
set-delete-prefixesSet storage path prefixes for the deletion policy, comma-separated.
migrate-stream-idMigrate stream-id entries from an empty value to JSON stream metadata.

Compaction tasks

SubcommandPurpose
get-compact-tasksRetrieve compaction tasks from the metadata store. -n sets how many (default 100); -i runs interactively.
get-first-n-compact-tasksRetrieve the first N tasks for a stream. Requires -o / --oxia-server-addr.
commit-tasksCommit tasks by hand. -t filters by topic.
update-publish-task-offsetRewrite the published-task offset for a stream. Requires --stream and --stream-id; use -1 when no task has been published.
check-lockInspect and manage locks in the metadata store. Requires -o; -ns sets the namespace, default default.

commit-tasks and update-publish-task-offset write coordination state that the compaction service otherwise owns. Use them to recover a stuck stream, with the service's behaviour in mind — see operations.

Tables

bin/ursa admin table <subcommand> [options]
SubcommandPurpose
probeProbe a table. Takes comma-separated namespaces.
expire-snapshotsExpire snapshots of a stream's Iceberg table.
dedup-filesDetect and fix duplicate Parquet data-file references in a stream's Iceberg table.

Benchmarks

The producer and consumer measure throughput and latency against a running metadata store, writing an HdrHistogram file if asked and exposing Prometheus metrics on a port.

Producing to ten streams across three threads at 20,000 messages per second, against local-disk storage:

bin/ursa produce -sp data -o localhost:6648 -th 3 -s 10 -r 20000

Consuming the same:

bin/ursa consume -o localhost:6648 -sp data -th 3

Selected producer options:

OptionDefaultPurpose
-o, --oxia-urlrequiredMetadata store URL.
-s, --num-streams1Streams to write to.
-th, --threads1Writer threads.
-r, --rate10000Messages per second across all streams.
-size, --message-size1024Message size in bytes.
-m, --num-messages0Total messages; 0 or below writes until stopped.
-time, --test-duration0Duration in seconds; 0 or below runs until stopped.
-w, --warmup-time30Warm-up seconds before measurement.
-b, --bucket, -p, --prefix, -rg, --region, -sp, --storagePath—Backend location, as in a properties file.
--histogram-file—HdrHistogram output file.
-ef, --exit-on-failurefalseExit the process on a publish failure.

Selected consumer options:

OptionDefaultPurpose
-o, --oxia-urlrequiredMetadata store URL.
-th, --threads1Fetch threads.
-bs, --batch-size1000Entries per request.
-bfs, --buffer-size1048576Buffer size per consumer.
-s, --start-streamId0First stream to read.
-e, --end-streamIdunboundedLast stream to read.
-t, --time0Duration in seconds; 0 or below runs until stopped.

The consumer discovers new streams while running, reads several concurrently, and resumes from the last message it consumed.