congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
WorkflowId.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
co.cask.cdap.proto.id.WorkflowId
constructor

Best Java code snippets using co.cask.cdap.proto.id.WorkflowId.<init> (Showing top 19 results out of 315)

origin: caskdata/cdap

public WorkflowId workflow(String program) {
 return new WorkflowId(this, program);
}
origin: co.cask.cdap/cdap-proto

public WorkflowId workflow(String program) {
 return new WorkflowId(this, program);
}
origin: caskdata/cdap

private WorkflowId deserializeWorkflowId(JsonObject id) {
 ProgramId program = deserializeProgramId(id);
 return new WorkflowId(program.getParent(), program.getProgram());
}
origin: co.cask.cdap/cdap-common

@Override
public WorkflowId toEntityId() {
 return new WorkflowId(super.getNamespaceId(), super.getApplicationId(), super.getId());
}
origin: co.cask.cdap/cdap-app-fabric

         @PathParam("run-id") String runId,
         @QueryParam("other-run-id") String otherRunId) throws Exception {
WorkflowId workflow = new WorkflowId(namespaceId, appId, workflowId);
WorkflowRunMetrics detailedStatistics = getDetailedRecord(workflow, runId);
WorkflowRunMetrics otherDetailedStatistics = getDetailedRecord(workflow, otherRunId);
origin: caskdata/cdap

@Override
public WorkflowId toEntityId() {
 return new WorkflowId(super.getNamespaceId(), super.getApplicationId(), super.getId());
}
origin: cdapio/cdap

         @PathParam("run-id") String runId,
         @QueryParam("other-run-id") String otherRunId) throws Exception {
WorkflowId workflow = new WorkflowId(namespaceId, appId, workflowId);
WorkflowRunMetrics detailedStatistics = getDetailedRecord(workflow, runId);
WorkflowRunMetrics otherDetailedStatistics = getDetailedRecord(workflow, otherRunId);
origin: co.cask.cdap/cdap-proto

private WorkflowId deserializeWorkflowId(JsonObject id) {
 ProgramId program = deserializeProgramId(id);
 return new WorkflowId(program.getParent(), program.getProgram());
}
origin: co.cask.cdap/cdap-proto

private WorkflowId deserializeWorkflowId(JsonObject id) {
 ProgramId program = deserializeProgramId(id);
 return new WorkflowId(program.getParent(), program.getProgram());
}
origin: co.cask.cdap/cdap-app-fabric

WorkflowId workflow = new WorkflowId(namespaceId, appId, workflowId);
WorkflowStatistics workflowStatistics = store.getWorkflowStatistics(workflow, startTime, endTime, percentiles);
origin: cdapio/cdap

WorkflowId workflow = new WorkflowId(namespaceId, appId, workflowId);
WorkflowStatistics workflowStatistics = store.getWorkflowStatistics(workflow, startTime, endTime, percentiles);
origin: cdapio/cdap

                 " 's', 'm', 'h', 'd' units. Entered value was : " + interval);
WorkflowId workflow = new WorkflowId(namespaceId, appId, workflowId);
Collection<WorkflowDataset.WorkflowRunRecord> workflowRunRecords =
 store.retrieveSpacedRecords(workflow, runId, limit, timeInterval);
origin: cdapio/cdap

/**
 * @return The workflow token if the program is a workflow, {@code null} otherwise.
 */
@Nullable
public WorkflowToken getWorkflowToken(ProgramRunId programRunId) {
 ProgramId programId = programRunId.getParent();
 if (!programId.getType().equals(ProgramType.WORKFLOW)) {
  return null;
 }
 return store.getWorkflowToken(new WorkflowId(programId.getParent(), programId.getProgram()), programRunId.getRun());
}
origin: co.cask.cdap/cdap-app-fabric

/**
 * @return The workflow token if the program is a workflow, {@code null} otherwise.
 */
@Nullable
public WorkflowToken getWorkflowToken(ProgramRunId programRunId) {
 ProgramId programId = programRunId.getParent();
 if (!programId.getType().equals(ProgramType.WORKFLOW)) {
  return null;
 }
 return store.getWorkflowToken(new WorkflowId(programId.getParent(), programId.getProgram()), programRunId.getRun());
}
origin: co.cask.cdap/cdap-app-fabric

                 " 's', 'm', 'h', 'd' units. Entered value was : " + interval);
WorkflowId workflow = new WorkflowId(namespaceId, appId, workflowId);
Collection<WorkflowDataset.WorkflowRunRecord> workflowRunRecords =
 store.retrieveSpacedRecords(workflow, runId, limit, timeInterval);
origin: cdapio/cdap

private void getScheduledRuntime(HttpResponder responder, String namespaceId, String appName, String workflowName,
                 boolean previousRuntimeRequested) throws SchedulerException, NotFoundException {
 try {
  ApplicationId appId = new ApplicationId(namespaceId, appName);
  WorkflowId workflowId = new WorkflowId(appId, workflowName);
  ApplicationSpecification appSpec = store.getApplication(appId);
  if (appSpec == null) {
   throw new ApplicationNotFoundException(appId);
  }
  if (appSpec.getWorkflows().get(workflowName) == null) {
   throw new ProgramNotFoundException(workflowId);
  }
  List<ScheduledRuntime> runtimes;
  if (previousRuntimeRequested) {
   runtimes = timeScheduler.previousScheduledRuntime(workflowId, SchedulableProgramType.WORKFLOW);
  } else {
   runtimes = timeScheduler.nextScheduledRuntime(workflowId, SchedulableProgramType.WORKFLOW);
  }
  responder.sendJson(HttpResponseStatus.OK, GSON.toJson(runtimes));
 } catch (SecurityException e) {
  responder.sendStatus(HttpResponseStatus.UNAUTHORIZED);
 }
}
origin: co.cask.cdap/cdap-app-fabric

private void getScheduledRuntime(HttpResponder responder, String namespaceId, String appName, String workflowName,
                 boolean previousRuntimeRequested) throws SchedulerException, NotFoundException {
 try {
  ApplicationId appId = new ApplicationId(namespaceId, appName);
  WorkflowId workflowId = new WorkflowId(appId, workflowName);
  ApplicationSpecification appSpec = store.getApplication(appId);
  if (appSpec == null) {
   throw new ApplicationNotFoundException(appId);
  }
  if (appSpec.getWorkflows().get(workflowName) == null) {
   throw new ProgramNotFoundException(workflowId);
  }
  List<ScheduledRuntime> runtimes;
  if (previousRuntimeRequested) {
   runtimes = timeScheduler.previousScheduledRuntime(workflowId, SchedulableProgramType.WORKFLOW);
  } else {
   runtimes = timeScheduler.nextScheduledRuntime(workflowId, SchedulableProgramType.WORKFLOW);
  }
  responder.sendJson(HttpResponseStatus.OK, GSON.toJson(runtimes));
 } catch (SecurityException e) {
  responder.sendStatus(HttpResponseStatus.UNAUTHORIZED);
 }
}
origin: cdapio/cdap

@Override
public void setStop(ProgramRunId id, long endTime, ProgramRunStatus runStatus,
          BasicThrowable failureCause, byte[] sourceId) {
 Preconditions.checkArgument(runStatus != null, "Run state of program run should be defined");
 Transactionals.execute(transactional, context -> {
  AppMetadataStore metaStore = getAppMetadataStore(context);
  metaStore.recordProgramStop(id, endTime, runStatus, failureCause, sourceId);
  // This block has been added so that completed workflow runs can be logged to the workflow dataset
  WorkflowId workflowId = new WorkflowId(id.getParent().getParent(), id.getProgram());
  if (id.getType() == ProgramType.WORKFLOW && runStatus == ProgramRunStatus.COMPLETED) {
   recordCompletedWorkflow(metaStore, getWorkflowDataset(context), workflowId, id.getRun());
  }
  // todo: delete old history data
 });
}
origin: co.cask.cdap/cdap-app-fabric

@Override
public void setStop(ProgramRunId id, long endTime, ProgramRunStatus runStatus,
          BasicThrowable failureCause, byte[] sourceId) {
 Preconditions.checkArgument(runStatus != null, "Run state of program run should be defined");
 Transactionals.execute(transactional, context -> {
  AppMetadataStore metaStore = getAppMetadataStore(context);
  metaStore.recordProgramStop(id, endTime, runStatus, failureCause, sourceId);
  // This block has been added so that completed workflow runs can be logged to the workflow dataset
  WorkflowId workflowId = new WorkflowId(id.getParent().getParent(), id.getProgram());
  if (id.getType() == ProgramType.WORKFLOW && runStatus == ProgramRunStatus.COMPLETED) {
   recordCompletedWorkflow(metaStore, getWorkflowDataset(context), workflowId, id.getRun());
  }
  // todo: delete old history data
 });
}
co.cask.cdap.proto.idWorkflowId<init>

Popular methods of WorkflowId

  • getProgram
  • run
  • getApplication
  • getParent
  • toMetadataEntity
  • getNamespace
  • getNamespaceId
  • getVersion

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSharedPreferences (Context)
  • getContentResolver (Context)
  • requestLocationUpdates (LocationManager)
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now