id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
123,800 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/ContaineredTaskManagerParameters.java | ContaineredTaskManagerParameters.create | public static ContaineredTaskManagerParameters create(
Configuration config,
long containerMemoryMB,
int numSlots) {
// (1) try to compute how much memory used by container
final long cutoffMB = calculateCutoffMB(config, containerMemoryMB);
// (2) split the remaining Java memory between heap and off-hea... | java | public static ContaineredTaskManagerParameters create(
Configuration config,
long containerMemoryMB,
int numSlots) {
// (1) try to compute how much memory used by container
final long cutoffMB = calculateCutoffMB(config, containerMemoryMB);
// (2) split the remaining Java memory between heap and off-hea... | [
"public",
"static",
"ContaineredTaskManagerParameters",
"create",
"(",
"Configuration",
"config",
",",
"long",
"containerMemoryMB",
",",
"int",
"numSlots",
")",
"{",
"// (1) try to compute how much memory used by container",
"final",
"long",
"cutoffMB",
"=",
"calculateCutoffM... | Computes the parameters to be used to start a TaskManager Java process.
@param config The Flink configuration.
@param containerMemoryMB The size of the complete container, in megabytes.
@return The parameters to start the TaskManager processes with. | [
"Computes",
"the",
"parameters",
"to",
"be",
"used",
"to",
"start",
"a",
"TaskManager",
"Java",
"process",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/ContaineredTaskManagerParameters.java#L152-L179 |
123,801 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/functions/FunctionAnnotation.java | FunctionAnnotation.readSingleForwardAnnotations | @Internal
public static Set<Annotation> readSingleForwardAnnotations(Class<?> udfClass) {
ForwardedFields forwardedFields = udfClass.getAnnotation(ForwardedFields.class);
NonForwardedFields nonForwardedFields = udfClass.getAnnotation(NonForwardedFields.class);
ReadFields readSet = udfClass.getAnnotation(ReadFiel... | java | @Internal
public static Set<Annotation> readSingleForwardAnnotations(Class<?> udfClass) {
ForwardedFields forwardedFields = udfClass.getAnnotation(ForwardedFields.class);
NonForwardedFields nonForwardedFields = udfClass.getAnnotation(NonForwardedFields.class);
ReadFields readSet = udfClass.getAnnotation(ReadFiel... | [
"@",
"Internal",
"public",
"static",
"Set",
"<",
"Annotation",
">",
"readSingleForwardAnnotations",
"(",
"Class",
"<",
"?",
">",
"udfClass",
")",
"{",
"ForwardedFields",
"forwardedFields",
"=",
"udfClass",
".",
"getAnnotation",
"(",
"ForwardedFields",
".",
"class"... | Reads the annotations of a user defined function with one input and returns semantic properties according to the forwarded fields annotated.
@param udfClass The user defined function, represented by its class.
@return The DualInputSemanticProperties containing the forwarded fields. | [
"Reads",
"the",
"annotations",
"of",
"a",
"user",
"defined",
"function",
"with",
"one",
"input",
"and",
"returns",
"semantic",
"properties",
"according",
"to",
"the",
"forwarded",
"fields",
"annotated",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/functions/FunctionAnnotation.java#L411-L433 |
123,802 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/functions/FunctionAnnotation.java | FunctionAnnotation.readDualForwardAnnotations | @Internal
public static Set<Annotation> readDualForwardAnnotations(Class<?> udfClass) {
// get readSet annotation from stub
ForwardedFieldsFirst forwardedFields1 = udfClass.getAnnotation(ForwardedFieldsFirst.class);
ForwardedFieldsSecond forwardedFields2 = udfClass.getAnnotation(ForwardedFieldsSecond.class);
... | java | @Internal
public static Set<Annotation> readDualForwardAnnotations(Class<?> udfClass) {
// get readSet annotation from stub
ForwardedFieldsFirst forwardedFields1 = udfClass.getAnnotation(ForwardedFieldsFirst.class);
ForwardedFieldsSecond forwardedFields2 = udfClass.getAnnotation(ForwardedFieldsSecond.class);
... | [
"@",
"Internal",
"public",
"static",
"Set",
"<",
"Annotation",
">",
"readDualForwardAnnotations",
"(",
"Class",
"<",
"?",
">",
"udfClass",
")",
"{",
"// get readSet annotation from stub",
"ForwardedFieldsFirst",
"forwardedFields1",
"=",
"udfClass",
".",
"getAnnotation",... | Reads the annotations of a user defined function with two inputs and returns semantic properties according to the forwarded fields annotated.
@param udfClass The user defined function, represented by its class.
@return The DualInputSemanticProperties containing the forwarded fields. | [
"Reads",
"the",
"annotations",
"of",
"a",
"user",
"defined",
"function",
"with",
"two",
"inputs",
"and",
"returns",
"semantic",
"properties",
"according",
"to",
"the",
"forwarded",
"fields",
"annotated",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/functions/FunctionAnnotation.java#L441-L483 |
123,803 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java | BinaryString.blankString | public static BinaryString blankString(int length) {
byte[] spaces = new byte[length];
Arrays.fill(spaces, (byte) ' ');
return fromBytes(spaces);
} | java | public static BinaryString blankString(int length) {
byte[] spaces = new byte[length];
Arrays.fill(spaces, (byte) ' ');
return fromBytes(spaces);
} | [
"public",
"static",
"BinaryString",
"blankString",
"(",
"int",
"length",
")",
"{",
"byte",
"[",
"]",
"spaces",
"=",
"new",
"byte",
"[",
"length",
"]",
";",
"Arrays",
".",
"fill",
"(",
"spaces",
",",
"(",
"byte",
")",
"'",
"'",
")",
";",
"return",
"... | Creates an BinaryString that contains `length` spaces. | [
"Creates",
"an",
"BinaryString",
"that",
"contains",
"length",
"spaces",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L94-L98 |
123,804 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java | BinaryString.compareMultiSegments | private int compareMultiSegments(BinaryString other) {
if (sizeInBytes == 0 || other.sizeInBytes == 0) {
return sizeInBytes - other.sizeInBytes;
}
int len = Math.min(sizeInBytes, other.sizeInBytes);
MemorySegment seg1 = segments[0];
MemorySegment seg2 = other.segments[0];
int segmentSize = segments[0... | java | private int compareMultiSegments(BinaryString other) {
if (sizeInBytes == 0 || other.sizeInBytes == 0) {
return sizeInBytes - other.sizeInBytes;
}
int len = Math.min(sizeInBytes, other.sizeInBytes);
MemorySegment seg1 = segments[0];
MemorySegment seg2 = other.segments[0];
int segmentSize = segments[0... | [
"private",
"int",
"compareMultiSegments",
"(",
"BinaryString",
"other",
")",
"{",
"if",
"(",
"sizeInBytes",
"==",
"0",
"||",
"other",
".",
"sizeInBytes",
"==",
"0",
")",
"{",
"return",
"sizeInBytes",
"-",
"other",
".",
"sizeInBytes",
";",
"}",
"int",
"len"... | Find the boundaries of segments, and then compare MemorySegment. | [
"Find",
"the",
"boundaries",
"of",
"segments",
"and",
"then",
"compare",
"MemorySegment",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L260-L335 |
123,805 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java | BinaryString.concat | public static BinaryString concat(Iterable<BinaryString> inputs) {
// Compute the total length of the result.
int totalLength = 0;
for (BinaryString input : inputs) {
if (input != null) {
input.ensureMaterialized();
totalLength += input.getSizeInBytes();
}
}
// Allocate a new byte array, and co... | java | public static BinaryString concat(Iterable<BinaryString> inputs) {
// Compute the total length of the result.
int totalLength = 0;
for (BinaryString input : inputs) {
if (input != null) {
input.ensureMaterialized();
totalLength += input.getSizeInBytes();
}
}
// Allocate a new byte array, and co... | [
"public",
"static",
"BinaryString",
"concat",
"(",
"Iterable",
"<",
"BinaryString",
">",
"inputs",
")",
"{",
"// Compute the total length of the result.",
"int",
"totalLength",
"=",
"0",
";",
"for",
"(",
"BinaryString",
"input",
":",
"inputs",
")",
"{",
"if",
"(... | Concatenates input strings together into a single string. | [
"Concatenates",
"input",
"strings",
"together",
"into",
"a",
"single",
"string",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L467-L488 |
123,806 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java | BinaryString.contains | public boolean contains(final BinaryString substring) {
ensureMaterialized();
substring.ensureMaterialized();
if (substring.sizeInBytes == 0) {
return true;
}
int find = SegmentsUtil.find(
segments, offset, sizeInBytes,
substring.segments, substring.offset, substring.sizeInBytes);
return find != -1... | java | public boolean contains(final BinaryString substring) {
ensureMaterialized();
substring.ensureMaterialized();
if (substring.sizeInBytes == 0) {
return true;
}
int find = SegmentsUtil.find(
segments, offset, sizeInBytes,
substring.segments, substring.offset, substring.sizeInBytes);
return find != -1... | [
"public",
"boolean",
"contains",
"(",
"final",
"BinaryString",
"substring",
")",
"{",
"ensureMaterialized",
"(",
")",
";",
"substring",
".",
"ensureMaterialized",
"(",
")",
";",
"if",
"(",
"substring",
".",
"sizeInBytes",
"==",
"0",
")",
"{",
"return",
"true... | Returns whether this contains `substring` or not.
Same to like '%substring%'. | [
"Returns",
"whether",
"this",
"contains",
"substring",
"or",
"not",
".",
"Same",
"to",
"like",
"%substring%",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L550-L560 |
123,807 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java | BinaryString.endsWith | public boolean endsWith(final BinaryString suffix) {
ensureMaterialized();
suffix.ensureMaterialized();
return matchAt(suffix, sizeInBytes - suffix.sizeInBytes);
} | java | public boolean endsWith(final BinaryString suffix) {
ensureMaterialized();
suffix.ensureMaterialized();
return matchAt(suffix, sizeInBytes - suffix.sizeInBytes);
} | [
"public",
"boolean",
"endsWith",
"(",
"final",
"BinaryString",
"suffix",
")",
"{",
"ensureMaterialized",
"(",
")",
";",
"suffix",
".",
"ensureMaterialized",
"(",
")",
";",
"return",
"matchAt",
"(",
"suffix",
",",
"sizeInBytes",
"-",
"suffix",
".",
"sizeInBytes... | Same to like '%suffix'. | [
"Same",
"to",
"like",
"%suffix",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L574-L578 |
123,808 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java | BinaryString.trim | public BinaryString trim(BinaryString trimStr) {
if (trimStr == null) {
return null;
}
return trimLeft(trimStr).trimRight(trimStr);
} | java | public BinaryString trim(BinaryString trimStr) {
if (trimStr == null) {
return null;
}
return trimLeft(trimStr).trimRight(trimStr);
} | [
"public",
"BinaryString",
"trim",
"(",
"BinaryString",
"trimStr",
")",
"{",
"if",
"(",
"trimStr",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"trimLeft",
"(",
"trimStr",
")",
".",
"trimRight",
"(",
"trimStr",
")",
";",
"}"
] | Walk each character of current string from both ends, remove the character if it
is in trim string.
Return the new substring which both ends trim characters have been removed.
@param trimStr the trim string
@return A subString which both ends trim characters have been removed. | [
"Walk",
"each",
"character",
"of",
"current",
"string",
"from",
"both",
"ends",
"remove",
"the",
"character",
"if",
"it",
"is",
"in",
"trim",
"string",
".",
"Return",
"the",
"new",
"substring",
"which",
"both",
"ends",
"trim",
"characters",
"have",
"been",
... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L664-L669 |
123,809 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java | BinaryString.trimLeft | public BinaryString trimLeft(BinaryString trimStr) {
ensureMaterialized();
if (trimStr == null) {
return null;
}
trimStr.ensureMaterialized();
if (trimStr.isSpaceString()) {
return trimLeft();
}
if (inFirstSegment()) {
int searchIdx = 0;
while (searchIdx < this.sizeInBytes) {
int charBytes... | java | public BinaryString trimLeft(BinaryString trimStr) {
ensureMaterialized();
if (trimStr == null) {
return null;
}
trimStr.ensureMaterialized();
if (trimStr.isSpaceString()) {
return trimLeft();
}
if (inFirstSegment()) {
int searchIdx = 0;
while (searchIdx < this.sizeInBytes) {
int charBytes... | [
"public",
"BinaryString",
"trimLeft",
"(",
"BinaryString",
"trimStr",
")",
"{",
"ensureMaterialized",
"(",
")",
";",
"if",
"(",
"trimStr",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"trimStr",
".",
"ensureMaterialized",
"(",
")",
";",
"if",
"(",
... | Walk each character of current string from left end, remove the character if it
is in trim string. Stops at the first character which is not in trim string.
Return the new substring.
@param trimStr the trim string
@return A subString which removes all of the character from the left side that is in
trim string. | [
"Walk",
"each",
"character",
"of",
"current",
"string",
"from",
"left",
"end",
"remove",
"the",
"character",
"if",
"it",
"is",
"in",
"trim",
"string",
".",
"Stops",
"at",
"the",
"first",
"character",
"which",
"is",
"not",
"in",
"trim",
"string",
".",
"Re... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L716-L747 |
123,810 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java | BinaryString.trimRight | public BinaryString trimRight(BinaryString trimStr) {
ensureMaterialized();
if (trimStr == null) {
return null;
}
trimStr.ensureMaterialized();
if (trimStr.isSpaceString()) {
return trimRight();
}
if (inFirstSegment()) {
int charIdx = 0;
int byteIdx = 0;
// each element in charLens is lengt... | java | public BinaryString trimRight(BinaryString trimStr) {
ensureMaterialized();
if (trimStr == null) {
return null;
}
trimStr.ensureMaterialized();
if (trimStr.isSpaceString()) {
return trimRight();
}
if (inFirstSegment()) {
int charIdx = 0;
int byteIdx = 0;
// each element in charLens is lengt... | [
"public",
"BinaryString",
"trimRight",
"(",
"BinaryString",
"trimStr",
")",
"{",
"ensureMaterialized",
"(",
")",
";",
"if",
"(",
"trimStr",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"trimStr",
".",
"ensureMaterialized",
"(",
")",
";",
"if",
"(",
... | Walk each character of current string from right end, remove the character if it
is in trim string. Stops at the first character which is not in trim string.
Return the new substring.
@param trimStr the trim string
@return A subString which removes all of the character from the right side that is in
trim string. | [
"Walk",
"each",
"character",
"of",
"current",
"string",
"from",
"right",
"end",
"remove",
"the",
"character",
"if",
"it",
"is",
"in",
"trim",
"string",
".",
"Stops",
"at",
"the",
"first",
"character",
"which",
"is",
"not",
"in",
"trim",
"string",
".",
"R... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L818-L864 |
123,811 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java | BinaryString.indexOf | public int indexOf(BinaryString subStr, int start) {
ensureMaterialized();
subStr.ensureMaterialized();
if (subStr.sizeInBytes == 0) {
return 0;
}
if (inFirstSegment()) {
// position in byte
int byteIdx = 0;
// position is char
int charIdx = 0;
while (byteIdx < sizeInBytes && charIdx < start... | java | public int indexOf(BinaryString subStr, int start) {
ensureMaterialized();
subStr.ensureMaterialized();
if (subStr.sizeInBytes == 0) {
return 0;
}
if (inFirstSegment()) {
// position in byte
int byteIdx = 0;
// position is char
int charIdx = 0;
while (byteIdx < sizeInBytes && charIdx < start... | [
"public",
"int",
"indexOf",
"(",
"BinaryString",
"subStr",
",",
"int",
"start",
")",
"{",
"ensureMaterialized",
"(",
")",
";",
"subStr",
".",
"ensureMaterialized",
"(",
")",
";",
"if",
"(",
"subStr",
".",
"sizeInBytes",
"==",
"0",
")",
"{",
"return",
"0"... | Returns the position of the first occurence of substr in current string starting from given
position.
@param subStr subStr to be searched
@param start start position
@return the position of the first occurence of substring. Return -1 if not found. | [
"Returns",
"the",
"position",
"of",
"the",
"first",
"occurence",
"of",
"substr",
"in",
"current",
"string",
"starting",
"from",
"given",
"position",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L1045-L1076 |
123,812 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java | BinaryString.reverse | public BinaryString reverse() {
ensureMaterialized();
if (inFirstSegment()) {
byte[] result = new byte[this.sizeInBytes];
// position in byte
int byteIdx = 0;
while (byteIdx < sizeInBytes) {
int charBytes = numBytesForFirstByte(getByteOneSegment(byteIdx));
segments[0].get(
offset + byteIdx,... | java | public BinaryString reverse() {
ensureMaterialized();
if (inFirstSegment()) {
byte[] result = new byte[this.sizeInBytes];
// position in byte
int byteIdx = 0;
while (byteIdx < sizeInBytes) {
int charBytes = numBytesForFirstByte(getByteOneSegment(byteIdx));
segments[0].get(
offset + byteIdx,... | [
"public",
"BinaryString",
"reverse",
"(",
")",
"{",
"ensureMaterialized",
"(",
")",
";",
"if",
"(",
"inFirstSegment",
"(",
")",
")",
"{",
"byte",
"[",
"]",
"result",
"=",
"new",
"byte",
"[",
"this",
".",
"sizeInBytes",
"]",
";",
"// position in byte",
"i... | Reverse each character in current string.
@return a new string which character order is reverse to current string. | [
"Reverse",
"each",
"character",
"in",
"current",
"string",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L1113-L1132 |
123,813 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java | BinaryString.toLong | public Long toLong() {
ensureMaterialized();
if (sizeInBytes == 0) {
return null;
}
int size = segments[0].size();
SegmentAndOffset segmentAndOffset = startSegmentAndOffset(size);
int totalOffset = 0;
byte b = segmentAndOffset.value();
final boolean negative = b == '-';
if (negative || b == '+') {... | java | public Long toLong() {
ensureMaterialized();
if (sizeInBytes == 0) {
return null;
}
int size = segments[0].size();
SegmentAndOffset segmentAndOffset = startSegmentAndOffset(size);
int totalOffset = 0;
byte b = segmentAndOffset.value();
final boolean negative = b == '-';
if (negative || b == '+') {... | [
"public",
"Long",
"toLong",
"(",
")",
"{",
"ensureMaterialized",
"(",
")",
";",
"if",
"(",
"sizeInBytes",
"==",
"0",
")",
"{",
"return",
"null",
";",
"}",
"int",
"size",
"=",
"segments",
"[",
"0",
"]",
".",
"size",
"(",
")",
";",
"SegmentAndOffset",
... | Parses this BinaryString to Long.
<p>Note that, in this method we accumulate the result in negative format, and convert it to
positive format at the end, if this string is not started with '-'. This is because min value
is bigger than max value in digits, e.g. Long.MAX_VALUE is '9223372036854775807' and
Long.MIN_VALUE... | [
"Parses",
"this",
"BinaryString",
"to",
"Long",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L1261-L1338 |
123,814 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java | BinaryString.toUpperCase | public BinaryString toUpperCase() {
if (javaObject != null) {
return toUpperCaseSlow();
}
if (sizeInBytes == 0) {
return EMPTY_UTF8;
}
int size = segments[0].size();
SegmentAndOffset segmentAndOffset = startSegmentAndOffset(size);
byte[] bytes = new byte[sizeInBytes];
bytes[0] = (byte) Character.t... | java | public BinaryString toUpperCase() {
if (javaObject != null) {
return toUpperCaseSlow();
}
if (sizeInBytes == 0) {
return EMPTY_UTF8;
}
int size = segments[0].size();
SegmentAndOffset segmentAndOffset = startSegmentAndOffset(size);
byte[] bytes = new byte[sizeInBytes];
bytes[0] = (byte) Character.t... | [
"public",
"BinaryString",
"toUpperCase",
"(",
")",
"{",
"if",
"(",
"javaObject",
"!=",
"null",
")",
"{",
"return",
"toUpperCaseSlow",
"(",
")",
";",
"}",
"if",
"(",
"sizeInBytes",
"==",
"0",
")",
"{",
"return",
"EMPTY_UTF8",
";",
"}",
"int",
"size",
"=... | Returns the upper case of this string. | [
"Returns",
"the",
"upper",
"case",
"of",
"this",
"string",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L1661-L1687 |
123,815 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java | BinaryString.toLowerCase | public BinaryString toLowerCase() {
if (javaObject != null) {
return toLowerCaseSlow();
}
if (sizeInBytes == 0) {
return EMPTY_UTF8;
}
int size = segments[0].size();
SegmentAndOffset segmentAndOffset = startSegmentAndOffset(size);
byte[] bytes = new byte[sizeInBytes];
bytes[0] = (byte) Character.t... | java | public BinaryString toLowerCase() {
if (javaObject != null) {
return toLowerCaseSlow();
}
if (sizeInBytes == 0) {
return EMPTY_UTF8;
}
int size = segments[0].size();
SegmentAndOffset segmentAndOffset = startSegmentAndOffset(size);
byte[] bytes = new byte[sizeInBytes];
bytes[0] = (byte) Character.t... | [
"public",
"BinaryString",
"toLowerCase",
"(",
")",
"{",
"if",
"(",
"javaObject",
"!=",
"null",
")",
"{",
"return",
"toLowerCaseSlow",
"(",
")",
";",
"}",
"if",
"(",
"sizeInBytes",
"==",
"0",
")",
"{",
"return",
"EMPTY_UTF8",
";",
"}",
"int",
"size",
"=... | Returns the lower case of this string. | [
"Returns",
"the",
"lower",
"case",
"of",
"this",
"string",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L1696-L1722 |
123,816 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java | BinaryString.toBooleanSQL | public Boolean toBooleanSQL() {
if (TRUE_STRINGS.contains(toLowerCase())) {
return true;
} else if (FALSE_STRINGS.contains(toLowerCase())) {
return false;
} else {
return null;
}
} | java | public Boolean toBooleanSQL() {
if (TRUE_STRINGS.contains(toLowerCase())) {
return true;
} else if (FALSE_STRINGS.contains(toLowerCase())) {
return false;
} else {
return null;
}
} | [
"public",
"Boolean",
"toBooleanSQL",
"(",
")",
"{",
"if",
"(",
"TRUE_STRINGS",
".",
"contains",
"(",
"toLowerCase",
"(",
")",
")",
")",
"{",
"return",
"true",
";",
"}",
"else",
"if",
"(",
"FALSE_STRINGS",
".",
"contains",
"(",
"toLowerCase",
"(",
")",
... | Decide boolean representation of a string. | [
"Decide",
"boolean",
"representation",
"of",
"a",
"string",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L1830-L1838 |
123,817 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/SingleOutputStreamOperator.java | SingleOutputStreamOperator.setParallelism | public SingleOutputStreamOperator<T> setParallelism(int parallelism) {
Preconditions.checkArgument(canBeParallel() || parallelism == 1,
"The parallelism of non parallel operator must be 1.");
transformation.setParallelism(parallelism);
return this;
} | java | public SingleOutputStreamOperator<T> setParallelism(int parallelism) {
Preconditions.checkArgument(canBeParallel() || parallelism == 1,
"The parallelism of non parallel operator must be 1.");
transformation.setParallelism(parallelism);
return this;
} | [
"public",
"SingleOutputStreamOperator",
"<",
"T",
">",
"setParallelism",
"(",
"int",
"parallelism",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"canBeParallel",
"(",
")",
"||",
"parallelism",
"==",
"1",
",",
"\"The parallelism of non parallel operator must be ... | Sets the parallelism for this operator.
@param parallelism
The parallelism for this operator.
@return The operator with set parallelism. | [
"Sets",
"the",
"parallelism",
"for",
"this",
"operator",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/SingleOutputStreamOperator.java#L140-L147 |
123,818 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/SingleOutputStreamOperator.java | SingleOutputStreamOperator.setMaxParallelism | @PublicEvolving
public SingleOutputStreamOperator<T> setMaxParallelism(int maxParallelism) {
Preconditions.checkArgument(maxParallelism > 0,
"The maximum parallelism must be greater than 0.");
Preconditions.checkArgument(canBeParallel() || maxParallelism == 1,
"The maximum parallelism of non parallel oper... | java | @PublicEvolving
public SingleOutputStreamOperator<T> setMaxParallelism(int maxParallelism) {
Preconditions.checkArgument(maxParallelism > 0,
"The maximum parallelism must be greater than 0.");
Preconditions.checkArgument(canBeParallel() || maxParallelism == 1,
"The maximum parallelism of non parallel oper... | [
"@",
"PublicEvolving",
"public",
"SingleOutputStreamOperator",
"<",
"T",
">",
"setMaxParallelism",
"(",
"int",
"maxParallelism",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"maxParallelism",
">",
"0",
",",
"\"The maximum parallelism must be greater than 0.\"",
"... | Sets the maximum parallelism of this operator.
<p>The maximum parallelism specifies the upper bound for dynamic scaling. It also defines the
number of key groups used for partitioned state.
@param maxParallelism Maximum parallelism
@return The operator with set maximum parallelism | [
"Sets",
"the",
"maximum",
"parallelism",
"of",
"this",
"operator",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/SingleOutputStreamOperator.java#L158-L169 |
123,819 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/SingleOutputStreamOperator.java | SingleOutputStreamOperator.setResources | private SingleOutputStreamOperator<T> setResources(ResourceSpec resources) {
Preconditions.checkNotNull(resources, "The resources must be not null.");
Preconditions.checkArgument(resources.isValid(), "The values in resources must be not less than 0.");
transformation.setResources(resources, resources);
return... | java | private SingleOutputStreamOperator<T> setResources(ResourceSpec resources) {
Preconditions.checkNotNull(resources, "The resources must be not null.");
Preconditions.checkArgument(resources.isValid(), "The values in resources must be not less than 0.");
transformation.setResources(resources, resources);
return... | [
"private",
"SingleOutputStreamOperator",
"<",
"T",
">",
"setResources",
"(",
"ResourceSpec",
"resources",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"resources",
",",
"\"The resources must be not null.\"",
")",
";",
"Preconditions",
".",
"checkArgument",
"(",
... | Sets the resources for this operator, the minimum and preferred resources are the same by default.
@param resources The resources for this operator.
@return The operator with set minimum and preferred resources. | [
"Sets",
"the",
"resources",
"for",
"this",
"operator",
"the",
"minimum",
"and",
"preferred",
"resources",
"are",
"the",
"same",
"by",
"default",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/SingleOutputStreamOperator.java#L201-L208 |
123,820 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/SingleOutputStreamOperator.java | SingleOutputStreamOperator.forceNonParallel | @PublicEvolving
public SingleOutputStreamOperator<T> forceNonParallel() {
transformation.setParallelism(1);
transformation.setMaxParallelism(1);
nonParallel = true;
return this;
} | java | @PublicEvolving
public SingleOutputStreamOperator<T> forceNonParallel() {
transformation.setParallelism(1);
transformation.setMaxParallelism(1);
nonParallel = true;
return this;
} | [
"@",
"PublicEvolving",
"public",
"SingleOutputStreamOperator",
"<",
"T",
">",
"forceNonParallel",
"(",
")",
"{",
"transformation",
".",
"setParallelism",
"(",
"1",
")",
";",
"transformation",
".",
"setMaxParallelism",
"(",
"1",
")",
";",
"nonParallel",
"=",
"tru... | Sets the parallelism and maximum parallelism of this operator to one.
And mark this operator cannot set a non-1 degree of parallelism.
@return The operator with only one parallelism. | [
"Sets",
"the",
"parallelism",
"and",
"maximum",
"parallelism",
"of",
"this",
"operator",
"to",
"one",
".",
"And",
"mark",
"this",
"operator",
"cannot",
"set",
"a",
"non",
"-",
"1",
"degree",
"of",
"parallelism",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/SingleOutputStreamOperator.java#L220-L226 |
123,821 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashPartition.java | BinaryHashPartition.finalizeBuildPhase | int finalizeBuildPhase(IOManager ioAccess, FileIOChannel.Enumerator probeChannelEnumerator) throws IOException {
this.finalBufferLimit = this.buildSideWriteBuffer.getCurrentPositionInSegment();
this.partitionBuffers = this.buildSideWriteBuffer.close();
if (!isInMemory()) {
// close the channel.
this.buildS... | java | int finalizeBuildPhase(IOManager ioAccess, FileIOChannel.Enumerator probeChannelEnumerator) throws IOException {
this.finalBufferLimit = this.buildSideWriteBuffer.getCurrentPositionInSegment();
this.partitionBuffers = this.buildSideWriteBuffer.close();
if (!isInMemory()) {
// close the channel.
this.buildS... | [
"int",
"finalizeBuildPhase",
"(",
"IOManager",
"ioAccess",
",",
"FileIOChannel",
".",
"Enumerator",
"probeChannelEnumerator",
")",
"throws",
"IOException",
"{",
"this",
".",
"finalBufferLimit",
"=",
"this",
".",
"buildSideWriteBuffer",
".",
"getCurrentPositionInSegment",
... | After build phase.
@return build spill return buffer, if have spilled, it returns the current write buffer,
because it was used all the time in build phase, so it can only be returned at this time. | [
"After",
"build",
"phase",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashPartition.java#L332-L351 |
123,822 | apache/flink | flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/ExceptionProxy.java | ExceptionProxy.reportError | public void reportError(Throwable t) {
// set the exception, if it is the first (and the exception is non null)
if (t != null && exception.compareAndSet(null, t) && toInterrupt != null) {
toInterrupt.interrupt();
}
} | java | public void reportError(Throwable t) {
// set the exception, if it is the first (and the exception is non null)
if (t != null && exception.compareAndSet(null, t) && toInterrupt != null) {
toInterrupt.interrupt();
}
} | [
"public",
"void",
"reportError",
"(",
"Throwable",
"t",
")",
"{",
"// set the exception, if it is the first (and the exception is non null)",
"if",
"(",
"t",
"!=",
"null",
"&&",
"exception",
".",
"compareAndSet",
"(",
"null",
",",
"t",
")",
"&&",
"toInterrupt",
"!="... | Sets the exception and interrupts the target thread,
if no other exception has occurred so far.
<p>The exception is only set (and the interruption is only triggered),
if no other exception was set before.
@param t The exception that occurred | [
"Sets",
"the",
"exception",
"and",
"interrupts",
"the",
"target",
"thread",
"if",
"no",
"other",
"exception",
"has",
"occurred",
"so",
"far",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/ExceptionProxy.java#L102-L107 |
123,823 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/window/WindowOperator.java | WindowOperator.emitWindowResult | private void emitWindowResult(W window) throws Exception {
BaseRow aggResult = windowFunction.getWindowAggregationResult(window);
if (sendRetraction) {
previousState.setCurrentNamespace(window);
BaseRow previousAggResult = previousState.value();
// has emitted result for the window
if (previousAggResul... | java | private void emitWindowResult(W window) throws Exception {
BaseRow aggResult = windowFunction.getWindowAggregationResult(window);
if (sendRetraction) {
previousState.setCurrentNamespace(window);
BaseRow previousAggResult = previousState.value();
// has emitted result for the window
if (previousAggResul... | [
"private",
"void",
"emitWindowResult",
"(",
"W",
"window",
")",
"throws",
"Exception",
"{",
"BaseRow",
"aggResult",
"=",
"windowFunction",
".",
"getWindowAggregationResult",
"(",
"window",
")",
";",
"if",
"(",
"sendRetraction",
")",
"{",
"previousState",
".",
"s... | Emits the window result of the given window. | [
"Emits",
"the",
"window",
"result",
"of",
"the",
"given",
"window",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/window/WindowOperator.java#L428-L465 |
123,824 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/window/WindowOperator.java | WindowOperator.registerCleanupTimer | private void registerCleanupTimer(W window) {
long cleanupTime = cleanupTime(window);
if (cleanupTime == Long.MAX_VALUE) {
// don't set a GC timer for "end of time"
return;
}
if (windowAssigner.isEventTime()) {
triggerContext.registerEventTimeTimer(cleanupTime);
} else {
triggerContext.registerPr... | java | private void registerCleanupTimer(W window) {
long cleanupTime = cleanupTime(window);
if (cleanupTime == Long.MAX_VALUE) {
// don't set a GC timer for "end of time"
return;
}
if (windowAssigner.isEventTime()) {
triggerContext.registerEventTimeTimer(cleanupTime);
} else {
triggerContext.registerPr... | [
"private",
"void",
"registerCleanupTimer",
"(",
"W",
"window",
")",
"{",
"long",
"cleanupTime",
"=",
"cleanupTime",
"(",
"window",
")",
";",
"if",
"(",
"cleanupTime",
"==",
"Long",
".",
"MAX_VALUE",
")",
"{",
"// don't set a GC timer for \"end of time\"",
"return"... | Registers a timer to cleanup the content of the window.
@param window the window whose state to discard | [
"Registers",
"a",
"timer",
"to",
"cleanup",
"the",
"content",
"of",
"the",
"window",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/window/WindowOperator.java#L472-L484 |
123,825 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/operators/DataSink.java | DataSink.setParallelism | public DataSink<T> setParallelism(int parallelism) {
Preconditions.checkArgument(parallelism > 0 || parallelism == ExecutionConfig.PARALLELISM_DEFAULT,
"The parallelism of an operator must be at least 1.");
this.parallelism = parallelism;
return this;
} | java | public DataSink<T> setParallelism(int parallelism) {
Preconditions.checkArgument(parallelism > 0 || parallelism == ExecutionConfig.PARALLELISM_DEFAULT,
"The parallelism of an operator must be at least 1.");
this.parallelism = parallelism;
return this;
} | [
"public",
"DataSink",
"<",
"T",
">",
"setParallelism",
"(",
"int",
"parallelism",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"parallelism",
">",
"0",
"||",
"parallelism",
"==",
"ExecutionConfig",
".",
"PARALLELISM_DEFAULT",
",",
"\"The parallelism of an o... | Sets the parallelism for this data sink.
The degree must be 1 or more.
@param parallelism The parallelism for this data sink. A value equal to {@link ExecutionConfig#PARALLELISM_DEFAULT}
will use the system default.
@return This data sink with set parallelism. | [
"Sets",
"the",
"parallelism",
"for",
"this",
"data",
"sink",
".",
"The",
"degree",
"must",
"be",
"1",
"or",
"more",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/DataSink.java#L288-L295 |
123,826 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/operators/DataSink.java | DataSink.setResources | private DataSink<T> setResources(ResourceSpec minResources, ResourceSpec preferredResources) {
Preconditions.checkNotNull(minResources, "The min resources must be not null.");
Preconditions.checkNotNull(preferredResources, "The preferred resources must be not null.");
Preconditions.checkArgument(minResources.isVa... | java | private DataSink<T> setResources(ResourceSpec minResources, ResourceSpec preferredResources) {
Preconditions.checkNotNull(minResources, "The min resources must be not null.");
Preconditions.checkNotNull(preferredResources, "The preferred resources must be not null.");
Preconditions.checkArgument(minResources.isVa... | [
"private",
"DataSink",
"<",
"T",
">",
"setResources",
"(",
"ResourceSpec",
"minResources",
",",
"ResourceSpec",
"preferredResources",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"minResources",
",",
"\"The min resources must be not null.\"",
")",
";",
"Precondi... | Sets the minimum and preferred resources for this data sink. and the lower and upper resource limits
will be considered in resource resize feature for future plan.
@param minResources The minimum resources for this data sink.
@param preferredResources The preferred resources for this data sink.
@return The data sink w... | [
"Sets",
"the",
"minimum",
"and",
"preferred",
"resources",
"for",
"this",
"data",
"sink",
".",
"and",
"the",
"lower",
"and",
"upper",
"resource",
"limits",
"will",
"be",
"considered",
"in",
"resource",
"resize",
"feature",
"for",
"future",
"plan",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/DataSink.java#L332-L342 |
123,827 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/operators/DataSink.java | DataSink.setResources | private DataSink<T> setResources(ResourceSpec resources) {
Preconditions.checkNotNull(resources, "The resources must be not null.");
Preconditions.checkArgument(resources.isValid(), "The values in resources must be not less than 0.");
this.minResources = resources;
this.preferredResources = resources;
retur... | java | private DataSink<T> setResources(ResourceSpec resources) {
Preconditions.checkNotNull(resources, "The resources must be not null.");
Preconditions.checkArgument(resources.isValid(), "The values in resources must be not less than 0.");
this.minResources = resources;
this.preferredResources = resources;
retur... | [
"private",
"DataSink",
"<",
"T",
">",
"setResources",
"(",
"ResourceSpec",
"resources",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"resources",
",",
"\"The resources must be not null.\"",
")",
";",
"Preconditions",
".",
"checkArgument",
"(",
"resources",
"... | Sets the resources for this data sink, and the minimum and preferred resources are the same by default.
@param resources The resources for this data sink.
@return The data sink with set minimum and preferred resources. | [
"Sets",
"the",
"resources",
"for",
"this",
"data",
"sink",
"and",
"the",
"minimum",
"and",
"preferred",
"resources",
"are",
"the",
"same",
"by",
"default",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/DataSink.java#L350-L358 |
123,828 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/ReOpenableHashPartition.java | ReOpenableHashPartition.restorePartitionBuffers | void restorePartitionBuffers(IOManager ioManager, List<MemorySegment> availableMemory) throws IOException {
final BulkBlockChannelReader reader = ioManager.createBulkBlockChannelReader(this.initialBuildSideChannel,
availableMemory, this.initialPartitionBuffersCount);
reader.close();
final List<MemorySegment> ... | java | void restorePartitionBuffers(IOManager ioManager, List<MemorySegment> availableMemory) throws IOException {
final BulkBlockChannelReader reader = ioManager.createBulkBlockChannelReader(this.initialBuildSideChannel,
availableMemory, this.initialPartitionBuffersCount);
reader.close();
final List<MemorySegment> ... | [
"void",
"restorePartitionBuffers",
"(",
"IOManager",
"ioManager",
",",
"List",
"<",
"MemorySegment",
">",
"availableMemory",
")",
"throws",
"IOException",
"{",
"final",
"BulkBlockChannelReader",
"reader",
"=",
"ioManager",
".",
"createBulkBlockChannelReader",
"(",
"this... | This method is called every time a multi-match hash map is opened again for a new probe input.
@param ioManager
@param availableMemory
@throws IOException | [
"This",
"method",
"is",
"called",
"every",
"time",
"a",
"multi",
"-",
"match",
"hash",
"map",
"is",
"opened",
"again",
"for",
"a",
"new",
"probe",
"input",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/ReOpenableHashPartition.java#L124-L135 |
123,829 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/utils/RequiredParameters.java | RequiredParameters.add | public Option add(String name) throws RequiredParametersException {
if (!this.data.containsKey(name)) {
Option option = new Option(name);
this.data.put(name, option);
return option;
} else {
throw new RequiredParametersException("Option with key " + name + " already exists.");
}
} | java | public Option add(String name) throws RequiredParametersException {
if (!this.data.containsKey(name)) {
Option option = new Option(name);
this.data.put(name, option);
return option;
} else {
throw new RequiredParametersException("Option with key " + name + " already exists.");
}
} | [
"public",
"Option",
"add",
"(",
"String",
"name",
")",
"throws",
"RequiredParametersException",
"{",
"if",
"(",
"!",
"this",
".",
"data",
".",
"containsKey",
"(",
"name",
")",
")",
"{",
"Option",
"option",
"=",
"new",
"Option",
"(",
"name",
")",
";",
"... | Add a parameter based on its name.
@param name - the name of the parameter
@return - an {@link Option} object representing the parameter
@throws RequiredParametersException if an option with the same name is already defined | [
"Add",
"a",
"parameter",
"based",
"on",
"its",
"name",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/utils/RequiredParameters.java#L52-L60 |
123,830 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/utils/RequiredParameters.java | RequiredParameters.checkAndApplyDefaultValue | private void checkAndApplyDefaultValue(Option o, Map<String, String> data) throws RequiredParametersException {
if (hasNoDefaultValueAndNoValuePassedOnAlternativeName(o, data)) {
throw new RequiredParametersException("No default value for undefined parameter " + o.getName());
}
} | java | private void checkAndApplyDefaultValue(Option o, Map<String, String> data) throws RequiredParametersException {
if (hasNoDefaultValueAndNoValuePassedOnAlternativeName(o, data)) {
throw new RequiredParametersException("No default value for undefined parameter " + o.getName());
}
} | [
"private",
"void",
"checkAndApplyDefaultValue",
"(",
"Option",
"o",
",",
"Map",
"<",
"String",
",",
"String",
">",
"data",
")",
"throws",
"RequiredParametersException",
"{",
"if",
"(",
"hasNoDefaultValueAndNoValuePassedOnAlternativeName",
"(",
"o",
",",
"data",
")",... | else throw an exception | [
"else",
"throw",
"an",
"exception"
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/utils/RequiredParameters.java#L121-L125 |
123,831 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/utils/RequiredParameters.java | RequiredParameters.hasNoDefaultValueAndNoValuePassedOnAlternativeName | private boolean hasNoDefaultValueAndNoValuePassedOnAlternativeName(Option o, Map<String, String> data)
throws RequiredParametersException {
if (o.hasAlt() && data.containsKey(o.getAlt())) {
data.put(o.getName(), data.get(o.getAlt()));
} else {
if (o.hasDefaultValue()) {
data.put(o.getName(), o.getDefau... | java | private boolean hasNoDefaultValueAndNoValuePassedOnAlternativeName(Option o, Map<String, String> data)
throws RequiredParametersException {
if (o.hasAlt() && data.containsKey(o.getAlt())) {
data.put(o.getName(), data.get(o.getAlt()));
} else {
if (o.hasDefaultValue()) {
data.put(o.getName(), o.getDefau... | [
"private",
"boolean",
"hasNoDefaultValueAndNoValuePassedOnAlternativeName",
"(",
"Option",
"o",
",",
"Map",
"<",
"String",
",",
"String",
">",
"data",
")",
"throws",
"RequiredParametersException",
"{",
"if",
"(",
"o",
".",
"hasAlt",
"(",
")",
"&&",
"data",
".",
... | else return true to indicate parameter is 'really' missing | [
"else",
"return",
"true",
"to",
"indicate",
"parameter",
"is",
"really",
"missing"
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/utils/RequiredParameters.java#L147-L162 |
123,832 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/utils/RequiredParameters.java | RequiredParameters.getHelp | public String getHelp() {
StringBuilder sb = new StringBuilder(data.size() * HELP_TEXT_LENGTH_PER_PARAM);
sb.append("Required Parameters:");
sb.append(HELP_TEXT_LINE_DELIMITER);
for (Option o : data.values()) {
sb.append(this.helpText(o));
}
sb.append(HELP_TEXT_LINE_DELIMITER);
return sb.toString();... | java | public String getHelp() {
StringBuilder sb = new StringBuilder(data.size() * HELP_TEXT_LENGTH_PER_PARAM);
sb.append("Required Parameters:");
sb.append(HELP_TEXT_LINE_DELIMITER);
for (Option o : data.values()) {
sb.append(this.helpText(o));
}
sb.append(HELP_TEXT_LINE_DELIMITER);
return sb.toString();... | [
"public",
"String",
"getHelp",
"(",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"data",
".",
"size",
"(",
")",
"*",
"HELP_TEXT_LENGTH_PER_PARAM",
")",
";",
"sb",
".",
"append",
"(",
"\"Required Parameters:\"",
")",
";",
"sb",
".",
"a... | Build a help text for the defined parameters.
<p>The format of the help text will be:
Required Parameters:
\t -:shortName:, --:name: \t :helpText: \t default: :defaultValue: \t choices: :choices: \n
@return a formatted help String. | [
"Build",
"a",
"help",
"text",
"for",
"the",
"defined",
"parameters",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/utils/RequiredParameters.java#L182-L194 |
123,833 | apache/flink | flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/JaccardIndex.java | JaccardIndex.setGroupSize | public JaccardIndex<K, VV, EV> setGroupSize(int groupSize) {
Preconditions.checkArgument(groupSize > 0, "Group size must be greater than zero");
this.groupSize = groupSize;
return this;
} | java | public JaccardIndex<K, VV, EV> setGroupSize(int groupSize) {
Preconditions.checkArgument(groupSize > 0, "Group size must be greater than zero");
this.groupSize = groupSize;
return this;
} | [
"public",
"JaccardIndex",
"<",
"K",
",",
"VV",
",",
"EV",
">",
"setGroupSize",
"(",
"int",
"groupSize",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"groupSize",
">",
"0",
",",
"\"Group size must be greater than zero\"",
")",
";",
"this",
".",
"groupS... | Override the default group size for the quadratic expansion of neighbor
pairs. Small groups generate more data whereas large groups distribute
computation less evenly among tasks.
<p>The default value should be near-optimal for all use cases.
@param groupSize the group size for the quadratic expansion of neighbor pai... | [
"Override",
"the",
"default",
"group",
"size",
"for",
"the",
"quadratic",
"expansion",
"of",
"neighbor",
"pairs",
".",
"Small",
"groups",
"generate",
"more",
"data",
"whereas",
"large",
"groups",
"distribute",
"computation",
"less",
"evenly",
"among",
"tasks",
"... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/JaccardIndex.java#L95-L101 |
123,834 | apache/flink | flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/JaccardIndex.java | JaccardIndex.setMinimumScore | public JaccardIndex<K, VV, EV> setMinimumScore(int numerator, int denominator) {
Preconditions.checkArgument(numerator >= 0, "Minimum score numerator must be non-negative");
Preconditions.checkArgument(denominator > 0, "Minimum score denominator must be greater than zero");
Preconditions.checkArgument(numerator <... | java | public JaccardIndex<K, VV, EV> setMinimumScore(int numerator, int denominator) {
Preconditions.checkArgument(numerator >= 0, "Minimum score numerator must be non-negative");
Preconditions.checkArgument(denominator > 0, "Minimum score denominator must be greater than zero");
Preconditions.checkArgument(numerator <... | [
"public",
"JaccardIndex",
"<",
"K",
",",
"VV",
",",
"EV",
">",
"setMinimumScore",
"(",
"int",
"numerator",
",",
"int",
"denominator",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"numerator",
">=",
"0",
",",
"\"Minimum score numerator must be non-negative... | Filter out Jaccard Index scores less than the given minimum fraction.
@param numerator numerator of the minimum score
@param denominator denominator of the minimum score
@return this
@see #setMaximumScore(int, int) | [
"Filter",
"out",
"Jaccard",
"Index",
"scores",
"less",
"than",
"the",
"given",
"minimum",
"fraction",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/JaccardIndex.java#L111-L121 |
123,835 | apache/flink | flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/JaccardIndex.java | JaccardIndex.setMaximumScore | public JaccardIndex<K, VV, EV> setMaximumScore(int numerator, int denominator) {
Preconditions.checkArgument(numerator >= 0, "Maximum score numerator must be non-negative");
Preconditions.checkArgument(denominator > 0, "Maximum score denominator must be greater than zero");
Preconditions.checkArgument(numerator <... | java | public JaccardIndex<K, VV, EV> setMaximumScore(int numerator, int denominator) {
Preconditions.checkArgument(numerator >= 0, "Maximum score numerator must be non-negative");
Preconditions.checkArgument(denominator > 0, "Maximum score denominator must be greater than zero");
Preconditions.checkArgument(numerator <... | [
"public",
"JaccardIndex",
"<",
"K",
",",
"VV",
",",
"EV",
">",
"setMaximumScore",
"(",
"int",
"numerator",
",",
"int",
"denominator",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"numerator",
">=",
"0",
",",
"\"Maximum score numerator must be non-negative... | Filter out Jaccard Index scores greater than the given maximum fraction.
@param numerator numerator of the maximum score
@param denominator denominator of the maximum score
@return this
@see #setMinimumScore(int, int) | [
"Filter",
"out",
"Jaccard",
"Index",
"scores",
"greater",
"than",
"the",
"given",
"maximum",
"fraction",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/JaccardIndex.java#L131-L141 |
123,836 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/operators/DeltaIteration.java | DeltaIteration.closeWith | public DataSet<ST> closeWith(DataSet<ST> solutionSetDelta, DataSet<WT> newWorkset) {
return new DeltaIterationResultSet<ST, WT>(initialSolutionSet.getExecutionEnvironment(),
initialSolutionSet.getType(), initialWorkset.getType(), this, solutionSetDelta, newWorkset, keys, maxIterations);
} | java | public DataSet<ST> closeWith(DataSet<ST> solutionSetDelta, DataSet<WT> newWorkset) {
return new DeltaIterationResultSet<ST, WT>(initialSolutionSet.getExecutionEnvironment(),
initialSolutionSet.getType(), initialWorkset.getType(), this, solutionSetDelta, newWorkset, keys, maxIterations);
} | [
"public",
"DataSet",
"<",
"ST",
">",
"closeWith",
"(",
"DataSet",
"<",
"ST",
">",
"solutionSetDelta",
",",
"DataSet",
"<",
"WT",
">",
"newWorkset",
")",
"{",
"return",
"new",
"DeltaIterationResultSet",
"<",
"ST",
",",
"WT",
">",
"(",
"initialSolutionSet",
... | Closes the delta iteration. This method defines the end of the delta iteration's function.
@param solutionSetDelta The delta for the solution set. The delta will be merged into the solution set at the end of
each iteration.
@param newWorkset The new workset (feedback data set) that will be fed back to the next iterati... | [
"Closes",
"the",
"delta",
"iteration",
".",
"This",
"method",
"defines",
"the",
"end",
"of",
"the",
"delta",
"iteration",
"s",
"function",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/DeltaIteration.java#L94-L97 |
123,837 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/operators/DeltaIteration.java | DeltaIteration.parallelism | public DeltaIteration<ST, WT> parallelism(int parallelism) {
Preconditions.checkArgument(parallelism > 0 || parallelism == ExecutionConfig.PARALLELISM_DEFAULT,
"The parallelism must be positive, or ExecutionConfig.PARALLELISM_DEFAULT (use default).");
this.parallelism = parallelism;
return this;
} | java | public DeltaIteration<ST, WT> parallelism(int parallelism) {
Preconditions.checkArgument(parallelism > 0 || parallelism == ExecutionConfig.PARALLELISM_DEFAULT,
"The parallelism must be positive, or ExecutionConfig.PARALLELISM_DEFAULT (use default).");
this.parallelism = parallelism;
return this;
} | [
"public",
"DeltaIteration",
"<",
"ST",
",",
"WT",
">",
"parallelism",
"(",
"int",
"parallelism",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"parallelism",
">",
"0",
"||",
"parallelism",
"==",
"ExecutionConfig",
".",
"PARALLELISM_DEFAULT",
",",
"\"The ... | Sets the parallelism for the iteration.
@param parallelism The parallelism.
@return The iteration object, for function call chaining. | [
"Sets",
"the",
"parallelism",
"for",
"the",
"iteration",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/DeltaIteration.java#L184-L189 |
123,838 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/operators/DeltaIteration.java | DeltaIteration.setResources | private DeltaIteration<ST, WT> setResources(ResourceSpec minResources, ResourceSpec preferredResources) {
Preconditions.checkNotNull(minResources, "The min resources must be not null.");
Preconditions.checkNotNull(preferredResources, "The preferred resources must be not null.");
Preconditions.checkArgument(minRes... | java | private DeltaIteration<ST, WT> setResources(ResourceSpec minResources, ResourceSpec preferredResources) {
Preconditions.checkNotNull(minResources, "The min resources must be not null.");
Preconditions.checkNotNull(preferredResources, "The preferred resources must be not null.");
Preconditions.checkArgument(minRes... | [
"private",
"DeltaIteration",
"<",
"ST",
",",
"WT",
">",
"setResources",
"(",
"ResourceSpec",
"minResources",
",",
"ResourceSpec",
"preferredResources",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"minResources",
",",
"\"The min resources must be not null.\"",
"... | Sets the minimum and preferred resources for the iteration. This overrides the default resources.
The lower and upper resource limits will be considered in dynamic resource resize feature for future plan.
@param minResources The minimum resources for the iteration.
@param preferredResources The preferred resources for... | [
"Sets",
"the",
"minimum",
"and",
"preferred",
"resources",
"for",
"the",
"iteration",
".",
"This",
"overrides",
"the",
"default",
"resources",
".",
"The",
"lower",
"and",
"upper",
"resource",
"limits",
"will",
"be",
"considered",
"in",
"dynamic",
"resource",
"... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/DeltaIteration.java#L213-L223 |
123,839 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/operators/DeltaIteration.java | DeltaIteration.setResources | private DeltaIteration<ST, WT> setResources(ResourceSpec resources) {
Preconditions.checkNotNull(resources, "The resources must be not null.");
Preconditions.checkArgument(resources.isValid(), "The values in resources must be not less than 0.");
this.minResources = resources;
this.preferredResources = resource... | java | private DeltaIteration<ST, WT> setResources(ResourceSpec resources) {
Preconditions.checkNotNull(resources, "The resources must be not null.");
Preconditions.checkArgument(resources.isValid(), "The values in resources must be not less than 0.");
this.minResources = resources;
this.preferredResources = resource... | [
"private",
"DeltaIteration",
"<",
"ST",
",",
"WT",
">",
"setResources",
"(",
"ResourceSpec",
"resources",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"resources",
",",
"\"The resources must be not null.\"",
")",
";",
"Preconditions",
".",
"checkArgument",
"... | Sets the resources for the iteration, and the minimum and preferred resources are the same by default.
The lower and upper resource limits will be considered in dynamic resource resize feature for future plan.
@param resources The resources for the iteration.
@return The iteration with set minimum and preferred resour... | [
"Sets",
"the",
"resources",
"for",
"the",
"iteration",
"and",
"the",
"minimum",
"and",
"preferred",
"resources",
"are",
"the",
"same",
"by",
"default",
".",
"The",
"lower",
"and",
"upper",
"resource",
"limits",
"will",
"be",
"considered",
"in",
"dynamic",
"r... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/DeltaIteration.java#L232-L240 |
123,840 | apache/flink | flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/SimpleConsumerThread.java | SimpleConsumerThread.requestAndSetSpecificTimeOffsetsFromKafka | private static void requestAndSetSpecificTimeOffsetsFromKafka(
SimpleConsumer consumer,
List<KafkaTopicPartitionState<TopicAndPartition>> partitions,
long whichTime) throws IOException {
Map<TopicAndPartition, PartitionOffsetRequestInfo> requestInfo = new HashMap<>();
for (KafkaTopicPartitionState<TopicAnd... | java | private static void requestAndSetSpecificTimeOffsetsFromKafka(
SimpleConsumer consumer,
List<KafkaTopicPartitionState<TopicAndPartition>> partitions,
long whichTime) throws IOException {
Map<TopicAndPartition, PartitionOffsetRequestInfo> requestInfo = new HashMap<>();
for (KafkaTopicPartitionState<TopicAnd... | [
"private",
"static",
"void",
"requestAndSetSpecificTimeOffsetsFromKafka",
"(",
"SimpleConsumer",
"consumer",
",",
"List",
"<",
"KafkaTopicPartitionState",
"<",
"TopicAndPartition",
">",
">",
"partitions",
",",
"long",
"whichTime",
")",
"throws",
"IOException",
"{",
"Map... | Request offsets before a specific time for a set of partitions, via a Kafka consumer.
@param consumer The consumer connected to lead broker
@param partitions The list of partitions we need offsets for
@param whichTime The type of time we are requesting. -1 and -2 are special constants (See OffsetRequest) | [
"Request",
"offsets",
"before",
"a",
"specific",
"time",
"for",
"a",
"set",
"of",
"partitions",
"via",
"a",
"Kafka",
"consumer",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/SimpleConsumerThread.java#L442-L452 |
123,841 | apache/flink | flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/SimpleConsumerThread.java | SimpleConsumerThread.requestAndSetOffsetsFromKafka | private static void requestAndSetOffsetsFromKafka(
SimpleConsumer consumer,
List<KafkaTopicPartitionState<TopicAndPartition>> partitionStates,
Map<TopicAndPartition, PartitionOffsetRequestInfo> partitionToRequestInfo) throws IOException {
int retries = 0;
OffsetResponse response;
while (true) {
kafka.... | java | private static void requestAndSetOffsetsFromKafka(
SimpleConsumer consumer,
List<KafkaTopicPartitionState<TopicAndPartition>> partitionStates,
Map<TopicAndPartition, PartitionOffsetRequestInfo> partitionToRequestInfo) throws IOException {
int retries = 0;
OffsetResponse response;
while (true) {
kafka.... | [
"private",
"static",
"void",
"requestAndSetOffsetsFromKafka",
"(",
"SimpleConsumer",
"consumer",
",",
"List",
"<",
"KafkaTopicPartitionState",
"<",
"TopicAndPartition",
">",
">",
"partitionStates",
",",
"Map",
"<",
"TopicAndPartition",
",",
"PartitionOffsetRequestInfo",
"... | Request offsets from Kafka with a specified set of partition's offset request information.
The returned offsets are used to set the internal partition states.
<p>This method retries three times if the response has an error.
@param consumer The consumer connected to lead broker
@param partitionStates the partition sta... | [
"Request",
"offsets",
"from",
"Kafka",
"with",
"a",
"specified",
"set",
"of",
"partition",
"s",
"offset",
"request",
"information",
".",
"The",
"returned",
"offsets",
"are",
"used",
"to",
"set",
"the",
"internal",
"partition",
"states",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/SimpleConsumerThread.java#L484-L526 |
123,842 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java | FutureUtils.retry | public static <T> CompletableFuture<T> retry(
final Supplier<CompletableFuture<T>> operation,
final int retries,
final Executor executor) {
final CompletableFuture<T> resultFuture = new CompletableFuture<>();
retryOperation(resultFuture, operation, retries, executor);
return resultFuture;
} | java | public static <T> CompletableFuture<T> retry(
final Supplier<CompletableFuture<T>> operation,
final int retries,
final Executor executor) {
final CompletableFuture<T> resultFuture = new CompletableFuture<>();
retryOperation(resultFuture, operation, retries, executor);
return resultFuture;
} | [
"public",
"static",
"<",
"T",
">",
"CompletableFuture",
"<",
"T",
">",
"retry",
"(",
"final",
"Supplier",
"<",
"CompletableFuture",
"<",
"T",
">",
">",
"operation",
",",
"final",
"int",
"retries",
",",
"final",
"Executor",
"executor",
")",
"{",
"final",
... | Retry the given operation the given number of times in case of a failure.
@param operation to executed
@param retries if the operation failed
@param executor to use to run the futures
@param <T> type of the result
@return Future containing either the result of the operation or a {@link RetryException} | [
"Retry",
"the",
"given",
"operation",
"the",
"given",
"number",
"of",
"times",
"in",
"case",
"of",
"a",
"failure",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java#L76-L86 |
123,843 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java | FutureUtils.retryOperation | private static <T> void retryOperation(
final CompletableFuture<T> resultFuture,
final Supplier<CompletableFuture<T>> operation,
final int retries,
final Executor executor) {
if (!resultFuture.isDone()) {
final CompletableFuture<T> operationFuture = operation.get();
operationFuture.whenCompleteAsy... | java | private static <T> void retryOperation(
final CompletableFuture<T> resultFuture,
final Supplier<CompletableFuture<T>> operation,
final int retries,
final Executor executor) {
if (!resultFuture.isDone()) {
final CompletableFuture<T> operationFuture = operation.get();
operationFuture.whenCompleteAsy... | [
"private",
"static",
"<",
"T",
">",
"void",
"retryOperation",
"(",
"final",
"CompletableFuture",
"<",
"T",
">",
"resultFuture",
",",
"final",
"Supplier",
"<",
"CompletableFuture",
"<",
"T",
">",
">",
"operation",
",",
"final",
"int",
"retries",
",",
"final",... | Helper method which retries the provided operation in case of a failure.
@param resultFuture to complete
@param operation to retry
@param retries until giving up
@param executor to run the futures
@param <T> type of the future's result | [
"Helper",
"method",
"which",
"retries",
"the",
"provided",
"operation",
"in",
"case",
"of",
"a",
"failure",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java#L97-L132 |
123,844 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java | FutureUtils.retrySuccessfulWithDelay | public static <T> CompletableFuture<T> retrySuccessfulWithDelay(
final Supplier<CompletableFuture<T>> operation,
final Time retryDelay,
final Deadline deadline,
final Predicate<T> acceptancePredicate,
final ScheduledExecutor scheduledExecutor) {
final CompletableFuture<T> resultFuture = new CompletableFutu... | java | public static <T> CompletableFuture<T> retrySuccessfulWithDelay(
final Supplier<CompletableFuture<T>> operation,
final Time retryDelay,
final Deadline deadline,
final Predicate<T> acceptancePredicate,
final ScheduledExecutor scheduledExecutor) {
final CompletableFuture<T> resultFuture = new CompletableFutu... | [
"public",
"static",
"<",
"T",
">",
"CompletableFuture",
"<",
"T",
">",
"retrySuccessfulWithDelay",
"(",
"final",
"Supplier",
"<",
"CompletableFuture",
"<",
"T",
">",
">",
"operation",
",",
"final",
"Time",
"retryDelay",
",",
"final",
"Deadline",
"deadline",
",... | Retry the given operation with the given delay in between successful completions where the
result does not match a given predicate.
@param operation to retry
@param retryDelay delay between retries
@param deadline A deadline that specifies at what point we should stop retrying
@param acceptancePredicate Predicate to t... | [
"Retry",
"the",
"given",
"operation",
"with",
"the",
"given",
"delay",
"in",
"between",
"successful",
"completions",
"where",
"the",
"result",
"does",
"not",
"match",
"a",
"given",
"predicate",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java#L246-L264 |
123,845 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java | FutureUtils.composeAfterwards | public static CompletableFuture<Void> composeAfterwards(
CompletableFuture<?> future,
Supplier<CompletableFuture<?>> composedAction) {
final CompletableFuture<Void> resultFuture = new CompletableFuture<>();
future.whenComplete(
(Object outerIgnored, Throwable outerThrowable) -> {
final CompletableFutu... | java | public static CompletableFuture<Void> composeAfterwards(
CompletableFuture<?> future,
Supplier<CompletableFuture<?>> composedAction) {
final CompletableFuture<Void> resultFuture = new CompletableFuture<>();
future.whenComplete(
(Object outerIgnored, Throwable outerThrowable) -> {
final CompletableFutu... | [
"public",
"static",
"CompletableFuture",
"<",
"Void",
">",
"composeAfterwards",
"(",
"CompletableFuture",
"<",
"?",
">",
"future",
",",
"Supplier",
"<",
"CompletableFuture",
"<",
"?",
">",
">",
"composedAction",
")",
"{",
"final",
"CompletableFuture",
"<",
"Void... | Run the given asynchronous action after the completion of the given future. The given future can be
completed normally or exceptionally. In case of an exceptional completion, the
asynchronous action's exception will be added to the initial exception.
@param future to wait for its completion
@param composedAction async... | [
"Run",
"the",
"given",
"asynchronous",
"action",
"after",
"the",
"completion",
"of",
"the",
"given",
"future",
".",
"The",
"given",
"future",
"can",
"be",
"completed",
"normally",
"or",
"exceptionally",
".",
"In",
"case",
"of",
"an",
"exceptional",
"completion... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java#L471-L493 |
123,846 | apache/flink | flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/statemachine/kafka/KafkaStandaloneGenerator.java | KafkaStandaloneGenerator.main | public static void main(String[] args) throws Exception {
final KafkaCollector[] collectors = new KafkaCollector[NUM_PARTITIONS];
// create the generator threads
for (int i = 0; i < collectors.length; i++) {
collectors[i] = new KafkaCollector(BROKER_ADDRESS, TOPIC, i);
}
StandaloneThreadedGenerator.runG... | java | public static void main(String[] args) throws Exception {
final KafkaCollector[] collectors = new KafkaCollector[NUM_PARTITIONS];
// create the generator threads
for (int i = 0; i < collectors.length; i++) {
collectors[i] = new KafkaCollector(BROKER_ADDRESS, TOPIC, i);
}
StandaloneThreadedGenerator.runG... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"throws",
"Exception",
"{",
"final",
"KafkaCollector",
"[",
"]",
"collectors",
"=",
"new",
"KafkaCollector",
"[",
"NUM_PARTITIONS",
"]",
";",
"// create the generator threads",
"for",
"(",... | Entry point to the kafka data producer. | [
"Entry",
"point",
"to",
"the",
"kafka",
"data",
"producer",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/statemachine/kafka/KafkaStandaloneGenerator.java#L48-L58 |
123,847 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java | SlotPoolImpl.suspend | @Override
public void suspend() {
componentMainThreadExecutor.assertRunningInMainThread();
log.info("Suspending SlotPool.");
// cancel all pending allocations --> we can request these slots
// again after we regained the leadership
Set<AllocationID> allocationIds = pendingRequests.keySetB();
for (Alloc... | java | @Override
public void suspend() {
componentMainThreadExecutor.assertRunningInMainThread();
log.info("Suspending SlotPool.");
// cancel all pending allocations --> we can request these slots
// again after we regained the leadership
Set<AllocationID> allocationIds = pendingRequests.keySetB();
for (Alloc... | [
"@",
"Override",
"public",
"void",
"suspend",
"(",
")",
"{",
"componentMainThreadExecutor",
".",
"assertRunningInMainThread",
"(",
")",
";",
"log",
".",
"info",
"(",
"\"Suspending SlotPool.\"",
")",
";",
"// cancel all pending allocations --> we can request these slots",
... | Suspends this pool, meaning it has lost its authority to accept and distribute slots. | [
"Suspends",
"this",
"pool",
"meaning",
"it",
"has",
"lost",
"its",
"authority",
"to",
"accept",
"and",
"distribute",
"slots",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java#L192-L214 |
123,848 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java | SlotPoolImpl.removePendingRequest | @Nullable
private PendingRequest removePendingRequest(SlotRequestId requestId) {
PendingRequest result = waitingForResourceManager.remove(requestId);
if (result != null) {
// sanity check
assert !pendingRequests.containsKeyA(requestId) : "A pending requests should only be part of either " +
"the pending... | java | @Nullable
private PendingRequest removePendingRequest(SlotRequestId requestId) {
PendingRequest result = waitingForResourceManager.remove(requestId);
if (result != null) {
// sanity check
assert !pendingRequests.containsKeyA(requestId) : "A pending requests should only be part of either " +
"the pending... | [
"@",
"Nullable",
"private",
"PendingRequest",
"removePendingRequest",
"(",
"SlotRequestId",
"requestId",
")",
"{",
"PendingRequest",
"result",
"=",
"waitingForResourceManager",
".",
"remove",
"(",
"requestId",
")",
";",
"if",
"(",
"result",
"!=",
"null",
")",
"{",... | Checks whether there exists a pending request with the given slot request id and removes it
from the internal data structures.
@param requestId identifying the pending request
@return pending request if there is one, otherwise null | [
"Checks",
"whether",
"there",
"exists",
"a",
"pending",
"request",
"with",
"the",
"given",
"slot",
"request",
"id",
"and",
"removes",
"it",
"from",
"the",
"internal",
"data",
"structures",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java#L435-L448 |
123,849 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java | SlotPoolImpl.tryFulfillSlotRequestOrMakeAvailable | private void tryFulfillSlotRequestOrMakeAvailable(AllocatedSlot allocatedSlot) {
Preconditions.checkState(!allocatedSlot.isUsed(), "Provided slot is still in use.");
final PendingRequest pendingRequest = pollMatchingPendingRequest(allocatedSlot);
if (pendingRequest != null) {
log.debug("Fulfilling pending sl... | java | private void tryFulfillSlotRequestOrMakeAvailable(AllocatedSlot allocatedSlot) {
Preconditions.checkState(!allocatedSlot.isUsed(), "Provided slot is still in use.");
final PendingRequest pendingRequest = pollMatchingPendingRequest(allocatedSlot);
if (pendingRequest != null) {
log.debug("Fulfilling pending sl... | [
"private",
"void",
"tryFulfillSlotRequestOrMakeAvailable",
"(",
"AllocatedSlot",
"allocatedSlot",
")",
"{",
"Preconditions",
".",
"checkState",
"(",
"!",
"allocatedSlot",
".",
"isUsed",
"(",
")",
",",
"\"Provided slot is still in use.\"",
")",
";",
"final",
"PendingRequ... | Tries to fulfill with the given allocated slot a pending slot request or add the
allocated slot to the set of available slots if no matching request is available.
@param allocatedSlot which shall be returned | [
"Tries",
"to",
"fulfill",
"with",
"the",
"given",
"allocated",
"slot",
"a",
"pending",
"slot",
"request",
"or",
"add",
"the",
"allocated",
"slot",
"to",
"the",
"set",
"of",
"available",
"slots",
"if",
"no",
"matching",
"request",
"is",
"available",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java#L466-L481 |
123,850 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java | SlotPoolImpl.failAllocation | @Override
public Optional<ResourceID> failAllocation(final AllocationID allocationID, final Exception cause) {
componentMainThreadExecutor.assertRunningInMainThread();
final PendingRequest pendingRequest = pendingRequests.removeKeyB(allocationID);
if (pendingRequest != null) {
// request was still pending
... | java | @Override
public Optional<ResourceID> failAllocation(final AllocationID allocationID, final Exception cause) {
componentMainThreadExecutor.assertRunningInMainThread();
final PendingRequest pendingRequest = pendingRequests.removeKeyB(allocationID);
if (pendingRequest != null) {
// request was still pending
... | [
"@",
"Override",
"public",
"Optional",
"<",
"ResourceID",
">",
"failAllocation",
"(",
"final",
"AllocationID",
"allocationID",
",",
"final",
"Exception",
"cause",
")",
"{",
"componentMainThreadExecutor",
".",
"assertRunningInMainThread",
"(",
")",
";",
"final",
"Pen... | Fail the specified allocation and release the corresponding slot if we have one.
This may triggered by JobManager when some slot allocation failed with rpcTimeout.
Or this could be triggered by TaskManager, when it finds out something went wrong with the slot,
and decided to take it back.
@param allocationID Represent... | [
"Fail",
"the",
"specified",
"allocation",
"and",
"release",
"the",
"corresponding",
"slot",
"if",
"we",
"have",
"one",
".",
"This",
"may",
"triggered",
"by",
"JobManager",
"when",
"some",
"slot",
"allocation",
"failed",
"with",
"rpcTimeout",
".",
"Or",
"this",... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java#L635-L651 |
123,851 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java | SlotPoolImpl.registerTaskManager | @Override
public boolean registerTaskManager(final ResourceID resourceID) {
componentMainThreadExecutor.assertRunningInMainThread();
log.debug("Register new TaskExecutor {}.", resourceID);
return registeredTaskManagers.add(resourceID);
} | java | @Override
public boolean registerTaskManager(final ResourceID resourceID) {
componentMainThreadExecutor.assertRunningInMainThread();
log.debug("Register new TaskExecutor {}.", resourceID);
return registeredTaskManagers.add(resourceID);
} | [
"@",
"Override",
"public",
"boolean",
"registerTaskManager",
"(",
"final",
"ResourceID",
"resourceID",
")",
"{",
"componentMainThreadExecutor",
".",
"assertRunningInMainThread",
"(",
")",
";",
"log",
".",
"debug",
"(",
"\"Register new TaskExecutor {}.\"",
",",
"resource... | Register TaskManager to this pool, only those slots come from registered TaskManager will be considered valid.
Also it provides a way for us to keep "dead" or "abnormal" TaskManagers out of this pool.
@param resourceID The id of the TaskManager | [
"Register",
"TaskManager",
"to",
"this",
"pool",
"only",
"those",
"slots",
"come",
"from",
"registered",
"TaskManager",
"will",
"be",
"considered",
"valid",
".",
"Also",
"it",
"provides",
"a",
"way",
"for",
"us",
"to",
"keep",
"dead",
"or",
"abnormal",
"Task... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java#L689-L696 |
123,852 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java | SlotPoolImpl.releaseTaskManager | @Override
public boolean releaseTaskManager(final ResourceID resourceId, final Exception cause) {
componentMainThreadExecutor.assertRunningInMainThread();
if (registeredTaskManagers.remove(resourceId)) {
releaseTaskManagerInternal(resourceId, cause);
return true;
} else {
return false;
}
} | java | @Override
public boolean releaseTaskManager(final ResourceID resourceId, final Exception cause) {
componentMainThreadExecutor.assertRunningInMainThread();
if (registeredTaskManagers.remove(resourceId)) {
releaseTaskManagerInternal(resourceId, cause);
return true;
} else {
return false;
}
} | [
"@",
"Override",
"public",
"boolean",
"releaseTaskManager",
"(",
"final",
"ResourceID",
"resourceId",
",",
"final",
"Exception",
"cause",
")",
"{",
"componentMainThreadExecutor",
".",
"assertRunningInMainThread",
"(",
")",
";",
"if",
"(",
"registeredTaskManagers",
"."... | Unregister TaskManager from this pool, all the related slots will be released and tasks be canceled. Called
when we find some TaskManager becomes "dead" or "abnormal", and we decide to not using slots from it anymore.
@param resourceId The id of the TaskManager
@param cause for the releasing of the TaskManager | [
"Unregister",
"TaskManager",
"from",
"this",
"pool",
"all",
"the",
"related",
"slots",
"will",
"be",
"released",
"and",
"tasks",
"be",
"canceled",
".",
"Called",
"when",
"we",
"find",
"some",
"TaskManager",
"becomes",
"dead",
"or",
"abnormal",
"and",
"we",
"... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java#L705-L716 |
123,853 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java | SlotPoolImpl.checkIdleSlot | private void checkIdleSlot() {
// The timestamp in SlotAndTimestamp is relative
final long currentRelativeTimeMillis = clock.relativeTimeMillis();
final List<AllocatedSlot> expiredSlots = new ArrayList<>(availableSlots.size());
for (SlotAndTimestamp slotAndTimestamp : availableSlots.availableSlots.values()) ... | java | private void checkIdleSlot() {
// The timestamp in SlotAndTimestamp is relative
final long currentRelativeTimeMillis = clock.relativeTimeMillis();
final List<AllocatedSlot> expiredSlots = new ArrayList<>(availableSlots.size());
for (SlotAndTimestamp slotAndTimestamp : availableSlots.availableSlots.values()) ... | [
"private",
"void",
"checkIdleSlot",
"(",
")",
"{",
"// The timestamp in SlotAndTimestamp is relative",
"final",
"long",
"currentRelativeTimeMillis",
"=",
"clock",
".",
"relativeTimeMillis",
"(",
")",
";",
"final",
"List",
"<",
"AllocatedSlot",
">",
"expiredSlots",
"=",
... | Check the available slots, release the slot that is idle for a long time. | [
"Check",
"the",
"available",
"slots",
"release",
"the",
"slot",
"that",
"is",
"idle",
"for",
"a",
"long",
"time",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java#L746-L791 |
123,854 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java | SlotPoolImpl.clear | private void clear() {
availableSlots.clear();
allocatedSlots.clear();
pendingRequests.clear();
waitingForResourceManager.clear();
registeredTaskManagers.clear();
} | java | private void clear() {
availableSlots.clear();
allocatedSlots.clear();
pendingRequests.clear();
waitingForResourceManager.clear();
registeredTaskManagers.clear();
} | [
"private",
"void",
"clear",
"(",
")",
"{",
"availableSlots",
".",
"clear",
"(",
")",
";",
"allocatedSlots",
".",
"clear",
"(",
")",
";",
"pendingRequests",
".",
"clear",
"(",
")",
";",
"waitingForResourceManager",
".",
"clear",
"(",
")",
";",
"registeredTa... | Clear the internal state of the SlotPool. | [
"Clear",
"the",
"internal",
"state",
"of",
"the",
"SlotPool",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java#L796-L802 |
123,855 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistryImpl.java | MetricRegistryImpl.startQueryService | public void startQueryService(RpcService rpcService, ResourceID resourceID) {
synchronized (lock) {
Preconditions.checkState(!isShutdown(), "The metric registry has already been shut down.");
try {
metricQueryServiceRpcService = rpcService;
queryService = MetricQueryService.createMetricQueryService(rpc... | java | public void startQueryService(RpcService rpcService, ResourceID resourceID) {
synchronized (lock) {
Preconditions.checkState(!isShutdown(), "The metric registry has already been shut down.");
try {
metricQueryServiceRpcService = rpcService;
queryService = MetricQueryService.createMetricQueryService(rpc... | [
"public",
"void",
"startQueryService",
"(",
"RpcService",
"rpcService",
",",
"ResourceID",
"resourceID",
")",
"{",
"synchronized",
"(",
"lock",
")",
"{",
"Preconditions",
".",
"checkState",
"(",
"!",
"isShutdown",
"(",
")",
",",
"\"The metric registry has already be... | Initializes the MetricQueryService.
@param rpcService RpcService to create the MetricQueryService on
@param resourceID resource ID used to disambiguate the actor name | [
"Initializes",
"the",
"MetricQueryService",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistryImpl.java#L170-L182 |
123,856 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServices.java | TaskManagerServices.fromConfiguration | public static TaskManagerServices fromConfiguration(
TaskManagerServicesConfiguration taskManagerServicesConfiguration,
TaskManagerMetricGroup taskManagerMetricGroup,
ResourceID resourceID,
Executor taskIOExecutor,
long freeHeapMemoryWithDefrag,
long maxJvmHeapMemory) throws Exception {
// pre-star... | java | public static TaskManagerServices fromConfiguration(
TaskManagerServicesConfiguration taskManagerServicesConfiguration,
TaskManagerMetricGroup taskManagerMetricGroup,
ResourceID resourceID,
Executor taskIOExecutor,
long freeHeapMemoryWithDefrag,
long maxJvmHeapMemory) throws Exception {
// pre-star... | [
"public",
"static",
"TaskManagerServices",
"fromConfiguration",
"(",
"TaskManagerServicesConfiguration",
"taskManagerServicesConfiguration",
",",
"TaskManagerMetricGroup",
"taskManagerMetricGroup",
",",
"ResourceID",
"resourceID",
",",
"Executor",
"taskIOExecutor",
",",
"long",
"... | Creates and returns the task manager services.
@param taskManagerServicesConfiguration task manager configuration
@param taskManagerMetricGroup metric group of the task manager
@param resourceID resource ID of the task manager
@param taskIOExecutor executor for async IO operations
@param freeHeapMemoryWithDefrag an es... | [
"Creates",
"and",
"returns",
"the",
"task",
"manager",
"services",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServices.java#L233-L307 |
123,857 | apache/flink | flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/TableFactoryUtil.java | TableFactoryUtil.findAndCreateExternalCatalog | public static ExternalCatalog findAndCreateExternalCatalog(Descriptor descriptor) {
Map<String, String> properties = descriptor.toProperties();
return TableFactoryService
.find(ExternalCatalogFactory.class, properties)
.createExternalCatalog(properties);
} | java | public static ExternalCatalog findAndCreateExternalCatalog(Descriptor descriptor) {
Map<String, String> properties = descriptor.toProperties();
return TableFactoryService
.find(ExternalCatalogFactory.class, properties)
.createExternalCatalog(properties);
} | [
"public",
"static",
"ExternalCatalog",
"findAndCreateExternalCatalog",
"(",
"Descriptor",
"descriptor",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"properties",
"=",
"descriptor",
".",
"toProperties",
"(",
")",
";",
"return",
"TableFactoryService",
".",
"... | Returns an external catalog. | [
"Returns",
"an",
"external",
"catalog",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/TableFactoryUtil.java#L37-L42 |
123,858 | apache/flink | flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/TableFactoryUtil.java | TableFactoryUtil.findAndCreateTableSource | public static <T> TableSource<T> findAndCreateTableSource(Descriptor descriptor) {
Map<String, String> properties = descriptor.toProperties();
TableSource tableSource;
try {
tableSource = TableFactoryService
.find(TableSourceFactory.class, properties)
.createTableSource(properties);
} catch (Throwab... | java | public static <T> TableSource<T> findAndCreateTableSource(Descriptor descriptor) {
Map<String, String> properties = descriptor.toProperties();
TableSource tableSource;
try {
tableSource = TableFactoryService
.find(TableSourceFactory.class, properties)
.createTableSource(properties);
} catch (Throwab... | [
"public",
"static",
"<",
"T",
">",
"TableSource",
"<",
"T",
">",
"findAndCreateTableSource",
"(",
"Descriptor",
"descriptor",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"properties",
"=",
"descriptor",
".",
"toProperties",
"(",
")",
";",
"TableSourc... | Returns a table source matching the descriptor. | [
"Returns",
"a",
"table",
"source",
"matching",
"the",
"descriptor",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/TableFactoryUtil.java#L47-L60 |
123,859 | apache/flink | flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/TableFactoryUtil.java | TableFactoryUtil.findAndCreateTableSink | public static <T> TableSink<T> findAndCreateTableSink(Descriptor descriptor) {
Map<String, String> properties = descriptor.toProperties();
TableSink tableSink;
try {
tableSink = TableFactoryService
.find(TableSinkFactory.class, properties)
.createTableSink(properties);
} catch (Throwable t) {
thr... | java | public static <T> TableSink<T> findAndCreateTableSink(Descriptor descriptor) {
Map<String, String> properties = descriptor.toProperties();
TableSink tableSink;
try {
tableSink = TableFactoryService
.find(TableSinkFactory.class, properties)
.createTableSink(properties);
} catch (Throwable t) {
thr... | [
"public",
"static",
"<",
"T",
">",
"TableSink",
"<",
"T",
">",
"findAndCreateTableSink",
"(",
"Descriptor",
"descriptor",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"properties",
"=",
"descriptor",
".",
"toProperties",
"(",
")",
";",
"TableSink",
... | Returns a table sink matching the descriptor. | [
"Returns",
"a",
"table",
"sink",
"matching",
"the",
"descriptor",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/TableFactoryUtil.java#L65-L78 |
123,860 | apache/flink | flink-core/src/main/java/org/apache/flink/api/common/operators/AbstractUdfOperator.java | AbstractUdfOperator.setBroadcastVariables | public <T> void setBroadcastVariables(Map<String, Operator<T>> inputs) {
this.broadcastInputs.clear();
this.broadcastInputs.putAll(inputs);
} | java | public <T> void setBroadcastVariables(Map<String, Operator<T>> inputs) {
this.broadcastInputs.clear();
this.broadcastInputs.putAll(inputs);
} | [
"public",
"<",
"T",
">",
"void",
"setBroadcastVariables",
"(",
"Map",
"<",
"String",
",",
"Operator",
"<",
"T",
">",
">",
"inputs",
")",
"{",
"this",
".",
"broadcastInputs",
".",
"clear",
"(",
")",
";",
"this",
".",
"broadcastInputs",
".",
"putAll",
"(... | Clears all previous broadcast inputs and binds the given inputs as
broadcast variables of this operator.
@param inputs The {@code<name, root>} pairs to be set as broadcast inputs. | [
"Clears",
"all",
"previous",
"broadcast",
"inputs",
"and",
"binds",
"the",
"given",
"inputs",
"as",
"broadcast",
"variables",
"of",
"this",
"operator",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/AbstractUdfOperator.java#L112-L115 |
123,861 | apache/flink | flink-core/src/main/java/org/apache/flink/api/common/operators/AbstractUdfOperator.java | AbstractUdfOperator.asArray | protected static <U> Class<U>[] asArray(Class<U> clazz) {
@SuppressWarnings("unchecked")
Class<U>[] array = new Class[] { clazz };
return array;
} | java | protected static <U> Class<U>[] asArray(Class<U> clazz) {
@SuppressWarnings("unchecked")
Class<U>[] array = new Class[] { clazz };
return array;
} | [
"protected",
"static",
"<",
"U",
">",
"Class",
"<",
"U",
">",
"[",
"]",
"asArray",
"(",
"Class",
"<",
"U",
">",
"clazz",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Class",
"<",
"U",
">",
"[",
"]",
"array",
"=",
"new",
"Class",
... | Generic utility function that wraps a single class object into an array of that class type.
@param <U> The type of the classes.
@param clazz The class object to be wrapped.
@return An array wrapping the class object. | [
"Generic",
"utility",
"function",
"that",
"wraps",
"a",
"single",
"class",
"object",
"into",
"an",
"array",
"of",
"that",
"class",
"type",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/AbstractUdfOperator.java#L142-L146 |
123,862 | apache/flink | flink-core/src/main/java/org/apache/flink/api/common/operators/AbstractUdfOperator.java | AbstractUdfOperator.emptyClassArray | protected static <U> Class<U>[] emptyClassArray() {
@SuppressWarnings("unchecked")
Class<U>[] array = new Class[0];
return array;
} | java | protected static <U> Class<U>[] emptyClassArray() {
@SuppressWarnings("unchecked")
Class<U>[] array = new Class[0];
return array;
} | [
"protected",
"static",
"<",
"U",
">",
"Class",
"<",
"U",
">",
"[",
"]",
"emptyClassArray",
"(",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Class",
"<",
"U",
">",
"[",
"]",
"array",
"=",
"new",
"Class",
"[",
"0",
"]",
";",
"retur... | Generic utility function that returns an empty class array.
@param <U> The type of the classes.
@return An empty array of type <tt>Class<U></tt>. | [
"Generic",
"utility",
"function",
"that",
"returns",
"an",
"empty",
"class",
"array",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/AbstractUdfOperator.java#L154-L158 |
123,863 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/metrics/MetricFetcherImpl.java | MetricFetcherImpl.update | @Override
public void update() {
synchronized (this) {
long currentTime = System.currentTimeMillis();
if (currentTime - lastUpdateTime > updateInterval) {
lastUpdateTime = currentTime;
fetchMetrics();
}
}
} | java | @Override
public void update() {
synchronized (this) {
long currentTime = System.currentTimeMillis();
if (currentTime - lastUpdateTime > updateInterval) {
lastUpdateTime = currentTime;
fetchMetrics();
}
}
} | [
"@",
"Override",
"public",
"void",
"update",
"(",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"long",
"currentTime",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"if",
"(",
"currentTime",
"-",
"lastUpdateTime",
">",
"updateInterval",
")",
"... | This method can be used to signal this MetricFetcher that the metrics are still in use and should be updated. | [
"This",
"method",
"can",
"be",
"used",
"to",
"signal",
"this",
"MetricFetcher",
"that",
"the",
"metrics",
"are",
"still",
"in",
"use",
"and",
"should",
"be",
"updated",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/metrics/MetricFetcherImpl.java#L99-L108 |
123,864 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/metrics/MetricFetcherImpl.java | MetricFetcherImpl.retrieveAndQueryMetrics | private void retrieveAndQueryMetrics(String queryServiceAddress) {
LOG.debug("Retrieve metric query service gateway for {}", queryServiceAddress);
final CompletableFuture<MetricQueryServiceGateway> queryServiceGatewayFuture = queryServiceRetriever.retrieveService(queryServiceAddress);
queryServiceGatewayFuture.... | java | private void retrieveAndQueryMetrics(String queryServiceAddress) {
LOG.debug("Retrieve metric query service gateway for {}", queryServiceAddress);
final CompletableFuture<MetricQueryServiceGateway> queryServiceGatewayFuture = queryServiceRetriever.retrieveService(queryServiceAddress);
queryServiceGatewayFuture.... | [
"private",
"void",
"retrieveAndQueryMetrics",
"(",
"String",
"queryServiceAddress",
")",
"{",
"LOG",
".",
"debug",
"(",
"\"Retrieve metric query service gateway for {}\"",
",",
"queryServiceAddress",
")",
";",
"final",
"CompletableFuture",
"<",
"MetricQueryServiceGateway",
... | Retrieves and queries the specified QueryServiceGateway.
@param queryServiceAddress specifying the QueryServiceGateway | [
"Retrieves",
"and",
"queries",
"the",
"specified",
"QueryServiceGateway",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/metrics/MetricFetcherImpl.java#L187-L201 |
123,865 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/metrics/MetricFetcherImpl.java | MetricFetcherImpl.queryMetrics | private void queryMetrics(final MetricQueryServiceGateway queryServiceGateway) {
LOG.debug("Query metrics for {}.", queryServiceGateway.getAddress());
queryServiceGateway
.queryMetrics(timeout)
.whenCompleteAsync(
(MetricDumpSerialization.MetricSerializationResult result, Throwable t) -> {
if (t != ... | java | private void queryMetrics(final MetricQueryServiceGateway queryServiceGateway) {
LOG.debug("Query metrics for {}.", queryServiceGateway.getAddress());
queryServiceGateway
.queryMetrics(timeout)
.whenCompleteAsync(
(MetricDumpSerialization.MetricSerializationResult result, Throwable t) -> {
if (t != ... | [
"private",
"void",
"queryMetrics",
"(",
"final",
"MetricQueryServiceGateway",
"queryServiceGateway",
")",
"{",
"LOG",
".",
"debug",
"(",
"\"Query metrics for {}.\"",
",",
"queryServiceGateway",
".",
"getAddress",
"(",
")",
")",
";",
"queryServiceGateway",
".",
"queryM... | Query the metrics from the given QueryServiceGateway.
@param queryServiceGateway to query for metrics | [
"Query",
"the",
"metrics",
"from",
"the",
"given",
"QueryServiceGateway",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/metrics/MetricFetcherImpl.java#L208-L222 |
123,866 | apache/flink | flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/plan/RelOptCluster.java | RelOptCluster.create | public static RelOptCluster create(RelOptPlanner planner,
RexBuilder rexBuilder) {
return new RelOptCluster(planner, rexBuilder.getTypeFactory(),
rexBuilder, new AtomicInteger(0), new HashMap<String, RelNode>());
} | java | public static RelOptCluster create(RelOptPlanner planner,
RexBuilder rexBuilder) {
return new RelOptCluster(planner, rexBuilder.getTypeFactory(),
rexBuilder, new AtomicInteger(0), new HashMap<String, RelNode>());
} | [
"public",
"static",
"RelOptCluster",
"create",
"(",
"RelOptPlanner",
"planner",
",",
"RexBuilder",
"rexBuilder",
")",
"{",
"return",
"new",
"RelOptCluster",
"(",
"planner",
",",
"rexBuilder",
".",
"getTypeFactory",
"(",
")",
",",
"rexBuilder",
",",
"new",
"Atomi... | Creates a cluster. | [
"Creates",
"a",
"cluster",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/plan/RelOptCluster.java#L99-L103 |
123,867 | apache/flink | flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/AvgAggFunction.java | AvgAggFunction.getValueExpression | @Override
public Expression getValueExpression() {
return ifThenElse(equalTo(count, literal(0L)), nullOf(getResultType()), div(sum, count));
} | java | @Override
public Expression getValueExpression() {
return ifThenElse(equalTo(count, literal(0L)), nullOf(getResultType()), div(sum, count));
} | [
"@",
"Override",
"public",
"Expression",
"getValueExpression",
"(",
")",
"{",
"return",
"ifThenElse",
"(",
"equalTo",
"(",
"count",
",",
"literal",
"(",
"0L",
")",
")",
",",
"nullOf",
"(",
"getResultType",
"(",
")",
")",
",",
"div",
"(",
"sum",
",",
"c... | If all input are nulls, count will be 0 and we will get null after the division. | [
"If",
"all",
"input",
"are",
"nulls",
"count",
"will",
"be",
"0",
"and",
"we",
"will",
"get",
"null",
"after",
"the",
"division",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/AvgAggFunction.java#L106-L109 |
123,868 | apache/flink | flink-connectors/flink-connector-filesystem/src/main/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSink.java | BucketingSink.closeCurrentPartFile | private void closeCurrentPartFile(BucketState<T> bucketState) throws Exception {
if (bucketState.isWriterOpen) {
bucketState.writer.close();
bucketState.isWriterOpen = false;
}
if (bucketState.currentFile != null) {
Path currentPartPath = new Path(bucketState.currentFile);
Path inProgressPath = getIn... | java | private void closeCurrentPartFile(BucketState<T> bucketState) throws Exception {
if (bucketState.isWriterOpen) {
bucketState.writer.close();
bucketState.isWriterOpen = false;
}
if (bucketState.currentFile != null) {
Path currentPartPath = new Path(bucketState.currentFile);
Path inProgressPath = getIn... | [
"private",
"void",
"closeCurrentPartFile",
"(",
"BucketState",
"<",
"T",
">",
"bucketState",
")",
"throws",
"Exception",
"{",
"if",
"(",
"bucketState",
".",
"isWriterOpen",
")",
"{",
"bucketState",
".",
"writer",
".",
"close",
"(",
")",
";",
"bucketState",
"... | Closes the current part file and moves it from the in-progress state to the pending state. | [
"Closes",
"the",
"current",
"part",
"file",
"and",
"moves",
"it",
"from",
"the",
"in",
"-",
"progress",
"state",
"to",
"the",
"pending",
"state",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-filesystem/src/main/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSink.java#L590-L608 |
123,869 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/checkpoints/CheckpointStatsCache.java | CheckpointStatsCache.tryAdd | public void tryAdd(AbstractCheckpointStats checkpoint) {
// Don't add in progress checkpoints as they will be replaced by their
// completed/failed version eventually.
if (cache != null && checkpoint != null && !checkpoint.getStatus().isInProgress()) {
cache.put(checkpoint.getCheckpointId(), checkpoint);
}
... | java | public void tryAdd(AbstractCheckpointStats checkpoint) {
// Don't add in progress checkpoints as they will be replaced by their
// completed/failed version eventually.
if (cache != null && checkpoint != null && !checkpoint.getStatus().isInProgress()) {
cache.put(checkpoint.getCheckpointId(), checkpoint);
}
... | [
"public",
"void",
"tryAdd",
"(",
"AbstractCheckpointStats",
"checkpoint",
")",
"{",
"// Don't add in progress checkpoints as they will be replaced by their",
"// completed/failed version eventually.",
"if",
"(",
"cache",
"!=",
"null",
"&&",
"checkpoint",
"!=",
"null",
"&&",
"... | Try to add the checkpoint to the cache.
@param checkpoint Checkpoint to be added. | [
"Try",
"to",
"add",
"the",
"checkpoint",
"to",
"the",
"cache",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/checkpoints/CheckpointStatsCache.java#L59-L65 |
123,870 | apache/flink | flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/ExecutionContext.java | ExecutionContext.wrapClassLoader | public <R> R wrapClassLoader(Supplier<R> supplier) {
try (TemporaryClassLoaderContext tmpCl = new TemporaryClassLoaderContext(classLoader)){
return supplier.get();
}
} | java | public <R> R wrapClassLoader(Supplier<R> supplier) {
try (TemporaryClassLoaderContext tmpCl = new TemporaryClassLoaderContext(classLoader)){
return supplier.get();
}
} | [
"public",
"<",
"R",
">",
"R",
"wrapClassLoader",
"(",
"Supplier",
"<",
"R",
">",
"supplier",
")",
"{",
"try",
"(",
"TemporaryClassLoaderContext",
"tmpCl",
"=",
"new",
"TemporaryClassLoaderContext",
"(",
"classLoader",
")",
")",
"{",
"return",
"supplier",
".",
... | Executes the given supplier using the execution context's classloader as thread classloader. | [
"Executes",
"the",
"given",
"supplier",
"using",
"the",
"execution",
"context",
"s",
"classloader",
"as",
"thread",
"classloader",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/ExecutionContext.java#L188-L192 |
123,871 | apache/flink | flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/functions/PythonMapPartition.java | PythonMapPartition.open | @Override
public void open(Configuration config) throws IOException {
streamer.open();
streamer.sendBroadCastVariables(config);
} | java | @Override
public void open(Configuration config) throws IOException {
streamer.open();
streamer.sendBroadCastVariables(config);
} | [
"@",
"Override",
"public",
"void",
"open",
"(",
"Configuration",
"config",
")",
"throws",
"IOException",
"{",
"streamer",
".",
"open",
"(",
")",
";",
"streamer",
".",
"sendBroadCastVariables",
"(",
"config",
")",
";",
"}"
] | Opens this function.
@param config configuration
@throws IOException | [
"Opens",
"this",
"function",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/functions/PythonMapPartition.java#L51-L55 |
123,872 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/accumulators/AccumulatorRegistry.java | AccumulatorRegistry.getSnapshot | public AccumulatorSnapshot getSnapshot() {
try {
return new AccumulatorSnapshot(jobID, taskID, userAccumulators);
} catch (Throwable e) {
LOG.warn("Failed to serialize accumulators for task.", e);
return null;
}
} | java | public AccumulatorSnapshot getSnapshot() {
try {
return new AccumulatorSnapshot(jobID, taskID, userAccumulators);
} catch (Throwable e) {
LOG.warn("Failed to serialize accumulators for task.", e);
return null;
}
} | [
"public",
"AccumulatorSnapshot",
"getSnapshot",
"(",
")",
"{",
"try",
"{",
"return",
"new",
"AccumulatorSnapshot",
"(",
"jobID",
",",
"taskID",
",",
"userAccumulators",
")",
";",
"}",
"catch",
"(",
"Throwable",
"e",
")",
"{",
"LOG",
".",
"warn",
"(",
"\"Fa... | Creates a snapshot of this accumulator registry.
@return a serialized accumulator map | [
"Creates",
"a",
"snapshot",
"of",
"this",
"accumulator",
"registry",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/accumulators/AccumulatorRegistry.java#L55-L62 |
123,873 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/query/TaskKvStateRegistry.java | TaskKvStateRegistry.registerKvState | public void registerKvState(KeyGroupRange keyGroupRange, String registrationName, InternalKvState<?, ?, ?> kvState) {
KvStateID kvStateId = registry.registerKvState(jobId, jobVertexId, keyGroupRange, registrationName, kvState);
registeredKvStates.add(new KvStateInfo(keyGroupRange, registrationName, kvStateId));
} | java | public void registerKvState(KeyGroupRange keyGroupRange, String registrationName, InternalKvState<?, ?, ?> kvState) {
KvStateID kvStateId = registry.registerKvState(jobId, jobVertexId, keyGroupRange, registrationName, kvState);
registeredKvStates.add(new KvStateInfo(keyGroupRange, registrationName, kvStateId));
} | [
"public",
"void",
"registerKvState",
"(",
"KeyGroupRange",
"keyGroupRange",
",",
"String",
"registrationName",
",",
"InternalKvState",
"<",
"?",
",",
"?",
",",
"?",
">",
"kvState",
")",
"{",
"KvStateID",
"kvStateId",
"=",
"registry",
".",
"registerKvState",
"(",... | Registers the KvState instance at the KvStateRegistry.
@param keyGroupRange Key group range the KvState instance belongs to
@param registrationName The registration name (not necessarily the same
as the KvState name defined in the state
descriptor used to create the KvState instance)
@param kvState The | [
"Registers",
"the",
"KvState",
"instance",
"at",
"the",
"KvStateRegistry",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/query/TaskKvStateRegistry.java#L63-L66 |
123,874 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/query/TaskKvStateRegistry.java | TaskKvStateRegistry.unregisterAll | public void unregisterAll() {
for (KvStateInfo kvState : registeredKvStates) {
registry.unregisterKvState(jobId, jobVertexId, kvState.keyGroupRange, kvState.registrationName, kvState.kvStateId);
}
} | java | public void unregisterAll() {
for (KvStateInfo kvState : registeredKvStates) {
registry.unregisterKvState(jobId, jobVertexId, kvState.keyGroupRange, kvState.registrationName, kvState.kvStateId);
}
} | [
"public",
"void",
"unregisterAll",
"(",
")",
"{",
"for",
"(",
"KvStateInfo",
"kvState",
":",
"registeredKvStates",
")",
"{",
"registry",
".",
"unregisterKvState",
"(",
"jobId",
",",
"jobVertexId",
",",
"kvState",
".",
"keyGroupRange",
",",
"kvState",
".",
"reg... | Unregisters all registered KvState instances from the KvStateRegistry. | [
"Unregisters",
"all",
"registered",
"KvState",
"instances",
"from",
"the",
"KvStateRegistry",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/query/TaskKvStateRegistry.java#L71-L75 |
123,875 | apache/flink | flink-core/src/main/java/org/apache/flink/configuration/ConfigOption.java | ConfigOption.withFallbackKeys | public ConfigOption<T> withFallbackKeys(String... fallbackKeys) {
final Stream<FallbackKey> newFallbackKeys = Arrays.stream(fallbackKeys).map(FallbackKey::createFallbackKey);
final Stream<FallbackKey> currentAlternativeKeys = Arrays.stream(this.fallbackKeys);
// put fallback keys first so that they are prioritiz... | java | public ConfigOption<T> withFallbackKeys(String... fallbackKeys) {
final Stream<FallbackKey> newFallbackKeys = Arrays.stream(fallbackKeys).map(FallbackKey::createFallbackKey);
final Stream<FallbackKey> currentAlternativeKeys = Arrays.stream(this.fallbackKeys);
// put fallback keys first so that they are prioritiz... | [
"public",
"ConfigOption",
"<",
"T",
">",
"withFallbackKeys",
"(",
"String",
"...",
"fallbackKeys",
")",
"{",
"final",
"Stream",
"<",
"FallbackKey",
">",
"newFallbackKeys",
"=",
"Arrays",
".",
"stream",
"(",
"fallbackKeys",
")",
".",
"map",
"(",
"FallbackKey",
... | Creates a new config option, using this option's key and default value, and
adding the given fallback keys.
<p>When obtaining a value from the configuration via {@link Configuration#getValue(ConfigOption)},
the fallback keys will be checked in the order provided to this method. The first key for which
a value is found... | [
"Creates",
"a",
"new",
"config",
"option",
"using",
"this",
"option",
"s",
"key",
"and",
"default",
"value",
"and",
"adding",
"the",
"given",
"fallback",
"keys",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/ConfigOption.java#L119-L127 |
123,876 | apache/flink | flink-core/src/main/java/org/apache/flink/configuration/ConfigOption.java | ConfigOption.withDeprecatedKeys | public ConfigOption<T> withDeprecatedKeys(String... deprecatedKeys) {
final Stream<FallbackKey> newDeprecatedKeys = Arrays.stream(deprecatedKeys).map(FallbackKey::createDeprecatedKey);
final Stream<FallbackKey> currentAlternativeKeys = Arrays.stream(this.fallbackKeys);
// put deprecated keys last so that they ar... | java | public ConfigOption<T> withDeprecatedKeys(String... deprecatedKeys) {
final Stream<FallbackKey> newDeprecatedKeys = Arrays.stream(deprecatedKeys).map(FallbackKey::createDeprecatedKey);
final Stream<FallbackKey> currentAlternativeKeys = Arrays.stream(this.fallbackKeys);
// put deprecated keys last so that they ar... | [
"public",
"ConfigOption",
"<",
"T",
">",
"withDeprecatedKeys",
"(",
"String",
"...",
"deprecatedKeys",
")",
"{",
"final",
"Stream",
"<",
"FallbackKey",
">",
"newDeprecatedKeys",
"=",
"Arrays",
".",
"stream",
"(",
"deprecatedKeys",
")",
".",
"map",
"(",
"Fallba... | Creates a new config option, using this option's key and default value, and
adding the given deprecated keys.
<p>When obtaining a value from the configuration via {@link Configuration#getValue(ConfigOption)},
the deprecated keys will be checked in the order provided to this method. The first key for which
a value is f... | [
"Creates",
"a",
"new",
"config",
"option",
"using",
"this",
"option",
"s",
"key",
"and",
"default",
"value",
"and",
"adding",
"the",
"given",
"deprecated",
"keys",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/ConfigOption.java#L140-L148 |
123,877 | apache/flink | flink-core/src/main/java/org/apache/flink/configuration/ConfigOption.java | ConfigOption.fallbackKeys | public Iterable<FallbackKey> fallbackKeys() {
return (fallbackKeys == EMPTY) ? Collections.emptyList() : Arrays.asList(fallbackKeys);
} | java | public Iterable<FallbackKey> fallbackKeys() {
return (fallbackKeys == EMPTY) ? Collections.emptyList() : Arrays.asList(fallbackKeys);
} | [
"public",
"Iterable",
"<",
"FallbackKey",
">",
"fallbackKeys",
"(",
")",
"{",
"return",
"(",
"fallbackKeys",
"==",
"EMPTY",
")",
"?",
"Collections",
".",
"emptyList",
"(",
")",
":",
"Arrays",
".",
"asList",
"(",
"fallbackKeys",
")",
";",
"}"
] | Gets the fallback keys, in the order to be checked.
@return The option's fallback keys. | [
"Gets",
"the",
"fallback",
"keys",
"in",
"the",
"order",
"to",
"be",
"checked",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/ConfigOption.java#L210-L212 |
123,878 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionJobVertex.java | ExecutionJobVertex.getAggregateJobVertexState | public static ExecutionState getAggregateJobVertexState(int[] verticesPerState, int parallelism) {
if (verticesPerState == null || verticesPerState.length != ExecutionState.values().length) {
throw new IllegalArgumentException("Must provide an array as large as there are execution states.");
}
if (verticesPer... | java | public static ExecutionState getAggregateJobVertexState(int[] verticesPerState, int parallelism) {
if (verticesPerState == null || verticesPerState.length != ExecutionState.values().length) {
throw new IllegalArgumentException("Must provide an array as large as there are execution states.");
}
if (verticesPer... | [
"public",
"static",
"ExecutionState",
"getAggregateJobVertexState",
"(",
"int",
"[",
"]",
"verticesPerState",
",",
"int",
"parallelism",
")",
"{",
"if",
"(",
"verticesPerState",
"==",
"null",
"||",
"verticesPerState",
".",
"length",
"!=",
"ExecutionState",
".",
"v... | A utility function that computes an "aggregated" state for the vertex.
<p>This state is not used anywhere in the coordination, but can be used for display
in dashboards to as a summary for how the particular parallel operation represented by
this ExecutionJobVertex is currently behaving.
<p>For example, if at least ... | [
"A",
"utility",
"function",
"that",
"computes",
"an",
"aggregated",
"state",
"for",
"the",
"vertex",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionJobVertex.java#L654-L679 |
123,879 | apache/flink | flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/util/HadoopUtils.java | HadoopUtils.hasHDFSDelegationToken | public static boolean hasHDFSDelegationToken() throws Exception {
UserGroupInformation loginUser = UserGroupInformation.getCurrentUser();
Collection<Token<? extends TokenIdentifier>> usrTok = loginUser.getTokens();
for (Token<? extends TokenIdentifier> token : usrTok) {
if (token.getKind().equals(HDFS_DELEGATI... | java | public static boolean hasHDFSDelegationToken() throws Exception {
UserGroupInformation loginUser = UserGroupInformation.getCurrentUser();
Collection<Token<? extends TokenIdentifier>> usrTok = loginUser.getTokens();
for (Token<? extends TokenIdentifier> token : usrTok) {
if (token.getKind().equals(HDFS_DELEGATI... | [
"public",
"static",
"boolean",
"hasHDFSDelegationToken",
"(",
")",
"throws",
"Exception",
"{",
"UserGroupInformation",
"loginUser",
"=",
"UserGroupInformation",
".",
"getCurrentUser",
"(",
")",
";",
"Collection",
"<",
"Token",
"<",
"?",
"extends",
"TokenIdentifier",
... | Indicates whether the current user has an HDFS delegation token. | [
"Indicates",
"whether",
"the",
"current",
"user",
"has",
"an",
"HDFS",
"delegation",
"token",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/util/HadoopUtils.java#L118-L127 |
123,880 | apache/flink | flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/util/HadoopUtils.java | HadoopUtils.isMinHadoopVersion | public static boolean isMinHadoopVersion(int major, int minor) throws FlinkRuntimeException {
String versionString = VersionInfo.getVersion();
String[] versionParts = versionString.split("\\.");
if (versionParts.length < 2) {
throw new FlinkRuntimeException(
"Cannot determine version of Hadoop, unexpecte... | java | public static boolean isMinHadoopVersion(int major, int minor) throws FlinkRuntimeException {
String versionString = VersionInfo.getVersion();
String[] versionParts = versionString.split("\\.");
if (versionParts.length < 2) {
throw new FlinkRuntimeException(
"Cannot determine version of Hadoop, unexpecte... | [
"public",
"static",
"boolean",
"isMinHadoopVersion",
"(",
"int",
"major",
",",
"int",
"minor",
")",
"throws",
"FlinkRuntimeException",
"{",
"String",
"versionString",
"=",
"VersionInfo",
".",
"getVersion",
"(",
")",
";",
"String",
"[",
"]",
"versionParts",
"=",
... | Checks if the Hadoop dependency is at least of the given version. | [
"Checks",
"if",
"the",
"Hadoop",
"dependency",
"is",
"at",
"least",
"of",
"the",
"given",
"version",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/util/HadoopUtils.java#L132-L145 |
123,881 | apache/flink | flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/avro/ParquetAvroWriters.java | ParquetAvroWriters.forSpecificRecord | public static <T extends SpecificRecordBase> ParquetWriterFactory<T> forSpecificRecord(Class<T> type) {
final String schemaString = SpecificData.get().getSchema(type).toString();
final ParquetBuilder<T> builder = (out) -> createAvroParquetWriter(schemaString, SpecificData.get(), out);
return new ParquetWriterFact... | java | public static <T extends SpecificRecordBase> ParquetWriterFactory<T> forSpecificRecord(Class<T> type) {
final String schemaString = SpecificData.get().getSchema(type).toString();
final ParquetBuilder<T> builder = (out) -> createAvroParquetWriter(schemaString, SpecificData.get(), out);
return new ParquetWriterFact... | [
"public",
"static",
"<",
"T",
"extends",
"SpecificRecordBase",
">",
"ParquetWriterFactory",
"<",
"T",
">",
"forSpecificRecord",
"(",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"final",
"String",
"schemaString",
"=",
"SpecificData",
".",
"get",
"(",
")",
".",
... | Creates a ParquetWriterFactory for an Avro specific type. The Parquet writers will use the
schema of that specific type to build and write the columnar data.
@param type The class of the type to write. | [
"Creates",
"a",
"ParquetWriterFactory",
"for",
"an",
"Avro",
"specific",
"type",
".",
"The",
"Parquet",
"writers",
"will",
"use",
"the",
"schema",
"of",
"that",
"specific",
"type",
"to",
"build",
"and",
"write",
"the",
"columnar",
"data",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/avro/ParquetAvroWriters.java#L47-L51 |
123,882 | apache/flink | flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/avro/ParquetAvroWriters.java | ParquetAvroWriters.forGenericRecord | public static ParquetWriterFactory<GenericRecord> forGenericRecord(Schema schema) {
final String schemaString = schema.toString();
final ParquetBuilder<GenericRecord> builder = (out) -> createAvroParquetWriter(schemaString, GenericData.get(), out);
return new ParquetWriterFactory<>(builder);
} | java | public static ParquetWriterFactory<GenericRecord> forGenericRecord(Schema schema) {
final String schemaString = schema.toString();
final ParquetBuilder<GenericRecord> builder = (out) -> createAvroParquetWriter(schemaString, GenericData.get(), out);
return new ParquetWriterFactory<>(builder);
} | [
"public",
"static",
"ParquetWriterFactory",
"<",
"GenericRecord",
">",
"forGenericRecord",
"(",
"Schema",
"schema",
")",
"{",
"final",
"String",
"schemaString",
"=",
"schema",
".",
"toString",
"(",
")",
";",
"final",
"ParquetBuilder",
"<",
"GenericRecord",
">",
... | Creates a ParquetWriterFactory that accepts and writes Avro generic types.
The Parquet writers will use the given schema to build and write the columnar data.
@param schema The schema of the generic type. | [
"Creates",
"a",
"ParquetWriterFactory",
"that",
"accepts",
"and",
"writes",
"Avro",
"generic",
"types",
".",
"The",
"Parquet",
"writers",
"will",
"use",
"the",
"given",
"schema",
"to",
"build",
"and",
"write",
"the",
"columnar",
"data",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/avro/ParquetAvroWriters.java#L59-L63 |
123,883 | apache/flink | flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/avro/ParquetAvroWriters.java | ParquetAvroWriters.forReflectRecord | public static <T> ParquetWriterFactory<T> forReflectRecord(Class<T> type) {
final String schemaString = ReflectData.get().getSchema(type).toString();
final ParquetBuilder<T> builder = (out) -> createAvroParquetWriter(schemaString, ReflectData.get(), out);
return new ParquetWriterFactory<>(builder);
} | java | public static <T> ParquetWriterFactory<T> forReflectRecord(Class<T> type) {
final String schemaString = ReflectData.get().getSchema(type).toString();
final ParquetBuilder<T> builder = (out) -> createAvroParquetWriter(schemaString, ReflectData.get(), out);
return new ParquetWriterFactory<>(builder);
} | [
"public",
"static",
"<",
"T",
">",
"ParquetWriterFactory",
"<",
"T",
">",
"forReflectRecord",
"(",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"final",
"String",
"schemaString",
"=",
"ReflectData",
".",
"get",
"(",
")",
".",
"getSchema",
"(",
"type",
")",
... | Creates a ParquetWriterFactory for the given type. The Parquet writers will use Avro
to reflectively create a schema for the type and use that schema to write the columnar data.
@param type The class of the type to write. | [
"Creates",
"a",
"ParquetWriterFactory",
"for",
"the",
"given",
"type",
".",
"The",
"Parquet",
"writers",
"will",
"use",
"Avro",
"to",
"reflectively",
"create",
"a",
"schema",
"for",
"the",
"type",
"and",
"use",
"that",
"schema",
"to",
"write",
"the",
"column... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/avro/ParquetAvroWriters.java#L71-L75 |
123,884 | apache/flink | flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/store/ZooKeeperMesosWorkerStore.java | ZooKeeperMesosWorkerStore.getFrameworkID | @Override
public Option<Protos.FrameworkID> getFrameworkID() throws Exception {
synchronized (startStopLock) {
verifyIsRunning();
Option<Protos.FrameworkID> frameworkID;
byte[] value = frameworkIdInZooKeeper.getValue();
if (value.length == 0) {
frameworkID = Option.empty();
} else {
framework... | java | @Override
public Option<Protos.FrameworkID> getFrameworkID() throws Exception {
synchronized (startStopLock) {
verifyIsRunning();
Option<Protos.FrameworkID> frameworkID;
byte[] value = frameworkIdInZooKeeper.getValue();
if (value.length == 0) {
frameworkID = Option.empty();
} else {
framework... | [
"@",
"Override",
"public",
"Option",
"<",
"Protos",
".",
"FrameworkID",
">",
"getFrameworkID",
"(",
")",
"throws",
"Exception",
"{",
"synchronized",
"(",
"startStopLock",
")",
"{",
"verifyIsRunning",
"(",
")",
";",
"Option",
"<",
"Protos",
".",
"FrameworkID",
... | Get the persisted framework ID.
@return the current ID or empty if none is yet persisted.
@throws Exception on ZK failures, interruptions. | [
"Get",
"the",
"persisted",
"framework",
"ID",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/store/ZooKeeperMesosWorkerStore.java#L113-L129 |
123,885 | apache/flink | flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/store/ZooKeeperMesosWorkerStore.java | ZooKeeperMesosWorkerStore.setFrameworkID | @Override
public void setFrameworkID(Option<Protos.FrameworkID> frameworkID) throws Exception {
synchronized (startStopLock) {
verifyIsRunning();
byte[] value = frameworkID.isDefined() ? frameworkID.get().getValue().getBytes(ConfigConstants.DEFAULT_CHARSET) :
new byte[0];
frameworkIdInZooKeeper.setValu... | java | @Override
public void setFrameworkID(Option<Protos.FrameworkID> frameworkID) throws Exception {
synchronized (startStopLock) {
verifyIsRunning();
byte[] value = frameworkID.isDefined() ? frameworkID.get().getValue().getBytes(ConfigConstants.DEFAULT_CHARSET) :
new byte[0];
frameworkIdInZooKeeper.setValu... | [
"@",
"Override",
"public",
"void",
"setFrameworkID",
"(",
"Option",
"<",
"Protos",
".",
"FrameworkID",
">",
"frameworkID",
")",
"throws",
"Exception",
"{",
"synchronized",
"(",
"startStopLock",
")",
"{",
"verifyIsRunning",
"(",
")",
";",
"byte",
"[",
"]",
"v... | Update the persisted framework ID.
@param frameworkID the new ID or empty to remove the persisted ID.
@throws Exception on ZK failures, interruptions. | [
"Update",
"the",
"persisted",
"framework",
"ID",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/store/ZooKeeperMesosWorkerStore.java#L136-L145 |
123,886 | apache/flink | flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/store/ZooKeeperMesosWorkerStore.java | ZooKeeperMesosWorkerStore.newTaskID | @Override
public Protos.TaskID newTaskID() throws Exception {
synchronized (startStopLock) {
verifyIsRunning();
int nextCount;
boolean success;
do {
ZooKeeperVersionedValue<Integer> count = totalTaskCountInZooKeeper.getVersionedValue();
nextCount = count.getValue() + 1;
success = totalTaskCo... | java | @Override
public Protos.TaskID newTaskID() throws Exception {
synchronized (startStopLock) {
verifyIsRunning();
int nextCount;
boolean success;
do {
ZooKeeperVersionedValue<Integer> count = totalTaskCountInZooKeeper.getVersionedValue();
nextCount = count.getValue() + 1;
success = totalTaskCo... | [
"@",
"Override",
"public",
"Protos",
".",
"TaskID",
"newTaskID",
"(",
")",
"throws",
"Exception",
"{",
"synchronized",
"(",
"startStopLock",
")",
"{",
"verifyIsRunning",
"(",
")",
";",
"int",
"nextCount",
";",
"boolean",
"success",
";",
"do",
"{",
"ZooKeeper... | Generates a new task ID. | [
"Generates",
"a",
"new",
"task",
"ID",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/store/ZooKeeperMesosWorkerStore.java#L150-L167 |
123,887 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java | MemoryManager.shutdown | public void shutdown() {
// -------------------- BEGIN CRITICAL SECTION -------------------
synchronized (lock) {
if (!isShutDown) {
// mark as shutdown and release memory
isShutDown = true;
numNonAllocatedPages = 0;
// go over all allocated segments and release them
for (Set<MemorySegment> ... | java | public void shutdown() {
// -------------------- BEGIN CRITICAL SECTION -------------------
synchronized (lock) {
if (!isShutDown) {
// mark as shutdown and release memory
isShutDown = true;
numNonAllocatedPages = 0;
// go over all allocated segments and release them
for (Set<MemorySegment> ... | [
"public",
"void",
"shutdown",
"(",
")",
"{",
"// -------------------- BEGIN CRITICAL SECTION -------------------",
"synchronized",
"(",
"lock",
")",
"{",
"if",
"(",
"!",
"isShutDown",
")",
"{",
"// mark as shutdown and release memory",
"isShutDown",
"=",
"true",
";",
"n... | Shuts the memory manager down, trying to release all the memory it managed. Depending
on implementation details, the memory does not necessarily become reclaimable by the
garbage collector, because there might still be references to allocated segments in the
code that allocated them from the memory manager. | [
"Shuts",
"the",
"memory",
"manager",
"down",
"trying",
"to",
"release",
"all",
"the",
"memory",
"it",
"managed",
".",
"Depending",
"on",
"implementation",
"details",
"the",
"memory",
"does",
"not",
"necessarily",
"become",
"reclaimable",
"by",
"the",
"garbage",
... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java#L201-L220 |
123,888 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java | MemoryManager.release | public void release(MemorySegment segment) {
// check if segment is null or has already been freed
if (segment == null || segment.getOwner() == null) {
return;
}
final Object owner = segment.getOwner();
// -------------------- BEGIN CRITICAL SECTION -------------------
synchronized (lock) {
// preve... | java | public void release(MemorySegment segment) {
// check if segment is null or has already been freed
if (segment == null || segment.getOwner() == null) {
return;
}
final Object owner = segment.getOwner();
// -------------------- BEGIN CRITICAL SECTION -------------------
synchronized (lock) {
// preve... | [
"public",
"void",
"release",
"(",
"MemorySegment",
"segment",
")",
"{",
"// check if segment is null or has already been freed",
"if",
"(",
"segment",
"==",
"null",
"||",
"segment",
".",
"getOwner",
"(",
")",
"==",
"null",
")",
"{",
"return",
";",
"}",
"final",
... | Tries to release the memory for the specified segment. If the segment has already been released or
is null, the request is simply ignored.
<p>If the memory manager manages pre-allocated memory, the memory segment goes back to the memory pool.
Otherwise, the segment is only freed and made eligible for reclamation by th... | [
"Tries",
"to",
"release",
"the",
"memory",
"for",
"the",
"specified",
"segment",
".",
"If",
"the",
"segment",
"has",
"already",
"been",
"released",
"or",
"is",
"null",
"the",
"request",
"is",
"simply",
"ignored",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java#L337-L380 |
123,889 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java | MemoryManager.release | public void release(Collection<MemorySegment> segments) {
if (segments == null) {
return;
}
// -------------------- BEGIN CRITICAL SECTION -------------------
synchronized (lock) {
if (isShutDown) {
throw new IllegalStateException("Memory manager has been shut down.");
}
// since concurrent mo... | java | public void release(Collection<MemorySegment> segments) {
if (segments == null) {
return;
}
// -------------------- BEGIN CRITICAL SECTION -------------------
synchronized (lock) {
if (isShutDown) {
throw new IllegalStateException("Memory manager has been shut down.");
}
// since concurrent mo... | [
"public",
"void",
"release",
"(",
"Collection",
"<",
"MemorySegment",
">",
"segments",
")",
"{",
"if",
"(",
"segments",
"==",
"null",
")",
"{",
"return",
";",
"}",
"// -------------------- BEGIN CRITICAL SECTION -------------------",
"synchronized",
"(",
"lock",
")"... | Tries to release many memory segments together.
<p>If the memory manager manages pre-allocated memory, the memory segment goes back to the memory pool.
Otherwise, the segment is only freed and made eligible for reclamation by the GC.
@param segments The segments to be released.
@throws NullPointerException Thrown, if... | [
"Tries",
"to",
"release",
"many",
"memory",
"segments",
"together",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java#L392-L465 |
123,890 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java | MemoryManager.releaseAll | public void releaseAll(Object owner) {
if (owner == null) {
return;
}
// -------------------- BEGIN CRITICAL SECTION -------------------
synchronized (lock) {
if (isShutDown) {
throw new IllegalStateException("Memory manager has been shut down.");
}
// get all segments
final Set<MemorySegme... | java | public void releaseAll(Object owner) {
if (owner == null) {
return;
}
// -------------------- BEGIN CRITICAL SECTION -------------------
synchronized (lock) {
if (isShutDown) {
throw new IllegalStateException("Memory manager has been shut down.");
}
// get all segments
final Set<MemorySegme... | [
"public",
"void",
"releaseAll",
"(",
"Object",
"owner",
")",
"{",
"if",
"(",
"owner",
"==",
"null",
")",
"{",
"return",
";",
"}",
"// -------------------- BEGIN CRITICAL SECTION -------------------",
"synchronized",
"(",
"lock",
")",
"{",
"if",
"(",
"isShutDown",
... | Releases all memory segments for the given owner.
@param owner The owner memory segments are to be released. | [
"Releases",
"all",
"memory",
"segments",
"for",
"the",
"given",
"owner",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java#L472-L507 |
123,891 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/lookups/FieldReferenceLookup.java | FieldReferenceLookup.getAllInputFields | public List<FieldReferenceExpression> getAllInputFields() {
return fieldReferences.stream().flatMap(input -> input.values().stream()).collect(toList());
} | java | public List<FieldReferenceExpression> getAllInputFields() {
return fieldReferences.stream().flatMap(input -> input.values().stream()).collect(toList());
} | [
"public",
"List",
"<",
"FieldReferenceExpression",
">",
"getAllInputFields",
"(",
")",
"{",
"return",
"fieldReferences",
".",
"stream",
"(",
")",
".",
"flatMap",
"(",
"input",
"->",
"input",
".",
"values",
"(",
")",
".",
"stream",
"(",
")",
")",
".",
"co... | Gives all fields of underlying inputs in order of those inputs and order of fields within input.
@return concatenated list of fields of all inputs. | [
"Gives",
"all",
"fields",
"of",
"underlying",
"inputs",
"in",
"order",
"of",
"those",
"inputs",
"and",
"order",
"of",
"fields",
"within",
"input",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/lookups/FieldReferenceLookup.java#L77-L79 |
123,892 | apache/flink | flink-formats/flink-csv/src/main/java/org/apache/flink/table/descriptors/Csv.java | Csv.schema | public Csv schema(TypeInformation<Row> schemaType) {
Preconditions.checkNotNull(schemaType);
internalProperties.putString(FORMAT_SCHEMA, TypeStringUtils.writeTypeInfo(schemaType));
return this;
} | java | public Csv schema(TypeInformation<Row> schemaType) {
Preconditions.checkNotNull(schemaType);
internalProperties.putString(FORMAT_SCHEMA, TypeStringUtils.writeTypeInfo(schemaType));
return this;
} | [
"public",
"Csv",
"schema",
"(",
"TypeInformation",
"<",
"Row",
">",
"schemaType",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"schemaType",
")",
";",
"internalProperties",
".",
"putString",
"(",
"FORMAT_SCHEMA",
",",
"TypeStringUtils",
".",
"writeTypeInfo... | Sets the format schema with field names and the types. Required if schema is not derived.
@param schemaType type information that describes the schema | [
"Sets",
"the",
"format",
"schema",
"with",
"field",
"names",
"and",
"the",
"types",
".",
"Required",
"if",
"schema",
"is",
"not",
"derived",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-formats/flink-csv/src/main/java/org/apache/flink/table/descriptors/Csv.java#L154-L158 |
123,893 | apache/flink | flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/PythonPlanBinder.java | PythonPlanBinder.main | public static void main(String[] args) throws Exception {
Configuration globalConfig = GlobalConfiguration.loadConfiguration();
PythonPlanBinder binder = new PythonPlanBinder(globalConfig);
try {
binder.runPlan(args);
} catch (Exception e) {
System.out.println("Failed to run plan: " + e.getMessage());
... | java | public static void main(String[] args) throws Exception {
Configuration globalConfig = GlobalConfiguration.loadConfiguration();
PythonPlanBinder binder = new PythonPlanBinder(globalConfig);
try {
binder.runPlan(args);
} catch (Exception e) {
System.out.println("Failed to run plan: " + e.getMessage());
... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"throws",
"Exception",
"{",
"Configuration",
"globalConfig",
"=",
"GlobalConfiguration",
".",
"loadConfiguration",
"(",
")",
";",
"PythonPlanBinder",
"binder",
"=",
"new",
"PythonPlanBinder"... | Entry point for the execution of a python plan.
@param args planPath[ package1[ packageX[ - parameter1[ parameterX]]]]
@throws Exception | [
"Entry",
"point",
"for",
"the",
"execution",
"of",
"a",
"python",
"plan",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/PythonPlanBinder.java#L94-L103 |
123,894 | apache/flink | flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/AnalyticHelper.java | AnalyticHelper.addAccumulator | public <V, A extends Serializable> void addAccumulator(String name, Accumulator<V, A> accumulator) {
getRuntimeContext().addAccumulator(id + SEPARATOR + name, accumulator);
} | java | public <V, A extends Serializable> void addAccumulator(String name, Accumulator<V, A> accumulator) {
getRuntimeContext().addAccumulator(id + SEPARATOR + name, accumulator);
} | [
"public",
"<",
"V",
",",
"A",
"extends",
"Serializable",
">",
"void",
"addAccumulator",
"(",
"String",
"name",
",",
"Accumulator",
"<",
"V",
",",
"A",
">",
"accumulator",
")",
"{",
"getRuntimeContext",
"(",
")",
".",
"addAccumulator",
"(",
"id",
"+",
"SE... | Adds an accumulator by prepending the given name with a random string.
@param name The name of the accumulator
@param accumulator The accumulator
@param <V> Type of values that are added to the accumulator
@param <A> Type of the accumulator result as it will be reported to the client | [
"Adds",
"an",
"accumulator",
"by",
"prepending",
"the",
"given",
"name",
"with",
"a",
"random",
"string",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/AnalyticHelper.java#L66-L68 |
123,895 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/deduplicate/DeduplicateFunctionHelper.java | DeduplicateFunctionHelper.processLastRow | static void processLastRow(BaseRow currentRow, boolean generateRetraction, ValueState<BaseRow> state,
Collector<BaseRow> out) throws Exception {
// Check message should be accumulate
Preconditions.checkArgument(BaseRowUtil.isAccumulateMsg(currentRow));
if (generateRetraction) {
// state stores complete row ... | java | static void processLastRow(BaseRow currentRow, boolean generateRetraction, ValueState<BaseRow> state,
Collector<BaseRow> out) throws Exception {
// Check message should be accumulate
Preconditions.checkArgument(BaseRowUtil.isAccumulateMsg(currentRow));
if (generateRetraction) {
// state stores complete row ... | [
"static",
"void",
"processLastRow",
"(",
"BaseRow",
"currentRow",
",",
"boolean",
"generateRetraction",
",",
"ValueState",
"<",
"BaseRow",
">",
"state",
",",
"Collector",
"<",
"BaseRow",
">",
"out",
")",
"throws",
"Exception",
"{",
"// Check message should be accumu... | Processes element to deduplicate on keys, sends current element as last row, retracts previous element if
needed.
@param currentRow latest row received by deduplicate function
@param generateRetraction whether need to send retract message to downstream
@param state state of function
@param out underlying collector
@th... | [
"Processes",
"element",
"to",
"deduplicate",
"on",
"keys",
"sends",
"current",
"element",
"as",
"last",
"row",
"retracts",
"previous",
"element",
"if",
"needed",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/deduplicate/DeduplicateFunctionHelper.java#L42-L56 |
123,896 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/deduplicate/DeduplicateFunctionHelper.java | DeduplicateFunctionHelper.processFirstRow | static void processFirstRow(BaseRow currentRow, ValueState<Boolean> state, Collector<BaseRow> out)
throws Exception {
// Check message should be accumulate
Preconditions.checkArgument(BaseRowUtil.isAccumulateMsg(currentRow));
// ignore record with timestamp bigger than preRow
if (state.value() != null) {
... | java | static void processFirstRow(BaseRow currentRow, ValueState<Boolean> state, Collector<BaseRow> out)
throws Exception {
// Check message should be accumulate
Preconditions.checkArgument(BaseRowUtil.isAccumulateMsg(currentRow));
// ignore record with timestamp bigger than preRow
if (state.value() != null) {
... | [
"static",
"void",
"processFirstRow",
"(",
"BaseRow",
"currentRow",
",",
"ValueState",
"<",
"Boolean",
">",
"state",
",",
"Collector",
"<",
"BaseRow",
">",
"out",
")",
"throws",
"Exception",
"{",
"// Check message should be accumulate",
"Preconditions",
".",
"checkAr... | Processes element to deduplicate on keys, sends current element if it is first row.
@param currentRow latest row received by deduplicate function
@param state state of function
@param out underlying collector
@throws Exception | [
"Processes",
"element",
"to",
"deduplicate",
"on",
"keys",
"sends",
"current",
"element",
"if",
"it",
"is",
"first",
"row",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/deduplicate/DeduplicateFunctionHelper.java#L66-L76 |
123,897 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/sampling/BernoulliSampler.java | BernoulliSampler.sample | @Override
public Iterator<T> sample(final Iterator<T> input) {
if (fraction == 0) {
return emptyIterable;
}
return new SampledIterator<T>() {
T current = null;
@Override
public boolean hasNext() {
if (current == null) {
current = getNextSampledElement();
}
return current != null;
... | java | @Override
public Iterator<T> sample(final Iterator<T> input) {
if (fraction == 0) {
return emptyIterable;
}
return new SampledIterator<T>() {
T current = null;
@Override
public boolean hasNext() {
if (current == null) {
current = getNextSampledElement();
}
return current != null;
... | [
"@",
"Override",
"public",
"Iterator",
"<",
"T",
">",
"sample",
"(",
"final",
"Iterator",
"<",
"T",
">",
"input",
")",
"{",
"if",
"(",
"fraction",
"==",
"0",
")",
"{",
"return",
"emptyIterable",
";",
"}",
"return",
"new",
"SampledIterator",
"<",
"T",
... | Sample the input elements, for each input element, take a Bernoulli trail for sampling.
@param input Elements to be sampled.
@return The sampled result which is lazy computed upon input elements. | [
"Sample",
"the",
"input",
"elements",
"for",
"each",
"input",
"element",
"take",
"a",
"Bernoulli",
"trail",
"for",
"sampling",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/sampling/BernoulliSampler.java#L82-L144 |
123,898 | apache/flink | flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/state/serialization/KvStateSerializer.java | KvStateSerializer.serializeValue | public static <T> byte[] serializeValue(T value, TypeSerializer<T> serializer) throws IOException {
if (value != null) {
// Serialize
DataOutputSerializer dos = new DataOutputSerializer(32);
serializer.serialize(value, dos);
return dos.getCopyOfBuffer();
} else {
return null;
}
} | java | public static <T> byte[] serializeValue(T value, TypeSerializer<T> serializer) throws IOException {
if (value != null) {
// Serialize
DataOutputSerializer dos = new DataOutputSerializer(32);
serializer.serialize(value, dos);
return dos.getCopyOfBuffer();
} else {
return null;
}
} | [
"public",
"static",
"<",
"T",
">",
"byte",
"[",
"]",
"serializeValue",
"(",
"T",
"value",
",",
"TypeSerializer",
"<",
"T",
">",
"serializer",
")",
"throws",
"IOException",
"{",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"// Serialize",
"DataOutputSerializ... | Serializes the value with the given serializer.
@param value Value of type T to serialize
@param serializer Serializer for T
@param <T> Type of the value
@return Serialized value or <code>null</code> if value <code>null</code>
@throws IOException On failure during serialization | [
"Serializes",
"the",
"value",
"with",
"the",
"given",
"serializer",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/state/serialization/KvStateSerializer.java#L124-L133 |
123,899 | apache/flink | flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/state/serialization/KvStateSerializer.java | KvStateSerializer.deserializeValue | public static <T> T deserializeValue(byte[] serializedValue, TypeSerializer<T> serializer) throws IOException {
if (serializedValue == null) {
return null;
} else {
final DataInputDeserializer deser = new DataInputDeserializer(
serializedValue, 0, serializedValue.length);
final T value = serializer.des... | java | public static <T> T deserializeValue(byte[] serializedValue, TypeSerializer<T> serializer) throws IOException {
if (serializedValue == null) {
return null;
} else {
final DataInputDeserializer deser = new DataInputDeserializer(
serializedValue, 0, serializedValue.length);
final T value = serializer.des... | [
"public",
"static",
"<",
"T",
">",
"T",
"deserializeValue",
"(",
"byte",
"[",
"]",
"serializedValue",
",",
"TypeSerializer",
"<",
"T",
">",
"serializer",
")",
"throws",
"IOException",
"{",
"if",
"(",
"serializedValue",
"==",
"null",
")",
"{",
"return",
"nu... | Deserializes the value with the given serializer.
@param serializedValue Serialized value of type T
@param serializer Serializer for T
@param <T> Type of the value
@return Deserialized value or <code>null</code> if the serialized value
is <code>null</code>
@throws IOException On failure during deseria... | [
"Deserializes",
"the",
"value",
"with",
"the",
"given",
"serializer",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/state/serialization/KvStateSerializer.java#L145-L160 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.