@Override public CompletionStage<Backfill> backfillCreate(String componentId, String workflowId, String start, String end, int concurrency, String description) { final BackfillInput backfill = BackfillInput.newBuilder() .start(Instant.parse(start)) .end(Instant.parse(end)) .component(componentId) .workflow(workflowId) .concurrency(concurrency) .description(Optional.ofNullable(description)) .build(); return backfillCreate(backfill); }
static BackfillInputBuilder newBuilder() { return new BackfillInputBuilder(); } }
private void backfillCreate() throws ExecutionException, InterruptedException { final String component = namespace.getString(parser.backfillCreateComponent.getDest()); final String workflow = namespace.getString(parser.backfillCreateWorkflow.getDest()); final String start = namespace.getString(parser.backfillCreateStart.getDest()); final String end = namespace.getString(parser.backfillCreateEnd.getDest()); final boolean reverse = namespace.getBoolean(parser.backfillCreateReverse.getDest()); final int concurrency = namespace.getInt(parser.backfillCreateConcurrency.getDest()); final String description = namespace.getString(parser.backfillCreateDescription.getDest()); final TriggerParameters triggerParameters = TriggerParameters.builder() .env(parser.getEnvVars(namespace, parser.backfillCreateEnv)) .build(); final BackfillInput configuration = BackfillInput.newBuilder() .component(component) .workflow(workflow) .start(Instant.parse(start)) .end(Instant.parse(end)) .reverse(reverse) .concurrency(concurrency) .description(description) .triggerParameters(triggerParameters) .build(); final boolean allowFuture = namespace.getBoolean(parser.backfillCreateAllowFuture.getDest()); final Backfill backfill = styxClient.backfillCreate(configuration, allowFuture) .toCompletableFuture().get(); cliOutput.printBackfill(backfill, true); }