congrats Icon
New! Announcing our next generation AI code completions
Read here
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
  • onRequestPermissionsResult (Fragment)
  • compareTo (BigDecimal)
  • setScale (BigDecimal)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • JList (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 17 Free Sublime Text Plugins
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