Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

nodetool enablehintsfordc

Enables hints for a specific datacenter.


Terminal window
nodetool [connection_options] enablehintsfordc <datacenter>

See connection options for connection options.

nodetool enablehintsfordc re-enables hint storage for nodes in a specific datacenter after it was disabled with disablehintsfordc. When enabled, the local node will store hints for writes destined for unavailable nodes in the specified datacenter.


ArgumentDescription
datacenterName of the datacenter to enable hints for

Terminal window
nodetool enablehintsfordc dc2

Re-enable hints after a datacenter comes back online:

Terminal window
# DC2 is back online
nodetool enablehintsfordc dc2
# Verify hints are being stored again

Resume normal hint behavior after planned maintenance:

Terminal window
# Maintenance complete
nodetool enablehintsfordc dc2
# Monitor hint activity
nodetool listpendinghints

Return to default behavior after temporary disable:

Terminal window
# Re-enable hints for datacenter
nodetool enablehintsfordc dc2
# Verify enabled (no specific status command, but hints will accumulate)

Hints are stored on coordinator nodes, so enable on all nodes:

enable_hints_dc_cluster.sh
#!/bin/bash
DATACENTER="$1"
if [ -z "$DATACENTER" ]; then
echo "Usage: $0 <datacenter>"
exit 1
fi
# Get list of node IPs from local nodetool status
nodes=$(nodetool status | grep "^UN" | awk '{print $2}')
for node in $nodes; do
echo -n "$node: "
ssh "$node" "nodetool enablehintsfordc $DATACENTER" && echo "enabled" || echo "FAILED"
done

dc_recovery_workflow.sh
#!/bin/bash
DC_NAME="$1"
echo "=== Datacenter Recovery: $DC_NAME ==="
# 1. Verify DC is back online
echo "1. Checking datacenter status..."
nodetool status | grep "$DC_NAME" -A 10
# 2. Re-enable hints for this DC on all nodes via SSH
echo ""
echo "2. Enabling hints for $DC_NAME..."
for node in $(nodetool status | grep "^UN" | awk '{print $2}'); do
ssh "$node" "nodetool enablehintsfordc $DC_NAME" 2>/dev/null
done
# 3. Run repair to restore consistency
echo ""
echo "3. Consider running repair for full consistency"
echo " nodetool repair -dc $DC_NAME"

AspectBehavior
Hint storageResumes for DC
Coordinator diskMay grow with hints
Automatic recoveryRestored
Write guaranteesFull coverage

Terminal window
# Verify datacenter name is correct
nodetool status
# Check if hints are accumulating
nodetool listpendinghints
# Check for errors
grep -i "hint" /var/log/cassandra/system.log | tail -10
Terminal window
# List available datacenters
nodetool status | grep "Datacenter:" | awk '{print $2}'
# Use exact datacenter name
nodetool enablehintsfordc <exact_name>

Enable Hints Guidelines

  1. Verify DC is healthy - Ensure nodes are UP before enabling
  2. Enable cluster-wide - Run on all coordinator nodes
  3. Monitor after enable - Watch hint accumulation
  4. Consider repair - Run repair for extended outages

Default Behavior

By default, hints are enabled for all datacenters. This command is only needed after explicitly disabling hints for a DC.


CommandRelationship
disablehintsfordcDisable hints for a datacenter
enablehandoffEnable all hinted handoff
listpendinghintsList pending hints
statushandoffCheck handoff status