morningman commented on code in PR #19098:
URL: https://github.com/apache/doris/pull/19098#discussion_r1180164738
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/HiveMetaStoreClientHelper.java:
##########
@@ -212,10 +213,10 @@ public static String normalizeS3LikeSchema(String
location) {
}
private static String getAllFileStatus(List<TBrokerFileStatus>
fileStatuses,
- List<RemoteIterator<LocatedFileStatus>> remoteIterators,
BlobStorage storage) throws UserException {
- boolean needFullPath = storage.getStorageType() ==
StorageBackend.StorageType.S3
- || storage.getStorageType() == StorageBackend.StorageType.OFS
- || storage.getStorageType() == StorageBackend.StorageType.JFS;
+ List<RemoteIterator<LocatedFileStatus>> remoteIterators,
RemoteFileSystem fs) throws UserException {
+ boolean needFullPath = fs.getStorageType() ==
StorageBackend.StorageType.S3
Review Comment:
Avoid this kind of code. Because if we add a new type of FS later, we may
miss this place.
You can add a new interface `fs.needFullPath()` and handle it in the
interface.
##########
fe/fe-core/src/main/java/org/apache/doris/fs/FileSystemFactory.java:
##########
@@ -33,7 +38,7 @@ public static FileSystem get(StorageBackend.StorageType type,
Map<String, String
return get(type.name(), type, properties);
}
- public static FileSystem get(String name, StorageBackend.StorageType type,
Map<String, String> properties) {
+ public static RemoteFileSystem get(String name, StorageBackend.StorageType
type, Map<String, String> properties) {
Review Comment:
`StorageBackend.StorageType` can be removed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]