[Improvement](broker) support broker load from tencent Goose File System (#18745)

Including below functions:
1. broker load
2. export
3. select into outfile
4. create repo and backup to gfs
after config env, use gfs like other hdfs system.
This commit is contained in:
Yulei-Yang
2023-04-20 23:12:17 +08:00
committed by GitHub
parent 2c79f630fb
commit c6b1b9de80
9 changed files with 44 additions and 1 deletions

View File

@ -277,9 +277,10 @@ public class ExportStmt extends StatementBase {
&& !schema.equalsIgnoreCase("oss")
&& !schema.equalsIgnoreCase("s3a")
&& !schema.equalsIgnoreCase("cosn")
&& !schema.equalsIgnoreCase("gfs")
&& !schema.equalsIgnoreCase("jfs"))) {
throw new AnalysisException("Invalid broker path. please use valid 'hdfs://', 'afs://' , 'bos://',"
+ " 'ofs://', 'obs://', 'oss://', 's3a://', 'cosn://' or 'jfs://' path.");
+ " 'ofs://', 'obs://', 'oss://', 's3a://', 'cosn://', 'gfs://' or 'jfs://' path.");
}
} else if (type == StorageBackend.StorageType.S3) {
if (schema == null || !schema.equalsIgnoreCase("s3")) {

View File

@ -101,6 +101,7 @@ public class StorageBackend implements ParseNode {
HDFS("Hadoop Distributed File System"),
LOCAL("Local file system"),
OFS("Tencent CHDFS"),
GFS("Tencent Goose File System"),
JFS("Juicefs"),
STREAM("Stream load pipe");

View File

@ -52,6 +52,7 @@ public abstract class BlobStorage implements Writable {
return new S3Storage(properties);
} else if (type == StorageBackend.StorageType.HDFS
|| type == StorageBackend.StorageType.OFS
|| type == StorageBackend.StorageType.GFS
|| type == StorageBackend.StorageType.JFS) {
BlobStorage storage = new HdfsStorage(properties);
// as of ofs files, use hdfs storage, but it's type should be ofs