Wai Yeung Chong
03/05/2024, 4:18 AMString outputPath = AzureBlobUtil.getWASBUnencryptedPath(systemContext.getBlobSinkConfig());
FileSink<EventData> sink = FileSink
.forBulkFormat(new Path(outputPath), new AvroDatumWriterFactory<EventData>(EventData.getClassSchema()))
.withBucketAssigner(new DateTimeBucketAssigner<>("yyyyMMdd", Configuration.zoneIdHongKong))
.withRollingPolicy(OnCheckpointRollingPolicy.build())
.build();
However, I encountered an error message: "Caused by: org.apache.flink.core.fs.UnsupportedFileSystemSchemeException: Could not find a file system implementation for scheme 'wasb'. The scheme is directly supported by Flink through the following plugin(s): flink-fs-azure-hadoop. Please ensure that each plugin resides within its own subfolder within the plugins directory."
According to the error message, I understand that I need to add the required plugin to Flink. I tried adding the dependency to the Flink job, but it didn't work:
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-azure-fs-hadoop</artifactId>
<version>1.18.1</version>
<scope>provided</scope>
</dependency>
Can someone please guide me on how to correctly add the plugin to Flink?