Hi all, I have got the following exception while t...
# troubleshooting
m
Hi all, I have got the following exception while the creation of
FileSink
.
Copy code
Caused by: java.lang.IllegalStateException: Cannot create commit operator for Sink: Committer
        at org.apache.flink.streaming.runtime.operators.sink.CommitterOperatorFactory.createStreamOperator(CommitterOperatorFactory.java:77) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.api.operators.StreamOperatorFactoryUtil.createOperator(StreamOperatorFactoryUtil.java:81) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.OperatorChain.createOperator(OperatorChain.java:868) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.OperatorChain.createOperatorChain(OperatorChain.java:836) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.OperatorChain.createOutputCollector(OperatorChain.java:732) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.OperatorChain.createOperatorChain(OperatorChain.java:825) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.OperatorChain.createOutputCollector(OperatorChain.java:732) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.OperatorChain.<init>(OperatorChain.java:202) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.RegularOperatorChain.<init>(RegularOperatorChain.java:60) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.StreamTask.restoreInternal(StreamTask.java:730) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.StreamTask.restore(StreamTask.java:712) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:958) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:751) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.runtime.taskmanager.Task.run(Task.java:566) ~[flink-dist-1.19.0.jar:1.19.0]
        at java.lang.Thread.run(Unknown Source) ~[?:?]
Caused by: java.lang.UnsupportedOperationException: This s3 file system implementation does not support recoverable writers.
        at org.apache.flink.fs.s3.common.FlinkS3FileSystem.createRecoverableWriter(FlinkS3FileSystem.java:136) ~[?:?]
        at org.apache.flink.core.fs.PluginFileSystemFactory$ClassLoaderFixingFileSystem.createRecoverableWriter(PluginFileSystemFactory.java:134) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.core.fs.SafetyNetWrapperFileSystem.createRecoverableWriter(SafetyNetWrapperFileSystem.java:70) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.connector.file.sink.FileSink$BulkFormatBuilder.createBucketWriter(FileSink.java:698) ~[flink-connector-files-1.19.0.jar:1.19.0]
        at org.apache.flink.connector.file.sink.FileSink$BulkFormatBuilder.getCommittableSerializer(FileSink.java:689) ~[flink-connector-files-1.19.0.jar:1.19.0]
        at org.apache.flink.connector.file.sink.FileSink.getCommittableSerializer(FileSink.java:187) ~[flink-connector-files-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.operators.sink.CommitterOperatorFactory.createStreamOperator(CommitterOperatorFactory.java:64) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.api.operators.StreamOperatorFactoryUtil.createOperator(StreamOperatorFactoryUtil.java:81) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.OperatorChain.createOperator(OperatorChain.java:868) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.OperatorChain.createOperatorChain(OperatorChain.java:836) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.OperatorChain.createOutputCollector(OperatorChain.java:732) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.OperatorChain.createOperatorChain(OperatorChain.java:825) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.OperatorChain.createOutputCollector(OperatorChain.java:732) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.OperatorChain.<init>(OperatorChain.java:202) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.RegularOperatorChain.<init>(RegularOperatorChain.java:60) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.StreamTask.restoreInternal(StreamTask.java:730) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.streaming.runtime.tasks.StreamTask.restore(StreamTask.java:712) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:958) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:751) ~[flink-dist-1.19.0.jar:1.19.0]
        at org.apache.flink.runtime.taskmanager.Task.run(Task.java:566) ~[flink-dist-1.19.0.jar:1.19.0]
I'm using flink 1.19. Can someone assist me in understanding why I'm getting this, and how I can resolve it!
a
I'm not sure if that can solve your problem but I'd give a try to
s3a
rather
s3
.
m
Already tried. I'm getting:
Copy code
Caused by: org.apache.flink.core.fs.UnsupportedFileSystemSchemeException: Could not find a file system implementation for scheme 's3a'. The scheme is directly supported by Flink through the following plugin(s): flink-s3-fs-hadoop. Please ensure that each plugin resides within its own subfolder within the plugins directory. See https://nightlies.apache.org/flink/flink-docs-stable/docs/deployment/filesystems/plugins/ for more information. If you want to use a Hadoop file system for that scheme, please add the scheme to the configuration fs.allowed-fallback-filesystems. For a full list of supported file systems, please see https://nightlies.apache.org/flink/flink-docs-stable/ops/filesystems/.
Although I've configured flink-s3-fs-hadoop jar configured under plugins folder.
a
The first exception is thrown because it picks up the presto implementation:
```public RecoverableWriter createRecoverableWriter() throws IOException {
if (s3AccessHelper == null) {
// this is the case for Presto
throw new UnsupportedOperationException(
"This s3 file system implementation does not support recoverable writers.");
}```
i.e. right thing to do (if you want to use both e.g. the presto implementation to save checkpoints and the hadoop implementation for your FileSink) is to use the s3a:// schema when you set the target for you FileSink so that it picks up the hadoop one. Alternatively you can delete presto implementation and use s3://, but presto might be more efficient for saving checkpoints.
Although I've configured flink-s3-fs-hadoop jar configured under plugins folder.
I would sugest to double check it. I think it loads jars only from subfolders. Make sure you followed the example from https://nightlies.apache.org/flink/flink-docs-release-1.19/docs/deployment/filesystems/overview/#pluggable-file-systems
πŸ‘ 1
You can also check logs emitted by:
org.apache.flink.core.plugin.DefaultPluginManager
it should log something like "Plugin loader with ID ..." for each found plugin
m
Hi @Andrey Kaygorodov thanks for the detailed explanation. You're right my app was using presto jar instead of hadoop jar. For some reason the taskmanager was using an image which has presto support only. I figured out by accessing the task manager pod, but the utilizing the log is an easier option. Thanks for suggesting it!
πŸ™Œ 1