Copilot commented on code in PR #61031:
URL: https://github.com/apache/doris/pull/61031#discussion_r2881698980
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/ResourceMgr.java:
##########
@@ -75,7 +75,8 @@ public ResourceMgr() {
public void createResource(CreateResourceCommand command) throws
DdlException {
CreateResourceInfo info = command.getInfo();
if (info.getResourceType() == ResourceType.UNKNOWN) {
- throw new DdlException("Only support SPARK, ODBC_CATALOG ,JDBC,
S3_COOLDOWN, S3, HDFS and HMS resource.");
+ throw new DdlException(
+ "Only support SPARK, ODBC_CATALOG ,JDBC, S3_COOLDOWN, S3,
HDFS(JFS/JUICEFS), and HMS resource.");
Review Comment:
The updated error message still contains a spacing typo: `ODBC_CATALOG
,JDBC` (space before the comma). Since this string was modified in this PR,
it’s a good opportunity to fix the punctuation for clarity/consistency (e.g.
`ODBC_CATALOG, JDBC`).
```suggestion
"Only support SPARK, ODBC_CATALOG, JDBC, S3_COOLDOWN,
S3, HDFS(JFS/JUICEFS), and HMS resource.");
```
##########
regression-test/suites/external_table_p0/refactor_storage_param/test_jfs_hms_catalog_read.groovy:
##########
@@ -0,0 +1,80 @@
+// 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.
+
+suite("test_jfs_hms_catalog_read", "p0,external") {
+ String enableJfs = context.config.otherConfigs.get("enableJfsTest")
+ if (enableJfs == null || !enableJfs.equalsIgnoreCase("true")) {
+ logger.info("disable JFS test.")
+ return
+ }
+
+ String enableHive = context.config.otherConfigs.get("enableHiveTest")
+ if (enableHive == null || !enableHive.equalsIgnoreCase("true")) {
+ logger.info("disable Hive test.")
+ return
+ }
+
+ String jfsFs = context.config.otherConfigs.get("jfsFs")
+ if (jfsFs == null || jfsFs.trim().isEmpty()) {
+ logger.info("skip JFS test because jfsFs is empty.")
+ return
+ }
+
+ String jfsImpl = context.config.otherConfigs.get("jfsImpl")
+ if (jfsImpl == null || jfsImpl.trim().isEmpty()) {
+ jfsImpl = "io.juicefs.JuiceFileSystem"
+ }
+
+ String hdfsUser = context.config.otherConfigs.get("hdfsUser")
+ if (hdfsUser == null || hdfsUser.trim().isEmpty()) {
+ hdfsUser = "hive"
+ }
+
+ String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
+ String hmsPort = context.config.otherConfigs.get("hive2HmsPort")
+ String hmsUris = context.config.otherConfigs.get("jfsHiveMetastoreUris")
+ if (hmsUris == null || hmsUris.trim().isEmpty()) {
Review Comment:
When `jfsHiveMetastoreUris` is not provided, `hmsUris` falls back to
`thrift://${externalEnvIp}:${hmsPort}`. If either `externalEnvIp` or
`hive2HmsPort` is unset, this becomes `thrift://null:null` and the test will
fail with a confusing metastore connection error. Consider explicitly
validating `externalEnvIp`/`hmsPort` are non-empty before building the default,
and otherwise skipping with a clear log message.
```suggestion
if (hmsUris == null || hmsUris.trim().isEmpty()) {
if (externalEnvIp == null || externalEnvIp.trim().isEmpty()
|| hmsPort == null || hmsPort.trim().isEmpty()) {
logger.info("skip JFS HMS catalog test because externalEnvIp or
hive2HmsPort is empty.")
return
}
```
##########
regression-test/suites/external_table_p0/refactor_storage_param/test_jfs_hms_catalog_read.groovy:
##########
@@ -0,0 +1,80 @@
+// 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.
+
+suite("test_jfs_hms_catalog_read", "p0,external") {
Review Comment:
This suite is missing the common `external_docker`/`hive` tags used by other
suites in `external_table_p0/refactor_storage_param` (e.g.
`hdfs_load_default_file_format`, `hdfs_all_test`). Without those tags it may be
selected by the wrong CI job even though it depends on the external docker
Hive/JFS env. Consider aligning the tag list with the other Hive-based suites
(e.g. include `external_docker,hive,external_docker_hive`).
```suggestion
suite("test_jfs_hms_catalog_read",
"p0,external,external_docker,hive,external_docker_hive") {
```
##########
fe/fe-core/src/test/java/org/apache/doris/common/util/LocationPathTest.java:
##########
@@ -110,9 +110,9 @@ public void testJFSLocationConvert() {
// BE
String loc = locationPath.toStorageLocation().toString();
Assertions.assertTrue(loc.startsWith("jfs://"));
Review Comment:
`testJFSLocationConvert` now asserts `FileSystemType.HDFS`, which makes the
test name a bit misleading (it’s really verifying that `jfs://` is treated as
HDFS-compatible). Consider renaming the test method or adding a short comment
explaining the intentional mapping to avoid confusion for future readers.
```suggestion
Assertions.assertTrue(loc.startsWith("jfs://"));
// jfs is intentionally treated as HDFS-compatible in the current
implementation
```
--
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]