public ScheduleId schedule(String schedule) { return new ScheduleId(this, schedule); }
public ScheduleId schedule(String schedule) { return new ScheduleId(this, schedule); }
@Override public ScheduleId toEntityId() { return new ScheduleId(application.getNamespaceId(), application.getId(), id); }
@Override public ScheduleId toEntityId() { return new ScheduleId(application.getNamespaceId(), application.getId(), id); }
private ScheduleId deserializeSchedule(JsonObject id) { ApplicationId app = deserializeApplicationId(id.getAsJsonObject("application")); String scheduleId = id.get("id").getAsString(); return new ScheduleId(app.getNamespace(), app.getApplication(), app.getVersion(), scheduleId); }
private ScheduleId deserializeSchedule(JsonObject id) { ApplicationId app = deserializeApplicationId(id); String scheduleId = id.get("schedule").getAsString(); return new ScheduleId(app.getNamespace(), app.getApplication(), app.getVersion(), scheduleId); }
private ScheduleId deserializeSchedule(JsonObject id) { ApplicationId app = deserializeApplicationId(id); String scheduleId = id.get("schedule").getAsString(); return new ScheduleId(app.getNamespace(), app.getApplication(), app.getVersion(), scheduleId); }
@SuppressWarnings("unused") public static ScheduleId fromIdParts(Iterable<String> idString) { Iterator<String> iterator = idString.iterator(); return new ScheduleId( next(iterator, "namespace"), next(iterator, "application"), next(iterator, "version"), nextAndEnd(iterator, "schedule")); }
@SuppressWarnings("unused") public static ScheduleId fromIdParts(Iterable<String> idString) { Iterator<String> iterator = idString.iterator(); return new ScheduleId( next(iterator, "namespace"), next(iterator, "application"), next(iterator, "version"), nextAndEnd(iterator, "schedule")); }
String version = keySplitter.getString(); String scheduleName = keySplitter.getString(); return new ScheduleId(namespaceId, appId, version, scheduleName);
@Test public void testSparkProgramStatusSchedule() throws Exception { ApplicationManager appManager = deploy(TestSparkApp.class); ScheduleId scheduleId = new ScheduleId(NamespaceId.DEFAULT.getNamespace(), TestSparkApp.class.getSimpleName(), "schedule"); appManager.enableSchedule(scheduleId); WorkflowManager workflowManager = appManager.getWorkflowManager(TestSparkApp.TriggeredWorkflow.class.getSimpleName()); int numRuns = workflowManager.getHistory(ProgramRunStatus.COMPLETED).size(); // Start the upstream program SparkManager sparkManager = appManager.getSparkManager(TestSparkApp.ScalaClassicSpark.class.getSimpleName()); sparkManager.start(); // Wait for the downstream to complete workflowManager.waitForRun(ProgramRunStatus.COMPLETED, 5, TimeUnit.MINUTES); // Run again with the kryo serializer sparkManager.start(Collections.singletonMap("spark.serializer", "org.apache.spark.serializer.KryoSerializer")); // Wait for the downstream to complete again workflowManager.waitForRuns(ProgramRunStatus.COMPLETED, numRuns + 2, 5, TimeUnit.MINUTES); }
Assert.assertEquals(ProgramScheduleStatus.SUSPENDED.name(), scheduleManager.status(HttpURLConnection.HTTP_OK)); ScheduleId scheduleId = new ScheduleId(appId.getNamespace(), appId.getApplication(), appId.getVersion(), "testSchedule"); ScheduleDetail scheduleDetail =