use of co.cask.cdap.api.app.ApplicationContext in project cdap by caskdata.
the class DistributedProgramRunnerTxTimeoutTest method setup.
@BeforeClass
public static void setup() {
Application app = new AppWithAllProgramTypes();
DefaultAppConfigurer configurer = new DefaultAppConfigurer(Id.Namespace.DEFAULT, new Id.Artifact(Id.Namespace.DEFAULT, "artifact", new ArtifactVersion("0.1")), app);
app.configure(configurer, new ApplicationContext() {
@Override
public Config getConfig() {
return null;
}
});
appSpec = configurer.createSpecification("app", "1.0");
// System.out.println(new GsonBuilder().setPrettyPrinting().create().toJson(appSpec));
cConf.setInt(TxConstants.Manager.CFG_TX_MAX_TIMEOUT, 60);
flowRunner = new DistributedFlowProgramRunner(null, yConf, cConf, null, null, null, null, null);
serviceRunner = new DistributedServiceProgramRunner(null, yConf, cConf, null, null);
workerRunner = new DistributedWorkerProgramRunner(null, yConf, cConf, null, null);
mapreduceRunner = new DistributedMapReduceProgramRunner(null, yConf, cConf, null, null);
sparkRunner = new DistributedSparkProgramRunner(SparkCompat.SPARK1_2_10, null, yConf, cConf, null, null, null);
workflowRunner = new DistributedWorkflowProgramRunner(null, yConf, cConf, null, null, null);
}
Aggregations