Henry2SS commented on a change in pull request #8336: URL: https://github.com/apache/incubator-doris/pull/8336#discussion_r821278406
########## File path: fe/fe-core/src/main/java/org/apache/doris/analysis/ExportStmt.java ########## @@ -232,16 +232,17 @@ public static String checkPath(String path, StorageBackend.StorageType type) thr if (Strings.isNullOrEmpty(path)) { throw new AnalysisException("No dest path specified."); } - + if (type == StorageBackend.StorageType.BROKER) { + if (!path.toLowerCase().contains("bos") && !path.toLowerCase().contains("afs") + && !path.toLowerCase().contains("hdfs")) { + throw new AnalysisException("Invalid export path. please use valid 'HDFS://', 'AFS://' or 'BOS://' path."); + } + return path; + } Review comment: `checkPath` only do a pre-check, it checks the input style. If the path is not a valid one, an error will be thrown out as expected. ``` type:ETL_RUN_FAIL; msg:errCode = 2, detailMessage = Broker list path failed. ``` And maybe change `path.contains` to `path.startsWith`, is it better? What's your opinions? -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org