Search in sources :

Example 11 with ScheduleDetail

use of co.cask.cdap.proto.ScheduleDetail in project cdap by caskdata.

the class ProgramLifecycleHttpHandlerTest method testAddSchedule.

private void testAddSchedule(String scheduleName) throws Exception {
    String partitionScheduleName = scheduleName + "Partition";
    String orScheduleName = scheduleName + "Or";
    ProtoTrigger.TimeTrigger protoTime = new ProtoTrigger.TimeTrigger("0 * * * ?");
    ProtoTrigger.PartitionTrigger protoPartition = new ProtoTrigger.PartitionTrigger(NamespaceId.DEFAULT.dataset("data"), 5);
    ProtoTrigger.OrTrigger protoOr = ProtoTrigger.or(protoTime, protoPartition);
    String description = "Something";
    ScheduleProgramInfo programInfo = new ScheduleProgramInfo(SchedulableProgramType.WORKFLOW, AppWithSchedule.WORKFLOW_NAME);
    ImmutableMap<String, String> properties = ImmutableMap.of("a", "b", "c", "d");
    TimeTrigger timeTrigger = new TimeTrigger("0 * * * ?");
    ScheduleDetail timeDetail = new ScheduleDetail(TEST_NAMESPACE1, AppWithSchedule.NAME, ApplicationId.DEFAULT_VERSION, scheduleName, description, programInfo, properties, timeTrigger, Collections.<Constraint>emptyList(), Schedulers.JOB_QUEUE_TIMEOUT_MILLIS, null);
    PartitionTrigger partitionTrigger = new PartitionTrigger(protoPartition.getDataset(), protoPartition.getNumPartitions());
    ScheduleDetail expectedPartitionDetail = new ScheduleDetail(TEST_NAMESPACE1, AppWithSchedule.NAME, ApplicationId.DEFAULT_VERSION, partitionScheduleName, description, programInfo, properties, partitionTrigger, Collections.<Constraint>emptyList(), Schedulers.JOB_QUEUE_TIMEOUT_MILLIS, null);
    ScheduleDetail requestPartitionDetail = new ScheduleDetail(TEST_NAMESPACE1, AppWithSchedule.NAME, ApplicationId.DEFAULT_VERSION, partitionScheduleName, description, programInfo, properties, protoPartition, Collections.<Constraint>emptyList(), Schedulers.JOB_QUEUE_TIMEOUT_MILLIS, null);
    ScheduleDetail expectedOrDetail = new ScheduleDetail(TEST_NAMESPACE1, AppWithSchedule.NAME, ApplicationId.DEFAULT_VERSION, orScheduleName, description, programInfo, properties, new OrTrigger(timeTrigger, partitionTrigger), Collections.<Constraint>emptyList(), Schedulers.JOB_QUEUE_TIMEOUT_MILLIS, null);
    ScheduleDetail requestOrDetail = new ScheduleDetail(TEST_NAMESPACE1, AppWithSchedule.NAME, ApplicationId.DEFAULT_VERSION, orScheduleName, description, programInfo, properties, protoOr, Collections.<Constraint>emptyList(), Schedulers.JOB_QUEUE_TIMEOUT_MILLIS, null);
    // trying to add the schedule with different name in path param than schedule spec should fail
    HttpResponse response = addSchedule(TEST_NAMESPACE1, AppWithSchedule.NAME, null, "differentName", timeDetail);
    Assert.assertEquals(HttpResponseStatus.BAD_REQUEST.code(), response.getStatusLine().getStatusCode());
    // adding a schedule to a non-existing app should fail
    response = addSchedule(TEST_NAMESPACE1, "nonExistingApp", null, scheduleName, timeDetail);
    Assert.assertEquals(HttpResponseStatus.NOT_FOUND.code(), response.getStatusLine().getStatusCode());
    // adding a schedule to invalid type of program type should fail
    ScheduleDetail invalidScheduleDetail = new ScheduleDetail(scheduleName, "Something", new ScheduleProgramInfo(SchedulableProgramType.MAPREDUCE, AppWithSchedule.MAPREDUCE), properties, protoTime, ImmutableList.<Constraint>of(), TimeUnit.MINUTES.toMillis(1));
    response = addSchedule(TEST_NAMESPACE1, AppWithSchedule.NAME, null, scheduleName, invalidScheduleDetail);
    Assert.assertEquals(HttpResponseStatus.BAD_REQUEST.code(), response.getStatusLine().getStatusCode());
    // adding a schedule for a program that does not exist
    ScheduleDetail nonExistingDetail = new ScheduleDetail(TEST_NAMESPACE1, AppWithSchedule.NAME, ApplicationId.DEFAULT_VERSION, scheduleName, description, new ScheduleProgramInfo(SchedulableProgramType.MAPREDUCE, "nope"), properties, timeTrigger, Collections.<Constraint>emptyList(), Schedulers.JOB_QUEUE_TIMEOUT_MILLIS, null);
    response = addSchedule(TEST_NAMESPACE1, AppWithSchedule.NAME, null, scheduleName, nonExistingDetail);
    Assert.assertEquals(HttpResponseStatus.NOT_FOUND.code(), response.getStatusLine().getStatusCode());
    // test adding a schedule
    response = addSchedule(TEST_NAMESPACE1, AppWithSchedule.NAME, null, scheduleName, timeDetail);
    Assert.assertEquals(HttpResponseStatus.OK.code(), response.getStatusLine().getStatusCode());
    response = addSchedule(TEST_NAMESPACE1, AppWithSchedule.NAME, null, partitionScheduleName, requestPartitionDetail);
    Assert.assertEquals(HttpResponseStatus.OK.code(), response.getStatusLine().getStatusCode());
    response = addSchedule(TEST_NAMESPACE1, AppWithSchedule.NAME, null, orScheduleName, requestOrDetail);
    Assert.assertEquals(HttpResponseStatus.OK.code(), response.getStatusLine().getStatusCode());
    List<ScheduleDetail> schedules = getSchedules(TEST_NAMESPACE1, AppWithSchedule.NAME, AppWithSchedule.WORKFLOW_NAME);
    Assert.assertEquals(4, schedules.size());
    Assert.assertEquals(timeDetail, schedules.get(1));
    Assert.assertEquals(expectedOrDetail, schedules.get(2));
    Assert.assertEquals(expectedPartitionDetail, schedules.get(3));
    List<ScheduleDetail> schedulesForApp = listSchedules(TEST_NAMESPACE1, AppWithSchedule.NAME, null);
    Assert.assertEquals(schedules, schedulesForApp);
    // trying to add ScheduleDetail of the same schedule again should fail with AlreadyExistsException
    response = addSchedule(TEST_NAMESPACE1, AppWithSchedule.NAME, null, scheduleName, timeDetail);
    Assert.assertEquals(HttpResponseStatus.CONFLICT.code(), response.getStatusLine().getStatusCode());
    // although we should be able to add schedule to a different version of the app
    response = addSchedule(TEST_NAMESPACE1, AppWithSchedule.NAME, VERSION2, scheduleName, timeDetail);
    Assert.assertEquals(HttpResponseStatus.OK.code(), response.getStatusLine().getStatusCode());
    // this should not have affected the schedules of the default version
    List<ScheduleDetail> scheds = getSchedules(TEST_NAMESPACE1, AppWithSchedule.NAME, AppWithSchedule.WORKFLOW_NAME);
    Assert.assertEquals(schedules, scheds);
    // there should be two schedules now for version 2
    List<ScheduleDetail> schedules2 = getSchedules(TEST_NAMESPACE1, AppWithSchedule.NAME, VERSION2, AppWithSchedule.WORKFLOW_NAME);
    Assert.assertEquals(2, schedules2.size());
    Assert.assertEquals(timeDetail, schedules2.get(1));
    List<ScheduleDetail> schedulesForApp2 = listSchedules(TEST_NAMESPACE1, AppWithSchedule.NAME, VERSION2);
    Assert.assertEquals(schedules2, schedulesForApp2);
    // Add a schedule with no schedule name in spec
    ScheduleDetail detail2 = new ScheduleDetail(TEST_NAMESPACE1, AppWithSchedule.NAME, VERSION2, null, "Something 2", programInfo, properties, new TimeTrigger("0 * * * ?"), Collections.<Constraint>emptyList(), TimeUnit.HOURS.toMillis(6), null);
    response = addSchedule(TEST_NAMESPACE1, AppWithSchedule.NAME, VERSION2, "schedule-100", detail2);
    Assert.assertEquals(HttpResponseStatus.OK.code(), response.getStatusLine().getStatusCode());
    ScheduleDetail detail100 = getSchedule(TEST_NAMESPACE1, AppWithSchedule.NAME, VERSION2, "schedule-100");
    Assert.assertEquals("schedule-100", detail100.getName());
    Assert.assertEquals(detail2.getTimeoutMillis(), detail100.getTimeoutMillis());
}
Also used : TimeTrigger(co.cask.cdap.internal.app.runtime.schedule.trigger.TimeTrigger) OrTrigger(co.cask.cdap.internal.app.runtime.schedule.trigger.OrTrigger) HttpResponse(org.apache.http.HttpResponse) ProtoTrigger(co.cask.cdap.proto.ProtoTrigger) ScheduleDetail(co.cask.cdap.proto.ScheduleDetail) ScheduleProgramInfo(co.cask.cdap.api.workflow.ScheduleProgramInfo) PartitionTrigger(co.cask.cdap.internal.app.runtime.schedule.trigger.PartitionTrigger)

Example 12 with ScheduleDetail

use of co.cask.cdap.proto.ScheduleDetail in project cdap by caskdata.

the class ScheduleClientTestRun method testScheduleChanges.

@Test
public void testScheduleChanges() throws Exception {
    File appJar = createAppJarFile(FakeApp.class);
    // deploy the app with time schedule
    FakeApp.AppConfig config = new FakeApp.AppConfig(true, null, null);
    appClient.deploy(namespace, appJar, config);
    // now there should be one schedule
    List<ScheduleDetail> list = scheduleClient.listSchedules(workflow);
    Assert.assertEquals(1, list.size());
    // test updating the schedule cron
    config = new FakeApp.AppConfig(true, FakeApp.TIME_SCHEDULE_NAME, "0 2 1 1 *");
    appClient.deploy(namespace, appJar, config);
    list = scheduleClient.listSchedules(workflow);
    Assert.assertEquals(1, list.size());
    ProtoTrigger.TimeTrigger trigger = (ProtoTrigger.TimeTrigger) list.get(0).getTrigger();
    Assert.assertEquals("0 2 1 1 *", trigger.getCronExpression());
    // re-deploy the app without time schedule
    config = new FakeApp.AppConfig(false, null, null);
    appClient.deploy(namespace, appJar, config);
    // now there should be no schedule
    list = scheduleClient.listSchedules(workflow);
    Assert.assertEquals(0, list.size());
}
Also used : FakeApp(co.cask.cdap.client.app.FakeApp) ProtoTrigger(co.cask.cdap.proto.ProtoTrigger) ScheduleDetail(co.cask.cdap.proto.ScheduleDetail) File(java.io.File) Test(org.junit.Test)

Example 13 with ScheduleDetail

use of co.cask.cdap.proto.ScheduleDetail in project cdap by caskdata.

the class AppFabricClient method getProgramSchedules.

public List<ScheduleDetail> getProgramSchedules(String namespace, String app, String workflow) throws NotFoundException {
    MockResponder responder = new MockResponder();
    String uri = String.format("%s/apps/%s/workflows/%s/schedules", getNamespacePath(namespace), app, workflow);
    HttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, uri);
    try {
        workflowHttpHandler.getWorkflowSchedules(request, responder, namespace, app, workflow, null, null, null);
    } catch (Exception e) {
        // cannot happen
        throw Throwables.propagate(e);
    }
    List<ScheduleDetail> schedules = responder.decodeResponseContent(SCHEDULE_DETAILS_TYPE, GSON);
    verifyResponse(HttpResponseStatus.OK, responder.getStatus(), "Getting workflow schedules failed");
    return schedules;
}
Also used : DefaultFullHttpRequest(io.netty.handler.codec.http.DefaultFullHttpRequest) DefaultHttpRequest(io.netty.handler.codec.http.DefaultHttpRequest) HttpRequest(io.netty.handler.codec.http.HttpRequest) FullHttpRequest(io.netty.handler.codec.http.FullHttpRequest) DefaultHttpRequest(io.netty.handler.codec.http.DefaultHttpRequest) ScheduleDetail(co.cask.cdap.proto.ScheduleDetail) BadRequestException(co.cask.cdap.common.BadRequestException) UnauthorizedException(co.cask.cdap.security.spi.authorization.UnauthorizedException) NotFoundException(co.cask.cdap.common.NotFoundException)

Example 14 with ScheduleDetail

use of co.cask.cdap.proto.ScheduleDetail in project cdap by caskdata.

the class ListWorkflowSchedulesCommand method perform.

@Override
public void perform(Arguments arguments, PrintStream output) throws Exception {
    String[] programIdParts = arguments.get(ElementType.WORKFLOW.getArgumentName().toString()).split("\\.");
    if (programIdParts.length < 2) {
        throw new CommandInputError(this);
    }
    final String appId = programIdParts[0];
    String workflowName = programIdParts[1];
    WorkflowId workflowId = cliConfig.getCurrentNamespace().app(appId).workflow(workflowName);
    List<ScheduleDetail> list = scheduleClient.listSchedules(workflowId);
    Table table = Table.builder().setHeader("application", "program", "program type", "name", "description", "trigger", "timeoutMillis", "properties").setRows(list, new RowMaker<ScheduleDetail>() {

        @Override
        public List<?> makeRow(ScheduleDetail object) {
            return Lists.newArrayList(appId, object.getProgram().getProgramName(), object.getProgram().getProgramType().name(), object.getName(), object.getDescription(), object.getTrigger(), object.getTimeoutMillis(), GSON.toJson(object.getProperties()));
        }
    }).build();
    cliConfig.getTableRenderer().render(cliConfig, output, table);
}
Also used : CommandInputError(co.cask.cdap.cli.exception.CommandInputError) Table(co.cask.cdap.cli.util.table.Table) RowMaker(co.cask.cdap.cli.util.RowMaker) ScheduleDetail(co.cask.cdap.proto.ScheduleDetail) WorkflowId(co.cask.cdap.proto.id.WorkflowId)

Example 15 with ScheduleDetail

use of co.cask.cdap.proto.ScheduleDetail in project cdap by caskdata.

the class ProgramLifecycleHttpHandler method doGetSchedules.

protected void doGetSchedules(HttpResponder responder, ApplicationId applicationId, @Nullable String workflow, @Nullable String triggerTypeStr, @Nullable String statusStr) throws Exception {
    ApplicationSpecification appSpec = store.getApplication(applicationId);
    if (appSpec == null) {
        throw new NotFoundException(applicationId);
    }
    ProgramScheduleStatus status;
    try {
        status = statusStr == null ? null : ProgramScheduleStatus.valueOf(statusStr);
    } catch (IllegalArgumentException e) {
        throw new BadRequestException(String.format("Invalid schedule status '%s'. Must be one of %s.", statusStr, Joiner.on(',').join(ProgramScheduleStatus.values())), e);
    }
    ProtoTrigger.Type triggerType;
    try {
        triggerType = triggerTypeStr == null ? null : ProtoTrigger.Type.valueOfCategoryName(triggerTypeStr);
    } catch (IllegalArgumentException e) {
        throw new BadRequestException(e.getMessage(), e);
    }
    Predicate<ProgramScheduleRecord> predicate = record -> true;
    if (status != null) {
        predicate = predicate.and(record -> record.getMeta().getStatus().equals(status));
    }
    if (triggerType != null) {
        predicate = predicate.and(record -> record.getSchedule().getTrigger().getType().equals(triggerType));
    }
    Collection<ProgramScheduleRecord> schedules;
    if (workflow != null) {
        WorkflowId workflowId = applicationId.workflow(workflow);
        if (appSpec.getWorkflows().get(workflow) == null) {
            throw new NotFoundException(workflowId);
        }
        schedules = programScheduleService.list(workflowId, predicate);
    } else {
        schedules = programScheduleService.list(applicationId, predicate);
    }
    List<ScheduleDetail> details = schedules.stream().map(ProgramScheduleRecord::toScheduleDetail).collect(Collectors.toList());
    responder.sendJson(HttpResponseStatus.OK, GSON.toJson(details, Schedulers.SCHEDULE_DETAILS_TYPE));
}
Also used : BatchProgramResult(co.cask.cdap.proto.BatchProgramResult) TypeToken(com.google.gson.reflect.TypeToken) RunRecordMeta(co.cask.cdap.internal.app.store.RunRecordMeta) GsonBuilder(com.google.gson.GsonBuilder) ProgramType(co.cask.cdap.proto.ProgramType) Map(java.util.Map) ConstraintCodec(co.cask.cdap.internal.app.runtime.schedule.constraint.ConstraintCodec) Constraint(co.cask.cdap.internal.schedule.constraint.Constraint) ProgramId(co.cask.cdap.proto.id.ProgramId) EnumSet(java.util.EnumSet) Schedulers(co.cask.cdap.internal.app.runtime.schedule.store.Schedulers) HttpRequest(io.netty.handler.codec.http.HttpRequest) BatchRunnable(co.cask.cdap.proto.BatchRunnable) Set(java.util.Set) FlowSpecification(co.cask.cdap.api.flow.FlowSpecification) Reader(java.io.Reader) FullHttpRequest(io.netty.handler.codec.http.FullHttpRequest) ConflictException(co.cask.cdap.common.ConflictException) StandardCharsets(java.nio.charset.StandardCharsets) ProgramSpecification(co.cask.cdap.api.ProgramSpecification) FlowUtils(co.cask.cdap.internal.app.runtime.flow.FlowUtils) ProgramSchedule(co.cask.cdap.internal.app.runtime.schedule.ProgramSchedule) Containers(co.cask.cdap.proto.Containers) BadRequestException(co.cask.cdap.common.BadRequestException) UnauthorizedException(co.cask.cdap.security.spi.authorization.UnauthorizedException) Joiner(com.google.common.base.Joiner) Singleton(com.google.inject.Singleton) BatchRunnableInstances(co.cask.cdap.proto.BatchRunnableInstances) NotRunningProgramLiveInfo(co.cask.cdap.proto.NotRunningProgramLiveInfo) CaseInsensitiveEnumTypeAdapterFactory(co.cask.cdap.common.io.CaseInsensitiveEnumTypeAdapterFactory) NamespaceId(co.cask.cdap.proto.id.NamespaceId) GET(javax.ws.rs.GET) ProgramScheduleStatus(co.cask.cdap.internal.app.runtime.schedule.ProgramScheduleStatus) SatisfiableTrigger(co.cask.cdap.internal.app.runtime.schedule.trigger.SatisfiableTrigger) ArrayList(java.util.ArrayList) AuditPolicy(co.cask.cdap.common.security.AuditPolicy) DiscoveryServiceClient(org.apache.twill.discovery.DiscoveryServiceClient) ProgramRunStatus(co.cask.cdap.proto.ProgramRunStatus) Store(co.cask.cdap.app.store.Store) ProgramStatus(co.cask.cdap.proto.ProgramStatus) Constants(co.cask.cdap.common.conf.Constants) Nullable(javax.annotation.Nullable) Charsets(com.google.common.base.Charsets) MRJobInfoFetcher(co.cask.cdap.app.mapreduce.MRJobInfoFetcher) NamespaceQueryAdmin(co.cask.cdap.common.namespace.NamespaceQueryAdmin) AbstractAppFabricHttpHandler(co.cask.cdap.gateway.handlers.util.AbstractAppFabricHttpHandler) ApplicationId(co.cask.cdap.proto.id.ApplicationId) RandomEndpointStrategy(co.cask.cdap.common.discovery.RandomEndpointStrategy) Throwables(com.google.common.base.Throwables) IOException(java.io.IOException) InputStreamReader(java.io.InputStreamReader) Futures(com.google.common.util.concurrent.Futures) Instances(co.cask.cdap.proto.Instances) FlowletDefinition(co.cask.cdap.api.flow.FlowletDefinition) HttpResponder(co.cask.http.HttpResponder) AuditDetail(co.cask.cdap.common.security.AuditDetail) JsonObject(com.google.gson.JsonObject) WorkflowId(co.cask.cdap.proto.id.WorkflowId) MethodNotAllowedException(co.cask.cdap.common.MethodNotAllowedException) Inject(com.google.inject.Inject) LoggerFactory(org.slf4j.LoggerFactory) Path(javax.ws.rs.Path) NotImplementedException(co.cask.cdap.common.NotImplementedException) Trigger(co.cask.cdap.api.schedule.Trigger) ProtoTrigger(co.cask.cdap.proto.ProtoTrigger) QueryParam(javax.ws.rs.QueryParam) ServiceUnavailableException(co.cask.cdap.common.ServiceUnavailableException) Gson(com.google.gson.Gson) DefaultValue(javax.ws.rs.DefaultValue) ApplicationSpecification(co.cask.cdap.api.app.ApplicationSpecification) EndpointStrategy(co.cask.cdap.common.discovery.EndpointStrategy) FlowId(co.cask.cdap.proto.id.FlowId) MetricStore(co.cask.cdap.api.metrics.MetricStore) Objects(com.google.common.base.Objects) ProgramStatusTrigger(co.cask.cdap.internal.app.runtime.schedule.trigger.ProgramStatusTrigger) ProgramRuntimeService(co.cask.cdap.app.runtime.ProgramRuntimeService) DELETE(javax.ws.rs.DELETE) NamespaceNotFoundException(co.cask.cdap.common.NamespaceNotFoundException) ProgramScheduleRecord(co.cask.cdap.internal.app.runtime.schedule.ProgramScheduleRecord) Function(com.google.common.base.Function) ImmutableMap(com.google.common.collect.ImmutableMap) Predicate(java.util.function.Predicate) Collection(java.util.Collection) HttpResponseStatus(io.netty.handler.codec.http.HttpResponseStatus) ServiceDiscoverable(co.cask.cdap.common.service.ServiceDiscoverable) ProgramRecord(co.cask.cdap.proto.ProgramRecord) Collectors(java.util.stream.Collectors) Id(co.cask.cdap.common.id.Id) MRJobInfo(co.cask.cdap.proto.MRJobInfo) List(java.util.List) Type(java.lang.reflect.Type) ServiceInstances(co.cask.cdap.proto.ServiceInstances) ProgramScheduleService(co.cask.cdap.scheduler.ProgramScheduleService) BatchProgramStatus(co.cask.cdap.proto.BatchProgramStatus) BatchProgramStart(co.cask.cdap.proto.BatchProgramStart) PathParam(javax.ws.rs.PathParam) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) ProgramController(co.cask.cdap.app.runtime.ProgramController) BatchProgram(co.cask.cdap.proto.BatchProgram) ProgramLiveInfo(co.cask.cdap.proto.ProgramLiveInfo) HashMap(java.util.HashMap) ProgramLifecycleService(co.cask.cdap.internal.app.services.ProgramLifecycleService) JsonElement(com.google.gson.JsonElement) HashSet(java.util.HashSet) QueueAdmin(co.cask.cdap.data2.transaction.queue.QueueAdmin) TriggerCodec(co.cask.cdap.internal.app.runtime.schedule.trigger.TriggerCodec) ScheduleId(co.cask.cdap.proto.id.ScheduleId) ScheduleDetail(co.cask.cdap.proto.ScheduleDetail) ByteBufInputStream(io.netty.buffer.ByteBufInputStream) Logger(org.slf4j.Logger) POST(javax.ws.rs.POST) JsonSyntaxException(com.google.gson.JsonSyntaxException) RunRecord(co.cask.cdap.proto.RunRecord) TimeUnit(java.util.concurrent.TimeUnit) ApplicationSpecificationAdapter(co.cask.cdap.internal.app.ApplicationSpecificationAdapter) NotFoundException(co.cask.cdap.common.NotFoundException) PUT(javax.ws.rs.PUT) Collections(java.util.Collections) ProgramRunId(co.cask.cdap.proto.id.ProgramRunId) ApplicationSpecification(co.cask.cdap.api.app.ApplicationSpecification) NamespaceNotFoundException(co.cask.cdap.common.NamespaceNotFoundException) NotFoundException(co.cask.cdap.common.NotFoundException) WorkflowId(co.cask.cdap.proto.id.WorkflowId) ProgramScheduleStatus(co.cask.cdap.internal.app.runtime.schedule.ProgramScheduleStatus) ProtoTrigger(co.cask.cdap.proto.ProtoTrigger) BadRequestException(co.cask.cdap.common.BadRequestException) ProgramScheduleRecord(co.cask.cdap.internal.app.runtime.schedule.ProgramScheduleRecord) ScheduleDetail(co.cask.cdap.proto.ScheduleDetail)

Aggregations

ScheduleDetail (co.cask.cdap.proto.ScheduleDetail)31 ApplicationId (co.cask.cdap.proto.id.ApplicationId)16 ProgramId (co.cask.cdap.proto.id.ProgramId)10 Test (org.junit.Test)10 ScheduleId (co.cask.cdap.proto.id.ScheduleId)9 NamespaceId (co.cask.cdap.proto.id.NamespaceId)8 BadRequestException (co.cask.cdap.common.BadRequestException)7 NotFoundException (co.cask.cdap.common.NotFoundException)7 ProtoTrigger (co.cask.cdap.proto.ProtoTrigger)7 IOException (java.io.IOException)7 ScheduleProgramInfo (co.cask.cdap.api.workflow.ScheduleProgramInfo)6 Id (co.cask.cdap.common.id.Id)6 ProgramSchedule (co.cask.cdap.internal.app.runtime.schedule.ProgramSchedule)6 TimeTrigger (co.cask.cdap.internal.app.runtime.schedule.trigger.TimeTrigger)6 Constraint (co.cask.cdap.internal.schedule.constraint.Constraint)6 NamespaceNotFoundException (co.cask.cdap.common.NamespaceNotFoundException)5 ProtoConstraint (co.cask.cdap.proto.ProtoConstraint)5 AppRequest (co.cask.cdap.proto.artifact.AppRequest)5 WorkflowId (co.cask.cdap.proto.id.WorkflowId)5 JsonElement (com.google.gson.JsonElement)5