apache/cassandra · warning · RuntimeException
Use the -d flag to quiet this error and get the exact…
Error message
Use the -d flag to quiet this error and get the exact throughput in megabits/s
What it means
When printing the default inter-DC stream throughput (Mbit), GetInterDCStreamThroughput refuses to round a fractional value: if throughputInDouble is not a mathematical integer and -d was not passed, it throws this RuntimeException directing the user to -d for the exact value.
Solutions
- Run `nodetool getinterdcstreamthroughput -d` for the exact double
- Change the inter-DC stream throughput setting to a whole number
- Update automation to pass -d
Example fix
// before nodetool getinterdcstreamthroughput // after nodetool getinterdcstreamthroughput -d
Defensive patterns
Strategy: validation
Validate before calling
nodetool getinterdcstreamthroughput -d
Try / catch
try { run(); } catch (RuntimeException e) { if (e.getMessage().contains("-d flag")) runWithDouble(); } Prevention
- Use -d in monitoring scripts
- Set whole-number inter-DC stream throughput values
- Handle fractional values in output parsers
When it happens
Trigger: Running `nodetool getinterdcstreamthroughput` (no -d) when stream_throughput_outbound_megabits_per_sec (inter-DC variant) is configured as a fraction, e.g. 195.5.
Common situations: Fractional throughput tuning values set in cassandra.yaml; monitoring scripts that invoke the command without -d and crash.
Understand the failure class
Background: "unknown output mode", "invalid value for flag", "expects true/false": fixing invalid flag value errors in CLI tools — this error's family across 24 libraries.
Related errors
- Use the -d flag to quiet this error and get the exact…
- Use the -d flag to quiet this error and get the exact…
- argument for sort must be one of
- argument for top must be a positive integer.
- arguments for -F are json,yaml only.
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/533d5b76ef4922a4.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/tools/nodetool/GetInterDCStreamThroughput.java:81
}
else if (interDCStreamThroughputDoubleMbit)
{
throughputInDouble = probe.getInterDCStreamThroughputAsDouble();
probe.output().out.printf("Current stream throughput: %s%n",
throughputInDouble > 0 ? throughputInDouble + " Mb/s" : "unlimited");
}
else
{
throughputInDouble = probe.getInterDCStreamThroughputAsDouble();
throughput = probe.getInterDCStreamThroughput();
if (throughput <= 0)
probe.output().out.printf("Current inter-datacenter stream throughput: unlimited%n");
else if (DoubleMath.isMathematicalInteger(throughputInDouble))
probe.output().out.printf(throughputInDouble + "Current inter-datacenter stream throughput: %s%n", throughput + " Mb/s");
else
throw new RuntimeException("Use the -d flag to quiet this error and get the exact throughput in megabits/s");
}
}
}
View on GitHub (pinned to 88fd0f6a0e)