[BugFix] Support for using core-site.xml if load properties are not set in old broker load (#24804)
If there is no properties in the broker load command, it should roll back to read the core-site.xml to apply. Signed-off-by: miomiocat <284487410@qq.com>
This commit is contained in:
parent
46476458ca
commit
bec9039df8
|
|
@ -745,9 +745,15 @@ public class FileSystemManager {
|
|||
logger.info("could not find file system for path " + path + " create a new one");
|
||||
// create a new filesystem
|
||||
Configuration conf = new Configuration();
|
||||
conf.set(FS_OSS_ACCESS_KEY, accessKey);
|
||||
conf.set(FS_OSS_SECRET_KEY, secretKey);
|
||||
conf.set(FS_OSS_ENDPOINT, endpoint);
|
||||
if (!accessKey.isEmpty()) {
|
||||
conf.set(FS_OSS_ACCESS_KEY, accessKey);
|
||||
}
|
||||
if (!secretKey.isEmpty()) {
|
||||
conf.set(FS_OSS_SECRET_KEY, secretKey);
|
||||
}
|
||||
if (!endpoint.isEmpty()) {
|
||||
conf.set(FS_OSS_ENDPOINT, endpoint);
|
||||
}
|
||||
conf.set(FS_OSS_IMPL, "org.apache.hadoop.fs.aliyun.oss.AliyunOSSFileSystem");
|
||||
conf.set(FS_OSS_IMPL_DISABLE_CACHE, disableCache);
|
||||
FileSystem ossFileSystem = FileSystem.get(pathUri.getUri(), conf);
|
||||
|
|
|
|||
Loading…
Reference in New Issue