apache/hadoop · error · IOException

Waiting for writer thread is interrupted.

Error message

Waiting for writer thread is interrupted.

What it means

Error "Waiting for writer thread is interrupted." thrown in apache/hadoop.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/LocalReplicaInPipeline.java:279

          (!thread.isAlive())) {
        if (writer.compareAndSet(thread, null)) {
          return; // Done
        }
        // The writer changed.  Go back to the start of the loop and attempt to
        // stop the new writer.
        continue;
      }
      thread.interrupt();
      try {
        thread.join(xceiverStopTimeout);
        if (thread.isAlive()) {
          // Our thread join timed out.
          final String msg = "Join on writer thread " + thread + " timed out";
          DataNode.LOG.warn(msg + "\n" + StringUtils.getStackTrace(thread));
          throw new IOException(msg);
        }
      } catch (InterruptedException e) {
        throw new IOException("Waiting for writer thread is interrupted.");
      }
    }
  }

  @Override  // Object
  public int hashCode() {
    return super.hashCode();
  }

  @Override // ReplicaInPipeline
  public ReplicaOutputStreams createStreams(boolean isCreate,
      DataChecksum requestedChecksum) throws IOException {
    final File blockFile = getBlockFile();
    final File metaFile = getMetaFile();
    if (DataNode.LOG.isDebugEnabled()) {
      DataNode.LOG.debug("writeTo blockfile is " + blockFile +
                         " of size " + blockFile.length());
      DataNode.LOG.debug("writeTo metafile is " + metaFile +

View on GitHub (pinned to 2add963021)

Solutions

  1. Usually benign during shutdown or aborted writes; no action required.
  2. If recurring without shutdown, find the source of interrupts in the surrounding pipeline handling.

When it happens

Trigger: The thread waiting for the replica writer to complete is interrupted, commonly during DataNode shutdown or write abort.

Common situations: Waiting for the writer thread was interrupted, usually during shutdown or pipeline recovery. Safe to ignore during planned restarts.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/307d6e6c425f4fc3. Report an issue: GitHub.