apache/hadoop · error · IllegalStateException
Cannot enqueue paths as the queue is already marked as…
Error message
Cannot enqueue paths as the queue is already marked as completed
What it means
Producer-consumer protocol guard on the listing queue: enqueue() was called after the producer already marked the listing complete, indicating a bug where extra results are produced after EOF was signalled.
Solutions
- Do not add paths after the listing queue is marked complete; create a new listing instead.
- Fix producer logic to enqueue all paths before completing the queue.
Defensive patterns
Strategy: validation
When it happens
Trigger: Producer enqueues paths into a ListBlobQueue already marked completed.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/7b2b439643eeb1b1.
Report an issue: GitHub.
Appendix: source
Thrown at hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/ListBlobQueue.java:137
boolean getIsCompleted() {
return isCompleted && size() == 0;
}
/** Get the exception from producer.
*
* @return exception from producer
*/
private AzureBlobFileSystemException getException() {
return failureFromProducer;
}
/** Enqueue the paths.
*
* @param pathList list of paths to be enqueued
*/
synchronized void enqueue(List<Path> pathList) {
if (isCompleted) {
throw new IllegalStateException(
"Cannot enqueue paths as the queue is already marked as completed");
}
pathQueue.addAll(pathList);
}
/** Consume the paths.
*
* @return list of paths to be consumed
* @throws AzureBlobFileSystemException if the consumption fails
*/
synchronized List<Path> consume() throws AzureBlobFileSystemException {
AzureBlobFileSystemException exception = getException();
if (exception != null) {
throw exception;
}
return dequeue();
}
View on GitHub (pinned to 2add963021)