nodetool viewbuildstatus
Displays the build status of materialized views.
Synopsis
Section titled “Synopsis”nodetool [connection_options] viewbuildstatus <keyspace> <view>nodetool [connection_options] viewbuildstatus <keyspace.view>See connection options for connection options.
Description
Section titled “Description”nodetool viewbuildstatus shows the progress of a materialized view build across all nodes. When a materialized view is created, Cassandra must populate it with existing data, which can take time for large tables.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
keyspace | Required. The keyspace containing the view |
view | Required. The materialized view name to check |
The view can be specified as two separate arguments (keyspace view) or as a single dotted notation (keyspace.view).
Examples
Section titled “Examples”Check Specific View (two arguments)
Section titled “Check Specific View (two arguments)”nodetool viewbuildstatus my_keyspace my_viewCheck Specific View (dotted notation)
Section titled “Check Specific View (dotted notation)”nodetool viewbuildstatus my_keyspace.my_viewSample Output (Build Complete)
Section titled “Sample Output (Build Complete)”When the view build has finished successfully on all nodes:
my_keyspace.my_view has finished buildingSample Output (Build In Progress or Failed)
Section titled “Sample Output (Build In Progress or Failed)”When any node has not completed the build, the command outputs a status message and a table with per-host status, then exits with an error:
my_keyspace.my_view has not finished building; node status is below.Host Info192.168.1.101 SUCCESS192.168.1.102 BUILDING192.168.1.103 SUCCESSStatus Values
Section titled “Status Values”| Status | Meaning |
|---|---|
| SUCCESS | Build complete |
| BUILDING | Build in progress |
| STARTED | Build initiated |
| FAILED | Build failed |
When to Use
Section titled “When to Use”After Creating View
Section titled “After Creating View”# Create viewcqlsh -e "CREATE MATERIALIZED VIEW..."
# Monitor build progresswatch nodetool viewbuildstatus my_keyspace.my_viewTroubleshoot View Issues
Section titled “Troubleshoot View Issues”# Check if view build failed (output goes to stderr on failure)nodetool viewbuildstatus my_keyspace my_view 2>&1 | grep FAILEDBest Practices
Section titled “Best Practices”Guidelines
- Monitor large builds - View builds can take significant time
- Check all nodes - Build status varies per node
- Investigate failures - Check logs if build fails
Related Commands
Section titled “Related Commands”| Command | Relationship |
|---|---|
| compactionstats | View build shows in compaction |
| tablestats | View table statistics |