apache/druid · error · UnsupportedOperationException (UOE)
Cannot open character sequence
Error message
Cannot open character sequence
What it means
Unsupported-operation sentinel in S3DataSegmentPuller's FileObject: getCharContent() is rejected since the S3 object is exposed only as a binary stream and cannot be materialized as a character sequence through the FileObject contract.
Solutions
- Read via openInputStream() and decode characters explicitly if needed.
- Avoid calling getCharContent() on S3-backed FileObjects.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentPuller.java:254 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/4fc9869701f57f1f.
Report an issue: GitHub.
Appendix: source
Thrown at extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentPuller.java:254
}
}
@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");
}
@Override
public long getLastModified()
{
if (s3InputStream != null) {
Instant lastModified = s3InputStream.response().lastModified();
return lastModified != null ? lastModified.toEpochMilli() : 0L;
}
if (objectMetadata == null) {
objectMetadata = S3Utils.getSingleObjectMetadata(s3Client, coords.getBucket(), coords.getPath());
}View on GitHub (pinned to 9b90983fd2)