You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/07/29 17:44:48 UTC

[GitHub] [flink] tillrohrmann commented on a change in pull request #13014: [FLINK-18493][Deployment / YARN]Make target home directory used to store yarn files configurable

tillrohrmann commented on a change in pull request #13014:
URL: https://github.com/apache/flink/pull/13014#discussion_r462277888



##########
File path: flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
##########
@@ -1054,6 +1054,16 @@ private ApplicationReport startAppMaster(
 		return report;
 	}
 
+	/**
+	 * Returns the configured remote target home directory if set, otherwise returns the default home directory.
+	 * @param fileSystem file system used
+	 * @return the remote target home directory
+	 */
+	private Path getStagingDir(FileSystem fileSystem) {
+		final String configuredStagingDir = flinkConfiguration.getString(YarnConfigOptions.STAGING_DIRECTORY);
+		return configuredStagingDir != null ? new Path(configuredStagingDir) : fileSystem.getHomeDirectory();

Review comment:
       ```suggestion
   		return configuredStagingDir != null ? fileSystem.makeQualified(new Path(configuredStagingDir)) : fileSystem.getHomeDirectory();
   ```

##########
File path: flink-yarn/src/main/java/org/apache/flink/yarn/configuration/YarnConfigOptions.java
##########
@@ -196,6 +196,12 @@
 
 	// ----------------------- YARN CLI OPTIONS ------------------------------------
 
+	public static final ConfigOption<String> STAGING_DIRECTORY =
+		key("yarn.staging-directory")
+			.stringType()
+			.noDefaultValue()
+			.withDescription("Staging directory used to store YARN files while submitting applications.");

Review comment:
       ```suggestion
   			.withDescription("Staging directory used to store YARN files while submitting applications. Per default, it uses the home directory of the configured file system.");
   ```




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org