Details
-
Bug
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
2.7.0
-
None
-
None
-
None
Description
The harfs overrides the "getUriDefaultPort" method of AbstractFilesystem, and returns "-1" . But "-1" can't pass the "checkPath" method when the fs.defaultfs is setted without port(like hdfs://hacluster)
Test Code :
for (FileStatus file : files) { String[] edges = file.getPath().getName().split("-"); if (applicationId.toString().compareTo(edges[0]) >= 0 && applicationId.toString().compareTo(edges[1]) <= 0) { Path harPath = new Path("har://" + file.getPath().toUri().getPath()); harPath = harPath.getFileSystem(conf).makeQualified(harPath); remoteAppDir = LogAggregationUtils.getRemoteAppLogDir( harPath, applicationId, appOwner, LogAggregationUtils.getRemoteNodeLogDirSuffix(conf)); if (FileContext.getFileContext(remoteAppDir.toUri()).util().exists(remoteAppDir)) { remoteDirSet.add(remoteAppDir); }