Tabnine Logo
MessagingProgramStateWriter
Code IndexAdd Tabnine to your IDE (free)

How to use
MessagingProgramStateWriter
in
co.cask.cdap.internal.app.program

Best Java code snippets using co.cask.cdap.internal.app.program.MessagingProgramStateWriter (Showing top 8 results out of 315)

origin: cdapio/cdap

@Override
public void killed(ProgramRunId programRunId) {
 stop(programRunId, ProgramRunStatus.KILLED, null);
}
origin: cdapio/cdap

private void publishProgramStatus(ProgramRunId programRunId, ProgramStatus status) {
 ProgramStateWriter stateWriter = new MessagingProgramStateWriter(cConf, messagingService);
 switch (status) {
  case INITIALIZING:
   stateWriter.start(programRunId, new SimpleProgramOptions(programRunId.getParent()), null, null);
   break;
  case RUNNING:
   stateWriter.running(programRunId, null);
   break;
  case COMPLETED:
   stateWriter.completed(programRunId);
   break;
  case FAILED:
   stateWriter.error(programRunId, new Exception("Program run failed"));
   break;
  case KILLED:
   stateWriter.killed(programRunId);
   break;
  default:
   throw new IllegalArgumentException("Unsupported program status " + status);
 }
}
origin: cdapio/cdap

TopicId programEventTopic =
 NamespaceId.SYSTEM.topic(cConf.get(Constants.AppFabric.PROGRAM_STATUS_RECORD_EVENT_TOPIC));
ProgramStateWriter programStateWriter = new MessagingProgramStateWriter(cConf, messagingService);
origin: co.cask.cdap/cdap-app-fabric

@Override
public void killed(ProgramRunId programRunId) {
 stop(programRunId, ProgramRunStatus.KILLED, null);
}
origin: cdapio/cdap

@Override
public void completed(ProgramRunId programRunId) {
 stop(programRunId, ProgramRunStatus.COMPLETED, null);
}
origin: cdapio/cdap

@Override
public void error(ProgramRunId programRunId, Throwable failureCause) {
 stop(programRunId, ProgramRunStatus.FAILED, failureCause);
}
origin: co.cask.cdap/cdap-app-fabric

@Override
public void completed(ProgramRunId programRunId) {
 stop(programRunId, ProgramRunStatus.COMPLETED, null);
}
origin: co.cask.cdap/cdap-app-fabric

@Override
public void error(ProgramRunId programRunId, Throwable failureCause) {
 stop(programRunId, ProgramRunStatus.FAILED, failureCause);
}
co.cask.cdap.internal.app.programMessagingProgramStateWriter

Javadoc

An implementation of ProgramStateWriter that publishes program status events to TMS

Most used methods

  • <init>
  • stop

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • onCreateOptionsMenu (Activity)
  • getExternalFilesDir (Context)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • JPanel (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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