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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
124,200 | apache/flink | flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/ClosableBlockingQueue.java | ClosableBlockingQueue.getElementBlocking | public E getElementBlocking() throws InterruptedException {
lock.lock();
try {
while (open && elements.isEmpty()) {
nonEmpty.await();
}
if (open) {
return elements.removeFirst();
} else {
throw new IllegalStateException("queue is closed");
}
} finally {
lock.unlock();
}
} | java | public E getElementBlocking() throws InterruptedException {
lock.lock();
try {
while (open && elements.isEmpty()) {
nonEmpty.await();
}
if (open) {
return elements.removeFirst();
} else {
throw new IllegalStateException("queue is closed");
}
} finally {
lock.unlock();
}
} | [
"public",
"E",
"getElementBlocking",
"(",
")",
"throws",
"InterruptedException",
"{",
"lock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"while",
"(",
"open",
"&&",
"elements",
".",
"isEmpty",
"(",
")",
")",
"{",
"nonEmpty",
".",
"await",
"(",
")",
";",
... | Returns the next element in the queue. If the queue is empty, this method
waits until at least one element is added.
<p>The method throws an {@code IllegalStateException} if the queue is closed.
Checking whether the queue is open and removing the next element is one atomic operation.
@return The next element in the q... | [
"Returns",
"the",
"next",
"element",
"in",
"the",
"queue",
".",
"If",
"the",
"queue",
"is",
"empty",
"this",
"method",
"waits",
"until",
"at",
"least",
"one",
"element",
"is",
"added",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/ClosableBlockingQueue.java#L320-L335 |
124,201 | apache/flink | flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/ClosableBlockingQueue.java | ClosableBlockingQueue.getElementBlocking | public E getElementBlocking(long timeoutMillis) throws InterruptedException {
if (timeoutMillis == 0L) {
// wait forever case
return getElementBlocking();
} else if (timeoutMillis < 0L) {
throw new IllegalArgumentException("invalid timeout");
}
final long deadline = System.nanoTime() + timeoutMillis *... | java | public E getElementBlocking(long timeoutMillis) throws InterruptedException {
if (timeoutMillis == 0L) {
// wait forever case
return getElementBlocking();
} else if (timeoutMillis < 0L) {
throw new IllegalArgumentException("invalid timeout");
}
final long deadline = System.nanoTime() + timeoutMillis *... | [
"public",
"E",
"getElementBlocking",
"(",
"long",
"timeoutMillis",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"timeoutMillis",
"==",
"0L",
")",
"{",
"// wait forever case",
"return",
"getElementBlocking",
"(",
")",
";",
"}",
"else",
"if",
"(",
"timeo... | Returns the next element in the queue. If the queue is empty, this method
waits at most a certain time until an element becomes available. If no element
is available after that time, the method returns null.
<p>The method throws an {@code IllegalStateException} if the queue is closed.
Checking whether the queue is ope... | [
"Returns",
"the",
"next",
"element",
"in",
"the",
"queue",
".",
"If",
"the",
"queue",
"is",
"empty",
"this",
"method",
"waits",
"at",
"most",
"a",
"certain",
"time",
"until",
"an",
"element",
"becomes",
"available",
".",
"If",
"no",
"element",
"is",
"ava... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/ClosableBlockingQueue.java#L352-L380 |
124,202 | apache/flink | flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/ClosableBlockingQueue.java | ClosableBlockingQueue.getBatchBlocking | public List<E> getBatchBlocking() throws InterruptedException {
lock.lock();
try {
while (open && elements.isEmpty()) {
nonEmpty.await();
}
if (open) {
ArrayList<E> result = new ArrayList<>(elements);
elements.clear();
return result;
} else {
throw new IllegalStateException("queue is... | java | public List<E> getBatchBlocking() throws InterruptedException {
lock.lock();
try {
while (open && elements.isEmpty()) {
nonEmpty.await();
}
if (open) {
ArrayList<E> result = new ArrayList<>(elements);
elements.clear();
return result;
} else {
throw new IllegalStateException("queue is... | [
"public",
"List",
"<",
"E",
">",
"getBatchBlocking",
"(",
")",
"throws",
"InterruptedException",
"{",
"lock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"while",
"(",
"open",
"&&",
"elements",
".",
"isEmpty",
"(",
")",
")",
"{",
"nonEmpty",
".",
"await",
... | Gets all the elements found in the list, or blocks until at least one element
was added. If the queue is empty when this method is called, it blocks until
at least one element is added.
<p>This method always returns a list with at least one element.
<p>The method throws an {@code IllegalStateException} if the queue i... | [
"Gets",
"all",
"the",
"elements",
"found",
"in",
"the",
"list",
"or",
"blocks",
"until",
"at",
"least",
"one",
"element",
"was",
"added",
".",
"If",
"the",
"queue",
"is",
"empty",
"when",
"this",
"method",
"is",
"called",
"it",
"blocks",
"until",
"at",
... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/ClosableBlockingQueue.java#L398-L414 |
124,203 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/async/queue/UnorderedStreamElementQueue.java | UnorderedStreamElementQueue.onCompleteHandler | public void onCompleteHandler(StreamElementQueueEntry<?> streamElementQueueEntry) throws InterruptedException {
lock.lockInterruptibly();
try {
if (firstSet.remove(streamElementQueueEntry)) {
completedQueue.offer(streamElementQueueEntry);
while (firstSet.isEmpty() && firstSet != lastSet) {
firstSe... | java | public void onCompleteHandler(StreamElementQueueEntry<?> streamElementQueueEntry) throws InterruptedException {
lock.lockInterruptibly();
try {
if (firstSet.remove(streamElementQueueEntry)) {
completedQueue.offer(streamElementQueueEntry);
while (firstSet.isEmpty() && firstSet != lastSet) {
firstSe... | [
"public",
"void",
"onCompleteHandler",
"(",
"StreamElementQueueEntry",
"<",
"?",
">",
"streamElementQueueEntry",
")",
"throws",
"InterruptedException",
"{",
"lock",
".",
"lockInterruptibly",
"(",
")",
";",
"try",
"{",
"if",
"(",
"firstSet",
".",
"remove",
"(",
"... | Callback for onComplete events for the given stream element queue entry. Whenever a queue
entry is completed, it is checked whether this entry belongs to the first set. If this is the
case, then the element is added to the completed entries queue from where it can be consumed.
If the first set becomes empty, then the n... | [
"Callback",
"for",
"onComplete",
"events",
"for",
"the",
"given",
"stream",
"element",
"queue",
"entry",
".",
"Whenever",
"a",
"queue",
"entry",
"is",
"completed",
"it",
"is",
"checked",
"whether",
"this",
"entry",
"belongs",
"to",
"the",
"first",
"set",
"."... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/async/queue/UnorderedStreamElementQueue.java#L231-L259 |
124,204 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/async/queue/UnorderedStreamElementQueue.java | UnorderedStreamElementQueue.addEntry | private <T> void addEntry(StreamElementQueueEntry<T> streamElementQueueEntry) {
assert(lock.isHeldByCurrentThread());
if (streamElementQueueEntry.isWatermark()) {
lastSet = new HashSet<>(capacity);
if (firstSet.isEmpty()) {
firstSet.add(streamElementQueueEntry);
} else {
Set<StreamElementQueueEnt... | java | private <T> void addEntry(StreamElementQueueEntry<T> streamElementQueueEntry) {
assert(lock.isHeldByCurrentThread());
if (streamElementQueueEntry.isWatermark()) {
lastSet = new HashSet<>(capacity);
if (firstSet.isEmpty()) {
firstSet.add(streamElementQueueEntry);
} else {
Set<StreamElementQueueEnt... | [
"private",
"<",
"T",
">",
"void",
"addEntry",
"(",
"StreamElementQueueEntry",
"<",
"T",
">",
"streamElementQueueEntry",
")",
"{",
"assert",
"(",
"lock",
".",
"isHeldByCurrentThread",
"(",
")",
")",
";",
"if",
"(",
"streamElementQueueEntry",
".",
"isWatermark",
... | Add the given stream element queue entry to the current last set if it is not a watermark.
If it is a watermark, then stop adding to the current last set, insert the watermark into its
own set and add a new last set.
@param streamElementQueueEntry to be inserted
@param <T> Type of the stream element queue entry's resu... | [
"Add",
"the",
"given",
"stream",
"element",
"queue",
"entry",
"to",
"the",
"current",
"last",
"set",
"if",
"it",
"is",
"not",
"a",
"watermark",
".",
"If",
"it",
"is",
"a",
"watermark",
"then",
"stop",
"adding",
"to",
"the",
"current",
"last",
"set",
"i... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/async/queue/UnorderedStreamElementQueue.java#L269-L304 |
124,205 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java | StreamGraphGenerator.generateInternal | private StreamGraph generateInternal(List<StreamTransformation<?>> transformations) {
for (StreamTransformation<?> transformation: transformations) {
transform(transformation);
}
return streamGraph;
} | java | private StreamGraph generateInternal(List<StreamTransformation<?>> transformations) {
for (StreamTransformation<?> transformation: transformations) {
transform(transformation);
}
return streamGraph;
} | [
"private",
"StreamGraph",
"generateInternal",
"(",
"List",
"<",
"StreamTransformation",
"<",
"?",
">",
">",
"transformations",
")",
"{",
"for",
"(",
"StreamTransformation",
"<",
"?",
">",
"transformation",
":",
"transformations",
")",
"{",
"transform",
"(",
"tra... | This starts the actual transformation, beginning from the sinks. | [
"This",
"starts",
"the",
"actual",
"transformation",
"beginning",
"from",
"the",
"sinks",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java#L130-L135 |
124,206 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java | StreamGraphGenerator.determineSlotSharingGroup | private String determineSlotSharingGroup(String specifiedGroup, Collection<Integer> inputIds) {
if (specifiedGroup != null) {
return specifiedGroup;
} else {
String inputGroup = null;
for (int id: inputIds) {
String inputGroupCandidate = streamGraph.getSlotSharingGroup(id);
if (inputGroup == null) ... | java | private String determineSlotSharingGroup(String specifiedGroup, Collection<Integer> inputIds) {
if (specifiedGroup != null) {
return specifiedGroup;
} else {
String inputGroup = null;
for (int id: inputIds) {
String inputGroupCandidate = streamGraph.getSlotSharingGroup(id);
if (inputGroup == null) ... | [
"private",
"String",
"determineSlotSharingGroup",
"(",
"String",
"specifiedGroup",
",",
"Collection",
"<",
"Integer",
">",
"inputIds",
")",
"{",
"if",
"(",
"specifiedGroup",
"!=",
"null",
")",
"{",
"return",
"specifiedGroup",
";",
"}",
"else",
"{",
"String",
"... | Determines the slot sharing group for an operation based on the slot sharing group set by
the user and the slot sharing groups of the inputs.
<p>If the user specifies a group name, this is taken as is. If nothing is specified and
the input operations all have the same group name then this name is taken. Otherwise the
... | [
"Determines",
"the",
"slot",
"sharing",
"group",
"for",
"an",
"operation",
"based",
"on",
"the",
"slot",
"sharing",
"group",
"set",
"by",
"the",
"user",
"and",
"the",
"slot",
"sharing",
"groups",
"of",
"the",
"inputs",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java#L639-L654 |
124,207 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/util/JvmShutdownSafeguard.java | JvmShutdownSafeguard.installAsShutdownHook | public static void installAsShutdownHook(Logger logger, long delayMillis) {
checkArgument(delayMillis >= 0, "delay must be >= 0");
// install the blocking shutdown hook
Thread shutdownHook = new JvmShutdownSafeguard(delayMillis);
ShutdownHookUtil.addShutdownHookThread(shutdownHook, JvmShutdownSafeguard.class.g... | java | public static void installAsShutdownHook(Logger logger, long delayMillis) {
checkArgument(delayMillis >= 0, "delay must be >= 0");
// install the blocking shutdown hook
Thread shutdownHook = new JvmShutdownSafeguard(delayMillis);
ShutdownHookUtil.addShutdownHookThread(shutdownHook, JvmShutdownSafeguard.class.g... | [
"public",
"static",
"void",
"installAsShutdownHook",
"(",
"Logger",
"logger",
",",
"long",
"delayMillis",
")",
"{",
"checkArgument",
"(",
"delayMillis",
">=",
"0",
",",
"\"delay must be >= 0\"",
")",
";",
"// install the blocking shutdown hook",
"Thread",
"shutdownHook"... | Installs the safeguard shutdown hook. The maximum time that the JVM is allowed to spend
on shutdown before being killed is the given number of milliseconds.
@param logger The logger to log errors to.
@param delayMillis The delay (in milliseconds) to wait after clean shutdown was stared,
before forcibly terminatin... | [
"Installs",
"the",
"safeguard",
"shutdown",
"hook",
".",
"The",
"maximum",
"time",
"that",
"the",
"JVM",
"is",
"allowed",
"to",
"spend",
"on",
"shutdown",
"before",
"being",
"killed",
"is",
"the",
"given",
"number",
"of",
"milliseconds",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/util/JvmShutdownSafeguard.java#L112-L118 |
124,208 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/JobLeaderIdService.java | JobLeaderIdService.start | public void start(JobLeaderIdActions initialJobLeaderIdActions) throws Exception {
if (isStarted()) {
clear();
}
this.jobLeaderIdActions = Preconditions.checkNotNull(initialJobLeaderIdActions);
} | java | public void start(JobLeaderIdActions initialJobLeaderIdActions) throws Exception {
if (isStarted()) {
clear();
}
this.jobLeaderIdActions = Preconditions.checkNotNull(initialJobLeaderIdActions);
} | [
"public",
"void",
"start",
"(",
"JobLeaderIdActions",
"initialJobLeaderIdActions",
")",
"throws",
"Exception",
"{",
"if",
"(",
"isStarted",
"(",
")",
")",
"{",
"clear",
"(",
")",
";",
"}",
"this",
".",
"jobLeaderIdActions",
"=",
"Preconditions",
".",
"checkNot... | Start the service with the given job leader actions.
@param initialJobLeaderIdActions to use for job leader id actions
@throws Exception which is thrown when clearing up old state | [
"Start",
"the",
"service",
"with",
"the",
"given",
"job",
"leader",
"actions",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/JobLeaderIdService.java#L87-L93 |
124,209 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/JobLeaderIdService.java | JobLeaderIdService.clear | public void clear() throws Exception {
Exception exception = null;
for (JobLeaderIdListener listener: jobLeaderIdListeners.values()) {
try {
listener.stop();
} catch (Exception e) {
exception = ExceptionUtils.firstOrSuppressed(e, exception);
}
}
if (exception != null) {
ExceptionUtils.reth... | java | public void clear() throws Exception {
Exception exception = null;
for (JobLeaderIdListener listener: jobLeaderIdListeners.values()) {
try {
listener.stop();
} catch (Exception e) {
exception = ExceptionUtils.firstOrSuppressed(e, exception);
}
}
if (exception != null) {
ExceptionUtils.reth... | [
"public",
"void",
"clear",
"(",
")",
"throws",
"Exception",
"{",
"Exception",
"exception",
"=",
"null",
";",
"for",
"(",
"JobLeaderIdListener",
"listener",
":",
"jobLeaderIdListeners",
".",
"values",
"(",
")",
")",
"{",
"try",
"{",
"listener",
".",
"stop",
... | Stop and clear the currently registered job leader id listeners.
@throws Exception which is thrown in case a retrieval service cannot be stopped properly | [
"Stop",
"and",
"clear",
"the",
"currently",
"registered",
"job",
"leader",
"id",
"listeners",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/JobLeaderIdService.java#L120-L137 |
124,210 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/JobLeaderIdService.java | JobLeaderIdService.addJob | public void addJob(JobID jobId) throws Exception {
Preconditions.checkNotNull(jobLeaderIdActions);
LOG.debug("Add job {} to job leader id monitoring.", jobId);
if (!jobLeaderIdListeners.containsKey(jobId)) {
LeaderRetrievalService leaderRetrievalService = highAvailabilityServices.getJobManagerLeaderRetriever... | java | public void addJob(JobID jobId) throws Exception {
Preconditions.checkNotNull(jobLeaderIdActions);
LOG.debug("Add job {} to job leader id monitoring.", jobId);
if (!jobLeaderIdListeners.containsKey(jobId)) {
LeaderRetrievalService leaderRetrievalService = highAvailabilityServices.getJobManagerLeaderRetriever... | [
"public",
"void",
"addJob",
"(",
"JobID",
"jobId",
")",
"throws",
"Exception",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"jobLeaderIdActions",
")",
";",
"LOG",
".",
"debug",
"(",
"\"Add job {} to job leader id monitoring.\"",
",",
"jobId",
")",
";",
"if",
... | Add a job to be monitored to retrieve the job leader id.
@param jobId identifying the job to monitor
@throws Exception if the job could not be added to the service | [
"Add",
"a",
"job",
"to",
"be",
"monitored",
"to",
"retrieve",
"the",
"job",
"leader",
"id",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/JobLeaderIdService.java#L145-L156 |
124,211 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/JobLeaderIdService.java | JobLeaderIdService.removeJob | public void removeJob(JobID jobId) throws Exception {
LOG.debug("Remove job {} from job leader id monitoring.", jobId);
JobLeaderIdListener listener = jobLeaderIdListeners.remove(jobId);
if (listener != null) {
listener.stop();
}
} | java | public void removeJob(JobID jobId) throws Exception {
LOG.debug("Remove job {} from job leader id monitoring.", jobId);
JobLeaderIdListener listener = jobLeaderIdListeners.remove(jobId);
if (listener != null) {
listener.stop();
}
} | [
"public",
"void",
"removeJob",
"(",
"JobID",
"jobId",
")",
"throws",
"Exception",
"{",
"LOG",
".",
"debug",
"(",
"\"Remove job {} from job leader id monitoring.\"",
",",
"jobId",
")",
";",
"JobLeaderIdListener",
"listener",
"=",
"jobLeaderIdListeners",
".",
"remove",
... | Remove the given job from being monitored by the service.
@param jobId identifying the job to remove from monitor
@throws Exception if removing the job fails | [
"Remove",
"the",
"given",
"job",
"from",
"being",
"monitored",
"by",
"the",
"service",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/JobLeaderIdService.java#L164-L172 |
124,212 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java | BootstrapTools.generateTaskManagerConfiguration | public static Configuration generateTaskManagerConfiguration(
Configuration baseConfig,
String jobManagerHostname,
int jobManagerPort,
int numSlots,
FiniteDuration registrationTimeout) {
Configuration cfg = cloneConfiguration(baseConfig);
if (jobManagerHostname != null && !jobManagerHostname.i... | java | public static Configuration generateTaskManagerConfiguration(
Configuration baseConfig,
String jobManagerHostname,
int jobManagerPort,
int numSlots,
FiniteDuration registrationTimeout) {
Configuration cfg = cloneConfiguration(baseConfig);
if (jobManagerHostname != null && !jobManagerHostname.i... | [
"public",
"static",
"Configuration",
"generateTaskManagerConfiguration",
"(",
"Configuration",
"baseConfig",
",",
"String",
"jobManagerHostname",
",",
"int",
"jobManagerPort",
",",
"int",
"numSlots",
",",
"FiniteDuration",
"registrationTimeout",
")",
"{",
"Configuration",
... | Generate a task manager configuration.
@param baseConfig Config to start from.
@param jobManagerHostname Job manager host name.
@param jobManagerPort Port of the job manager.
@param numSlots Number of slots to configure.
@param registrationTimeout Timeout for registration
@return TaskManager configuration | [
"Generate",
"a",
"task",
"manager",
"configuration",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java#L280-L303 |
124,213 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java | BootstrapTools.writeConfiguration | public static void writeConfiguration(Configuration cfg, File file) throws IOException {
try (FileWriter fwrt = new FileWriter(file);
PrintWriter out = new PrintWriter(fwrt)) {
for (String key : cfg.keySet()) {
String value = cfg.getString(key, null);
out.print(key);
out.print(": ");
out.println... | java | public static void writeConfiguration(Configuration cfg, File file) throws IOException {
try (FileWriter fwrt = new FileWriter(file);
PrintWriter out = new PrintWriter(fwrt)) {
for (String key : cfg.keySet()) {
String value = cfg.getString(key, null);
out.print(key);
out.print(": ");
out.println... | [
"public",
"static",
"void",
"writeConfiguration",
"(",
"Configuration",
"cfg",
",",
"File",
"file",
")",
"throws",
"IOException",
"{",
"try",
"(",
"FileWriter",
"fwrt",
"=",
"new",
"FileWriter",
"(",
"file",
")",
";",
"PrintWriter",
"out",
"=",
"new",
"Print... | Writes a Flink YAML config file from a Flink Configuration object.
@param cfg The Flink config
@param file The File to write to
@throws IOException | [
"Writes",
"a",
"Flink",
"YAML",
"config",
"file",
"from",
"a",
"Flink",
"Configuration",
"object",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java#L311-L321 |
124,214 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java | BootstrapTools.substituteDeprecatedConfigKey | public static void substituteDeprecatedConfigKey(Configuration config, String deprecated, String designated) {
// set the designated key only if it is not set already
if (!config.containsKey(designated)) {
final String valueForDeprecated = config.getString(deprecated, null);
if (valueForDeprecated != null) {
... | java | public static void substituteDeprecatedConfigKey(Configuration config, String deprecated, String designated) {
// set the designated key only if it is not set already
if (!config.containsKey(designated)) {
final String valueForDeprecated = config.getString(deprecated, null);
if (valueForDeprecated != null) {
... | [
"public",
"static",
"void",
"substituteDeprecatedConfigKey",
"(",
"Configuration",
"config",
",",
"String",
"deprecated",
",",
"String",
"designated",
")",
"{",
"// set the designated key only if it is not set already",
"if",
"(",
"!",
"config",
".",
"containsKey",
"(",
... | Sets the value of a new config key to the value of a deprecated config key.
@param config Config to write
@param deprecated The old config key
@param designated The new config key | [
"Sets",
"the",
"value",
"of",
"a",
"new",
"config",
"key",
"to",
"the",
"value",
"of",
"a",
"deprecated",
"config",
"key",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java#L329-L337 |
124,215 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java | BootstrapTools.substituteDeprecatedConfigPrefix | public static void substituteDeprecatedConfigPrefix(
Configuration config,
String deprecatedPrefix,
String designatedPrefix) {
// set the designated key only if it is not set already
final int prefixLen = deprecatedPrefix.length();
Configuration replacement = new Configuration();
for (String key : c... | java | public static void substituteDeprecatedConfigPrefix(
Configuration config,
String deprecatedPrefix,
String designatedPrefix) {
// set the designated key only if it is not set already
final int prefixLen = deprecatedPrefix.length();
Configuration replacement = new Configuration();
for (String key : c... | [
"public",
"static",
"void",
"substituteDeprecatedConfigPrefix",
"(",
"Configuration",
"config",
",",
"String",
"deprecatedPrefix",
",",
"String",
"designatedPrefix",
")",
"{",
"// set the designated key only if it is not set already",
"final",
"int",
"prefixLen",
"=",
"deprec... | Sets the value of a new config key to the value of a deprecated config key. Taking into
account the changed prefix.
@param config Config to write
@param deprecatedPrefix Old prefix of key
@param designatedPrefix New prefix of key | [
"Sets",
"the",
"value",
"of",
"a",
"new",
"config",
"key",
"to",
"the",
"value",
"of",
"a",
"deprecated",
"config",
"key",
".",
"Taking",
"into",
"account",
"the",
"changed",
"prefix",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java#L346-L366 |
124,216 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java | BootstrapTools.getTaskManagerShellCommand | public static String getTaskManagerShellCommand(
Configuration flinkConfig,
ContaineredTaskManagerParameters tmParams,
String configDirectory,
String logDirectory,
boolean hasLogback,
boolean hasLog4j,
boolean hasKrb5,
Class<?> mainClass) {
final Map<String, String> startCommandValues = new H... | java | public static String getTaskManagerShellCommand(
Configuration flinkConfig,
ContaineredTaskManagerParameters tmParams,
String configDirectory,
String logDirectory,
boolean hasLogback,
boolean hasLog4j,
boolean hasKrb5,
Class<?> mainClass) {
final Map<String, String> startCommandValues = new H... | [
"public",
"static",
"String",
"getTaskManagerShellCommand",
"(",
"Configuration",
"flinkConfig",
",",
"ContaineredTaskManagerParameters",
"tmParams",
",",
"String",
"configDirectory",
",",
"String",
"logDirectory",
",",
"boolean",
"hasLogback",
",",
"boolean",
"hasLog4j",
... | Generates the shell command to start a task manager.
@param flinkConfig The Flink configuration.
@param tmParams Parameters for the task manager.
@param configDirectory The configuration directory for the flink-conf.yaml
@param logDirectory The log directory.
@param hasLogback Uses logback?
@param hasLog4j Uses log4j?
... | [
"Generates",
"the",
"shell",
"command",
"to",
"start",
"a",
"task",
"manager",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java#L413-L476 |
124,217 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java | BootstrapTools.getStartCommand | public static String getStartCommand(String template,
Map<String, String> startCommandValues) {
for (Map.Entry<String, String> variable : startCommandValues
.entrySet()) {
template = template
.replace("%" + variable.getKey() + "%", variable.getValue());
}
return template;
} | java | public static String getStartCommand(String template,
Map<String, String> startCommandValues) {
for (Map.Entry<String, String> variable : startCommandValues
.entrySet()) {
template = template
.replace("%" + variable.getKey() + "%", variable.getValue());
}
return template;
} | [
"public",
"static",
"String",
"getStartCommand",
"(",
"String",
"template",
",",
"Map",
"<",
"String",
",",
"String",
">",
"startCommandValues",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"String",
">",
"variable",
":",
"startCommandValue... | Replaces placeholders in the template start command with values from startCommandValues.
<p>If the default template {@link ConfigConstants#DEFAULT_YARN_CONTAINER_START_COMMAND_TEMPLATE}
is used, the following keys must be present in the map or the resulting
command will still contain placeholders:
<ul>
<li><tt>java</t... | [
"Replaces",
"placeholders",
"in",
"the",
"template",
"start",
"command",
"with",
"values",
"from",
"startCommandValues",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java#L507-L515 |
124,218 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java | BootstrapTools.cloneConfiguration | public static Configuration cloneConfiguration(Configuration configuration) {
final Configuration clonedConfiguration = new Configuration(configuration);
if (clonedConfiguration.getBoolean(USE_LOCAL_DEFAULT_TMP_DIRS)){
clonedConfiguration.removeConfig(CoreOptions.TMP_DIRS);
clonedConfiguration.removeConfig(U... | java | public static Configuration cloneConfiguration(Configuration configuration) {
final Configuration clonedConfiguration = new Configuration(configuration);
if (clonedConfiguration.getBoolean(USE_LOCAL_DEFAULT_TMP_DIRS)){
clonedConfiguration.removeConfig(CoreOptions.TMP_DIRS);
clonedConfiguration.removeConfig(U... | [
"public",
"static",
"Configuration",
"cloneConfiguration",
"(",
"Configuration",
"configuration",
")",
"{",
"final",
"Configuration",
"clonedConfiguration",
"=",
"new",
"Configuration",
"(",
"configuration",
")",
";",
"if",
"(",
"clonedConfiguration",
".",
"getBoolean",... | Clones the given configuration and resets instance specific config options.
@param configuration to clone
@return Cloned configuration with reset instance specific config options | [
"Clones",
"the",
"given",
"configuration",
"and",
"resets",
"instance",
"specific",
"config",
"options",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java#L542-L551 |
124,219 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/iomanager/BufferFileChannelReader.java | BufferFileChannelReader.readBufferFromFileChannel | public boolean readBufferFromFileChannel(Buffer buffer) throws IOException {
checkArgument(fileChannel.size() - fileChannel.position() > 0);
// Read header
header.clear();
fileChannel.read(header);
header.flip();
final boolean isBuffer = header.getInt() == 1;
final int size = header.getInt();
if (siz... | java | public boolean readBufferFromFileChannel(Buffer buffer) throws IOException {
checkArgument(fileChannel.size() - fileChannel.position() > 0);
// Read header
header.clear();
fileChannel.read(header);
header.flip();
final boolean isBuffer = header.getInt() == 1;
final int size = header.getInt();
if (siz... | [
"public",
"boolean",
"readBufferFromFileChannel",
"(",
"Buffer",
"buffer",
")",
"throws",
"IOException",
"{",
"checkArgument",
"(",
"fileChannel",
".",
"size",
"(",
")",
"-",
"fileChannel",
".",
"position",
"(",
")",
">",
"0",
")",
";",
"// Read header",
"head... | Reads data from the object's file channel into the given buffer.
@param buffer the buffer to read into
@return whether the end of the file has been reached (<tt>true</tt>) or not (<tt>false</tt>) | [
"Reads",
"data",
"from",
"the",
"object",
"s",
"file",
"channel",
"into",
"the",
"given",
"buffer",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/iomanager/BufferFileChannelReader.java#L47-L71 |
124,220 | apache/flink | flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/hadoopcompatibility/mapred/wrapper/HadoopOutputCollector.java | HadoopOutputCollector.collect | @Override
public void collect(final KEY key, final VALUE val) throws IOException {
this.outTuple.f0 = key;
this.outTuple.f1 = val;
this.flinkCollector.collect(outTuple);
} | java | @Override
public void collect(final KEY key, final VALUE val) throws IOException {
this.outTuple.f0 = key;
this.outTuple.f1 = val;
this.flinkCollector.collect(outTuple);
} | [
"@",
"Override",
"public",
"void",
"collect",
"(",
"final",
"KEY",
"key",
",",
"final",
"VALUE",
"val",
")",
"throws",
"IOException",
"{",
"this",
".",
"outTuple",
".",
"f0",
"=",
"key",
";",
"this",
".",
"outTuple",
".",
"f1",
"=",
"val",
";",
"this... | Use the wrapped Flink collector to collect a key-value pair for Flink.
@param key the key to collect
@param val the value to collect
@throws IOException unexpected of key or value in key-value pair. | [
"Use",
"the",
"wrapped",
"Flink",
"collector",
"to",
"collect",
"a",
"key",
"-",
"value",
"pair",
"for",
"Flink",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/hadoopcompatibility/mapred/wrapper/HadoopOutputCollector.java#L54-L59 |
124,221 | apache/flink | flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/KafkaTopicsDescriptor.java | KafkaTopicsDescriptor.isMatchingTopic | public boolean isMatchingTopic(String topic) {
if (isFixedTopics()) {
return getFixedTopics().contains(topic);
} else {
return topicPattern.matcher(topic).matches();
}
} | java | public boolean isMatchingTopic(String topic) {
if (isFixedTopics()) {
return getFixedTopics().contains(topic);
} else {
return topicPattern.matcher(topic).matches();
}
} | [
"public",
"boolean",
"isMatchingTopic",
"(",
"String",
"topic",
")",
"{",
"if",
"(",
"isFixedTopics",
"(",
")",
")",
"{",
"return",
"getFixedTopics",
"(",
")",
".",
"contains",
"(",
"topic",
")",
";",
"}",
"else",
"{",
"return",
"topicPattern",
".",
"mat... | Check if the input topic matches the topics described by this KafkaTopicDescriptor.
@return true if found a match. | [
"Check",
"if",
"the",
"input",
"topic",
"matches",
"the",
"topics",
"described",
"by",
"this",
"KafkaTopicDescriptor",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/KafkaTopicsDescriptor.java#L68-L74 |
124,222 | apache/flink | flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/config/OffsetCommitModes.java | OffsetCommitModes.fromConfiguration | public static OffsetCommitMode fromConfiguration(
boolean enableAutoCommit,
boolean enableCommitOnCheckpoint,
boolean enableCheckpointing) {
if (enableCheckpointing) {
// if checkpointing is enabled, the mode depends only on whether committing on checkpoints is enabled
return (enableCommitOnCheckpoint... | java | public static OffsetCommitMode fromConfiguration(
boolean enableAutoCommit,
boolean enableCommitOnCheckpoint,
boolean enableCheckpointing) {
if (enableCheckpointing) {
// if checkpointing is enabled, the mode depends only on whether committing on checkpoints is enabled
return (enableCommitOnCheckpoint... | [
"public",
"static",
"OffsetCommitMode",
"fromConfiguration",
"(",
"boolean",
"enableAutoCommit",
",",
"boolean",
"enableCommitOnCheckpoint",
",",
"boolean",
"enableCheckpointing",
")",
"{",
"if",
"(",
"enableCheckpointing",
")",
"{",
"// if checkpointing is enabled, the mode ... | Determine the offset commit mode using several configuration values.
@param enableAutoCommit whether or not auto committing is enabled in the provided Kafka properties.
@param enableCommitOnCheckpoint whether or not committing on checkpoints is enabled.
@param enableCheckpointing whether or not checkpoint is enabled f... | [
"Determine",
"the",
"offset",
"commit",
"mode",
"using",
"several",
"configuration",
"values",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/config/OffsetCommitModes.java#L37-L49 |
124,223 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java | RemoteInputChannel.assignExclusiveSegments | void assignExclusiveSegments(List<MemorySegment> segments) {
checkState(this.initialCredit == 0, "Bug in input channel setup logic: exclusive buffers have " +
"already been set for this input channel.");
checkNotNull(segments);
checkArgument(segments.size() > 0, "The number of exclusive buffers per channel sh... | java | void assignExclusiveSegments(List<MemorySegment> segments) {
checkState(this.initialCredit == 0, "Bug in input channel setup logic: exclusive buffers have " +
"already been set for this input channel.");
checkNotNull(segments);
checkArgument(segments.size() > 0, "The number of exclusive buffers per channel sh... | [
"void",
"assignExclusiveSegments",
"(",
"List",
"<",
"MemorySegment",
">",
"segments",
")",
"{",
"checkState",
"(",
"this",
".",
"initialCredit",
"==",
"0",
",",
"\"Bug in input channel setup logic: exclusive buffers have \"",
"+",
"\"already been set for this input channel.\... | Assigns exclusive buffers to this input channel, and this method should be called only once
after this input channel is created. | [
"Assigns",
"exclusive",
"buffers",
"to",
"this",
"input",
"channel",
"and",
"this",
"method",
"should",
"be",
"called",
"only",
"once",
"after",
"this",
"input",
"channel",
"is",
"created",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java#L135-L150 |
124,224 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java | RemoteInputChannel.requestSubpartition | @VisibleForTesting
@Override
public void requestSubpartition(int subpartitionIndex) throws IOException, InterruptedException {
if (partitionRequestClient == null) {
// Create a client and request the partition
partitionRequestClient = connectionManager
.createPartitionRequestClient(connectionId);
part... | java | @VisibleForTesting
@Override
public void requestSubpartition(int subpartitionIndex) throws IOException, InterruptedException {
if (partitionRequestClient == null) {
// Create a client and request the partition
partitionRequestClient = connectionManager
.createPartitionRequestClient(connectionId);
part... | [
"@",
"VisibleForTesting",
"@",
"Override",
"public",
"void",
"requestSubpartition",
"(",
"int",
"subpartitionIndex",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"if",
"(",
"partitionRequestClient",
"==",
"null",
")",
"{",
"// Create a client and requ... | Requests a remote subpartition. | [
"Requests",
"a",
"remote",
"subpartition",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java#L159-L169 |
124,225 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java | RemoteInputChannel.retriggerSubpartitionRequest | void retriggerSubpartitionRequest(int subpartitionIndex) throws IOException, InterruptedException {
checkState(partitionRequestClient != null, "Missing initial subpartition request.");
if (increaseBackoff()) {
partitionRequestClient.requestSubpartition(
partitionId, subpartitionIndex, this, getCurrentBackof... | java | void retriggerSubpartitionRequest(int subpartitionIndex) throws IOException, InterruptedException {
checkState(partitionRequestClient != null, "Missing initial subpartition request.");
if (increaseBackoff()) {
partitionRequestClient.requestSubpartition(
partitionId, subpartitionIndex, this, getCurrentBackof... | [
"void",
"retriggerSubpartitionRequest",
"(",
"int",
"subpartitionIndex",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"checkState",
"(",
"partitionRequestClient",
"!=",
"null",
",",
"\"Missing initial subpartition request.\"",
")",
";",
"if",
"(",
"incr... | Retriggers a remote subpartition request. | [
"Retriggers",
"a",
"remote",
"subpartition",
"request",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java#L174-L183 |
124,226 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java | RemoteInputChannel.recycle | @Override
public void recycle(MemorySegment segment) {
int numAddedBuffers;
synchronized (bufferQueue) {
// Similar to notifyBufferAvailable(), make sure that we never add a buffer
// after releaseAllResources() released all buffers (see below for details).
if (isReleased.get()) {
try {
inputGat... | java | @Override
public void recycle(MemorySegment segment) {
int numAddedBuffers;
synchronized (bufferQueue) {
// Similar to notifyBufferAvailable(), make sure that we never add a buffer
// after releaseAllResources() released all buffers (see below for details).
if (isReleased.get()) {
try {
inputGat... | [
"@",
"Override",
"public",
"void",
"recycle",
"(",
"MemorySegment",
"segment",
")",
"{",
"int",
"numAddedBuffers",
";",
"synchronized",
"(",
"bufferQueue",
")",
"{",
"// Similar to notifyBufferAvailable(), make sure that we never add a buffer",
"// after releaseAllResources() r... | Exclusive buffer is recycled to this input channel directly and it may trigger return extra
floating buffer and notify increased credit to the producer.
@param segment The exclusive segment of this channel. | [
"Exclusive",
"buffer",
"is",
"recycled",
"to",
"this",
"input",
"channel",
"directly",
"and",
"it",
"may",
"trigger",
"return",
"extra",
"floating",
"buffer",
"and",
"notify",
"increased",
"credit",
"to",
"the",
"producer",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java#L300-L321 |
124,227 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java | RemoteInputChannel.onSenderBacklog | void onSenderBacklog(int backlog) throws IOException {
int numRequestedBuffers = 0;
synchronized (bufferQueue) {
// Similar to notifyBufferAvailable(), make sure that we never add a buffer
// after releaseAllResources() released all buffers (see above for details).
if (isReleased.get()) {
return;
}... | java | void onSenderBacklog(int backlog) throws IOException {
int numRequestedBuffers = 0;
synchronized (bufferQueue) {
// Similar to notifyBufferAvailable(), make sure that we never add a buffer
// after releaseAllResources() released all buffers (see above for details).
if (isReleased.get()) {
return;
}... | [
"void",
"onSenderBacklog",
"(",
"int",
"backlog",
")",
"throws",
"IOException",
"{",
"int",
"numRequestedBuffers",
"=",
"0",
";",
"synchronized",
"(",
"bufferQueue",
")",
"{",
"// Similar to notifyBufferAvailable(), make sure that we never add a buffer",
"// after releaseAllR... | Receives the backlog from the producer's buffer response. If the number of available
buffers is less than backlog + initialCredit, it will request floating buffers from the buffer
pool, and then notify unannounced credits to the producer.
@param backlog The number of unsent buffers in the producer's sub partition. | [
"Receives",
"the",
"backlog",
"from",
"the",
"producer",
"s",
"buffer",
"response",
".",
"If",
"the",
"number",
"of",
"available",
"buffers",
"is",
"less",
"than",
"backlog",
"+",
"initialCredit",
"it",
"will",
"request",
"floating",
"buffers",
"from",
"the",
... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java#L470-L497 |
124,228 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/async/CompletedOperationCache.java | CompletedOperationCache.registerOngoingOperation | public void registerOngoingOperation(
final K operationKey,
final CompletableFuture<R> operationResultFuture) {
final ResultAccessTracker<R> inProgress = ResultAccessTracker.inProgress();
registeredOperationTriggers.put(operationKey, inProgress);
operationResultFuture.whenComplete((result, error) -> {
if... | java | public void registerOngoingOperation(
final K operationKey,
final CompletableFuture<R> operationResultFuture) {
final ResultAccessTracker<R> inProgress = ResultAccessTracker.inProgress();
registeredOperationTriggers.put(operationKey, inProgress);
operationResultFuture.whenComplete((result, error) -> {
if... | [
"public",
"void",
"registerOngoingOperation",
"(",
"final",
"K",
"operationKey",
",",
"final",
"CompletableFuture",
"<",
"R",
">",
"operationResultFuture",
")",
"{",
"final",
"ResultAccessTracker",
"<",
"R",
">",
"inProgress",
"=",
"ResultAccessTracker",
".",
"inPro... | Registers an ongoing operation with the cache.
@param operationResultFuture A future containing the operation result. | [
"Registers",
"an",
"ongoing",
"operation",
"with",
"the",
"cache",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/async/CompletedOperationCache.java#L106-L119 |
124,229 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestServerEndpoint.java | RestServerEndpoint.getServerAddress | @Nullable
public InetSocketAddress getServerAddress() {
synchronized (lock) {
Preconditions.checkState(state != State.CREATED, "The RestServerEndpoint has not been started yet.");
Channel server = this.serverChannel;
if (server != null) {
try {
return ((InetSocketAddress) server.localAddress());
... | java | @Nullable
public InetSocketAddress getServerAddress() {
synchronized (lock) {
Preconditions.checkState(state != State.CREATED, "The RestServerEndpoint has not been started yet.");
Channel server = this.serverChannel;
if (server != null) {
try {
return ((InetSocketAddress) server.localAddress());
... | [
"@",
"Nullable",
"public",
"InetSocketAddress",
"getServerAddress",
"(",
")",
"{",
"synchronized",
"(",
"lock",
")",
"{",
"Preconditions",
".",
"checkState",
"(",
"state",
"!=",
"State",
".",
"CREATED",
",",
"\"The RestServerEndpoint has not been started yet.\"",
")",... | Returns the address on which this endpoint is accepting requests.
@return address on which this endpoint is accepting requests or null if none | [
"Returns",
"the",
"address",
"on",
"which",
"this",
"endpoint",
"is",
"accepting",
"requests",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestServerEndpoint.java#L257-L273 |
124,230 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestServerEndpoint.java | RestServerEndpoint.shutDownInternal | protected CompletableFuture<Void> shutDownInternal() {
synchronized (lock) {
CompletableFuture<?> channelFuture = new CompletableFuture<>();
if (serverChannel != null) {
serverChannel.close().addListener(finished -> {
if (finished.isSuccess()) {
channelFuture.complete(null);
} else {
... | java | protected CompletableFuture<Void> shutDownInternal() {
synchronized (lock) {
CompletableFuture<?> channelFuture = new CompletableFuture<>();
if (serverChannel != null) {
serverChannel.close().addListener(finished -> {
if (finished.isSuccess()) {
channelFuture.complete(null);
} else {
... | [
"protected",
"CompletableFuture",
"<",
"Void",
">",
"shutDownInternal",
"(",
")",
"{",
"synchronized",
"(",
"lock",
")",
"{",
"CompletableFuture",
"<",
"?",
">",
"channelFuture",
"=",
"new",
"CompletableFuture",
"<>",
"(",
")",
";",
"if",
"(",
"serverChannel",... | Stops this REST server endpoint.
@return Future which is completed once the shut down has been finished. | [
"Stops",
"this",
"REST",
"server",
"endpoint",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestServerEndpoint.java#L329-L403 |
124,231 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestServerEndpoint.java | RestServerEndpoint.createUploadDir | @VisibleForTesting
static void createUploadDir(final Path uploadDir, final Logger log, final boolean initialCreation) throws IOException {
if (!Files.exists(uploadDir)) {
if (initialCreation) {
log.info("Upload directory {} does not exist. " + uploadDir);
} else {
log.warn("Upload directory {} has been... | java | @VisibleForTesting
static void createUploadDir(final Path uploadDir, final Logger log, final boolean initialCreation) throws IOException {
if (!Files.exists(uploadDir)) {
if (initialCreation) {
log.info("Upload directory {} does not exist. " + uploadDir);
} else {
log.warn("Upload directory {} has been... | [
"@",
"VisibleForTesting",
"static",
"void",
"createUploadDir",
"(",
"final",
"Path",
"uploadDir",
",",
"final",
"Logger",
"log",
",",
"final",
"boolean",
"initialCreation",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"Files",
".",
"exists",
"(",
"upload... | Creates the upload dir if needed. | [
"Creates",
"the",
"upload",
"dir",
"if",
"needed",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestServerEndpoint.java#L450-L461 |
124,232 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/LongHashPartition.java | LongHashPartition.get | public MatchIterator get(long key, int hashCode) {
int bucket = hashCode & numBucketsMask;
int bucketOffset = bucket << 4;
MemorySegment segment = buckets[bucketOffset >>> segmentSizeBits];
int segOffset = bucketOffset & segmentSizeMask;
while (true) {
long address = segment.getLong(segOffset + 8);
if... | java | public MatchIterator get(long key, int hashCode) {
int bucket = hashCode & numBucketsMask;
int bucketOffset = bucket << 4;
MemorySegment segment = buckets[bucketOffset >>> segmentSizeBits];
int segOffset = bucketOffset & segmentSizeMask;
while (true) {
long address = segment.getLong(segOffset + 8);
if... | [
"public",
"MatchIterator",
"get",
"(",
"long",
"key",
",",
"int",
"hashCode",
")",
"{",
"int",
"bucket",
"=",
"hashCode",
"&",
"numBucketsMask",
";",
"int",
"bucketOffset",
"=",
"bucket",
"<<",
"4",
";",
"MemorySegment",
"segment",
"=",
"buckets",
"[",
"bu... | Returns an iterator for all the values for the given key, or null if no value found. | [
"Returns",
"an",
"iterator",
"for",
"all",
"the",
"values",
"for",
"the",
"given",
"key",
"or",
"null",
"if",
"no",
"value",
"found",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/LongHashPartition.java#L255-L281 |
124,233 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/LongHashPartition.java | LongHashPartition.updateIndex | private void updateIndex(
long key,
int hashCode,
long address,
int size,
MemorySegment dataSegment,
int currentPositionInSegment) throws IOException {
assert (numKeys <= numBuckets / 2);
int bucketId = hashCode & numBucketsMask;
// each bucket occupied 16 bytes (long key + long pointer to data... | java | private void updateIndex(
long key,
int hashCode,
long address,
int size,
MemorySegment dataSegment,
int currentPositionInSegment) throws IOException {
assert (numKeys <= numBuckets / 2);
int bucketId = hashCode & numBucketsMask;
// each bucket occupied 16 bytes (long key + long pointer to data... | [
"private",
"void",
"updateIndex",
"(",
"long",
"key",
",",
"int",
"hashCode",
",",
"long",
"address",
",",
"int",
"size",
",",
"MemorySegment",
"dataSegment",
",",
"int",
"currentPositionInSegment",
")",
"throws",
"IOException",
"{",
"assert",
"(",
"numKeys",
... | Update the address in array for given key. | [
"Update",
"the",
"address",
"in",
"array",
"for",
"given",
"key",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/LongHashPartition.java#L286-L343 |
124,234 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateRegistry.java | KvStateRegistry.registerListener | public void registerListener(JobID jobId, KvStateRegistryListener listener) {
final KvStateRegistryListener previousValue = listeners.putIfAbsent(jobId, listener);
if (previousValue != null) {
throw new IllegalStateException("Listener already registered under " + jobId + '.');
}
} | java | public void registerListener(JobID jobId, KvStateRegistryListener listener) {
final KvStateRegistryListener previousValue = listeners.putIfAbsent(jobId, listener);
if (previousValue != null) {
throw new IllegalStateException("Listener already registered under " + jobId + '.');
}
} | [
"public",
"void",
"registerListener",
"(",
"JobID",
"jobId",
",",
"KvStateRegistryListener",
"listener",
")",
"{",
"final",
"KvStateRegistryListener",
"previousValue",
"=",
"listeners",
".",
"putIfAbsent",
"(",
"jobId",
",",
"listener",
")",
";",
"if",
"(",
"previ... | Registers a listener with the registry.
@param jobId identifying the job for which to register a {@link KvStateRegistryListener}
@param listener The registry listener.
@throws IllegalStateException If there is a registered listener | [
"Registers",
"a",
"listener",
"with",
"the",
"registry",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateRegistry.java#L56-L62 |
124,235 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateRegistry.java | KvStateRegistry.registerKvState | public KvStateID registerKvState(
JobID jobId,
JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName,
InternalKvState<?, ?, ?> kvState) {
KvStateID kvStateId = new KvStateID();
if (registeredKvStates.putIfAbsent(kvStateId, new KvStateEntry<>(kvState)) == null) {
final KvS... | java | public KvStateID registerKvState(
JobID jobId,
JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName,
InternalKvState<?, ?, ?> kvState) {
KvStateID kvStateId = new KvStateID();
if (registeredKvStates.putIfAbsent(kvStateId, new KvStateEntry<>(kvState)) == null) {
final KvS... | [
"public",
"KvStateID",
"registerKvState",
"(",
"JobID",
"jobId",
",",
"JobVertexID",
"jobVertexId",
",",
"KeyGroupRange",
"keyGroupRange",
",",
"String",
"registrationName",
",",
"InternalKvState",
"<",
"?",
",",
"?",
",",
"?",
">",
"kvState",
")",
"{",
"KvState... | Registers the KvState instance and returns the assigned ID.
@param jobId JobId the KvState instance belongs to
@param jobVertexId JobVertexID the KvState instance belongs to
@param keyGroupRange Key group range the KvState instance belongs to
@param registrationName Name under which the KvState is r... | [
"Registers",
"the",
"KvState",
"instance",
"and",
"returns",
"the",
"assigned",
"ID",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateRegistry.java#L83-L109 |
124,236 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateRegistry.java | KvStateRegistry.unregisterKvState | public void unregisterKvState(
JobID jobId,
JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName,
KvStateID kvStateId) {
KvStateEntry<?, ?, ?> entry = registeredKvStates.remove(kvStateId);
if (entry != null) {
entry.clear();
final KvStateRegistryListener listener = ge... | java | public void unregisterKvState(
JobID jobId,
JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName,
KvStateID kvStateId) {
KvStateEntry<?, ?, ?> entry = registeredKvStates.remove(kvStateId);
if (entry != null) {
entry.clear();
final KvStateRegistryListener listener = ge... | [
"public",
"void",
"unregisterKvState",
"(",
"JobID",
"jobId",
",",
"JobVertexID",
"jobVertexId",
",",
"KeyGroupRange",
"keyGroupRange",
",",
"String",
"registrationName",
",",
"KvStateID",
"kvStateId",
")",
"{",
"KvStateEntry",
"<",
"?",
",",
"?",
",",
"?",
">",... | Unregisters the KvState instance identified by the given KvStateID.
@param jobId JobId the KvState instance belongs to
@param kvStateId KvStateID to identify the KvState instance
@param keyGroupRange Key group range the KvState instance belongs to | [
"Unregisters",
"the",
"KvState",
"instance",
"identified",
"by",
"the",
"given",
"KvStateID",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateRegistry.java#L118-L138 |
124,237 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/AbstractBinaryExternalMerger.java | AbstractBinaryExternalMerger.getMergingIterator | public BinaryMergeIterator<Entry> getMergingIterator(
List<ChannelWithMeta> channelIDs,
List<FileIOChannel> openChannels)
throws IOException {
// create one iterator per channel id
if (LOG.isDebugEnabled()) {
LOG.debug("Performing merge of " + channelIDs.size() + " sorted streams.");
}
final List<M... | java | public BinaryMergeIterator<Entry> getMergingIterator(
List<ChannelWithMeta> channelIDs,
List<FileIOChannel> openChannels)
throws IOException {
// create one iterator per channel id
if (LOG.isDebugEnabled()) {
LOG.debug("Performing merge of " + channelIDs.size() + " sorted streams.");
}
final List<M... | [
"public",
"BinaryMergeIterator",
"<",
"Entry",
">",
"getMergingIterator",
"(",
"List",
"<",
"ChannelWithMeta",
">",
"channelIDs",
",",
"List",
"<",
"FileIOChannel",
">",
"openChannels",
")",
"throws",
"IOException",
"{",
"// create one iterator per channel id",
"if",
... | Returns an iterator that iterates over the merged result from all given channels.
@param channelIDs The channels that are to be merged and returned.
@return An iterator over the merged records of the input channels.
@throws IOException Thrown, if the readers encounter an I/O problem. | [
"Returns",
"an",
"iterator",
"that",
"iterates",
"over",
"the",
"merged",
"result",
"from",
"all",
"given",
"channels",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/AbstractBinaryExternalMerger.java#L90-L110 |
124,238 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/AbstractBinaryExternalMerger.java | AbstractBinaryExternalMerger.mergeChannelList | public List<ChannelWithMeta> mergeChannelList(List<ChannelWithMeta> channelIDs) throws IOException {
// A channel list with length maxFanIn<sup>i</sup> can be merged to maxFanIn files in i-1 rounds where every merge
// is a full merge with maxFanIn input channels. A partial round includes merges with fewer than max... | java | public List<ChannelWithMeta> mergeChannelList(List<ChannelWithMeta> channelIDs) throws IOException {
// A channel list with length maxFanIn<sup>i</sup> can be merged to maxFanIn files in i-1 rounds where every merge
// is a full merge with maxFanIn input channels. A partial round includes merges with fewer than max... | [
"public",
"List",
"<",
"ChannelWithMeta",
">",
"mergeChannelList",
"(",
"List",
"<",
"ChannelWithMeta",
">",
"channelIDs",
")",
"throws",
"IOException",
"{",
"// A channel list with length maxFanIn<sup>i</sup> can be merged to maxFanIn files in i-1 rounds where every merge",
"// is... | Merges the given sorted runs to a smaller number of sorted runs.
@param channelIDs The IDs of the sorted runs that need to be merged.
@return A list of the IDs of the merged channels.
@throws IOException Thrown, if the readers or writers encountered an I/O problem. | [
"Merges",
"the",
"given",
"sorted",
"runs",
"to",
"a",
"smaller",
"number",
"of",
"sorted",
"runs",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/AbstractBinaryExternalMerger.java#L119-L152 |
124,239 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/AbstractBinaryExternalMerger.java | AbstractBinaryExternalMerger.mergeChannels | private ChannelWithMeta mergeChannels(List<ChannelWithMeta> channelIDs) throws IOException {
// the list with the target iterators
List<FileIOChannel> openChannels = new ArrayList<>(channelIDs.size());
final BinaryMergeIterator<Entry> mergeIterator =
getMergingIterator(channelIDs, openChannels);
// create ... | java | private ChannelWithMeta mergeChannels(List<ChannelWithMeta> channelIDs) throws IOException {
// the list with the target iterators
List<FileIOChannel> openChannels = new ArrayList<>(channelIDs.size());
final BinaryMergeIterator<Entry> mergeIterator =
getMergingIterator(channelIDs, openChannels);
// create ... | [
"private",
"ChannelWithMeta",
"mergeChannels",
"(",
"List",
"<",
"ChannelWithMeta",
">",
"channelIDs",
")",
"throws",
"IOException",
"{",
"// the list with the target iterators",
"List",
"<",
"FileIOChannel",
">",
"openChannels",
"=",
"new",
"ArrayList",
"<>",
"(",
"c... | Merges the sorted runs described by the given Channel IDs into a single sorted run.
@param channelIDs The IDs of the runs' channels.
@return The ID and number of blocks of the channel that describes the merged run. | [
"Merges",
"the",
"sorted",
"runs",
"described",
"by",
"the",
"given",
"Channel",
"IDs",
"into",
"a",
"single",
"sorted",
"run",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/AbstractBinaryExternalMerger.java#L160-L198 |
124,240 | apache/flink | flink-optimizer/src/main/java/org/apache/flink/optimizer/dataproperties/RequestedLocalProperties.java | RequestedLocalProperties.isMetBy | public boolean isMetBy(LocalProperties other) {
if (this.ordering != null) {
// we demand an ordering
return other.getOrdering() != null && this.ordering.isMetBy(other.getOrdering());
} else if (this.groupedFields != null) {
// check if the other fields are unique
if (other.getGroupedFields() != null &&... | java | public boolean isMetBy(LocalProperties other) {
if (this.ordering != null) {
// we demand an ordering
return other.getOrdering() != null && this.ordering.isMetBy(other.getOrdering());
} else if (this.groupedFields != null) {
// check if the other fields are unique
if (other.getGroupedFields() != null &&... | [
"public",
"boolean",
"isMetBy",
"(",
"LocalProperties",
"other",
")",
"{",
"if",
"(",
"this",
".",
"ordering",
"!=",
"null",
")",
"{",
"// we demand an ordering",
"return",
"other",
".",
"getOrdering",
"(",
")",
"!=",
"null",
"&&",
"this",
".",
"ordering",
... | Checks, if this set of properties, as interesting properties, is met by the given
properties.
@param other
The properties for which to check whether they meet these properties.
@return True, if the properties are met, false otherwise. | [
"Checks",
"if",
"this",
"set",
"of",
"properties",
"as",
"interesting",
"properties",
"is",
"met",
"by",
"the",
"given",
"properties",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/dataproperties/RequestedLocalProperties.java#L193-L207 |
124,241 | apache/flink | flink-optimizer/src/main/java/org/apache/flink/optimizer/dataproperties/RequestedLocalProperties.java | RequestedLocalProperties.parameterizeChannel | public void parameterizeChannel(Channel channel) {
LocalProperties current = channel.getLocalProperties();
if (isMetBy(current)) {
// we are met, all is good
channel.setLocalStrategy(LocalStrategy.NONE);
}
else if (this.ordering != null) {
channel.setLocalStrategy(LocalStrategy.SORT, this.ordering.g... | java | public void parameterizeChannel(Channel channel) {
LocalProperties current = channel.getLocalProperties();
if (isMetBy(current)) {
// we are met, all is good
channel.setLocalStrategy(LocalStrategy.NONE);
}
else if (this.ordering != null) {
channel.setLocalStrategy(LocalStrategy.SORT, this.ordering.g... | [
"public",
"void",
"parameterizeChannel",
"(",
"Channel",
"channel",
")",
"{",
"LocalProperties",
"current",
"=",
"channel",
".",
"getLocalProperties",
"(",
")",
";",
"if",
"(",
"isMetBy",
"(",
"current",
")",
")",
"{",
"// we are met, all is good",
"channel",
".... | Parametrizes the local strategy fields of a channel such that the channel produces the desired local properties.
@param channel The channel to parametrize. | [
"Parametrizes",
"the",
"local",
"strategy",
"fields",
"of",
"a",
"channel",
"such",
"that",
"the",
"channel",
"produces",
"the",
"desired",
"local",
"properties",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/dataproperties/RequestedLocalProperties.java#L214-L232 |
124,242 | apache/flink | flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/utils/proxy/OptionalBoolean.java | OptionalBoolean.get | public boolean get() {
switch (state) {
case UNSET:
return valueIfUnset;
case FALSE:
return false;
case TRUE:
return true;
case CONFLICTING:
return valueIfConflicting;
default:
throw new RuntimeException("Unknown state");
}
} | java | public boolean get() {
switch (state) {
case UNSET:
return valueIfUnset;
case FALSE:
return false;
case TRUE:
return true;
case CONFLICTING:
return valueIfConflicting;
default:
throw new RuntimeException("Unknown state");
}
} | [
"public",
"boolean",
"get",
"(",
")",
"{",
"switch",
"(",
"state",
")",
"{",
"case",
"UNSET",
":",
"return",
"valueIfUnset",
";",
"case",
"FALSE",
":",
"return",
"false",
";",
"case",
"TRUE",
":",
"return",
"true",
";",
"case",
"CONFLICTING",
":",
"ret... | Get the boolean state.
@return boolean state | [
"Get",
"the",
"boolean",
"state",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/utils/proxy/OptionalBoolean.java#L66-L79 |
124,243 | apache/flink | flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/utils/proxy/OptionalBoolean.java | OptionalBoolean.conflictsWith | public boolean conflictsWith(OptionalBoolean other) {
return state == State.CONFLICTING
|| other.state == State.CONFLICTING
|| (state == State.TRUE && other.state == State.FALSE)
|| (state == State.FALSE && other.state == State.TRUE);
} | java | public boolean conflictsWith(OptionalBoolean other) {
return state == State.CONFLICTING
|| other.state == State.CONFLICTING
|| (state == State.TRUE && other.state == State.FALSE)
|| (state == State.FALSE && other.state == State.TRUE);
} | [
"public",
"boolean",
"conflictsWith",
"(",
"OptionalBoolean",
"other",
")",
"{",
"return",
"state",
"==",
"State",
".",
"CONFLICTING",
"||",
"other",
".",
"state",
"==",
"State",
".",
"CONFLICTING",
"||",
"(",
"state",
"==",
"State",
".",
"TRUE",
"&&",
"ot... | The conflicting states are true with false and false with true.
@param other object to test with
@return whether the objects conflict | [
"The",
"conflicting",
"states",
"are",
"true",
"with",
"false",
"and",
"false",
"with",
"true",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/utils/proxy/OptionalBoolean.java#L112-L117 |
124,244 | apache/flink | flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/utils/proxy/OptionalBoolean.java | OptionalBoolean.mergeWith | public void mergeWith(OptionalBoolean other) {
if (state == other.state) {
// no change in state
} else if (state == State.UNSET) {
state = other.state;
} else if (other.state == State.UNSET) {
// no change in state
} else {
state = State.CONFLICTING;
}
} | java | public void mergeWith(OptionalBoolean other) {
if (state == other.state) {
// no change in state
} else if (state == State.UNSET) {
state = other.state;
} else if (other.state == State.UNSET) {
// no change in state
} else {
state = State.CONFLICTING;
}
} | [
"public",
"void",
"mergeWith",
"(",
"OptionalBoolean",
"other",
")",
"{",
"if",
"(",
"state",
"==",
"other",
".",
"state",
")",
"{",
"// no change in state",
"}",
"else",
"if",
"(",
"state",
"==",
"State",
".",
"UNSET",
")",
"{",
"state",
"=",
"other",
... | State transitions.
- if the states are the same then no change
- if either state is unset then change to the other state
- if the states are conflicting then set to the conflicting state
@param other object from which to merge state | [
"State",
"transitions",
".",
"-",
"if",
"the",
"states",
"are",
"the",
"same",
"then",
"no",
"change",
"-",
"if",
"either",
"state",
"is",
"unset",
"then",
"change",
"to",
"the",
"other",
"state",
"-",
"if",
"the",
"states",
"are",
"conflicting",
"then",... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/utils/proxy/OptionalBoolean.java#L127-L137 |
124,245 | apache/flink | flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java | ExecutionConfig.getRestartStrategy | @PublicEvolving
@SuppressWarnings("deprecation")
public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() {
if (restartStrategyConfiguration instanceof RestartStrategies.FallbackRestartStrategyConfiguration) {
// support the old API calls by creating a restart strategy from them
if (getNumbe... | java | @PublicEvolving
@SuppressWarnings("deprecation")
public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() {
if (restartStrategyConfiguration instanceof RestartStrategies.FallbackRestartStrategyConfiguration) {
// support the old API calls by creating a restart strategy from them
if (getNumbe... | [
"@",
"PublicEvolving",
"@",
"SuppressWarnings",
"(",
"\"deprecation\"",
")",
"public",
"RestartStrategies",
".",
"RestartStrategyConfiguration",
"getRestartStrategy",
"(",
")",
"{",
"if",
"(",
"restartStrategyConfiguration",
"instanceof",
"RestartStrategies",
".",
"Fallback... | Returns the restart strategy which has been set for the current job.
@return The specified restart configuration | [
"Returns",
"the",
"restart",
"strategy",
"which",
"has",
"been",
"set",
"for",
"the",
"current",
"job",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java#L411-L426 |
124,246 | apache/flink | flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java | ExecutionConfig.registerTypeWithKryoSerializer | @SuppressWarnings("rawtypes")
public void registerTypeWithKryoSerializer(Class<?> type, Class<? extends Serializer> serializerClass) {
if (type == null || serializerClass == null) {
throw new NullPointerException("Cannot register null class or serializer.");
}
@SuppressWarnings("unchecked")
Class<? extends... | java | @SuppressWarnings("rawtypes")
public void registerTypeWithKryoSerializer(Class<?> type, Class<? extends Serializer> serializerClass) {
if (type == null || serializerClass == null) {
throw new NullPointerException("Cannot register null class or serializer.");
}
@SuppressWarnings("unchecked")
Class<? extends... | [
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"public",
"void",
"registerTypeWithKryoSerializer",
"(",
"Class",
"<",
"?",
">",
"type",
",",
"Class",
"<",
"?",
"extends",
"Serializer",
">",
"serializerClass",
")",
"{",
"if",
"(",
"type",
"==",
"null",
"|... | Registers the given Serializer via its class as a serializer for the given type at the KryoSerializer
@param type The class of the types serialized with the given serializer.
@param serializerClass The class of the serializer to use. | [
"Registers",
"the",
"given",
"Serializer",
"via",
"its",
"class",
"as",
"a",
"serializer",
"for",
"the",
"given",
"type",
"at",
"the",
"KryoSerializer"
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java#L812-L821 |
124,247 | apache/flink | flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java | ExecutionConfig.getRegisteredKryoTypes | public LinkedHashSet<Class<?>> getRegisteredKryoTypes() {
if (isForceKryoEnabled()) {
// if we force kryo, we must also return all the types that
// were previously only registered as POJO
LinkedHashSet<Class<?>> result = new LinkedHashSet<>();
result.addAll(registeredKryoTypes);
for(Class<?> t : regis... | java | public LinkedHashSet<Class<?>> getRegisteredKryoTypes() {
if (isForceKryoEnabled()) {
// if we force kryo, we must also return all the types that
// were previously only registered as POJO
LinkedHashSet<Class<?>> result = new LinkedHashSet<>();
result.addAll(registeredKryoTypes);
for(Class<?> t : regis... | [
"public",
"LinkedHashSet",
"<",
"Class",
"<",
"?",
">",
">",
"getRegisteredKryoTypes",
"(",
")",
"{",
"if",
"(",
"isForceKryoEnabled",
"(",
")",
")",
"{",
"// if we force kryo, we must also return all the types that",
"// were previously only registered as POJO",
"LinkedHas... | Returns the registered Kryo types. | [
"Returns",
"the",
"registered",
"Kryo",
"types",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java#L887-L902 |
124,248 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java | JobMaster.start | public CompletableFuture<Acknowledge> start(final JobMasterId newJobMasterId) throws Exception {
// make sure we receive RPC and async calls
start();
return callAsyncWithoutFencing(() -> startJobExecution(newJobMasterId), RpcUtils.INF_TIMEOUT);
} | java | public CompletableFuture<Acknowledge> start(final JobMasterId newJobMasterId) throws Exception {
// make sure we receive RPC and async calls
start();
return callAsyncWithoutFencing(() -> startJobExecution(newJobMasterId), RpcUtils.INF_TIMEOUT);
} | [
"public",
"CompletableFuture",
"<",
"Acknowledge",
">",
"start",
"(",
"final",
"JobMasterId",
"newJobMasterId",
")",
"throws",
"Exception",
"{",
"// make sure we receive RPC and async calls",
"start",
"(",
")",
";",
"return",
"callAsyncWithoutFencing",
"(",
"(",
")",
... | Start the rpc service and begin to run the job.
@param newJobMasterId The necessary fencing token to run the job
@return Future acknowledge if the job could be started. Otherwise the future contains an exception | [
"Start",
"the",
"rpc",
"service",
"and",
"begin",
"to",
"run",
"the",
"job",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java#L304-L309 |
124,249 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java | JobMaster.onStop | @Override
public CompletableFuture<Void> onStop() {
log.info("Stopping the JobMaster for job {}({}).", jobGraph.getName(), jobGraph.getJobID());
// disconnect from all registered TaskExecutors
final Set<ResourceID> taskManagerResourceIds = new HashSet<>(registeredTaskManagers.keySet());
final FlinkException c... | java | @Override
public CompletableFuture<Void> onStop() {
log.info("Stopping the JobMaster for job {}({}).", jobGraph.getName(), jobGraph.getJobID());
// disconnect from all registered TaskExecutors
final Set<ResourceID> taskManagerResourceIds = new HashSet<>(registeredTaskManagers.keySet());
final FlinkException c... | [
"@",
"Override",
"public",
"CompletableFuture",
"<",
"Void",
">",
"onStop",
"(",
")",
"{",
"log",
".",
"info",
"(",
"\"Stopping the JobMaster for job {}({}).\"",
",",
"jobGraph",
".",
"getName",
"(",
")",
",",
"jobGraph",
".",
"getJobID",
"(",
")",
")",
";",... | Suspend the job and shutdown all other services including rpc. | [
"Suspend",
"the",
"job",
"and",
"shutdown",
"all",
"other",
"services",
"including",
"rpc",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java#L334-L357 |
124,250 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java | JobMaster.updateTaskExecutionState | @Override
public CompletableFuture<Acknowledge> updateTaskExecutionState(
final TaskExecutionState taskExecutionState) {
checkNotNull(taskExecutionState, "taskExecutionState");
if (executionGraph.updateState(taskExecutionState)) {
return CompletableFuture.completedFuture(Acknowledge.get());
} else {
re... | java | @Override
public CompletableFuture<Acknowledge> updateTaskExecutionState(
final TaskExecutionState taskExecutionState) {
checkNotNull(taskExecutionState, "taskExecutionState");
if (executionGraph.updateState(taskExecutionState)) {
return CompletableFuture.completedFuture(Acknowledge.get());
} else {
re... | [
"@",
"Override",
"public",
"CompletableFuture",
"<",
"Acknowledge",
">",
"updateTaskExecutionState",
"(",
"final",
"TaskExecutionState",
"taskExecutionState",
")",
"{",
"checkNotNull",
"(",
"taskExecutionState",
",",
"\"taskExecutionState\"",
")",
";",
"if",
"(",
"execu... | Updates the task execution state for a given task.
@param taskExecutionState New task execution state for a given task
@return Acknowledge the task execution state update | [
"Updates",
"the",
"task",
"execution",
"state",
"for",
"a",
"given",
"task",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java#L376-L388 |
124,251 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/utils/Option.java | Option.defaultValue | public Option defaultValue(String defaultValue) throws RequiredParametersException {
if (this.choices.isEmpty()) {
return this.setDefaultValue(defaultValue);
} else {
if (this.choices.contains(defaultValue)) {
return this.setDefaultValue(defaultValue);
} else {
throw new RequiredParametersException... | java | public Option defaultValue(String defaultValue) throws RequiredParametersException {
if (this.choices.isEmpty()) {
return this.setDefaultValue(defaultValue);
} else {
if (this.choices.contains(defaultValue)) {
return this.setDefaultValue(defaultValue);
} else {
throw new RequiredParametersException... | [
"public",
"Option",
"defaultValue",
"(",
"String",
"defaultValue",
")",
"throws",
"RequiredParametersException",
"{",
"if",
"(",
"this",
".",
"choices",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"this",
".",
"setDefaultValue",
"(",
"defaultValue",
")",
";"... | Define a default value for the option.
@param defaultValue - the default value
@return the updated Option
@throws RequiredParametersException if the list of possible values for the parameter is not empty and the default
value passed is not in the list. | [
"Define",
"a",
"default",
"value",
"for",
"the",
"option",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/utils/Option.java#L80-L91 |
124,252 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/utils/Option.java | Option.choices | public Option choices(String... choices) throws RequiredParametersException {
if (this.defaultValue != null) {
if (Arrays.asList(choices).contains(defaultValue)) {
Collections.addAll(this.choices, choices);
} else {
throw new RequiredParametersException("Valid values for option " + this.longName +
... | java | public Option choices(String... choices) throws RequiredParametersException {
if (this.defaultValue != null) {
if (Arrays.asList(choices).contains(defaultValue)) {
Collections.addAll(this.choices, choices);
} else {
throw new RequiredParametersException("Valid values for option " + this.longName +
... | [
"public",
"Option",
"choices",
"(",
"String",
"...",
"choices",
")",
"throws",
"RequiredParametersException",
"{",
"if",
"(",
"this",
".",
"defaultValue",
"!=",
"null",
")",
"{",
"if",
"(",
"Arrays",
".",
"asList",
"(",
"choices",
")",
".",
"contains",
"("... | Restrict the list of possible values of the parameter.
@param choices - the allowed values of the parameter.
@return the updated Option | [
"Restrict",
"the",
"list",
"of",
"possible",
"values",
"of",
"the",
"parameter",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/utils/Option.java#L99-L111 |
124,253 | apache/flink | flink-core/src/main/java/org/apache/flink/util/PropertiesUtil.java | PropertiesUtil.getInt | public static int getInt(Properties config, String key, int defaultValue) {
String val = config.getProperty(key);
if (val == null) {
return defaultValue;
} else {
try {
return Integer.parseInt(val);
} catch (NumberFormatException nfe) {
throw new IllegalArgumentException("Value for configuration ... | java | public static int getInt(Properties config, String key, int defaultValue) {
String val = config.getProperty(key);
if (val == null) {
return defaultValue;
} else {
try {
return Integer.parseInt(val);
} catch (NumberFormatException nfe) {
throw new IllegalArgumentException("Value for configuration ... | [
"public",
"static",
"int",
"getInt",
"(",
"Properties",
"config",
",",
"String",
"key",
",",
"int",
"defaultValue",
")",
"{",
"String",
"val",
"=",
"config",
".",
"getProperty",
"(",
"key",
")",
";",
"if",
"(",
"val",
"==",
"null",
")",
"{",
"return",
... | Get integer from properties.
This method throws an exception if the integer is not valid.
@param config Properties
@param key key in Properties
@param defaultValue default value if value is not set
@return default or value of key | [
"Get",
"integer",
"from",
"properties",
".",
"This",
"method",
"throws",
"an",
"exception",
"if",
"the",
"integer",
"is",
"not",
"valid",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/PropertiesUtil.java#L38-L50 |
124,254 | apache/flink | flink-core/src/main/java/org/apache/flink/util/PropertiesUtil.java | PropertiesUtil.getLong | public static long getLong(Properties config, String key, long defaultValue) {
String val = config.getProperty(key);
if (val == null) {
return defaultValue;
} else {
try {
return Long.parseLong(val);
} catch (NumberFormatException nfe) {
throw new IllegalArgumentException("Value for configuration... | java | public static long getLong(Properties config, String key, long defaultValue) {
String val = config.getProperty(key);
if (val == null) {
return defaultValue;
} else {
try {
return Long.parseLong(val);
} catch (NumberFormatException nfe) {
throw new IllegalArgumentException("Value for configuration... | [
"public",
"static",
"long",
"getLong",
"(",
"Properties",
"config",
",",
"String",
"key",
",",
"long",
"defaultValue",
")",
"{",
"String",
"val",
"=",
"config",
".",
"getProperty",
"(",
"key",
")",
";",
"if",
"(",
"val",
"==",
"null",
")",
"{",
"return... | Get long from properties.
This method throws an exception if the long is not valid.
@param config Properties
@param key key in Properties
@param defaultValue default value if value is not set
@return default or value of key | [
"Get",
"long",
"from",
"properties",
".",
"This",
"method",
"throws",
"an",
"exception",
"if",
"the",
"long",
"is",
"not",
"valid",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/PropertiesUtil.java#L61-L73 |
124,255 | apache/flink | flink-core/src/main/java/org/apache/flink/util/PropertiesUtil.java | PropertiesUtil.getLong | public static long getLong(Properties config, String key, long defaultValue, Logger logger) {
try {
return getLong(config, key, defaultValue);
} catch (IllegalArgumentException iae) {
logger.warn(iae.getMessage());
return defaultValue;
}
} | java | public static long getLong(Properties config, String key, long defaultValue, Logger logger) {
try {
return getLong(config, key, defaultValue);
} catch (IllegalArgumentException iae) {
logger.warn(iae.getMessage());
return defaultValue;
}
} | [
"public",
"static",
"long",
"getLong",
"(",
"Properties",
"config",
",",
"String",
"key",
",",
"long",
"defaultValue",
",",
"Logger",
"logger",
")",
"{",
"try",
"{",
"return",
"getLong",
"(",
"config",
",",
"key",
",",
"defaultValue",
")",
";",
"}",
"cat... | Get long from properties.
This method only logs if the long is not valid.
@param config Properties
@param key key in Properties
@param defaultValue default value if value is not set
@return default or value of key | [
"Get",
"long",
"from",
"properties",
".",
"This",
"method",
"only",
"logs",
"if",
"the",
"long",
"is",
"not",
"valid",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/PropertiesUtil.java#L84-L91 |
124,256 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointStatsHistory.java | CheckpointStatsHistory.createSnapshot | CheckpointStatsHistory createSnapshot() {
if (readOnly) {
throw new UnsupportedOperationException("Can't create a snapshot of a read-only history.");
}
List<AbstractCheckpointStats> checkpointsHistory;
Map<Long, AbstractCheckpointStats> checkpointsById;
checkpointsById = new HashMap<>(checkpointsArray.le... | java | CheckpointStatsHistory createSnapshot() {
if (readOnly) {
throw new UnsupportedOperationException("Can't create a snapshot of a read-only history.");
}
List<AbstractCheckpointStats> checkpointsHistory;
Map<Long, AbstractCheckpointStats> checkpointsById;
checkpointsById = new HashMap<>(checkpointsArray.le... | [
"CheckpointStatsHistory",
"createSnapshot",
"(",
")",
"{",
"if",
"(",
"readOnly",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"Can't create a snapshot of a read-only history.\"",
")",
";",
"}",
"List",
"<",
"AbstractCheckpointStats",
">",
"checkpoint... | Creates a snapshot of the current state.
@return Snapshot of the current state. | [
"Creates",
"a",
"snapshot",
"of",
"the",
"current",
"state",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointStatsHistory.java#L162-L211 |
124,257 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointStatsHistory.java | CheckpointStatsHistory.addInProgressCheckpoint | void addInProgressCheckpoint(PendingCheckpointStats pending) {
if (readOnly) {
throw new UnsupportedOperationException("Can't create a snapshot of a read-only history.");
}
if (maxSize == 0) {
return;
}
checkNotNull(pending, "Pending checkpoint");
// Grow the array if required. This happens only fo... | java | void addInProgressCheckpoint(PendingCheckpointStats pending) {
if (readOnly) {
throw new UnsupportedOperationException("Can't create a snapshot of a read-only history.");
}
if (maxSize == 0) {
return;
}
checkNotNull(pending, "Pending checkpoint");
// Grow the array if required. This happens only fo... | [
"void",
"addInProgressCheckpoint",
"(",
"PendingCheckpointStats",
"pending",
")",
"{",
"if",
"(",
"readOnly",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"Can't create a snapshot of a read-only history.\"",
")",
";",
"}",
"if",
"(",
"maxSize",
"=="... | Adds an in progress checkpoint to the checkpoint history.
@param pending In progress checkpoint to add. | [
"Adds",
"an",
"in",
"progress",
"checkpoint",
"to",
"the",
"checkpoint",
"history",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointStatsHistory.java#L218-L243 |
124,258 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointStatsHistory.java | CheckpointStatsHistory.replacePendingCheckpointById | boolean replacePendingCheckpointById(AbstractCheckpointStats completedOrFailed) {
checkArgument(!completedOrFailed.getStatus().isInProgress(), "Not allowed to replace with in progress checkpoints.");
if (readOnly) {
throw new UnsupportedOperationException("Can't create a snapshot of a read-only history.");
}
... | java | boolean replacePendingCheckpointById(AbstractCheckpointStats completedOrFailed) {
checkArgument(!completedOrFailed.getStatus().isInProgress(), "Not allowed to replace with in progress checkpoints.");
if (readOnly) {
throw new UnsupportedOperationException("Can't create a snapshot of a read-only history.");
}
... | [
"boolean",
"replacePendingCheckpointById",
"(",
"AbstractCheckpointStats",
"completedOrFailed",
")",
"{",
"checkArgument",
"(",
"!",
"completedOrFailed",
".",
"getStatus",
"(",
")",
".",
"isInProgress",
"(",
")",
",",
"\"Not allowed to replace with in progress checkpoints.\""... | Searches for the in progress checkpoint with the given ID and replaces
it with the given completed or failed checkpoint.
<p>This is bounded by the maximum number of concurrent in progress
checkpointsArray, which means that the runtime of this is constant.
@param completedOrFailed The completed or failed checkpoint to... | [
"Searches",
"for",
"the",
"in",
"progress",
"checkpoint",
"with",
"the",
"given",
"ID",
"and",
"replaces",
"it",
"with",
"the",
"given",
"completed",
"or",
"failed",
"checkpoint",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointStatsHistory.java#L255-L310 |
124,259 | apache/flink | flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/utils/ParquetSchemaConverter.java | ParquetSchemaConverter.toParquetType | public static MessageType toParquetType(TypeInformation<?> typeInformation, boolean legacyMode) {
return (MessageType) convertField(null, typeInformation, Type.Repetition.OPTIONAL, legacyMode);
} | java | public static MessageType toParquetType(TypeInformation<?> typeInformation, boolean legacyMode) {
return (MessageType) convertField(null, typeInformation, Type.Repetition.OPTIONAL, legacyMode);
} | [
"public",
"static",
"MessageType",
"toParquetType",
"(",
"TypeInformation",
"<",
"?",
">",
"typeInformation",
",",
"boolean",
"legacyMode",
")",
"{",
"return",
"(",
"MessageType",
")",
"convertField",
"(",
"null",
",",
"typeInformation",
",",
"Type",
".",
"Repet... | Converts Flink Internal Type to Parquet schema.
@param typeInformation Flink type information
@param legacyMode is standard LIST and MAP schema or back-compatible schema
@return Parquet schema | [
"Converts",
"Flink",
"Internal",
"Type",
"to",
"Parquet",
"schema",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/utils/ParquetSchemaConverter.java#L70-L72 |
124,260 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/MurmurHashUtil.java | MurmurHashUtil.hashUnsafeBytesByWords | public static int hashUnsafeBytesByWords(Object base, long offset, int lengthInBytes) {
return hashUnsafeBytesByWords(base, offset, lengthInBytes, DEFAULT_SEED);
} | java | public static int hashUnsafeBytesByWords(Object base, long offset, int lengthInBytes) {
return hashUnsafeBytesByWords(base, offset, lengthInBytes, DEFAULT_SEED);
} | [
"public",
"static",
"int",
"hashUnsafeBytesByWords",
"(",
"Object",
"base",
",",
"long",
"offset",
",",
"int",
"lengthInBytes",
")",
"{",
"return",
"hashUnsafeBytesByWords",
"(",
"base",
",",
"offset",
",",
"lengthInBytes",
",",
"DEFAULT_SEED",
")",
";",
"}"
] | Hash unsafe bytes, length must be aligned to 4 bytes.
@param base base unsafe object
@param offset offset for unsafe object
@param lengthInBytes length in bytes
@return hash code | [
"Hash",
"unsafe",
"bytes",
"length",
"must",
"be",
"aligned",
"to",
"4",
"bytes",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/MurmurHashUtil.java#L40-L42 |
124,261 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/MurmurHashUtil.java | MurmurHashUtil.hashUnsafeBytes | public static int hashUnsafeBytes(Object base, long offset, int lengthInBytes) {
return hashUnsafeBytes(base, offset, lengthInBytes, DEFAULT_SEED);
} | java | public static int hashUnsafeBytes(Object base, long offset, int lengthInBytes) {
return hashUnsafeBytes(base, offset, lengthInBytes, DEFAULT_SEED);
} | [
"public",
"static",
"int",
"hashUnsafeBytes",
"(",
"Object",
"base",
",",
"long",
"offset",
",",
"int",
"lengthInBytes",
")",
"{",
"return",
"hashUnsafeBytes",
"(",
"base",
",",
"offset",
",",
"lengthInBytes",
",",
"DEFAULT_SEED",
")",
";",
"}"
] | Hash unsafe bytes.
@param base base unsafe object
@param offset offset for unsafe object
@param lengthInBytes length in bytes
@return hash code | [
"Hash",
"unsafe",
"bytes",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/MurmurHashUtil.java#L51-L53 |
124,262 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/MurmurHashUtil.java | MurmurHashUtil.hashBytesByWords | public static int hashBytesByWords(MemorySegment segment, int offset, int lengthInBytes) {
return hashBytesByWords(segment, offset, lengthInBytes, DEFAULT_SEED);
} | java | public static int hashBytesByWords(MemorySegment segment, int offset, int lengthInBytes) {
return hashBytesByWords(segment, offset, lengthInBytes, DEFAULT_SEED);
} | [
"public",
"static",
"int",
"hashBytesByWords",
"(",
"MemorySegment",
"segment",
",",
"int",
"offset",
",",
"int",
"lengthInBytes",
")",
"{",
"return",
"hashBytesByWords",
"(",
"segment",
",",
"offset",
",",
"lengthInBytes",
",",
"DEFAULT_SEED",
")",
";",
"}"
] | Hash bytes in MemorySegment, length must be aligned to 4 bytes.
@param segment segment.
@param offset offset for MemorySegment
@param lengthInBytes length in MemorySegment
@return hash code | [
"Hash",
"bytes",
"in",
"MemorySegment",
"length",
"must",
"be",
"aligned",
"to",
"4",
"bytes",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/MurmurHashUtil.java#L62-L64 |
124,263 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/MurmurHashUtil.java | MurmurHashUtil.hashBytes | public static int hashBytes(MemorySegment segment, int offset, int lengthInBytes) {
return hashBytes(segment, offset, lengthInBytes, DEFAULT_SEED);
} | java | public static int hashBytes(MemorySegment segment, int offset, int lengthInBytes) {
return hashBytes(segment, offset, lengthInBytes, DEFAULT_SEED);
} | [
"public",
"static",
"int",
"hashBytes",
"(",
"MemorySegment",
"segment",
",",
"int",
"offset",
",",
"int",
"lengthInBytes",
")",
"{",
"return",
"hashBytes",
"(",
"segment",
",",
"offset",
",",
"lengthInBytes",
",",
"DEFAULT_SEED",
")",
";",
"}"
] | Hash bytes in MemorySegment.
@param segment segment.
@param offset offset for MemorySegment
@param lengthInBytes length in MemorySegment
@return hash code | [
"Hash",
"bytes",
"in",
"MemorySegment",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/MurmurHashUtil.java#L73-L75 |
124,264 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/deployment/TaskDeploymentDescriptor.java | TaskDeploymentDescriptor.getSerializedJobInformation | @Nullable
public SerializedValue<JobInformation> getSerializedJobInformation() {
if (serializedJobInformation instanceof NonOffloaded) {
NonOffloaded<JobInformation> jobInformation =
(NonOffloaded<JobInformation>) serializedJobInformation;
return jobInformation.serializedValue;
} else {
throw new Ille... | java | @Nullable
public SerializedValue<JobInformation> getSerializedJobInformation() {
if (serializedJobInformation instanceof NonOffloaded) {
NonOffloaded<JobInformation> jobInformation =
(NonOffloaded<JobInformation>) serializedJobInformation;
return jobInformation.serializedValue;
} else {
throw new Ille... | [
"@",
"Nullable",
"public",
"SerializedValue",
"<",
"JobInformation",
">",
"getSerializedJobInformation",
"(",
")",
"{",
"if",
"(",
"serializedJobInformation",
"instanceof",
"NonOffloaded",
")",
"{",
"NonOffloaded",
"<",
"JobInformation",
">",
"jobInformation",
"=",
"(... | Return the sub task's serialized job information.
@return serialized job information (may be <tt>null</tt> before a call to {@link
#loadBigData(PermanentBlobService)}). | [
"Return",
"the",
"sub",
"task",
"s",
"serialized",
"job",
"information",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/deployment/TaskDeploymentDescriptor.java#L191-L201 |
124,265 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/deployment/TaskDeploymentDescriptor.java | TaskDeploymentDescriptor.getSerializedTaskInformation | @Nullable
public SerializedValue<TaskInformation> getSerializedTaskInformation() {
if (serializedTaskInformation instanceof NonOffloaded) {
NonOffloaded<TaskInformation> taskInformation =
(NonOffloaded<TaskInformation>) serializedTaskInformation;
return taskInformation.serializedValue;
} else {
throw ... | java | @Nullable
public SerializedValue<TaskInformation> getSerializedTaskInformation() {
if (serializedTaskInformation instanceof NonOffloaded) {
NonOffloaded<TaskInformation> taskInformation =
(NonOffloaded<TaskInformation>) serializedTaskInformation;
return taskInformation.serializedValue;
} else {
throw ... | [
"@",
"Nullable",
"public",
"SerializedValue",
"<",
"TaskInformation",
">",
"getSerializedTaskInformation",
"(",
")",
"{",
"if",
"(",
"serializedTaskInformation",
"instanceof",
"NonOffloaded",
")",
"{",
"NonOffloaded",
"<",
"TaskInformation",
">",
"taskInformation",
"=",... | Return the sub task's serialized task information.
@return serialized task information (may be <tt>null</tt> before a call to {@link
#loadBigData(PermanentBlobService)}). | [
"Return",
"the",
"sub",
"task",
"s",
"serialized",
"task",
"information",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/deployment/TaskDeploymentDescriptor.java#L209-L219 |
124,266 | apache/flink | flink-optimizer/src/main/java/org/apache/flink/optimizer/plan/OptimizedPlan.java | OptimizedPlan.accept | @Override
public void accept(Visitor<PlanNode> visitor) {
for (SinkPlanNode node : this.dataSinks) {
node.accept(visitor);
}
} | java | @Override
public void accept(Visitor<PlanNode> visitor) {
for (SinkPlanNode node : this.dataSinks) {
node.accept(visitor);
}
} | [
"@",
"Override",
"public",
"void",
"accept",
"(",
"Visitor",
"<",
"PlanNode",
">",
"visitor",
")",
"{",
"for",
"(",
"SinkPlanNode",
"node",
":",
"this",
".",
"dataSinks",
")",
"{",
"node",
".",
"accept",
"(",
"visitor",
")",
";",
"}",
"}"
] | Applies the given visitor top down to all nodes, starting at the sinks.
@param visitor
The visitor to apply to the nodes in this plan.
@see org.apache.flink.util.Visitable#accept(org.apache.flink.util.Visitor) | [
"Applies",
"the",
"given",
"visitor",
"top",
"down",
"to",
"all",
"nodes",
"starting",
"at",
"the",
"sinks",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/plan/OptimizedPlan.java#L125-L130 |
124,267 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashBucketArea.java | BinaryHashBucketArea.insertToBucket | boolean insertToBucket(int hashCode, int pointer, boolean spillingAllowed, boolean sizeAddAndCheckResize) throws IOException {
final int posHashCode = findBucket(hashCode);
// get the bucket for the given hash code
final int bucketArrayPos = posHashCode >> table.bucketsPerSegmentBits;
final int bucketInSegmentP... | java | boolean insertToBucket(int hashCode, int pointer, boolean spillingAllowed, boolean sizeAddAndCheckResize) throws IOException {
final int posHashCode = findBucket(hashCode);
// get the bucket for the given hash code
final int bucketArrayPos = posHashCode >> table.bucketsPerSegmentBits;
final int bucketInSegmentP... | [
"boolean",
"insertToBucket",
"(",
"int",
"hashCode",
",",
"int",
"pointer",
",",
"boolean",
"spillingAllowed",
",",
"boolean",
"sizeAddAndCheckResize",
")",
"throws",
"IOException",
"{",
"final",
"int",
"posHashCode",
"=",
"findBucket",
"(",
"hashCode",
")",
";",
... | Insert into bucket by hashCode and pointer.
@return return false when spill own partition. | [
"Insert",
"into",
"bucket",
"by",
"hashCode",
"and",
"pointer",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashBucketArea.java#L436-L443 |
124,268 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashBucketArea.java | BinaryHashBucketArea.appendRecordAndInsert | boolean appendRecordAndInsert(BinaryRow record, int hashCode) throws IOException {
final int posHashCode = findBucket(hashCode);
// get the bucket for the given hash code
final int bucketArrayPos = posHashCode >> table.bucketsPerSegmentBits;
final int bucketInSegmentPos = (posHashCode & table.bucketsPerSegmentM... | java | boolean appendRecordAndInsert(BinaryRow record, int hashCode) throws IOException {
final int posHashCode = findBucket(hashCode);
// get the bucket for the given hash code
final int bucketArrayPos = posHashCode >> table.bucketsPerSegmentBits;
final int bucketInSegmentPos = (posHashCode & table.bucketsPerSegmentM... | [
"boolean",
"appendRecordAndInsert",
"(",
"BinaryRow",
"record",
",",
"int",
"hashCode",
")",
"throws",
"IOException",
"{",
"final",
"int",
"posHashCode",
"=",
"findBucket",
"(",
"hashCode",
")",
";",
"// get the bucket for the given hash code",
"final",
"int",
"bucket... | Append record and insert to bucket. | [
"Append",
"record",
"and",
"insert",
"to",
"bucket",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashBucketArea.java#L448-L470 |
124,269 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashBucketArea.java | BinaryHashBucketArea.findFirstSameBuildRow | private boolean findFirstSameBuildRow(
MemorySegment bucket,
int searchHashCode,
int bucketInSegmentOffset,
BinaryRow buildRowToInsert) {
int posInSegment = bucketInSegmentOffset + BUCKET_HEADER_LENGTH;
int countInBucket = bucket.getShort(bucketInSegmentOffset + HEADER_COUNT_OFFSET);
int numInBucket =... | java | private boolean findFirstSameBuildRow(
MemorySegment bucket,
int searchHashCode,
int bucketInSegmentOffset,
BinaryRow buildRowToInsert) {
int posInSegment = bucketInSegmentOffset + BUCKET_HEADER_LENGTH;
int countInBucket = bucket.getShort(bucketInSegmentOffset + HEADER_COUNT_OFFSET);
int numInBucket =... | [
"private",
"boolean",
"findFirstSameBuildRow",
"(",
"MemorySegment",
"bucket",
",",
"int",
"searchHashCode",
",",
"int",
"bucketInSegmentOffset",
",",
"BinaryRow",
"buildRowToInsert",
")",
"{",
"int",
"posInSegment",
"=",
"bucketInSegmentOffset",
"+",
"BUCKET_HEADER_LENGT... | For distinct build. | [
"For",
"distinct",
"build",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashBucketArea.java#L475-L523 |
124,270 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashBucketArea.java | BinaryHashBucketArea.startLookup | void startLookup(int hashCode) {
final int posHashCode = findBucket(hashCode);
// get the bucket for the given hash code
final int bucketArrayPos = posHashCode >> table.bucketsPerSegmentBits;
final int bucketInSegmentOffset = (posHashCode & table.bucketsPerSegmentMask) << BUCKET_SIZE_BITS;
final MemorySegmen... | java | void startLookup(int hashCode) {
final int posHashCode = findBucket(hashCode);
// get the bucket for the given hash code
final int bucketArrayPos = posHashCode >> table.bucketsPerSegmentBits;
final int bucketInSegmentOffset = (posHashCode & table.bucketsPerSegmentMask) << BUCKET_SIZE_BITS;
final MemorySegmen... | [
"void",
"startLookup",
"(",
"int",
"hashCode",
")",
"{",
"final",
"int",
"posHashCode",
"=",
"findBucket",
"(",
"hashCode",
")",
";",
"// get the bucket for the given hash code",
"final",
"int",
"bucketArrayPos",
"=",
"posHashCode",
">>",
"table",
".",
"bucketsPerSe... | Probe start lookup joined build rows. | [
"Probe",
"start",
"lookup",
"joined",
"build",
"rows",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashBucketArea.java#L528-L536 |
124,271 | apache/flink | flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java | FlinkYarnSessionCli.repStep | private static boolean repStep(
BufferedReader in,
boolean readConsoleInput) throws IOException, InterruptedException {
// wait until CLIENT_POLLING_INTERVAL is over or the user entered something.
long startTime = System.currentTimeMillis();
while ((System.currentTimeMillis() - startTime) < CLIENT_POLLING_... | java | private static boolean repStep(
BufferedReader in,
boolean readConsoleInput) throws IOException, InterruptedException {
// wait until CLIENT_POLLING_INTERVAL is over or the user entered something.
long startTime = System.currentTimeMillis();
while ((System.currentTimeMillis() - startTime) < CLIENT_POLLING_... | [
"private",
"static",
"boolean",
"repStep",
"(",
"BufferedReader",
"in",
",",
"boolean",
"readConsoleInput",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"// wait until CLIENT_POLLING_INTERVAL is over or the user entered something.",
"long",
"startTime",
"=",
... | Read-Evaluate-Print step for the REPL.
@param in to read from
@param readConsoleInput true if console input has to be read
@return true if the REPL shall be continued, otherwise false
@throws IOException
@throws InterruptedException | [
"Read",
"-",
"Evaluate",
"-",
"Print",
"step",
"for",
"the",
"REPL",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java#L910-L940 |
124,272 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/deployment/InputChannelDeploymentDescriptor.java | InputChannelDeploymentDescriptor.fromEdges | public static List<InputChannelDeploymentDescriptor> fromEdges(
List<ExecutionEdge> edges,
boolean allowLazyDeployment) {
return edges.stream().map(edge -> fromEdgeAndValidate(allowLazyDeployment, edge)).collect(Collectors.toList());
} | java | public static List<InputChannelDeploymentDescriptor> fromEdges(
List<ExecutionEdge> edges,
boolean allowLazyDeployment) {
return edges.stream().map(edge -> fromEdgeAndValidate(allowLazyDeployment, edge)).collect(Collectors.toList());
} | [
"public",
"static",
"List",
"<",
"InputChannelDeploymentDescriptor",
">",
"fromEdges",
"(",
"List",
"<",
"ExecutionEdge",
">",
"edges",
",",
"boolean",
"allowLazyDeployment",
")",
"{",
"return",
"edges",
".",
"stream",
"(",
")",
".",
"map",
"(",
"edge",
"->",
... | Creates an input channel deployment descriptor for each partition. | [
"Creates",
"an",
"input",
"channel",
"deployment",
"descriptor",
"for",
"each",
"partition",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/deployment/InputChannelDeploymentDescriptor.java#L89-L93 |
124,273 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/InputGateMetrics.java | InputGateMetrics.refreshAndGetTotal | long refreshAndGetTotal() {
long total = 0;
for (InputChannel channel : inputGate.getInputChannels().values()) {
if (channel instanceof RemoteInputChannel) {
RemoteInputChannel rc = (RemoteInputChannel) channel;
total += rc.unsynchronizedGetNumberOfQueuedBuffers();
}
}
return total;
} | java | long refreshAndGetTotal() {
long total = 0;
for (InputChannel channel : inputGate.getInputChannels().values()) {
if (channel instanceof RemoteInputChannel) {
RemoteInputChannel rc = (RemoteInputChannel) channel;
total += rc.unsynchronizedGetNumberOfQueuedBuffers();
}
}
return total;
} | [
"long",
"refreshAndGetTotal",
"(",
")",
"{",
"long",
"total",
"=",
"0",
";",
"for",
"(",
"InputChannel",
"channel",
":",
"inputGate",
".",
"getInputChannels",
"(",
")",
".",
"values",
"(",
")",
")",
"{",
"if",
"(",
"channel",
"instanceof",
"RemoteInputChan... | Iterates over all input channels and collects the total number of queued buffers in a
best-effort way.
@return total number of queued buffers | [
"Iterates",
"over",
"all",
"input",
"channels",
"and",
"collects",
"the",
"total",
"number",
"of",
"queued",
"buffers",
"in",
"a",
"best",
"-",
"effort",
"way",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/InputGateMetrics.java#L51-L63 |
124,274 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/InputGateMetrics.java | InputGateMetrics.refreshAndGetMin | int refreshAndGetMin() {
int min = Integer.MAX_VALUE;
Collection<InputChannel> channels = inputGate.getInputChannels().values();
for (InputChannel channel : channels) {
if (channel instanceof RemoteInputChannel) {
RemoteInputChannel rc = (RemoteInputChannel) channel;
int size = rc.unsynchronizedGetN... | java | int refreshAndGetMin() {
int min = Integer.MAX_VALUE;
Collection<InputChannel> channels = inputGate.getInputChannels().values();
for (InputChannel channel : channels) {
if (channel instanceof RemoteInputChannel) {
RemoteInputChannel rc = (RemoteInputChannel) channel;
int size = rc.unsynchronizedGetN... | [
"int",
"refreshAndGetMin",
"(",
")",
"{",
"int",
"min",
"=",
"Integer",
".",
"MAX_VALUE",
";",
"Collection",
"<",
"InputChannel",
">",
"channels",
"=",
"inputGate",
".",
"getInputChannels",
"(",
")",
".",
"values",
"(",
")",
";",
"for",
"(",
"InputChannel"... | Iterates over all input channels and collects the minimum number of queued buffers in a
channel in a best-effort way.
@return minimum number of queued buffers per channel (<tt>0</tt> if no channels exist) | [
"Iterates",
"over",
"all",
"input",
"channels",
"and",
"collects",
"the",
"minimum",
"number",
"of",
"queued",
"buffers",
"in",
"a",
"channel",
"in",
"a",
"best",
"-",
"effort",
"way",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/InputGateMetrics.java#L71-L89 |
124,275 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/InputGateMetrics.java | InputGateMetrics.refreshAndGetMax | int refreshAndGetMax() {
int max = 0;
for (InputChannel channel : inputGate.getInputChannels().values()) {
if (channel instanceof RemoteInputChannel) {
RemoteInputChannel rc = (RemoteInputChannel) channel;
int size = rc.unsynchronizedGetNumberOfQueuedBuffers();
max = Math.max(max, size);
}
}
... | java | int refreshAndGetMax() {
int max = 0;
for (InputChannel channel : inputGate.getInputChannels().values()) {
if (channel instanceof RemoteInputChannel) {
RemoteInputChannel rc = (RemoteInputChannel) channel;
int size = rc.unsynchronizedGetNumberOfQueuedBuffers();
max = Math.max(max, size);
}
}
... | [
"int",
"refreshAndGetMax",
"(",
")",
"{",
"int",
"max",
"=",
"0",
";",
"for",
"(",
"InputChannel",
"channel",
":",
"inputGate",
".",
"getInputChannels",
"(",
")",
".",
"values",
"(",
")",
")",
"{",
"if",
"(",
"channel",
"instanceof",
"RemoteInputChannel",
... | Iterates over all input channels and collects the maximum number of queued buffers in a
channel in a best-effort way.
@return maximum number of queued buffers per channel | [
"Iterates",
"over",
"all",
"input",
"channels",
"and",
"collects",
"the",
"maximum",
"number",
"of",
"queued",
"buffers",
"in",
"a",
"channel",
"in",
"a",
"best",
"-",
"effort",
"way",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/InputGateMetrics.java#L97-L110 |
124,276 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/InputGateMetrics.java | InputGateMetrics.refreshAndGetAvg | float refreshAndGetAvg() {
long total = 0;
int count = 0;
for (InputChannel channel : inputGate.getInputChannels().values()) {
if (channel instanceof RemoteInputChannel) {
RemoteInputChannel rc = (RemoteInputChannel) channel;
int size = rc.unsynchronizedGetNumberOfQueuedBuffers();
total += size;
... | java | float refreshAndGetAvg() {
long total = 0;
int count = 0;
for (InputChannel channel : inputGate.getInputChannels().values()) {
if (channel instanceof RemoteInputChannel) {
RemoteInputChannel rc = (RemoteInputChannel) channel;
int size = rc.unsynchronizedGetNumberOfQueuedBuffers();
total += size;
... | [
"float",
"refreshAndGetAvg",
"(",
")",
"{",
"long",
"total",
"=",
"0",
";",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"InputChannel",
"channel",
":",
"inputGate",
".",
"getInputChannels",
"(",
")",
".",
"values",
"(",
")",
")",
"{",
"if",
"(",
"chan... | Iterates over all input channels and collects the average number of queued buffers in a
channel in a best-effort way.
@return average number of queued buffers per channel | [
"Iterates",
"over",
"all",
"input",
"channels",
"and",
"collects",
"the",
"average",
"number",
"of",
"queued",
"buffers",
"in",
"a",
"channel",
"in",
"a",
"best",
"-",
"effort",
"way",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/InputGateMetrics.java#L118-L133 |
124,277 | apache/flink | flink-container/src/main/java/org/apache/flink/container/entrypoint/JarManifestParser.java | JarManifestParser.findOnlyEntryClass | static JarFileWithEntryClass findOnlyEntryClass(Iterable<File> jarFiles) throws IOException {
List<JarFileWithEntryClass> jarsWithEntryClasses = new ArrayList<>();
for (File jarFile : jarFiles) {
findEntryClass(jarFile)
.ifPresent(entryClass -> jarsWithEntryClasses.add(new JarFileWithEntryClass(jarFile, entr... | java | static JarFileWithEntryClass findOnlyEntryClass(Iterable<File> jarFiles) throws IOException {
List<JarFileWithEntryClass> jarsWithEntryClasses = new ArrayList<>();
for (File jarFile : jarFiles) {
findEntryClass(jarFile)
.ifPresent(entryClass -> jarsWithEntryClasses.add(new JarFileWithEntryClass(jarFile, entr... | [
"static",
"JarFileWithEntryClass",
"findOnlyEntryClass",
"(",
"Iterable",
"<",
"File",
">",
"jarFiles",
")",
"throws",
"IOException",
"{",
"List",
"<",
"JarFileWithEntryClass",
">",
"jarsWithEntryClasses",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
... | Returns a JAR file with its entry class as specified in the manifest.
@param jarFiles JAR files to parse
@throws NoSuchElementException if no JAR file contains an entry class attribute
@throws IllegalArgumentException if multiple JAR files contain an entry class manifest attribute | [
"Returns",
"a",
"JAR",
"file",
"with",
"its",
"entry",
"class",
"as",
"specified",
"in",
"the",
"manifest",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-container/src/main/java/org/apache/flink/container/entrypoint/JarManifestParser.java#L72-L88 |
124,278 | apache/flink | flink-container/src/main/java/org/apache/flink/container/entrypoint/JarManifestParser.java | JarManifestParser.findEntryClass | @VisibleForTesting
static Optional<String> findEntryClass(File jarFile) throws IOException {
return findFirstManifestAttribute(
jarFile,
PackagedProgram.MANIFEST_ATTRIBUTE_ASSEMBLER_CLASS,
PackagedProgram.MANIFEST_ATTRIBUTE_MAIN_CLASS);
} | java | @VisibleForTesting
static Optional<String> findEntryClass(File jarFile) throws IOException {
return findFirstManifestAttribute(
jarFile,
PackagedProgram.MANIFEST_ATTRIBUTE_ASSEMBLER_CLASS,
PackagedProgram.MANIFEST_ATTRIBUTE_MAIN_CLASS);
} | [
"@",
"VisibleForTesting",
"static",
"Optional",
"<",
"String",
">",
"findEntryClass",
"(",
"File",
"jarFile",
")",
"throws",
"IOException",
"{",
"return",
"findFirstManifestAttribute",
"(",
"jarFile",
",",
"PackagedProgram",
".",
"MANIFEST_ATTRIBUTE_ASSEMBLER_CLASS",
",... | Returns the entry class as specified in the manifest of the provided JAR file.
<p>The following manifest attributes are checked in order to find the entry class:
<ol>
<li>{@link PackagedProgram#MANIFEST_ATTRIBUTE_ASSEMBLER_CLASS}</li>
<li>{@link PackagedProgram#MANIFEST_ATTRIBUTE_MAIN_CLASS}</li>
</ol>
@param jarFile... | [
"Returns",
"the",
"entry",
"class",
"as",
"specified",
"in",
"the",
"manifest",
"of",
"the",
"provided",
"JAR",
"file",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-container/src/main/java/org/apache/flink/container/entrypoint/JarManifestParser.java#L103-L109 |
124,279 | apache/flink | flink-container/src/main/java/org/apache/flink/container/entrypoint/JarManifestParser.java | JarManifestParser.findFirstManifestAttribute | private static Optional<String> findFirstManifestAttribute(File jarFile, String... attributes) throws IOException {
if (attributes.length == 0) {
return Optional.empty();
}
try (JarFile f = new JarFile(jarFile)) {
return findFirstManifestAttribute(f, attributes);
}
} | java | private static Optional<String> findFirstManifestAttribute(File jarFile, String... attributes) throws IOException {
if (attributes.length == 0) {
return Optional.empty();
}
try (JarFile f = new JarFile(jarFile)) {
return findFirstManifestAttribute(f, attributes);
}
} | [
"private",
"static",
"Optional",
"<",
"String",
">",
"findFirstManifestAttribute",
"(",
"File",
"jarFile",
",",
"String",
"...",
"attributes",
")",
"throws",
"IOException",
"{",
"if",
"(",
"attributes",
".",
"length",
"==",
"0",
")",
"{",
"return",
"Optional",... | Returns the value of the first manifest attribute found in the provided JAR file.
@param jarFile JAR file to parse
@param attributes Attributes to check
@return Optional holding value of first found attribute
@throws IOException If there is an error accessing the JAR | [
"Returns",
"the",
"value",
"of",
"the",
"first",
"manifest",
"attribute",
"found",
"in",
"the",
"provided",
"JAR",
"file",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-container/src/main/java/org/apache/flink/container/entrypoint/JarManifestParser.java#L119-L126 |
124,280 | apache/flink | flink-core/src/main/java/org/apache/flink/api/common/typeutils/TypeSerializerConfigSnapshot.java | TypeSerializerConfigSnapshot.restoreSerializer | @Override
public final TypeSerializer<T> restoreSerializer() {
if (serializer == null) {
throw new IllegalStateException(
"Trying to restore the prior serializer via TypeSerializerConfigSnapshot, " +
"but the prior serializer has not been set.");
}
else if (serializer instanceof UnloadableDummyTypeS... | java | @Override
public final TypeSerializer<T> restoreSerializer() {
if (serializer == null) {
throw new IllegalStateException(
"Trying to restore the prior serializer via TypeSerializerConfigSnapshot, " +
"but the prior serializer has not been set.");
}
else if (serializer instanceof UnloadableDummyTypeS... | [
"@",
"Override",
"public",
"final",
"TypeSerializer",
"<",
"T",
">",
"restoreSerializer",
"(",
")",
"{",
"if",
"(",
"serializer",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Trying to restore the prior serializer via TypeSerializerConfigSnap... | Creates a serializer using this configuration, that is capable of reading data
written by the serializer described by this configuration.
@return the restored serializer. | [
"Creates",
"a",
"serializer",
"using",
"this",
"configuration",
"that",
"is",
"capable",
"of",
"reading",
"data",
"written",
"by",
"the",
"serializer",
"described",
"by",
"this",
"configuration",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/typeutils/TypeSerializerConfigSnapshot.java#L126-L144 |
124,281 | apache/flink | flink-core/src/main/java/org/apache/flink/api/common/accumulators/AccumulatorHelper.java | AccumulatorHelper.mergeSingle | private static <V, R extends Serializable> Accumulator<V, R> mergeSingle(Accumulator<?, ?> target,
Accumulator<?, ?> toMerge) {
@SuppressWarnings("unchecked")
Accumulator<V, R> typedTarget = (Accumulator<V, R>) target;
@SuppressWarnings("unchecked")
Accumulator<V, R> typedToMerge = (Accumul... | java | private static <V, R extends Serializable> Accumulator<V, R> mergeSingle(Accumulator<?, ?> target,
Accumulator<?, ?> toMerge) {
@SuppressWarnings("unchecked")
Accumulator<V, R> typedTarget = (Accumulator<V, R>) target;
@SuppressWarnings("unchecked")
Accumulator<V, R> typedToMerge = (Accumul... | [
"private",
"static",
"<",
"V",
",",
"R",
"extends",
"Serializable",
">",
"Accumulator",
"<",
"V",
",",
"R",
">",
"mergeSingle",
"(",
"Accumulator",
"<",
"?",
",",
"?",
">",
"target",
",",
"Accumulator",
"<",
"?",
",",
"?",
">",
"toMerge",
")",
"{",
... | Workaround method for type safety. | [
"Workaround",
"method",
"for",
"type",
"safety",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/accumulators/AccumulatorHelper.java#L83-L94 |
124,282 | apache/flink | flink-core/src/main/java/org/apache/flink/api/common/accumulators/AccumulatorHelper.java | AccumulatorHelper.toResultMap | public static Map<String, OptionalFailure<Object>> toResultMap(Map<String, Accumulator<?, ?>> accumulators) {
Map<String, OptionalFailure<Object>> resultMap = new HashMap<>();
for (Map.Entry<String, Accumulator<?, ?>> entry : accumulators.entrySet()) {
resultMap.put(entry.getKey(), wrapUnchecked(entry.getKey(), ... | java | public static Map<String, OptionalFailure<Object>> toResultMap(Map<String, Accumulator<?, ?>> accumulators) {
Map<String, OptionalFailure<Object>> resultMap = new HashMap<>();
for (Map.Entry<String, Accumulator<?, ?>> entry : accumulators.entrySet()) {
resultMap.put(entry.getKey(), wrapUnchecked(entry.getKey(), ... | [
"public",
"static",
"Map",
"<",
"String",
",",
"OptionalFailure",
"<",
"Object",
">",
">",
"toResultMap",
"(",
"Map",
"<",
"String",
",",
"Accumulator",
"<",
"?",
",",
"?",
">",
">",
"accumulators",
")",
"{",
"Map",
"<",
"String",
",",
"OptionalFailure",... | Transform the Map with accumulators into a Map containing only the
results. | [
"Transform",
"the",
"Map",
"with",
"accumulators",
"into",
"a",
"Map",
"containing",
"only",
"the",
"results",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/accumulators/AccumulatorHelper.java#L127-L133 |
124,283 | apache/flink | flink-core/src/main/java/org/apache/flink/api/common/accumulators/AccumulatorHelper.java | AccumulatorHelper.deserializeAccumulators | public static Map<String, OptionalFailure<Object>> deserializeAccumulators(
Map<String, SerializedValue<OptionalFailure<Object>>> serializedAccumulators,
ClassLoader loader) throws IOException, ClassNotFoundException {
if (serializedAccumulators == null || serializedAccumulators.isEmpty()) {
return Collecti... | java | public static Map<String, OptionalFailure<Object>> deserializeAccumulators(
Map<String, SerializedValue<OptionalFailure<Object>>> serializedAccumulators,
ClassLoader loader) throws IOException, ClassNotFoundException {
if (serializedAccumulators == null || serializedAccumulators.isEmpty()) {
return Collecti... | [
"public",
"static",
"Map",
"<",
"String",
",",
"OptionalFailure",
"<",
"Object",
">",
">",
"deserializeAccumulators",
"(",
"Map",
"<",
"String",
",",
"SerializedValue",
"<",
"OptionalFailure",
"<",
"Object",
">",
">",
">",
"serializedAccumulators",
",",
"ClassLo... | Takes the serialized accumulator results and tries to deserialize them using the provided
class loader.
@param serializedAccumulators The serialized accumulator results.
@param loader The class loader to use.
@return The deserialized accumulator results.
@throws IOException
@throws ClassNotFoundException | [
"Takes",
"the",
"serialized",
"accumulator",
"results",
"and",
"tries",
"to",
"deserialize",
"them",
"using",
"the",
"provided",
"class",
"loader",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/accumulators/AccumulatorHelper.java#L184-L205 |
124,284 | apache/flink | flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/ZookeeperOffsetHandler.java | ZookeeperOffsetHandler.prepareAndCommitOffsets | public void prepareAndCommitOffsets(Map<KafkaTopicPartition, Long> internalOffsets) throws Exception {
for (Map.Entry<KafkaTopicPartition, Long> entry : internalOffsets.entrySet()) {
KafkaTopicPartition tp = entry.getKey();
Long lastProcessedOffset = entry.getValue();
if (lastProcessedOffset != null && last... | java | public void prepareAndCommitOffsets(Map<KafkaTopicPartition, Long> internalOffsets) throws Exception {
for (Map.Entry<KafkaTopicPartition, Long> entry : internalOffsets.entrySet()) {
KafkaTopicPartition tp = entry.getKey();
Long lastProcessedOffset = entry.getValue();
if (lastProcessedOffset != null && last... | [
"public",
"void",
"prepareAndCommitOffsets",
"(",
"Map",
"<",
"KafkaTopicPartition",
",",
"Long",
">",
"internalOffsets",
")",
"throws",
"Exception",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"KafkaTopicPartition",
",",
"Long",
">",
"entry",
":",
"internalOffse... | Commits offsets for Kafka partitions to ZooKeeper. The given offsets to this method should be the offsets of
the last processed records; this method will take care of incrementing the offsets by 1 before committing them so
that the committed offsets to Zookeeper represent the next record to process.
@param internalOff... | [
"Commits",
"offsets",
"for",
"Kafka",
"partitions",
"to",
"ZooKeeper",
".",
"The",
"given",
"offsets",
"to",
"this",
"method",
"should",
"be",
"the",
"offsets",
"of",
"the",
"last",
"processed",
"records",
";",
"this",
"method",
"will",
"take",
"care",
"of",... | 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/ZookeeperOffsetHandler.java#L86-L95 |
124,285 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/TaskEventHandler.java | TaskEventHandler.publish | public void publish(TaskEvent event) {
synchronized (listeners) {
for (EventListener<TaskEvent> listener : listeners.get(event.getClass())) {
listener.onEvent(event);
}
}
} | java | public void publish(TaskEvent event) {
synchronized (listeners) {
for (EventListener<TaskEvent> listener : listeners.get(event.getClass())) {
listener.onEvent(event);
}
}
} | [
"public",
"void",
"publish",
"(",
"TaskEvent",
"event",
")",
"{",
"synchronized",
"(",
"listeners",
")",
"{",
"for",
"(",
"EventListener",
"<",
"TaskEvent",
">",
"listener",
":",
"listeners",
".",
"get",
"(",
"event",
".",
"getClass",
"(",
")",
")",
")",... | Publishes the task event to all subscribed event listeners.
@param event The event to publish. | [
"Publishes",
"the",
"task",
"event",
"to",
"all",
"subscribed",
"event",
"listeners",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/TaskEventHandler.java#L47-L53 |
124,286 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/util/SignalHandler.java | SignalHandler.register | public static void register(final Logger LOG) {
synchronized (SignalHandler.class) {
if (registered) {
return;
}
registered = true;
final String[] SIGNALS = OperatingSystem.isWindows()
? new String[]{ "TERM", "INT"}
: new String[]{ "TERM", "HUP", "INT" };
StringBuilder bld = new String... | java | public static void register(final Logger LOG) {
synchronized (SignalHandler.class) {
if (registered) {
return;
}
registered = true;
final String[] SIGNALS = OperatingSystem.isWindows()
? new String[]{ "TERM", "INT"}
: new String[]{ "TERM", "HUP", "INT" };
StringBuilder bld = new String... | [
"public",
"static",
"void",
"register",
"(",
"final",
"Logger",
"LOG",
")",
"{",
"synchronized",
"(",
"SignalHandler",
".",
"class",
")",
"{",
"if",
"(",
"registered",
")",
"{",
"return",
";",
"}",
"registered",
"=",
"true",
";",
"final",
"String",
"[",
... | Register some signal handlers.
@param LOG The slf4j logger | [
"Register",
"some",
"signal",
"handlers",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/util/SignalHandler.java#L64-L92 |
124,287 | apache/flink | flink-core/src/main/java/org/apache/flink/api/java/typeutils/ValueTypeInfo.java | ValueTypeInfo.createCopyableValueSerializer | private static <X extends CopyableValue<X>> CopyableValueSerializer<X> createCopyableValueSerializer(Class<X> clazz) {
return new CopyableValueSerializer<X>(clazz);
} | java | private static <X extends CopyableValue<X>> CopyableValueSerializer<X> createCopyableValueSerializer(Class<X> clazz) {
return new CopyableValueSerializer<X>(clazz);
} | [
"private",
"static",
"<",
"X",
"extends",
"CopyableValue",
"<",
"X",
">",
">",
"CopyableValueSerializer",
"<",
"X",
">",
"createCopyableValueSerializer",
"(",
"Class",
"<",
"X",
">",
"clazz",
")",
"{",
"return",
"new",
"CopyableValueSerializer",
"<",
"X",
">",... | utility method to summon the necessary bound | [
"utility",
"method",
"to",
"summon",
"the",
"necessary",
"bound"
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/ValueTypeInfo.java#L234-L236 |
124,288 | apache/flink | flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java | TypeExtractor.registerFactory | private static void registerFactory(Type t, Class<? extends TypeInfoFactory> factory) {
Preconditions.checkNotNull(t, "Type parameter must not be null.");
Preconditions.checkNotNull(factory, "Factory parameter must not be null.");
if (!TypeInfoFactory.class.isAssignableFrom(factory)) {
throw new IllegalArgume... | java | private static void registerFactory(Type t, Class<? extends TypeInfoFactory> factory) {
Preconditions.checkNotNull(t, "Type parameter must not be null.");
Preconditions.checkNotNull(factory, "Factory parameter must not be null.");
if (!TypeInfoFactory.class.isAssignableFrom(factory)) {
throw new IllegalArgume... | [
"private",
"static",
"void",
"registerFactory",
"(",
"Type",
"t",
",",
"Class",
"<",
"?",
"extends",
"TypeInfoFactory",
">",
"factory",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"t",
",",
"\"Type parameter must not be null.\"",
")",
";",
"Preconditions"... | Registers a type information factory globally for a certain type. Every following type extraction
operation will use the provided factory for this type. The factory will have highest precedence
for this type. In a hierarchy of types the registered factory has higher precedence than annotations
at the same level but low... | [
"Registers",
"a",
"type",
"information",
"factory",
"globally",
"for",
"a",
"certain",
"type",
".",
"Every",
"following",
"type",
"extraction",
"operation",
"will",
"use",
"the",
"provided",
"factory",
"for",
"this",
"type",
".",
"The",
"factory",
"will",
"hav... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java#L149-L160 |
124,289 | apache/flink | flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java | TypeExtractor.getUnaryOperatorReturnType | @SuppressWarnings("unchecked")
@PublicEvolving
public static <IN, OUT> TypeInformation<OUT> getUnaryOperatorReturnType(
Function function,
Class<?> baseClass,
int inputTypeArgumentIndex,
int outputTypeArgumentIndex,
int[] lambdaOutputTypeArgumentIndices,
TypeInformation<IN> inType,
String functionName,
... | java | @SuppressWarnings("unchecked")
@PublicEvolving
public static <IN, OUT> TypeInformation<OUT> getUnaryOperatorReturnType(
Function function,
Class<?> baseClass,
int inputTypeArgumentIndex,
int outputTypeArgumentIndex,
int[] lambdaOutputTypeArgumentIndices,
TypeInformation<IN> inType,
String functionName,
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"PublicEvolving",
"public",
"static",
"<",
"IN",
",",
"OUT",
">",
"TypeInformation",
"<",
"OUT",
">",
"getUnaryOperatorReturnType",
"(",
"Function",
"function",
",",
"Class",
"<",
"?",
">",
"baseClass",
... | Returns the unary operator's return type.
<p>This method can extract a type in 4 different ways:
<p>1. By using the generics of the base class like MyFunction<X, Y, Z, IN, OUT>.
This is what outputTypeArgumentIndex (in this example "4") is good for.
<p>2. By using input type inference SubMyFunction<T, String, String... | [
"Returns",
"the",
"unary",
"operator",
"s",
"return",
"type",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java#L527-L597 |
124,290 | apache/flink | flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java | TypeExtractor.getBinaryOperatorReturnType | @SuppressWarnings("unchecked")
@PublicEvolving
public static <IN1, IN2, OUT> TypeInformation<OUT> getBinaryOperatorReturnType(
Function function,
Class<?> baseClass,
int input1TypeArgumentIndex,
int input2TypeArgumentIndex,
int outputTypeArgumentIndex,
int[] lambdaOutputTypeArgumentIndices,
TypeInformat... | java | @SuppressWarnings("unchecked")
@PublicEvolving
public static <IN1, IN2, OUT> TypeInformation<OUT> getBinaryOperatorReturnType(
Function function,
Class<?> baseClass,
int input1TypeArgumentIndex,
int input2TypeArgumentIndex,
int outputTypeArgumentIndex,
int[] lambdaOutputTypeArgumentIndices,
TypeInformat... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"PublicEvolving",
"public",
"static",
"<",
"IN1",
",",
"IN2",
",",
"OUT",
">",
"TypeInformation",
"<",
"OUT",
">",
"getBinaryOperatorReturnType",
"(",
"Function",
"function",
",",
"Class",
"<",
"?",
">",... | Returns the binary operator's return type.
<p>This method can extract a type in 4 different ways:
<p>1. By using the generics of the base class like MyFunction<X, Y, Z, IN, OUT>.
This is what outputTypeArgumentIndex (in this example "4") is good for.
<p>2. By using input type inference SubMyFunction<T, String, Strin... | [
"Returns",
"the",
"binary",
"operator",
"s",
"return",
"type",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java#L646-L723 |
124,291 | apache/flink | flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java | TypeExtractor.createTypeInfoFromFactory | @SuppressWarnings("unchecked")
private <IN1, IN2, OUT> TypeInformation<OUT> createTypeInfoFromFactory(
Type t, ArrayList<Type> typeHierarchy, TypeInformation<IN1> in1Type, TypeInformation<IN2> in2Type) {
final ArrayList<Type> factoryHierarchy = new ArrayList<>(typeHierarchy);
final TypeInfoFactory<? super OUT>... | java | @SuppressWarnings("unchecked")
private <IN1, IN2, OUT> TypeInformation<OUT> createTypeInfoFromFactory(
Type t, ArrayList<Type> typeHierarchy, TypeInformation<IN1> in1Type, TypeInformation<IN2> in2Type) {
final ArrayList<Type> factoryHierarchy = new ArrayList<>(typeHierarchy);
final TypeInfoFactory<? super OUT>... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"<",
"IN1",
",",
"IN2",
",",
"OUT",
">",
"TypeInformation",
"<",
"OUT",
">",
"createTypeInfoFromFactory",
"(",
"Type",
"t",
",",
"ArrayList",
"<",
"Type",
">",
"typeHierarchy",
",",
"TypeInformatio... | Creates type information using a factory if for this type or super types. Returns null otherwise. | [
"Creates",
"type",
"information",
"using",
"a",
"factory",
"if",
"for",
"this",
"type",
"or",
"super",
"types",
".",
"Returns",
"null",
"otherwise",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java#L1175-L1207 |
124,292 | apache/flink | flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java | TypeExtractor.getTypeInfoFactory | @Internal
public static <OUT> TypeInfoFactory<OUT> getTypeInfoFactory(Type t) {
final Class<?> factoryClass;
if (registeredTypeInfoFactories.containsKey(t)) {
factoryClass = registeredTypeInfoFactories.get(t);
}
else {
if (!isClassType(t) || !typeToClass(t).isAnnotationPresent(TypeInfo.class)) {
retu... | java | @Internal
public static <OUT> TypeInfoFactory<OUT> getTypeInfoFactory(Type t) {
final Class<?> factoryClass;
if (registeredTypeInfoFactories.containsKey(t)) {
factoryClass = registeredTypeInfoFactories.get(t);
}
else {
if (!isClassType(t) || !typeToClass(t).isAnnotationPresent(TypeInfo.class)) {
retu... | [
"@",
"Internal",
"public",
"static",
"<",
"OUT",
">",
"TypeInfoFactory",
"<",
"OUT",
">",
"getTypeInfoFactory",
"(",
"Type",
"t",
")",
"{",
"final",
"Class",
"<",
"?",
">",
"factoryClass",
";",
"if",
"(",
"registeredTypeInfoFactories",
".",
"containsKey",
"(... | Returns the type information factory for a type using the factory registry or annotations. | [
"Returns",
"the",
"type",
"information",
"factory",
"for",
"a",
"type",
"using",
"the",
"factory",
"registry",
"or",
"annotations",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java#L1519-L1539 |
124,293 | apache/flink | flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java | TypeExtractor.getClosestFactory | private static <OUT> TypeInfoFactory<? super OUT> getClosestFactory(ArrayList<Type> typeHierarchy, Type t) {
TypeInfoFactory factory = null;
while (factory == null && isClassType(t) && !(typeToClass(t).equals(Object.class))) {
typeHierarchy.add(t);
factory = getTypeInfoFactory(t);
t = typeToClass(t).getGen... | java | private static <OUT> TypeInfoFactory<? super OUT> getClosestFactory(ArrayList<Type> typeHierarchy, Type t) {
TypeInfoFactory factory = null;
while (factory == null && isClassType(t) && !(typeToClass(t).equals(Object.class))) {
typeHierarchy.add(t);
factory = getTypeInfoFactory(t);
t = typeToClass(t).getGen... | [
"private",
"static",
"<",
"OUT",
">",
"TypeInfoFactory",
"<",
"?",
"super",
"OUT",
">",
"getClosestFactory",
"(",
"ArrayList",
"<",
"Type",
">",
"typeHierarchy",
",",
"Type",
"t",
")",
"{",
"TypeInfoFactory",
"factory",
"=",
"null",
";",
"while",
"(",
"fac... | Traverses the type hierarchy up until a type information factory can be found.
@param typeHierarchy hierarchy to be filled while traversing up
@param t type for which a factory needs to be found
@return closest type information factory or null if there is no factory in the type hierarchy | [
"Traverses",
"the",
"type",
"hierarchy",
"up",
"until",
"a",
"type",
"information",
"factory",
"can",
"be",
"found",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java#L1561-L1573 |
124,294 | apache/flink | flink-core/src/main/java/org/apache/flink/util/InstantiationUtil.java | InstantiationUtil.isProperClass | public static boolean isProperClass(Class<?> clazz) {
int mods = clazz.getModifiers();
return !(Modifier.isAbstract(mods) || Modifier.isInterface(mods) || Modifier.isNative(mods));
} | java | public static boolean isProperClass(Class<?> clazz) {
int mods = clazz.getModifiers();
return !(Modifier.isAbstract(mods) || Modifier.isInterface(mods) || Modifier.isNative(mods));
} | [
"public",
"static",
"boolean",
"isProperClass",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"int",
"mods",
"=",
"clazz",
".",
"getModifiers",
"(",
")",
";",
"return",
"!",
"(",
"Modifier",
".",
"isAbstract",
"(",
"mods",
")",
"||",
"Modifier",
".",... | Checks, whether the class is a proper class, i.e. not abstract or an interface, and not a primitive type.
@param clazz The class to check.
@return True, if the class is a proper class, false otherwise. | [
"Checks",
"whether",
"the",
"class",
"is",
"a",
"proper",
"class",
"i",
".",
"e",
".",
"not",
"abstract",
"or",
"an",
"interface",
"and",
"not",
"a",
"primitive",
"type",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/InstantiationUtil.java#L448-L451 |
124,295 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/LongHybridHashTable.java | LongHybridHashTable.tryDenseMode | private void tryDenseMode() {
if (numSpillFiles != 0) {
return;
}
long minKey = Long.MAX_VALUE;
long maxKey = Long.MIN_VALUE;
long recordCount = 0;
for (LongHashPartition p : this.partitionsBeingBuilt) {
long partitionRecords = p.getBuildSideRecordCount();
recordCount += partitionRecords;
if (... | java | private void tryDenseMode() {
if (numSpillFiles != 0) {
return;
}
long minKey = Long.MAX_VALUE;
long maxKey = Long.MIN_VALUE;
long recordCount = 0;
for (LongHashPartition p : this.partitionsBeingBuilt) {
long partitionRecords = p.getBuildSideRecordCount();
recordCount += partitionRecords;
if (... | [
"private",
"void",
"tryDenseMode",
"(",
")",
"{",
"if",
"(",
"numSpillFiles",
"!=",
"0",
")",
"{",
"return",
";",
"}",
"long",
"minKey",
"=",
"Long",
".",
"MAX_VALUE",
";",
"long",
"maxKey",
"=",
"Long",
".",
"MIN_VALUE",
";",
"long",
"recordCount",
"=... | After build end, try to use dense mode. | [
"After",
"build",
"end",
"try",
"to",
"use",
"dense",
"mode",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/LongHybridHashTable.java#L182-L252 |
124,296 | apache/flink | flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBFullRestoreOperation.java | RocksDBFullRestoreOperation.restore | @Override
public RocksDBRestoreResult restore()
throws IOException, StateMigrationException, RocksDBException {
openDB();
for (KeyedStateHandle keyedStateHandle : restoreStateHandles) {
if (keyedStateHandle != null) {
if (!(keyedStateHandle instanceof KeyGroupsStateHandle)) {
throw new IllegalStateE... | java | @Override
public RocksDBRestoreResult restore()
throws IOException, StateMigrationException, RocksDBException {
openDB();
for (KeyedStateHandle keyedStateHandle : restoreStateHandles) {
if (keyedStateHandle != null) {
if (!(keyedStateHandle instanceof KeyGroupsStateHandle)) {
throw new IllegalStateE... | [
"@",
"Override",
"public",
"RocksDBRestoreResult",
"restore",
"(",
")",
"throws",
"IOException",
",",
"StateMigrationException",
",",
"RocksDBException",
"{",
"openDB",
"(",
")",
";",
"for",
"(",
"KeyedStateHandle",
"keyedStateHandle",
":",
"restoreStateHandles",
")",... | Restores all key-groups data that is referenced by the passed state handles. | [
"Restores",
"all",
"key",
"-",
"groups",
"data",
"that",
"is",
"referenced",
"by",
"the",
"passed",
"state",
"handles",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBFullRestoreOperation.java#L128-L146 |
124,297 | apache/flink | flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBFullRestoreOperation.java | RocksDBFullRestoreOperation.restoreKeyGroupsInStateHandle | private void restoreKeyGroupsInStateHandle()
throws IOException, StateMigrationException, RocksDBException {
try {
currentStateHandleInStream = currentKeyGroupsStateHandle.openInputStream();
cancelStreamRegistry.registerCloseable(currentStateHandleInStream);
currentStateHandleInView = new DataInputViewStre... | java | private void restoreKeyGroupsInStateHandle()
throws IOException, StateMigrationException, RocksDBException {
try {
currentStateHandleInStream = currentKeyGroupsStateHandle.openInputStream();
cancelStreamRegistry.registerCloseable(currentStateHandleInStream);
currentStateHandleInView = new DataInputViewStre... | [
"private",
"void",
"restoreKeyGroupsInStateHandle",
"(",
")",
"throws",
"IOException",
",",
"StateMigrationException",
",",
"RocksDBException",
"{",
"try",
"{",
"currentStateHandleInStream",
"=",
"currentKeyGroupsStateHandle",
".",
"openInputStream",
"(",
")",
";",
"cance... | Restore one key groups state handle. | [
"Restore",
"one",
"key",
"groups",
"state",
"handle",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBFullRestoreOperation.java#L151-L164 |
124,298 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java | MiniCluster.runDetached | public void runDetached(JobGraph job) throws JobExecutionException, InterruptedException {
checkNotNull(job, "job is null");
final CompletableFuture<JobSubmissionResult> submissionFuture = submitJob(job);
try {
submissionFuture.get();
} catch (ExecutionException e) {
throw new JobExecutionException(job.... | java | public void runDetached(JobGraph job) throws JobExecutionException, InterruptedException {
checkNotNull(job, "job is null");
final CompletableFuture<JobSubmissionResult> submissionFuture = submitJob(job);
try {
submissionFuture.get();
} catch (ExecutionException e) {
throw new JobExecutionException(job.... | [
"public",
"void",
"runDetached",
"(",
"JobGraph",
"job",
")",
"throws",
"JobExecutionException",
",",
"InterruptedException",
"{",
"checkNotNull",
"(",
"job",
",",
"\"job is null\"",
")",
";",
"final",
"CompletableFuture",
"<",
"JobSubmissionResult",
">",
"submissionF... | This method executes a job in detached mode. The method returns immediately after the job
has been added to the
@param job The Flink job to execute
@throws JobExecutionException Thrown if anything went amiss during initial job launch,
or if the job terminally failed. | [
"This",
"method",
"executes",
"a",
"job",
"in",
"detached",
"mode",
".",
"The",
"method",
"returns",
"immediately",
"after",
"the",
"job",
"has",
"been",
"added",
"to",
"the"
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java#L587-L597 |
124,299 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java | MiniCluster.executeJobBlocking | @Override
public JobExecutionResult executeJobBlocking(JobGraph job) throws JobExecutionException, InterruptedException {
checkNotNull(job, "job is null");
final CompletableFuture<JobSubmissionResult> submissionFuture = submitJob(job);
final CompletableFuture<JobResult> jobResultFuture = submissionFuture.thenC... | java | @Override
public JobExecutionResult executeJobBlocking(JobGraph job) throws JobExecutionException, InterruptedException {
checkNotNull(job, "job is null");
final CompletableFuture<JobSubmissionResult> submissionFuture = submitJob(job);
final CompletableFuture<JobResult> jobResultFuture = submissionFuture.thenC... | [
"@",
"Override",
"public",
"JobExecutionResult",
"executeJobBlocking",
"(",
"JobGraph",
"job",
")",
"throws",
"JobExecutionException",
",",
"InterruptedException",
"{",
"checkNotNull",
"(",
"job",
",",
"\"job is null\"",
")",
";",
"final",
"CompletableFuture",
"<",
"J... | This method runs a job in blocking mode. The method returns only after the job
completed successfully, or after it failed terminally.
@param job The Flink job to execute
@return The result of the job execution
@throws JobExecutionException Thrown if anything went amiss during initial job launch,
or if the job termin... | [
"This",
"method",
"runs",
"a",
"job",
"in",
"blocking",
"mode",
".",
"The",
"method",
"returns",
"only",
"after",
"the",
"job",
"completed",
"successfully",
"or",
"after",
"it",
"failed",
"terminally",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java#L609-L631 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.