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
private String callForJsonString(final String host, final int port, final String path, final DispatchMethod dispatchMethod, final Optional<Integer> httpTimeout, List<Pair<String, String>> paramList) throws IOException { if (paramList == null) { paramList = new ArrayList<>(); } @SuppressWa...
Call executor and parse the JSON response as an instance of the class given as an argument.
callForJsonString
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorApiGateway.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorApiGateway.java
Apache-2.0
public Map<String, Object> updateExecutions(final Executor executor, final List<ExecutableFlow> executions) throws ExecutorManagerException { final List<Long> updateTimesList = new ArrayList<>(); final List<Integer> executionIdsList = new ArrayList<>(); // We pack the parameters of the same host toget...
Call executor and parse the JSON response as an instance of the class given as an argument.
updateExecutions
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorApiGateway.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorApiGateway.java
Apache-2.0
@VisibleForTesting Executor getExecutor(final ExecutionReference ref) { if (ref.getDispatchMethod() == DispatchMethod.CONTAINERIZED) { final Pair<String, Integer> flowPodEndpoint = KubernetesContainerizedImpl.getFlowServiceEndpoint(this.azkProps, ref.getExecId()); return new Executor(-1, flo...
Given an {@link ExecutionReference}, get the executor of the execution. Under containerized mode, the returned executor represents the service endpoint of the flow pod; otherwise, the bare metal executor will be returned. @param ref an {@link ExecutionReference} @return the {@link Executor} which performs the execution...
getExecutor
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorApiGateway.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorApiGateway.java
Apache-2.0
@Override public List<Executor> handle(final ResultSet rs) throws SQLException { if (!rs.next()) { return Collections.emptyList(); } final List<Executor> executors = new ArrayList<>(); do { final int id = rs.getInt(1); final String host = rs.getString(2); fin...
JDBC ResultSetHandler to fetch records from executors table
handle
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorDao.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorDao.java
Apache-2.0
@Override public List<ExecutorLogEvent> handle(final ResultSet rs) throws SQLException { if (!rs.next()) { return Collections.<ExecutorLogEvent>emptyList(); } final ArrayList<ExecutorLogEvent> events = new ArrayList<>(); do { final int executorId = rs.getInt(1); fina...
JDBC ResultSetHandler to fetch records from executor_events table
handle
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorEventsDao.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorEventsDao.java
Apache-2.0
public void start() { logger.info("Starting executor health checker."); this.scheduler.scheduleAtFixedRate(this::checkExecutorHealthQuietly, 0L, this.healthCheckIntervalMin, TimeUnit.MINUTES); }
Periodically checks the health of executors. Finalizes flows or sends alert emails when needed.
start
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
Apache-2.0
public void shutdown() { logger.info("Shutting down executor health checker."); this.scheduler.shutdown(); try { if (!this.scheduler.awaitTermination(60, TimeUnit.SECONDS)) { this.scheduler.shutdownNow(); } } catch (final InterruptedException ex) { this.scheduler.shutdownNow();...
Periodically checks the health of executors. Finalizes flows or sends alert emails when needed.
shutdown
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
Apache-2.0
public void checkExecutorHealthQuietly() { try { logger.info("Begin executor healthcheck routine."); checkExecutorHealth(); } catch (final RuntimeException e) { logger.error("Unexepected error during executor healthcheck.", e); } finally { logger.info("End executor healthcheck routin...
Wrapper for capturing and logging any exceptions thrown during healthcheck. {@code ScheduledExecutorService} stops the scheduled invocations of a given method in case it throws an exception. Any exceptions are not expected at this stage however in case any unchecked exceptions do occur, we still don't want subsequent h...
checkExecutorHealthQuietly
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
Apache-2.0
private static String executorDetailString(Executor executor) { return String.format("executor-id: %d, executor-host: %s, executor-port: %d", executor.getId(), executor.getHost(), executor.getPort()); }
Wrapper for capturing and logging any exceptions thrown during healthcheck. {@code ScheduledExecutorService} stops the scheduled invocations of a given method in case it throws an exception. Any exceptions are not expected at this stage however in case any unchecked exceptions do occur, we still don't want subsequent h...
executorDetailString
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
Apache-2.0
@VisibleForTesting void checkExecutorHealth() { final Map<Optional<Executor>, List<ExecutableFlow>> exFlowMap = getFlowToExecutorMap(); for (final Map.Entry<Optional<Executor>, List<ExecutableFlow>> entry : exFlowMap.entrySet()) { final Optional<Executor> executorOption = entry.getKey(); if (!exec...
Checks executor health. Finalizes the flow if its executor is already removed from DB or sends alert emails if the executor isn't alive any more.
checkExecutorHealth
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
Apache-2.0
@VisibleForTesting void finalizeFlows(List<ExecutableFlow> flows, String finalizeReason) { for (ExecutableFlow flow: flows) { logger.warn( String.format("Finalizing execution %s, %s", flow.getExecutionId(), finalizeReason)); try { ExecutionControllerUtils .finalizeFlow(th...
Finalize given flows with the provided reason. @param flows @param finalizeReason
finalizeFlows
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
Apache-2.0
private Map<Optional<Executor>, List<ExecutableFlow>> getFlowToExecutorMap() { final HashMap<Optional<Executor>, List<ExecutableFlow>> exFlowMap = new HashMap<>(); try { for (final Pair<ExecutionReference, ExecutableFlow> runningFlow : this .executorLoader.fetchActiveFlows(DispatchMethod.POLL).v...
Groups Executable flow by Executors to reduce number of REST calls. @return executor to list of flows map
getFlowToExecutorMap
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
Apache-2.0
private void handleExecutorNotAliveCase(final Executor executor, final List<ExecutableFlow> flows, final ExecutorManagerException e) { logger.error("Failed to get update from executor - " + executorDetailString(executor), e); this.executorFailureCount.put(executor.getId(), this.executorFailureCount.getOrD...
Increments executor failure count. If it reaches max failure count, sends alert emails to AZ admin and executes any cleanup actions for flows on those executors. @param executor the executor @param flows flows assigned to the executor @param e Exception thrown when the executor is not alive
handleExecutorNotAliveCase
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
Apache-2.0
public double getCpuUsage() { return this.cpuUsage; }
Class that exposes the statistics from the executor server. List of the statistics - remainingMemoryPercent; remainingMemory; remainingFlowCapacity; numberOfAssignedFlows; lastDispatchedTime; cpuUsage;
getCpuUsage
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
Apache-2.0
public void setCpuUpsage(final double value) { this.cpuUsage = value; }
Class that exposes the statistics from the executor server. List of the statistics - remainingMemoryPercent; remainingMemory; remainingFlowCapacity; numberOfAssignedFlows; lastDispatchedTime; cpuUsage;
setCpuUpsage
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
Apache-2.0
public double getRemainingMemoryPercent() { return this.remainingMemoryPercent; }
Class that exposes the statistics from the executor server. List of the statistics - remainingMemoryPercent; remainingMemory; remainingFlowCapacity; numberOfAssignedFlows; lastDispatchedTime; cpuUsage;
getRemainingMemoryPercent
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
Apache-2.0
public void setRemainingMemoryPercent(final double value) { this.remainingMemoryPercent = value; }
Class that exposes the statistics from the executor server. List of the statistics - remainingMemoryPercent; remainingMemory; remainingFlowCapacity; numberOfAssignedFlows; lastDispatchedTime; cpuUsage;
setRemainingMemoryPercent
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
Apache-2.0
public long getRemainingMemoryInMB() { return this.remainingMemoryInMB; }
Class that exposes the statistics from the executor server. List of the statistics - remainingMemoryPercent; remainingMemory; remainingFlowCapacity; numberOfAssignedFlows; lastDispatchedTime; cpuUsage;
getRemainingMemoryInMB
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
Apache-2.0
public void setRemainingMemoryInMB(final long value) { this.remainingMemoryInMB = value; }
Class that exposes the statistics from the executor server. List of the statistics - remainingMemoryPercent; remainingMemory; remainingFlowCapacity; numberOfAssignedFlows; lastDispatchedTime; cpuUsage;
setRemainingMemoryInMB
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
Apache-2.0
public int getRemainingFlowCapacity() { return this.remainingFlowCapacity; }
Class that exposes the statistics from the executor server. List of the statistics - remainingMemoryPercent; remainingMemory; remainingFlowCapacity; numberOfAssignedFlows; lastDispatchedTime; cpuUsage;
getRemainingFlowCapacity
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
Apache-2.0
public void setRemainingFlowCapacity(final int value) { this.remainingFlowCapacity = value; }
Class that exposes the statistics from the executor server. List of the statistics - remainingMemoryPercent; remainingMemory; remainingFlowCapacity; numberOfAssignedFlows; lastDispatchedTime; cpuUsage;
setRemainingFlowCapacity
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
Apache-2.0
public long getLastDispatchedTime() { return this.lastDispatchedTime; }
Class that exposes the statistics from the executor server. List of the statistics - remainingMemoryPercent; remainingMemory; remainingFlowCapacity; numberOfAssignedFlows; lastDispatchedTime; cpuUsage;
getLastDispatchedTime
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
Apache-2.0
public void setLastDispatchedTime(final long value) { this.lastDispatchedTime = value; }
Class that exposes the statistics from the executor server. List of the statistics - remainingMemoryPercent; remainingMemory; remainingFlowCapacity; numberOfAssignedFlows; lastDispatchedTime; cpuUsage;
setLastDispatchedTime
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
Apache-2.0
public int getNumberOfAssignedFlows() { return this.numberOfAssignedFlows; }
Class that exposes the statistics from the executor server. List of the statistics - remainingMemoryPercent; remainingMemory; remainingFlowCapacity; numberOfAssignedFlows; lastDispatchedTime; cpuUsage;
getNumberOfAssignedFlows
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
Apache-2.0
public void setNumberOfAssignedFlows(final int value) { this.numberOfAssignedFlows = value; }
Class that exposes the statistics from the executor server. List of the statistics - remainingMemoryPercent; remainingMemory; remainingFlowCapacity; numberOfAssignedFlows; lastDispatchedTime; cpuUsage;
setNumberOfAssignedFlows
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
Apache-2.0
@Override public int hashCode() { int result; long temp; temp = Double.doubleToLongBits(this.remainingMemoryPercent); result = (int) (temp ^ (temp >>> 32)); result = 31 * result + (int) (this.remainingMemoryInMB ^ (this.remainingMemoryInMB >>> 32)); result = 31 * result + this.remainingFlowCap...
Class that exposes the statistics from the executor server. List of the statistics - remainingMemoryPercent; remainingMemory; remainingFlowCapacity; numberOfAssignedFlows; lastDispatchedTime; cpuUsage;
hashCode
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
Apache-2.0
@Override public boolean equals(final Object obj) { if (obj instanceof ExecutorInfo) { boolean result = true; final ExecutorInfo stat = (ExecutorInfo) obj; result &= this.remainingMemoryInMB == stat.remainingMemoryInMB; result &= this.cpuUsage == stat.cpuUsage; result &= this.remain...
Class that exposes the statistics from the executor server. List of the statistics - remainingMemoryPercent; remainingMemory; remainingFlowCapacity; numberOfAssignedFlows; lastDispatchedTime; cpuUsage;
equals
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
Apache-2.0
@Override public String toString() { return "ExecutorInfo{" + "remainingMemoryPercent=" + this.remainingMemoryPercent + ", remainingMemoryInMB=" + this.remainingMemoryInMB + ", remainingFlowCapacity=" + this.remainingFlowCapacity + ", numberOfAssignedFlows=" + this.numberOfAssigned...
Class that exposes the statistics from the executor server. List of the statistics - remainingMemoryPercent; remainingMemory; remainingFlowCapacity; numberOfAssignedFlows; lastDispatchedTime; cpuUsage;
toString
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorInfo.java
Apache-2.0
public int getExecutorId() { return this.executorId; }
Class to represent events on Azkaban executors @author gaggarwa
getExecutorId
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorLogEvent.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorLogEvent.java
Apache-2.0
public String getUser() { return this.user; }
Class to represent events on Azkaban executors @author gaggarwa
getUser
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorLogEvent.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorLogEvent.java
Apache-2.0
public Date getTime() { return this.time; }
Class to represent events on Azkaban executors @author gaggarwa
getTime
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorLogEvent.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorLogEvent.java
Apache-2.0
public EventType getType() { return this.type; }
Class to represent events on Azkaban executors @author gaggarwa
getType
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorLogEvent.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorLogEvent.java
Apache-2.0
public String getMessage() { return this.message; }
Class to represent events on Azkaban executors @author gaggarwa
getMessage
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorLogEvent.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorLogEvent.java
Apache-2.0
public static EventType fromInteger(final int x) throws IllegalArgumentException { switch (x) { case 1: return HOST_UPDATE; case 2: return PORT_UPDATE; case 3: return ACTIVATION; case 4: return INACTIVATION; case 5: ...
Log event type messages. Do not change the numeric representation of each enum. Only represent from 0 to 255 different codes.
fromInteger
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorLogEvent.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorLogEvent.java
Apache-2.0
public int getNumVal() { return this.numVal; }
Log event type messages. Do not change the numeric representation of each enum. Only represent from 0 to 255 different codes.
getNumVal
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorLogEvent.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorLogEvent.java
Apache-2.0
void initialize() throws ExecutorManagerException { if (this.initialized) { return; } this.initialized = true; this.setupExecutors(); this.loadRunningExecutions(); this.queuedFlows = new QueuedExecutions( this.azkProps.getLong(ConfigurationKeys.WEBSERVER_QUEUE_SIZE, 100000)); t...
Executor manager used to manage the client side job. @deprecated replaced by {@link ExecutionController}
initialize
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public void start() throws ExecutorManagerException { initialize(); this.updaterThread.start(); this.queueProcessor.start(); }
Executor manager used to manage the client side job. @deprecated replaced by {@link ExecutionController}
start
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private QueueProcessorThread setupQueueProcessor() { return new QueueProcessorThread( this.azkProps.getBoolean(Constants.ConfigurationKeys.QUEUEPROCESSING_ENABLED, true), this.azkProps.getLong(Constants.ConfigurationKeys.ACTIVE_EXECUTOR_REFRESH_IN_MS, 50000), this.azkProps.getInt( ...
Executor manager used to manage the client side job. @deprecated replaced by {@link ExecutionController}
setupQueueProcessor
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private void setupExecutorComparatorWeightsMap() { // initialize comparator feature weights for executor selector from azkaban.properties final Map<String, String> compListStrings = this.azkProps .getMapByPrefix(ConfigurationKeys.EXECUTOR_SELECTOR_COMPARATOR_PREFIX); if (compListStrings != null) { ...
Executor manager used to manage the client side job. @deprecated replaced by {@link ExecutionController}
setupExecutorComparatorWeightsMap
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private void setupExecutorFilterList() { // initialize hard filters for executor selector from azkaban.properties final String filters = this.azkProps .getString(ConfigurationKeys.EXECUTOR_SELECTOR_FILTERS, ""); if (filters != null) { this.filterList = Arrays.asList(StringUtils.split(filters, ...
Executor manager used to manage the client side job. @deprecated replaced by {@link ExecutionController}
setupExecutorFilterList
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private ExecutorService createExecutorInfoRefresherService() { return Executors.newFixedThreadPool(this.azkProps.getInt( ConfigurationKeys.EXECUTORINFO_REFRESH_MAX_THREADS, 5), new ThreadFactoryBuilder().setNameFormat("azk-refresher-pool-%d").build()); }
Executor manager used to manage the client side job. @deprecated replaced by {@link ExecutionController}
createExecutorInfoRefresherService
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public void setupExecutors() throws ExecutorManagerException { checkMultiExecutorMode(); this.activeExecutors.setupExecutors(); }
{@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#setupExecutors()
setupExecutors
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Deprecated private void checkMultiExecutorMode() { if (!this.azkProps.getBoolean(Constants.ConfigurationKeys.USE_MULTIPLE_EXECUTORS, false)) { throw new IllegalArgumentException( Constants.ConfigurationKeys.USE_MULTIPLE_EXECUTORS + " must be true. Single executor mode is not support...
{@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#setupExecutors()
checkMultiExecutorMode
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private void refreshExecutors() { final List<Pair<Executor, Future<ExecutorInfo>>> futures = new ArrayList<>(); for (final Executor executor : this.activeExecutors.getAll()) { // execute each executorInfo refresh task to fetch final Future<ExecutorInfo> fetchExecutionInfo = this.e...
Refresh Executor stats for all the actie executors in this executorManager
refreshExecutors
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
public boolean isQueueProcessorThreadActive() { return this.queueProcessor.isActive(); }
Returns state of QueueProcessor False, no flow is being dispatched True , flows are being dispatched as expected
isQueueProcessorThreadActive
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
public long getLastSuccessfulExecutorInfoRefresh() { return this.lastSuccessfulExecutorInfoRefresh; }
Return last Successful ExecutorInfo Refresh for all active executors
getLastSuccessfulExecutorInfoRefresh
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
public Set<String> getAvailableExecutorComparatorNames() { return ExecutorComparator.getAvailableComparatorNames(); }
Get currently supported Comparators available to use via azkaban.properties
getAvailableExecutorComparatorNames
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
public Set<String> getAvailableExecutorFilterNames() { return ExecutorFilter.getAvailableFilterNames(); }
Get currently supported filters available to use via azkaban.properties
getAvailableExecutorFilterNames
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public State getExecutorManagerThreadState() { return this.updaterThread.getState(); }
Get currently supported filters available to use via azkaban.properties
getExecutorManagerThreadState
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
public String getExecutorThreadStage() { return this.updaterStage.get(); }
Get currently supported filters available to use via azkaban.properties
getExecutorThreadStage
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public boolean isExecutorManagerThreadActive() { return this.updaterThread.isAlive(); }
Get currently supported filters available to use via azkaban.properties
isExecutorManagerThreadActive
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public long getLastExecutorManagerThreadCheckTime() { return this.updaterThread.getLastThreadCheckTime(); }
Get currently supported filters available to use via azkaban.properties
getLastExecutorManagerThreadCheckTime
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public Collection<Executor> getAllActiveExecutors() { return Collections.unmodifiableCollection(this.activeExecutors.getAll()); }
Get currently supported filters available to use via azkaban.properties
getAllActiveExecutors
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public Executor fetchExecutor(final int executorId) throws ExecutorManagerException { for (final Executor executor : this.activeExecutors.getAll()) { if (executor.getId() == executorId) { return executor; } } return this.executorLoader.fetchExecutor(executorId); }
{@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#fetchExecutor(int)
fetchExecutor
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public Set<String> getPrimaryServerHosts() { // Only one for now. More probably later. final HashSet<String> ports = new HashSet<>(); for (final Executor executor : this.activeExecutors.getAll()) { ports.add(executor.getHost() + ":" + executor.getPort()); } return ports; }
{@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#fetchExecutor(int)
getPrimaryServerHosts
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public Set<String> getAllActiveExecutorServerHosts() { // Includes non primary server/hosts final HashSet<String> ports = new HashSet<>(); for (final Executor executor : this.activeExecutors.getAll()) { ports.add(executor.getHost() + ":" + executor.getPort()); } // include executor...
{@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#fetchExecutor(int)
getAllActiveExecutorServerHosts
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private void loadRunningExecutions() throws ExecutorManagerException { logger.info("Loading running flows from database.."); final Map<Integer, Pair<ExecutionReference, ExecutableFlow>> activeFlows = this.executorLoader .fetchActiveFlows(DispatchMethod.PUSH); logger.info("Loaded " + activeFlows.size...
{@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#fetchExecutor(int)
loadRunningExecutions
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private void loadQueuedFlows() throws ExecutorManagerException { final List<Pair<ExecutionReference, ExecutableFlow>> retrievedExecutions = this.executorLoader.fetchQueuedFlows(); if (retrievedExecutions != null) { for (final Pair<ExecutionReference, ExecutableFlow> pair : retrievedExecutions) { ...
{@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#fetchExecutor(int)
loadQueuedFlows
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public List<Integer> getRunningFlowIds(final int projectId, final String flowId) { final List<Integer> executionIds = new ArrayList<>(); executionIds.addAll(ExecutorUtils.getRunningFlowsHelper(projectId, flowId, this.queuedFlows.getAllEntries())); // it's possible an execution is running...
Gets a list of all the active (running flows and non-dispatched flows) executions for a given project and flow {@inheritDoc}. Results should be sorted as we assume this while setting up pipelined execution Id. @see azkaban.executor.ExecutorManagerAdapter#getRunningFlowIds(int, java.lang.String)
getRunningFlowIds
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public List<Pair<ExecutableFlow, Optional<Executor>>> getActiveFlowsWithExecutor() { final List<Pair<ExecutableFlow, Optional<Executor>>> flows = new ArrayList<>(); getActiveFlowsWithExecutorHelper(flows, this.queuedFlows.getAllEntries()); getActiveFlowsWithExecutorHelper(flows, this.run...
{@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#getActiveFlowsWithExecutor()
getActiveFlowsWithExecutor
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public List<Integer> getRunningFlowIds() { final ArrayList<Integer> flowIDs = new ArrayList<>(); flowIDs.addAll(this.queuedFlows.getAllEntries().stream().map(entry -> entry.getSecond().getExecutionId()).collect( Collectors.toList())); flowIDs.addAll(this.runningExecutions.get().values()....
{@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#getActiveFlowsWithExecutor()
getRunningFlowIds
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
public String getQueuedFlowIds() { final List<Integer> allIds = new ArrayList<>(); getRunningFlowsIdsHelper(allIds, this.queuedFlows.getAllEntries()); Collections.sort(allIds); return allIds.toString(); }
Get execution Ids of all non-dispatched flows
getQueuedFlowIds
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public long getQueuedFlowSize() { return this.queuedFlows.size(); }
Get the number of non-dispatched flows. {@inheritDoc}
getQueuedFlowSize
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public long getAgedQueuedFlowSize() { // ToDo(anish-mal) Implement this for push based dispatch logic. return 0; }
Get the number of non-dispatched flows. {@inheritDoc}
getAgedQueuedFlowSize
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public DispatchMethod getDispatchMethod() { return DispatchMethod.PUSH; }
Get the number of non-dispatched flows. {@inheritDoc}
getDispatchMethod
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private void getRunningFlowsIdsHelper(final List<Integer> allIds, final Collection<Pair<ExecutionReference, ExecutableFlow>> collection) { for (final Pair<ExecutionReference, ExecutableFlow> ref : collection) { allIds.add(ref.getSecond().getExecutionId()); } }
Get the number of non-dispatched flows. {@inheritDoc}
getRunningFlowsIdsHelper
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public LogData getExecutableFlowLog(final ExecutableFlow exFlow, final int offset, final int length) throws ExecutorManagerException { final Pair<ExecutionReference, ExecutableFlow> pair = this.runningExecutions.get().get(exFlow.getExecutionId()); return getFlowLogData(exFlow, offset, ...
Get the number of non-dispatched flows. {@inheritDoc}
getExecutableFlowLog
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public LogData getExecutionJobLog(final ExecutableFlow exFlow, final String jobId, final int offset, final int length, final int attempt) throws ExecutorManagerException { final Pair<ExecutionReference, ExecutableFlow> pair = this.runningExecutions.get().get(exFlow.getExecutionId()); r...
Get the number of non-dispatched flows. {@inheritDoc}
getExecutionJobLog
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public LogData getExecutionJobLogNearlineOnly(final ExecutableFlow exFlow, final String jobId, final int offset, final int length, final int attempt) throws ExecutorManagerException { final Pair<ExecutionReference, ExecutableFlow> pair = this.runningExecutions.get().get(exFlow.getExecution...
Get the number of non-dispatched flows. {@inheritDoc}
getExecutionJobLogNearlineOnly
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public List<Object> getExecutionJobStats(final ExecutableFlow exFlow, final String jobId, final int attempt) throws ExecutorManagerException { final Pair<ExecutionReference, ExecutableFlow> pair = this.runningExecutions.get().get(exFlow.getExecutionId()); return getExecutionJobStats(ex...
Get the number of non-dispatched flows. {@inheritDoc}
getExecutionJobStats
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public void cancelFlow(final ExecutableFlow exFlow, final String userId) throws ExecutorManagerException { synchronized (exFlow) { if (this.runningExecutions.get().containsKey(exFlow.getExecutionId())) { final Pair<ExecutionReference, ExecutableFlow> pair = this.runningEx...
if flows was dispatched to an executor, cancel by calling Executor else if flow is still in queue, remove from queue and finalize {@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#cancelFlow(azkaban.executor.ExecutableFlow, java.lang.String)
cancelFlow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public void resumeFlow(final ExecutableFlow exFlow, final String userId) throws ExecutorManagerException { synchronized (exFlow) { final Pair<ExecutionReference, ExecutableFlow> pair = this.runningExecutions.get().get(exFlow.getExecutionId()); if (pair == null) { thro...
if flows was dispatched to an executor, cancel by calling Executor else if flow is still in queue, remove from queue and finalize {@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#cancelFlow(azkaban.executor.ExecutableFlow, java.lang.String)
resumeFlow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public void pauseFlow(final ExecutableFlow exFlow, final String userId) throws ExecutorManagerException { synchronized (exFlow) { final Pair<ExecutionReference, ExecutableFlow> pair = this.runningExecutions.get().get(exFlow.getExecutionId()); if (pair == null) { throw...
if flows was dispatched to an executor, cancel by calling Executor else if flow is still in queue, remove from queue and finalize {@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#cancelFlow(azkaban.executor.ExecutableFlow, java.lang.String)
pauseFlow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public void retryFailures(final ExecutableFlow exFlow, final String userId) throws ExecutorManagerException { modifyExecutingJobs(exFlow, ConnectorParams.MODIFY_RETRY_FAILURES, userId); }
if flows was dispatched to an executor, cancel by calling Executor else if flow is still in queue, remove from queue and finalize {@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#cancelFlow(azkaban.executor.ExecutableFlow, java.lang.String)
retryFailures
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.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 = ...
if flows was dispatched to an executor, cancel by calling Executor else if flow is still in queue, remove from queue and finalize {@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#cancelFlow(azkaban.executor.ExecutableFlow, java.lang.String)
modifyExecutingJobs
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public String submitExecutableFlow(final ExecutableFlow exflow, final String userId) throws ExecutorManagerException { if (exflow.isLocked()) { // Skip execution for locked flows. final String message = String.format("Flow %s for project %s is locked.", exflow.getId(), exflow...
if flows was dispatched to an executor, cancel by calling Executor else if flow is still in queue, remove from queue and finalize {@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#cancelFlow(azkaban.executor.ExecutableFlow, java.lang.String)
submitExecutableFlow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public void shutdown() { if (null != this.queueProcessor) { this.queueProcessor.shutdown(); } if (null != this.updaterThread) { this.updaterThread.shutdown(); } }
if flows was dispatched to an executor, cancel by calling Executor else if flow is still in queue, remove from queue and finalize {@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#cancelFlow(azkaban.executor.ExecutableFlow, java.lang.String)
shutdown
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private void dispatch(final ExecutionReference reference, final ExecutableFlow exflow, final Executor choosenExecutor) throws ExecutorManagerException { exflow.setUpdateTime(System.currentTimeMillis()); this.executorLoader.assignExecutor(choosenExecutor.getId(), exflow.getExecutionId()); try ...
Calls executor to dispatch the flow, update db to assign the executor and in-memory state of executableFlow.
dispatch
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@VisibleForTesting void setSleepAfterDispatchFailure(final Duration sleepAfterDispatchFailure) { this.sleepAfterDispatchFailure = sleepAfterDispatchFailure; }
Calls executor to dispatch the flow, update db to assign the executor and in-memory state of executableFlow.
setSleepAfterDispatchFailure
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
public boolean isActive() { return this.isActive; }
Calls executor to dispatch the flow, update db to assign the executor and in-memory state of executableFlow.
isActive
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
public void setActive(final boolean isActive) { this.isActive = isActive; ExecutorManager.logger.info("QueueProcessorThread active turned " + this.isActive); }
Calls executor to dispatch the flow, update db to assign the executor and in-memory state of executableFlow.
setActive
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
public void shutdown() { this.shutdown = true; this.interrupt(); }
Calls executor to dispatch the flow, update db to assign the executor and in-memory state of executableFlow.
shutdown
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
@Override public void run() { // Loops till QueueProcessorThread is shutdown while (!this.shutdown) { synchronized (this) { try { // start processing queue if active, other wait for sometime if (this.isActive) { processQueuedFlows(this.activeExecut...
Calls executor to dispatch the flow, update db to assign the executor and in-memory state of executableFlow.
run
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private void processQueuedFlows(final long activeExecutorsRefreshWindow, final int maxContinuousFlowProcessed) throws InterruptedException, ExecutorManagerException { long lastExecutorRefreshTime = 0; int currentContinuousFlowProcessed = 0; while (isActive() && (ExecutorManager.this.r...
Calls executor to dispatch the flow, update db to assign the executor and in-memory state of executableFlow.
processQueuedFlows
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private void selectExecutorAndDispatchFlow(final ExecutionReference reference, final ExecutableFlow exflow) throws ExecutorManagerException { final Set<Executor> remainingExecutors = new HashSet<>( ExecutorManager.this.activeExecutors.getAll()); Throwable lastError; synchroni...
<pre> TODO: Work around till we improve Filters to have a notion of GlobalSystemState. Currently we try each queued flow once to infer a global busy state Possible improvements:- 1. Move system level filters in refreshExecutors and sleep if we have all executors busy after refresh 2. Implement GlobalSystemS...
selectExecutorAndDispatchFlow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private void updateRemainingExecutorsAndSleep(final Set<Executor> remainingExecutors, final Executor selectedExecutor) { remainingExecutors.remove(selectedExecutor); if (remainingExecutors.isEmpty()) { remainingExecutors.addAll(ExecutorManager.this.activeExecutors.getAll()); sleepAft...
<pre> TODO: Work around till we improve Filters to have a notion of GlobalSystemState. Currently we try each queued flow once to infer a global busy state Possible improvements:- 1. Move system level filters in refreshExecutors and sleep if we have all executors busy after refresh 2. Implement GlobalSystemS...
updateRemainingExecutorsAndSleep
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private void sleepAfterDispatchFailure() { try { Thread.sleep(this.sleepAfterDispatchFailure.toMillis()); } catch (final InterruptedException e1) { ExecutorManager.logger.warn("Sleep after dispatch failure was interrupted - ignoring"); } }
<pre> TODO: Work around till we improve Filters to have a notion of GlobalSystemState. Currently we try each queued flow once to infer a global busy state Possible improvements:- 1. Move system level filters in refreshExecutors and sleep if we have all executors busy after refresh 2. Implement GlobalSystemS...
sleepAfterDispatchFailure
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private void logFailedDispatchAttempt(final ExecutionReference reference, final ExecutableFlow exflow, final Executor selectedExecutor, final ExecutorManagerException e) { ExecutorManager.logger.warn(String.format( "Executor %s responded with exception for exec: %d", selectedEx...
<pre> TODO: Work around till we improve Filters to have a notion of GlobalSystemState. Currently we try each queued flow once to infer a global busy state Possible improvements:- 1. Move system level filters in refreshExecutors and sleep if we have all executors busy after refresh 2. Implement GlobalSystemS...
logFailedDispatchAttempt
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private Executor getUserSpecifiedExecutor(final ExecutionOptions options, final int executionId) { Executor executor = null; if (options != null && options.getFlowParameters() != null && options.getFlowParameters().containsKey( ExecutionOptions.USE_EXECUTOR)) { ...
<pre> TODO: Work around till we improve Filters to have a notion of GlobalSystemState. Currently we try each queued flow once to infer a global busy state Possible improvements:- 1. Move system level filters in refreshExecutors and sleep if we have all executors busy after refresh 2. Implement GlobalSystemS...
getUserSpecifiedExecutor
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private Executor selectExecutor(final ExecutableFlow exflow, final Set<Executor> availableExecutors) { Executor choosenExecutor = getUserSpecifiedExecutor(exflow.getExecutionOptions(), exflow.getExecutionId()); // If no executor was specified by admin if (choosenExecut...
<pre> TODO: Work around till we improve Filters to have a notion of GlobalSystemState. Currently we try each queued flow once to infer a global busy state Possible improvements:- 1. Move system level filters in refreshExecutors and sleep if we have all executors busy after refresh 2. Implement GlobalSystemS...
selectExecutor
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
private void handleNoExecutorSelectedCase(final ExecutionReference reference, final ExecutableFlow exflow) throws ExecutorManagerException { ExecutorManager.logger .info(String .format( "Reached handleNoExecutorSelectedCase stage for exec %d with error count %d", ...
<pre> TODO: Work around till we improve Filters to have a notion of GlobalSystemState. Currently we try each queued flow once to infer a global busy state Possible improvements:- 1. Move system level filters in refreshExecutors and sleep if we have all executors busy after refresh 2. Implement GlobalSystemS...
handleNoExecutorSelectedCase
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
Apache-2.0
public String get() { return value; }
Get the current value. @return the current value.
get
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManagerUpdaterStage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManagerUpdaterStage.java
Apache-2.0
public void set(String value) { this.value = value; }
Set the value. @param value the new value to set.
set
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManagerUpdaterStage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorManagerUpdaterStage.java
Apache-2.0
public static int getMaxConcurrentRunsOneFlow(final Props azkProps) { // The default threshold is set to 30 for now, in case some users are affected. We may // decrease this number in future, to better prevent DDos attacks. return azkProps.getInt(ConfigurationKeys.MAX_CONCURRENT_RUNS_ONEFLOW, Consta...
@return the maximum number of concurrent runs for one flow
getMaxConcurrentRunsOneFlow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorUtils.java
Apache-2.0
public static Map<Pair<String, String>, Integer> getMaxConcurentRunsPerFlowMap( final Props azkProps) { final Map<Pair<String, String>, Integer> map = new HashMap<>(); final String perFlowSettings = azkProps .get(ConfigurationKeys.CONCURRENT_RUNS_ONEFLOW_WHITELIST); if (perFlowSettings != null...
@return a map of (project name, flow name) to max number of concurrent runs for the flow.
getMaxConcurentRunsPerFlowMap
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorUtils.java
Apache-2.0
public static int getMaxConcurrentRunsForFlow(final String projectName, final String flowName, final int defaultMaxConcurrentRuns, final Map<Pair<String, String>, Integer> maxConcurrentRunsFlowMap) { return maxConcurrentRunsFlowMap.getOrDefault(new Pair(projectName, flowName), defaultMaxConcurre...
Get the maximum number of concurrent runs for the specified flow, using the value in azkaban.concurrent.runs.oneflow.whitelist if explictly specified for the flow, and otherwise azkaban.max.concurrent.runs.oneflow or the default. @param projectName project name @param flowName flow name @p...
getMaxConcurrentRunsForFlow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorUtils.java
Apache-2.0
public static List<Integer> getRunningFlowsHelper(final int projectId, final String flowId, final Collection<Pair<ExecutionReference, ExecutableFlow>> collection) { final List<Integer> executionIds = new ArrayList<>(); for (final Pair<ExecutionReference, ExecutableFlow> ref : collection) { if (ref.g...
Get the maximum number of concurrent runs for the specified flow, using the value in azkaban.concurrent.runs.oneflow.whitelist if explictly specified for the flow, and otherwise azkaban.max.concurrent.runs.oneflow or the default. @param projectName project name @param flowName flow name @p...
getRunningFlowsHelper
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorUtils.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/ExecutorUtils.java
Apache-2.0
Map<Integer, Pair<ExecutionReference, ExecutableFlow>> fetchUnfinishedFlows() throws ExecutorManagerException { try { return this.dbOperator.query(FetchActiveExecutableFlows.FETCH_UNFINISHED_EXECUTABLE_FLOWS, new FetchActiveExecutableFlows()); } catch (final SQLException e) { throw n...
Fetch flows that are not in finished status, including both dispatched and non-dispatched flows. @return unfinished flows map @throws ExecutorManagerException the executor manager exception
fetchUnfinishedFlows
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/FetchActiveFlowDao.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/FetchActiveFlowDao.java
Apache-2.0
Pair<ExecutionReference, ExecutableFlow> fetchUnfinishedFlow(final int executionId) throws ExecutorManagerException { try { Iterator<Pair<ExecutionReference, ExecutableFlow>> iterator = this.dbOperator.query(FetchActiveExecutableFlows.FETCH_UNFINISHED_EXECUTABLE_FLOW_BY_EXECID, new FetchActive...
Fetch flows that are not in finished status, including both dispatched and non-dispatched flows. @return unfinished flows map @throws ExecutorManagerException the executor manager exception
fetchUnfinishedFlow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/FetchActiveFlowDao.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/FetchActiveFlowDao.java
Apache-2.0
public Map<Integer, Pair<ExecutionReference, ExecutableFlow>> fetchUnfinishedFlowsMetadata() throws ExecutorManagerException { try { return this.dbOperator.query(FetchUnfinishedFlowsMetadata.FETCH_UNFINISHED_FLOWS_METADATA, new FetchUnfinishedFlowsMetadata()); } catch (final SQLException e...
Fetch unfinished flows similar to {@link #fetchUnfinishedFlows}, excluding flow data. @return unfinished flows map @throws ExecutorManagerException the executor manager exception
fetchUnfinishedFlowsMetadata
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/FetchActiveFlowDao.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/executor/FetchActiveFlowDao.java
Apache-2.0