ByteYue commented on code in PR #32416:
URL: https://github.com/apache/doris/pull/32416#discussion_r1528668274
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/HdfsResource.java:
##########
@@ -63,16 +71,63 @@ public HdfsResource(String name) {
properties = Maps.newHashMap();
}
+ private static void pingHdfs(String hdfsUri, Map<String, String>
properties) throws DdlException {
+ String testFile = hdfsUri + "/test_hdfs_valid.txt";
+ Map<String, String> propertiesPing = new HashMap<>();
+ propertiesPing.put(HADOOP_FS_NAME, hdfsUri);
+ properties.putAll(propertiesPing);
+ DFSFileSystem dfsSystem = new DFSFileSystem(properties);
Review Comment:
The best practice would be to create one FIleSystem from the
FileSystemFactory.java factory class instead of directly just new one fs.
--
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]