congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
BatchActionContext
Code IndexAdd Tabnine to your IDE (free)

How to use
BatchActionContext
in
co.cask.cdap.etl.api.batch

Best Java code snippets using co.cask.cdap.etl.api.batch.BatchActionContext (Showing top 3 results out of 315)

origin: co.cask.cdap/hydrator-test

@Override
public void run(BatchActionContext context) throws Exception {
 if (!context.isSuccessful()) {
  return;
 }
 FileSet fileSet = context.getDataset(conf.filesetName);
 Pattern pattern = Pattern.compile(conf.deleteRegex);
 for (Location fileLocation : fileSet.getBaseLocation().list()) {
  if (pattern.matcher(fileLocation.getName()).matches()) {
   fileLocation.delete();
  }
 }
}
origin: co.cask.cdap/hydrator-test

@Override
public void run(BatchActionContext context) throws Exception {
 Table table = context.getDataset(conf.tableName);
 for (Map.Entry<String, WorkflowNodeState> entry : context.getNodeStates().entrySet()) {
  Put put = new Put(entry.getKey());
  WorkflowNodeState nodeState = entry.getValue();
  put.add("runid", nodeState.getRunId());
  put.add("nodeid", nodeState.getNodeId());
  put.add("status", nodeState.getNodeStatus().name());
  table.put(put);
 }
}
origin: co.cask.hydrator/core-plugins

WorkflowToken token = context.getToken();
String message = config.includeWorkflowToken ?
 config.message + "\nUSER Workflow Tokens:\n" + token.getAll(WorkflowToken.Scope.USER)
co.cask.cdap.etl.api.batchBatchActionContext

Javadoc

Context for a batch action, giving access to whether the run was successful, the workflow token, and the state of each phase in the workflow. This API is marked as beta and subject to change.

Most used methods

  • getDataset
  • getNodeStates
    Return an immutable Map of node ids to WorkflowNodeState. This can be used to determine the status o
  • getToken
  • isSuccessful
    Return true if the execution was successful, false otherwise. This method can be used to determine t

Popular in Java

  • Reactive rest calls using spring rest template
  • getContentResolver (Context)
  • onRequestPermissionsResult (Fragment)
  • putExtra (Intent)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JOptionPane (javax.swing)
  • Top 25 Plugins for Webstorm
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