apache/druid · error · UnsupportedOperationException (UOE)

Cannot stream S3 output

Error message

Cannot stream S3 output

What it means

Unsupported-output sentinel in S3DataSegmentPuller's FileObject: openOutputStream() is rejected because the puller is read-only — S3 segment files can only be read through this FileObject, never written, so any attempt to stream output to S3 via this abstraction fails fast.

Solutions

  1. Do not use S3DataSegmentPuller's FileObject for writing; use the S3 uploader/storage module for writes.
  2. Refactor code that expects a writable FileObject to target a local filesystem instead.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentPuller.java:242 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/146fe0d6a1a60081. Report an issue: GitHub.

Appendix: source

Thrown at extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentPuller.java:242

            @Override
            public void close() throws IOException
            {
              closer.close();
            }
          };
        }
        catch (SdkException e) {
          if (e instanceof S3Exception && ((S3Exception) e).statusCode() == 404) {
            throw new IOE(e, "IndexFile[s3://%s/%s] does not exist", coords.getBucket(), coords.getPath());
          }
          throw new IOE(e, "Could not load S3 URI [%s]", uri);
        }
      }

      @Override
      public OutputStream openOutputStream()
      {
        throw new UOE("Cannot stream S3 output");
      }

      @Override
      public Reader openReader(boolean ignoreEncodingErrors)
      {
        throw new UOE("Cannot open reader");
      }

      @Override
      public CharSequence getCharContent(boolean ignoreEncodingErrors)
      {
        throw new UOE("Cannot open character sequence");
      }

      @Override
      public Writer openWriter()
      {
        throw new UOE("Cannot open writer");

View on GitHub (pinned to 9b90983fd2)