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

  • Making http requests using okhttp
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • getContentResolver (Context)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • 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