Search in sources :

Example 1 with DistributedSparkProgramRunner

use of io.cdap.cdap.app.runtime.spark.distributed.DistributedSparkProgramRunner 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, () -> 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);
    serviceRunner = new DistributedServiceProgramRunner(cConf, yConf, null, ClusterMode.ON_PREMISE, null);
    workerRunner = new DistributedWorkerProgramRunner(cConf, yConf, null, ClusterMode.ON_PREMISE, null);
    mapreduceRunner = new DistributedMapReduceProgramRunner(cConf, yConf, null, ClusterMode.ON_PREMISE, null);
    sparkRunner = new DistributedSparkProgramRunner(SparkCompat.SPARK2_2_11, cConf, yConf, null, null, ClusterMode.ON_PREMISE, null);
    workflowRunner = new DistributedWorkflowProgramRunner(cConf, yConf, null, ClusterMode.ON_PREMISE, null, null);
}
Also used : ArtifactVersion(io.cdap.cdap.api.artifact.ArtifactVersion) DefaultAppConfigurer(io.cdap.cdap.app.DefaultAppConfigurer) ProgramId(io.cdap.cdap.proto.id.ProgramId) Id(io.cdap.cdap.common.id.Id) AbstractApplication(io.cdap.cdap.api.app.AbstractApplication) Application(io.cdap.cdap.api.app.Application) DistributedSparkProgramRunner(io.cdap.cdap.app.runtime.spark.distributed.DistributedSparkProgramRunner) BeforeClass(org.junit.BeforeClass)

Aggregations

AbstractApplication (io.cdap.cdap.api.app.AbstractApplication)1 Application (io.cdap.cdap.api.app.Application)1 ArtifactVersion (io.cdap.cdap.api.artifact.ArtifactVersion)1 DefaultAppConfigurer (io.cdap.cdap.app.DefaultAppConfigurer)1 DistributedSparkProgramRunner (io.cdap.cdap.app.runtime.spark.distributed.DistributedSparkProgramRunner)1 Id (io.cdap.cdap.common.id.Id)1 ProgramId (io.cdap.cdap.proto.id.ProgramId)1 BeforeClass (org.junit.BeforeClass)1