id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
123,400
apache/flink
flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumer08.java
FlinkKafkaConsumer08.validateZooKeeperConfig
protected static void validateZooKeeperConfig(Properties props) { if (props.getProperty("zookeeper.connect") == null) { throw new IllegalArgumentException("Required property 'zookeeper.connect' has not been set in the properties"); } if (props.getProperty(ConsumerConfig.GROUP_ID_CONFIG) == null) { throw new...
java
protected static void validateZooKeeperConfig(Properties props) { if (props.getProperty("zookeeper.connect") == null) { throw new IllegalArgumentException("Required property 'zookeeper.connect' has not been set in the properties"); } if (props.getProperty(ConsumerConfig.GROUP_ID_CONFIG) == null) { throw new...
[ "protected", "static", "void", "validateZooKeeperConfig", "(", "Properties", "props", ")", "{", "if", "(", "props", ".", "getProperty", "(", "\"zookeeper.connect\"", ")", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Required property '...
Validate the ZK configuration, checking for required parameters. @param props Properties to check
[ "Validate", "the", "ZK", "configuration", "checking", "for", "required", "parameters", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumer08.java#L293-L317
123,401
apache/flink
flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumer08.java
FlinkKafkaConsumer08.validateAutoOffsetResetValue
private static void validateAutoOffsetResetValue(Properties config) { final String val = config.getProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "largest"); if (!(val.equals("largest") || val.equals("latest") || val.equals("earliest") || val.equals("smallest"))) { // largest/smallest is kafka 0.8, latest/ear...
java
private static void validateAutoOffsetResetValue(Properties config) { final String val = config.getProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "largest"); if (!(val.equals("largest") || val.equals("latest") || val.equals("earliest") || val.equals("smallest"))) { // largest/smallest is kafka 0.8, latest/ear...
[ "private", "static", "void", "validateAutoOffsetResetValue", "(", "Properties", "config", ")", "{", "final", "String", "val", "=", "config", ".", "getProperty", "(", "ConsumerConfig", ".", "AUTO_OFFSET_RESET_CONFIG", ",", "\"largest\"", ")", ";", "if", "(", "!", ...
Check for invalid "auto.offset.reset" values. Should be called in constructor for eager checking before submitting the job. Note that 'none' is also considered invalid, as we don't want to deliberately throw an exception right after a task is started. @param config kafka consumer properties to check
[ "Check", "for", "invalid", "auto", ".", "offset", ".", "reset", "values", ".", "Should", "be", "called", "in", "constructor", "for", "eager", "checking", "before", "submitting", "the", "job", ".", "Note", "that", "none", "is", "also", "considered", "invalid"...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumer08.java#L326-L333
123,402
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
Task.isCanceledOrFailed
public boolean isCanceledOrFailed() { return executionState == ExecutionState.CANCELING || executionState == ExecutionState.CANCELED || executionState == ExecutionState.FAILED; }
java
public boolean isCanceledOrFailed() { return executionState == ExecutionState.CANCELING || executionState == ExecutionState.CANCELED || executionState == ExecutionState.FAILED; }
[ "public", "boolean", "isCanceledOrFailed", "(", ")", "{", "return", "executionState", "==", "ExecutionState", ".", "CANCELING", "||", "executionState", "==", "ExecutionState", ".", "CANCELED", "||", "executionState", "==", "ExecutionState", ".", "FAILED", ";", "}" ]
Checks whether the task has failed, is canceled, or is being canceled at the moment. @return True is the task in state FAILED, CANCELING, or CANCELED, false otherwise.
[ "Checks", "whether", "the", "task", "has", "failed", "is", "canceled", "or", "is", "being", "canceled", "at", "the", "moment", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java#L513-L517
123,403
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
Task.releaseNetworkResources
private void releaseNetworkResources() { LOG.debug("Release task {} network resources (state: {}).", taskNameWithSubtask, getExecutionState()); for (ResultPartition partition : producedPartitions) { taskEventDispatcher.unregisterPartition(partition.getPartitionId()); if (isCanceledOrFailed()) { partition...
java
private void releaseNetworkResources() { LOG.debug("Release task {} network resources (state: {}).", taskNameWithSubtask, getExecutionState()); for (ResultPartition partition : producedPartitions) { taskEventDispatcher.unregisterPartition(partition.getPartitionId()); if (isCanceledOrFailed()) { partition...
[ "private", "void", "releaseNetworkResources", "(", ")", "{", "LOG", ".", "debug", "(", "\"Release task {} network resources (state: {}).\"", ",", "taskNameWithSubtask", ",", "getExecutionState", "(", ")", ")", ";", "for", "(", "ResultPartition", "partition", ":", "pro...
Releases network resources before task exits. We should also fail the partition to release if the task has failed, is canceled, or is being canceled at the moment.
[ "Releases", "network", "resources", "before", "task", "exits", ".", "We", "should", "also", "fail", "the", "partition", "to", "release", "if", "the", "task", "has", "failed", "is", "canceled", "or", "is", "being", "canceled", "at", "the", "moment", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java#L881-L892
123,404
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
Task.transitionState
private boolean transitionState(ExecutionState currentState, ExecutionState newState, Throwable cause) { if (STATE_UPDATER.compareAndSet(this, currentState, newState)) { if (cause == null) { LOG.info("{} ({}) switched from {} to {}.", taskNameWithSubtask, executionId, currentState, newState); } else { L...
java
private boolean transitionState(ExecutionState currentState, ExecutionState newState, Throwable cause) { if (STATE_UPDATER.compareAndSet(this, currentState, newState)) { if (cause == null) { LOG.info("{} ({}) switched from {} to {}.", taskNameWithSubtask, executionId, currentState, newState); } else { L...
[ "private", "boolean", "transitionState", "(", "ExecutionState", "currentState", ",", "ExecutionState", "newState", ",", "Throwable", "cause", ")", "{", "if", "(", "STATE_UPDATER", ".", "compareAndSet", "(", "this", ",", "currentState", ",", "newState", ")", ")", ...
Try to transition the execution state from the current state to the new state. @param currentState of the execution @param newState of the execution @param cause of the transition change or null @return true if the transition was successful, otherwise false
[ "Try", "to", "transition", "the", "execution", "state", "from", "the", "current", "state", "to", "the", "new", "state", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java#L962-L974
123,405
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
Task.triggerCheckpointBarrier
public void triggerCheckpointBarrier( final long checkpointID, final long checkpointTimestamp, final CheckpointOptions checkpointOptions, final boolean advanceToEndOfEventTime) { final AbstractInvokable invokable = this.invokable; final CheckpointMetaData checkpointMetaData = new CheckpointMetaData(che...
java
public void triggerCheckpointBarrier( final long checkpointID, final long checkpointTimestamp, final CheckpointOptions checkpointOptions, final boolean advanceToEndOfEventTime) { final AbstractInvokable invokable = this.invokable; final CheckpointMetaData checkpointMetaData = new CheckpointMetaData(che...
[ "public", "void", "triggerCheckpointBarrier", "(", "final", "long", "checkpointID", ",", "final", "long", "checkpointTimestamp", ",", "final", "CheckpointOptions", "checkpointOptions", ",", "final", "boolean", "advanceToEndOfEventTime", ")", "{", "final", "AbstractInvokab...
Calls the invokable to trigger a checkpoint. @param checkpointID The ID identifying the checkpoint. @param checkpointTimestamp The timestamp associated with the checkpoint. @param checkpointOptions Options for performing this checkpoint. @param advanceToEndOfEventTime Flag indicating if the source should inject a {@co...
[ "Calls", "the", "invokable", "to", "trigger", "a", "checkpoint", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java#L1161-L1219
123,406
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
Task.executeAsyncCallRunnable
private void executeAsyncCallRunnable(Runnable runnable, String callName, boolean blocking) { // make sure the executor is initialized. lock against concurrent calls to this function synchronized (this) { if (executionState != ExecutionState.RUNNING) { return; } // get ourselves a reference on the sta...
java
private void executeAsyncCallRunnable(Runnable runnable, String callName, boolean blocking) { // make sure the executor is initialized. lock against concurrent calls to this function synchronized (this) { if (executionState != ExecutionState.RUNNING) { return; } // get ourselves a reference on the sta...
[ "private", "void", "executeAsyncCallRunnable", "(", "Runnable", "runnable", ",", "String", "callName", ",", "boolean", "blocking", ")", "{", "// make sure the executor is initialized. lock against concurrent calls to this function", "synchronized", "(", "this", ")", "{", "if"...
Utility method to dispatch an asynchronous call on the invokable. @param runnable The async call runnable. @param callName The name of the call, for logging purposes.
[ "Utility", "method", "to", "dispatch", "an", "asynchronous", "call", "on", "the", "invokable", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java#L1319-L1369
123,407
apache/flink
flink-core/src/main/java/org/apache/flink/util/LinkedOptionalMap.java
LinkedOptionalMap.mergeRightIntoLeft
public static <K, V> MergeResult<K, V> mergeRightIntoLeft(LinkedOptionalMap<K, V> left, LinkedOptionalMap<K, V> right) { LinkedOptionalMap<K, V> merged = new LinkedOptionalMap<>(left); merged.putAll(right); return new MergeResult<>(merged, isLeftPrefixOfRight(left, right)); }
java
public static <K, V> MergeResult<K, V> mergeRightIntoLeft(LinkedOptionalMap<K, V> left, LinkedOptionalMap<K, V> right) { LinkedOptionalMap<K, V> merged = new LinkedOptionalMap<>(left); merged.putAll(right); return new MergeResult<>(merged, isLeftPrefixOfRight(left, right)); }
[ "public", "static", "<", "K", ",", "V", ">", "MergeResult", "<", "K", ",", "V", ">", "mergeRightIntoLeft", "(", "LinkedOptionalMap", "<", "K", ",", "V", ">", "left", ",", "LinkedOptionalMap", "<", "K", ",", "V", ">", "right", ")", "{", "LinkedOptionalM...
Tries to merges the keys and the values of @right into @left.
[ "Tries", "to", "merges", "the", "keys", "and", "the", "values", "of" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/LinkedOptionalMap.java#L77-L82
123,408
apache/flink
flink-core/src/main/java/org/apache/flink/util/LinkedOptionalMap.java
LinkedOptionalMap.absentKeysOrValues
public Set<String> absentKeysOrValues() { return underlyingMap.entrySet() .stream() .filter(LinkedOptionalMap::keyOrValueIsAbsent) .map(Entry::getKey) .collect(Collectors.toCollection(LinkedHashSet::new)); }
java
public Set<String> absentKeysOrValues() { return underlyingMap.entrySet() .stream() .filter(LinkedOptionalMap::keyOrValueIsAbsent) .map(Entry::getKey) .collect(Collectors.toCollection(LinkedHashSet::new)); }
[ "public", "Set", "<", "String", ">", "absentKeysOrValues", "(", ")", "{", "return", "underlyingMap", ".", "entrySet", "(", ")", ".", "stream", "(", ")", ".", "filter", "(", "LinkedOptionalMap", "::", "keyOrValueIsAbsent", ")", ".", "map", "(", "Entry", "::...
Returns the key names of any keys or values that are absent.
[ "Returns", "the", "key", "names", "of", "any", "keys", "or", "values", "that", "are", "absent", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/LinkedOptionalMap.java#L132-L138
123,409
apache/flink
flink-core/src/main/java/org/apache/flink/util/LinkedOptionalMap.java
LinkedOptionalMap.hasAbsentKeysOrValues
public boolean hasAbsentKeysOrValues() { for (Entry<String, KeyValue<K, V>> entry : underlyingMap.entrySet()) { if (keyOrValueIsAbsent(entry)) { return true; } } return false; }
java
public boolean hasAbsentKeysOrValues() { for (Entry<String, KeyValue<K, V>> entry : underlyingMap.entrySet()) { if (keyOrValueIsAbsent(entry)) { return true; } } return false; }
[ "public", "boolean", "hasAbsentKeysOrValues", "(", ")", "{", "for", "(", "Entry", "<", "String", ",", "KeyValue", "<", "K", ",", "V", ">", ">", "entry", ":", "underlyingMap", ".", "entrySet", "(", ")", ")", "{", "if", "(", "keyOrValueIsAbsent", "(", "e...
Checks whether there are entries with absent keys or values.
[ "Checks", "whether", "there", "are", "entries", "with", "absent", "keys", "or", "values", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/LinkedOptionalMap.java#L143-L150
123,410
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java
AbstractFetcher.addDiscoveredPartitions
public void addDiscoveredPartitions(List<KafkaTopicPartition> newPartitions) throws IOException, ClassNotFoundException { List<KafkaTopicPartitionState<KPH>> newPartitionStates = createPartitionStateHolders( newPartitions, KafkaTopicPartitionStateSentinel.EARLIEST_OFFSET, timestampWatermarkMode, water...
java
public void addDiscoveredPartitions(List<KafkaTopicPartition> newPartitions) throws IOException, ClassNotFoundException { List<KafkaTopicPartitionState<KPH>> newPartitionStates = createPartitionStateHolders( newPartitions, KafkaTopicPartitionStateSentinel.EARLIEST_OFFSET, timestampWatermarkMode, water...
[ "public", "void", "addDiscoveredPartitions", "(", "List", "<", "KafkaTopicPartition", ">", "newPartitions", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "List", "<", "KafkaTopicPartitionState", "<", "KPH", ">>", "newPartitionStates", "=", "createPar...
Adds a list of newly discovered partitions to the fetcher for consuming. <p>This method creates the partition state holder for each new partition, using {@link KafkaTopicPartitionStateSentinel#EARLIEST_OFFSET} as the starting offset. It uses the earliest offset because there may be delay in discovering a partition aft...
[ "Adds", "a", "list", "of", "newly", "discovered", "partitions", "to", "the", "fetcher", "for", "consuming", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java#L229-L248
123,411
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java
AbstractFetcher.snapshotCurrentState
public HashMap<KafkaTopicPartition, Long> snapshotCurrentState() { // this method assumes that the checkpoint lock is held assert Thread.holdsLock(checkpointLock); HashMap<KafkaTopicPartition, Long> state = new HashMap<>(subscribedPartitionStates.size()); for (KafkaTopicPartitionState<KPH> partition : subscrib...
java
public HashMap<KafkaTopicPartition, Long> snapshotCurrentState() { // this method assumes that the checkpoint lock is held assert Thread.holdsLock(checkpointLock); HashMap<KafkaTopicPartition, Long> state = new HashMap<>(subscribedPartitionStates.size()); for (KafkaTopicPartitionState<KPH> partition : subscrib...
[ "public", "HashMap", "<", "KafkaTopicPartition", ",", "Long", ">", "snapshotCurrentState", "(", ")", "{", "// this method assumes that the checkpoint lock is held", "assert", "Thread", ".", "holdsLock", "(", "checkpointLock", ")", ";", "HashMap", "<", "KafkaTopicPartition...
Takes a snapshot of the partition offsets. <p>Important: This method must be called under the checkpoint lock. @return A map from partition to current offset.
[ "Takes", "a", "snapshot", "of", "the", "partition", "offsets", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java#L328-L337
123,412
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java
AbstractFetcher.emitRecord
protected void emitRecord(T record, KafkaTopicPartitionState<KPH> partitionState, long offset) throws Exception { if (record != null) { if (timestampWatermarkMode == NO_TIMESTAMPS_WATERMARKS) { // fast path logic, in case there are no watermarks // emit the record, using the checkpoint lock to guarantee ...
java
protected void emitRecord(T record, KafkaTopicPartitionState<KPH> partitionState, long offset) throws Exception { if (record != null) { if (timestampWatermarkMode == NO_TIMESTAMPS_WATERMARKS) { // fast path logic, in case there are no watermarks // emit the record, using the checkpoint lock to guarantee ...
[ "protected", "void", "emitRecord", "(", "T", "record", ",", "KafkaTopicPartitionState", "<", "KPH", ">", "partitionState", ",", "long", "offset", ")", "throws", "Exception", "{", "if", "(", "record", "!=", "null", ")", "{", "if", "(", "timestampWatermarkMode",...
Emits a record without attaching an existing timestamp to it. <p>Implementation Note: This method is kept brief to be JIT inlining friendly. That makes the fast path efficient, the extended paths are called as separate methods. @param record The record to emit @param partitionState The state of the Kafka partition fr...
[ "Emits", "a", "record", "without", "attaching", "an", "existing", "timestamp", "to", "it", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java#L353-L376
123,413
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java
AbstractFetcher.emitRecordWithTimestamp
protected void emitRecordWithTimestamp( T record, KafkaTopicPartitionState<KPH> partitionState, long offset, long timestamp) throws Exception { if (record != null) { if (timestampWatermarkMode == NO_TIMESTAMPS_WATERMARKS) { // fast path logic, in case there are no watermarks generated in the fetcher /...
java
protected void emitRecordWithTimestamp( T record, KafkaTopicPartitionState<KPH> partitionState, long offset, long timestamp) throws Exception { if (record != null) { if (timestampWatermarkMode == NO_TIMESTAMPS_WATERMARKS) { // fast path logic, in case there are no watermarks generated in the fetcher /...
[ "protected", "void", "emitRecordWithTimestamp", "(", "T", "record", ",", "KafkaTopicPartitionState", "<", "KPH", ">", "partitionState", ",", "long", "offset", ",", "long", "timestamp", ")", "throws", "Exception", "{", "if", "(", "record", "!=", "null", ")", "{...
Emits a record attaching a timestamp to it. <p>Implementation Note: This method is kept brief to be JIT inlining friendly. That makes the fast path efficient, the extended paths are called as separate methods. @param record The record to emit @param partitionState The state of the Kafka partition from which the recor...
[ "Emits", "a", "record", "attaching", "a", "timestamp", "to", "it", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java#L388-L412
123,414
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java
AbstractFetcher.emitRecordWithTimestampAndPeriodicWatermark
private void emitRecordWithTimestampAndPeriodicWatermark( T record, KafkaTopicPartitionState<KPH> partitionState, long offset, long kafkaEventTimestamp) { @SuppressWarnings("unchecked") final KafkaTopicPartitionStateWithPeriodicWatermarks<T, KPH> withWatermarksState = (KafkaTopicPartitionStateWithPeriodicWat...
java
private void emitRecordWithTimestampAndPeriodicWatermark( T record, KafkaTopicPartitionState<KPH> partitionState, long offset, long kafkaEventTimestamp) { @SuppressWarnings("unchecked") final KafkaTopicPartitionStateWithPeriodicWatermarks<T, KPH> withWatermarksState = (KafkaTopicPartitionStateWithPeriodicWat...
[ "private", "void", "emitRecordWithTimestampAndPeriodicWatermark", "(", "T", "record", ",", "KafkaTopicPartitionState", "<", "KPH", ">", "partitionState", ",", "long", "offset", ",", "long", "kafkaEventTimestamp", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ...
Record emission, if a timestamp will be attached from an assigner that is also a periodic watermark generator.
[ "Record", "emission", "if", "a", "timestamp", "will", "be", "attached", "from", "an", "assigner", "that", "is", "also", "a", "periodic", "watermark", "generator", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java#L418-L439
123,415
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java
AbstractFetcher.emitRecordWithTimestampAndPunctuatedWatermark
private void emitRecordWithTimestampAndPunctuatedWatermark( T record, KafkaTopicPartitionState<KPH> partitionState, long offset, long kafkaEventTimestamp) { @SuppressWarnings("unchecked") final KafkaTopicPartitionStateWithPunctuatedWatermarks<T, KPH> withWatermarksState = (KafkaTopicPartitionStateWithPunctua...
java
private void emitRecordWithTimestampAndPunctuatedWatermark( T record, KafkaTopicPartitionState<KPH> partitionState, long offset, long kafkaEventTimestamp) { @SuppressWarnings("unchecked") final KafkaTopicPartitionStateWithPunctuatedWatermarks<T, KPH> withWatermarksState = (KafkaTopicPartitionStateWithPunctua...
[ "private", "void", "emitRecordWithTimestampAndPunctuatedWatermark", "(", "T", "record", ",", "KafkaTopicPartitionState", "<", "KPH", ">", "partitionState", ",", "long", "offset", ",", "long", "kafkaEventTimestamp", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\""...
Record emission, if a timestamp will be attached from an assigner that is also a punctuated watermark generator.
[ "Record", "emission", "if", "a", "timestamp", "will", "be", "attached", "from", "an", "assigner", "that", "is", "also", "a", "punctuated", "watermark", "generator", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java#L445-L468
123,416
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java
AbstractFetcher.updateMinPunctuatedWatermark
private void updateMinPunctuatedWatermark(Watermark nextWatermark) { if (nextWatermark.getTimestamp() > maxWatermarkSoFar) { long newMin = Long.MAX_VALUE; for (KafkaTopicPartitionState<?> state : subscribedPartitionStates) { @SuppressWarnings("unchecked") final KafkaTopicPartitionStateWithPunctuatedWat...
java
private void updateMinPunctuatedWatermark(Watermark nextWatermark) { if (nextWatermark.getTimestamp() > maxWatermarkSoFar) { long newMin = Long.MAX_VALUE; for (KafkaTopicPartitionState<?> state : subscribedPartitionStates) { @SuppressWarnings("unchecked") final KafkaTopicPartitionStateWithPunctuatedWat...
[ "private", "void", "updateMinPunctuatedWatermark", "(", "Watermark", "nextWatermark", ")", "{", "if", "(", "nextWatermark", ".", "getTimestamp", "(", ")", ">", "maxWatermarkSoFar", ")", "{", "long", "newMin", "=", "Long", ".", "MAX_VALUE", ";", "for", "(", "Ka...
Checks whether a new per-partition watermark is also a new cross-partition watermark.
[ "Checks", "whether", "a", "new", "per", "-", "partition", "watermark", "is", "also", "a", "new", "cross", "-", "partition", "watermark", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java#L473-L495
123,417
apache/flink
flink-connectors/flink-connector-elasticsearch-base/src/main/java/org/apache/flink/table/descriptors/Elasticsearch.java
Elasticsearch.host
public Elasticsearch host(String hostname, int port, String protocol) { final Host host = new Host( Preconditions.checkNotNull(hostname), port, Preconditions.checkNotNull(protocol)); hosts.add(host); return this; }
java
public Elasticsearch host(String hostname, int port, String protocol) { final Host host = new Host( Preconditions.checkNotNull(hostname), port, Preconditions.checkNotNull(protocol)); hosts.add(host); return this; }
[ "public", "Elasticsearch", "host", "(", "String", "hostname", ",", "int", "port", ",", "String", "protocol", ")", "{", "final", "Host", "host", "=", "new", "Host", "(", "Preconditions", ".", "checkNotNull", "(", "hostname", ")", ",", "port", ",", "Precondi...
Adds an Elasticsearch host to connect to. Required. <p>Multiple hosts can be declared by calling this method multiple times. @param hostname connection hostname @param port connection port @param protocol connection protocol; e.g. "http"
[ "Adds", "an", "Elasticsearch", "host", "to", "connect", "to", ".", "Required", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-elasticsearch-base/src/main/java/org/apache/flink/table/descriptors/Elasticsearch.java#L88-L96
123,418
apache/flink
flink-connectors/flink-connector-elasticsearch-base/src/main/java/org/apache/flink/table/descriptors/Elasticsearch.java
Elasticsearch.failureHandlerCustom
public Elasticsearch failureHandlerCustom(Class<? extends ActionRequestFailureHandler> failureHandlerClass) { internalProperties.putString(CONNECTOR_FAILURE_HANDLER, ElasticsearchValidator.CONNECTOR_FAILURE_HANDLER_VALUE_CUSTOM); internalProperties.putClass(CONNECTOR_FAILURE_HANDLER_CLASS, failureHandlerClass); r...
java
public Elasticsearch failureHandlerCustom(Class<? extends ActionRequestFailureHandler> failureHandlerClass) { internalProperties.putString(CONNECTOR_FAILURE_HANDLER, ElasticsearchValidator.CONNECTOR_FAILURE_HANDLER_VALUE_CUSTOM); internalProperties.putClass(CONNECTOR_FAILURE_HANDLER_CLASS, failureHandlerClass); r...
[ "public", "Elasticsearch", "failureHandlerCustom", "(", "Class", "<", "?", "extends", "ActionRequestFailureHandler", ">", "failureHandlerClass", ")", "{", "internalProperties", ".", "putString", "(", "CONNECTOR_FAILURE_HANDLER", ",", "ElasticsearchValidator", ".", "CONNECTO...
Configures a failure handling strategy in case a request to Elasticsearch fails. <p>This strategy allows for custom failure handling using a {@link ActionRequestFailureHandler}.
[ "Configures", "a", "failure", "handling", "strategy", "in", "case", "a", "request", "to", "Elasticsearch", "fails", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-elasticsearch-base/src/main/java/org/apache/flink/table/descriptors/Elasticsearch.java#L174-L178
123,419
apache/flink
flink-connectors/flink-connector-elasticsearch-base/src/main/java/org/apache/flink/table/descriptors/Elasticsearch.java
Elasticsearch.bulkFlushMaxSize
public Elasticsearch bulkFlushMaxSize(String maxSize) { internalProperties.putMemorySize(CONNECTOR_BULK_FLUSH_MAX_SIZE, MemorySize.parse(maxSize, MemorySize.MemoryUnit.BYTES)); return this; }
java
public Elasticsearch bulkFlushMaxSize(String maxSize) { internalProperties.putMemorySize(CONNECTOR_BULK_FLUSH_MAX_SIZE, MemorySize.parse(maxSize, MemorySize.MemoryUnit.BYTES)); return this; }
[ "public", "Elasticsearch", "bulkFlushMaxSize", "(", "String", "maxSize", ")", "{", "internalProperties", ".", "putMemorySize", "(", "CONNECTOR_BULK_FLUSH_MAX_SIZE", ",", "MemorySize", ".", "parse", "(", "maxSize", ",", "MemorySize", ".", "MemoryUnit", ".", "BYTES", ...
Configures how to buffer elements before sending them in bulk to the cluster for efficiency. <p>Sets the maximum size of buffered actions per bulk request (using the syntax of {@link MemorySize}).
[ "Configures", "how", "to", "buffer", "elements", "before", "sending", "them", "in", "bulk", "to", "the", "cluster", "for", "efficiency", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-elasticsearch-base/src/main/java/org/apache/flink/table/descriptors/Elasticsearch.java#L209-L212
123,420
apache/flink
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/internal/TransactionalIdsGenerator.java
TransactionalIdsGenerator.generateIdsToAbort
public Set<String> generateIdsToAbort() { Set<String> idsToAbort = new HashSet<>(); for (int i = 0; i < safeScaleDownFactor; i++) { idsToAbort.addAll(generateIdsToUse(i * poolSize * totalNumberOfSubtasks)); } return idsToAbort; }
java
public Set<String> generateIdsToAbort() { Set<String> idsToAbort = new HashSet<>(); for (int i = 0; i < safeScaleDownFactor; i++) { idsToAbort.addAll(generateIdsToUse(i * poolSize * totalNumberOfSubtasks)); } return idsToAbort; }
[ "public", "Set", "<", "String", ">", "generateIdsToAbort", "(", ")", "{", "Set", "<", "String", ">", "idsToAbort", "=", "new", "HashSet", "<>", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "safeScaleDownFactor", ";", "i", "++", "...
If we have to abort previous transactional id in case of restart after a failure BEFORE first checkpoint completed, we don't know what was the parallelism used in previous attempt. In that case we must guess the ids range to abort based on current configured pool size, current parallelism and safeScaleDownFactor.
[ "If", "we", "have", "to", "abort", "previous", "transactional", "id", "in", "case", "of", "restart", "after", "a", "failure", "BEFORE", "first", "checkpoint", "completed", "we", "don", "t", "know", "what", "was", "the", "parallelism", "used", "in", "previous...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/internal/TransactionalIdsGenerator.java#L85-L91
123,421
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/descriptors/ConnectTableDescriptor.java
ConnectTableDescriptor.registerTableSource
@Override public void registerTableSource(String name) { Preconditions.checkNotNull(name); TableSource<?> tableSource = TableFactoryUtil.findAndCreateTableSource(this); tableEnv.registerTableSource(name, tableSource); }
java
@Override public void registerTableSource(String name) { Preconditions.checkNotNull(name); TableSource<?> tableSource = TableFactoryUtil.findAndCreateTableSource(this); tableEnv.registerTableSource(name, tableSource); }
[ "@", "Override", "public", "void", "registerTableSource", "(", "String", "name", ")", "{", "Preconditions", ".", "checkNotNull", "(", "name", ")", ";", "TableSource", "<", "?", ">", "tableSource", "=", "TableFactoryUtil", ".", "findAndCreateTableSource", "(", "t...
Searches for the specified table source, configures it accordingly, and registers it as a table under the given name. @param name table name to be registered in the table environment
[ "Searches", "for", "the", "specified", "table", "source", "configures", "it", "accordingly", "and", "registers", "it", "as", "a", "table", "under", "the", "given", "name", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/descriptors/ConnectTableDescriptor.java#L57-L62
123,422
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/descriptors/ConnectTableDescriptor.java
ConnectTableDescriptor.registerTableSink
@Override public void registerTableSink(String name) { Preconditions.checkNotNull(name); TableSink<?> tableSink = TableFactoryUtil.findAndCreateTableSink(this); tableEnv.registerTableSink(name, tableSink); }
java
@Override public void registerTableSink(String name) { Preconditions.checkNotNull(name); TableSink<?> tableSink = TableFactoryUtil.findAndCreateTableSink(this); tableEnv.registerTableSink(name, tableSink); }
[ "@", "Override", "public", "void", "registerTableSink", "(", "String", "name", ")", "{", "Preconditions", ".", "checkNotNull", "(", "name", ")", ";", "TableSink", "<", "?", ">", "tableSink", "=", "TableFactoryUtil", ".", "findAndCreateTableSink", "(", "this", ...
Searches for the specified table sink, configures it accordingly, and registers it as a table under the given name. @param name table name to be registered in the table environment
[ "Searches", "for", "the", "specified", "table", "sink", "configures", "it", "accordingly", "and", "registers", "it", "as", "a", "table", "under", "the", "given", "name", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/descriptors/ConnectTableDescriptor.java#L70-L75
123,423
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/descriptors/ConnectTableDescriptor.java
ConnectTableDescriptor.withFormat
@Override public D withFormat(FormatDescriptor format) { formatDescriptor = Optional.of(Preconditions.checkNotNull(format)); return (D) this; }
java
@Override public D withFormat(FormatDescriptor format) { formatDescriptor = Optional.of(Preconditions.checkNotNull(format)); return (D) this; }
[ "@", "Override", "public", "D", "withFormat", "(", "FormatDescriptor", "format", ")", "{", "formatDescriptor", "=", "Optional", ".", "of", "(", "Preconditions", ".", "checkNotNull", "(", "format", ")", ")", ";", "return", "(", "D", ")", "this", ";", "}" ]
Specifies the format that defines how to read data from a connector.
[ "Specifies", "the", "format", "that", "defines", "how", "to", "read", "data", "from", "a", "connector", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/descriptors/ConnectTableDescriptor.java#L92-L96
123,424
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/descriptors/ConnectTableDescriptor.java
ConnectTableDescriptor.withSchema
@Override public D withSchema(Schema schema) { schemaDescriptor = Optional.of(Preconditions.checkNotNull(schema)); return (D) this; }
java
@Override public D withSchema(Schema schema) { schemaDescriptor = Optional.of(Preconditions.checkNotNull(schema)); return (D) this; }
[ "@", "Override", "public", "D", "withSchema", "(", "Schema", "schema", ")", "{", "schemaDescriptor", "=", "Optional", ".", "of", "(", "Preconditions", ".", "checkNotNull", "(", "schema", ")", ")", ";", "return", "(", "D", ")", "this", ";", "}" ]
Specifies the resulting table schema.
[ "Specifies", "the", "resulting", "table", "schema", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/descriptors/ConnectTableDescriptor.java#L101-L105
123,425
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java
RoundRobinOperatorStateRepartitioner.initMergeMapList
private List<Map<StreamStateHandle, OperatorStateHandle>> initMergeMapList(List<List<OperatorStateHandle>> parallelSubtaskStates) { int parallelism = parallelSubtaskStates.size(); final List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList = new ArrayList<>(parallelism); for (List<OperatorStateHandle>...
java
private List<Map<StreamStateHandle, OperatorStateHandle>> initMergeMapList(List<List<OperatorStateHandle>> parallelSubtaskStates) { int parallelism = parallelSubtaskStates.size(); final List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList = new ArrayList<>(parallelism); for (List<OperatorStateHandle>...
[ "private", "List", "<", "Map", "<", "StreamStateHandle", ",", "OperatorStateHandle", ">", ">", "initMergeMapList", "(", "List", "<", "List", "<", "OperatorStateHandle", ">", ">", "parallelSubtaskStates", ")", "{", "int", "parallelism", "=", "parallelSubtaskStates", ...
Init the the list of StreamStateHandle -> OperatorStateHandle map with given parallelSubtaskStates when parallelism not changed.
[ "Init", "the", "the", "list", "of", "StreamStateHandle", "-", ">", "OperatorStateHandle", "map", "with", "given", "parallelSubtaskStates", "when", "parallelism", "not", "changed", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java#L99-L111
123,426
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java
RoundRobinOperatorStateRepartitioner.collectUnionStates
private Map<String, List<Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo>>> collectUnionStates( List<List<OperatorStateHandle>> parallelSubtaskStates) { Map<String, List<Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo>>> unionStates = new HashMap<>(parallelSubtaskStates.size()); for (...
java
private Map<String, List<Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo>>> collectUnionStates( List<List<OperatorStateHandle>> parallelSubtaskStates) { Map<String, List<Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo>>> unionStates = new HashMap<>(parallelSubtaskStates.size()); for (...
[ "private", "Map", "<", "String", ",", "List", "<", "Tuple2", "<", "StreamStateHandle", ",", "OperatorStateHandle", ".", "StateMetaInfo", ">", ">", ">", "collectUnionStates", "(", "List", "<", "List", "<", "OperatorStateHandle", ">", ">", "parallelSubtaskStates", ...
Collect union states from given parallelSubtaskStates.
[ "Collect", "union", "states", "from", "given", "parallelSubtaskStates", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java#L116-L143
123,427
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java
RoundRobinOperatorStateRepartitioner.groupByStateMode
@SuppressWarnings("unchecked, rawtype") private GroupByStateNameResults groupByStateMode(List<List<OperatorStateHandle>> previousParallelSubtaskStates) { //Reorganize: group by (State Name -> StreamStateHandle + StateMetaInfo) EnumMap<OperatorStateHandle.Mode, Map<String, List<Tuple2<StreamStateHandle, Operat...
java
@SuppressWarnings("unchecked, rawtype") private GroupByStateNameResults groupByStateMode(List<List<OperatorStateHandle>> previousParallelSubtaskStates) { //Reorganize: group by (State Name -> StreamStateHandle + StateMetaInfo) EnumMap<OperatorStateHandle.Mode, Map<String, List<Tuple2<StreamStateHandle, Operat...
[ "@", "SuppressWarnings", "(", "\"unchecked, rawtype\"", ")", "private", "GroupByStateNameResults", "groupByStateMode", "(", "List", "<", "List", "<", "OperatorStateHandle", ">", ">", "previousParallelSubtaskStates", ")", "{", "//Reorganize: group by (State Name -> StreamStateHa...
Group by the different named states.
[ "Group", "by", "the", "different", "named", "states", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java#L148-L190
123,428
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java
RoundRobinOperatorStateRepartitioner.repartition
private List<Map<StreamStateHandle, OperatorStateHandle>> repartition( GroupByStateNameResults nameToStateByMode, int newParallelism) { // We will use this to merge w.r.t. StreamStateHandles for each parallel subtask inside the maps List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList = new ArrayLi...
java
private List<Map<StreamStateHandle, OperatorStateHandle>> repartition( GroupByStateNameResults nameToStateByMode, int newParallelism) { // We will use this to merge w.r.t. StreamStateHandles for each parallel subtask inside the maps List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList = new ArrayLi...
[ "private", "List", "<", "Map", "<", "StreamStateHandle", ",", "OperatorStateHandle", ">", ">", "repartition", "(", "GroupByStateNameResults", "nameToStateByMode", ",", "int", "newParallelism", ")", "{", "// We will use this to merge w.r.t. StreamStateHandles for each parallel s...
Repartition all named states.
[ "Repartition", "all", "named", "states", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java#L195-L226
123,429
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java
RoundRobinOperatorStateRepartitioner.repartitionSplitState
private void repartitionSplitState( Map<String, List<Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo>>> nameToDistributeState, int newParallelism, List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList) { int startParallelOp = 0; // Iterate all named states and repartition one named st...
java
private void repartitionSplitState( Map<String, List<Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo>>> nameToDistributeState, int newParallelism, List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList) { int startParallelOp = 0; // Iterate all named states and repartition one named st...
[ "private", "void", "repartitionSplitState", "(", "Map", "<", "String", ",", "List", "<", "Tuple2", "<", "StreamStateHandle", ",", "OperatorStateHandle", ".", "StateMetaInfo", ">", ">", ">", "nameToDistributeState", ",", "int", "newParallelism", ",", "List", "<", ...
Repartition SPLIT_DISTRIBUTE state.
[ "Repartition", "SPLIT_DISTRIBUTE", "state", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java#L231-L318
123,430
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java
RoundRobinOperatorStateRepartitioner.repartitionUnionState
private void repartitionUnionState( Map<String, List<Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo>>> unionState, List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList) { for (Map<StreamStateHandle, OperatorStateHandle> mergeMap : mergeMapList) { for (Map.Entry<String, List<Tuple2<Str...
java
private void repartitionUnionState( Map<String, List<Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo>>> unionState, List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList) { for (Map<StreamStateHandle, OperatorStateHandle> mergeMap : mergeMapList) { for (Map.Entry<String, List<Tuple2<Str...
[ "private", "void", "repartitionUnionState", "(", "Map", "<", "String", ",", "List", "<", "Tuple2", "<", "StreamStateHandle", ",", "OperatorStateHandle", ".", "StateMetaInfo", ">", ">", ">", "unionState", ",", "List", "<", "Map", "<", "StreamStateHandle", ",", ...
Repartition UNION state.
[ "Repartition", "UNION", "state", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java#L323-L343
123,431
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java
RoundRobinOperatorStateRepartitioner.repartitionBroadcastState
private void repartitionBroadcastState( Map<String, List<Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo>>> broadcastState, List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList) { int newParallelism = mergeMapList.size(); for (int i = 0; i < newParallelism; ++i) { final Map<StreamSt...
java
private void repartitionBroadcastState( Map<String, List<Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo>>> broadcastState, List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList) { int newParallelism = mergeMapList.size(); for (int i = 0; i < newParallelism; ++i) { final Map<StreamSt...
[ "private", "void", "repartitionBroadcastState", "(", "Map", "<", "String", ",", "List", "<", "Tuple2", "<", "StreamStateHandle", ",", "OperatorStateHandle", ".", "StateMetaInfo", ">", ">", ">", "broadcastState", ",", "List", "<", "Map", "<", "StreamStateHandle", ...
Repartition BROADCAST state.
[ "Repartition", "BROADCAST", "state", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java#L348-L376
123,432
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/distributions/CommonRangeBoundaries.java
CommonRangeBoundaries.binarySearch
private int binarySearch(T record) { int low = 0; int high = this.boundaries.length - 1; typeComparator.extractKeys(record, keys, 0); while (low <= high) { final int mid = (low + high) >>> 1; final int result = compareKeys(flatComparators, keys, this.boundaries[mid]); if (result > 0) { low = mid ...
java
private int binarySearch(T record) { int low = 0; int high = this.boundaries.length - 1; typeComparator.extractKeys(record, keys, 0); while (low <= high) { final int mid = (low + high) >>> 1; final int result = compareKeys(flatComparators, keys, this.boundaries[mid]); if (result > 0) { low = mid ...
[ "private", "int", "binarySearch", "(", "T", "record", ")", "{", "int", "low", "=", "0", ";", "int", "high", "=", "this", ".", "boundaries", ".", "length", "-", "1", ";", "typeComparator", ".", "extractKeys", "(", "record", ",", "keys", ",", "0", ")",...
Search the range index of input record.
[ "Search", "the", "range", "index", "of", "input", "record", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/distributions/CommonRangeBoundaries.java#L43-L63
123,433
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/typeutils/BinaryRowSerializer.java
BinaryRowSerializer.serializeToPagesWithoutLength
public void serializeToPagesWithoutLength( BinaryRow record, AbstractPagedOutputView out) throws IOException { int remainSize = record.getSizeInBytes(); int posInSegOfRecord = record.getOffset(); int segmentSize = record.getSegments()[0].size(); for (MemorySegment segOfRecord : record.getSegments()) { ...
java
public void serializeToPagesWithoutLength( BinaryRow record, AbstractPagedOutputView out) throws IOException { int remainSize = record.getSizeInBytes(); int posInSegOfRecord = record.getOffset(); int segmentSize = record.getSegments()[0].size(); for (MemorySegment segOfRecord : record.getSegments()) { ...
[ "public", "void", "serializeToPagesWithoutLength", "(", "BinaryRow", "record", ",", "AbstractPagedOutputView", "out", ")", "throws", "IOException", "{", "int", "remainSize", "=", "record", ".", "getSizeInBytes", "(", ")", ";", "int", "posInSegOfRecord", "=", "record...
Serialize row to pages without row length. The caller should make sure that the fixed-length parit can fit in output's current segment, no skip check will be done here.
[ "Serialize", "row", "to", "pages", "without", "row", "length", ".", "The", "caller", "should", "make", "sure", "that", "the", "fixed", "-", "length", "parit", "can", "fit", "in", "output", "s", "current", "segment", "no", "skip", "check", "will", "be", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/typeutils/BinaryRowSerializer.java#L152-L171
123,434
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/typeutils/BinaryRowSerializer.java
BinaryRowSerializer.copyFromPagesToView
public void copyFromPagesToView( AbstractPagedInputView source, DataOutputView target) throws IOException { checkSkipReadForFixLengthPart(source); int length = source.readInt(); target.writeInt(length); target.write(source, length); }
java
public void copyFromPagesToView( AbstractPagedInputView source, DataOutputView target) throws IOException { checkSkipReadForFixLengthPart(source); int length = source.readInt(); target.writeInt(length); target.write(source, length); }
[ "public", "void", "copyFromPagesToView", "(", "AbstractPagedInputView", "source", ",", "DataOutputView", "target", ")", "throws", "IOException", "{", "checkSkipReadForFixLengthPart", "(", "source", ")", ";", "int", "length", "=", "source", ".", "readInt", "(", ")", ...
Copy a binaryRow which stored in paged input view to output view. @param source source paged input view where the binary row stored @param target the target output view.
[ "Copy", "a", "binaryRow", "which", "stored", "in", "paged", "input", "view", "to", "output", "view", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/typeutils/BinaryRowSerializer.java#L209-L215
123,435
apache/flink
flink-optimizer/src/main/java/org/apache/flink/optimizer/plan/SingleInputPlanNode.java
SingleInputPlanNode.setDriverKeyInfo
public void setDriverKeyInfo(FieldList keys, int id) { this.setDriverKeyInfo(keys, getTrueArray(keys.size()), id); }
java
public void setDriverKeyInfo(FieldList keys, int id) { this.setDriverKeyInfo(keys, getTrueArray(keys.size()), id); }
[ "public", "void", "setDriverKeyInfo", "(", "FieldList", "keys", ",", "int", "id", ")", "{", "this", ".", "setDriverKeyInfo", "(", "keys", ",", "getTrueArray", "(", "keys", ".", "size", "(", ")", ")", ",", "id", ")", ";", "}" ]
Sets the key field indexes for the specified driver comparator. @param keys The key field indexes for the specified driver comparator. @param id The ID of the driver comparator.
[ "Sets", "the", "key", "field", "indexes", "for", "the", "specified", "driver", "comparator", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/plan/SingleInputPlanNode.java#L132-L134
123,436
apache/flink
flink-optimizer/src/main/java/org/apache/flink/optimizer/plan/SingleInputPlanNode.java
SingleInputPlanNode.setDriverKeyInfo
public void setDriverKeyInfo(FieldList keys, boolean[] sortOrder, int id) { if(id < 0 || id >= driverKeys.length) { throw new CompilerException("Invalid id for driver key information. DriverStrategy requires only " +super.getDriverStrategy().getNumRequiredComparators()+" comparators."); } this.drive...
java
public void setDriverKeyInfo(FieldList keys, boolean[] sortOrder, int id) { if(id < 0 || id >= driverKeys.length) { throw new CompilerException("Invalid id for driver key information. DriverStrategy requires only " +super.getDriverStrategy().getNumRequiredComparators()+" comparators."); } this.drive...
[ "public", "void", "setDriverKeyInfo", "(", "FieldList", "keys", ",", "boolean", "[", "]", "sortOrder", ",", "int", "id", ")", "{", "if", "(", "id", "<", "0", "||", "id", ">=", "driverKeys", ".", "length", ")", "{", "throw", "new", "CompilerException", ...
Sets the key field information for the specified driver comparator. @param keys The key field indexes for the specified driver comparator. @param sortOrder The key sort order for the specified driver comparator. @param id The ID of the driver comparator.
[ "Sets", "the", "key", "field", "information", "for", "the", "specified", "driver", "comparator", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/plan/SingleInputPlanNode.java#L143-L150
123,437
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/nonha/embedded/EmbeddedLeaderService.java
EmbeddedLeaderService.addContender
private void addContender(EmbeddedLeaderElectionService service, LeaderContender contender) { synchronized (lock) { checkState(!shutdown, "leader election service is shut down"); checkState(!service.running, "leader election service is already started"); try { if (!allLeaderContenders.add(service)) { ...
java
private void addContender(EmbeddedLeaderElectionService service, LeaderContender contender) { synchronized (lock) { checkState(!shutdown, "leader election service is shut down"); checkState(!service.running, "leader election service is already started"); try { if (!allLeaderContenders.add(service)) { ...
[ "private", "void", "addContender", "(", "EmbeddedLeaderElectionService", "service", ",", "LeaderContender", "contender", ")", "{", "synchronized", "(", "lock", ")", "{", "checkState", "(", "!", "shutdown", ",", "\"leader election service is shut down\"", ")", ";", "ch...
Callback from leader contenders when they start their service.
[ "Callback", "from", "leader", "contenders", "when", "they", "start", "their", "service", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/nonha/embedded/EmbeddedLeaderService.java#L168-L191
123,438
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/nonha/embedded/EmbeddedLeaderService.java
EmbeddedLeaderService.removeContender
private void removeContender(EmbeddedLeaderElectionService service) { synchronized (lock) { // if the service was not even started, simply do nothing if (!service.running || shutdown) { return; } try { if (!allLeaderContenders.remove(service)) { throw new IllegalStateException("leader electi...
java
private void removeContender(EmbeddedLeaderElectionService service) { synchronized (lock) { // if the service was not even started, simply do nothing if (!service.running || shutdown) { return; } try { if (!allLeaderContenders.remove(service)) { throw new IllegalStateException("leader electi...
[ "private", "void", "removeContender", "(", "EmbeddedLeaderElectionService", "service", ")", "{", "synchronized", "(", "lock", ")", "{", "// if the service was not even started, simply do nothing", "if", "(", "!", "service", ".", "running", "||", "shutdown", ")", "{", ...
Callback from leader contenders when they stop their service.
[ "Callback", "from", "leader", "contenders", "when", "they", "stop", "their", "service", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/nonha/embedded/EmbeddedLeaderService.java#L196-L234
123,439
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/nonha/embedded/EmbeddedLeaderService.java
EmbeddedLeaderService.confirmLeader
private void confirmLeader(final EmbeddedLeaderElectionService service, final UUID leaderSessionId) { synchronized (lock) { // if the service was shut down in the meantime, ignore this confirmation if (!service.running || shutdown) { return; } try { // check if the confirmation is for the same gr...
java
private void confirmLeader(final EmbeddedLeaderElectionService service, final UUID leaderSessionId) { synchronized (lock) { // if the service was shut down in the meantime, ignore this confirmation if (!service.running || shutdown) { return; } try { // check if the confirmation is for the same gr...
[ "private", "void", "confirmLeader", "(", "final", "EmbeddedLeaderElectionService", "service", ",", "final", "UUID", "leaderSessionId", ")", "{", "synchronized", "(", "lock", ")", "{", "// if the service was shut down in the meantime, ignore this confirmation", "if", "(", "!...
Callback from leader contenders when they confirm a leader grant.
[ "Callback", "from", "leader", "contenders", "when", "they", "confirm", "a", "leader", "grant", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/nonha/embedded/EmbeddedLeaderService.java#L239-L268
123,440
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/metrics/AbstractAggregatingMetricsHandler.java
AbstractAggregatingMetricsHandler.getAvailableMetrics
private static Collection<String> getAvailableMetrics(Collection<? extends MetricStore.ComponentMetricStore> stores) { Set<String> uniqueMetrics = new HashSet<>(32); for (MetricStore.ComponentMetricStore store : stores) { uniqueMetrics.addAll(store.metrics.keySet()); } return uniqueMetrics; }
java
private static Collection<String> getAvailableMetrics(Collection<? extends MetricStore.ComponentMetricStore> stores) { Set<String> uniqueMetrics = new HashSet<>(32); for (MetricStore.ComponentMetricStore store : stores) { uniqueMetrics.addAll(store.metrics.keySet()); } return uniqueMetrics; }
[ "private", "static", "Collection", "<", "String", ">", "getAvailableMetrics", "(", "Collection", "<", "?", "extends", "MetricStore", ".", "ComponentMetricStore", ">", "stores", ")", "{", "Set", "<", "String", ">", "uniqueMetrics", "=", "new", "HashSet", "<>", ...
Returns a JSON string containing a list of all available metrics in the given stores. Effectively this method maps the union of all key-sets to JSON. @param stores metrics @return JSON string containing a list of all available metrics
[ "Returns", "a", "JSON", "string", "containing", "a", "list", "of", "all", "available", "metrics", "in", "the", "given", "stores", ".", "Effectively", "this", "method", "maps", "the", "union", "of", "all", "key", "-", "sets", "to", "JSON", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/metrics/AbstractAggregatingMetricsHandler.java#L163-L169
123,441
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/metrics/AbstractAggregatingMetricsHandler.java
AbstractAggregatingMetricsHandler.getAggregatedMetricValues
private AggregatedMetricsResponseBody getAggregatedMetricValues( Collection<? extends MetricStore.ComponentMetricStore> stores, List<String> requestedMetrics, MetricAccumulatorFactory requestedAggregationsFactories) { Collection<AggregatedMetric> aggregatedMetrics = new ArrayList<>(requestedMetrics.size());...
java
private AggregatedMetricsResponseBody getAggregatedMetricValues( Collection<? extends MetricStore.ComponentMetricStore> stores, List<String> requestedMetrics, MetricAccumulatorFactory requestedAggregationsFactories) { Collection<AggregatedMetric> aggregatedMetrics = new ArrayList<>(requestedMetrics.size());...
[ "private", "AggregatedMetricsResponseBody", "getAggregatedMetricValues", "(", "Collection", "<", "?", "extends", "MetricStore", ".", "ComponentMetricStore", ">", "stores", ",", "List", "<", "String", ">", "requestedMetrics", ",", "MetricAccumulatorFactory", "requestedAggreg...
Extracts and aggregates all requested metrics from the given metric stores, and maps the result to a JSON string. @param stores available metrics @param requestedMetrics ids of requested metrics @param requestedAggregationsFactories requested aggregations @return JSON string containing the requested metrics
[ "Extracts", "and", "aggregates", "all", "requested", "metrics", "from", "the", "given", "metric", "stores", "and", "maps", "the", "result", "to", "a", "JSON", "string", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/metrics/AbstractAggregatingMetricsHandler.java#L179-L211
123,442
apache/flink
flink-connectors/flink-connector-kafka-0.9/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumer09.java
FlinkKafkaConsumer09.setDeserializer
private static void setDeserializer(Properties props) { final String deSerName = ByteArrayDeserializer.class.getName(); Object keyDeSer = props.get(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG); Object valDeSer = props.get(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG); if (keyDeSer != null && !keyDeSer.equa...
java
private static void setDeserializer(Properties props) { final String deSerName = ByteArrayDeserializer.class.getName(); Object keyDeSer = props.get(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG); Object valDeSer = props.get(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG); if (keyDeSer != null && !keyDeSer.equa...
[ "private", "static", "void", "setDeserializer", "(", "Properties", "props", ")", "{", "final", "String", "deSerName", "=", "ByteArrayDeserializer", ".", "class", ".", "getName", "(", ")", ";", "Object", "keyDeSer", "=", "props", ".", "get", "(", "ConsumerConfi...
Makes sure that the ByteArrayDeserializer is registered in the Kafka properties. @param props The Kafka properties to register the serializer in.
[ "Makes", "sure", "that", "the", "ByteArrayDeserializer", "is", "registered", "in", "the", "Kafka", "properties", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-0.9/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumer09.java#L307-L322
123,443
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/MergingWindowSet.java
MergingWindowSet.persist
public void persist() throws Exception { if (!mapping.equals(initialMapping)) { state.clear(); for (Map.Entry<W, W> window : mapping.entrySet()) { state.add(new Tuple2<>(window.getKey(), window.getValue())); } } }
java
public void persist() throws Exception { if (!mapping.equals(initialMapping)) { state.clear(); for (Map.Entry<W, W> window : mapping.entrySet()) { state.add(new Tuple2<>(window.getKey(), window.getValue())); } } }
[ "public", "void", "persist", "(", ")", "throws", "Exception", "{", "if", "(", "!", "mapping", ".", "equals", "(", "initialMapping", ")", ")", "{", "state", ".", "clear", "(", ")", ";", "for", "(", "Map", ".", "Entry", "<", "W", ",", "W", ">", "wi...
Persist the updated mapping to the given state if the mapping changed since initialization.
[ "Persist", "the", "updated", "mapping", "to", "the", "given", "state", "if", "the", "mapping", "changed", "since", "initialization", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/MergingWindowSet.java#L102-L109
123,444
apache/flink
flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/HadoopConfigLoader.java
HadoopConfigLoader.loadHadoopConfigFromFlink
private org.apache.hadoop.conf.Configuration loadHadoopConfigFromFlink() { org.apache.hadoop.conf.Configuration hadoopConfig = new org.apache.hadoop.conf.Configuration(); for (String key : flinkConfig.keySet()) { for (String prefix : flinkConfigPrefixes) { if (key.startsWith(prefix)) { String newKey = h...
java
private org.apache.hadoop.conf.Configuration loadHadoopConfigFromFlink() { org.apache.hadoop.conf.Configuration hadoopConfig = new org.apache.hadoop.conf.Configuration(); for (String key : flinkConfig.keySet()) { for (String prefix : flinkConfigPrefixes) { if (key.startsWith(prefix)) { String newKey = h...
[ "private", "org", ".", "apache", ".", "hadoop", ".", "conf", ".", "Configuration", "loadHadoopConfigFromFlink", "(", ")", "{", "org", ".", "apache", ".", "hadoop", ".", "conf", ".", "Configuration", "hadoopConfig", "=", "new", "org", ".", "apache", ".", "h...
add additional config entries from the Flink config to the Hadoop config
[ "add", "additional", "config", "entries", "from", "the", "Flink", "config", "to", "the", "Hadoop", "config" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/HadoopConfigLoader.java#L95-L109
123,445
apache/flink
flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/HadoopConfigLoader.java
HadoopConfigLoader.mirrorCertainHadoopConfig
private org.apache.hadoop.conf.Configuration mirrorCertainHadoopConfig( org.apache.hadoop.conf.Configuration hadoopConfig) { for (String[] mirrored : mirroredConfigKeys) { String value = hadoopConfig.get(mirrored[0], null); if (value != null) { hadoopConfig.set(mirrored[1], value); } } return hadoo...
java
private org.apache.hadoop.conf.Configuration mirrorCertainHadoopConfig( org.apache.hadoop.conf.Configuration hadoopConfig) { for (String[] mirrored : mirroredConfigKeys) { String value = hadoopConfig.get(mirrored[0], null); if (value != null) { hadoopConfig.set(mirrored[1], value); } } return hadoo...
[ "private", "org", ".", "apache", ".", "hadoop", ".", "conf", ".", "Configuration", "mirrorCertainHadoopConfig", "(", "org", ".", "apache", ".", "hadoop", ".", "conf", ".", "Configuration", "hadoopConfig", ")", "{", "for", "(", "String", "[", "]", "mirrored",...
with different keys
[ "with", "different", "keys" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/HadoopConfigLoader.java#L113-L122
123,446
apache/flink
flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/HadoopRecoverableFsDataOutputStream.java
HadoopRecoverableFsDataOutputStream.waitUntilLeaseIsRevoked
private static boolean waitUntilLeaseIsRevoked(final FileSystem fs, final Path path) throws IOException { Preconditions.checkState(fs instanceof DistributedFileSystem); final DistributedFileSystem dfs = (DistributedFileSystem) fs; dfs.recoverLease(path); final Deadline deadline = Deadline.now().plus(Duration....
java
private static boolean waitUntilLeaseIsRevoked(final FileSystem fs, final Path path) throws IOException { Preconditions.checkState(fs instanceof DistributedFileSystem); final DistributedFileSystem dfs = (DistributedFileSystem) fs; dfs.recoverLease(path); final Deadline deadline = Deadline.now().plus(Duration....
[ "private", "static", "boolean", "waitUntilLeaseIsRevoked", "(", "final", "FileSystem", "fs", ",", "final", "Path", "path", ")", "throws", "IOException", "{", "Preconditions", ".", "checkState", "(", "fs", "instanceof", "DistributedFileSystem", ")", ";", "final", "...
Called when resuming execution after a failure and waits until the lease of the file we are resuming is free. <p>The lease of the file we are resuming writing/committing to may still belong to the process that failed previously and whose state we are recovering. @param path The path to the file we want to resume writ...
[ "Called", "when", "resuming", "execution", "after", "a", "failure", "and", "waits", "until", "the", "lease", "of", "the", "file", "we", "are", "resuming", "is", "free", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/HadoopRecoverableFsDataOutputStream.java#L321-L342
123,447
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java
TaskExecutor.onStop
@Override public CompletableFuture<Void> onStop() { log.info("Stopping TaskExecutor {}.", getAddress()); Throwable throwable = null; if (resourceManagerConnection != null) { resourceManagerConnection.close(); } for (JobManagerConnection jobManagerConnection : jobManagerConnections.values()) { try { ...
java
@Override public CompletableFuture<Void> onStop() { log.info("Stopping TaskExecutor {}.", getAddress()); Throwable throwable = null; if (resourceManagerConnection != null) { resourceManagerConnection.close(); } for (JobManagerConnection jobManagerConnection : jobManagerConnections.values()) { try { ...
[ "@", "Override", "public", "CompletableFuture", "<", "Void", ">", "onStop", "(", ")", "{", "log", ".", "info", "(", "\"Stopping TaskExecutor {}.\"", ",", "getAddress", "(", ")", ")", ";", "Throwable", "throwable", "=", "null", ";", "if", "(", "resourceManage...
Called to shut down the TaskManager. The method closes all TaskManager services.
[ "Called", "to", "shut", "down", "the", "TaskManager", ".", "The", "method", "closes", "all", "TaskManager", "services", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java#L328-L362
123,448
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/BackPressureStatsTrackerImpl.java
BackPressureStatsTrackerImpl.getOperatorBackPressureStats
public Optional<OperatorBackPressureStats> getOperatorBackPressureStats(ExecutionJobVertex vertex) { synchronized (lock) { final OperatorBackPressureStats stats = operatorStatsCache.getIfPresent(vertex); if (stats == null || backPressureStatsRefreshInterval <= System.currentTimeMillis() - stats.getEndTimestamp(...
java
public Optional<OperatorBackPressureStats> getOperatorBackPressureStats(ExecutionJobVertex vertex) { synchronized (lock) { final OperatorBackPressureStats stats = operatorStatsCache.getIfPresent(vertex); if (stats == null || backPressureStatsRefreshInterval <= System.currentTimeMillis() - stats.getEndTimestamp(...
[ "public", "Optional", "<", "OperatorBackPressureStats", ">", "getOperatorBackPressureStats", "(", "ExecutionJobVertex", "vertex", ")", "{", "synchronized", "(", "lock", ")", "{", "final", "OperatorBackPressureStats", "stats", "=", "operatorStatsCache", ".", "getIfPresent"...
Returns back pressure statistics for a operator. Automatically triggers stack trace sampling if statistics are not available or outdated. @param vertex Operator to get the stats for. @return Back pressure statistics for an operator
[ "Returns", "back", "pressure", "statistics", "for", "a", "operator", ".", "Automatically", "triggers", "stack", "trace", "sampling", "if", "statistics", "are", "not", "available", "or", "outdated", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/BackPressureStatsTrackerImpl.java#L156-L164
123,449
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/BackPressureStatsTrackerImpl.java
BackPressureStatsTrackerImpl.triggerStackTraceSampleInternal
private boolean triggerStackTraceSampleInternal(final ExecutionJobVertex vertex) { assert(Thread.holdsLock(lock)); if (shutDown) { return false; } if (!pendingStats.contains(vertex) && !vertex.getGraph().getState().isGloballyTerminalState()) { Executor executor = vertex.getGraph().getFutureExecutor(...
java
private boolean triggerStackTraceSampleInternal(final ExecutionJobVertex vertex) { assert(Thread.holdsLock(lock)); if (shutDown) { return false; } if (!pendingStats.contains(vertex) && !vertex.getGraph().getState().isGloballyTerminalState()) { Executor executor = vertex.getGraph().getFutureExecutor(...
[ "private", "boolean", "triggerStackTraceSampleInternal", "(", "final", "ExecutionJobVertex", "vertex", ")", "{", "assert", "(", "Thread", ".", "holdsLock", "(", "lock", ")", ")", ";", "if", "(", "shutDown", ")", "{", "return", "false", ";", "}", "if", "(", ...
Triggers a stack trace sample for a operator to gather the back pressure statistics. If there is a sample in progress for the operator, the call is ignored. @param vertex Operator to get the stats for. @return Flag indicating whether a sample with triggered.
[ "Triggers", "a", "stack", "trace", "sample", "for", "a", "operator", "to", "gather", "the", "back", "pressure", "statistics", ".", "If", "there", "is", "a", "sample", "in", "progress", "for", "the", "operator", "the", "call", "is", "ignored", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/BackPressureStatsTrackerImpl.java#L174-L207
123,450
apache/flink
flink-filesystems/flink-mapr-fs/src/main/java/org/apache/flink/runtime/fs/maprfs/MapRFileSystem.java
MapRFileSystem.getCLDBLocations
private static String[] getCLDBLocations(String authority) throws IOException { // Determine the MapR home String maprHome = System.getenv(MAPR_HOME_ENV); if (maprHome == null) { maprHome = DEFAULT_MAPR_HOME; } final File maprClusterConf = new File(maprHome, MAPR_CLUSTER_CONF_FILE); if (LOG.isDebugEna...
java
private static String[] getCLDBLocations(String authority) throws IOException { // Determine the MapR home String maprHome = System.getenv(MAPR_HOME_ENV); if (maprHome == null) { maprHome = DEFAULT_MAPR_HOME; } final File maprClusterConf = new File(maprHome, MAPR_CLUSTER_CONF_FILE); if (LOG.isDebugEna...
[ "private", "static", "String", "[", "]", "getCLDBLocations", "(", "String", "authority", ")", "throws", "IOException", "{", "// Determine the MapR home", "String", "maprHome", "=", "System", ".", "getenv", "(", "MAPR_HOME_ENV", ")", ";", "if", "(", "maprHome", "...
Retrieves the CLDB locations for the given MapR cluster name. @param authority the name of the MapR cluster @return a list of CLDB locations @throws IOException thrown if the CLDB locations for the given MapR cluster name cannot be determined
[ "Retrieves", "the", "CLDB", "locations", "for", "the", "given", "MapR", "cluster", "name", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-mapr-fs/src/main/java/org/apache/flink/runtime/fs/maprfs/MapRFileSystem.java#L105-L175
123,451
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/typeinfo/PrimitiveArrayTypeInfo.java
PrimitiveArrayTypeInfo.getInfoFor
@SuppressWarnings("unchecked") @PublicEvolving public static <X> PrimitiveArrayTypeInfo<X> getInfoFor(Class<X> type) { if (!type.isArray()) { throw new InvalidTypesException("The given class is no array."); } // basic type arrays return (PrimitiveArrayTypeInfo<X>) TYPES.get(type); }
java
@SuppressWarnings("unchecked") @PublicEvolving public static <X> PrimitiveArrayTypeInfo<X> getInfoFor(Class<X> type) { if (!type.isArray()) { throw new InvalidTypesException("The given class is no array."); } // basic type arrays return (PrimitiveArrayTypeInfo<X>) TYPES.get(type); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "PublicEvolving", "public", "static", "<", "X", ">", "PrimitiveArrayTypeInfo", "<", "X", ">", "getInfoFor", "(", "Class", "<", "X", ">", "type", ")", "{", "if", "(", "!", "type", ".", "isArray", "(...
Tries to get the PrimitiveArrayTypeInfo for an array. Returns null, if the type is an array, but the component type is not a primitive type. @param type The class of the array. @return The corresponding PrimitiveArrayTypeInfo, or null, if the array is not an array of primitives. @throws InvalidTypesException Thrown, i...
[ "Tries", "to", "get", "the", "PrimitiveArrayTypeInfo", "for", "an", "array", ".", "Returns", "null", "if", "the", "type", "is", "an", "array", "but", "the", "component", "type", "is", "not", "a", "primitive", "type", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/typeinfo/PrimitiveArrayTypeInfo.java#L201-L210
123,452
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java
FlinkKafkaConsumerBase.adjustAutoCommitConfig
static void adjustAutoCommitConfig(Properties properties, OffsetCommitMode offsetCommitMode) { if (offsetCommitMode == OffsetCommitMode.ON_CHECKPOINTS || offsetCommitMode == OffsetCommitMode.DISABLED) { properties.setProperty(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, "false"); } }
java
static void adjustAutoCommitConfig(Properties properties, OffsetCommitMode offsetCommitMode) { if (offsetCommitMode == OffsetCommitMode.ON_CHECKPOINTS || offsetCommitMode == OffsetCommitMode.DISABLED) { properties.setProperty(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, "false"); } }
[ "static", "void", "adjustAutoCommitConfig", "(", "Properties", "properties", ",", "OffsetCommitMode", "offsetCommitMode", ")", "{", "if", "(", "offsetCommitMode", "==", "OffsetCommitMode", ".", "ON_CHECKPOINTS", "||", "offsetCommitMode", "==", "OffsetCommitMode", ".", "...
Make sure that auto commit is disabled when our offset commit mode is ON_CHECKPOINTS. This overwrites whatever setting the user configured in the properties. @param properties - Kafka configuration properties to be adjusted @param offsetCommitMode offset commit mode
[ "Make", "sure", "that", "auto", "commit", "is", "disabled", "when", "our", "offset", "commit", "mode", "is", "ON_CHECKPOINTS", ".", "This", "overwrites", "whatever", "setting", "the", "user", "configured", "in", "the", "properties", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java#L263-L267
123,453
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java
FlinkKafkaConsumerBase.setStartFromTimestamp
protected FlinkKafkaConsumerBase<T> setStartFromTimestamp(long startupOffsetsTimestamp) { checkArgument(startupOffsetsTimestamp >= 0, "The provided value for the startup offsets timestamp is invalid."); long currentTimestamp = System.currentTimeMillis(); checkArgument(startupOffsetsTimestamp <= currentTimestamp,...
java
protected FlinkKafkaConsumerBase<T> setStartFromTimestamp(long startupOffsetsTimestamp) { checkArgument(startupOffsetsTimestamp >= 0, "The provided value for the startup offsets timestamp is invalid."); long currentTimestamp = System.currentTimeMillis(); checkArgument(startupOffsetsTimestamp <= currentTimestamp,...
[ "protected", "FlinkKafkaConsumerBase", "<", "T", ">", "setStartFromTimestamp", "(", "long", "startupOffsetsTimestamp", ")", "{", "checkArgument", "(", "startupOffsetsTimestamp", ">=", "0", ",", "\"The provided value for the startup offsets timestamp is invalid.\"", ")", ";", ...
Version-specific subclasses which can expose the functionality should override and allow public access.
[ "Version", "-", "specific", "subclasses", "which", "can", "expose", "the", "functionality", "should", "override", "and", "allow", "public", "access", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java#L411-L422
123,454
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/state/IncrementalRemoteKeyedStateHandle.java
IncrementalRemoteKeyedStateHandle.createSharedStateRegistryKeyFromFileName
@VisibleForTesting public SharedStateRegistryKey createSharedStateRegistryKeyFromFileName(StateHandleID shId) { return new SharedStateRegistryKey(String.valueOf(backendIdentifier) + '-' + keyGroupRange, shId); }
java
@VisibleForTesting public SharedStateRegistryKey createSharedStateRegistryKeyFromFileName(StateHandleID shId) { return new SharedStateRegistryKey(String.valueOf(backendIdentifier) + '-' + keyGroupRange, shId); }
[ "@", "VisibleForTesting", "public", "SharedStateRegistryKey", "createSharedStateRegistryKeyFromFileName", "(", "StateHandleID", "shId", ")", "{", "return", "new", "SharedStateRegistryKey", "(", "String", ".", "valueOf", "(", "backendIdentifier", ")", "+", "'", "'", "+",...
Create a unique key to register one of our shared state handles.
[ "Create", "a", "unique", "key", "to", "register", "one", "of", "our", "shared", "state", "handles", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/IncrementalRemoteKeyedStateHandle.java#L267-L270
123,455
apache/flink
flink-core/src/main/java/org/apache/flink/types/Either.java
Either.Left
public static <L, R> Either<L, R> Left(L value) { return new Left<L, R>(value); }
java
public static <L, R> Either<L, R> Left(L value) { return new Left<L, R>(value); }
[ "public", "static", "<", "L", ",", "R", ">", "Either", "<", "L", ",", "R", ">", "Left", "(", "L", "value", ")", "{", "return", "new", "Left", "<", "L", ",", "R", ">", "(", "value", ")", ";", "}" ]
Create a Left value of Either
[ "Create", "a", "Left", "value", "of", "Either" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/Either.java#L44-L46
123,456
apache/flink
flink-core/src/main/java/org/apache/flink/types/Either.java
Either.Right
public static <L, R> Either<L, R> Right(R value) { return new Right<L, R>(value); }
java
public static <L, R> Either<L, R> Right(R value) { return new Right<L, R>(value); }
[ "public", "static", "<", "L", ",", "R", ">", "Either", "<", "L", ",", "R", ">", "Right", "(", "R", "value", ")", "{", "return", "new", "Right", "<", "L", ",", "R", ">", "(", "value", ")", ";", "}" ]
Create a Right value of Either
[ "Create", "a", "Right", "value", "of", "Either" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/Either.java#L51-L53
123,457
apache/flink
flink-core/src/main/java/org/apache/flink/util/WrappingRuntimeException.java
WrappingRuntimeException.unwrap
public Throwable unwrap() { Throwable cause = getCause(); return (cause instanceof WrappingRuntimeException) ? ((WrappingRuntimeException) cause).unwrap() : cause; }
java
public Throwable unwrap() { Throwable cause = getCause(); return (cause instanceof WrappingRuntimeException) ? ((WrappingRuntimeException) cause).unwrap() : cause; }
[ "public", "Throwable", "unwrap", "(", ")", "{", "Throwable", "cause", "=", "getCause", "(", ")", ";", "return", "(", "cause", "instanceof", "WrappingRuntimeException", ")", "?", "(", "(", "WrappingRuntimeException", ")", "cause", ")", ".", "unwrap", "(", ")"...
Recursively unwraps this WrappingRuntimeException and its causes, getting the first non wrapping exception. @return The first cause that is not a wrapping exception.
[ "Recursively", "unwraps", "this", "WrappingRuntimeException", "and", "its", "causes", "getting", "the", "first", "non", "wrapping", "exception", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/WrappingRuntimeException.java#L50-L53
123,458
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/kryo/KryoSerializer.java
KryoSerializer.getKryoInstance
private Kryo getKryoInstance() { try { // check if ScalaKryoInstantiator is in class path (coming from Twitter's Chill library). // This will be true if Flink's Scala API is used. Class<?> chillInstantiatorClazz = Class.forName("org.apache.flink.runtime.types.FlinkScalaKryoInstantiator"); Object chi...
java
private Kryo getKryoInstance() { try { // check if ScalaKryoInstantiator is in class path (coming from Twitter's Chill library). // This will be true if Flink's Scala API is used. Class<?> chillInstantiatorClazz = Class.forName("org.apache.flink.runtime.types.FlinkScalaKryoInstantiator"); Object chi...
[ "private", "Kryo", "getKryoInstance", "(", ")", "{", "try", "{", "// check if ScalaKryoInstantiator is in class path (coming from Twitter's Chill library).", "// This will be true if Flink's Scala API is used.", "Class", "<", "?", ">", "chillInstantiatorClazz", "=", "Class", ".", ...
Returns the Chill Kryo Serializer which is implicitly added to the classpath via flink-runtime. Falls back to the default Kryo serializer if it can't be found. @return The Kryo serializer instance.
[ "Returns", "the", "Chill", "Kryo", "Serializer", "which", "is", "implicitly", "added", "to", "the", "classpath", "via", "flink", "-", "runtime", ".", "Falls", "back", "to", "the", "default", "Kryo", "serializer", "if", "it", "can", "t", "be", "found", "." ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/kryo/KryoSerializer.java#L424-L450
123,459
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/kryo/KryoSerializer.java
KryoSerializer.buildKryoRegistrations
private static LinkedHashMap<String, KryoRegistration> buildKryoRegistrations( Class<?> serializedType, LinkedHashSet<Class<?>> registeredTypes, LinkedHashMap<Class<?>, Class<? extends Serializer<?>>> registeredTypesWithSerializerClasses, LinkedHashMap<Class<?>, ExecutionConfig.SerializableSerializer<?>> re...
java
private static LinkedHashMap<String, KryoRegistration> buildKryoRegistrations( Class<?> serializedType, LinkedHashSet<Class<?>> registeredTypes, LinkedHashMap<Class<?>, Class<? extends Serializer<?>>> registeredTypesWithSerializerClasses, LinkedHashMap<Class<?>, ExecutionConfig.SerializableSerializer<?>> re...
[ "private", "static", "LinkedHashMap", "<", "String", ",", "KryoRegistration", ">", "buildKryoRegistrations", "(", "Class", "<", "?", ">", "serializedType", ",", "LinkedHashSet", "<", "Class", "<", "?", ">", ">", "registeredTypes", ",", "LinkedHashMap", "<", "Cla...
Utility method that takes lists of registered types and their serializers, and resolve them into a single list such that the result will resemble the final registration result in Kryo.
[ "Utility", "method", "that", "takes", "lists", "of", "registered", "types", "and", "their", "serializers", "and", "resolve", "them", "into", "a", "single", "list", "such", "that", "the", "result", "will", "resemble", "the", "final", "registration", "result", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/kryo/KryoSerializer.java#L537-L575
123,460
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/GraphCsvReader.java
GraphCsvReader.types
@SuppressWarnings("unchecked") public <K, VV, EV> Graph<K, VV, EV> types(Class<K> vertexKey, Class<VV> vertexValue, Class<EV> edgeValue) { if (edgeReader == null) { throw new RuntimeException("The edge input file cannot be null!"); } DataSet<Tuple3<K, K, EV>> edges = edgeReader.types(vertexKey, vertexKey...
java
@SuppressWarnings("unchecked") public <K, VV, EV> Graph<K, VV, EV> types(Class<K> vertexKey, Class<VV> vertexValue, Class<EV> edgeValue) { if (edgeReader == null) { throw new RuntimeException("The edge input file cannot be null!"); } DataSet<Tuple3<K, K, EV>> edges = edgeReader.types(vertexKey, vertexKey...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "K", ",", "VV", ",", "EV", ">", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "types", "(", "Class", "<", "K", ">", "vertexKey", ",", "Class", "<", "VV", ">", "vertexValue", ",", ...
Creates a Graph from CSV input with vertex values and edge values. The vertex values are specified through a vertices input file or a user-defined map function. @param vertexKey the type of the vertex IDs @param vertexValue the type of the vertex values @param edgeValue the type of the edge values @return a Graph with...
[ "Creates", "a", "Graph", "from", "CSV", "input", "with", "vertex", "values", "and", "edge", "values", ".", "The", "vertex", "values", "are", "specified", "through", "a", "vertices", "input", "file", "or", "a", "user", "-", "defined", "map", "function", "."...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/GraphCsvReader.java#L101-L126
123,461
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/GraphCsvReader.java
GraphCsvReader.edgeTypes
public <K, EV> Graph<K, NullValue, EV> edgeTypes(Class<K> vertexKey, Class<EV> edgeValue) { if (edgeReader == null) { throw new RuntimeException("The edge input file cannot be null!"); } DataSet<Tuple3<K, K, EV>> edges = edgeReader .types(vertexKey, vertexKey, edgeValue) .name(GraphCsvReader.class.get...
java
public <K, EV> Graph<K, NullValue, EV> edgeTypes(Class<K> vertexKey, Class<EV> edgeValue) { if (edgeReader == null) { throw new RuntimeException("The edge input file cannot be null!"); } DataSet<Tuple3<K, K, EV>> edges = edgeReader .types(vertexKey, vertexKey, edgeValue) .name(GraphCsvReader.class.get...
[ "public", "<", "K", ",", "EV", ">", "Graph", "<", "K", ",", "NullValue", ",", "EV", ">", "edgeTypes", "(", "Class", "<", "K", ">", "vertexKey", ",", "Class", "<", "EV", ">", "edgeValue", ")", "{", "if", "(", "edgeReader", "==", "null", ")", "{", ...
Creates a Graph from CSV input with edge values, but without vertex values. @param vertexKey the type of the vertex IDs @param edgeValue the type of the edge values @return a Graph where the edges are read from an edges CSV file (with values).
[ "Creates", "a", "Graph", "from", "CSV", "input", "with", "edge", "values", "but", "without", "vertex", "values", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/GraphCsvReader.java#L134-L145
123,462
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/GraphCsvReader.java
GraphCsvReader.keyType
public <K> Graph<K, NullValue, NullValue> keyType(Class<K> vertexKey) { if (edgeReader == null) { throw new RuntimeException("The edge input file cannot be null!"); } DataSet<Edge<K, NullValue>> edges = edgeReader .types(vertexKey, vertexKey) .name(GraphCsvReader.class.getName()) .map(new Tuple2ToE...
java
public <K> Graph<K, NullValue, NullValue> keyType(Class<K> vertexKey) { if (edgeReader == null) { throw new RuntimeException("The edge input file cannot be null!"); } DataSet<Edge<K, NullValue>> edges = edgeReader .types(vertexKey, vertexKey) .name(GraphCsvReader.class.getName()) .map(new Tuple2ToE...
[ "public", "<", "K", ">", "Graph", "<", "K", ",", "NullValue", ",", "NullValue", ">", "keyType", "(", "Class", "<", "K", ">", "vertexKey", ")", "{", "if", "(", "edgeReader", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"The edge in...
Creates a Graph from CSV input without vertex values or edge values. @param vertexKey the type of the vertex IDs @return a Graph where the vertex IDs are read from the edges input file.
[ "Creates", "a", "Graph", "from", "CSV", "input", "without", "vertex", "values", "or", "edge", "values", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/GraphCsvReader.java#L152-L165
123,463
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/GraphCsvReader.java
GraphCsvReader.vertexTypes
@SuppressWarnings({ "serial", "unchecked" }) public <K, VV> Graph<K, VV, NullValue> vertexTypes(Class<K> vertexKey, Class<VV> vertexValue) { if (edgeReader == null) { throw new RuntimeException("The edge input file cannot be null!"); } DataSet<Edge<K, NullValue>> edges = edgeReader .types(vertexKey, vert...
java
@SuppressWarnings({ "serial", "unchecked" }) public <K, VV> Graph<K, VV, NullValue> vertexTypes(Class<K> vertexKey, Class<VV> vertexValue) { if (edgeReader == null) { throw new RuntimeException("The edge input file cannot be null!"); } DataSet<Edge<K, NullValue>> edges = edgeReader .types(vertexKey, vert...
[ "@", "SuppressWarnings", "(", "{", "\"serial\"", ",", "\"unchecked\"", "}", ")", "public", "<", "K", ",", "VV", ">", "Graph", "<", "K", ",", "VV", ",", "NullValue", ">", "vertexTypes", "(", "Class", "<", "K", ">", "vertexKey", ",", "Class", "<", "VV"...
Creates a Graph from CSV input without edge values. The vertex values are specified through a vertices input file or a user-defined map function. If no vertices input file is provided, the vertex IDs are automatically created from the edges input file. @param vertexKey the type of the vertex IDs @param vertexValue the ...
[ "Creates", "a", "Graph", "from", "CSV", "input", "without", "edge", "values", ".", "The", "vertex", "values", "are", "specified", "through", "a", "vertices", "input", "file", "or", "a", "user", "-", "defined", "map", "function", ".", "If", "no", "vertices"...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/GraphCsvReader.java#L176-L206
123,464
apache/flink
flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/api/java/hadoop/mapred/utils/HadoopUtils.java
HadoopUtils.mergeHadoopConf
public static void mergeHadoopConf(JobConf jobConf) { // we have to load the global configuration here, because the HadoopInputFormatBase does not // have access to a Flink configuration object org.apache.flink.configuration.Configuration flinkConfiguration = GlobalConfiguration.loadConfiguration(); Configurat...
java
public static void mergeHadoopConf(JobConf jobConf) { // we have to load the global configuration here, because the HadoopInputFormatBase does not // have access to a Flink configuration object org.apache.flink.configuration.Configuration flinkConfiguration = GlobalConfiguration.loadConfiguration(); Configurat...
[ "public", "static", "void", "mergeHadoopConf", "(", "JobConf", "jobConf", ")", "{", "// we have to load the global configuration here, because the HadoopInputFormatBase does not", "// have access to a Flink configuration object", "org", ".", "apache", ".", "flink", ".", "configurat...
Merge HadoopConfiguration into JobConf. This is necessary for the HDFS configuration.
[ "Merge", "HadoopConfiguration", "into", "JobConf", ".", "This", "is", "necessary", "for", "the", "HDFS", "configuration", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/api/java/hadoop/mapred/utils/HadoopUtils.java#L44-L55
123,465
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/StackTraceSampleCoordinator.java
StackTraceSampleCoordinator.triggerStackTraceSample
@SuppressWarnings("unchecked") public CompletableFuture<StackTraceSample> triggerStackTraceSample( ExecutionVertex[] tasksToSample, int numSamples, Time delayBetweenSamples, int maxStackTraceDepth) { checkNotNull(tasksToSample, "Tasks to sample"); checkArgument(tasksToSample.length >= 1, "No tasks to ...
java
@SuppressWarnings("unchecked") public CompletableFuture<StackTraceSample> triggerStackTraceSample( ExecutionVertex[] tasksToSample, int numSamples, Time delayBetweenSamples, int maxStackTraceDepth) { checkNotNull(tasksToSample, "Tasks to sample"); checkArgument(tasksToSample.length >= 1, "No tasks to ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "CompletableFuture", "<", "StackTraceSample", ">", "triggerStackTraceSample", "(", "ExecutionVertex", "[", "]", "tasksToSample", ",", "int", "numSamples", ",", "Time", "delayBetweenSamples", ",", "int", "ma...
Triggers a stack trace sample to all tasks. @param tasksToSample Tasks to sample. @param numSamples Number of stack trace samples to collect. @param delayBetweenSamples Delay between consecutive samples. @param maxStackTraceDepth Maximum depth of the stack trace. 0 indicates no maximum and keeps the co...
[ "Triggers", "a", "stack", "trace", "sample", "to", "all", "tasks", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/StackTraceSampleCoordinator.java#L106-L184
123,466
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/StackTraceSampleCoordinator.java
StackTraceSampleCoordinator.cancelStackTraceSample
public void cancelStackTraceSample(int sampleId, Throwable cause) { synchronized (lock) { if (isShutDown) { return; } PendingStackTraceSample sample = pendingSamples.remove(sampleId); if (sample != null) { if (cause != null) { LOG.info("Cancelling sample " + sampleId, cause); } else { ...
java
public void cancelStackTraceSample(int sampleId, Throwable cause) { synchronized (lock) { if (isShutDown) { return; } PendingStackTraceSample sample = pendingSamples.remove(sampleId); if (sample != null) { if (cause != null) { LOG.info("Cancelling sample " + sampleId, cause); } else { ...
[ "public", "void", "cancelStackTraceSample", "(", "int", "sampleId", ",", "Throwable", "cause", ")", "{", "synchronized", "(", "lock", ")", "{", "if", "(", "isShutDown", ")", "{", "return", ";", "}", "PendingStackTraceSample", "sample", "=", "pendingSamples", "...
Cancels a pending sample. @param sampleId ID of the sample to cancel. @param cause Cause of the cancelling (can be <code>null</code>).
[ "Cancels", "a", "pending", "sample", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/StackTraceSampleCoordinator.java#L192-L210
123,467
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/StackTraceSampleCoordinator.java
StackTraceSampleCoordinator.shutDown
public void shutDown() { synchronized (lock) { if (!isShutDown) { LOG.info("Shutting down stack trace sample coordinator."); for (PendingStackTraceSample pending : pendingSamples.values()) { pending.discard(new RuntimeException("Shut down")); } pendingSamples.clear(); isShutDown = true;...
java
public void shutDown() { synchronized (lock) { if (!isShutDown) { LOG.info("Shutting down stack trace sample coordinator."); for (PendingStackTraceSample pending : pendingSamples.values()) { pending.discard(new RuntimeException("Shut down")); } pendingSamples.clear(); isShutDown = true;...
[ "public", "void", "shutDown", "(", ")", "{", "synchronized", "(", "lock", ")", "{", "if", "(", "!", "isShutDown", ")", "{", "LOG", ".", "info", "(", "\"Shutting down stack trace sample coordinator.\"", ")", ";", "for", "(", "PendingStackTraceSample", "pending", ...
Shuts down the coordinator. <p>After shut down, no further operations are executed.
[ "Shuts", "down", "the", "coordinator", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/StackTraceSampleCoordinator.java#L217-L231
123,468
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/StackTraceSampleCoordinator.java
StackTraceSampleCoordinator.collectStackTraces
public void collectStackTraces( int sampleId, ExecutionAttemptID executionId, List<StackTraceElement[]> stackTraces) { synchronized (lock) { if (isShutDown) { return; } if (LOG.isDebugEnabled()) { LOG.debug("Collecting stack trace sample {} of task {}", sampleId, executionId); } Pen...
java
public void collectStackTraces( int sampleId, ExecutionAttemptID executionId, List<StackTraceElement[]> stackTraces) { synchronized (lock) { if (isShutDown) { return; } if (LOG.isDebugEnabled()) { LOG.debug("Collecting stack trace sample {} of task {}", sampleId, executionId); } Pen...
[ "public", "void", "collectStackTraces", "(", "int", "sampleId", ",", "ExecutionAttemptID", "executionId", ",", "List", "<", "StackTraceElement", "[", "]", ">", "stackTraces", ")", "{", "synchronized", "(", "lock", ")", "{", "if", "(", "isShutDown", ")", "{", ...
Collects stack traces of a task. @param sampleId ID of the sample. @param executionId ID of the sampled task. @param stackTraces Stack traces of the sampled task. @throws IllegalStateException If unknown sample ID and not recently finished or cancelled sample.
[ "Collects", "stack", "traces", "of", "a", "task", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/StackTraceSampleCoordinator.java#L243-L280
123,469
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.fromElements
@SafeVarargs public final <OUT> DataStreamSource<OUT> fromElements(Class<OUT> type, OUT... data) { if (data.length == 0) { throw new IllegalArgumentException("fromElements needs at least one element as argument"); } TypeInformation<OUT> typeInfo; try { typeInfo = TypeExtractor.getForClass(type); } c...
java
@SafeVarargs public final <OUT> DataStreamSource<OUT> fromElements(Class<OUT> type, OUT... data) { if (data.length == 0) { throw new IllegalArgumentException("fromElements needs at least one element as argument"); } TypeInformation<OUT> typeInfo; try { typeInfo = TypeExtractor.getForClass(type); } c...
[ "@", "SafeVarargs", "public", "final", "<", "OUT", ">", "DataStreamSource", "<", "OUT", ">", "fromElements", "(", "Class", "<", "OUT", ">", "type", ",", "OUT", "...", "data", ")", "{", "if", "(", "data", ".", "length", "==", "0", ")", "{", "throw", ...
Creates a new data set that contains the given elements. The framework will determine the type according to the based type user supplied. The elements should be the same or be the subclass to the based type. The sequence of elements must not be empty. Note that this operation will result in a non-parallel data stream s...
[ "Creates", "a", "new", "data", "set", "that", "contains", "the", "given", "elements", ".", "The", "framework", "will", "determine", "the", "type", "according", "to", "the", "based", "type", "user", "supplied", ".", "The", "elements", "should", "be", "the", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L732-L748
123,470
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.fromCollection
public <OUT> DataStreamSource<OUT> fromCollection(Collection<OUT> data) { Preconditions.checkNotNull(data, "Collection must not be null"); if (data.isEmpty()) { throw new IllegalArgumentException("Collection must not be empty"); } OUT first = data.iterator().next(); if (first == null) { throw new Illeg...
java
public <OUT> DataStreamSource<OUT> fromCollection(Collection<OUT> data) { Preconditions.checkNotNull(data, "Collection must not be null"); if (data.isEmpty()) { throw new IllegalArgumentException("Collection must not be empty"); } OUT first = data.iterator().next(); if (first == null) { throw new Illeg...
[ "public", "<", "OUT", ">", "DataStreamSource", "<", "OUT", ">", "fromCollection", "(", "Collection", "<", "OUT", ">", "data", ")", "{", "Preconditions", ".", "checkNotNull", "(", "data", ",", "\"Collection must not be null\"", ")", ";", "if", "(", "data", "....
Creates a data stream from the given non-empty collection. The type of the data stream is that of the elements in the collection. <p>The framework will try and determine the exact type from the collection elements. In case of generic elements, it may be necessary to manually supply the type information via {@link #fro...
[ "Creates", "a", "data", "stream", "from", "the", "given", "non", "-", "empty", "collection", ".", "The", "type", "of", "the", "data", "stream", "is", "that", "of", "the", "elements", "in", "the", "collection", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L768-L789
123,471
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.fromCollection
public <OUT> DataStreamSource<OUT> fromCollection(Collection<OUT> data, TypeInformation<OUT> typeInfo) { Preconditions.checkNotNull(data, "Collection must not be null"); // must not have null elements and mixed elements FromElementsFunction.checkCollection(data, typeInfo.getTypeClass()); SourceFunction<OUT> f...
java
public <OUT> DataStreamSource<OUT> fromCollection(Collection<OUT> data, TypeInformation<OUT> typeInfo) { Preconditions.checkNotNull(data, "Collection must not be null"); // must not have null elements and mixed elements FromElementsFunction.checkCollection(data, typeInfo.getTypeClass()); SourceFunction<OUT> f...
[ "public", "<", "OUT", ">", "DataStreamSource", "<", "OUT", ">", "fromCollection", "(", "Collection", "<", "OUT", ">", "data", ",", "TypeInformation", "<", "OUT", ">", "typeInfo", ")", "{", "Preconditions", ".", "checkNotNull", "(", "data", ",", "\"Collection...
Creates a data stream from the given non-empty collection. <p>Note that this operation will result in a non-parallel data stream source, i.e., a data stream source with parallelism one. @param data The collection of elements to create the data stream from @param typeInfo The TypeInformation for the produced data stre...
[ "Creates", "a", "data", "stream", "from", "the", "given", "non", "-", "empty", "collection", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L805-L819
123,472
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.fromParallelCollection
private <OUT> DataStreamSource<OUT> fromParallelCollection(SplittableIterator<OUT> iterator, TypeInformation<OUT> typeInfo, String operatorName) { return addSource(new FromSplittableIteratorFunction<>(iterator), operatorName, typeInfo); }
java
private <OUT> DataStreamSource<OUT> fromParallelCollection(SplittableIterator<OUT> iterator, TypeInformation<OUT> typeInfo, String operatorName) { return addSource(new FromSplittableIteratorFunction<>(iterator), operatorName, typeInfo); }
[ "private", "<", "OUT", ">", "DataStreamSource", "<", "OUT", ">", "fromParallelCollection", "(", "SplittableIterator", "<", "OUT", ">", "iterator", ",", "TypeInformation", "<", "OUT", ">", "typeInfo", ",", "String", "operatorName", ")", "{", "return", "addSource"...
private helper for passing different names
[ "private", "helper", "for", "passing", "different", "names" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L918-L921
123,473
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.readFileStream
@Deprecated @SuppressWarnings("deprecation") public DataStream<String> readFileStream(String filePath, long intervalMillis, FileMonitoringFunction.WatchType watchType) { DataStream<Tuple3<String, Long, Long>> source = addSource(new FileMonitoringFunction( filePath, intervalMillis, watchType), "Read File Stream ...
java
@Deprecated @SuppressWarnings("deprecation") public DataStream<String> readFileStream(String filePath, long intervalMillis, FileMonitoringFunction.WatchType watchType) { DataStream<Tuple3<String, Long, Long>> source = addSource(new FileMonitoringFunction( filePath, intervalMillis, watchType), "Read File Stream ...
[ "@", "Deprecated", "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "public", "DataStream", "<", "String", ">", "readFileStream", "(", "String", "filePath", ",", "long", "intervalMillis", ",", "FileMonitoringFunction", ".", "WatchType", "watchType", ")", "{", ...
Creates a data stream that contains the contents of file created while system watches the given path. The file will be read with the system's default character set. @param filePath The path of the file, as a URI (e.g., "file:///some/local/file" or "hdfs://host:port/file/path/") @param intervalMillis The interval of fi...
[ "Creates", "a", "data", "stream", "that", "contains", "the", "contents", "of", "file", "created", "while", "system", "watches", "the", "given", "path", ".", "The", "file", "will", "be", "read", "with", "the", "system", "s", "default", "character", "set", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L1112-L1119
123,474
apache/flink
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/StreamQueryConfig.java
StreamQueryConfig.withIdleStateRetentionTime
public StreamQueryConfig withIdleStateRetentionTime(Time minTime, Time maxTime) { if (maxTime.toMilliseconds() - minTime.toMilliseconds() < 300000 && !(maxTime.toMilliseconds() == 0 && minTime.toMilliseconds() == 0)) { throw new IllegalArgumentException( "Difference between minTime: " + minTime.toString(...
java
public StreamQueryConfig withIdleStateRetentionTime(Time minTime, Time maxTime) { if (maxTime.toMilliseconds() - minTime.toMilliseconds() < 300000 && !(maxTime.toMilliseconds() == 0 && minTime.toMilliseconds() == 0)) { throw new IllegalArgumentException( "Difference between minTime: " + minTime.toString(...
[ "public", "StreamQueryConfig", "withIdleStateRetentionTime", "(", "Time", "minTime", ",", "Time", "maxTime", ")", "{", "if", "(", "maxTime", ".", "toMilliseconds", "(", ")", "-", "minTime", ".", "toMilliseconds", "(", ")", "<", "300000", "&&", "!", "(", "max...
Specifies a minimum and a maximum time interval for how long idle state, i.e., state which was not updated, will be retained. State will never be cleared until it was idle for less than the minimum time and will never be kept if it was idle for more than the maximum time. <p>When new data arrives for previously cleane...
[ "Specifies", "a", "minimum", "and", "a", "maximum", "time", "interval", "for", "how", "long", "idle", "state", "i", ".", "e", ".", "state", "which", "was", "not", "updated", "will", "be", "retained", ".", "State", "will", "never", "be", "cleared", "until...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/StreamQueryConfig.java#L62-L73
123,475
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/utils/GraphUtils.java
GraphUtils.count
public static <T> DataSet<LongValue> count(DataSet<T> input) { return input .map(new MapTo<>(new LongValue(1))) .returns(LONG_VALUE_TYPE_INFO) .name("Emit 1") .reduce(new AddLongValue()) .name("Sum"); }
java
public static <T> DataSet<LongValue> count(DataSet<T> input) { return input .map(new MapTo<>(new LongValue(1))) .returns(LONG_VALUE_TYPE_INFO) .name("Emit 1") .reduce(new AddLongValue()) .name("Sum"); }
[ "public", "static", "<", "T", ">", "DataSet", "<", "LongValue", ">", "count", "(", "DataSet", "<", "T", ">", "input", ")", "{", "return", "input", ".", "map", "(", "new", "MapTo", "<>", "(", "new", "LongValue", "(", "1", ")", ")", ")", ".", "retu...
Count the number of elements in a DataSet. @param input DataSet of elements to be counted @param <T> element type @return count
[ "Count", "the", "number", "of", "elements", "in", "a", "DataSet", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/utils/GraphUtils.java#L47-L54
123,476
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/security/SecurityUtils.java
SecurityUtils.install
public static void install(SecurityConfiguration config) throws Exception { // install the security modules List<SecurityModule> modules = new ArrayList<>(); try { for (SecurityModuleFactory moduleFactory : config.getSecurityModuleFactories()) { SecurityModule module = moduleFactory.createModule(config); ...
java
public static void install(SecurityConfiguration config) throws Exception { // install the security modules List<SecurityModule> modules = new ArrayList<>(); try { for (SecurityModuleFactory moduleFactory : config.getSecurityModuleFactories()) { SecurityModule module = moduleFactory.createModule(config); ...
[ "public", "static", "void", "install", "(", "SecurityConfiguration", "config", ")", "throws", "Exception", "{", "// install the security modules", "List", "<", "SecurityModule", ">", "modules", "=", "new", "ArrayList", "<>", "(", ")", ";", "try", "{", "for", "("...
Installs a process-wide security configuration. <p>Applies the configuration using the available security modules (i.e. Hadoop, JAAS).
[ "Installs", "a", "process", "-", "wide", "security", "configuration", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/security/SecurityUtils.java#L58-L96
123,477
apache/flink
flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/network/messages/MessageSerializer.java
MessageSerializer.writeHeader
private static void writeHeader(final ByteBuf buf, final MessageType messageType) { buf.writeInt(VERSION); buf.writeInt(messageType.ordinal()); }
java
private static void writeHeader(final ByteBuf buf, final MessageType messageType) { buf.writeInt(VERSION); buf.writeInt(messageType.ordinal()); }
[ "private", "static", "void", "writeHeader", "(", "final", "ByteBuf", "buf", ",", "final", "MessageType", "messageType", ")", "{", "buf", ".", "writeInt", "(", "VERSION", ")", ";", "buf", ".", "writeInt", "(", "messageType", ".", "ordinal", "(", ")", ")", ...
Helper for serializing the header. @param buf The {@link ByteBuf} to serialize the header into. @param messageType The {@link MessageType} of the message this header refers to.
[ "Helper", "for", "serializing", "the", "header", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/network/messages/MessageSerializer.java#L185-L188
123,478
apache/flink
flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/network/messages/MessageSerializer.java
MessageSerializer.writePayload
private static ByteBuf writePayload( final ByteBufAllocator alloc, final long requestId, final MessageType messageType, final byte[] payload) { final int frameLength = HEADER_LENGTH + REQUEST_ID_SIZE + payload.length; final ByteBuf buf = alloc.ioBuffer(frameLength + Integer.BYTES); buf.writeInt(fram...
java
private static ByteBuf writePayload( final ByteBufAllocator alloc, final long requestId, final MessageType messageType, final byte[] payload) { final int frameLength = HEADER_LENGTH + REQUEST_ID_SIZE + payload.length; final ByteBuf buf = alloc.ioBuffer(frameLength + Integer.BYTES); buf.writeInt(fram...
[ "private", "static", "ByteBuf", "writePayload", "(", "final", "ByteBufAllocator", "alloc", ",", "final", "long", "requestId", ",", "final", "MessageType", "messageType", ",", "final", "byte", "[", "]", "payload", ")", "{", "final", "int", "frameLength", "=", "...
Helper for serializing the messages. @param alloc The {@link ByteBufAllocator} used to allocate the buffer to serialize the message into. @param requestId The id of the request to which the message refers to. @param messageType The {@link MessageType type of the message}. @param payload The serialized version of t...
[ "Helper", "for", "serializing", "the", "messages", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/network/messages/MessageSerializer.java#L199-L213
123,479
apache/flink
flink-connectors/flink-hbase/src/main/java/org/apache/flink/addons/hbase/HBaseTableSchema.java
HBaseTableSchema.getFamilyKeys
byte[][] getFamilyKeys() { Charset c = Charset.forName(charset); byte[][] familyKeys = new byte[this.familyMap.size()][]; int i = 0; for (String name : this.familyMap.keySet()) { familyKeys[i++] = name.getBytes(c); } return familyKeys; }
java
byte[][] getFamilyKeys() { Charset c = Charset.forName(charset); byte[][] familyKeys = new byte[this.familyMap.size()][]; int i = 0; for (String name : this.familyMap.keySet()) { familyKeys[i++] = name.getBytes(c); } return familyKeys; }
[ "byte", "[", "]", "[", "]", "getFamilyKeys", "(", ")", "{", "Charset", "c", "=", "Charset", ".", "forName", "(", "charset", ")", ";", "byte", "[", "]", "[", "]", "familyKeys", "=", "new", "byte", "[", "this", ".", "familyMap", ".", "size", "(", "...
Returns the HBase identifiers of all registered column families. @return The HBase identifiers of all registered column families.
[ "Returns", "the", "HBase", "identifiers", "of", "all", "registered", "column", "families", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-hbase/src/main/java/org/apache/flink/addons/hbase/HBaseTableSchema.java#L90-L99
123,480
apache/flink
flink-connectors/flink-hbase/src/main/java/org/apache/flink/addons/hbase/HBaseTableSchema.java
HBaseTableSchema.getQualifierNames
String[] getQualifierNames(String family) { Map<String, TypeInformation<?>> qualifierMap = familyMap.get(family); if (qualifierMap == null) { throw new IllegalArgumentException("Family " + family + " does not exist in schema."); } String[] qualifierNames = new String[qualifierMap.size()]; int i = 0; fo...
java
String[] getQualifierNames(String family) { Map<String, TypeInformation<?>> qualifierMap = familyMap.get(family); if (qualifierMap == null) { throw new IllegalArgumentException("Family " + family + " does not exist in schema."); } String[] qualifierNames = new String[qualifierMap.size()]; int i = 0; fo...
[ "String", "[", "]", "getQualifierNames", "(", "String", "family", ")", "{", "Map", "<", "String", ",", "TypeInformation", "<", "?", ">", ">", "qualifierMap", "=", "familyMap", ".", "get", "(", "family", ")", ";", "if", "(", "qualifierMap", "==", "null", ...
Returns the names of all registered column qualifiers of a specific column family. @param family The name of the column family for which the column qualifier names are returned. @return The names of all registered column qualifiers of a specific column family.
[ "Returns", "the", "names", "of", "all", "registered", "column", "qualifiers", "of", "a", "specific", "column", "family", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-hbase/src/main/java/org/apache/flink/addons/hbase/HBaseTableSchema.java#L107-L121
123,481
apache/flink
flink-connectors/flink-hbase/src/main/java/org/apache/flink/addons/hbase/HBaseTableSchema.java
HBaseTableSchema.getQualifierKeys
byte[][] getQualifierKeys(String family) { Map<String, TypeInformation<?>> qualifierMap = familyMap.get(family); if (qualifierMap == null) { throw new IllegalArgumentException("Family " + family + " does not exist in schema."); } Charset c = Charset.forName(charset); byte[][] qualifierKeys = new byte[qua...
java
byte[][] getQualifierKeys(String family) { Map<String, TypeInformation<?>> qualifierMap = familyMap.get(family); if (qualifierMap == null) { throw new IllegalArgumentException("Family " + family + " does not exist in schema."); } Charset c = Charset.forName(charset); byte[][] qualifierKeys = new byte[qua...
[ "byte", "[", "]", "[", "]", "getQualifierKeys", "(", "String", "family", ")", "{", "Map", "<", "String", ",", "TypeInformation", "<", "?", ">", ">", "qualifierMap", "=", "familyMap", ".", "get", "(", "family", ")", ";", "if", "(", "qualifierMap", "==",...
Returns the HBase identifiers of all registered column qualifiers for a specific column family. @param family The name of the column family for which the column qualifier identifiers are returned. @return The HBase identifiers of all registered column qualifiers for a specific column family.
[ "Returns", "the", "HBase", "identifiers", "of", "all", "registered", "column", "qualifiers", "for", "a", "specific", "column", "family", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-hbase/src/main/java/org/apache/flink/addons/hbase/HBaseTableSchema.java#L129-L143
123,482
apache/flink
flink-connectors/flink-hbase/src/main/java/org/apache/flink/addons/hbase/HBaseTableSchema.java
HBaseTableSchema.getQualifierTypes
TypeInformation<?>[] getQualifierTypes(String family) { Map<String, TypeInformation<?>> qualifierMap = familyMap.get(family); if (qualifierMap == null) { throw new IllegalArgumentException("Family " + family + " does not exist in schema."); } TypeInformation<?>[] typeInformation = new TypeInformation[quali...
java
TypeInformation<?>[] getQualifierTypes(String family) { Map<String, TypeInformation<?>> qualifierMap = familyMap.get(family); if (qualifierMap == null) { throw new IllegalArgumentException("Family " + family + " does not exist in schema."); } TypeInformation<?>[] typeInformation = new TypeInformation[quali...
[ "TypeInformation", "<", "?", ">", "[", "]", "getQualifierTypes", "(", "String", "family", ")", "{", "Map", "<", "String", ",", "TypeInformation", "<", "?", ">", ">", "qualifierMap", "=", "familyMap", ".", "get", "(", "family", ")", ";", "if", "(", "qua...
Returns the types of all registered column qualifiers of a specific column family. @param family The name of the column family for which the column qualifier types are returned. @return The types of all registered column qualifiers of a specific column family.
[ "Returns", "the", "types", "of", "all", "registered", "column", "qualifiers", "of", "a", "specific", "column", "family", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-hbase/src/main/java/org/apache/flink/addons/hbase/HBaseTableSchema.java#L151-L165
123,483
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.getString
@PublicEvolving public String getString(ConfigOption<String> configOption, String overrideDefault) { Object o = getRawValueFromOption(configOption); return o == null ? overrideDefault : o.toString(); }
java
@PublicEvolving public String getString(ConfigOption<String> configOption, String overrideDefault) { Object o = getRawValueFromOption(configOption); return o == null ? overrideDefault : o.toString(); }
[ "@", "PublicEvolving", "public", "String", "getString", "(", "ConfigOption", "<", "String", ">", "configOption", ",", "String", "overrideDefault", ")", "{", "Object", "o", "=", "getRawValueFromOption", "(", "configOption", ")", ";", "return", "o", "==", "null", ...
Returns the value associated with the given config option as a string. If no value is mapped under any key of the option, it returns the specified default instead of the option's default value. @param configOption The configuration option @return the (default) value associated with the given config option
[ "Returns", "the", "value", "associated", "with", "the", "given", "config", "option", "as", "a", "string", ".", "If", "no", "value", "is", "mapped", "under", "any", "key", "of", "the", "option", "it", "returns", "the", "specified", "default", "instead", "of...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L163-L167
123,484
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.getInteger
@PublicEvolving public int getInteger(ConfigOption<Integer> configOption) { Object o = getValueOrDefaultFromOption(configOption); return convertToInt(o, configOption.defaultValue()); }
java
@PublicEvolving public int getInteger(ConfigOption<Integer> configOption) { Object o = getValueOrDefaultFromOption(configOption); return convertToInt(o, configOption.defaultValue()); }
[ "@", "PublicEvolving", "public", "int", "getInteger", "(", "ConfigOption", "<", "Integer", ">", "configOption", ")", "{", "Object", "o", "=", "getValueOrDefaultFromOption", "(", "configOption", ")", ";", "return", "convertToInt", "(", "o", ",", "configOption", "...
Returns the value associated with the given config option as an integer. @param configOption The configuration option @return the (default) value associated with the given config option
[ "Returns", "the", "value", "associated", "with", "the", "given", "config", "option", "as", "an", "integer", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L219-L223
123,485
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.getInteger
@PublicEvolving public int getInteger(ConfigOption<Integer> configOption, int overrideDefault) { Object o = getRawValueFromOption(configOption); if (o == null) { return overrideDefault; } return convertToInt(o, configOption.defaultValue()); }
java
@PublicEvolving public int getInteger(ConfigOption<Integer> configOption, int overrideDefault) { Object o = getRawValueFromOption(configOption); if (o == null) { return overrideDefault; } return convertToInt(o, configOption.defaultValue()); }
[ "@", "PublicEvolving", "public", "int", "getInteger", "(", "ConfigOption", "<", "Integer", ">", "configOption", ",", "int", "overrideDefault", ")", "{", "Object", "o", "=", "getRawValueFromOption", "(", "configOption", ")", ";", "if", "(", "o", "==", "null", ...
Returns the value associated with the given config option as an integer. If no value is mapped under any key of the option, it returns the specified default instead of the option's default value. @param configOption The configuration option @param overrideDefault The value to return if no value was mapper for any key ...
[ "Returns", "the", "value", "associated", "with", "the", "given", "config", "option", "as", "an", "integer", ".", "If", "no", "value", "is", "mapped", "under", "any", "key", "of", "the", "option", "it", "returns", "the", "specified", "default", "instead", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L234-L241
123,486
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.getLong
@PublicEvolving public long getLong(ConfigOption<Long> configOption) { Object o = getValueOrDefaultFromOption(configOption); return convertToLong(o, configOption.defaultValue()); }
java
@PublicEvolving public long getLong(ConfigOption<Long> configOption) { Object o = getValueOrDefaultFromOption(configOption); return convertToLong(o, configOption.defaultValue()); }
[ "@", "PublicEvolving", "public", "long", "getLong", "(", "ConfigOption", "<", "Long", ">", "configOption", ")", "{", "Object", "o", "=", "getValueOrDefaultFromOption", "(", "configOption", ")", ";", "return", "convertToLong", "(", "o", ",", "configOption", ".", ...
Returns the value associated with the given config option as a long integer. @param configOption The configuration option @return the (default) value associated with the given config option
[ "Returns", "the", "value", "associated", "with", "the", "given", "config", "option", "as", "a", "long", "integer", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L293-L297
123,487
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.getLong
@PublicEvolving public long getLong(ConfigOption<Long> configOption, long overrideDefault) { Object o = getRawValueFromOption(configOption); if (o == null) { return overrideDefault; } return convertToLong(o, configOption.defaultValue()); }
java
@PublicEvolving public long getLong(ConfigOption<Long> configOption, long overrideDefault) { Object o = getRawValueFromOption(configOption); if (o == null) { return overrideDefault; } return convertToLong(o, configOption.defaultValue()); }
[ "@", "PublicEvolving", "public", "long", "getLong", "(", "ConfigOption", "<", "Long", ">", "configOption", ",", "long", "overrideDefault", ")", "{", "Object", "o", "=", "getRawValueFromOption", "(", "configOption", ")", ";", "if", "(", "o", "==", "null", ")"...
Returns the value associated with the given config option as a long integer. If no value is mapped under any key of the option, it returns the specified default instead of the option's default value. @param configOption The configuration option @param overrideDefault The value to return if no value was mapper for any ...
[ "Returns", "the", "value", "associated", "with", "the", "given", "config", "option", "as", "a", "long", "integer", ".", "If", "no", "value", "is", "mapped", "under", "any", "key", "of", "the", "option", "it", "returns", "the", "specified", "default", "inst...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L308-L315
123,488
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.getBoolean
@PublicEvolving public boolean getBoolean(ConfigOption<Boolean> configOption) { Object o = getValueOrDefaultFromOption(configOption); return convertToBoolean(o); }
java
@PublicEvolving public boolean getBoolean(ConfigOption<Boolean> configOption) { Object o = getValueOrDefaultFromOption(configOption); return convertToBoolean(o); }
[ "@", "PublicEvolving", "public", "boolean", "getBoolean", "(", "ConfigOption", "<", "Boolean", ">", "configOption", ")", "{", "Object", "o", "=", "getValueOrDefaultFromOption", "(", "configOption", ")", ";", "return", "convertToBoolean", "(", "o", ")", ";", "}" ...
Returns the value associated with the given config option as a boolean. @param configOption The configuration option @return the (default) value associated with the given config option
[ "Returns", "the", "value", "associated", "with", "the", "given", "config", "option", "as", "a", "boolean", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L367-L371
123,489
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.getBoolean
@PublicEvolving public boolean getBoolean(ConfigOption<Boolean> configOption, boolean overrideDefault) { Object o = getRawValueFromOption(configOption); if (o == null) { return overrideDefault; } return convertToBoolean(o); }
java
@PublicEvolving public boolean getBoolean(ConfigOption<Boolean> configOption, boolean overrideDefault) { Object o = getRawValueFromOption(configOption); if (o == null) { return overrideDefault; } return convertToBoolean(o); }
[ "@", "PublicEvolving", "public", "boolean", "getBoolean", "(", "ConfigOption", "<", "Boolean", ">", "configOption", ",", "boolean", "overrideDefault", ")", "{", "Object", "o", "=", "getRawValueFromOption", "(", "configOption", ")", ";", "if", "(", "o", "==", "...
Returns the value associated with the given config option as a boolean. If no value is mapped under any key of the option, it returns the specified default instead of the option's default value. @param configOption The configuration option @param overrideDefault The value to return if no value was mapper for any key o...
[ "Returns", "the", "value", "associated", "with", "the", "given", "config", "option", "as", "a", "boolean", ".", "If", "no", "value", "is", "mapped", "under", "any", "key", "of", "the", "option", "it", "returns", "the", "specified", "default", "instead", "o...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L382-L389
123,490
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.getFloat
@PublicEvolving public float getFloat(ConfigOption<Float> configOption) { Object o = getValueOrDefaultFromOption(configOption); return convertToFloat(o, configOption.defaultValue()); }
java
@PublicEvolving public float getFloat(ConfigOption<Float> configOption) { Object o = getValueOrDefaultFromOption(configOption); return convertToFloat(o, configOption.defaultValue()); }
[ "@", "PublicEvolving", "public", "float", "getFloat", "(", "ConfigOption", "<", "Float", ">", "configOption", ")", "{", "Object", "o", "=", "getValueOrDefaultFromOption", "(", "configOption", ")", ";", "return", "convertToFloat", "(", "o", ",", "configOption", "...
Returns the value associated with the given config option as a float. @param configOption The configuration option @return the (default) value associated with the given config option
[ "Returns", "the", "value", "associated", "with", "the", "given", "config", "option", "as", "a", "float", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L441-L445
123,491
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.getFloat
@PublicEvolving public float getFloat(ConfigOption<Float> configOption, float overrideDefault) { Object o = getRawValueFromOption(configOption); if (o == null) { return overrideDefault; } return convertToFloat(o, configOption.defaultValue()); }
java
@PublicEvolving public float getFloat(ConfigOption<Float> configOption, float overrideDefault) { Object o = getRawValueFromOption(configOption); if (o == null) { return overrideDefault; } return convertToFloat(o, configOption.defaultValue()); }
[ "@", "PublicEvolving", "public", "float", "getFloat", "(", "ConfigOption", "<", "Float", ">", "configOption", ",", "float", "overrideDefault", ")", "{", "Object", "o", "=", "getRawValueFromOption", "(", "configOption", ")", ";", "if", "(", "o", "==", "null", ...
Returns the value associated with the given config option as a float. If no value is mapped under any key of the option, it returns the specified default instead of the option's default value. @param configOption The configuration option @param overrideDefault The value to return if no value was mapper for any key of ...
[ "Returns", "the", "value", "associated", "with", "the", "given", "config", "option", "as", "a", "float", ".", "If", "no", "value", "is", "mapped", "under", "any", "key", "of", "the", "option", "it", "returns", "the", "specified", "default", "instead", "of"...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L456-L463
123,492
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.getValue
@PublicEvolving public String getValue(ConfigOption<?> configOption) { Object o = getValueOrDefaultFromOption(configOption); return o == null ? null : o.toString(); }
java
@PublicEvolving public String getValue(ConfigOption<?> configOption) { Object o = getValueOrDefaultFromOption(configOption); return o == null ? null : o.toString(); }
[ "@", "PublicEvolving", "public", "String", "getValue", "(", "ConfigOption", "<", "?", ">", "configOption", ")", "{", "Object", "o", "=", "getValueOrDefaultFromOption", "(", "configOption", ")", ";", "return", "o", "==", "null", "?", "null", ":", "o", ".", ...
Returns the value associated with the given config option as a string. @param configOption The configuration option @return the (default) value associated with the given config option
[ "Returns", "the", "value", "associated", "with", "the", "given", "config", "option", "as", "a", "string", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L608-L612
123,493
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.getEnum
@PublicEvolving public <T extends Enum<T>> T getEnum( final Class<T> enumClass, final ConfigOption<String> configOption) { checkNotNull(enumClass, "enumClass must not be null"); checkNotNull(configOption, "configOption must not be null"); final String configValue = getString(configOption); try { retu...
java
@PublicEvolving public <T extends Enum<T>> T getEnum( final Class<T> enumClass, final ConfigOption<String> configOption) { checkNotNull(enumClass, "enumClass must not be null"); checkNotNull(configOption, "configOption must not be null"); final String configValue = getString(configOption); try { retu...
[ "@", "PublicEvolving", "public", "<", "T", "extends", "Enum", "<", "T", ">", ">", "T", "getEnum", "(", "final", "Class", "<", "T", ">", "enumClass", ",", "final", "ConfigOption", "<", "String", ">", "configOption", ")", "{", "checkNotNull", "(", "enumCla...
Returns the value associated with the given config option as an enum. @param enumClass The return enum class @param configOption The configuration option @throws IllegalArgumentException If the string associated with the given config option cannot be parsed as a value of the provided enum class.
[ "Returns", "the", "value", "associated", "with", "the", "given", "config", "option", "as", "an", "enum", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L622-L639
123,494
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.addAll
public void addAll(Configuration other, String prefix) { final StringBuilder bld = new StringBuilder(); bld.append(prefix); final int pl = bld.length(); synchronized (this.confData) { synchronized (other.confData) { for (Map.Entry<String, Object> entry : other.confData.entrySet()) { bld.setLength(p...
java
public void addAll(Configuration other, String prefix) { final StringBuilder bld = new StringBuilder(); bld.append(prefix); final int pl = bld.length(); synchronized (this.confData) { synchronized (other.confData) { for (Map.Entry<String, Object> entry : other.confData.entrySet()) { bld.setLength(p...
[ "public", "void", "addAll", "(", "Configuration", "other", ",", "String", "prefix", ")", "{", "final", "StringBuilder", "bld", "=", "new", "StringBuilder", "(", ")", ";", "bld", ".", "append", "(", "prefix", ")", ";", "final", "int", "pl", "=", "bld", ...
Adds all entries from the given configuration into this configuration. The keys are prepended with the given prefix. @param other The configuration whose entries are added to this configuration. @param prefix The prefix to prepend.
[ "Adds", "all", "entries", "from", "the", "given", "configuration", "into", "this", "configuration", ".", "The", "keys", "are", "prepended", "with", "the", "given", "prefix", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L683-L697
123,495
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.contains
@PublicEvolving public boolean contains(ConfigOption<?> configOption) { synchronized (this.confData){ // first try the current key if (this.confData.containsKey(configOption.key())) { return true; } else if (configOption.hasFallbackKeys()) { // try the fallback keys for (FallbackKey fallbackK...
java
@PublicEvolving public boolean contains(ConfigOption<?> configOption) { synchronized (this.confData){ // first try the current key if (this.confData.containsKey(configOption.key())) { return true; } else if (configOption.hasFallbackKeys()) { // try the fallback keys for (FallbackKey fallbackK...
[ "@", "PublicEvolving", "public", "boolean", "contains", "(", "ConfigOption", "<", "?", ">", "configOption", ")", "{", "synchronized", "(", "this", ".", "confData", ")", "{", "// first try the current key", "if", "(", "this", ".", "confData", ".", "containsKey", ...
Checks whether there is an entry for the given config option. @param configOption The configuration option @return <tt>true</tt> if a valid (current or deprecated) key of the config option is stored, <tt>false</tt> otherwise
[ "Checks", "whether", "there", "is", "an", "entry", "for", "the", "given", "config", "option", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L727-L746
123,496
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.removeConfig
public <T> boolean removeConfig(ConfigOption<T> configOption){ synchronized (this.confData){ // try the current key Object oldValue = this.confData.remove(configOption.key()); if (oldValue == null){ for (FallbackKey fallbackKey : configOption.fallbackKeys()){ oldValue = this.confData.remove(fallback...
java
public <T> boolean removeConfig(ConfigOption<T> configOption){ synchronized (this.confData){ // try the current key Object oldValue = this.confData.remove(configOption.key()); if (oldValue == null){ for (FallbackKey fallbackKey : configOption.fallbackKeys()){ oldValue = this.confData.remove(fallback...
[ "public", "<", "T", ">", "boolean", "removeConfig", "(", "ConfigOption", "<", "T", ">", "configOption", ")", "{", "synchronized", "(", "this", ".", "confData", ")", "{", "// try the current key", "Object", "oldValue", "=", "this", ".", "confData", ".", "remo...
Removes given config option from the configuration. @param configOption config option to remove @param <T> Type of the config option @return true is config has been removed, false otherwise
[ "Removes", "given", "config", "option", "from", "the", "configuration", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L768-L784
123,497
apache/flink
flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/RecoverableMultiPartUploadImpl.java
RecoverableMultiPartUploadImpl.uploadPart
@Override public void uploadPart(RefCountedFSOutputStream file) throws IOException { // this is to guarantee that nobody is // writing to the file we are uploading. checkState(file.isClosed()); final CompletableFuture<PartETag> future = new CompletableFuture<>(); uploadsInProgress.add(future); final long...
java
@Override public void uploadPart(RefCountedFSOutputStream file) throws IOException { // this is to guarantee that nobody is // writing to the file we are uploading. checkState(file.isClosed()); final CompletableFuture<PartETag> future = new CompletableFuture<>(); uploadsInProgress.add(future); final long...
[ "@", "Override", "public", "void", "uploadPart", "(", "RefCountedFSOutputStream", "file", ")", "throws", "IOException", "{", "// this is to guarantee that nobody is", "// writing to the file we are uploading.", "checkState", "(", "file", ".", "isClosed", "(", ")", ")", ";...
Adds a part to the uploads without any size limitations. <p>This method is non-blocking and does not wait for the part upload to complete. @param file The file with the part data. @throws IOException If this method throws an exception, the RecoverableS3MultiPartUpload should not be used any more, but recovered inste...
[ "Adds", "a", "part", "to", "the", "uploads", "without", "any", "size", "limitations", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/RecoverableMultiPartUploadImpl.java#L100-L114
123,498
apache/flink
flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/RecoverableMultiPartUploadImpl.java
RecoverableMultiPartUploadImpl.snapshotAndGetRecoverable
@Override public S3Recoverable snapshotAndGetRecoverable(@Nullable final RefCountedFSOutputStream incompletePartFile) throws IOException { final String incompletePartObjectName = safelyUploadSmallPart(incompletePartFile); // make sure all other uploads are complete // this currently makes the method blocking, ...
java
@Override public S3Recoverable snapshotAndGetRecoverable(@Nullable final RefCountedFSOutputStream incompletePartFile) throws IOException { final String incompletePartObjectName = safelyUploadSmallPart(incompletePartFile); // make sure all other uploads are complete // this currently makes the method blocking, ...
[ "@", "Override", "public", "S3Recoverable", "snapshotAndGetRecoverable", "(", "@", "Nullable", "final", "RefCountedFSOutputStream", "incompletePartFile", ")", "throws", "IOException", "{", "final", "String", "incompletePartObjectName", "=", "safelyUploadSmallPart", "(", "in...
Creates a snapshot of this MultiPartUpload, from which the upload can be resumed. <p>Data buffered locally which is less than {@link org.apache.flink.fs.s3.common.FlinkS3FileSystem#S3_MULTIPART_MIN_PART_SIZE S3_MULTIPART_MIN_PART_SIZE}, and cannot be uploaded as part of the MPU and set to S3 as independent objects. <...
[ "Creates", "a", "snapshot", "of", "this", "MultiPartUpload", "from", "which", "the", "upload", "can", "be", "resumed", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/RecoverableMultiPartUploadImpl.java#L143-L163
123,499
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/ConnectedStreams.java
ConnectedStreams.keyBy
public ConnectedStreams<IN1, IN2> keyBy(int keyPosition1, int keyPosition2) { return new ConnectedStreams<>(this.environment, inputStream1.keyBy(keyPosition1), inputStream2.keyBy(keyPosition2)); }
java
public ConnectedStreams<IN1, IN2> keyBy(int keyPosition1, int keyPosition2) { return new ConnectedStreams<>(this.environment, inputStream1.keyBy(keyPosition1), inputStream2.keyBy(keyPosition2)); }
[ "public", "ConnectedStreams", "<", "IN1", ",", "IN2", ">", "keyBy", "(", "int", "keyPosition1", ",", "int", "keyPosition2", ")", "{", "return", "new", "ConnectedStreams", "<>", "(", "this", ".", "environment", ",", "inputStream1", ".", "keyBy", "(", "keyPosi...
KeyBy operation for connected data stream. Assigns keys to the elements of input1 and input2 according to keyPosition1 and keyPosition2. @param keyPosition1 The field used to compute the hashcode of the elements in the first input stream. @param keyPosition2 The field used to compute the hashcode of the elements in th...
[ "KeyBy", "operation", "for", "connected", "data", "stream", ".", "Assigns", "keys", "to", "the", "elements", "of", "input1", "and", "input2", "according", "to", "keyPosition1", "and", "keyPosition2", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/ConnectedStreams.java#L122-L125