Skip to content

Commit 576c814

Browse files
authored
[Enhancement] Improve files from s3 without ak and sk error message (StarRocks#49090)
Signed-off-by: wyb <wybb86@gmail.com>
1 parent e2c37db commit 576c814

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

fe/fe-core/src/main/java/com/starrocks/fs/hdfs/HdfsFsManager.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,12 @@ private HdfsFs getFileSystemByCloudConfiguration(CloudConfiguration cloudConfigu
698698
// Disable cache for KS3
699699
conf.set(FS_KS3_IMPL_DISABLE_CACHE, "true");
700700

701+
// select * from files("path" = "s3://bucket/file", "format" = "parquet"),
702+
// CloudConfigurationFactory.buildCloudConfigurationForStorage() returns CloudConfiguration,
703+
// and FileSystem.getFileSystemClass() returns "No FileSystem for scheme s3" error.
704+
// Set fs.s3.impl to report error explicitly.
705+
conf.set("fs.s3.impl", "org.apache.hadoop.fs.s3a.S3AFileSystem");
706+
701707
FileSystem innerFileSystem = FileSystem.get(pathUri.getUri(), conf);
702708
fileSystem.setFileSystem(innerFileSystem);
703709
fileSystem.setConfiguration(conf);

0 commit comments

Comments
 (0)