code
stringlengths
23
201k
docstring
stringlengths
17
96.2k
func_name
stringlengths
0
235
language
stringclasses
1 value
repo
stringlengths
8
72
path
stringlengths
11
317
url
stringlengths
57
377
license
stringclasses
7 values
synchronized public void rampDown() { lock.lock(); try { int currentStage = this.state.rampStage; this.state.rampStage = currentStage - 1; this.state.lastRampDownTime = System.currentTimeMillis(); this.state.isSynchronized = false; LOGGER.info("[Ramp Down] Sychronized Flag of ramp ...
Return true if only if this ramp will not be required to put those failed workflow into the exclude-ramp list
rampDown
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
Apache-2.0
synchronized public void cacheResult(Action action) { lock.lock(); try { this.state.cachedNumOfTrail++; switch (action) { case SUCCEEDED: this.state.cachedNumOfSuccess++; break; case FAILED: this.state.cachedNumOfFailure++; break; defau...
Return true if only if this ramp will not be required to put those failed workflow into the exclude-ramp list
cacheResult
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
Apache-2.0
synchronized public void cacheSaved() { lock.lock(); try { int ttlTrail = this.state.numOfTrail + this.state.cachedNumOfTrail; int ttlSuccess = this.state.numOfSuccess + this.state.cachedNumOfSuccess; int ttlFailure = this.state.numOfFailure + this.state.cachedNumOfFailure; int ttlIgnore...
Return true if only if this ramp will not be required to put those failed workflow into the exclude-ramp list
cacheSaved
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
Apache-2.0
@Override public ExecutableRamp refresh(ExecutableRamp source) { lock.lock(); try { if (source.getId().equalsIgnoreCase(this.id)) { this.policy = source.policy; this.state.refresh(source.state); this.metadata.refresh(source.metadata); } } finally { lock.unlock(); ...
Return true if only if this ramp will not be required to put those failed workflow into the exclude-ramp list
refresh
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
Apache-2.0
@Override public ExecutableRamp clone() { return ExecutableRamp.builder(this.id, this.policy) .setMetadata(this.metadata.clone()) .setState(this.state.clone()) .build(); }
Return true if only if this ramp will not be required to put those failed workflow into the exclude-ramp list
clone
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
Apache-2.0
@Override public int elementCount() { return 1; }
Return true if only if this ramp will not be required to put those failed workflow into the exclude-ramp list
elementCount
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
Apache-2.0
public static Builder builder(@NotNull final String id, @NotNull final String policy) { return new Builder(id, policy); }
Return true if only if this ramp will not be required to put those failed workflow into the exclude-ramp list
builder
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
Apache-2.0
public Builder setMetadata(final Metadata metadata) { this.metadata = metadata; return this; }
Return true if only if this ramp will not be required to put those failed workflow into the exclude-ramp list
setMetadata
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
Apache-2.0
public Builder setState(final State state) { this.state = state; return this; }
Return true if only if this ramp will not be required to put those failed workflow into the exclude-ramp list
setState
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
Apache-2.0
public ExecutableRamp build() { return new ExecutableRamp(this); }
Return true if only if this ramp will not be required to put those failed workflow into the exclude-ramp list
build
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRamp.java
Apache-2.0
public static ExecutableRampDependencyMap createInstance() { return new ExecutableRampDependencyMap(); }
Map Object of Executable Ramp Dependency, Map.key = dependencyId
createInstance
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampDependencyMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampDependencyMap.java
Apache-2.0
synchronized public ExecutableRampDependencyMap add(@NotNull final String dependency, final String defaultValue, final String jobTypes) { this.add( dependency, ExecutableRampDependency .createInstance() .setDefaultValue(defaultValue) .setAssociatedJobTypes(...
Add new dependency default setting @param dependency dependency @param defaultValue default dependency value @param jobTypes job types @return this
add
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampDependencyMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampDependencyMap.java
Apache-2.0
public String getDefaultValue(@NotNull final String dependency) { return Optional.ofNullable(this.get(dependency)) .map(ExecutableRampDependency::getDefaultValue) .orElse(null); }
Get Default Value @param dependency dependency name @return default dependency value
getDefaultValue
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampDependencyMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampDependencyMap.java
Apache-2.0
public Map<String, String> getDefaultValues(@NotNull final Set<String> dependencies) { return dependencies.stream().collect(Collectors.toMap( dependency -> dependency, dependency -> getDefaultValue(dependency) )); }
Get Map of default values by the given set of dependencies @param dependencies dependencies @return Map of Default Values
getDefaultValues
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampDependencyMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampDependencyMap.java
Apache-2.0
synchronized public boolean isValidJobType(@NotNull final String dependency, @NotNull final String jobType) { // If no specified job type associated, it means the ramp is valid for all job types return Optional.ofNullable(this.get(dependency)) .map(dp -> Optional.ofNullable(dp.getAssociatedJobType...
Check if the dependency is associated with the particular job type @param dependency dependency name @param jobType jobtype name @return true/false
isValidJobType
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampDependencyMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampDependencyMap.java
Apache-2.0
@Override public ExecutableRampDependencyMap clone() { return (ExecutableRampDependencyMap) super.clone(); }
Check if the dependency is associated with the particular job type @param dependency dependency name @param jobType jobtype name @return true/false
clone
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampDependencyMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampDependencyMap.java
Apache-2.0
public static ExecutableRampExceptionalFlowItemsMap createInstance() { return new ExecutableRampExceptionalFlowItemsMap(); }
Map of Executable Ramp Exceptional Items at Flow Level, Map.key = rampId
createInstance
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalFlowItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalFlowItemsMap.java
Apache-2.0
public ExecutableRampExceptionalFlowItemsMap add(@NotNull final String rampId, @NotNull final String flowId, @NotNull final ExecutableRampStatus treatment, final long timeStamp) { return add(rampId, flowId, treatment, timeStamp, false); }
Map of Executable Ramp Exceptional Items at Flow Level, Map.key = rampId
add
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalFlowItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalFlowItemsMap.java
Apache-2.0
public ExecutableRampExceptionalFlowItemsMap add(@NotNull final String rampId, @NotNull final String flowId, @NotNull final ExecutableRampStatus treatment, final long timeStamp, boolean isCacheOnly) { if (this.containsKey(rampId)) { this.get(rampId).add(flowId, treatment, timeStamp, isCacheOnly); } ...
Map of Executable Ramp Exceptional Items at Flow Level, Map.key = rampId
add
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalFlowItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalFlowItemsMap.java
Apache-2.0
public ExecutableRampExceptionalItems.RampRecord get(@NotNull final String rampId, @NotNull final String flowId) { return Optional.ofNullable(this.get(rampId)) .map(items -> items.getItems().get(flowId)) .orElse(null); }
Map of Executable Ramp Exceptional Items at Flow Level, Map.key = rampId
get
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalFlowItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalFlowItemsMap.java
Apache-2.0
public boolean exists(@NotNull final String rampId, @NotNull final String flowId) { return Optional.ofNullable(this.get(rampId)) .map(items -> items.exists(flowId)) .orElse(false); }
Map of Executable Ramp Exceptional Items at Flow Level, Map.key = rampId
exists
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalFlowItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalFlowItemsMap.java
Apache-2.0
public ExecutableRampStatus check(@NotNull final String rampId, @NotNull final String flowId) { return Optional.ofNullable(this.get(rampId)) .map(table -> table.get(flowId)) .map(ExecutableRampExceptionalItems.RampRecord::getStatus) .orElse(ExecutableRampStatus.UNDETERMINED); }
Map of Executable Ramp Exceptional Items at Flow Level, Map.key = rampId
check
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalFlowItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalFlowItemsMap.java
Apache-2.0
@Override public ExecutableRampExceptionalFlowItemsMap clone() { return (ExecutableRampExceptionalFlowItemsMap) super.clone(); }
Map of Executable Ramp Exceptional Items at Flow Level, Map.key = rampId
clone
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalFlowItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalFlowItemsMap.java
Apache-2.0
public static ExecutableRampExceptionalItems createInstance() { return new ExecutableRampExceptionalItems(); }
Object of Executable Ramp Exceptional Items
createInstance
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public Hashtable<String, RampRecord> getItems() { return items; }
Object of Executable Ramp Exceptional Items
getItems
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public ExecutableRampExceptionalItems setItems(Hashtable<String, RampRecord> items) { this.items = items; return this; }
Object of Executable Ramp Exceptional Items
setItems
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public RampRecord get(final String key) { return this.items.get(key); }
Object of Executable Ramp Exceptional Items
get
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public ExecutableRampStatus getStatus(final String key) { return Optional.ofNullable(get(key)).map(RampRecord::getStatus).orElse(ExecutableRampStatus.UNDETERMINED); }
Object of Executable Ramp Exceptional Items
getStatus
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public boolean exists(final String key) { return this.items.containsKey(key); }
Object of Executable Ramp Exceptional Items
exists
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public List<Map.Entry<String, RampRecord>> getCachedItems() { return this.getItems() .entrySet() .stream() .filter(item -> item.getValue().isCachedOnly()) .collect(Collectors.toList()); }
Object of Executable Ramp Exceptional Items
getCachedItems
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public void resetCacheFlag() { this.getCachedItems().forEach(item -> item.getValue().resetCachedOnly()); }
Object of Executable Ramp Exceptional Items
resetCacheFlag
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public ExecutableRampExceptionalItems add( @NotNull final String key, @NotNull final ExecutableRampStatus treatment, final long timeStamp) { return add(key, treatment, timeStamp, false); }
Object of Executable Ramp Exceptional Items
add
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public ExecutableRampExceptionalItems add( @NotNull final String key, @NotNull final ExecutableRampStatus treatment, final long timeStamp, boolean isCacheOnly) { this.items.put(key, RampRecord.createInstance(treatment, timeStamp, isCacheOnly)); return this; }
Object of Executable Ramp Exceptional Items
add
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
@Override public ExecutableRampExceptionalItems refresh(ExecutableRampExceptionalItems source) { Set<String> mergedKeys = new HashSet(); mergedKeys.addAll(this.items.keySet()); mergedKeys.addAll(source.items.keySet()); mergedKeys.stream().forEach(key -> { if (this.items.containsKey(key)) { ...
Object of Executable Ramp Exceptional Items
refresh
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
@Override public ExecutableRampExceptionalItems clone() { Hashtable<String, RampRecord> clonedItems = new Hashtable<>(); clonedItems.putAll(this.getItems()); return ExecutableRampExceptionalItems .createInstance() .setItems(clonedItems); }
Object of Executable Ramp Exceptional Items
clone
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
@Override public int elementCount() { return this.items.size(); }
Object of Executable Ramp Exceptional Items
elementCount
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public static RampRecord createInstance(ExecutableRampStatus status, long timeStamp) { RampRecord rampRecord = new RampRecord(status, timeStamp, false); return rampRecord; }
Object of Executable Ramp Exceptional Items
createInstance
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public static RampRecord createInstance(ExecutableRampStatus status, long timeStamp, boolean isCachedOnly) { RampRecord rampRecord = new RampRecord(status, timeStamp, isCachedOnly); return rampRecord; }
Object of Executable Ramp Exceptional Items
createInstance
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public RampRecord setCachedOnly() { this.isCachedOnly = true; return this; }
Object of Executable Ramp Exceptional Items
setCachedOnly
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public RampRecord resetCachedOnly() { this.isCachedOnly = false; return this; }
Object of Executable Ramp Exceptional Items
resetCachedOnly
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public boolean isCachedOnly() { return this.isCachedOnly; }
Object of Executable Ramp Exceptional Items
isCachedOnly
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public ExecutableRampStatus getStatus() { return this.status; }
Object of Executable Ramp Exceptional Items
getStatus
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public long getTimeStamp() { return this.timeStamp; }
Object of Executable Ramp Exceptional Items
getTimeStamp
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalItems.java
Apache-2.0
public static ExecutableRampExceptionalJobItemsMap createInstance() { return new ExecutableRampExceptionalJobItemsMap(); }
Map of Executable Ramp Exceptional Items at Job Level, Map.key = Pair(rampId, flowId)
createInstance
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalJobItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalJobItemsMap.java
Apache-2.0
public void add(@NotNull final String rampId, @NotNull final String flowId, @NotNull final String jobId, @NotNull final ExecutableRampStatus treatment, final long timeStamp) { Pair<String, String> key = new Pair<>(rampId, flowId); if (this.containsKey(key)) { this.get(key).add(jobId, treatment, time...
Map of Executable Ramp Exceptional Items at Job Level, Map.key = Pair(rampId, flowId)
add
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalJobItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalJobItemsMap.java
Apache-2.0
public ExecutableRampExceptionalItems get(@NotNull final String rampId, @NotNull final String flowId) { return this.get(new Pair<>(rampId, flowId)); }
Map of Executable Ramp Exceptional Items at Job Level, Map.key = Pair(rampId, flowId)
get
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalJobItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalJobItemsMap.java
Apache-2.0
public ExecutableRampExceptionalItems.RampRecord get(@NotNull final String rampId, @NotNull final String flowId, @NotNull final String jobId) { return Optional.ofNullable(this.get(rampId, flowId)) .map(items -> items.getItems().get(jobId)) .orElse(null); }
Map of Executable Ramp Exceptional Items at Job Level, Map.key = Pair(rampId, flowId)
get
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalJobItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalJobItemsMap.java
Apache-2.0
public boolean exists(@NotNull final String rampId, @NotNull final String flowId, @NotNull final String jobId) { return Optional.ofNullable(this.get(rampId, flowId)) .map(items -> items.exists(jobId)) .orElse(false); }
Map of Executable Ramp Exceptional Items at Job Level, Map.key = Pair(rampId, flowId)
exists
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalJobItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalJobItemsMap.java
Apache-2.0
public ExecutableRampStatus check(@NotNull final String rampId, @NotNull final String flowId, @NotNull final String jobId) { return Optional.ofNullable(this.get(rampId, flowId)) .map(exceptionalItems -> exceptionalItems.getStatus(jobId)) .orElse(ExecutableRampStatus.UNDETERMINED); }
Map of Executable Ramp Exceptional Items at Job Level, Map.key = Pair(rampId, flowId)
check
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalJobItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalJobItemsMap.java
Apache-2.0
public Map<String, ExecutableRampExceptionalItems> getExceptionalJobItemsByFlow(@NotNull final String flowId) { return this.entrySet().stream() .filter(entitySet -> entitySet.getKey().getSecond().equalsIgnoreCase(flowId)) .collect(Collectors.toMap( items -> items.getKey().getFirst(), ...
Map of Executable Ramp Exceptional Items at Job Level, Map.key = Pair(rampId, flowId)
getExceptionalJobItemsByFlow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalJobItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalJobItemsMap.java
Apache-2.0
@Override public ExecutableRampExceptionalJobItemsMap clone() { return (ExecutableRampExceptionalJobItemsMap) super.clone(); }
Map of Executable Ramp Exceptional Items at Job Level, Map.key = Pair(rampId, flowId)
clone
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalJobItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampExceptionalJobItemsMap.java
Apache-2.0
public static ExecutableRampItemsMap createInstance() { return new ExecutableRampItemsMap(); }
Map of Executable Ramp Items, Mak.key = rampId
createInstance
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampItemsMap.java
Apache-2.0
public ExecutableRampItemsMap add(@NotNull final String rampId, @NotNull final String dependency, @NotNull final String rampValue) { ExecutableRampItems executableRampItems = this.getOrDefault(rampId, null); if (executableRampItems == null) { executableRampItems = ExecutableRampItems.createInstance...
Map of Executable Ramp Items, Mak.key = rampId
add
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampItemsMap.java
Apache-2.0
public Props getRampItems(@NotNull final String rampId) { return Optional.ofNullable(this.get(rampId)) .map(ExecutableRampItems::getRampItems) .orElse(new Props()); }
Map of Executable Ramp Items, Mak.key = rampId
getRampItems
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampItemsMap.java
Apache-2.0
public Set<String> getDependencies(@NotNull final String rampId) { return Optional.ofNullable(this.get(rampId)) .map(ExecutableRampItems::getDependencies) .orElse(Collections.emptySet()); }
Map of Executable Ramp Items, Mak.key = rampId
getDependencies
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampItemsMap.java
Apache-2.0
@Override public ExecutableRampItemsMap clone() { return (ExecutableRampItemsMap) super.clone(); }
Map of Executable Ramp Items, Mak.key = rampId
clone
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampItemsMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampItemsMap.java
Apache-2.0
public static ExecutableRampMap createInstance() { return new ExecutableRampMap(); }
Map of ExecutableRamp, Map.key = RampId
createInstance
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampMap.java
Apache-2.0
public Collection<ExecutableRamp> getActivatedAll() { return this.values().stream() .filter(ExecutableRamp::isActive) .collect(Collectors.toSet()); }
Map of ExecutableRamp, Map.key = RampId
getActivatedAll
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampMap.java
Apache-2.0
public Collection<ExecutableRamp> getAll() { return this.values().stream().collect(Collectors.toSet()); }
Map of ExecutableRamp, Map.key = RampId
getAll
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampMap.java
Apache-2.0
@Override public ExecutableRampMap clone() { return (ExecutableRampMap) super.clone(); }
Map of ExecutableRamp, Map.key = RampId
clone
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampMap.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampMap.java
Apache-2.0
public static ExecutableRampStatus of(String key) { if (key.equalsIgnoreCase(ExecutableRampStatus.SELECTED.getKey())) { return ExecutableRampStatus.SELECTED; } else if (key.equalsIgnoreCase(ExecutableRampStatus.UNSELECTED.getKey())) { return ExecutableRampStatus.UNSELECTED; } else if (key.equals...
Object to hold the status of the current executable Ramp
of
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampStatus.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampStatus.java
Apache-2.0
public String getKey() { return key; }
Object to hold the status of the current executable Ramp
getKey
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutableRampStatus.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutableRampStatus.java
Apache-2.0
@Override public void setupExecutors() { // Todo: deprecate this method }
Controls flow executions on web server. This module implements the polling model in the new AZ dispatching design. It's injected only when azkaban.execution.dispatch.method is configured to POLL. It will ultimately replace ExecutorManager in the future.
setupExecutors
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Override public void disableQueueProcessorThread() { // Todo: deprecate this method }
Controls flow executions on web server. This module implements the polling model in the new AZ dispatching design. It's injected only when azkaban.execution.dispatch.method is configured to POLL. It will ultimately replace ExecutorManager in the future.
disableQueueProcessorThread
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Override public void enableQueueProcessorThread() { // Todo: deprecate this method }
Controls flow executions on web server. This module implements the polling model in the new AZ dispatching design. It's injected only when azkaban.execution.dispatch.method is configured to POLL. It will ultimately replace ExecutorManager in the future.
enableQueueProcessorThread
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Override public State getExecutorManagerThreadState() { // Todo: deprecate this method return State.RUNNABLE; }
Controls flow executions on web server. This module implements the polling model in the new AZ dispatching design. It's injected only when azkaban.execution.dispatch.method is configured to POLL. It will ultimately replace ExecutorManager in the future.
getExecutorManagerThreadState
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Override public boolean isExecutorManagerThreadActive() { // Todo: deprecate this method return true; }
Controls flow executions on web server. This module implements the polling model in the new AZ dispatching design. It's injected only when azkaban.execution.dispatch.method is configured to POLL. It will ultimately replace ExecutorManager in the future.
isExecutorManagerThreadActive
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Override public long getLastExecutorManagerThreadCheckTime() { // Todo: deprecate this method return 1L; }
Controls flow executions on web server. This module implements the polling model in the new AZ dispatching design. It's injected only when azkaban.execution.dispatch.method is configured to POLL. It will ultimately replace ExecutorManager in the future.
getLastExecutorManagerThreadCheckTime
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Override public Collection<Executor> getAllActiveExecutors() { List<Executor> executors = new ArrayList<>(); try { executors = this.executorLoader.fetchActiveExecutors(); } catch (final ExecutorManagerException e) { logger.error("Failed to get all active executors.", e); } return exec...
Controls flow executions on web server. This module implements the polling model in the new AZ dispatching design. It's injected only when azkaban.execution.dispatch.method is configured to POLL. It will ultimately replace ExecutorManager in the future.
getAllActiveExecutors
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Override public Executor fetchExecutor(final int executorId) throws ExecutorManagerException { return this.executorLoader.fetchExecutor(executorId); }
Controls flow executions on web server. This module implements the polling model in the new AZ dispatching design. It's injected only when azkaban.execution.dispatch.method is configured to POLL. It will ultimately replace ExecutorManager in the future.
fetchExecutor
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Override public Set<String> getPrimaryServerHosts() { final HashSet<String> ports = new HashSet<>(); try { for (final Executor executor : this.executorLoader.fetchActiveExecutors()) { ports.add(executor.getHost() + ":" + executor.getPort()); } } catch (final ExecutorManagerException e...
Controls flow executions on web server. This module implements the polling model in the new AZ dispatching design. It's injected only when azkaban.execution.dispatch.method is configured to POLL. It will ultimately replace ExecutorManager in the future.
getPrimaryServerHosts
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Override public Set<String> getAllActiveExecutorServerHosts() { final Set<String> ports = getPrimaryServerHosts(); // include executor which were initially active and still has flows running try { for (final Pair<ExecutionReference, ExecutableFlow> running : this.executorLoader .fetchActi...
Controls flow executions on web server. This module implements the polling model in the new AZ dispatching design. It's injected only when azkaban.execution.dispatch.method is configured to POLL. It will ultimately replace ExecutorManager in the future.
getAllActiveExecutorServerHosts
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
public List<Integer> getQueuedFlowIds() { final List<Integer> allIds = new ArrayList<>(); try { getExecutionIdsHelper(allIds, this.executorLoader.fetchQueuedFlows()); } catch (final ExecutorManagerException e) { logger.error("Failed to get queued flow ids.", e); } return allIds; }
Get execution ids of all non-dispatched flows from database.
getQueuedFlowIds
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Override public long getQueuedFlowSize() { long size = 0L; try { size = this.executorLoader.fetchQueuedFlows().size(); } catch (final ExecutorManagerException e) { logger.error("Failed to get queued flow size.", e); } return size; }
Get the number of non-dispatched flows from database. {@inheritDoc}
getQueuedFlowSize
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Override public DispatchMethod getDispatchMethod() { return DispatchMethod.POLL; }
Get the number of non-dispatched flows from database. {@inheritDoc}
getDispatchMethod
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Override public void resumeFlow(final ExecutableFlow exFlow, final String userId) throws ExecutorManagerException { synchronized (exFlow) { final Pair<ExecutionReference, ExecutableFlow> pair = this.executorLoader.fetchActiveFlowByExecId(exFlow.getExecutionId()); if (pair == null) { ...
Get the number of non-dispatched flows from database. {@inheritDoc}
resumeFlow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Override public void pauseFlow(final ExecutableFlow exFlow, final String userId) throws ExecutorManagerException { synchronized (exFlow) { final Pair<ExecutionReference, ExecutableFlow> pair = this.executorLoader.fetchActiveFlowByExecId(exFlow.getExecutionId()); if (pair == null) { ...
Get the number of non-dispatched flows from database. {@inheritDoc}
pauseFlow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Override public void retryFailures(final ExecutableFlow exFlow, final String userId) throws ExecutorManagerException { modifyExecutingJobs(exFlow, ConnectorParams.MODIFY_RETRY_FAILURES, userId); }
Get the number of non-dispatched flows from database. {@inheritDoc}
retryFailures
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@SuppressWarnings("unchecked") private Map<String, Object> modifyExecutingJobs(final ExecutableFlow exFlow, final String command, final String userId, final String... jobIds) throws ExecutorManagerException { synchronized (exFlow) { final Pair<ExecutionReference, ExecutableFlow> pair = ...
Get the number of non-dispatched flows from database. {@inheritDoc}
modifyExecutingJobs
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Override public void start() { this.executorHealthChecker.start(); }
Get the number of non-dispatched flows from database. {@inheritDoc}
start
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Override public void shutdown() { this.executorHealthChecker.shutdown(); }
Get the number of non-dispatched flows from database. {@inheritDoc}
shutdown
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
Apache-2.0
@Deprecated public static void finalizeFlow(final ExecutorLoader executorLoader, @Nullable final AlerterHolder alerterHolder, final ExecutableFlow flow, final String reason, @Nullable final Throwable originalError, final Status finalFlowStatus) { finalizeFlow(null, null, executorLoader, aler...
If the current status of the execution is not one of the finished statuses, mark the execution as failed in the DB. @param executorLoader the executor loader @param alerterHolder the alerter holder @param flow the execution @param reason reason for finalizing the execution @param originalError ...
finalizeFlow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
Apache-2.0
public static void finalizeFlow(final EventHandler eventHandler, final ProjectManager projectManager, final ExecutorLoader executorLoader, @Nullable final AlerterHolder alerterHolder, final ExecutableFlow flow, final String reason, @Nullable final Throwable originalError, final Status ...
If the current status of the execution is not one of the finished statuses, mark the execution as failed in the DB. @param eventHandler the event handler to fire job events @param projectManager the project manager to load job props from DB @param executorLoader the executor loader @param alerterHolder the aler...
finalizeFlow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
Apache-2.0
static ExecutableFlow getFlowToRestart(final ExecutableFlow flow, final Status originalStatus){ final ExecutionOptions options = flow.getExecutionOptions(); if (options == null) { logger.debug("ExecutableFlow: " + flow.getExecutionId() + " has ExecutionOptions == null"); return null; } ...
This method tries to determine whether the flow should be restarted for certain statuses otherwise simply return. There are 4 scenarios that this method is called: 1. a flow is cleaned up by ContainerCleanupManager; 2. a flow has dispatch failure; 3. a flow encounters pod failure; 4. a flow finalized normally. If the o...
getFlowToRestart
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
Apache-2.0
public static void restartFlow(final ExecutableFlow flow, final Status originalStatus) { ExecutableFlow flowToRestart = getFlowToRestart(flow, originalStatus); if (flowToRestart != null){ ExecutionControllerUtils.submitRestartFlow(flowToRestart); } }
This method tries to determine whether the flow should be restarted for certain statuses otherwise simply return. There are 4 scenarios that this method is called: 1. a flow is cleaned up by ContainerCleanupManager; 2. a flow has dispatch failure; 3. a flow encounters pod failure; 4. a flow finalized normally. If the o...
restartFlow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
Apache-2.0
private static void submitRestartFlow(final ExecutableFlow flow) { EXECUTOR_SERVICE.execute(() -> restartFlow(flow)); }
This method tries to determine whether the flow should be restarted for certain statuses otherwise simply return. There are 4 scenarios that this method is called: 1. a flow is cleaned up by ContainerCleanupManager; 2. a flow has dispatch failure; 3. a flow encounters pod failure; 4. a flow finalized normally. If the o...
submitRestartFlow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
Apache-2.0
public static void alertUserOnFlowFinished(final ExecutableFlow flow, final AlerterHolder alerterHolder, final String[] extraReasons) { if (flow.getStatus() != Status.SUCCEEDED) { alerterHolder.forEach((String alerterName, Alerter alerter) -> { try { alerter.alertOnError(flow, extraRea...
When a flow is finished, alert the user as is configured in the execution options. @param flow the execution @param alerterHolder the alerter holder @param extraReasons the extra reasons for alerting
alertUserOnFlowFinished
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
Apache-2.0
public static void alertUserOnFirstError(final ExecutableFlow flow, final AlerterHolder alerterHolder) { final ExecutionOptions options = flow.getExecutionOptions(); if (options.getNotifyOnFirstFailure()) { logger.info("Alert on first error of execution " + flow.getExecutionId()); alerterHolde...
Alert the user when the flow has encountered the first error. @param flow the execution @param alerterHolder the alerter holder
alertUserOnFirstError
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
Apache-2.0
public static void alertUserOnJobPropertyOverridden(final Project project, final Flow flow, final Map<String, Object> eventData, final AlerterHolder alerterHolder) { if (!flow.getOverrideEmails().isEmpty()) { logger.info("Alert on job property overridden event in project: " + project.getName()); f...
Alert the user when job property is overridden in a project @param project @param flow @param eventData
alertUserOnJobPropertyOverridden
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
Apache-2.0
public static String[] getFinalizeFlowReasons(final String reason, final Throwable originalError) { final List<String> reasons = new LinkedList<>(); reasons.add(reason); if (originalError != null) { reasons.add(ExceptionUtils.getStackTrace(originalError)); } return reasons.toArray(new St...
Get the reasons to finalize the flow. @param reason the reason @param originalError the original error @return the reasons to finalize the flow
getFinalizeFlowReasons
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
Apache-2.0
@Deprecated public static void failEverything(final ExecutableFlow exFlow, final Status finalFlowStatus, final ExecutorLoader executorLoader) { failEverything(null, null, exFlow, finalFlowStatus, executorLoader); }
Set the flow status to failed and fail every node inside the flow. @param exFlow the executable flow @param finalFlowStatus Status to be set if the flow is not in one of the "finished" statues.
failEverything
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
Apache-2.0
public static void failEverything(final EventHandler eventHandler, final ProjectManager projectManager, final ExecutableFlow exFlow, final Status finalFlowStatus, final ExecutorLoader executorLoader) { final long time = System.currentTimeMillis(); final Map<ExecutableNode, Status> nodeToOrigStatus =...
Set the flow status to failed and fail every node inside the flow. @param eventHandler the event handler to fire job events @param projectManager the project manager to load job props from DB @param exFlow the executable flow @param finalFlowStatus Status to be set if the flow is not in one of the "finish...
failEverything
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
Apache-2.0
public static boolean isFinished(final ExecutableFlow flow) { switch (flow.getStatus()) { case EXECUTION_STOPPED: case SUCCEEDED: case FAILED: case KILLED: return true; default: return false; } }
Check if the flow status is finished. @param flow the executable flow @return the boolean
isFinished
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
Apache-2.0
public static String createJobLinkUrl(final ExecutableFlow exFlow, final String jobId, final String applicationId, final Props azkProps) { if (applicationId == null) { return null; } final ExecutableNode node = exFlow.getExecutableNodePath(jobId); final boolean executableNodeFound = (node !...
Dynamically create the job link url. Construct the job link url from resource manager url. If it's valid, just return the job link url. Otherwise, construct the job link url from Hadoop/Spark job history server. @param exFlow The executable flow. @param jobId The job id. @param applicationId The applica...
createJobLinkUrl
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
Apache-2.0
public static Set<String> findApplicationIdsFromLog(final String logData) { final Set<String> applicationIds = new LinkedHashSet<>(); final Matcher matcher = APPLICATION_ID_PATTERN.matcher(logData); while (matcher.find()) { final String appId = matcher.group(1); applicationIds.add(appId); }...
Find all the application ids the job log data contains by matching "application_<id>" pattern. Application ids are returned in the order they appear. @param logData The log data. @return The set of application ids found.
findApplicationIdsFromLog
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
Apache-2.0
public static String clusterQualifiedExecId(final String clusterName, final int executionId) { requireNonNull(clusterName, "cluster name must not be null"); return String.format("%s-%d", clusterName, executionId); }
Create a string by combining the cluster name with the execution Id. @param clusterName name of the azkaban cluster @param executionId execution id of a flow @return
clusterQualifiedExecId
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
Apache-2.0
public void finalizeFlow(final ExecutableFlow flow, final String reason, @Nullable final Throwable originalError) { final int execId = flow.getExecutionId(); boolean alertUser = true; this.updaterStage.set("finalizing flow " + execId); // First we check if the execution in the datastore is comple...
If the current status of the execution is not one of the finished statuses, marks the execution as failed in the DB. Removes the execution from the running executions cache. @param flow the execution @param reason reason for finalizing the execution @param originalError the cause, if execution is being finalized becau...
finalizeFlow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionFinalizer.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionFinalizer.java
Apache-2.0
List<Integer> selectUnfinishedFlows() throws ExecutorManagerException { try { return this.dbOperator.query(SelectFromExecutionFlows.SELECT_EXECUTION_BASE_QUERY + "WHERE status NOT IN (" + getTerminalStatusesString() + ")", new SelectFromExecutionFlows()); } catch (fin...
Select flows that are not in finished status, including both dispatched and non-dispatched flows. @return unfinished flow exec_ids @throws ExecutorManagerException the executor manager exception
selectUnfinishedFlows
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionFlowDao.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionFlowDao.java
Apache-2.0
List<Integer> selectUnfinishedFlows(final int projectId, final String flowId) throws ExecutorManagerException { try { return this.dbOperator.query(SelectFromExecutionFlows.SELECT_EXECUTION_BASE_QUERY + "WHERE project_id=? AND flow_id=? AND " + "status NOT IN (" + getT...
Select flows that are not in finished status, including both dispatched and non-dispatched flows. @return unfinished flow exec_ids @throws ExecutorManagerException the executor manager exception
selectUnfinishedFlows
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionFlowDao.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionFlowDao.java
Apache-2.0
List<ExecutableFlow> fetchFlowHistory(final int skip, final int num) throws ExecutorManagerException { try { return this.dbOperator.query(FetchExecutableFlows.FETCH_ALL_EXECUTABLE_FLOW_HISTORY, new FetchExecutableFlows(), skip, num); } catch (final SQLException e) { throw new Executo...
Select flows that are not in finished status, including both dispatched and non-dispatched flows. @return unfinished flow exec_ids @throws ExecutorManagerException the executor manager exception
fetchFlowHistory
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutionFlowDao.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutionFlowDao.java
Apache-2.0