Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
1.10.0
-
None
Description
The Yarn application directory of Flink is "/user/
{user.name}/.flink", but this logic is separated in different places.
1. org.apache.flink.yarn.YarnClusterDescriptor#getYarnFilesDir
private Path getYarnFilesDir(final ApplicationId appId) throws IOException { final FileSystem fileSystem = FileSystem.get(yarnConfiguration); final Path homeDir = fileSystem.getHomeDirectory(); return new Path(homeDir, ".flink/" + appId + '/'); }
2. org.apache.flink.yarn.Utils#uploadLocalFileToRemote
// copy resource to HDFS String suffix = ".flink/" + appId + (relativeTargetPath.isEmpty() ? "" : "/" + relativeTargetPath) + "/" + localSrcPath.getName(); Path dst = new Path(homedir, suffix);
We can extract `getYarnFilesDir` method to `org.apache.flink.yarn.Utils`, and use this method to get Yarn application directory in all the other places.
Attachments
Issue Links
- duplicates
-
FLINK-17515 Move YARN staging functionality to a separate class
- Closed
- links to