congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ExecutionPhase
Code IndexAdd Tabnine to your IDE (free)

How to use
ExecutionPhase
in
com.asakusafw.yaess.core

Best Java code snippets using com.asakusafw.yaess.core.ExecutionPhase (Showing top 15 results out of 315)

origin: asakusafw/asakusafw

@Override
public String toString() {
  return getSymbol();
}
origin: asakusafw/asakusafw

/**
 * Returns the symbol of this phase.
 * This symbol is used in {@link ExecutionScript}s.
 * @return the symbol of this phase
 */
@Override
public String getSymbol() {
  return name().toLowerCase();
}
origin: asakusafw/asakusafw

    true);
System.out.println("Phase name is one of:");
for (ExecutionPhase phase : ExecutionPhase.values()) {
  System.out.printf("    %s%n", phase.getSymbol());
origin: asakusafw/asakusafw

private static EnumMap<ExecutionPhase, List<ExecutionScript>> consumeScripts(
    NavigableMap<String, String> flowMap, String flowId) {
  EnumMap<ExecutionPhase, List<ExecutionScript>> results = new EnumMap<>(ExecutionPhase.class);
  for (ExecutionPhase phase : ExecutionPhase.values()) {
    results.put(phase, Collections.emptyList());
  }
  int count = 0;
  Map<String, NavigableMap<String, String>> phaseMap = partitioning(flowMap);
  for (Map.Entry<String, NavigableMap<String, String>> entry : phaseMap.entrySet()) {
    String phaseSymbol = entry.getKey();
    NavigableMap<String, String> phaseContents = entry.getValue();
    ExecutionPhase phase = ExecutionPhase.findFromSymbol(phaseSymbol);
    if (phase == null) {
      throw new IllegalArgumentException(MessageFormat.format(
          "Unknown phase in \"{0}\": {1}",
          flowId,
          phaseSymbol));
    }
    List<ExecutionScript> scriptsInPhase = loadScripts(flowId, phase, phaseContents);
    results.put(phase, scriptsInPhase);
    count += scriptsInPhase.size();
  }
  LOG.debug("Loaded {} execution scripts: {}*", count, getPrefix(flowId));
  return results;
}
origin: asakusafw/asakusafw

this.blockerIds = Collections.unmodifiableSet(new LinkedHashSet<>(blockerIds));
EnumMap<ExecutionPhase, Set<ExecutionScript>> map = new EnumMap<>(ExecutionPhase.class);
for (ExecutionPhase phase : ExecutionPhase.values()) {
  if (scripts.containsKey(phase)) {
    TreeSet<ExecutionScript> set = new TreeSet<>(SCRIPT_COMPARATOR);
origin: asakusafw/asakusafw

result.executionId = executionId;
if (phaseName != null) {
  result.phase = ExecutionPhase.findFromSymbol(phaseName);
  if (result.phase == null) {
    throw new IllegalArgumentException(MessageFormat.format(
origin: asakusafw/asakusafw

  @Override
  public JsonElement serialize(ExecutionPhase src, Type type, JsonSerializationContext context) {
    return new JsonPrimitive(src.getSymbol());
  }
}
origin: asakusafw/asakusafw

private static String getPrefix(String flowId, ExecutionPhase phase) {
  assert flowId != null;
  assert phase != null;
  return getPrefix(flowId) + phase.getSymbol() + '.';
}
origin: asakusafw/asakusafw

  @Override
  String getKey(ExecutionContext context, ExecutionScript script) {
    return MessageFormat.format(
        "{0}.{1}.{2}",
        context.getFlowId(),
        context.getPhase().getSymbol(),
        WILDCARD);
  }
},
origin: asakusafw/asakusafw

@Override
public void cleanUp(
    ExecutionMonitor monitor,
    ExecutionContext context) throws InterruptedException, IOException {
  HadoopScript script = new HadoopScript(
      context.getPhase().getSymbol(),
      Collections.emptySet(),
      CLEANUP_STAGE_CLASS,
      Collections.emptyMap(),
      Collections.emptyMap());
  run(monitor, context, script);
}
origin: asakusafw/asakusafw

private static JsonObject analyzeJobflow(FlowScript flowScript) {
  assert flowScript != null;
  JsonArray phases = new JsonArray();
  for (Map.Entry<ExecutionPhase, Set<ExecutionScript>> entry : flowScript.getScripts().entrySet()) {
    ExecutionPhase phase = entry.getKey();
    if (entry.getValue().isEmpty() == false
        || phase == ExecutionPhase.SETUP
        || phase == ExecutionPhase.CLEANUP) {
      phases.add(new JsonPrimitive(phase.getSymbol()));
    }
  }
  JsonObject jobflow = new JsonObject();
  jobflow.addProperty("id", flowScript.getId());
  jobflow.add("blockers", toJsonArray(flowScript.getBlockerIds()));
  jobflow.add("phases", phases);
  return jobflow;
}
origin: asakusafw/asakusafw

  @Override
  String getKey(ExecutionContext context, ExecutionScript script) {
    if (script == null) {
      return null;
    }
    return MessageFormat.format(
        "{0}.{1}.{2}",
        context.getFlowId(),
        context.getPhase().getSymbol(),
        script.getId());
  }
},
origin: asakusafw/asakusafw

context.getBatchId(),
context.getFlowId(),
context.getPhase().getSymbol(),
exec.getModuleName(),
exec.getId(),
origin: asakusafw/asakusafw

    context.getBatchId(),
    context.getFlowId(),
    context.getPhase().getSymbol(),
    script == null ? LABEL_UNDEFINED : script.getId(),
});
origin: asakusafw/asakusafw

@Override
public void cleanUp(
    ExecutionMonitor monitor,
    ExecutionContext context) throws InterruptedException, IOException {
  monitor.open(1);
  try {
    if (cleanup) {
      YSLOG.info("I51001",
          context.getBatchId(),
          context.getFlowId(),
          context.getExecutionId(),
          getHandlerId());
      HadoopScript script = new HadoopScript(
          context.getPhase().getSymbol(),
          Collections.emptySet(),
          CLEANUP_STAGE_CLASS,
          Collections.emptyMap(),
          Collections.emptyMap());
      execute0(monitor, context, script);
    } else {
      YSLOG.info("I51002",
          context.getBatchId(),
          context.getFlowId(),
          context.getExecutionId(),
          getHandlerId());
    }
  } finally {
    monitor.close();
  }
}
com.asakusafw.yaess.coreExecutionPhase

Javadoc

Phases each execution replies on.

Most used methods

  • getSymbol
    Returns the symbol of this phase. This symbol is used in ExecutionScripts.
  • findFromSymbol
    Returns an ExecutionPhase corresponded to the symbol.
  • values
  • name

Popular in Java

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setScale (BigDecimal)
  • Menu (java.awt)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • JList (javax.swing)
  • JTextField (javax.swing)
  • Top plugins for WebStorm
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