Skip to content

Commit

Permalink
[fix](azure) let backup to azure work and use https for azure
Browse files Browse the repository at this point in the history
  • Loading branch information
Yongqiang YANG committed Dec 26, 2024
1 parent ac385e5 commit a586fd5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ public enum StorageType {
GFS("Tencent Goose File System"),
JFS("Juicefs"),
STREAM("Stream load pipe"),
// decrepated
AZURE("MicroSoft Azure Blob");

@SerializedName("desc")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ private static Map<String, String> getBeAWSPropertiesFromS3(Map<String, String>
if (properties.containsKey(PropertyConverter.USE_PATH_STYLE)) {
beProperties.put(PropertyConverter.USE_PATH_STYLE, properties.get(PropertyConverter.USE_PATH_STYLE));
}
if (properties.containsKey(S3Properties.PROVIDER)) {
beProperties.put(S3Properties.PROVIDER, properties.get(S3Properties.PROVIDER));
}

return beProperties;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.apache.doris.fs.remote;

import org.apache.doris.analysis.StorageBackend;
import org.apache.doris.analysis.StorageBackend.StorageType;
import org.apache.doris.backup.Status;
import org.apache.doris.common.UserException;
Expand All @@ -35,13 +34,13 @@ public class AzureFileSystem extends ObjFileSystem {
private static final Logger LOG = LogManager.getLogger(AzureFileSystem.class);

public AzureFileSystem(Map<String, String> properties) {
super(StorageType.AZURE.name(), StorageType.AZURE, new AzureObjStorage(properties));
super(StorageType.AZURE.name(), StorageType.S3, new AzureObjStorage(properties));
initFsProperties();
}

@VisibleForTesting
public AzureFileSystem(AzureObjStorage storage) {
super(StorageBackend.StorageType.AZURE.name(), StorageBackend.StorageType.AZURE, storage);
super(StorageType.AZURE.name(), StorageType.S3, storage);
initFsProperties();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
import org.apache.doris.datasource.trinoconnector.TrinoConnectorExternalDatabase;
import org.apache.doris.datasource.trinoconnector.TrinoConnectorExternalTable;
import org.apache.doris.fs.PersistentFileSystem;
import org.apache.doris.fs.remote.AzureFileSystem;
import org.apache.doris.fs.remote.BrokerFileSystem;
import org.apache.doris.fs.remote.ObjFileSystem;
import org.apache.doris.fs.remote.S3FileSystem;
Expand Down Expand Up @@ -566,7 +567,8 @@ public class GsonUtils {
.registerSubtype(JFSFileSystem.class, JFSFileSystem.class.getSimpleName())
.registerSubtype(OFSFileSystem.class, OFSFileSystem.class.getSimpleName())
.registerSubtype(ObjFileSystem.class, ObjFileSystem.class.getSimpleName())
.registerSubtype(S3FileSystem.class, S3FileSystem.class.getSimpleName());
.registerSubtype(S3FileSystem.class, S3FileSystem.class.getSimpleName())
.registerSubtype(AzureFileSystem.class, AzureFileSystem.class.getSimpleName());

private static RuntimeTypeAdapterFactory<org.apache.doris.backup.AbstractJob>
jobBackupTypeAdapterFactory
Expand Down

0 comments on commit a586fd5

Please sign in to comment.