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
@VisibleForTesting String getPid() { final File libDir = PACKAGE_JAR.getParentFile(); final File installDir = libDir.getParentFile(); final File pidFile = new File(installDir, this.pidFilename); try { return Files.readFirstLine(pidFile, StandardCharsets.UTF_8).trim(); } catch (final IOExcept...
This returns implementation instance for Status containing cluster status information for Azkaban containerization. It includes information pertaining to web server, memory and containerization information such as image types and version for each image types selected based on either random rampup or latest active image...
getPid
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/StatusService.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/StatusService.java
Apache-2.0
private Map<Integer, Executor> getActiveExecutors() { final Map<Integer, Executor> executorMap = new HashMap<>(); try { final List<Executor> executors = this.executorLoader.fetchActiveExecutors(); for (final Executor executor : executors) { executorMap.put(executor.getId(), executor); ...
This returns implementation instance for Status containing cluster status information for Azkaban containerization. It includes information pertaining to web server, memory and containerization information such as image types and version for each image types selected based on either random rampup or latest active image...
getActiveExecutors
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/StatusService.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/StatusService.java
Apache-2.0
private boolean getDbStatus() { try { return this.dbOperator.query("SELECT 1", rs -> true); } catch (final SQLException e) { log.error("DB Error", e); } return false; }
This returns implementation instance for Status containing cluster status information for Azkaban containerization. It includes information pertaining to web server, memory and containerization information such as image types and version for each image types selected based on either random rampup or latest active image...
getDbStatus
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/StatusService.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/StatusService.java
Apache-2.0
private boolean isContainerizedDispatchMethodEnabled() { return DispatchMethod.isContainerizedMethodEnabled(props .getString(Constants.ConfigurationKeys.AZKABAN_EXECUTION_DISPATCH_METHOD, DispatchMethod.PUSH.name())); }
This returns implementation instance for Status containing cluster status information for Azkaban containerization. It includes information pertaining to web server, memory and containerization information such as image types and version for each image types selected based on either random rampup or latest active image...
isContainerizedDispatchMethodEnabled
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/StatusService.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/StatusService.java
Apache-2.0
@Override public void setUp(final DataProvider dataProvider) { logger.info("No metrics set up for Web server."); }
No-op implementation of {@link WebMetrics} used when metrics are disabled or for unit tests.
setUp
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
Apache-2.0
@Override public void startReporting(final Props props) { }
No-op implementation of {@link WebMetrics} used when metrics are disabled or for unit tests.
startReporting
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
Apache-2.0
@Override public void markWebGetCall() { }
No-op implementation of {@link WebMetrics} used when metrics are disabled or for unit tests.
markWebGetCall
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
Apache-2.0
@Override public void markWebPostCall() { }
No-op implementation of {@link WebMetrics} used when metrics are disabled or for unit tests.
markWebPostCall
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
Apache-2.0
@Override public AzkabanAPIMetrics setUpAzkabanAPIMetrics(final String endpointUri) { return new AzkabanAPIMetrics(null, null, null, null, null) { @Override public void incrementAppGetRequests() { } @Override public void incrementAppPostRequests() { } @Override pu...
No-op implementation of {@link WebMetrics} used when metrics are disabled or for unit tests.
setUpAzkabanAPIMetrics
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
Apache-2.0
@Override public void incrementAppGetRequests() { }
No-op implementation of {@link WebMetrics} used when metrics are disabled or for unit tests.
incrementAppGetRequests
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
Apache-2.0
@Override public void incrementAppPostRequests() { }
No-op implementation of {@link WebMetrics} used when metrics are disabled or for unit tests.
incrementAppPostRequests
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
Apache-2.0
@Override public void incrementNonAppGetRequests() { }
No-op implementation of {@link WebMetrics} used when metrics are disabled or for unit tests.
incrementNonAppGetRequests
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
Apache-2.0
@Override public void incrementNonAppPostRequests() { }
No-op implementation of {@link WebMetrics} used when metrics are disabled or for unit tests.
incrementNonAppPostRequests
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
Apache-2.0
@Override public void addResponseTime(final long time) { }
No-op implementation of {@link WebMetrics} used when metrics are disabled or for unit tests.
addResponseTime
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/metrics/DummyWebMetricsImpl.java
Apache-2.0
@Override public void setUp(final DataProvider dataProvider) { logger.info("Setting up Web Server metrics."); this.webGetCall = this.metricsManager.addMeter("Web-Get-Call-Meter"); this.webPostCall = this.metricsManager.addMeter("Web-Post-Call-Meter"); this.metricsManager .addGauge("JETTY-NumId...
Class in charge of collecting metrics of the azkaban-web-server module.
setUp
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/metrics/WebMetricsImpl.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/metrics/WebMetricsImpl.java
Apache-2.0
@Override public void startReporting(final Props props) { logger.info("Start reporting Web Server metrics."); this.metricsManager.startReporting(props); }
Class in charge of collecting metrics of the azkaban-web-server module.
startReporting
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/metrics/WebMetricsImpl.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/metrics/WebMetricsImpl.java
Apache-2.0
@Override public void markWebGetCall() { this.webGetCall.mark(); }
Mark the occurrence of a GET call This method should be Thread Safe. Two reasons that we don't make this function call synchronized: 1). drop wizard metrics deals with concurrency internally; 2). mark is basically a math addition operation, which should not cause race condition issue.
markWebGetCall
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/metrics/WebMetricsImpl.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/metrics/WebMetricsImpl.java
Apache-2.0
@Override public void markWebPostCall() { this.webPostCall.mark(); }
Mark the occurrence of a GET call This method should be Thread Safe. Two reasons that we don't make this function call synchronized: 1). drop wizard metrics deals with concurrency internally; 2). mark is basically a math addition operation, which should not cause race condition issue.
markWebPostCall
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/metrics/WebMetricsImpl.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/metrics/WebMetricsImpl.java
Apache-2.0
@Override public AzkabanAPIMetrics setUpAzkabanAPIMetrics(final String endpointUri) { final String metricName = "uri-" + endpointUri; final CounterGauge appGetRequestCount = this.metricsManager.addCounterGauge(metricName + "--num-app-get-req"); final CounterGauge appPostRequestCount = this...
Mark the occurrence of a GET call This method should be Thread Safe. Two reasons that we don't make this function call synchronized: 1). drop wizard metrics deals with concurrency internally; 2). mark is basically a math addition operation, which should not cause race condition issue.
setUpAzkabanAPIMetrics
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/metrics/WebMetricsImpl.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/metrics/WebMetricsImpl.java
Apache-2.0
public AzkabanWebServer getApplication() { return this.application; }
To retrieve the application for the servlet
getApplication
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
public WebMetrics getWebMetrics() { return this.application.getWebMetrics(); }
To retrieve the application for the servlet
getWebMetrics
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
@Override public void init(final ServletConfig config) throws ServletException { this.application = SERVICE_PROVIDER.getInstance(AzkabanWebServer.class); if (this.application == null) { throw new IllegalStateException("No batch application is defined in the servlet context!"); } final Props pr...
To retrieve the application for the servlet
init
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
public boolean hasParam(final HttpServletRequest request, final String param) { return HttpRequestUtils.hasParam(request, param); }
Checks for the existance of the parameter in the request
hasParam
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
public String getParam(final HttpServletRequest request, final String name) throws ServletException { return HttpRequestUtils.getParam(request, name); }
Retrieves the param from the http servlet request. Will throw an exception if not found
getParam
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
public String getParam(final HttpServletRequest request, final String name, final String defaultVal) { return HttpRequestUtils.getParam(request, name, defaultVal); }
Retrieves the param from the http servlet request.
getParam
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
public int getIntParam(final HttpServletRequest request, final String name) throws ServletException { return HttpRequestUtils.getIntParam(request, name); }
Returns the param and parses it into an int. Will throw an exception if not found, or a parse error if the type is incorrect.
getIntParam
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
public int getIntParam(final HttpServletRequest request, final String name, final int defaultVal) { return HttpRequestUtils.getIntParam(request, name, defaultVal); }
Returns the param and parses it into an int. Will throw an exception if not found, or a parse error if the type is incorrect.
getIntParam
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
public long getLongParam(final HttpServletRequest request, final String name) throws ServletException { return HttpRequestUtils.getLongParam(request, name); }
Returns the param and parses it into an int. Will throw an exception if not found, or a parse error if the type is incorrect.
getLongParam
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
public long getLongParam(final HttpServletRequest request, final String name, final long defaultVal) { return HttpRequestUtils.getLongParam(request, name, defaultVal); }
Returns the param and parses it into an int. Will throw an exception if not found, or a parse error if the type is incorrect.
getLongParam
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
public boolean getBooleanParam(final HttpServletRequest request, final String name, final boolean defaultVal) { return HttpRequestUtils.getBooleanParam(request, name, defaultVal); }
Returns the param and parses it into an int. Will throw an exception if not found, or a parse error if the type is incorrect.
getBooleanParam
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
public Map<String, String> getParamGroup(final HttpServletRequest request, final String groupName) throws ServletException { return HttpRequestUtils.getParamGroup(request, groupName); }
Returns the param and parses it into an int. Will throw an exception if not found, or a parse error if the type is incorrect.
getParamGroup
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected void setSessionValue(final HttpServletRequest request, final String key, final Object value) { request.getSession(true).setAttribute(key, value); }
Returns the session value of the request.
setSessionValue
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected void addSessionValue(final HttpServletRequest request, final String key, final Object value) { List l = (List) request.getSession(true).getAttribute(key); if (l == null) { l = new ArrayList(); } l.add(value); request.getSession(true).setAttribute(key, l); }
Adds a session value to the request
addSessionValue
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected void setErrorMessageInCookie(final HttpServletResponse response, final String errorMsg) { final Cookie cookie = new Cookie(AZKABAN_FAILURE_MESSAGE, errorMsg); cookie.setPath("/"); response.addCookie(cookie); }
Sets an error message in azkaban.failure.message in the cookie. This will be used by the web client javascript to somehow display the message
setErrorMessageInCookie
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected void setWarnMessageInCookie(final HttpServletResponse response, final String errorMsg) { final Cookie cookie = new Cookie(AZKABAN_WARN_MESSAGE, errorMsg); cookie.setPath("/"); response.addCookie(cookie); }
Sets a warning message in azkaban.warn.message in the cookie. This will be used by the web client javascript to somehow display the message
setWarnMessageInCookie
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected void setSuccessMessageInCookie(final HttpServletResponse response, final String message) { final Cookie cookie = new Cookie(AZKABAN_SUCCESS_MESSAGE, message); cookie.setPath("/"); response.addCookie(cookie); }
Sets a message in azkaban.success.message in the cookie. This will be used by the web client javascript to somehow display the message
setSuccessMessageInCookie
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected String getSuccessMessageFromCookie(final HttpServletRequest request) { final Cookie cookie = getCookieByName(request, AZKABAN_SUCCESS_MESSAGE); if (cookie == null) { return null; } return cookie.getValue(); }
Retrieves a success message from a cookie. azkaban.success.message
getSuccessMessageFromCookie
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected String getWarnMessageFromCookie(final HttpServletRequest request) { final Cookie cookie = getCookieByName(request, AZKABAN_WARN_MESSAGE); if (cookie == null) { return null; } return cookie.getValue(); }
Retrieves a warn message from a cookie. azkaban.warn.message
getWarnMessageFromCookie
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected String getErrorMessageFromCookie(final HttpServletRequest request) { final Cookie cookie = getCookieByName(request, AZKABAN_FAILURE_MESSAGE); if (cookie == null) { return null; } return cookie.getValue(); }
Retrieves a success message from a cookie. azkaban.failure.message
getErrorMessageFromCookie
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected Cookie getCookieByName(final HttpServletRequest request, final String name) { final Cookie[] cookies = request.getCookies(); if (cookies != null) { for (final Cookie cookie : cookies) { if (name.equals(cookie.getName())) { return cookie; } } } return null...
Retrieves a cookie by name. Potential issue in performance if a lot of cookie variables are used.
getCookieByName
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected Page newPage(final HttpServletRequest req, final HttpServletResponse resp, final Session session, final String template) { final Page page = new Page(req, resp, getApplication().getVelocityEngine(), template); page.add("version", jarVersion); page.add("azkaban_name", this.name); page.add...
Creates a new velocity page to use. With session.
newPage
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected Page newPage(final HttpServletRequest req, final HttpServletResponse resp, final String template) { final Page page = new Page(req, resp, getApplication().getVelocityEngine(), template); page.add("version", jarVersion); page.add("azkaban_name", this.name); page.add("azkaban_label", this.label)...
Creates a new velocity page to use.
newPage
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected void writeJSON(final HttpServletResponse resp, final Object obj) throws IOException { writeJSON(resp, obj, false); }
Writes json out to the stream.
writeJSON
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected void writeJSON(final HttpServletResponse resp, final Object obj, final boolean pretty) throws IOException { resp.setContentType(JSON_MIME_TYPE); JSONUtils.toJSON(obj, resp.getOutputStream(), true); }
Writes json out to the stream.
writeJSON
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected int getDisplayExecutionPageSize() { return this.displayExecutionPageSize; }
Writes json out to the stream.
getDisplayExecutionPageSize
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
public static String createJsonResponse(final String status, final String message, final String action, final Map<String, Object> params) { final HashMap<String, Object> response = new HashMap<>(); response.put("status", status); if (message != null) { response.put("message", message); } ...
Writes json out to the stream.
createJsonResponse
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
public Optional<AzkabanAPI> getAzkabanAPI(final HttpServletRequest request) { // Inspect parameters contained in the query string or posted form data for (final AzkabanAPI api : getApiEndpoints()) { final String paramName = api.getRequestParameter(); final String paramValue = api.getParameterValue()...
Writes json out to the stream.
getAzkabanAPI
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected void sendErrorResponse(final HttpServletResponse httpServletResponse, final int status, final String errorMessage) throws IOException { final Map<String, Object> responseObj = new HashMap<>(); responseObj.put("error", status); responseObj.put("message", errorMessage); httpServletResponse...
Writes json out to the stream.
sendErrorResponse
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected void sendResponse(final HttpServletResponse httpServletResponse, final int status, final Object responseObj) throws IOException { httpServletResponse.setStatus(status); writeJSON(httpServletResponse, responseObj, true); }
Writes json out to the stream.
sendResponse
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
protected void sendResponse(final HttpServletResponse httpServletResponse, final int status, final String errorMessage, final Object response) throws IOException { final Map<String, Object> responseObj = new LinkedHashMap<>(); responseObj.put("error", status); responseObj.put("message", errorMessage);...
Writes json out to the stream.
sendResponse
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
Apache-2.0
private void ajaxUpdateQueueProcessor(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> returnMap, final User user, final boolean enableQueue) { boolean wasSuccess = false; if (HttpRequestUtils.hasPermission(this.userManager, user, Type.ADMIN)) { try {...
<pre> Enables queueProcessor if @param status is true disables queueProcessor if @param status is false. </pre>
ajaxUpdateQueueProcessor
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxFetchScheduledFlowGraph(final String projectName, final String flowName, final HashMap<String, Object> ret, final User user) throws ServletException { final Project project = getProjectAjaxByPermission(ret, projectName, user, Type.EXECUTE); if (project == null) { ret.put("er...
<pre> Enables queueProcessor if @param status is true disables queueProcessor if @param status is false. </pre>
ajaxFetchScheduledFlowGraph
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxReloadExecutors(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> returnMap, final User user) { boolean wasSuccess = false; if (HttpRequestUtils.hasPermission(this.userManager, user, Type.ADMIN)) { try { this.executorManagerAdapter.s...
<pre> Enables queueProcessor if @param status is true disables queueProcessor if @param status is false. </pre>
ajaxReloadExecutors
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
@Override protected void handlePost(final HttpServletRequest req, final HttpServletResponse resp, final Session session) throws ServletException, IOException { if (hasParam(req, "ajax")) { handleAJAXAction(req, resp, session); } }
<pre> Enables queueProcessor if @param status is true disables queueProcessor if @param status is false. </pre>
handlePost
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void handleExecutionJobDetailsPage(final HttpServletRequest req, final HttpServletResponse resp, final Session session) throws ServletException, IOException { final Page page = newPage(req, resp, session, "azkaban/webapp/servlet/velocity/jobdetailspage.vm"); final User user = session...
<pre> Enables queueProcessor if @param status is true disables queueProcessor if @param status is false. </pre>
handleExecutionJobDetailsPage
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void handleExecutionsPage(final HttpServletRequest req, final HttpServletResponse resp, final Session session) throws ServletException, IOException { final Page page = newPage(req, resp, session, "azkaban/webapp/servlet/velocity/executionspage.vm"); final List<Pair<Execu...
<pre> Enables queueProcessor if @param status is true disables queueProcessor if @param status is false. </pre>
handleExecutionsPage
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void handleExecutionFlowPageByTriggerInstanceId(final HttpServletRequest req, final HttpServletResponse resp, final Session session) throws ServletException, IOException { final Page page = newPage(req, resp, session, "azkaban/webapp/servlet/velocity/executingflowpage.vm"); ...
<pre> Enables queueProcessor if @param status is true disables queueProcessor if @param status is false. </pre>
handleExecutionFlowPageByTriggerInstanceId
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void handleExecutionFlowPageByExecId(final HttpServletRequest req, final HttpServletResponse resp, final Session session) throws ServletException, IOException { final Page page = newPage(req, resp, session, "azkaban/webapp/servlet/velocity/executingflowpage.vm"); final Us...
<pre> Enables queueProcessor if @param status is true disables queueProcessor if @param status is false. </pre>
handleExecutionFlowPageByExecId
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void addExternalLinks(final List<ExternalLink> extLinksTemplates, final Page page, final HttpServletRequest req, final int executionId, final String jobId) { List<ExternalLink> externalAnalyzers = ExternalLinkUtils.buildExternalLinksForRequest(extLinksTemplates, this.externalLinksT...
<pre> Enables queueProcessor if @param status is true disables queueProcessor if @param status is false. </pre>
addExternalLinks
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
protected Project getProjectPageByPermission(final Page page, final int projectId, final User user, final Permission.Type type) { final Project project = this.projectManager.getProject(projectId); if (project == null) { page.add("errorMsg", "Project " + project + " not found."); } else if (!has...
<pre> Enables queueProcessor if @param status is true disables queueProcessor if @param status is false. </pre>
getProjectPageByPermission
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
protected Project getProjectAjaxByPermission(final Map<String, Object> ret, final String projectName, final User user, final Permission.Type type) { return filterProjectByPermission(this.projectManager.getProject(projectName), user, type, ret); }
<pre> Enables queueProcessor if @param status is true disables queueProcessor if @param status is false. </pre>
getProjectAjaxByPermission
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
protected Project getProjectAjaxByPermission(final Map<String, Object> ret, final int projectId, final User user, final Permission.Type type) { return filterProjectByPermission(this.projectManager.getProject(projectId), user, type, ret); }
<pre> Enables queueProcessor if @param status is true disables queueProcessor if @param status is false. </pre>
getProjectAjaxByPermission
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxRestartFailed(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user, final ExecutableFlow exFlow) throws ServletException { final Project project = getProjectAjaxByPermission(ret, exFlow.getProjectId(), user, ...
<pre> Enables queueProcessor if @param status is true disables queueProcessor if @param status is false. </pre>
ajaxRestartFailed
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxFetchExecFlowLogs(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user, final ExecutableFlow exFlow) throws ServletException { final Project project = getProjectAjaxByPermission(ret, exFlow.getProjectId(), user, Type.READ); ...
Gets the logs through plain text stream to reduce memory overhead.
ajaxFetchExecFlowLogs
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxFetchJobLogs(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user, final ExecutableFlow exFlow) throws ServletException { final Project project = getProjectAjaxByPermission(ret, exFlow.getProjectId(), user, Type.READ); if (...
Gets the logs through ajax plain text stream to reduce memory overhead.
ajaxFetchJobLogs
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private Map<String, Object> appendLogData(final LogData data, final int defaultOffset) { final Map<String, Object> parameters = new HashMap<>(); if (data == null) { parameters.put("length", 0); parameters.put("offset", defaultOffset); parameters.put("data", ""); } else { parameters....
Gets the logs through ajax plain text stream to reduce memory overhead.
appendLogData
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxFetchJobStats(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user, final ExecutableFlow exFlow) throws ServletException { final Project project = getProjectAjaxByPermission(ret, exFlow.getProjectId(), user, Type.READ);...
Gets the logs through ajax plain text stream to reduce memory overhead.
ajaxFetchJobStats
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxFetchFlowInfo(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user, final String projectName, final String flowId) throws ServletException { final Project project = getProjectAjaxByPermission(ret, projectName, user, Typ...
Gets the logs through ajax plain text stream to reduce memory overhead.
ajaxFetchFlowInfo
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxFetchExecutableFlowInfo(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user, final ExecutableFlow exflow) throws ServletException { final Project project = getProjectAjaxByPermission(ret, exflow.getProjectId(), user, T...
Gets the logs through ajax plain text stream to reduce memory overhead.
ajaxFetchExecutableFlowInfo
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private static Map<String, Map<String, String>> mergeRuntimeProperties( final ExecutionOptions options) { final Map<String, Map<String, String>> runtimeProperties = new HashMap<>(); if (!options.getFlowParameters().isEmpty()) { runtimeProperties .put(Constants.ROOT_NODE_IDENTIFIER, new Has...
Copies flowOverrides under the key "ROOT".
mergeRuntimeProperties
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxCancelFlow(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user, final ExecutableFlow exFlow) throws ServletException { final Project project = getProjectAjaxByPermission(ret, exFlow.getProjectId(), user, Ty...
Copies flowOverrides under the key "ROOT".
ajaxCancelFlow
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxGetFlowRunning(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user, final String projectId, final String flowId) throws ServletException { final Project project = getProjectAjaxByPermission(ret, projectId, user, Type.E...
Copies flowOverrides under the key "ROOT".
ajaxGetFlowRunning
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxPauseFlow(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user, final ExecutableFlow exFlow) throws ServletException { final Project project = getProjectAjaxByPermission(ret, exFlow.getProjectId(), user, Typ...
Copies flowOverrides under the key "ROOT".
ajaxPauseFlow
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxResumeFlow(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user, final ExecutableFlow exFlow) throws ServletException { final Project project = getProjectAjaxByPermission(ret, exFlow.getProjectId(), user, Ty...
Copies flowOverrides under the key "ROOT".
ajaxResumeFlow
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private Map<String, Object> getExecutableFlowUpdateInfo(final ExecutableNode node, final long lastUpdateTime) { final HashMap<String, Object> nodeObj = new HashMap<>(); if (node instanceof ExecutableFlowBase) { final ExecutableFlowBase base = (ExecutableFlowBase) node; final ArrayList<Map<Stri...
Copies flowOverrides under the key "ROOT".
getExecutableFlowUpdateInfo
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private Map<String, Object> getExecutableNodeInfo(final ExecutableNode node) { final HashMap<String, Object> nodeObj = new HashMap<>(); nodeObj.put("id", node.getId()); nodeObj.put("status", node.getStatus()); nodeObj.put("startTime", node.getStartTime()); nodeObj.put("endTime", node.getEndTime()); ...
Copies flowOverrides under the key "ROOT".
getExecutableNodeInfo
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxFetchExecutableFlowUpdate(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user, final ExecutableFlow exFlow) throws ServletException { final Long lastUpdateTime = Long.parseLong(getParam(req, "lastUpdateTime")); logger.info...
Copies flowOverrides under the key "ROOT".
ajaxFetchExecutableFlowUpdate
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxFetchExecutableFlow(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user, final ExecutableFlow exFlow) throws ServletException { logger.info("Fetching " + exFlow.getExecutionId()); final Project project = getProjec...
Copies flowOverrides under the key "ROOT".
ajaxFetchExecutableFlow
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxExecuteFlow(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user) throws ServletException { final String projectName = getParam(req, "project"); final String flowId = getParam(req, "flow"); final Project project = ...
Copies flowOverrides under the key "ROOT".
ajaxExecuteFlow
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxUpdateProperty(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user) throws ServletException { try { if (!HttpRequestUtils.hasPermission(this.userManager, user, Type.ADMIN)) { ret.put("error", String.format("User ...
This method is used to update the property. propType: Is the umbrella for properties for which values need to be updated subType: Actual property for which values need to be updated val: value to be updated <p> Example: propType=containerDispatch&subType=updateAllowList&val=spark,java propType=containerDispatch&subType...
ajaxUpdateProperty
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void updateContainerDispatchProps(final HttpServletRequest req, final HashMap<String, Object> ret) throws ServletException { ContainerizedDispatchManager containerizedDispatchManager = (ContainerizedDispatchManager) this.executorManagerAdapter; String subType = getParam(req, "subType"); ...
This method is used to update the property. propType: Is the umbrella for properties for which values need to be updated subType: Actual property for which values need to be updated val: value to be updated <p> Example: propType=containerDispatch&subType=updateAllowList&val=spark,java propType=containerDispatch&subType...
updateContainerDispatchProps
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void updateContainerizedImplProps(final HttpServletRequest req, final HashMap<String, Object> ret) throws ServletException { String subType = getParam(req, "subType"); PropUpdate propUpdate = PropUpdate.fromParam(subType); String val = getParam(req, "val"); switch (propUpdate) { ...
This method is used to update the property. propType: Is the umbrella for properties for which values need to be updated subType: Actual property for which values need to be updated val: value to be updated <p> Example: propType=containerDispatch&subType=updateAllowList&val=spark,java propType=containerDispatch&subType...
updateContainerizedImplProps
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void updateGeneralProps(final HttpServletRequest req, final HashMap<String, Object> ret) throws ServletException { String subType = getParam(req, "subType"); PropUpdate propUpdate = PropUpdate.fromParam(subType); String val = getParam(req, "val"); switch (propUpdate) { case ENA...
This method is used to update the property. propType: Is the umbrella for properties for which values need to be updated subType: Actual property for which values need to be updated val: value to be updated <p> Example: propType=containerDispatch&subType=updateAllowList&val=spark,java propType=containerDispatch&subType...
updateGeneralProps
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private void ajaxRampActions(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user) throws ServletException { try { final Object body = HttpRequestUtils.getJsonBody(req); if (HttpRequestUtils.hasPermission(this.userManager, user, Ty...
This method is used to update the property. propType: Is the umbrella for properties for which values need to be updated subType: Actual property for which values need to be updated val: value to be updated <p> Example: propType=containerDispatch&subType=updateAllowList&val=spark,java propType=containerDispatch&subType...
ajaxRampActions
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
public String getParam() { return param; }
This method is used to update the property. propType: Is the umbrella for properties for which values need to be updated subType: Actual property for which values need to be updated val: value to be updated <p> Example: propType=containerDispatch&subType=updateAllowList&val=spark,java propType=containerDispatch&subType...
getParam
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
public static PropUpdate fromParam(String param) { for (PropUpdate value : PropUpdate.values()) { if (value.getParam().equals(param)) { return value; } } throw new IllegalArgumentException( "No PropUpdate corresponding to param value " + param); }
This method is used to update the property. propType: Is the umbrella for properties for which values need to be updated subType: Actual property for which values need to be updated val: value to be updated <p> Example: propType=containerDispatch&subType=updateAllowList&val=spark,java propType=containerDispatch&subType...
fromParam
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
Apache-2.0
private DateTimeZone parseTimeZone(final String cronTimezone) { if (cronTimezone != null && cronTimezone.equals("UTC")) { return DateTimeZone.UTC; } return DateTimeZone.getDefault(); }
@param cronTimezone represents the timezone from remote API call @return if the string is equal to UTC, we return UTC; otherwise, we always return default timezone.
parseTimeZone
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/FlowTriggerInstanceServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/FlowTriggerInstanceServlet.java
Apache-2.0
private DateTime getPresentTimeByTimezone(final DateTimeZone timezone) { return new DateTime(timezone); }
@param cronTimezone represents the timezone from remote API call @return if the string is equal to UTC, we return UTC; otherwise, we always return default timezone.
getPresentTimeByTimezone
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/FlowTriggerInstanceServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/FlowTriggerInstanceServlet.java
Apache-2.0
public String getProjectName(final int id) { final Project project = FlowTriggerInstanceServlet.this.projectManager.getProject(id); if (project == null) { return String.valueOf(id); } return project.getName(); }
@param cronTimezone represents the timezone from remote API call @return if the string is equal to UTC, we return UTC; otherwise, we always return default timezone.
getProjectName
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/FlowTriggerInstanceServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/FlowTriggerInstanceServlet.java
Apache-2.0
@Override public void init(final ServletConfig config) throws ServletException { super.init(config); this.multipartParser = new MultipartParser( AbstractAzkabanServlet.DEFAULT_UPLOAD_DISK_SPOOL_SIZE); this.shouldLogRawUserAgent = getApplication().getServerProps().getBoolean("accesslog.ra...
Abstract Servlet that handles auto login when the session hasn't been verified.
init
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
Apache-2.0
public static AzkabanAPI getLoginAPI() { return loginAPI; }
Abstract Servlet that handles auto login when the session hasn't been verified.
getLoginAPI
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
Apache-2.0
public void setResourceDirectory(final File file) { this.webResourceDirectory = file; }
Abstract Servlet that handles auto login when the session hasn't been verified.
setResourceDirectory
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
Apache-2.0
@Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { getWebMetrics().markWebGetCall(); // Set session id final Session session = getSessionFromRequest(req); logRequest(req, session); if (hasParam(req, "logout")) ...
Abstract Servlet that handles auto login when the session hasn't been verified.
doGet
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
Apache-2.0
@Override protected void doDelete(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { getWebMetrics().markWebGetCall(); // Set session id final Session session = getSessionFromRequest(req); logRequest(req, session); if (hasParam(req, "logout"...
Abstract Servlet that handles auto login when the session hasn't been verified.
doDelete
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
Apache-2.0
protected boolean validateCSRFToken(final HttpServletRequest req) { final String sessionIdFromCookie = getSessionIdFromCookie(req); if (StringUtils.isEmpty(sessionIdFromCookie)) { logger.info("CSRF token validation successful. SessionId is not from cookie."); return true; } final String csrf...
@param req HttpServletRequest @return True if the CSRF Token is valid, otherwise false
validateCSRFToken
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
Apache-2.0
protected boolean addCSRFTokenToPage(final Page page, final Session session) { final CSRFTokenUtility csrfTokenUtility = CSRFTokenUtility.getCSRFTokenUtility(); if (null == csrfTokenUtility) { return false; } final String csrfToken = csrfTokenUtility.getCSRFTokenFromSession(session); if (!Stri...
@param req HttpServletRequest @return True if the CSRF Token is valid, otherwise false
addCSRFTokenToPage
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
Apache-2.0
private Session getSessionFromSessionId(final String sessionId) { if (sessionId == null) { return null; } return getApplication().getSessionCache().getSession(sessionId); }
@param req HttpServletRequest @return True if the CSRF Token is valid, otherwise false
getSessionFromSessionId
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
Apache-2.0
public boolean isUserAuthenticated(final HttpServletRequest req) throws ServletException { return getSessionFromRequest(req) != null; }
@param req HttpServletRequest @return True if the CSRF Token is valid, otherwise false
isUserAuthenticated
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
Apache-2.0
private void handleLogin(final HttpServletRequest req, final HttpServletResponse resp) throws IOException { handleLogin(req, resp, null); }
@param req HttpServletRequest @return True if the CSRF Token is valid, otherwise false
handleLogin
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
Apache-2.0
private void handleLogin(final HttpServletRequest req, final HttpServletResponse resp, final String errorMsg) throws IOException { if (handleOauth(req, resp)) { return; } final Page page = newPage(req, resp, "azkaban/webapp/servlet/velocity/login.vm"); page.add("passwordPlaceholder", this.pa...
@param req HttpServletRequest @return True if the CSRF Token is valid, otherwise false
handleLogin
java
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
https://github.com/azkaban/azkaban/blob/master/azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
Apache-2.0