github-actions[bot] commented on code in PR #62511:
URL: https://github.com/apache/doris/pull/62511#discussion_r3084083741


##########
fe/fe-filesystem/README.md:
##########
@@ -0,0 +1,382 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Doris FE Filesystem Module
+
+The `fe-filesystem` module provides a **pluggable filesystem abstraction** for 
the Doris FE
+(Frontend). It decouples the query engine (`fe-core`) from concrete storage 
backends (S3, HDFS,
+Azure Blob, etc.) at both the Maven dependency level and the runtime classpath 
level.
+
+Each storage backend is a self-contained plugin that is discovered and loaded 
at FE startup—no
+modification to `fe-core` is required to add a new storage backend.
+
+## Module Structure
+
+```
+fe-filesystem/                        (aggregator POM — no Java code)
+│
+├── fe-filesystem-api/                [API]  Core abstractions (FileSystem, 
Location, …)
+├── fe-filesystem-spi/                [SPI]  Provider interface + 
object-storage contracts
+│
+├── fe-filesystem-s3/                 [IMPL] AWS S3 / S3-compatible (MinIO, …)
+├── fe-filesystem-oss/                [IMPL] Alibaba Cloud OSS  (delegates to 
S3)
+├── fe-filesystem-cos/                [IMPL] Tencent Cloud COS  (delegates to 
S3)
+├── fe-filesystem-obs/                [IMPL] Huawei Cloud OBS   (delegates to 
S3)
+├── fe-filesystem-azure/              [IMPL] Azure Blob Storage
+├── fe-filesystem-hdfs/               [IMPL] HDFS / ViewFS / OFS / JFS
+├── fe-filesystem-local/              [IMPL] Local filesystem   (testing only)
+└── fe-filesystem-broker/             [IMPL] Doris Broker process (Thrift RPC)
+```
+
+### Layering
+
+| Layer | Module | Compiled into fe-core? | Deployed as plugin? |
+|-------|--------|:-----:|:------:|
+| **API** | `fe-filesystem-api` | ✅ Yes | ❌ No |
+| **SPI** | `fe-filesystem-spi` | ✅ Yes | ❌ No |
+| **IMPL** | `fe-filesystem-s3`, `-hdfs`, … | ❌ No | ✅ Yes |
+
+* **API** — Pure-JDK interfaces and value types consumed by `fe-core` (zero 
third-party
+  dependencies). Defines `FileSystem`, `Location`, `FileEntry`, 
`DorisInputFile`,
+  `DorisOutputFile`, etc.
+* **SPI** — The `FileSystemProvider` interface (extends `PluginFactory` from 
`fe-extension-spi`)
+  plus the object-storage layer (`ObjStorage`, `ObjFileSystem`, 
`HadoopAuthenticator`). Also
+  compiled into `fe-core`.
+* **IMPL** — Concrete backends. Each one depends only on `fe-filesystem-spi` 
(and transitively on
+  `fe-filesystem-api`). They **must not** depend on `fe-core`, `fe-common`, or 
`fe-catalog`.
+
+## How It Works
+
+### Plugin Discovery & Loading
+
+At FE startup, `Env.initFileSystemPluginManager()` creates a 
`FileSystemPluginManager` and loads
+providers in two phases:
+
+1. **ServiceLoader scan** — Discovers `FileSystemProvider` implementations 
already on the
+   classpath (built-in providers, test overrides).
+2. **Directory plugin scan** — Uses `DirectoryPluginRuntimeManager` to scan 
the directory
+   configured by `Config.filesystem_plugin_root` (default: 
`${DORIS_HOME}/plugins/filesystem`).
+   Each subdirectory is expected to contain a plugin zip produced by the Maven 
assembly plugin.

Review Comment:
   `DirectoryPluginRuntimeManager` does not consume zip files from each plugin 
subdirectory. It treats each direct child of `filesystem_plugin_root` as the 
already-unpacked plugin directory and then resolves `pluginDir/*.jar + 
pluginDir/lib/*.jar` from there 
(`fe-extension-loader/.../DirectoryPluginRuntimeManager.java`). If someone 
follows this sentence literally and drops `doris-fe-filesystem-gcs.zip` into 
`${DORIS_HOME}/plugins/filesystem/gcs/`, discovery fails with `No jar found 
under plugin directory`. Please reword this to describe the unpacked runtime 
layout, and keep the zip only as the build artifact that gets unzipped before 
deployment.



-- 
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]

Reply via email to