{"record":{"id":"7b2b439643eeb1b1","repo":"apache/hadoop","slug":"cannot-enqueue-paths-as-the-queue-is-already-marke","errorCode":null,"errorMessage":"Cannot enqueue paths as the queue is already marked as completed","messagePattern":"Cannot enqueue paths as the queue is already marked as completed","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/ListBlobQueue.java","lineNumber":137,"sourceCode":"  boolean getIsCompleted() {\n    return isCompleted && size() == 0;\n  }\n\n  /** Get the exception from producer.\n   *\n   * @return exception from producer\n   */\n  private AzureBlobFileSystemException getException() {\n    return failureFromProducer;\n  }\n\n  /** Enqueue the paths.\n   *\n   * @param pathList list of paths to be enqueued\n   */\n  synchronized void enqueue(List<Path> pathList) {\n    if (isCompleted) {\n      throw new IllegalStateException(\n          \"Cannot enqueue paths as the queue is already marked as completed\");\n    }\n    pathQueue.addAll(pathList);\n  }\n\n  /** Consume the paths.\n   *\n   * @return list of paths to be consumed\n   * @throws AzureBlobFileSystemException if the consumption fails\n   */\n  synchronized List<Path> consume() throws AzureBlobFileSystemException {\n    AzureBlobFileSystemException exception = getException();\n    if (exception != null) {\n      throw exception;\n    }\n    return dequeue();\n  }\n","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/ListBlobQueue.java#L119-L155","documentation":"Error \"Cannot enqueue paths as the queue is already marked as completed\" thrown in apache/hadoop.","triggerScenarios":"Producer enqueues paths into a ListBlobQueue already marked completed.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}