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 static KafkaLog4jAppender getAzkabanKafkaLog4jAppender(final Props props,
final Layout layout, final String execId, final String name, final String jobAttempt,
final String topicConfigKey) {
final boolean loggingKafkaEnabled =
props.getBoolean(AZKABAN_LOGGING_KAFKA_ENABLED, false);
... | Utility class for getting Azkaban Kafka Log4j Appender | getAzkabanKafkaLog4jAppender | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/KafkaLog4jUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/KafkaLog4jUtils.java | Apache-2.0 |
public static KafkaLog4jAppender getAzkabanFlowKafkaLog4jAppender(final Props props,
final Layout layout, final String execId, final String name) {
return getAzkabanKafkaLog4jAppender(props, layout, execId, name, null,
ConfigurationKeys.AZKABAN_FLOW_LOGGING_KAFKA_TOPIC);
} | Get Azkaban Kafka Log4j Appender for given Azkaban flow.
@param props Azkaban props
@param layout Log4j layout
@param execId Azkaban exec id
@param name Azkaban flow id
@return KafkaLog4jAppender | getAzkabanFlowKafkaLog4jAppender | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/KafkaLog4jUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/KafkaLog4jUtils.java | Apache-2.0 |
public static KafkaLog4jAppender getAzkabanJobKafkaLog4jAppender(final Props props,
final Layout layout, final String execId, final String name, final String jobAttempt) {
return getAzkabanKafkaLog4jAppender(props, layout, execId, name, jobAttempt,
ConfigurationKeys.AZKABAN_JOB_LOGGING_KAFKA_TOPIC);
... | Get Azkaban Kafka Log4j Appender for given Azkaban job.
@param props Azkaban props
@param layout Log4j layout
@param execId Azkaban exec id
@param name Azkaban job's nested id
@param jobAttempt Azkaban job attempt
@return KafkaLog4jAppender | getAzkabanJobKafkaLog4jAppender | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/KafkaLog4jUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/KafkaLog4jUtils.java | Apache-2.0 |
public double getCpuLoad() {
if (this.collectedCpuStats.isEmpty()) {
return -1;
}
final CpuStats newestCpuStats = getCpuStats();
if (newestCpuStats == null) {
return -1;
}
final CpuStats oldestCpuStats = this.collectedCpuStats.pollLast();
this.collectedCpuStats.push(newestCpuStat... | Collects a new cpu stat data point and calculates cpu load with it and the oldest one
collected which is then deleted.
@return percentage of CPU usage. -1 if there are no cpu stats. | getCpuLoad | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/OsCpuUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/OsCpuUtil.java | Apache-2.0 |
private double calcCpuLoad(final CpuStats startCpuStats, final CpuStats endCpuStats) {
final long startSysUptime = startCpuStats.getSysUptime();
final long startTimeCpuIdle = startCpuStats.getTimeCpuIdle();
final long endSysUptime = endCpuStats.getSysUptime();
final long endTimeCpuIdle = endCpuStats.get... | Collects a new cpu stat data point and calculates cpu load with it and the oldest one
collected which is then deleted.
@return percentage of CPU usage. -1 if there are no cpu stats. | calcCpuLoad | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/OsCpuUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/OsCpuUtil.java | Apache-2.0 |
private CpuStats getCpuStats() {
if (!Files.isRegularFile(Paths.get(CPU_STAT_FILE))) {
// Mac doesn't use proc pseudo files for example.
return null;
}
final String cpuLine = getCpuLineFromStatFile();
if (cpuLine == null) {
return null;
}
return getCpuStatsFromLine(cpuLine);
... | Collects a new cpu stat data point and calculates cpu load with it and the oldest one
collected which is then deleted.
@return percentage of CPU usage. -1 if there are no cpu stats. | getCpuStats | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/OsCpuUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/OsCpuUtil.java | Apache-2.0 |
private String getCpuLineFromStatFile() {
BufferedReader br = null;
try {
br = Files.newBufferedReader(Paths.get(CPU_STAT_FILE), StandardCharsets.UTF_8);
String line;
while ((line = br.readLine()) != null) {
// looking for a line starting with "cpu<space>" which aggregates the values i... | Collects a new cpu stat data point and calculates cpu load with it and the oldest one
collected which is then deleted.
@return percentage of CPU usage. -1 if there are no cpu stats. | getCpuLineFromStatFile | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/OsCpuUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/OsCpuUtil.java | Apache-2.0 |
CpuStats getCpuStatsFromLine(final String line) {
try {
final String[] cpuInfo = line.split("\\s+");
final long user = Long.parseLong(cpuInfo[1]);
final long nice = Long.parseLong(cpuInfo[2]);
final long system = Long.parseLong(cpuInfo[3]);
final long idle = Long.parseLong(cpuInfo[4]);... | Parses cpu usage information from /proc/stat file.
Example of line expected with the meanings of the values below:
cpu 4705 356 584 3699 23 23 0 0 0 0
---- user nice system idle iowait irq softirq steal guest guest_nice
Method visible within the package for testing purposes.
@param... | getCpuStatsFromLine | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/OsCpuUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/OsCpuUtil.java | Apache-2.0 |
public long getSysUptime() {
return this.sysUptime;
} | Parses cpu usage information from /proc/stat file.
Example of line expected with the meanings of the values below:
cpu 4705 356 584 3699 23 23 0 0 0 0
---- user nice system idle iowait irq softirq steal guest guest_nice
Method visible within the package for testing purposes.
@param... | getSysUptime | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/OsCpuUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/OsCpuUtil.java | Apache-2.0 |
public long getTimeCpuIdle() {
return this.timeCpuIdle;
} | Parses cpu usage information from /proc/stat file.
Example of line expected with the meanings of the values below:
cpu 4705 356 584 3699 23 23 0 0 0 0
---- user nice system idle iowait irq softirq steal guest guest_nice
Method visible within the package for testing purposes.
@param... | getTimeCpuIdle | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/OsCpuUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/OsCpuUtil.java | Apache-2.0 |
long getOsTotalFreeMemorySize() {
return getAggregatedFreeMemorySize(MEM_KEYS);
} | Includes OS cache and free swap.
@return the total free memory size of the OS. 0 if there is an error or the OS doesn't support
this memory check. | getOsTotalFreeMemorySize | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/OsMemoryUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/OsMemoryUtil.java | Apache-2.0 |
long getOsFreePhysicalMemorySize() {
return getAggregatedFreeMemorySize(MEM_AVAILABLE_KEYS);
} | @return the free physical memory size of the OS. 0 if there is an error or the OS doesn't
support this memory check. | getOsFreePhysicalMemorySize | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/OsMemoryUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/OsMemoryUtil.java | Apache-2.0 |
private long getAggregatedFreeMemorySize(final Set<String> memKeysToCombine) {
if (!Files.isRegularFile(Paths.get(MEM_INFO_FILE))) {
// Mac doesn't support /proc/meminfo for example.
return 0;
}
final List<String> lines;
// The file /proc/meminfo is assumed to contain only ASCII characters.... | @return the free physical memory size of the OS. 0 if there is an error or the OS doesn't
support this memory check. | getAggregatedFreeMemorySize | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/OsMemoryUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/OsMemoryUtil.java | Apache-2.0 |
long getOsTotalFreeMemorySizeFromStrings(final List<String> lines,
final Set<String> memKeysToCombine) {
long totalFree = 0;
int count = 0;
for (final String line : lines) {
for (final String keyName : memKeysToCombine) {
if (line.startsWith(keyName)) {
count++;
fina... | @param lines text lines from the procinfo file
@return the total size of free memory in kB. 0 if there is an error. | getOsTotalFreeMemorySizeFromStrings | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/OsMemoryUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/OsMemoryUtil.java | Apache-2.0 |
long parseMemoryLine(final String line) {
final int idx1 = line.indexOf(":");
final int idx2 = line.lastIndexOf("kB");
final String sizeString = line.substring(idx1 + 1, idx2 - 1).trim();
try {
return Long.parseLong(sizeString);
} catch (final NumberFormatException e) {
final String err ... | Example file: $ cat /proc/meminfo MemTotal: 65894008 kB MemFree: 59400536 kB
Buffers: 409348 kB Cached: 4290236 kB SwapCached: 0 kB
Make the method package private to make unit testing easier. Otherwise it can be made private.
@param line the text for a memory usage statistic... | parseMemoryLine | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/OsMemoryUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/OsMemoryUtil.java | Apache-2.0 |
@Override
public String format(final LoggingEvent event) {
if (event.getMessage() instanceof String) {
return super.format(appendStackTraceToEvent(event));
}
return super.format(event);
} | When we use the log4j Kafka appender, it seems that the appender simply does not log the stack
trace anywhere Seeing as the stack trace is a very important piece of information, we create our
own PatternLayout class that appends the stack trace to the log message that reported it, so that
all the information regarding ... | format | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/PatternLayoutEscaped.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/PatternLayoutEscaped.java | Apache-2.0 |
private LoggingEvent appendStackTraceToEvent(final LoggingEvent event) {
String message = event.getMessage().toString();
// If there is a stack trace available, print it out
if (event.getThrowableInformation() != null) {
final String[] s = event.getThrowableStrRep();
for (final String line : s) ... | Create a copy of event, but append a stack trace to the message (if it exists). Then it escapes
the backslashes, tabs, newlines and quotes in its message as we are sending it as JSON and we
don't want any corruption of the JSON object. | appendStackTraceToEvent | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/PatternLayoutEscaped.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/PatternLayoutEscaped.java | Apache-2.0 |
public static URI buildUri(final String host, final int port, final String path,
final boolean isHttp, final Pair<String, String>... params) throws IOException {
final URIBuilder builder = new URIBuilder();
builder.setScheme(isHttp ? "http" : "https").setHost(host).setPort(port);
if (null != path && ... | helper function to build a valid URI.
@param host host name.
@param port host port.
@param path extra path after host.
@param isHttp indicates if whether Http or HTTPS should be used.
@param params extra query parameters.
@return the URI built from the inputs. | buildUri | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/RestfulApiClient.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/RestfulApiClient.java | Apache-2.0 |
protected static HttpEntityEnclosingRequestBase completeRequest(
final HttpEntityEnclosingRequestBase request,
final List<Pair<String, String>> params) throws UnsupportedEncodingException {
if (request != null) {
if (null != params && !params.isEmpty()) {
final List<NameValuePair> formPara... | helper function to fill the request with header entries and posting body . | completeRequest | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/RestfulApiClient.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/RestfulApiClient.java | Apache-2.0 |
public T httpPost(final URI uri, Optional<Integer> httpTimeout,
final List<Pair<String, String>> params)
throws IOException {
// shortcut if the passed url is invalid.
if (null == uri) {
logger.error(" unable to perform httpPost as the passed uri is null.");
return null;
}
final... | function to perform a Post http request.
@param uri the URI of the request.
@param params the form params to be posted, optional.
@return the response object type of which is specified by user.
@throws UnsupportedEncodingException, IOException | httpPost | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/RestfulApiClient.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/RestfulApiClient.java | Apache-2.0 |
protected CloseableHttpClient createHttpClient( final Optional<Integer> httpTimeout) {
if (httpTimeout.isPresent()) {
final int timeout = httpTimeout.get();
final RequestConfig requestConfig = RequestConfig.custom()
.setConnectTimeout(timeout)
.setSocketTimeout(timeout)
.bu... | For returning a HttpClient that will be used for any http requests within this class. This can
be overridden by child classes to customize client, for example, for providing a TLS (https)
enabled client.
@return an http client instance from default settings. | createHttpClient | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/RestfulApiClient.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/RestfulApiClient.java | Apache-2.0 |
protected T sendAndReturn(final HttpUriRequest request, final Optional<Integer> httpTimeout)
throws IOException {
try (final CloseableHttpClient client = this.createHttpClient(httpTimeout)) {
return this.parseResponse(client.execute(request));
}
} | function to dispatch the request and pass back the response. | sendAndReturn | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/RestfulApiClient.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/RestfulApiClient.java | Apache-2.0 |
public static void configureJobCallback(@Nonnull final Logger logger, @Nonnull final Props props) {
requireNonNull(logger, "Logger must not be null");
requireNonNull(props, "Properties can't be null");
final boolean jobCallbackEnabled =
props.getBoolean(Constants.ConfigurationKeys.AZKABAN_EXECUT... | Method to initialize jobcallback manager if it is enabled.
@param logger : the logger object of calling class.
@param props : Azkaban properties | configureJobCallback | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/ServerUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/ServerUtils.java | Apache-2.0 |
public static String getVersionSetJsonString(final VersionSet versionSet) {
final Map<String, String> imageToVersionStringMap = new HashMap<>();
for (final String imageType: versionSet.getImageToVersionMap().keySet()) {
imageToVersionStringMap.put(imageType,
versionSet.getImageToVersionMap().get... | Pretty format VersionSet
@param versionSet the versionSet
@return Readable versionSet in JSON format. | getVersionSetJsonString | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/ServerUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/ServerUtils.java | Apache-2.0 |
public static void redirectOutAndErrToLog() {
System.setOut(infoStream);
System.setErr(errorStream);
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | redirectOutAndErrToLog | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
private static PrintStream createStream(final PrintStream stream, final Level level) {
return new LogStream(stream, level);
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | createStream | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
private void write(final String string) {
logger.log(this.level, string);
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | write | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void println(final String string) {
print(string);
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | println | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void print(final String string) {
write(string);
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | print | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void println(final boolean bool) {
print(bool);
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | println | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void print(final boolean bool) {
write(String.valueOf(bool));
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | print | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void println(final int i) {
print(i);
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | println | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void print(final int i) {
write(String.valueOf(i));
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | print | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void println(final float f) {
print(f);
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | println | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void print(final float f) {
write(String.valueOf(f));
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | print | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void println(final char c) {
print(c);
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | println | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void print(final char c) {
write(String.valueOf(c));
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | print | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void println(final long l) {
print(l);
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | println | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void print(final long l) {
write(String.valueOf(l));
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | print | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void println(final double d) {
print(d);
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | println | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void print(final double d) {
write(String.valueOf(d));
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | print | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void println(final char[] c) {
print(c);
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | println | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void print(final char[] c) {
write(new String(c));
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | print | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void println(final Object o) {
print(o);
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | println | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
@Override
public void print(final Object o) {
write(o.toString());
} | A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
messages written to the console (although we should not be using System.out to write out). | print | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java | Apache-2.0 |
public synchronized void swap() {
this.primaryQueue = this.secondaryQueue;
this.secondaryQueue = new ArrayList<>();
} | Swaps primaryQueue with secondary queue. The previous primary queue will be released. | swap | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/SwapQueue.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/SwapQueue.java | Apache-2.0 |
public synchronized int getSwapQueueSize() {
return this.secondaryQueue.size();
} | Returns a count of the secondary queue. | getSwapQueueSize | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/SwapQueue.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/SwapQueue.java | Apache-2.0 |
public synchronized int getPrimarySize() {
return this.primaryQueue.size();
} | Returns a count of the secondary queue. | getPrimarySize | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/SwapQueue.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/SwapQueue.java | Apache-2.0 |
public synchronized int getSize() {
return this.secondaryQueue.size() + this.primaryQueue.size();
} | Returns both the secondary and primary size | getSize | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/SwapQueue.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/SwapQueue.java | Apache-2.0 |
@Override
public synchronized Iterator<T> iterator() {
return this.primaryQueue.iterator();
} | Returns iterator over the primary queue. | iterator | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/SwapQueue.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/SwapQueue.java | Apache-2.0 |
public boolean canSystemGrantMemory(final long xmx) {
final long freeMemSize = this.util.getOsTotalFreeMemorySize();
if (freeMemSize == 0) {
// Fail open.
// On the platforms that don't support the mem info file, the returned size will be 0.
return true;
}
if (freeMemSize - xmx < LOW_M... | @param xmx Xmx for the process
@return true if the system can satisfy the memory request
Given Xmx value (in kb) used by java process, determine if system can satisfy the memory
request. | canSystemGrantMemory | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/SystemMemoryInfo.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/SystemMemoryInfo.java | Apache-2.0 |
public boolean isFreePhysicalMemoryAbove(final long memKb) {
final long freeMemSize = this.util.getOsFreePhysicalMemorySize();
if (freeMemSize == 0) {
// Fail open.
// On the platforms that don't support the mem info file, the returned size will be 0.
return true;
}
return freeMemSize ... | @param memKb represents a memory value in kb
@return true if available physical memory is greater than memKb
Verifies if the currently available physical memory is greater than a given value. | isFreePhysicalMemoryAbove | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/SystemMemoryInfo.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/SystemMemoryInfo.java | Apache-2.0 |
public static String replaceLocalPathsWithStoragePaths(final File projectFolder,
String localJarSpec, final Props jobProps, final Logger log) {
File startupDependenciesFile = getStartupDependenciesFile(projectFolder);
String baseDependencyPath = jobProps.get(DEPENDENCY_STORAGE_ROOT_PATH_PROP);
if (!st... | Taking a string with comma seperated file paths of jars within a project folder, if the project has a
startup-dependencies.json file (therefore is from a thin archive) each file path will be compared against the
cached dependencies listed in startup-dependencies.json. If a match is found, the file path will be replaced... | replaceLocalPathsWithStoragePaths | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/ThinArchiveUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/ThinArchiveUtils.java | Apache-2.0 |
public static void validateDependencyHash(final DependencyFile f)
throws HashNotMatchException {
validateDependencyHash(f.getFile(), f);
} | Taking a string with comma seperated file paths of jars within a project folder, if the project has a
startup-dependencies.json file (therefore is from a thin archive) each file path will be compared against the
cached dependencies listed in startup-dependencies.json. If a match is found, the file path will be replaced... | validateDependencyHash | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/ThinArchiveUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/ThinArchiveUtils.java | Apache-2.0 |
public static void validateDependencyHash(final File f, final Dependency d)
throws HashNotMatchException {
try {
final byte[] actualFileHash = HashUtils.SHA1.getHashBytes(f);
if (!HashUtils.isSameHash(d.getSHA1(), actualFileHash)) {
throw new HashNotMatchException(String.format("SHA1 Depen... | Taking a string with comma seperated file paths of jars within a project folder, if the project has a
startup-dependencies.json file (therefore is from a thin archive) each file path will be compared against the
cached dependencies listed in startup-dependencies.json. If a match is found, the file path will be replaced... | validateDependencyHash | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/ThinArchiveUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/ThinArchiveUtils.java | Apache-2.0 |
public static Set<Dependency> filterNullFromDeps(Set<Dependency> dependencies) {
return dependencies.
stream().
filter(Objects::nonNull).
collect(Collectors.toSet());
} | Helper method to filer out null from the set containing Dependency objects.
Eg: If input set: {null, obj1, obj2 }, then output set: {obj1, obj2}
@param dependencies Set of Dependency objects from which null has to be filtered out.
@return Set of Dependency without any null in it. | filterNullFromDeps | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/ThinArchiveUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/ThinArchiveUtils.java | Apache-2.0 |
@Override
protected void beforeExecute(final Thread t, final Runnable r) {
try {
this.executingListener.beforeExecute(r);
} catch (final Throwable e) {
// to ensure the listener doesn't cause any issues
logger.warn("Listener threw exception", e);
}
super.beforeExecute(t, r);
this... | A simple subclass of {@link ThreadPoolExecutor} to keep track of in progress tasks as well as
other interesting statistics.
The content of this class is copied from article "Java theory and practice: Instrumenting
applications with JMX"
@author hluu | beforeExecute | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java | Apache-2.0 |
@Override
protected void afterExecute(final Runnable r, final Throwable t) {
final long time = System.currentTimeMillis() - this.startTime.get().longValue();
synchronized (this) {
this.totalTime += time;
++this.totalTasks;
}
this.inProgress.remove(r);
super.afterExecute(r, t);
try ... | A simple subclass of {@link ThreadPoolExecutor} to keep track of in progress tasks as well as
other interesting statistics.
The content of this class is copied from article "Java theory and practice: Instrumenting
applications with JMX"
@author hluu | afterExecute | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java | Apache-2.0 |
public Set<Runnable> getInProgressTasks() {
return Collections.unmodifiableSet(this.inProgress.keySet());
} | A simple subclass of {@link ThreadPoolExecutor} to keep track of in progress tasks as well as
other interesting statistics.
The content of this class is copied from article "Java theory and practice: Instrumenting
applications with JMX"
@author hluu | getInProgressTasks | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java | Apache-2.0 |
public synchronized int getTotalTasks() {
return this.totalTasks;
} | A simple subclass of {@link ThreadPoolExecutor} to keep track of in progress tasks as well as
other interesting statistics.
The content of this class is copied from article "Java theory and practice: Instrumenting
applications with JMX"
@author hluu | getTotalTasks | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java | Apache-2.0 |
public synchronized double getAverageTaskTime() {
return (this.totalTasks == 0) ? 0 : this.totalTime / this.totalTasks;
} | A simple subclass of {@link ThreadPoolExecutor} to keep track of in progress tasks as well as
other interesting statistics.
The content of this class is copied from article "Java theory and practice: Instrumenting
applications with JMX"
@author hluu | getAverageTaskTime | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java | Apache-2.0 |
@Override
public void beforeExecute(final Runnable r) {
} | A simple subclass of {@link ThreadPoolExecutor} to keep track of in progress tasks as well as
other interesting statistics.
The content of this class is copied from article "Java theory and practice: Instrumenting
applications with JMX"
@author hluu | beforeExecute | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java | Apache-2.0 |
@Override
public void afterExecute(final Runnable r) {
} | A simple subclass of {@link ThreadPoolExecutor} to keep track of in progress tasks as well as
other interesting statistics.
The content of this class is copied from article "Java theory and practice: Instrumenting
applications with JMX"
@author hluu | afterExecute | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java | Apache-2.0 |
public static List<ApplicationReport> getAllAliveAppReportsByExecID(final YarnClient yarnClient,
final String flowExecID, final Logger log)
throws IOException, YarnException {
// format: tagName:tagValue
Set<String> searchTags = ImmutableSet.of(AZKABAN_FLOW_EXEC_ID + ":" + flowExecID);
log.inf... | Use the yarnClient to query the unfinished yarn applications for 1 flow execution
@param yarnClient the yarnClient already connects to the cluster
@param flowExecID the azkaban flow execution id whose yarn applications needs to be killed
@return the set of all to-be-killed (alive) yarn applications' IDs
@throws IOExce... | getAllAliveAppReportsByExecID | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/YarnUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/YarnUtils.java | Apache-2.0 |
public static List<ApplicationReport> getAllAliveAppReportsByExecIDs(final YarnClient yarnClient,
final Set<Integer> flowExecIDs, final Logger log)
throws IOException, YarnException {
if (flowExecIDs.isEmpty()) {
return Collections.emptyList();
}
Set<String> searchTags = flowExecIDs.strea... | Use the yarnClient to query the unfinished yarn applications using a set of flow execution IDs
(the union of yarn applications tagged with any of the flow execution IDs) | getAllAliveAppReportsByExecIDs | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/YarnUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/YarnUtils.java | Apache-2.0 |
public static void killAllAppsOnCluster(YarnClient yarnClient, Set<String> applicationIDs,
Logger log) {
log.info(String.format("Killing applications: %s", applicationIDs));
ExecutorService executor = Executors.newSingleThreadExecutor();
for (final String appId : applicationIDs) {
Future<?> fut... | Uses YarnClient to kill the jobs one by one, each kill has a timeout | killAllAppsOnCluster | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/YarnUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/YarnUtils.java | Apache-2.0 |
@Override
public void run() {
try {
YarnUtils.killAppOnCluster(yarnClient, appId, log);
} catch (final Throwable t) {
log.warn("something happened while trying to kill this job: " + appId, t);
}
} | Uses YarnClient to kill the jobs one by one, each kill has a timeout | run | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/YarnUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/YarnUtils.java | Apache-2.0 |
public static void killAppOnCluster(final YarnClient yarnClient, final String applicationId,
final Logger log) throws YarnException, IOException {
final String[] split = applicationId.split("_");
final ApplicationId aid = ApplicationId.newInstance(Long.parseLong(split[1]),
Integer.parseInt(split[... | <pre>
Uses YarnClient to kill the job on the Hadoop Yarn Cluster.
Using JobClient only works partially:
If yarn container has started but spark job haven't, it will kill
If spark job has started, the cancel will hang until the spark job is complete
If the spark job is complete, it will return immediately, with a ... | killAppOnCluster | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/YarnUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/YarnUtils.java | Apache-2.0 |
public static void killApplicationAsProxyUser(Cluster cluster,
ApplicationReport app, final Logger log)
throws IOException, InterruptedException {
try {
UserGroupInformation proxyUser = UserGroupInformation.createProxyUser(
app.getUser(), UserGroupInformation.getLoginUser());
proxy... | <pre>
Uses YarnClient to kill the job on the Hadoop Yarn Cluster.
Using JobClient only works partially:
If yarn container has started but spark job haven't, it will kill
If spark job has started, the cancel will hang until the spark job is complete
If the spark job is complete, it will return immediately, with a ... | killApplicationAsProxyUser | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/YarnUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/YarnUtils.java | Apache-2.0 |
@Override
public Void run() throws Exception {
log.info("proxy as user: " + proxyUser);
for (Token<?> token : proxyUser.getTokens()) {
proxyUser.addToken(token);
log.info(String.format("proxyUser.token = %s, %s, %s ", token.getKind(),
token.getService... | <pre>
Uses YarnClient to kill the job on the Hadoop Yarn Cluster.
Using JobClient only works partially:
If yarn container has started but spark job haven't, it will kill
If spark job has started, the cancel will hang until the spark job is complete
If the spark job is complete, it will return immediately, with a ... | run | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/YarnUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/YarnUtils.java | Apache-2.0 |
public static YarnClient createYarnClient(Props props, Logger log) {
final YarnConfiguration yarnConf = new YarnConfiguration();
if (props.containsKey(YARN_CONF_DIRECTORY_PROPERTY)) {
log.info("Job yarn conf dir: " + props.get(YARN_CONF_DIRECTORY_PROPERTY));
yarnConf.addResource(
new Path(... | Create, initialize and start a YarnClient connecting to the Yarn Cluster (resource manager),
using the resources passed in with props.
@param props the properties to create a YarnClient, the path to the "yarn-site.xml" to be used
@param log | createYarnClient | java | azkaban/azkaban | azkaban-common/src/main/java/azkaban/utils/YarnUtils.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/utils/YarnUtils.java | Apache-2.0 |
public V1beta2VerticalPodAutoscaler apiVersion(String apiVersion) {
this.apiVersion = apiVersion;
return this;
} | VerticalPodAutoscaler is the configuration for a vertical pod autoscaler, which automatically manages pod resources based on historical and real time resource utilization. | apiVersion | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscaler.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscaler.java | Apache-2.0 |
@Override
@javax.annotation.Nullable
@ApiModelProperty(value = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-arch... | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
@return apiVersion | getApiVersion | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscaler.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscaler.java | Apache-2.0 |
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
} | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
@return apiVersion | setApiVersion | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscaler.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscaler.java | Apache-2.0 |
public V1beta2VerticalPodAutoscaler kind(String kind) {
this.kind = kind;
return this;
} | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
@return apiVersion | kind | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscaler.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscaler.java | Apache-2.0 |
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
} | Convert the given object to string with each line indented by 4 spaces
(except the first line). | toIndentedString | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscaler.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscaler.java | Apache-2.0 |
public V1beta2VerticalPodAutoscalerCheckpoint apiVersion(String apiVersion) {
this.apiVersion = apiVersion;
return this;
} | VerticalPodAutoscalerCheckpoint is the checkpoint of the internal state of VPA that is used for recovery after recommender's restart. | apiVersion | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpoint.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpoint.java | Apache-2.0 |
@Override
@javax.annotation.Nullable
@ApiModelProperty(value = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-arch... | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
@return apiVersion | getApiVersion | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpoint.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpoint.java | Apache-2.0 |
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
} | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
@return apiVersion | setApiVersion | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpoint.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpoint.java | Apache-2.0 |
public V1beta2VerticalPodAutoscalerCheckpoint kind(String kind) {
this.kind = kind;
return this;
} | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
@return apiVersion | kind | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpoint.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpoint.java | Apache-2.0 |
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
} | Convert the given object to string with each line indented by 4 spaces
(except the first line). | toIndentedString | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpoint.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpoint.java | Apache-2.0 |
@Override
@javax.annotation.Nullable
@ApiModelProperty(value = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-arch... | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
@return apiVersion | getApiVersion | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointList.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointList.java | Apache-2.0 |
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
} | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
@return apiVersion | setApiVersion | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointList.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointList.java | Apache-2.0 |
public V1beta2VerticalPodAutoscalerCheckpointList items(List<V1beta2VerticalPodAutoscalerCheckpoint> items) {
this.items = items;
return this;
} | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
@return apiVersion | items | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointList.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointList.java | Apache-2.0 |
public V1beta2VerticalPodAutoscalerCheckpointList addItemsItem(V1beta2VerticalPodAutoscalerCheckpoint itemsItem) {
this.items.add(itemsItem);
return this;
} | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
@return apiVersion | addItemsItem | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointList.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointList.java | Apache-2.0 |
@Override
@ApiModelProperty(required = true, value = "List of verticalpodautoscalercheckpoints. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md")
public List<V1beta2VerticalPodAutoscalerCheckpoint> getItems() {
return items;
} | List of verticalpodautoscalercheckpoints. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
@return items | getItems | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointList.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointList.java | Apache-2.0 |
public void setItems(List<V1beta2VerticalPodAutoscalerCheckpoint> items) {
this.items = items;
} | List of verticalpodautoscalercheckpoints. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
@return items | setItems | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointList.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointList.java | Apache-2.0 |
public V1beta2VerticalPodAutoscalerCheckpointList kind(String kind) {
this.kind = kind;
return this;
} | List of verticalpodautoscalercheckpoints. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
@return items | kind | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointList.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointList.java | Apache-2.0 |
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
} | Convert the given object to string with each line indented by 4 spaces
(except the first line). | toIndentedString | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointList.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointList.java | Apache-2.0 |
public V1beta2VerticalPodAutoscalerCheckpointSpec containerName(String containerName) {
this.containerName = containerName;
return this;
} | Specification of the checkpoint. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. | containerName | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | Apache-2.0 |
@javax.annotation.Nullable
@ApiModelProperty(value = "Name of the checkpointed container.")
public String getContainerName() {
return containerName;
} | Name of the checkpointed container.
@return containerName | getContainerName | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | Apache-2.0 |
public void setContainerName(String containerName) {
this.containerName = containerName;
} | Name of the checkpointed container.
@return containerName | setContainerName | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | Apache-2.0 |
public V1beta2VerticalPodAutoscalerCheckpointSpec vpaObjectName(String vpaObjectName) {
this.vpaObjectName = vpaObjectName;
return this;
} | Name of the checkpointed container.
@return containerName | vpaObjectName | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | Apache-2.0 |
@javax.annotation.Nullable
@ApiModelProperty(value = "Name of the VPA object that stored VerticalPodAutoscalerCheckpoint object.")
public String getVpaObjectName() {
return vpaObjectName;
} | Name of the VPA object that stored VerticalPodAutoscalerCheckpoint object.
@return vpaObjectName | getVpaObjectName | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | Apache-2.0 |
public void setVpaObjectName(String vpaObjectName) {
this.vpaObjectName = vpaObjectName;
} | Name of the VPA object that stored VerticalPodAutoscalerCheckpoint object.
@return vpaObjectName | setVpaObjectName | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | Apache-2.0 |
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1beta2VerticalPodAutoscalerCheckpointSpec v1beta2VerticalPodAutoscalerCheckpointSpec = (V1beta2VerticalPodAutoscalerCheckpointSpec) o;
return ... | Name of the VPA object that stored VerticalPodAutoscalerCheckpoint object.
@return vpaObjectName | equals | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | Apache-2.0 |
@Override
public int hashCode() {
return Objects.hash(containerName, vpaObjectName);
} | Name of the VPA object that stored VerticalPodAutoscalerCheckpoint object.
@return vpaObjectName | hashCode | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | Apache-2.0 |
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1beta2VerticalPodAutoscalerCheckpointSpec {\n");
sb.append(" containerName: ").append(toIndentedString(containerName)).append("\n");
sb.append(" vpaObjectName: ").append(toIndentedString(vpaObjectName)... | Name of the VPA object that stored VerticalPodAutoscalerCheckpoint object.
@return vpaObjectName | toString | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | Apache-2.0 |
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
} | Convert the given object to string with each line indented by 4 spaces
(except the first line). | toIndentedString | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointSpec.java | Apache-2.0 |
@javax.annotation.Nullable
@ApiModelProperty(value = "Timestamp of the fist sample from the histograms.")
public Object getFirstSampleStart() {
return firstSampleStart;
} | Timestamp of the fist sample from the histograms.
@return firstSampleStart | getFirstSampleStart | java | azkaban/azkaban | azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointStatus.java | https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/io/kubernetes/autoscaling/models/V1beta2VerticalPodAutoscalerCheckpointStatus.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.