Background
- I was planning to use S3 to store the Flink's checkpoints using the
FsStateBackend
. But somehow I was getting the following error.
Error
org.apache.flink.core.fs.UnsupportedFileSystemSchemeException: Could not find a file system implementation for scheme 's3'. The scheme is not directly supported by Flink and no Hadoop file system to support this scheme could be loaded.
Flink version: I am using Flink 1.10.0 version.
I have found the solution for the above issue, so here I am listing it in steps that are required.
Steps
flink-conf.yaml
file which I have listed below.After completing the first step we need to copy the respective(
flink-s3-fs-hadoop-1.10.0.jar
andflink-s3-fs-presto-1.10.0.jar
) JAR files from the opt directory to the plugins directory of your Flink./flink-1.10.0/opt/flink-s3-fs-hadoop-1.10.0.jar
to/flink-1.10.0/plugins/s3-fs-hadoop/flink-s3-fs-hadoop-1.10.0.jar
// Recommended for StreamingFileSink2. Copy
/flink-1.10.0/opt/flink-s3-fs-presto-1.10.0.jar
to/flink-1.10.0/plugins/s3-fs-presto/flink-s3-fs-presto-1.10.0.jar
//Recommended for checkpointingAdd this in checkpointing code
Note:
flink-s3-fs-hadoop
andflink-s3-fs-presto
) in Flink then please uses3p://
specificly forflink-s3-fs-presto
ands3a://
forflink-s3-fs-hadoop
instead ofs3://
.