You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by xi...@apache.org on 2017/03/28 00:34:14 UTC
samza git commit: SAMZA-1171: Rewrite config in ApplicationRunnerMain
when creating ApplicationRunner
Repository: samza
Updated Branches:
refs/heads/master e4cfeebeb -> 61cf4e4df
SAMZA-1171: Rewrite config in ApplicationRunnerMain when creating ApplicationRunner
The config needs to be rewritten before passing down to the ApplicationRunner. This is a bug that was introduced during some refactoring/cleanup of the config in the ApplicationRunner interface.
Author: Xinyu Liu <xi...@xiliu-ld.linkedin.biz>
Reviewers: Jacob Maes <jm...@apache.org>
Closes #98 from xinyuiscool/SAMZA-1171
Project: http://git-wip-us.apache.org/repos/asf/samza/repo
Commit: http://git-wip-us.apache.org/repos/asf/samza/commit/61cf4e4d
Tree: http://git-wip-us.apache.org/repos/asf/samza/tree/61cf4e4d
Diff: http://git-wip-us.apache.org/repos/asf/samza/diff/61cf4e4d
Branch: refs/heads/master
Commit: 61cf4e4dfbb7449b6901673f7b7363d329080300
Parents: e4cfeeb
Author: Xinyu Liu <xi...@xiliu-ld.linkedin.biz>
Authored: Mon Mar 27 17:33:42 2017 -0700
Committer: Xinyu Liu <xi...@xiliu-ld.linkedin.biz>
Committed: Mon Mar 27 17:33:42 2017 -0700
----------------------------------------------------------------------
.../java/org/apache/samza/runtime/ApplicationRunnerMain.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/samza/blob/61cf4e4d/samza-core/src/main/java/org/apache/samza/runtime/ApplicationRunnerMain.java
----------------------------------------------------------------------
diff --git a/samza-core/src/main/java/org/apache/samza/runtime/ApplicationRunnerMain.java b/samza-core/src/main/java/org/apache/samza/runtime/ApplicationRunnerMain.java
index 9d124b3..9f0b995 100644
--- a/samza-core/src/main/java/org/apache/samza/runtime/ApplicationRunnerMain.java
+++ b/samza-core/src/main/java/org/apache/samza/runtime/ApplicationRunnerMain.java
@@ -39,14 +39,15 @@ public class ApplicationRunnerMain {
public static void main(String[] args) throws Exception {
CommandLine cmdLine = new CommandLine();
OptionSet options = cmdLine.parser().parse(args);
- Config config = cmdLine.loadConfig(options);
+ Config orgConfig = cmdLine.loadConfig(options);
+ Config config = Util.rewriteConfig(orgConfig);
if (config.containsKey(STREAM_APPLICATION_CLASS_CONFIG)) {
ApplicationRunner runner = ApplicationRunner.fromConfig(config);
StreamApplication app = (StreamApplication) Class.forName(config.get(STREAM_APPLICATION_CLASS_CONFIG)).newInstance();
runner.run(app);
} else {
- new JobRunner(Util.rewriteConfig(config)).run(true);
+ new JobRunner(config).run(true);
}
}
}