You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2018/07/19 11:41:48 UTC
[3/3] flink git commit: [hotfix] Fix checkstyle violations in
BootstrapTool
[hotfix] Fix checkstyle violations in BootstrapTool
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/248bb2c4
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/248bb2c4
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/248bb2c4
Branch: refs/heads/release-1.5
Commit: 248bb2c44d80c746a7f1f1389047c51e53d3b6b7
Parents: 221a2b3
Author: Till Rohrmann <tr...@apache.org>
Authored: Wed Jul 18 15:49:55 2018 +0200
Committer: Till Rohrmann <tr...@apache.org>
Committed: Thu Jul 19 11:48:25 2018 +0200
----------------------------------------------------------------------
.../clusterframework/BootstrapTools.java | 23 +++++++++-----------
1 file changed, 10 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/248bb2c4/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java b/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java
index ebe7140..b43946c 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java
@@ -270,8 +270,7 @@ public class BootstrapTools {
*/
public static void writeConfiguration(Configuration cfg, File file) throws IOException {
try (FileWriter fwrt = new FileWriter(file);
- PrintWriter out = new PrintWriter(fwrt))
- {
+ PrintWriter out = new PrintWriter(fwrt)) {
for (String key : cfg.keySet()) {
String value = cfg.getString(key, null);
out.print(key);
@@ -331,7 +330,7 @@ public class BootstrapTools {
/**
* Get an instance of the dynamic properties option.
*
- * Dynamic properties allow the user to specify additional configuration values with -D, such as
+ * <p>Dynamic properties allow the user to specify additional configuration values with -D, such as
* <tt> -Dfs.overwrite-files=true -Dtaskmanager.network.memory.min=536346624</tt>
*/
public static Option newDynamicPropertiesOption() {
@@ -345,13 +344,13 @@ public class BootstrapTools {
final Configuration config = new Configuration();
String[] values = cmd.getOptionValues(DYNAMIC_PROPERTIES_OPT);
- if(values != null) {
- for(String value : values) {
+ if (values != null) {
+ for (String value : values) {
String[] pair = value.split("=", 2);
- if(pair.length == 1) {
+ if (pair.length == 1) {
config.setString(pair[0], Boolean.TRUE.toString());
}
- else if(pair.length == 2) {
+ else if (pair.length == 2) {
config.setString(pair[0], pair[1]);
}
}
@@ -401,7 +400,7 @@ public class BootstrapTools {
}
//applicable only for YarnMiniCluster secure test run
//krb5.conf file will be available as local resource in JM/TM container
- if(hasKrb5) {
+ if (hasKrb5) {
javaOpts += " -Djava.security.krb5.conf=krb5.conf";
}
startCommandValues.put("jvmopts", javaOpts);
@@ -439,12 +438,11 @@ public class BootstrapTools {
// ------------------------------------------------------------------------
- /** Private constructor to prevent instantiation */
+ /** Private constructor to prevent instantiation. */
private BootstrapTools() {}
/**
- * Replaces placeholders in the template start command with values from
- * <tt>startCommandValues</tt>.
+ * Replaces placeholders in the template start command with values from startCommandValues.
*
* <p>If the default template {@link ConfigConstants#DEFAULT_YARN_CONTAINER_START_COMMAND_TEMPLATE}
* is used, the following keys must be present in the map or the resulting
@@ -458,7 +456,6 @@ public class BootstrapTools {
* <li><tt>args</tt> = arguments for the main class</li>
* <li><tt>redirects</tt> = output redirects</li>
* </ul>
- * </p>
*
* @param template
* a template start command with placeholders
@@ -478,7 +475,7 @@ public class BootstrapTools {
}
/**
- * Set temporary configuration directories if necessary
+ * Set temporary configuration directories if necessary.
*
* @param configuration flink config to patch
* @param defaultDirs in case no tmp directories is set, next directories will be applied