提交 8a849372 编写于 作者: G Greg Hogan 提交者: Stephan Ewen

[FLINK-2625] Pass configuration properly to JobGraphGenerator

LocalExecutor and Client now pass Configuration to JobGraphGenerator.

This closes #1095
上级 49114628
......@@ -169,10 +169,12 @@ public class LocalExecutor extends PlanExecutor {
}
try {
Optimizer pc = new Optimizer(new DataStatistics(), this.flink.configuration());
Configuration configuration = this.flink.configuration();
Optimizer pc = new Optimizer(new DataStatistics(), configuration);
OptimizedPlan op = pc.compile(plan);
JobGraphGenerator jgg = new JobGraphGenerator();
JobGraphGenerator jgg = new JobGraphGenerator(configuration);
JobGraph jobGraph = jgg.compileJobGraph(op);
boolean sysoutPrint = isPrintingStatusDuringExecution();
......
......@@ -252,7 +252,7 @@ public class Client {
if (optPlan instanceof StreamingPlan) {
job = ((StreamingPlan) optPlan).getJobGraph();
} else {
JobGraphGenerator gen = new JobGraphGenerator();
JobGraphGenerator gen = new JobGraphGenerator(this.configuration);
job = gen.compileJobGraph((OptimizedPlan) optPlan);
}
......
......@@ -111,7 +111,7 @@ public class ClientTest {
whenNew(Optimizer.class).withArguments(any(DataStatistics.class), any(CostEstimator.class), any(Configuration.class)).thenReturn(this.compilerMock);
when(compilerMock.compile(planMock)).thenReturn(optimizedPlanMock);
whenNew(JobGraphGenerator.class).withNoArguments().thenReturn(generatorMock);
whenNew(JobGraphGenerator.class).withAnyArguments().thenReturn(generatorMock);
when(generatorMock.compileJobGraph(optimizedPlanMock)).thenReturn(jobGraph);
try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册