Search in sources :

Example 1 with ProgramScheduleStoreDataset

use of io.cdap.cdap.internal.app.runtime.schedule.store.ProgramScheduleStoreDataset in project cdap by caskdata.

the class CoreSchedulerService method execute.

@SuppressWarnings("UnusedReturnValue")
private <V, T extends Exception> V execute(StoreQueueAndProfileTxRunnable<V, ? extends Exception> runnable, Class<? extends T> tClass) throws T {
    return TransactionRunners.run(transactionRunner, context -> {
        ProgramScheduleStoreDataset store = Schedulers.getScheduleStore(context);
        ProfileStore profileStore = ProfileStore.get(context);
        JobQueueTable queue = JobQueueTable.getJobQueue(context, cConf);
        return runnable.run(store, queue, profileStore);
    }, tClass);
}
Also used : JobQueueTable(io.cdap.cdap.internal.app.runtime.schedule.queue.JobQueueTable) ProgramScheduleStoreDataset(io.cdap.cdap.internal.app.runtime.schedule.store.ProgramScheduleStoreDataset) ProfileStore(io.cdap.cdap.internal.app.store.profile.ProfileStore)

Example 2 with ProgramScheduleStoreDataset

use of io.cdap.cdap.internal.app.runtime.schedule.store.ProgramScheduleStoreDataset in project cdap by caskdata.

the class CoreSchedulerService method execute.

@SuppressWarnings("UnusedReturnValue")
private <V, T extends Exception> V execute(StoreAndQueueTxRunnable<V, ? extends Exception> runnable, Class<? extends T> tClass) throws T {
    return TransactionRunners.run(transactionRunner, context -> {
        ProgramScheduleStoreDataset store = Schedulers.getScheduleStore(context);
        JobQueueTable queue = JobQueueTable.getJobQueue(context, cConf);
        return runnable.run(store, queue);
    }, tClass);
}
Also used : JobQueueTable(io.cdap.cdap.internal.app.runtime.schedule.queue.JobQueueTable) ProgramScheduleStoreDataset(io.cdap.cdap.internal.app.runtime.schedule.store.ProgramScheduleStoreDataset)

Example 3 with ProgramScheduleStoreDataset

use of io.cdap.cdap.internal.app.runtime.schedule.store.ProgramScheduleStoreDataset in project cdap by caskdata.

the class CoreSchedulerService method execute.

@SuppressWarnings({ "UnusedReturnValue", "SameParameterValue" })
private <V, T extends Exception> V execute(StoreAndProfileTxRunnable<V, ? extends Exception> runnable, Class<? extends T> tClass) throws T {
    return TransactionRunners.run(transactionRunner, context -> {
        ProgramScheduleStoreDataset store = Schedulers.getScheduleStore(context);
        ProfileStore profileStore = ProfileStore.get(context);
        return runnable.run(store, profileStore);
    }, tClass);
}
Also used : ProgramScheduleStoreDataset(io.cdap.cdap.internal.app.runtime.schedule.store.ProgramScheduleStoreDataset) ProfileStore(io.cdap.cdap.internal.app.store.profile.ProfileStore)

Aggregations

ProgramScheduleStoreDataset (io.cdap.cdap.internal.app.runtime.schedule.store.ProgramScheduleStoreDataset)3 JobQueueTable (io.cdap.cdap.internal.app.runtime.schedule.queue.JobQueueTable)2 ProfileStore (io.cdap.cdap.internal.app.store.profile.ProfileStore)2