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 void handleFetchMetaDataEvent(final int execId, final HttpServletRequest req, final HttpServletResponse resp, final Map<String, Object> respMap) throws ServletException { final int startByte = getIntParam(req, "offset"); final int length = getIntParam(req, "length"); resp.setContentType...
Modifies the time interval at which the executor is polling the queue for unassigned jobs, and assigning a job(s) to itself. @param newPollingIntervalMillis The desired polling interval. It needs to be a positive integer (milliseconds) in String format. @param respMap The response map.
handleFetchMetaDataEvent
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
Apache-2.0
private void handleAjaxUpdateRequest(final HttpServletRequest req, final Map<String, Object> respMap) throws ServletException, IOException { final ArrayList<Object> updateTimesList = (ArrayList<Object>) JSONUtils.parseJSONFromString(getParam(req, ConnectorParams.UPDATE_TIME_LIST_PARAM)); ...
Modifies the time interval at which the executor is polling the queue for unassigned jobs, and assigning a job(s) to itself. @param newPollingIntervalMillis The desired polling interval. It needs to be a positive integer (milliseconds) in String format. @param respMap The response map.
handleAjaxUpdateRequest
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
Apache-2.0
private void handleAjaxExecute(final HttpServletRequest req, final Map<String, Object> respMap, final int execId) { try { this.flowRunnerManager.submitFlow(execId); } catch (final ExecutorManagerException e) { logger.error(e.getMessage(), e); respMap.put(ConnectorParams.RESPONSE_ERROR, e...
Modifies the time interval at which the executor is polling the queue for unassigned jobs, and assigning a job(s) to itself. @param newPollingIntervalMillis The desired polling interval. It needs to be a positive integer (milliseconds) in String format. @param respMap The response map.
handleAjaxExecute
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
Apache-2.0
private void handleAjaxFlowStatus(final Map<String, Object> respMap, final int execid) { final ExecutableFlowBase flow = this.flowRunnerManager.getExecutableFlow(execid); if (flow == null) { respMap.put(ConnectorParams.STATUS_PARAM, ConnectorParams.RESPONSE_NOTFOUND); } else { respMap.put(Connec...
Modifies the time interval at which the executor is polling the queue for unassigned jobs, and assigning a job(s) to itself. @param newPollingIntervalMillis The desired polling interval. It needs to be a positive integer (milliseconds) in String format. @param respMap The response map.
handleAjaxFlowStatus
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
Apache-2.0
private void handleAjaxPause(final Map<String, Object> respMap, final int execid, final String user) { if (user == null) { respMap.put(ConnectorParams.RESPONSE_ERROR, "user has not been set"); return; } try { this.flowRunnerManager.pauseFlow(execid, user); respMap.put(Connecto...
Modifies the time interval at which the executor is polling the queue for unassigned jobs, and assigning a job(s) to itself. @param newPollingIntervalMillis The desired polling interval. It needs to be a positive integer (milliseconds) in String format. @param respMap The response map.
handleAjaxPause
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
Apache-2.0
private void handleAjaxResume(final Map<String, Object> respMap, final int execid, final String user) throws ServletException { if (user == null) { respMap.put(ConnectorParams.RESPONSE_ERROR, "user has not been set"); return; } try { this.flowRunnerManager.resumeFlow(execid, user); ...
Modifies the time interval at which the executor is polling the queue for unassigned jobs, and assigning a job(s) to itself. @param newPollingIntervalMillis The desired polling interval. It needs to be a positive integer (milliseconds) in String format. @param respMap The response map.
handleAjaxResume
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
Apache-2.0
private void handleAjaxCancel(final Map<String, Object> respMap, final int execid, final String user) { if (user == null) { respMap.put(ConnectorParams.RESPONSE_ERROR, "user has not been set"); return; } try { this.flowRunnerManager.cancelFlow(execid, user); respMap.put(Connec...
Modifies the time interval at which the executor is polling the queue for unassigned jobs, and assigning a job(s) to itself. @param newPollingIntervalMillis The desired polling interval. It needs to be a positive integer (milliseconds) in String format. @param respMap The response map.
handleAjaxCancel
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
Apache-2.0
private void handleReloadJobTypePlugins(final Map<String, Object> respMap) { try { this.flowRunnerManager.reloadJobTypePlugins(); respMap.put(ConnectorParams.STATUS_PARAM, ConnectorParams.RESPONSE_SUCCESS); } catch (final Exception e) { logger.error(e.getMessage(), e); respMap.put(Connec...
Modifies the time interval at which the executor is polling the queue for unassigned jobs, and assigning a job(s) to itself. @param newPollingIntervalMillis The desired polling interval. It needs to be a positive integer (milliseconds) in String format. @param respMap The response map.
handleReloadJobTypePlugins
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
Apache-2.0
private void setActive(final boolean value, final Map<String, Object> respMap) { try { setActiveInternal(value); respMap.put(ConnectorParams.STATUS_PARAM, ConnectorParams.RESPONSE_SUCCESS); } catch (final Exception e) { logger.error(e.getMessage(), e); respMap.put(ConnectorParams.RESPONS...
Modifies the time interval at which the executor is polling the queue for unassigned jobs, and assigning a job(s) to itself. @param newPollingIntervalMillis The desired polling interval. It needs to be a positive integer (milliseconds) in String format. @param respMap The response map.
setActive
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
Apache-2.0
private void setActiveInternal(final boolean value) throws ExecutorManagerException, InterruptedException { this.flowRunnerManager.setExecutorActive(value, this.application.getHost(), this.application.getPort()); }
Modifies the time interval at which the executor is polling the queue for unassigned jobs, and assigning a job(s) to itself. @param newPollingIntervalMillis The desired polling interval. It needs to be a positive integer (milliseconds) in String format. @param respMap The response map.
setActiveInternal
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
Apache-2.0
private void shutdown(final Map<String, Object> respMap) { try { logger.warn("Shutting down executor..."); // Set the executor to inactive. Will receive no new flows. setActiveInternal(false); this.application.shutdown(); respMap.put(ConnectorParams.STATUS_PARAM, ConnectorParams.RESPO...
Prepare the executor for shutdown. @param respMap json response object
shutdown
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
Apache-2.0
private void getStatus(final Map<String, Object> respMap) { try { final ExecutorLoader executorLoader = this.application.getExecutorLoader(); final Executor executor = requireNonNull( executorLoader.fetchExecutor(this.application.getHost(), this.application.getPort()), "The executor ...
Prepare the executor for shutdown. @param respMap json response object
getStatus
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
Apache-2.0
@Override public void setup(final ExecutableFlow flow) throws ExecutorManagerException { File tempDir = null; try { final ProjectDirectoryMetadata project = new ProjectDirectoryMetadata( flow.getProjectId(), flow.getVersion(), flow.getProjectName()); final long flowP...
Prepare the flow directory for execution. @param flow Executable Flow instance.
setup
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
Apache-2.0
@Override protected File setupExecutionDir(final Path dir, final ExecutableFlow flow) throws ExecutorManagerException { File execDir = null; try { execDir = createExecDir(flow); // Create hardlinks from the project FileIOUtils.createDeepHardlink(dir.toFile(), execDir); return exe...
Prepare the flow directory for execution. @param flow Executable Flow instance.
setupExecutionDir
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
Apache-2.0
@VisibleForTesting void updateLastModifiedTime(final Path path) { try { Files.setLastModifiedTime(path, FileTime.fromMillis(System.currentTimeMillis())); } catch (final IOException ex) { LOGGER.warn("Error when updating last modified time for {}", path, ex); } }
Update last modified time of the file if it exists. @param path path to the target file
updateLastModifiedTime
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
Apache-2.0
private String generateProjectDirName(final ProjectDirectoryMetadata proj) { return String.valueOf(proj.getProjectId()) + "." + String.valueOf(proj.getVersion()); }
@return the project directory name of a project
generateProjectDirName
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
Apache-2.0
private File createTempDir(final ProjectDirectoryMetadata proj) throws IOException { final String projectDir = generateProjectDirName(proj); final File tempDir = Files.createTempDirectory( this.projectCacheDir.toPath(), "_temp." + projectDir + ".").toFile(); return tempDir; }
@return the project directory name of a project
createTempDir
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
Apache-2.0
@VisibleForTesting File downloadProjectIfNotExists(final ProjectDirectoryMetadata proj, final int execId) throws IOException { final String projectDir = generateProjectDirName(proj); if (proj.getInstalledDir() == null) { proj.setInstalledDir(new File(this.projectCacheDir, projectDir)); } ...
Download project zip and unzip it if not exists locally. @param proj project to download @param execId execution id number @return the temp dir where the new project is downloaded to, null if no project is downloaded. @throws IOException if downloading or unzipping fails.
downloadProjectIfNotExists
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
Apache-2.0
private File createExecDir(final ExecutableFlow flow) { final int execId = flow.getExecutionId(); final File execDir = new File(this.executionsDir, String.valueOf(execId)); flow.setExecutionPath(execDir.getPath()); execDir.mkdirs(); return execDir; }
Download project zip and unzip it if not exists locally. @param proj project to download @param execId execution id number @return the temp dir where the new project is downloaded to, null if no project is downloaded. @throws IOException if downloading or unzipping fails.
createExecDir
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
Apache-2.0
public void shutdown() { if (projectCacheCleaner.isPresent()) { this.projectCacheCleaner.get().shutdown(); } }
Download project zip and unzip it if not exists locally. @param proj project to download @param execId execution id number @return the temp dir where the new project is downloaded to, null if no project is downloaded. @throws IOException if downloading or unzipping fails.
shutdown
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
Apache-2.0
private boolean isRampFeatureActivated() { if (isRampFeatureEnabled || executableRampMap != null) { if (!executableRampMap.getActivatedAll().isEmpty()) { return true; } } return false; }
Check if the system is activating the ramp feature, aka some system configuration is ramping.
isRampFeatureActivated
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
@Override public void handleEvent(Event event) { if (!isRampFeatureActivated()) return; if (event.getData().isRootFlowEvent() && (event.getType() == EventType.FLOW_STARTED || event.getType() == EventType.FLOW_FINISHED)) { final FlowRunner flowRunner = (FlowRunner) event.getRunner(); logFl...
Ramp Feature need to track the health of running flow to determine if stop/pause Ramp will be necessary. FlowRampManager is registered into the FlowRunnerManager's Listeners
handleEvent
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
@Override public void beforeExecute(Runnable r) { }
Ramp Feature need to track the health of running flow to determine if stop/pause Ramp will be necessary. FlowRampManager is registered into the FlowRunnerManager's Listeners
beforeExecute
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
@Override public void afterExecute(Runnable r) { }
Ramp Feature need to track the health of running flow to determine if stop/pause Ramp will be necessary. FlowRampManager is registered into the FlowRunnerManager's Listeners
afterExecute
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
public void shutdown() { if (isRampPollingServiceEnabled) { LOGGER.warn("Shutting down FlowRampManager..."); pollingService.shutdown(); // Persistent cached data into DB saveSettings(); LOGGER.warn("Shutdown FlowRampManager complete."); } }
This shuts down the flow ramp. The call is blocking and awaits execution of all jobs.
shutdown
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
public void shutdownNow() { if (isRampPollingServiceEnabled) { LOGGER.warn("Shutting down FlowRampManager now..."); pollingService.shutdown(); } }
This attempts shuts down the flow runner immediately (unsafe). This doesn't wait for jobs to finish but interrupts all threads.
shutdownNow
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
public int getNumOfRamps() { return executableRampMap.getActivatedAll().size(); }
This attempts shuts down the flow runner immediately (unsafe). This doesn't wait for jobs to finish but interrupts all threads.
getNumOfRamps
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
@VisibleForTesting synchronized void loadSettings() { loadExecutableRamps(); loadExecutableRampItems(); loadExecutableRampDependencies(); loadExecutableRampExceptionalFlowItems(); loadExecutableRampExceptionalJobItems(); latestDataBaseSynchronizationTimeStamp = System.currentTimeMillis(); ...
Load all ramp Settings from DB
loadSettings
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
@VisibleForTesting synchronized void loadExecutableRamps() { try { if (executableRampMap == null) { executableRampMap = executorLoader.fetchExecutableRampMap(); } else { executableRampMap.refresh(executorLoader.fetchExecutableRampMap()); } } catch (ExecutorManagerException e)...
Load All active ramps, Key = rampId
loadExecutableRamps
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
@VisibleForTesting synchronized void loadExecutableRampItems() { try { if (executableRampItemsMap == null) { executableRampItemsMap = executorLoader.fetchExecutableRampItemsMap(); } else { executableRampItemsMap.refresh(executorLoader.fetchExecutableRampItemsMap()); } } catch...
Load All dependency properties into the executableRampProperties Map, Key = rampId,
loadExecutableRampItems
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
@VisibleForTesting synchronized void loadExecutableRampDependencies() { try { if (executableRampDependencyMap == null) { executableRampDependencyMap = executorLoader.fetchExecutableRampDependencyMap(); } else { executableRampDependencyMap.refresh(executorLoader.fetchExecutableRampDepen...
Load All Default dependency values for ramp When the dependency does not have ramp setting, the default Value will be applied.
loadExecutableRampDependencies
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
@VisibleForTesting synchronized void loadExecutableRampExceptionalFlowItems() { try { if (executableRampExceptionalFlowItemsMap == null) { executableRampExceptionalFlowItemsMap = executorLoader.fetchExecutableRampExceptionalFlowItemsMap(); } else { executableRampExceptionalFlowItemsMap...
Load All Ramp Exceptional Items on Flow Level
loadExecutableRampExceptionalFlowItems
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
@VisibleForTesting synchronized void loadExecutableRampExceptionalJobItems() { try { if (executableRampExceptionalJobItemsMap == null) { executableRampExceptionalJobItemsMap = executorLoader.fetchExecutableRampExceptionalJobItemsMap(); } else { executableRampExceptionalJobItemsMap.refr...
Load All Ramp Exceptional Items on Job Level
loadExecutableRampExceptionalJobItems
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
@VisibleForTesting synchronized void saveSettings() { executableRampMap .getAll() .stream() .filter(ExecutableRamp::isChanged) .forEach(this::updateExecutableRamp); executableRampExceptionalFlowItemsMap .entrySet() .stream() .forEach(this::updateExecuted...
Save all ramp settings into DB
saveSettings
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
@VisibleForTesting /** * Persistent all Executable Ramp Status in this azkaban executor into the DB */ synchronized void updateExecutableRamp(ExecutableRamp executableRamp) { try { // Save all cachedNumTrail, cachedNumSuccess, cachedNumFailure, cachedNumIgnored, // save isPaused, endTime when ...
Save all ramp settings into DB
updateExecutableRamp
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
@VisibleForTesting synchronized void updateExecutedRampFlows(Map.Entry<String, ExecutableRampExceptionalItems> entry) { try { // Save all Identified workflow into the DB executorLoader.updateExecutedRampFlows(entry.getKey(), entry.getValue()); } catch (ExecutorManagerException e) { LOGGER.er...
Save All Ramp Exceptional Items on Flow Level
updateExecutedRampFlows
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
synchronized public void configure(ExecutableFlow executableFlow, File flowDirectory) { if (!isRampFeatureActivated()) return; // To be safe, check if there is any jar files in ./excluded folder // and move them back to the place in original location of the package moveFiles( FileIOUtils.getDi...
Call to set Executable Ramp Metadata into ExecutableFlow
configure
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
private void moveFiles(File sourceDir, File destinationDir, String regExpression) { try { FileIOUtils.moveFiles(sourceDir, destinationDir, regExpression); LOGGER.info("Success to move files from {} to {} with REGEXP {}", sourceDir.getAbsolutePath(), destinationDir.getAbsolutePath(), ...
Call to set Executable Ramp Metadata into ExecutableFlow
moveFiles
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
synchronized private void logFlowEvent(FlowRunner flowRunner, EventType eventType) { final ExecutableFlow flow = flowRunner.getExecutableFlow(); LOGGER.info("RAMP_FLOW_EVENT_CAPTURED: (ID = {}, FlowName = {}, ExecutionId = {}, FlowStatus = {})", flow.getId(), flow.getFlowName(), flow.get...
Call to set Executable Ramp Metadata into ExecutableFlow
logFlowEvent
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
synchronized private void logFlowAction(FlowRunner flowRunner, Action action) { flowRunner.getExecutableFlow() .getExecutableFlowRampMetadata() .getActiveRamps() .stream() .map(executableRampMap::get) .forEach(executableRamp -> { LOGGER.info("FlowRunner Save Result...
Call to set Executable Ramp Metadata into ExecutableFlow
logFlowAction
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
synchronized private boolean isDatabasePushingActionRequired() { return ((!isRampPollingServiceEnabled) && (statusPushIntervalMax <= rampDataModel.getEndFlowCount())); }
Call to set Executable Ramp Metadata into ExecutableFlow
isDatabasePushingActionRequired
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
synchronized private boolean isDatabasePullingActionRequired() { return ((!isRampPollingServiceEnabled) && (statusPullIntervalMax <= rampDataModel.getBeginFlowCount())); }
Call to set Executable Ramp Metadata into ExecutableFlow
isDatabasePullingActionRequired
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
synchronized private Action convertToAction(Status status) { if (Status.FAILED.equals(status)) return Action.FAILED; if (Status.isStatusSucceeded(status)) return Action.SUCCEEDED; return Action.IGNORED; }
Call to set Executable Ramp Metadata into ExecutableFlow
convertToAction
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
public synchronized void beginFlow(final int executionId, Set<String> ramps) { lock.lock(); executingFlows.put(executionId, ramps); beginFlowCount++; lock.unlock(); }
Call to set Executable Ramp Metadata into ExecutableFlow
beginFlow
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
public synchronized Set<String> endFlow(final int executionId) { Set<String> ramps = executingFlows.get(executionId); lock.lock(); executingFlows.remove(executionId); endFlowCount++; lock.unlock(); return ramps; }
Call to set Executable Ramp Metadata into ExecutableFlow
endFlow
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
public Map<Integer, Set<String>> getExecutingFlows() { return this.executingFlows; }
Call to set Executable Ramp Metadata into ExecutableFlow
getExecutingFlows
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
public int getBeginFlowCount() { return beginFlowCount; }
Call to set Executable Ramp Metadata into ExecutableFlow
getBeginFlowCount
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
public int getEndFlowCount() { return endFlowCount; }
Call to set Executable Ramp Metadata into ExecutableFlow
getEndFlowCount
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
public void resetFlowCountAfterSave() { lock.lock(); beginFlowCount = executingFlows.size(); endFlowCount = 0; lock.unlock(); }
Call to set Executable Ramp Metadata into ExecutableFlow
resetFlowCountAfterSave
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
public boolean hasUnsavedFinishedFlow() { return endFlowCount > 0; }
Call to set Executable Ramp Metadata into ExecutableFlow
hasUnsavedFinishedFlow
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
Apache-2.0
public long getFlowKillTime() { return this.flowKillTime; }
Class that handles the running of a ExecutableFlow DAG
getFlowKillTime
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
public long getFlowKillDuration() { return this.flowKillDuration; }
Class that handles the running of a ExecutableFlow DAG
getFlowKillDuration
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
public long getFlowPauseTime() { return this.flowPauseTime; }
Class that handles the running of a ExecutableFlow DAG
getFlowPauseTime
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
public void setFlowCreateTime(final long flowCreateTime) { this.flowCreateTime = flowCreateTime; }
Class that handles the running of a ExecutableFlow DAG
setFlowCreateTime
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
public long getFlowPauseDuration() { return this.flowPauseDuration; }
Class that handles the running of a ExecutableFlow DAG
getFlowPauseDuration
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
public long getFlowCreateTime() { return this.flowCreateTime; }
Class that handles the running of a ExecutableFlow DAG
getFlowCreateTime
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
@VisibleForTesting public FlowRunnerProxy getProxy() { return this.flowRunnerProxy; }
@return the proxy class object associated with this instance.
getProxy
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
@VisibleForTesting ConcurrentHashMap<String, String> getJobEffectiveUsers() { return this.jobEffectiveUsers; }
@return the proxy class object associated with this instance.
getJobEffectiveUsers
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
@VisibleForTesting Logger getLogger() { return this.logger; }
@return the proxy class object associated with this instance.
getLogger
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
public FlowRunner setFlowWatcher(final FlowWatcher watcher) { this.watcher = watcher; return this; }
@return the proxy class object associated with this instance.
setFlowWatcher
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
public FlowRunner setNumJobThreads(final int jobs) { this.numJobThreads = jobs; return this; }
@return the proxy class object associated with this instance.
setNumJobThreads
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
public FlowRunner setJobLogSettings(final String jobLogFileSize, final int jobLogNumFiles) { this.jobLogFileSize = jobLogFileSize; this.jobLogNumFiles = jobLogNumFiles; return this; }
@return the proxy class object associated with this instance.
setJobLogSettings
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
public FlowRunner setValidateProxyUser(final boolean validateUserProxy) { this.validateUserProxy = validateUserProxy; return this; }
@return the proxy class object associated with this instance.
setValidateProxyUser
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
public File getExecutionDir() { return this.execDir; }
@return the proxy class object associated with this instance.
getExecutionDir
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
@VisibleForTesting AlerterHolder getAlerterHolder() { return this.alerterHolder; }
@return the proxy class object associated with this instance.
getAlerterHolder
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
@Override public void run() { // The current thread is used for interrupting blocks this.flowRunnerThread = Thread.currentThread(); this.flowRunnerThread.setName("FlowRunner-exec-" + this.flow.getExecutionId()); // Sanity check if the flow initial status is valid or not. if (Status.isStatusFinish...
@return the proxy class object associated with this instance.
run
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private boolean isPollDispatchMethodEnabled() { return DispatchMethod.isPollMethodEnabled(this.azkabanProps .getString(Constants.ConfigurationKeys.AZKABAN_EXECUTION_DISPATCH_METHOD, DispatchMethod.PUSH.name())); }
@return the proxy class object associated with this instance.
isPollDispatchMethodEnabled
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private boolean isContainerizedDispatchMethodEnabled() { return DispatchMethod.isContainerizedMethodEnabled(this.azkabanProps .getString(Constants.ConfigurationKeys.AZKABAN_EXECUTION_DISPATCH_METHOD, DispatchMethod.PUSH.name())); }
@return the proxy class object associated with this instance.
isContainerizedDispatchMethodEnabled
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private void reportFlowFinishedMetrics() { final Status status = this.flow.getStatus(); switch (status) { case SUCCEEDED: this.execMetrics.markFlowSuccess(); break; case FAILED: this.commonMetrics.markFlowFail(); break; case KILLED: this.execMetrics.mark...
@return the proxy class object associated with this instance.
reportFlowFinishedMetrics
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private void setupFlowExecution() { final int projectId = this.flow.getProjectId(); final int version = this.flow.getVersion(); final String flowId = this.flow.getFlowId(); // Add a bunch of common azkaban properties Props commonFlowProps = FlowUtils.addCommonFlowProperties(null, this.flow); i...
@return the proxy class object associated with this instance.
setupFlowExecution
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private synchronized void updateFlow(final long time) { try { this.flow.setUpdateTime(time); this.executorLoader.updateExecutableFlow(this.flow); } catch (final ExecutorManagerException e) { this.logger.error("Error updating flow.", e); } }
@return the proxy class object associated with this instance.
updateFlow
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private void createLogger(final String flowId) { // Create logger // If this is a containerized execution then there is no need for a custom logger. // The logs would be appended to server logs and persisted from FlowContainer. if (isContainerizedDispatchMethodEnabled()) { this.logger = Logger.get...
setup logger and execution dir for the flowId
createLogger
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private void removeAppender(final Appender appender) { if (appender != null) { try { this.logger.removeAppender(appender); appender.close(); } catch (Exception e) { logger.error("Failed to remove appender " + appender.getName(), e); } } }
setup logger and execution dir for the flowId
removeAppender
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private void closeLogger() { if (!isContainerizedDispatchMethodEnabled() && this.logger != null) { removeAppender(this.flowAppender); removeAppender(this.kafkaLog4jAppender); try { this.executionLogsLoader.uploadLogFile(this.execId, "", 0, this.logFile); } catch (final ExecutorManag...
setup logger and execution dir for the flowId
closeLogger
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private void loadAllProperties() throws IOException { // First load all the properties for (final ImmutableFlowProps fprops : this.flow.getFlowProps()) { final String source = fprops.getSource(); final File propsPath = new File(this.execDir, source); final Props props = new Props(null, propsPa...
setup logger and execution dir for the flowId
loadAllProperties
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private void runFlow() throws Exception { this.logger.info("Starting flows"); runReadyJob(this.flow); updateFlow(); while (!this.flowFinished) { synchronized (this.mainSyncObj) { if (this.flowPaused) { try { this.mainSyncObj.wait(CHECK_WAIT_MS); } catch (fi...
Main method that executes the jobs.
runFlow
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private void retryAllFailures() throws IOException { this.logger.info("Restarting all failed jobs"); this.retryFailedJobs = false; this.flowKilled = false; this.flowFailed = false; this.flow.setStatus(Status.RUNNING); final ArrayList<ExecutableNode> retryJobs = new ArrayList<>(); resetFail...
Main method that executes the jobs.
retryAllFailures
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private boolean progressGraph() throws IOException { this.finishedNodes.swap(); // The following nodes are finished, so we'll collect a list of outnodes // that are candidates for running next. final HashSet<ExecutableNode> nodesToCheck = new HashSet<>(); for (final ExecutableNode node : this.finis...
Main method that executes the jobs.
progressGraph
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private void setFlowFailed(final ExecutableNode node) { boolean shouldFail = true; // As long as there is no outNodes or at least one outNode has conditionOnJobStatus of // ALL_SUCCESS, we should set the flow to failed. Otherwise, it could still statisfy the // condition of conditional workflows, so don...
Main method that executes the jobs.
setFlowFailed
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private boolean notReadyToRun(final Status status) { return Status.isStatusFinished(status) || Status.isStatusRunning(status) || Status.KILLING == status; }
Main method that executes the jobs.
notReadyToRun
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private boolean runReadyJob(final ExecutableNode node) throws IOException { if (Status.isStatusFinished(node.getStatus()) || Status.isStatusRunning(node.getStatus())) { return false; } final Status nextNodeStatus = getImpliedStatus(node); if (nextNodeStatus == null) { return false; ...
Main method that executes the jobs.
runReadyJob
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private boolean retryJobIfPossible(final ExecutableNode node) { if (node instanceof ExecutableFlowBase) { return false; } if (node.getRetries() > node.getAttempt()) { this.logger.info("Job '" + node.getId() + "' will be retried. Attempt " + node.getAttempt() + " of " + node.getRetries...
Main method that executes the jobs.
retryJobIfPossible
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private void propagateStatusAndAlert(final ExecutableFlowBase base, final Status status) { if (!Status.isStatusFinished(base.getStatus()) && base.getStatus() != Status.KILLING) { this.logger.info("Setting " + base.getNestedId() + " to " + status); boolean shouldAlert = false; if (base.getStatus() ...
Recursively propagate status to parent flow. Alert on first error of the flow in new AZ dispatching design. @param base the base flow @param status the status to be propagated
propagateStatusAndAlert
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private void finishExecutableNode(final ExecutableNode node) { this.finishedNodes.add(node); final EventData eventData = new EventData(node); fireEventListeners(Event.create(this, EventType.JOB_FINISHED, eventData)); }
Recursively propagate status to parent flow. Alert on first error of the flow in new AZ dispatching design. @param base the base flow @param status the status to be propagated
finishExecutableNode
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private boolean isFlowReadytoFinalize(final ExecutableFlowBase flow) { // Only when all the end nodes are finished, the flow is ready to finalize. for (final String end : flow.getEndNodes()) { if (!Status.isStatusFinished(flow.getExecutableNode(end).getStatus())) { return false; } } ...
Recursively propagate status to parent flow. Alert on first error of the flow in new AZ dispatching design. @param base the base flow @param status the status to be propagated
isFlowReadytoFinalize
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private void finalizeFlow(final ExecutableFlowBase flow) { final String id = flow == this.flow ? flow.getNestedId() : ""; // If it's not the starting flow, we'll create set of output props // for the finished flow. boolean succeeded = true; Props previousOutput = null; for (final String end : ...
Recursively propagate status to parent flow. Alert on first error of the flow in new AZ dispatching design. @param base the base flow @param status the status to be propagated
finalizeFlow
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private void prepareJobProperties(final ExecutableNode node) throws IOException { if (node instanceof ExecutableFlow) { return; } Props props = null; if (!FlowLoaderUtils.isAzkabanFlowVersion20(this.flow.getAzkabanFlowVersion())) { // 1. Shared properties (i.e. *.properties) for the jobs o...
Recursively propagate status to parent flow. Alert on first error of the flow in new AZ dispatching design. @param base the base flow @param status the status to be propagated
prepareJobProperties
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private boolean isOverrideExistingEnabled() { return this.azkabanProps.getBoolean( ConfigurationKeys.AZKABAN_EXECUTOR_RUNTIME_PROPS_OVERRIDE_EAGER, false); }
Recursively propagate status to parent flow. Alert on first error of the flow in new AZ dispatching design. @param base the base flow @param status the status to be propagated
isOverrideExistingEnabled
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private Props applyRuntimeProperties(final ExecutableNode node, final Map<String, Map<String, String>> runtimeProperties, final Props props) { Props propsWithOverides = props; if (node.getParentFlow() != null && !parentIsOnTheSameLevel(node)) { // apply recursively top->down propsWithOverides ...
Recursively propagate status to parent flow. Alert on first error of the flow in new AZ dispatching design. @param base the base flow @param status the status to be propagated
applyRuntimeProperties
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private boolean parentIsOnTheSameLevel(final ExecutableNode node) { return node.getParentFlow() instanceof ExecutableFlow; }
Detects if the "parent" is actually the root job node.
parentIsOnTheSameLevel
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private void customizeJobProperties(final Props props) { final boolean memoryCheck = this.flow.getExecutionOptions().getMemoryCheck(); props.put(ProcessJob.AZKABAN_MEMORY_CHECK, Boolean.toString(memoryCheck)); }
@param props This method is to put in any job properties customization before feeding to the job.
customizeJobProperties
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private Props loadJobProps(final ExecutableNode node) throws IOException { Props props = null; if (FlowLoaderUtils.isAzkabanFlowVersion20(this.flow.getAzkabanFlowVersion())) { final String jobPath = node.getParentFlow().getFlowId() + Constants.PATH_DELIMITER + node.getId(); props = FlowLoa...
@param props This method is to put in any job properties customization before feeding to the job.
loadJobProps
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
@SuppressWarnings("FutureReturnValueIgnored") private void runExecutableNode(final ExecutableNode node) throws IOException { // Collect output props from the job's dependencies. prepareJobProperties(node); node.setStatus(Status.QUEUED); // Attach Ramp Props if there is any desired properties fin...
@param props This method is to put in any job properties customization before feeding to the job.
runExecutableNode
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
public Status getImpliedStatus(final ExecutableNode node) { // If it's running or finished with 'SUCCEEDED', than don't even // bother starting this job. if (Status.isStatusRunning(node.getStatus()) || node.getStatus() == Status.SUCCEEDED) { return null; } // Go through the node's dep...
Determines what the state of the next node should be. Returns null if the node should not be run.
getImpliedStatus
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private Boolean isConditionOnRuntimeVariableMet(final ExecutableNode node) { final String condition = node.getCondition(); if (condition == null) { return true; } String replaced = condition; // Replace the condition on job status macro with "true" to skip the evaluation by Script // Engi...
Determines what the state of the next node should be. Returns null if the node should not be run.
isConditionOnRuntimeVariableMet
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private String findValueForJobVariable(final ExecutableNode node, final String jobName, final String variable) { // Get job output props final ExecutableNode target = node.getParentFlow().getExecutableNode(jobName); if (target == null) { throw new IllegalStateException("Not able to find executab...
Determines what the state of the next node should be. Returns null if the node should not be run.
findValueForJobVariable
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private boolean evaluateExpression(final String expression) { boolean result = false; final ScriptEngineManager sem = new ScriptEngineManager(); final ScriptEngine se = sem.getEngineByName("JavaScript"); // Restrict permission using the two-argument form of doPrivileged() try { final Object o...
Determines what the state of the next node should be. Returns null if the node should not be run.
evaluateExpression
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
@Override public Object run() throws ScriptException { return se.eval(expression); }
Determines what the state of the next node should be. Returns null if the node should not be run.
run
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private Props collectOutputProps(final ExecutableNode node) { Props previousOutput = null; // Iterate the in nodes again and create the dependencies for (final String dependency : node.getInNodes()) { Props output = node.getParentFlow().getExecutableNode(dependency).getOutputProps(); i...
Determines what the state of the next node should be. Returns null if the node should not be run.
collectOutputProps
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0
private JobRunner createJobRunner(final ExecutableNode node) { // Load job file. final File path = new File(this.execDir, node.getJobSource()); final JobRunner jobRunner = new JobRunner(node, path.getParentFile(), this.executorLoader, this.executionLogsLoader, this.jobtypeManager, this....
Determines what the state of the next node should be. Returns null if the node should not be run.
createJobRunner
java
azkaban/azkaban
azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
Apache-2.0