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,200
apache/flink
flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/utils/ParquetRecordReader.java
ParquetRecordReader.readNextRecord
private boolean readNextRecord() throws IOException { boolean recordFound = false; while (!recordFound) { // no more records left if (numReadRecords >= numTotalRecords) { return false; } try { if (numReadRecords == numRecordsUpToCurrentBlock) { // advance to next block PageReadStore p...
java
private boolean readNextRecord() throws IOException { boolean recordFound = false; while (!recordFound) { // no more records left if (numReadRecords >= numTotalRecords) { return false; } try { if (numReadRecords == numRecordsUpToCurrentBlock) { // advance to next block PageReadStore p...
[ "private", "boolean", "readNextRecord", "(", ")", "throws", "IOException", "{", "boolean", "recordFound", "=", "false", ";", "while", "(", "!", "recordFound", ")", "{", "// no more records left", "if", "(", "numReadRecords", ">=", "numTotalRecords", ")", "{", "r...
Reads the next record. @return True if a record could be read, false otherwise.
[ "Reads", "the", "next", "record", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/utils/ParquetRecordReader.java#L215-L271
123,201
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/Scheduler.java
Scheduler.shutdown
public void shutdown() { synchronized (globalLock) { for (Instance i : allInstances) { i.removeSlotListener(); i.cancelAndReleaseAllSlots(); } allInstances.clear(); allInstancesByHost.clear(); instancesWithAvailableResources.clear(); taskQueue.clear(); } }
java
public void shutdown() { synchronized (globalLock) { for (Instance i : allInstances) { i.removeSlotListener(); i.cancelAndReleaseAllSlots(); } allInstances.clear(); allInstancesByHost.clear(); instancesWithAvailableResources.clear(); taskQueue.clear(); } }
[ "public", "void", "shutdown", "(", ")", "{", "synchronized", "(", "globalLock", ")", "{", "for", "(", "Instance", "i", ":", "allInstances", ")", "{", "i", ".", "removeSlotListener", "(", ")", ";", "i", ".", "cancelAndReleaseAllSlots", "(", ")", ";", "}",...
Shuts the scheduler down. After shut down no more tasks can be added to the scheduler.
[ "Shuts", "the", "scheduler", "down", ".", "After", "shut", "down", "no", "more", "tasks", "can", "be", "added", "to", "the", "scheduler", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/Scheduler.java#L127-L138
123,202
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/Scheduler.java
Scheduler.getNewSlotForSharingGroup
protected SimpleSlot getNewSlotForSharingGroup(ExecutionVertex vertex, Iterable<TaskManagerLocation> requestedLocations, SlotSharingGroupAssignment groupAssignment, CoLocationConstraint constraint, boolean localOnly) { // we need potentially to loop multiple times,...
java
protected SimpleSlot getNewSlotForSharingGroup(ExecutionVertex vertex, Iterable<TaskManagerLocation> requestedLocations, SlotSharingGroupAssignment groupAssignment, CoLocationConstraint constraint, boolean localOnly) { // we need potentially to loop multiple times,...
[ "protected", "SimpleSlot", "getNewSlotForSharingGroup", "(", "ExecutionVertex", "vertex", ",", "Iterable", "<", "TaskManagerLocation", ">", "requestedLocations", ",", "SlotSharingGroupAssignment", "groupAssignment", ",", "CoLocationConstraint", "constraint", ",", "boolean", "...
Tries to allocate a new slot for a vertex that is part of a slot sharing group. If one of the instances has a slot available, the method will allocate it as a shared slot, add that shared slot to the sharing group, and allocate a simple slot from that shared slot. <p>This method will try to allocate a slot from one of...
[ "Tries", "to", "allocate", "a", "new", "slot", "for", "a", "vertex", "that", "is", "part", "of", "a", "slot", "sharing", "group", ".", "If", "one", "of", "the", "instances", "has", "a", "slot", "available", "the", "method", "will", "allocate", "it", "a...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/Scheduler.java#L421-L474
123,203
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/description/Formatter.java
Formatter.format
public String format(Description description) { for (BlockElement blockElement : description.getBlocks()) { blockElement.format(this); } return finalizeFormatting(); }
java
public String format(Description description) { for (BlockElement blockElement : description.getBlocks()) { blockElement.format(this); } return finalizeFormatting(); }
[ "public", "String", "format", "(", "Description", "description", ")", "{", "for", "(", "BlockElement", "blockElement", ":", "description", ".", "getBlocks", "(", ")", ")", "{", "blockElement", ".", "format", "(", "this", ")", ";", "}", "return", "finalizeFor...
Formats the description into a String using format specific tags. @param description description to be formatted @return string representation of the description
[ "Formats", "the", "description", "into", "a", "String", "using", "format", "specific", "tags", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/description/Formatter.java#L36-L41
123,204
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/operators/TwoInputUdfOperator.java
TwoInputUdfOperator.withForwardedFieldsFirst
@SuppressWarnings("unchecked") public O withForwardedFieldsFirst(String... forwardedFieldsFirst) { if (this.udfSemantics == null || this.analyzedUdfSemantics) { // extract semantic properties from function annotations setSemanticProperties(extractSemanticAnnotationsFromUdf(getFunction().getClass())); } if...
java
@SuppressWarnings("unchecked") public O withForwardedFieldsFirst(String... forwardedFieldsFirst) { if (this.udfSemantics == null || this.analyzedUdfSemantics) { // extract semantic properties from function annotations setSemanticProperties(extractSemanticAnnotationsFromUdf(getFunction().getClass())); } if...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "O", "withForwardedFieldsFirst", "(", "String", "...", "forwardedFieldsFirst", ")", "{", "if", "(", "this", ".", "udfSemantics", "==", "null", "||", "this", ".", "analyzedUdfSemantics", ")", "{", "// ...
Adds semantic information about forwarded fields of the first input of the user-defined function. The forwarded fields information declares fields which are never modified by the function and which are forwarded at the same position to the output or unchanged copied to another position in the output. <p>Fields that ar...
[ "Adds", "semantic", "information", "about", "forwarded", "fields", "of", "the", "first", "input", "of", "the", "user", "-", "defined", "function", ".", "The", "forwarded", "fields", "information", "declares", "fields", "which", "are", "never", "modified", "by", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/TwoInputUdfOperator.java#L152-L177
123,205
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/operators/TwoInputUdfOperator.java
TwoInputUdfOperator.withForwardedFieldsSecond
@SuppressWarnings("unchecked") public O withForwardedFieldsSecond(String... forwardedFieldsSecond) { if (this.udfSemantics == null || this.analyzedUdfSemantics) { // extract semantic properties from function annotations setSemanticProperties(extractSemanticAnnotationsFromUdf(getFunction().getClass())); } ...
java
@SuppressWarnings("unchecked") public O withForwardedFieldsSecond(String... forwardedFieldsSecond) { if (this.udfSemantics == null || this.analyzedUdfSemantics) { // extract semantic properties from function annotations setSemanticProperties(extractSemanticAnnotationsFromUdf(getFunction().getClass())); } ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "O", "withForwardedFieldsSecond", "(", "String", "...", "forwardedFieldsSecond", ")", "{", "if", "(", "this", ".", "udfSemantics", "==", "null", "||", "this", ".", "analyzedUdfSemantics", ")", "{", "/...
Adds semantic information about forwarded fields of the second input of the user-defined function. The forwarded fields information declares fields which are never modified by the function and which are forwarded at the same position to the output or unchanged copied to another position in the output. <p>Fields that a...
[ "Adds", "semantic", "information", "about", "forwarded", "fields", "of", "the", "second", "input", "of", "the", "user", "-", "defined", "function", ".", "The", "forwarded", "fields", "information", "declares", "fields", "which", "are", "never", "modified", "by",...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/TwoInputUdfOperator.java#L215-L240
123,206
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyProtocol.java
NettyProtocol.getServerChannelHandlers
public ChannelHandler[] getServerChannelHandlers() { PartitionRequestQueue queueOfPartitionQueues = new PartitionRequestQueue(); PartitionRequestServerHandler serverHandler = new PartitionRequestServerHandler( partitionProvider, taskEventPublisher, queueOfPartitionQueues, creditBasedEnabled); return new Chann...
java
public ChannelHandler[] getServerChannelHandlers() { PartitionRequestQueue queueOfPartitionQueues = new PartitionRequestQueue(); PartitionRequestServerHandler serverHandler = new PartitionRequestServerHandler( partitionProvider, taskEventPublisher, queueOfPartitionQueues, creditBasedEnabled); return new Chann...
[ "public", "ChannelHandler", "[", "]", "getServerChannelHandlers", "(", ")", "{", "PartitionRequestQueue", "queueOfPartitionQueues", "=", "new", "PartitionRequestQueue", "(", ")", ";", "PartitionRequestServerHandler", "serverHandler", "=", "new", "PartitionRequestServerHandler...
Returns the server channel handlers. <pre> +-------------------------------------------------------------------+ | SERVER CHANNEL PIPELINE | | | | +----------+----------+ (3) write +----------------------+ ...
[ "Returns", "the", "server", "channel", "handlers", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyProtocol.java#L79-L90
123,207
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyProtocol.java
NettyProtocol.getClientChannelHandlers
public ChannelHandler[] getClientChannelHandlers() { NetworkClientHandler networkClientHandler = creditBasedEnabled ? new CreditBasedPartitionRequestClientHandler() : new PartitionRequestClientHandler(); return new ChannelHandler[] { messageEncoder, new NettyMessage.NettyMessageDecoder(!creditBasedEnab...
java
public ChannelHandler[] getClientChannelHandlers() { NetworkClientHandler networkClientHandler = creditBasedEnabled ? new CreditBasedPartitionRequestClientHandler() : new PartitionRequestClientHandler(); return new ChannelHandler[] { messageEncoder, new NettyMessage.NettyMessageDecoder(!creditBasedEnab...
[ "public", "ChannelHandler", "[", "]", "getClientChannelHandlers", "(", ")", "{", "NetworkClientHandler", "networkClientHandler", "=", "creditBasedEnabled", "?", "new", "CreditBasedPartitionRequestClientHandler", "(", ")", ":", "new", "PartitionRequestClientHandler", "(", ")...
Returns the client channel handlers. <pre> +-----------+----------+ +----------------------+ | Remote input channel | | request client | +-----------+----------+ +-----------+----------+ | | (1) write +---------------+----------------------------...
[ "Returns", "the", "client", "channel", "handlers", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyProtocol.java#L124-L132
123,208
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/DynamoDBStreamsDataFetcher.java
DynamoDBStreamsDataFetcher.createShardConsumer
@Override protected ShardConsumer createShardConsumer( Integer subscribedShardStateIndex, StreamShardHandle handle, SequenceNumber lastSeqNum, ShardMetricsReporter shardMetricsReporter) { return new ShardConsumer( this, subscribedShardStateIndex, handle, lastSeqNum, DynamoDBStreamsProxy.creat...
java
@Override protected ShardConsumer createShardConsumer( Integer subscribedShardStateIndex, StreamShardHandle handle, SequenceNumber lastSeqNum, ShardMetricsReporter shardMetricsReporter) { return new ShardConsumer( this, subscribedShardStateIndex, handle, lastSeqNum, DynamoDBStreamsProxy.creat...
[ "@", "Override", "protected", "ShardConsumer", "createShardConsumer", "(", "Integer", "subscribedShardStateIndex", ",", "StreamShardHandle", "handle", ",", "SequenceNumber", "lastSeqNum", ",", "ShardMetricsReporter", "shardMetricsReporter", ")", "{", "return", "new", "Shard...
Create a new DynamoDB streams shard consumer. @param subscribedShardStateIndex the state index of the shard this consumer is subscribed to @param handle stream handle @param lastSeqNum last sequence number @param shardMetricsReporter the reporter to report metrics to @return
[ "Create", "a", "new", "DynamoDB", "streams", "shard", "consumer", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/DynamoDBStreamsDataFetcher.java#L94-L108
123,209
apache/flink
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/SqlClient.java
SqlClient.openCli
private void openCli(SessionContext context, Executor executor) { CliClient cli = null; try { cli = new CliClient(context, executor); // interactive CLI mode if (options.getUpdateStatement() == null) { cli.open(); } // execute single update statement else { final boolean success = cli.subm...
java
private void openCli(SessionContext context, Executor executor) { CliClient cli = null; try { cli = new CliClient(context, executor); // interactive CLI mode if (options.getUpdateStatement() == null) { cli.open(); } // execute single update statement else { final boolean success = cli.subm...
[ "private", "void", "openCli", "(", "SessionContext", "context", ",", "Executor", "executor", ")", "{", "CliClient", "cli", "=", "null", ";", "try", "{", "cli", "=", "new", "CliClient", "(", "context", ",", "executor", ")", ";", "// interactive CLI mode", "if...
Opens the CLI client for executing SQL statements. @param context session context @param executor executor
[ "Opens", "the", "CLI", "client", "for", "executing", "SQL", "statements", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/SqlClient.java#L117-L137
123,210
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/AWSUtil.java
AWSUtil.createKinesisClient
public static AmazonKinesis createKinesisClient(Properties configProps, ClientConfiguration awsClientConfig) { // set a Flink-specific user agent awsClientConfig.setUserAgentPrefix(String.format(USER_AGENT_FORMAT, EnvironmentInformation.getVersion(), EnvironmentInformation.getRevisionInformation().commitId)...
java
public static AmazonKinesis createKinesisClient(Properties configProps, ClientConfiguration awsClientConfig) { // set a Flink-specific user agent awsClientConfig.setUserAgentPrefix(String.format(USER_AGENT_FORMAT, EnvironmentInformation.getVersion(), EnvironmentInformation.getRevisionInformation().commitId)...
[ "public", "static", "AmazonKinesis", "createKinesisClient", "(", "Properties", "configProps", ",", "ClientConfiguration", "awsClientConfig", ")", "{", "// set a Flink-specific user agent", "awsClientConfig", ".", "setUserAgentPrefix", "(", "String", ".", "format", "(", "USE...
Creates an Amazon Kinesis Client. @param configProps configuration properties containing the access key, secret key, and region @param awsClientConfig preconfigured AWS SDK client configuration @return a new Amazon Kinesis Client
[ "Creates", "an", "Amazon", "Kinesis", "Client", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/AWSUtil.java#L76-L96
123,211
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/AWSUtil.java
AWSUtil.getCredentialsProvider
private static AWSCredentialsProvider getCredentialsProvider(final Properties configProps, final String configPrefix) { CredentialProvider credentialProviderType; if (!configProps.containsKey(configPrefix)) { if (configProps.containsKey(AWSConfigConstants.accessKeyId(configPrefix)) && configProps.containsKey...
java
private static AWSCredentialsProvider getCredentialsProvider(final Properties configProps, final String configPrefix) { CredentialProvider credentialProviderType; if (!configProps.containsKey(configPrefix)) { if (configProps.containsKey(AWSConfigConstants.accessKeyId(configPrefix)) && configProps.containsKey...
[ "private", "static", "AWSCredentialsProvider", "getCredentialsProvider", "(", "final", "Properties", "configProps", ",", "final", "String", "configPrefix", ")", "{", "CredentialProvider", "credentialProviderType", ";", "if", "(", "!", "configProps", ".", "containsKey", ...
If the provider is ASSUME_ROLE, then the credentials for assuming this role are determined recursively. @param configProps the configuration properties @param configPrefix the prefix of the config properties for this credentials provider, e.g. aws.credentials.provider for the base credentials provider, aws.credentials...
[ "If", "the", "provider", "is", "ASSUME_ROLE", "then", "the", "credentials", "for", "assuming", "this", "role", "are", "determined", "recursively", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/AWSUtil.java#L118-L180
123,212
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/AWSUtil.java
AWSUtil.isValidRegion
public static boolean isValidRegion(String region) { try { Regions.fromName(region.toLowerCase()); } catch (IllegalArgumentException e) { return false; } return true; }
java
public static boolean isValidRegion(String region) { try { Regions.fromName(region.toLowerCase()); } catch (IllegalArgumentException e) { return false; } return true; }
[ "public", "static", "boolean", "isValidRegion", "(", "String", "region", ")", "{", "try", "{", "Regions", ".", "fromName", "(", "region", ".", "toLowerCase", "(", ")", ")", ";", "}", "catch", "(", "IllegalArgumentException", "e", ")", "{", "return", "false...
Checks whether or not a region ID is valid. @param region The AWS region ID to check @return true if the supplied region ID is valid, false otherwise
[ "Checks", "whether", "or", "not", "a", "region", "ID", "is", "valid", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/AWSUtil.java#L188-L195
123,213
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/util/collections/OptimizableHashSet.java
OptimizableHashSet.nextPowerOfTwo
public static long nextPowerOfTwo(long x) { if (x == 0L) { return 1L; } else { --x; x |= x >> 1; x |= x >> 2; x |= x >> 4; x |= x >> 8; x |= x >> 16; return (x | x >> 32) + 1L; } }
java
public static long nextPowerOfTwo(long x) { if (x == 0L) { return 1L; } else { --x; x |= x >> 1; x |= x >> 2; x |= x >> 4; x |= x >> 8; x |= x >> 16; return (x | x >> 32) + 1L; } }
[ "public", "static", "long", "nextPowerOfTwo", "(", "long", "x", ")", "{", "if", "(", "x", "==", "0L", ")", "{", "return", "1L", ";", "}", "else", "{", "--", "x", ";", "x", "|=", "x", ">>", "1", ";", "x", "|=", "x", ">>", "2", ";", "x", "|="...
Return the least power of two greater than or equal to the specified value. <p>Note that this function will return 1 when the argument is 0. @param x a long integer smaller than or equal to 2<sup>62</sup>. @return the least power of two greater than or equal to the specified value.
[ "Return", "the", "least", "power", "of", "two", "greater", "than", "or", "equal", "to", "the", "specified", "value", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/util/collections/OptimizableHashSet.java#L113-L125
123,214
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/util/collections/OptimizableHashSet.java
OptimizableHashSet.maxFill
public static int maxFill(int n, float f) { return Math.min((int) Math.ceil((double) ((float) n * f)), n - 1); }
java
public static int maxFill(int n, float f) { return Math.min((int) Math.ceil((double) ((float) n * f)), n - 1); }
[ "public", "static", "int", "maxFill", "(", "int", "n", ",", "float", "f", ")", "{", "return", "Math", ".", "min", "(", "(", "int", ")", "Math", ".", "ceil", "(", "(", "double", ")", "(", "(", "float", ")", "n", "*", "f", ")", ")", ",", "n", ...
Returns the maximum number of entries that can be filled before rehashing. @param n the size of the backing array. @param f the load factor. @return the maximum number of entries before rehashing.
[ "Returns", "the", "maximum", "number", "of", "entries", "that", "can", "be", "filled", "before", "rehashing", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/util/collections/OptimizableHashSet.java#L134-L136
123,215
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStore.java
ZooKeeperCompletedCheckpointStore.recover
@Override public void recover() throws Exception { LOG.info("Recovering checkpoints from ZooKeeper."); // Get all there is first List<Tuple2<RetrievableStateHandle<CompletedCheckpoint>, String>> initialCheckpoints; while (true) { try { initialCheckpoints = checkpointsInZooKeeper.getAllAndLock(); br...
java
@Override public void recover() throws Exception { LOG.info("Recovering checkpoints from ZooKeeper."); // Get all there is first List<Tuple2<RetrievableStateHandle<CompletedCheckpoint>, String>> initialCheckpoints; while (true) { try { initialCheckpoints = checkpointsInZooKeeper.getAllAndLock(); br...
[ "@", "Override", "public", "void", "recover", "(", ")", "throws", "Exception", "{", "LOG", ".", "info", "(", "\"Recovering checkpoints from ZooKeeper.\"", ")", ";", "// Get all there is first", "List", "<", "Tuple2", "<", "RetrievableStateHandle", "<", "CompletedCheck...
Gets the latest checkpoint from ZooKeeper and removes all others. <p><strong>Important</strong>: Even if there are more than one checkpoint in ZooKeeper, this will only recover the latest and discard the others. Otherwise, there is no guarantee that the history of checkpoints is consistent.
[ "Gets", "the", "latest", "checkpoint", "from", "ZooKeeper", "and", "removes", "all", "others", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStore.java#L126-L202
123,216
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStore.java
ZooKeeperCompletedCheckpointStore.addCheckpoint
@Override public void addCheckpoint(final CompletedCheckpoint checkpoint) throws Exception { checkNotNull(checkpoint, "Checkpoint"); final String path = checkpointIdToPath(checkpoint.getCheckpointID()); // Now add the new one. If it fails, we don't want to loose existing data. checkpointsInZooKeeper.addAndLo...
java
@Override public void addCheckpoint(final CompletedCheckpoint checkpoint) throws Exception { checkNotNull(checkpoint, "Checkpoint"); final String path = checkpointIdToPath(checkpoint.getCheckpointID()); // Now add the new one. If it fails, we don't want to loose existing data. checkpointsInZooKeeper.addAndLo...
[ "@", "Override", "public", "void", "addCheckpoint", "(", "final", "CompletedCheckpoint", "checkpoint", ")", "throws", "Exception", "{", "checkNotNull", "(", "checkpoint", ",", "\"Checkpoint\"", ")", ";", "final", "String", "path", "=", "checkpointIdToPath", "(", "...
Synchronously writes the new checkpoints to ZooKeeper and asynchronously removes older ones. @param checkpoint Completed checkpoint to add.
[ "Synchronously", "writes", "the", "new", "checkpoints", "to", "ZooKeeper", "and", "asynchronously", "removes", "older", "ones", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStore.java#L209-L227
123,217
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStore.java
ZooKeeperCompletedCheckpointStore.pathToCheckpointId
public static long pathToCheckpointId(String path) { try { String numberString; // check if we have a leading slash if ('/' == path.charAt(0)) { numberString = path.substring(1); } else { numberString = path; } return Long.parseLong(numberString); } catch (NumberFormatException e) { LO...
java
public static long pathToCheckpointId(String path) { try { String numberString; // check if we have a leading slash if ('/' == path.charAt(0)) { numberString = path.substring(1); } else { numberString = path; } return Long.parseLong(numberString); } catch (NumberFormatException e) { LO...
[ "public", "static", "long", "pathToCheckpointId", "(", "String", "path", ")", "{", "try", "{", "String", "numberString", ";", "// check if we have a leading slash", "if", "(", "'", "'", "==", "path", ".", "charAt", "(", "0", ")", ")", "{", "numberString", "=...
Converts a path to the checkpoint id. @param path in ZooKeeper @return Checkpoint id parsed from the path
[ "Converts", "a", "path", "to", "the", "checkpoint", "id", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStore.java#L324-L341
123,218
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisProducer.java
FlinkKinesisProducer.checkAndPropagateAsyncError
private void checkAndPropagateAsyncError() throws Exception { if (thrownException != null) { String errorMessages = ""; if (thrownException instanceof UserRecordFailedException) { List<Attempt> attempts = ((UserRecordFailedException) thrownException).getResult().getAttempts(); for (Attempt attempt: atte...
java
private void checkAndPropagateAsyncError() throws Exception { if (thrownException != null) { String errorMessages = ""; if (thrownException instanceof UserRecordFailedException) { List<Attempt> attempts = ((UserRecordFailedException) thrownException).getResult().getAttempts(); for (Attempt attempt: atte...
[ "private", "void", "checkAndPropagateAsyncError", "(", ")", "throws", "Exception", "{", "if", "(", "thrownException", "!=", "null", ")", "{", "String", "errorMessages", "=", "\"\"", ";", "if", "(", "thrownException", "instanceof", "UserRecordFailedException", ")", ...
Check if there are any asynchronous exceptions. If so, rethrow the exception.
[ "Check", "if", "there", "are", "any", "asynchronous", "exceptions", ".", "If", "so", "rethrow", "the", "exception", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisProducer.java#L350-L370
123,219
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/QueryableStateConfiguration.java
QueryableStateConfiguration.disabled
public static QueryableStateConfiguration disabled() { final Iterator<Integer> proxyPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.PROXY_PORT_RANGE.defaultValue()); final Iterator<Integer> serverPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.SERVER_PORT_RANGE.defaultValue()); return ...
java
public static QueryableStateConfiguration disabled() { final Iterator<Integer> proxyPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.PROXY_PORT_RANGE.defaultValue()); final Iterator<Integer> serverPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.SERVER_PORT_RANGE.defaultValue()); return ...
[ "public", "static", "QueryableStateConfiguration", "disabled", "(", ")", "{", "final", "Iterator", "<", "Integer", ">", "proxyPorts", "=", "NetUtils", ".", "getPortRangeFromString", "(", "QueryableStateOptions", ".", "PROXY_PORT_RANGE", ".", "defaultValue", "(", ")", ...
Gets the configuration describing the queryable state as deactivated.
[ "Gets", "the", "configuration", "describing", "the", "queryable", "state", "as", "deactivated", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/QueryableStateConfiguration.java#L136-L140
123,220
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/spargel/ScatterGatherConfiguration.java
ScatterGatherConfiguration.addBroadcastSetForScatterFunction
public void addBroadcastSetForScatterFunction(String name, DataSet<?> data) { this.bcVarsScatter.add(new Tuple2<>(name, data)); }
java
public void addBroadcastSetForScatterFunction(String name, DataSet<?> data) { this.bcVarsScatter.add(new Tuple2<>(name, data)); }
[ "public", "void", "addBroadcastSetForScatterFunction", "(", "String", "name", ",", "DataSet", "<", "?", ">", "data", ")", "{", "this", ".", "bcVarsScatter", ".", "add", "(", "new", "Tuple2", "<>", "(", "name", ",", "data", ")", ")", ";", "}" ]
Adds a data set as a broadcast set to the scatter function. @param name The name under which the broadcast data is available in the scatter function. @param data The data set to be broadcast.
[ "Adds", "a", "data", "set", "as", "a", "broadcast", "set", "to", "the", "scatter", "function", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/spargel/ScatterGatherConfiguration.java#L61-L63
123,221
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/spargel/ScatterGatherConfiguration.java
ScatterGatherConfiguration.addBroadcastSetForGatherFunction
public void addBroadcastSetForGatherFunction(String name, DataSet<?> data) { this.bcVarsGather.add(new Tuple2<>(name, data)); }
java
public void addBroadcastSetForGatherFunction(String name, DataSet<?> data) { this.bcVarsGather.add(new Tuple2<>(name, data)); }
[ "public", "void", "addBroadcastSetForGatherFunction", "(", "String", "name", ",", "DataSet", "<", "?", ">", "data", ")", "{", "this", ".", "bcVarsGather", ".", "add", "(", "new", "Tuple2", "<>", "(", "name", ",", "data", ")", ")", ";", "}" ]
Adds a data set as a broadcast set to the gather function. @param name The name under which the broadcast data is available in the gather function. @param data The data set to be broadcast.
[ "Adds", "a", "data", "set", "as", "a", "broadcast", "set", "to", "the", "gather", "function", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/spargel/ScatterGatherConfiguration.java#L71-L73
123,222
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java
SharedBufferAccessor.extractPatterns
public List<Map<String, List<EventId>>> extractPatterns( final NodeId nodeId, final DeweyNumber version) { List<Map<String, List<EventId>>> result = new ArrayList<>(); // stack to remember the current extraction states Stack<SharedBufferAccessor.ExtractionState> extractionStates = new Stack<>(); // get t...
java
public List<Map<String, List<EventId>>> extractPatterns( final NodeId nodeId, final DeweyNumber version) { List<Map<String, List<EventId>>> result = new ArrayList<>(); // stack to remember the current extraction states Stack<SharedBufferAccessor.ExtractionState> extractionStates = new Stack<>(); // get t...
[ "public", "List", "<", "Map", "<", "String", ",", "List", "<", "EventId", ">", ">", ">", "extractPatterns", "(", "final", "NodeId", "nodeId", ",", "final", "DeweyNumber", "version", ")", "{", "List", "<", "Map", "<", "String", ",", "List", "<", "EventI...
Returns all elements from the previous relation starting at the given entry. @param nodeId id of the starting entry @param version Version of the previous relation which shall be extracted @return Collection of previous relations starting with the given value
[ "Returns", "all", "elements", "from", "the", "previous", "relation", "starting", "at", "the", "given", "entry", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java#L119-L189
123,223
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java
SharedBufferAccessor.materializeMatch
public Map<String, List<V>> materializeMatch(Map<String, List<EventId>> match) { Map<String, List<V>> materializedMatch = new LinkedHashMap<>(match.size()); for (Map.Entry<String, List<EventId>> pattern : match.entrySet()) { List<V> events = new ArrayList<>(pattern.getValue().size()); for (EventId eventId : ...
java
public Map<String, List<V>> materializeMatch(Map<String, List<EventId>> match) { Map<String, List<V>> materializedMatch = new LinkedHashMap<>(match.size()); for (Map.Entry<String, List<EventId>> pattern : match.entrySet()) { List<V> events = new ArrayList<>(pattern.getValue().size()); for (EventId eventId : ...
[ "public", "Map", "<", "String", ",", "List", "<", "V", ">", ">", "materializeMatch", "(", "Map", "<", "String", ",", "List", "<", "EventId", ">", ">", "match", ")", "{", "Map", "<", "String", ",", "List", "<", "V", ">", ">", "materializedMatch", "=...
Extracts the real event from the sharedBuffer with pre-extracted eventId. @param match the matched event's eventId. @return the event associated with the eventId.
[ "Extracts", "the", "real", "event", "from", "the", "sharedBuffer", "with", "pre", "-", "extracted", "eventId", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java#L197-L214
123,224
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java
SharedBufferAccessor.lockNode
public void lockNode(final NodeId node) { Lockable<SharedBufferNode> sharedBufferNode = sharedBuffer.getEntry(node); if (sharedBufferNode != null) { sharedBufferNode.lock(); sharedBuffer.upsertEntry(node, sharedBufferNode); } }
java
public void lockNode(final NodeId node) { Lockable<SharedBufferNode> sharedBufferNode = sharedBuffer.getEntry(node); if (sharedBufferNode != null) { sharedBufferNode.lock(); sharedBuffer.upsertEntry(node, sharedBufferNode); } }
[ "public", "void", "lockNode", "(", "final", "NodeId", "node", ")", "{", "Lockable", "<", "SharedBufferNode", ">", "sharedBufferNode", "=", "sharedBuffer", ".", "getEntry", "(", "node", ")", ";", "if", "(", "sharedBufferNode", "!=", "null", ")", "{", "sharedB...
Increases the reference counter for the given entry so that it is not accidentally removed. @param node id of the entry
[ "Increases", "the", "reference", "counter", "for", "the", "given", "entry", "so", "that", "it", "is", "not", "accidentally", "removed", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java#L222-L228
123,225
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java
SharedBufferAccessor.releaseNode
public void releaseNode(final NodeId node) throws Exception { Lockable<SharedBufferNode> sharedBufferNode = sharedBuffer.getEntry(node); if (sharedBufferNode != null) { if (sharedBufferNode.release()) { removeNode(node, sharedBufferNode.getElement()); } else { sharedBuffer.upsertEntry(node, sharedBuff...
java
public void releaseNode(final NodeId node) throws Exception { Lockable<SharedBufferNode> sharedBufferNode = sharedBuffer.getEntry(node); if (sharedBufferNode != null) { if (sharedBufferNode.release()) { removeNode(node, sharedBufferNode.getElement()); } else { sharedBuffer.upsertEntry(node, sharedBuff...
[ "public", "void", "releaseNode", "(", "final", "NodeId", "node", ")", "throws", "Exception", "{", "Lockable", "<", "SharedBufferNode", ">", "sharedBufferNode", "=", "sharedBuffer", ".", "getEntry", "(", "node", ")", ";", "if", "(", "sharedBufferNode", "!=", "n...
Decreases the reference counter for the given entry so that it can be removed once the reference counter reaches 0. @param node id of the entry @throws Exception Thrown if the system cannot access the state.
[ "Decreases", "the", "reference", "counter", "for", "the", "given", "entry", "so", "that", "it", "can", "be", "removed", "once", "the", "reference", "counter", "reaches", "0", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java#L237-L246
123,226
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java
SharedBufferAccessor.lockEvent
private void lockEvent(EventId eventId) { Lockable<V> eventWrapper = sharedBuffer.getEvent(eventId); checkState( eventWrapper != null, "Referring to non existent event with id %s", eventId); eventWrapper.lock(); sharedBuffer.upsertEvent(eventId, eventWrapper); }
java
private void lockEvent(EventId eventId) { Lockable<V> eventWrapper = sharedBuffer.getEvent(eventId); checkState( eventWrapper != null, "Referring to non existent event with id %s", eventId); eventWrapper.lock(); sharedBuffer.upsertEvent(eventId, eventWrapper); }
[ "private", "void", "lockEvent", "(", "EventId", "eventId", ")", "{", "Lockable", "<", "V", ">", "eventWrapper", "=", "sharedBuffer", ".", "getEvent", "(", "eventId", ")", ";", "checkState", "(", "eventWrapper", "!=", "null", ",", "\"Referring to non existent eve...
Increases the reference counter for the given event so that it is not accidentally removed. @param eventId id of the entry
[ "Increases", "the", "reference", "counter", "for", "the", "given", "event", "so", "that", "it", "is", "not", "accidentally", "removed", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java#L272-L280
123,227
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java
SharedBufferAccessor.releaseEvent
public void releaseEvent(EventId eventId) throws Exception { Lockable<V> eventWrapper = sharedBuffer.getEvent(eventId); if (eventWrapper != null) { if (eventWrapper.release()) { sharedBuffer.removeEvent(eventId); } else { sharedBuffer.upsertEvent(eventId, eventWrapper); } } }
java
public void releaseEvent(EventId eventId) throws Exception { Lockable<V> eventWrapper = sharedBuffer.getEvent(eventId); if (eventWrapper != null) { if (eventWrapper.release()) { sharedBuffer.removeEvent(eventId); } else { sharedBuffer.upsertEvent(eventId, eventWrapper); } } }
[ "public", "void", "releaseEvent", "(", "EventId", "eventId", ")", "throws", "Exception", "{", "Lockable", "<", "V", ">", "eventWrapper", "=", "sharedBuffer", ".", "getEvent", "(", "eventId", ")", ";", "if", "(", "eventWrapper", "!=", "null", ")", "{", "if"...
Decreases the reference counter for the given event so that it can be removed once the reference counter reaches 0. @param eventId id of the event @throws Exception Thrown if the system cannot access the state.
[ "Decreases", "the", "reference", "counter", "for", "the", "given", "event", "so", "that", "it", "can", "be", "removed", "once", "the", "reference", "counter", "reaches", "0", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java#L289-L298
123,228
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.stop
protected void stop(String[] args) throws Exception { LOG.info("Running 'stop-with-savepoint' command."); final Options commandOptions = CliFrontendParser.getStopCommandOptions(); final Options commandLineOptions = CliFrontendParser.mergeOptions(commandOptions, customCommandLineOptions); final CommandLine comm...
java
protected void stop(String[] args) throws Exception { LOG.info("Running 'stop-with-savepoint' command."); final Options commandOptions = CliFrontendParser.getStopCommandOptions(); final Options commandLineOptions = CliFrontendParser.mergeOptions(commandOptions, customCommandLineOptions); final CommandLine comm...
[ "protected", "void", "stop", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "LOG", ".", "info", "(", "\"Running 'stop-with-savepoint' command.\"", ")", ";", "final", "Options", "commandOptions", "=", "CliFrontendParser", ".", "getStopCommandOption...
Executes the STOP action. @param args Command line arguments for the stop action.
[ "Executes", "the", "STOP", "action", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L501-L541
123,229
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.cancel
protected void cancel(String[] args) throws Exception { LOG.info("Running 'cancel' command."); final Options commandOptions = CliFrontendParser.getCancelCommandOptions(); final Options commandLineOptions = CliFrontendParser.mergeOptions(commandOptions, customCommandLineOptions); final CommandLine commandLine...
java
protected void cancel(String[] args) throws Exception { LOG.info("Running 'cancel' command."); final Options commandOptions = CliFrontendParser.getCancelCommandOptions(); final Options commandLineOptions = CliFrontendParser.mergeOptions(commandOptions, customCommandLineOptions); final CommandLine commandLine...
[ "protected", "void", "cancel", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "LOG", ".", "info", "(", "\"Running 'cancel' command.\"", ")", ";", "final", "Options", "commandOptions", "=", "CliFrontendParser", ".", "getCancelCommandOptions", "("...
Executes the CANCEL action. @param args Command line arguments for the cancel action.
[ "Executes", "the", "CANCEL", "action", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L548-L623
123,230
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.savepoint
protected void savepoint(String[] args) throws Exception { LOG.info("Running 'savepoint' command."); final Options commandOptions = CliFrontendParser.getSavepointCommandOptions(); final Options commandLineOptions = CliFrontendParser.mergeOptions(commandOptions, customCommandLineOptions); final CommandLine co...
java
protected void savepoint(String[] args) throws Exception { LOG.info("Running 'savepoint' command."); final Options commandOptions = CliFrontendParser.getSavepointCommandOptions(); final Options commandLineOptions = CliFrontendParser.mergeOptions(commandOptions, customCommandLineOptions); final CommandLine co...
[ "protected", "void", "savepoint", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "LOG", ".", "info", "(", "\"Running 'savepoint' command.\"", ")", ";", "final", "Options", "commandOptions", "=", "CliFrontendParser", ".", "getSavepointCommandOption...
Executes the SAVEPOINT action. @param args Command line arguments for the savepoint action.
[ "Executes", "the", "SAVEPOINT", "action", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L630-L686
123,231
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.triggerSavepoint
private String triggerSavepoint(ClusterClient<?> clusterClient, JobID jobId, String savepointDirectory) throws FlinkException { logAndSysout("Triggering savepoint for job " + jobId + '.'); CompletableFuture<String> savepointPathFuture = clusterClient.triggerSavepoint(jobId, savepointDirectory); logAndSysout("Wai...
java
private String triggerSavepoint(ClusterClient<?> clusterClient, JobID jobId, String savepointDirectory) throws FlinkException { logAndSysout("Triggering savepoint for job " + jobId + '.'); CompletableFuture<String> savepointPathFuture = clusterClient.triggerSavepoint(jobId, savepointDirectory); logAndSysout("Wai...
[ "private", "String", "triggerSavepoint", "(", "ClusterClient", "<", "?", ">", "clusterClient", ",", "JobID", "jobId", ",", "String", "savepointDirectory", ")", "throws", "FlinkException", "{", "logAndSysout", "(", "\"Triggering savepoint for job \"", "+", "jobId", "+"...
Sends a SavepointTriggerMessage to the job manager.
[ "Sends", "a", "SavepointTriggerMessage", "to", "the", "job", "manager", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L691-L711
123,232
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.disposeSavepoint
private void disposeSavepoint(ClusterClient<?> clusterClient, String savepointPath) throws FlinkException { Preconditions.checkNotNull(savepointPath, "Missing required argument: savepoint path. " + "Usage: bin/flink savepoint -d <savepoint-path>"); logAndSysout("Disposing savepoint '" + savepointPath + "'."); ...
java
private void disposeSavepoint(ClusterClient<?> clusterClient, String savepointPath) throws FlinkException { Preconditions.checkNotNull(savepointPath, "Missing required argument: savepoint path. " + "Usage: bin/flink savepoint -d <savepoint-path>"); logAndSysout("Disposing savepoint '" + savepointPath + "'."); ...
[ "private", "void", "disposeSavepoint", "(", "ClusterClient", "<", "?", ">", "clusterClient", ",", "String", "savepointPath", ")", "throws", "FlinkException", "{", "Preconditions", ".", "checkNotNull", "(", "savepointPath", ",", "\"Missing required argument: savepoint path...
Sends a SavepointDisposalRequest to the job manager.
[ "Sends", "a", "SavepointDisposalRequest", "to", "the", "job", "manager", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L716-L733
123,233
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.buildProgram
PackagedProgram buildProgram(ProgramOptions options) throws FileNotFoundException, ProgramInvocationException { String[] programArgs = options.getProgramArgs(); String jarFilePath = options.getJarFilePath(); List<URL> classpaths = options.getClasspaths(); if (jarFilePath == null) { throw new IllegalArgument...
java
PackagedProgram buildProgram(ProgramOptions options) throws FileNotFoundException, ProgramInvocationException { String[] programArgs = options.getProgramArgs(); String jarFilePath = options.getJarFilePath(); List<URL> classpaths = options.getClasspaths(); if (jarFilePath == null) { throw new IllegalArgument...
[ "PackagedProgram", "buildProgram", "(", "ProgramOptions", "options", ")", "throws", "FileNotFoundException", ",", "ProgramInvocationException", "{", "String", "[", "]", "programArgs", "=", "options", ".", "getProgramArgs", "(", ")", ";", "String", "jarFilePath", "=", ...
Creates a Packaged program from the given command line options. @return A PackagedProgram (upon success)
[ "Creates", "a", "Packaged", "program", "from", "the", "given", "command", "line", "options", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L769-L798
123,234
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.handleParametrizationException
private static int handleParametrizationException(ProgramParametrizationException e) { LOG.error("Program has not been parametrized properly.", e); System.err.println(e.getMessage()); return 1; }
java
private static int handleParametrizationException(ProgramParametrizationException e) { LOG.error("Program has not been parametrized properly.", e); System.err.println(e.getMessage()); return 1; }
[ "private", "static", "int", "handleParametrizationException", "(", "ProgramParametrizationException", "e", ")", "{", "LOG", ".", "error", "(", "\"Program has not been parametrized properly.\"", ",", "e", ")", ";", "System", ".", "err", ".", "println", "(", "e", ".",...
Displays an optional exception message for incorrect program parametrization. @param e The exception to display. @return The return code for the process.
[ "Displays", "an", "optional", "exception", "message", "for", "incorrect", "program", "parametrization", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L825-L829
123,235
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.handleError
private static int handleError(Throwable t) { LOG.error("Error while running the command.", t); System.err.println(); System.err.println("------------------------------------------------------------"); System.err.println(" The program finished with the following exception:"); System.err.println(); if (t.g...
java
private static int handleError(Throwable t) { LOG.error("Error while running the command.", t); System.err.println(); System.err.println("------------------------------------------------------------"); System.err.println(" The program finished with the following exception:"); System.err.println(); if (t.g...
[ "private", "static", "int", "handleError", "(", "Throwable", "t", ")", "{", "LOG", ".", "error", "(", "\"Error while running the command.\"", ",", "t", ")", ";", "System", ".", "err", ".", "println", "(", ")", ";", "System", ".", "err", ".", "println", "...
Displays an exception message. @param t The exception to display. @return The return code for the process.
[ "Displays", "an", "exception", "message", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L849-L870
123,236
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.main
public static void main(final String[] args) { EnvironmentInformation.logEnvironmentInfo(LOG, "Command Line Client", args); // 1. find the configuration directory final String configurationDirectory = getConfigurationDirectoryFromEnv(); // 2. load the global configuration final Configuration configuration =...
java
public static void main(final String[] args) { EnvironmentInformation.logEnvironmentInfo(LOG, "Command Line Client", args); // 1. find the configuration directory final String configurationDirectory = getConfigurationDirectoryFromEnv(); // 2. load the global configuration final Configuration configuration =...
[ "public", "static", "void", "main", "(", "final", "String", "[", "]", "args", ")", "{", "EnvironmentInformation", ".", "logEnvironmentInfo", "(", "LOG", ",", "\"Command Line Client\"", ",", "args", ")", ";", "// 1. find the configuration directory", "final", "String...
Submits the job based on the arguments.
[ "Submits", "the", "job", "based", "on", "the", "arguments", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L1035-L1065
123,237
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.setJobManagerAddressInConfig
static void setJobManagerAddressInConfig(Configuration config, InetSocketAddress address) { config.setString(JobManagerOptions.ADDRESS, address.getHostString()); config.setInteger(JobManagerOptions.PORT, address.getPort()); config.setString(RestOptions.ADDRESS, address.getHostString()); config.setInteger(RestOp...
java
static void setJobManagerAddressInConfig(Configuration config, InetSocketAddress address) { config.setString(JobManagerOptions.ADDRESS, address.getHostString()); config.setInteger(JobManagerOptions.PORT, address.getPort()); config.setString(RestOptions.ADDRESS, address.getHostString()); config.setInteger(RestOp...
[ "static", "void", "setJobManagerAddressInConfig", "(", "Configuration", "config", ",", "InetSocketAddress", "address", ")", "{", "config", ".", "setString", "(", "JobManagerOptions", ".", "ADDRESS", ",", "address", ".", "getHostString", "(", ")", ")", ";", "config...
Writes the given job manager address to the associated configuration object. @param address Address to write to the configuration @param config The configuration to write to
[ "Writes", "the", "given", "job", "manager", "address", "to", "the", "associated", "configuration", "object", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L1103-L1108
123,238
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.getActiveCustomCommandLine
public CustomCommandLine<?> getActiveCustomCommandLine(CommandLine commandLine) { for (CustomCommandLine<?> cli : customCommandLines) { if (cli.isActive(commandLine)) { return cli; } } throw new IllegalStateException("No command-line ran."); }
java
public CustomCommandLine<?> getActiveCustomCommandLine(CommandLine commandLine) { for (CustomCommandLine<?> cli : customCommandLines) { if (cli.isActive(commandLine)) { return cli; } } throw new IllegalStateException("No command-line ran."); }
[ "public", "CustomCommandLine", "<", "?", ">", "getActiveCustomCommandLine", "(", "CommandLine", "commandLine", ")", "{", "for", "(", "CustomCommandLine", "<", "?", ">", "cli", ":", "customCommandLines", ")", "{", "if", "(", "cli", ".", "isActive", "(", "comman...
Gets the custom command-line for the arguments. @param commandLine The input to the command-line. @return custom command-line which is active (may only be one at a time)
[ "Gets", "the", "custom", "command", "-", "line", "for", "the", "arguments", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L1143-L1150
123,239
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.loadCustomCommandLine
private static CustomCommandLine<?> loadCustomCommandLine(String className, Object... params) throws IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, NoSuchMethodException { Class<? extends CustomCommandLine> customCliClass = Class.forName(className).asSubclass(Cu...
java
private static CustomCommandLine<?> loadCustomCommandLine(String className, Object... params) throws IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, NoSuchMethodException { Class<? extends CustomCommandLine> customCliClass = Class.forName(className).asSubclass(Cu...
[ "private", "static", "CustomCommandLine", "<", "?", ">", "loadCustomCommandLine", "(", "String", "className", ",", "Object", "...", "params", ")", "throws", "IllegalAccessException", ",", "InvocationTargetException", ",", "InstantiationException", ",", "ClassNotFoundExcep...
Loads a class from the classpath that implements the CustomCommandLine interface. @param className The fully-qualified class name to load. @param params The constructor parameters
[ "Loads", "a", "class", "from", "the", "classpath", "that", "implements", "the", "CustomCommandLine", "interface", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L1157-L1172
123,240
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/operators/SingleInputUdfOperator.java
SingleInputUdfOperator.withForwardedFields
public O withForwardedFields(String... forwardedFields) { if (this.udfSemantics == null) { // extract semantic properties from function annotations setSemanticProperties(extractSemanticAnnotations(getFunction().getClass())); } if (this.udfSemantics == null || this.analyzedUdfSemantics) { // discard an...
java
public O withForwardedFields(String... forwardedFields) { if (this.udfSemantics == null) { // extract semantic properties from function annotations setSemanticProperties(extractSemanticAnnotations(getFunction().getClass())); } if (this.udfSemantics == null || this.analyzedUdfSemantics) { // discard an...
[ "public", "O", "withForwardedFields", "(", "String", "...", "forwardedFields", ")", "{", "if", "(", "this", ".", "udfSemantics", "==", "null", ")", "{", "// extract semantic properties from function annotations", "setSemanticProperties", "(", "extractSemanticAnnotations", ...
Adds semantic information about forwarded fields of the user-defined function. The forwarded fields information declares fields which are never modified by the function and which are forwarded at the same position to the output or unchanged copied to another position in the output. <p>Fields that are forwarded at the ...
[ "Adds", "semantic", "information", "about", "forwarded", "fields", "of", "the", "user", "-", "defined", "function", ".", "The", "forwarded", "fields", "information", "declares", "fields", "which", "are", "never", "modified", "by", "the", "function", "and", "whic...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/SingleInputUdfOperator.java#L149-L174
123,241
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/JobVertexBackPressureHandler.java
JobVertexBackPressureHandler.getBackPressureLevel
private static JobVertexBackPressureInfo.VertexBackPressureLevel getBackPressureLevel(double backPressureRatio) { if (backPressureRatio <= 0.10) { return JobVertexBackPressureInfo.VertexBackPressureLevel.OK; } else if (backPressureRatio <= 0.5) { return JobVertexBackPressureInfo.VertexBackPressureLevel.LOW; ...
java
private static JobVertexBackPressureInfo.VertexBackPressureLevel getBackPressureLevel(double backPressureRatio) { if (backPressureRatio <= 0.10) { return JobVertexBackPressureInfo.VertexBackPressureLevel.OK; } else if (backPressureRatio <= 0.5) { return JobVertexBackPressureInfo.VertexBackPressureLevel.LOW; ...
[ "private", "static", "JobVertexBackPressureInfo", ".", "VertexBackPressureLevel", "getBackPressureLevel", "(", "double", "backPressureRatio", ")", "{", "if", "(", "backPressureRatio", "<=", "0.10", ")", "{", "return", "JobVertexBackPressureInfo", ".", "VertexBackPressureLev...
Returns the back pressure level as a String. @param backPressureRatio Ratio of back pressures samples to total number of samples. @return Back pressure level ('ok', 'low', or 'high')
[ "Returns", "the", "back", "pressure", "level", "as", "a", "String", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/JobVertexBackPressureHandler.java#L96-L104
123,242
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/RowTypeInfo.java
RowTypeInfo.schemaEquals
public boolean schemaEquals(Object obj) { return equals(obj) && Arrays.equals(fieldNames, ((RowTypeInfo) obj).fieldNames); }
java
public boolean schemaEquals(Object obj) { return equals(obj) && Arrays.equals(fieldNames, ((RowTypeInfo) obj).fieldNames); }
[ "public", "boolean", "schemaEquals", "(", "Object", "obj", ")", "{", "return", "equals", "(", "obj", ")", "&&", "Arrays", ".", "equals", "(", "fieldNames", ",", "(", "(", "RowTypeInfo", ")", "obj", ")", ".", "fieldNames", ")", ";", "}" ]
Tests whether an other object describes the same, schema-equivalent row information.
[ "Tests", "whether", "an", "other", "object", "describes", "the", "same", "schema", "-", "equivalent", "row", "information", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/RowTypeInfo.java#L295-L297
123,243
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FileStateHandle.java
FileStateHandle.discardState
@Override public void discardState() throws Exception { FileSystem fs = getFileSystem(); fs.delete(filePath, false); }
java
@Override public void discardState() throws Exception { FileSystem fs = getFileSystem(); fs.delete(filePath, false); }
[ "@", "Override", "public", "void", "discardState", "(", ")", "throws", "Exception", "{", "FileSystem", "fs", "=", "getFileSystem", "(", ")", ";", "fs", ".", "delete", "(", "filePath", ",", "false", ")", ";", "}" ]
Discard the state by deleting the file that stores the state. If the parent directory of the state is empty after deleting the state file, it is also deleted. @throws Exception Thrown, if the file deletion (not the directory deletion) fails.
[ "Discard", "the", "state", "by", "deleting", "the", "file", "that", "stores", "the", "state", ".", "If", "the", "parent", "directory", "of", "the", "state", "is", "empty", "after", "deleting", "the", "state", "file", "it", "is", "also", "deleted", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FileStateHandle.java#L77-L81
123,244
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/pregel/ComputeFunction.java
ComputeFunction.setNewVertexValue
public final void setNewVertexValue(VV newValue) { if (setNewVertexValueCalled) { throw new IllegalStateException("setNewVertexValue should only be called at most once per updateVertex"); } setNewVertexValueCalled = true; outVertex.f1 = newValue; out.collect(Either.Left(outVertex)); }
java
public final void setNewVertexValue(VV newValue) { if (setNewVertexValueCalled) { throw new IllegalStateException("setNewVertexValue should only be called at most once per updateVertex"); } setNewVertexValueCalled = true; outVertex.f1 = newValue; out.collect(Either.Left(outVertex)); }
[ "public", "final", "void", "setNewVertexValue", "(", "VV", "newValue", ")", "{", "if", "(", "setNewVertexValueCalled", ")", "{", "throw", "new", "IllegalStateException", "(", "\"setNewVertexValue should only be called at most once per updateVertex\"", ")", ";", "}", "setN...
Sets the new value of this vertex. <p>This should be called at most once per ComputeFunction. @param newValue The new vertex value.
[ "Sets", "the", "new", "value", "of", "this", "vertex", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/pregel/ComputeFunction.java#L130-L139
123,245
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/spargel/GatherFunction.java
GatherFunction.setNewVertexValue
public void setNewVertexValue(VV newValue) { if (setNewVertexValueCalled) { throw new IllegalStateException("setNewVertexValue should only be called at most once per updateVertex"); } setNewVertexValueCalled = true; if (isOptDegrees()) { outValWithDegrees.f1.f0 = newValue; outWithDegrees.collect(outVal...
java
public void setNewVertexValue(VV newValue) { if (setNewVertexValueCalled) { throw new IllegalStateException("setNewVertexValue should only be called at most once per updateVertex"); } setNewVertexValueCalled = true; if (isOptDegrees()) { outValWithDegrees.f1.f0 = newValue; outWithDegrees.collect(outVal...
[ "public", "void", "setNewVertexValue", "(", "VV", "newValue", ")", "{", "if", "(", "setNewVertexValueCalled", ")", "{", "throw", "new", "IllegalStateException", "(", "\"setNewVertexValue should only be called at most once per updateVertex\"", ")", ";", "}", "setNewVertexVal...
Sets the new value of this vertex. Setting a new value triggers the sending of outgoing messages from this vertex. <p>This should be called at most once per updateVertex. @param newValue The new vertex value.
[ "Sets", "the", "new", "value", "of", "this", "vertex", ".", "Setting", "a", "new", "value", "triggers", "the", "sending", "of", "outgoing", "messages", "from", "this", "vertex", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/spargel/GatherFunction.java#L113-L125
123,246
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/AbstractFileStateBackend.java
AbstractFileStateBackend.validatePath
private static Path validatePath(Path path) { final URI uri = path.toUri(); final String scheme = uri.getScheme(); final String pathPart = uri.getPath(); // some validity checks if (scheme == null) { throw new IllegalArgumentException("The scheme (hdfs://, file://, etc) is null. " + "Please specify t...
java
private static Path validatePath(Path path) { final URI uri = path.toUri(); final String scheme = uri.getScheme(); final String pathPart = uri.getPath(); // some validity checks if (scheme == null) { throw new IllegalArgumentException("The scheme (hdfs://, file://, etc) is null. " + "Please specify t...
[ "private", "static", "Path", "validatePath", "(", "Path", "path", ")", "{", "final", "URI", "uri", "=", "path", ".", "toUri", "(", ")", ";", "final", "String", "scheme", "=", "uri", ".", "getScheme", "(", ")", ";", "final", "String", "pathPart", "=", ...
Checks the validity of the path's scheme and path. @param path The path to check. @return The URI as a Path. @throws IllegalArgumentException Thrown, if the URI misses scheme or path.
[ "Checks", "the", "validity", "of", "the", "path", "s", "scheme", "and", "path", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/AbstractFileStateBackend.java#L180-L199
123,247
apache/flink
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateDownloader.java
RocksDBStateDownloader.transferAllStateDataToDirectory
public void transferAllStateDataToDirectory( IncrementalRemoteKeyedStateHandle restoreStateHandle, Path dest, CloseableRegistry closeableRegistry) throws Exception { final Map<StateHandleID, StreamStateHandle> sstFiles = restoreStateHandle.getSharedState(); final Map<StateHandleID, StreamStateHandle> misc...
java
public void transferAllStateDataToDirectory( IncrementalRemoteKeyedStateHandle restoreStateHandle, Path dest, CloseableRegistry closeableRegistry) throws Exception { final Map<StateHandleID, StreamStateHandle> sstFiles = restoreStateHandle.getSharedState(); final Map<StateHandleID, StreamStateHandle> misc...
[ "public", "void", "transferAllStateDataToDirectory", "(", "IncrementalRemoteKeyedStateHandle", "restoreStateHandle", ",", "Path", "dest", ",", "CloseableRegistry", "closeableRegistry", ")", "throws", "Exception", "{", "final", "Map", "<", "StateHandleID", ",", "StreamStateH...
Transfer all state data to the target directory using specified number of threads. @param restoreStateHandle Handles used to retrieve the state data. @param dest The target directory which the state data will be stored. @throws Exception Thrown if can not transfer all the state data.
[ "Transfer", "all", "state", "data", "to", "the", "target", "directory", "using", "specified", "number", "of", "threads", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateDownloader.java#L56-L68
123,248
apache/flink
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateDownloader.java
RocksDBStateDownloader.downloadDataForStateHandle
private void downloadDataForStateHandle( Path restoreFilePath, StreamStateHandle remoteFileHandle, CloseableRegistry closeableRegistry) throws IOException { FSDataInputStream inputStream = null; FSDataOutputStream outputStream = null; try { FileSystem restoreFileSystem = restoreFilePath.getFileSystem()...
java
private void downloadDataForStateHandle( Path restoreFilePath, StreamStateHandle remoteFileHandle, CloseableRegistry closeableRegistry) throws IOException { FSDataInputStream inputStream = null; FSDataOutputStream outputStream = null; try { FileSystem restoreFileSystem = restoreFilePath.getFileSystem()...
[ "private", "void", "downloadDataForStateHandle", "(", "Path", "restoreFilePath", ",", "StreamStateHandle", "remoteFileHandle", ",", "CloseableRegistry", "closeableRegistry", ")", "throws", "IOException", "{", "FSDataInputStream", "inputStream", "=", "null", ";", "FSDataOutp...
Copies the file from a single state handle to the given path.
[ "Copies", "the", "file", "from", "a", "single", "state", "handle", "to", "the", "given", "path", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateDownloader.java#L117-L151
123,249
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/FromElementsFunction.java
FromElementsFunction.checkCollection
public static <OUT> void checkCollection(Collection<OUT> elements, Class<OUT> viewedAs) { for (OUT elem : elements) { if (elem == null) { throw new IllegalArgumentException("The collection contains a null element"); } if (!viewedAs.isAssignableFrom(elem.getClass())) { throw new IllegalArgumentExcept...
java
public static <OUT> void checkCollection(Collection<OUT> elements, Class<OUT> viewedAs) { for (OUT elem : elements) { if (elem == null) { throw new IllegalArgumentException("The collection contains a null element"); } if (!viewedAs.isAssignableFrom(elem.getClass())) { throw new IllegalArgumentExcept...
[ "public", "static", "<", "OUT", ">", "void", "checkCollection", "(", "Collection", "<", "OUT", ">", "elements", ",", "Class", "<", "OUT", ">", "viewedAs", ")", "{", "for", "(", "OUT", "elem", ":", "elements", ")", "{", "if", "(", "elem", "==", "null"...
Verifies that all elements in the collection are non-null, and are of the given class, or a subclass thereof. @param elements The collection to check. @param viewedAs The class to which the elements must be assignable to. @param <OUT> The generic type of the collection to be checked.
[ "Verifies", "that", "all", "elements", "in", "the", "collection", "are", "non", "-", "null", "and", "are", "of", "the", "given", "class", "or", "a", "subclass", "thereof", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/FromElementsFunction.java#L220-L231
123,250
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/window/internal/MergingWindowSet.java
MergingWindowSet.initializeCache
public void initializeCache(Object key) throws Exception { this.sortedWindows = cachedSortedWindows.get(key); if (sortedWindows == null) { this.sortedWindows = new TreeSet<>(); Iterator<Map.Entry<W, W>> keyValues = mapping.iterator(); if (keyValues != null) { while (keyValues.hasNext()) { Map.Entr...
java
public void initializeCache(Object key) throws Exception { this.sortedWindows = cachedSortedWindows.get(key); if (sortedWindows == null) { this.sortedWindows = new TreeSet<>(); Iterator<Map.Entry<W, W>> keyValues = mapping.iterator(); if (keyValues != null) { while (keyValues.hasNext()) { Map.Entr...
[ "public", "void", "initializeCache", "(", "Object", "key", ")", "throws", "Exception", "{", "this", ".", "sortedWindows", "=", "cachedSortedWindows", ".", "get", "(", "key", ")", ";", "if", "(", "sortedWindows", "==", "null", ")", "{", "this", ".", "sorted...
Set current key context of this window set. <p>Notes: {@code initializeCache(Object)} must be called before {@link #addWindow(Window, MergeFunction)} and {@link #retireWindow(Window)} @param key the current access key
[ "Set", "current", "key", "context", "of", "this", "window", "set", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/window/internal/MergingWindowSet.java#L95-L108
123,251
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/MessageParameters.java
MessageParameters.isResolved
public final boolean isResolved() { return getPathParameters().stream().filter(MessageParameter::isMandatory).allMatch(MessageParameter::isResolved) && getQueryParameters().stream().filter(MessageParameter::isMandatory).allMatch(MessageParameter::isResolved); }
java
public final boolean isResolved() { return getPathParameters().stream().filter(MessageParameter::isMandatory).allMatch(MessageParameter::isResolved) && getQueryParameters().stream().filter(MessageParameter::isMandatory).allMatch(MessageParameter::isResolved); }
[ "public", "final", "boolean", "isResolved", "(", ")", "{", "return", "getPathParameters", "(", ")", ".", "stream", "(", ")", ".", "filter", "(", "MessageParameter", "::", "isMandatory", ")", ".", "allMatch", "(", "MessageParameter", "::", "isResolved", ")", ...
Returns whether all mandatory parameters have been resolved. @return true, if all mandatory parameters have been resolved, false otherwise
[ "Returns", "whether", "all", "mandatory", "parameters", "have", "been", "resolved", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/MessageParameters.java#L51-L54
123,252
apache/flink
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/GenericHiveMetastoreCatalogUtil.java
GenericHiveMetastoreCatalogUtil.createHiveDatabase
public static Database createHiveDatabase(String dbName, CatalogDatabase db) { Map<String, String> props = db.getProperties(); return new Database( dbName, db.getDescription().isPresent() ? db.getDescription().get() : null, null, props); }
java
public static Database createHiveDatabase(String dbName, CatalogDatabase db) { Map<String, String> props = db.getProperties(); return new Database( dbName, db.getDescription().isPresent() ? db.getDescription().get() : null, null, props); }
[ "public", "static", "Database", "createHiveDatabase", "(", "String", "dbName", ",", "CatalogDatabase", "db", ")", "{", "Map", "<", "String", ",", "String", ">", "props", "=", "db", ".", "getProperties", "(", ")", ";", "return", "new", "Database", "(", "dbN...
Creates a Hive database from CatalogDatabase.
[ "Creates", "a", "Hive", "database", "from", "CatalogDatabase", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/GenericHiveMetastoreCatalogUtil.java#L41-L48
123,253
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ExpandColumnFunctionsRule.java
ExpandColumnFunctionsRule.indexOfName
private static int indexOfName(List<UnresolvedReferenceExpression> inputFieldReferences, String targetName) { int i; for (i = 0; i < inputFieldReferences.size(); ++i) { if (inputFieldReferences.get(i).getName().equals(targetName)) { break; } } return i == inputFieldReferences.size() ? -1 : i; }
java
private static int indexOfName(List<UnresolvedReferenceExpression> inputFieldReferences, String targetName) { int i; for (i = 0; i < inputFieldReferences.size(); ++i) { if (inputFieldReferences.get(i).getName().equals(targetName)) { break; } } return i == inputFieldReferences.size() ? -1 : i; }
[ "private", "static", "int", "indexOfName", "(", "List", "<", "UnresolvedReferenceExpression", ">", "inputFieldReferences", ",", "String", "targetName", ")", "{", "int", "i", ";", "for", "(", "i", "=", "0", ";", "i", "<", "inputFieldReferences", ".", "size", ...
Find the index of targetName in the list. Return -1 if not found.
[ "Find", "the", "index", "of", "targetName", "in", "the", "list", ".", "Return", "-", "1", "if", "not", "found", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ExpandColumnFunctionsRule.java#L226-L234
123,254
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlLikeChainChecker.java
SqlLikeChainChecker.checkBegin
private static boolean checkBegin( BinaryString pattern, MemorySegment[] segments, int start, int len) { int lenSub = pattern.getSizeInBytes(); return len >= lenSub && SegmentsUtil.equals(pattern.getSegments(), 0, segments, start, lenSub); }
java
private static boolean checkBegin( BinaryString pattern, MemorySegment[] segments, int start, int len) { int lenSub = pattern.getSizeInBytes(); return len >= lenSub && SegmentsUtil.equals(pattern.getSegments(), 0, segments, start, lenSub); }
[ "private", "static", "boolean", "checkBegin", "(", "BinaryString", "pattern", ",", "MemorySegment", "[", "]", "segments", ",", "int", "start", ",", "int", "len", ")", "{", "int", "lenSub", "=", "pattern", ".", "getSizeInBytes", "(", ")", ";", "return", "le...
Matches the beginning of each string to a pattern.
[ "Matches", "the", "beginning", "of", "each", "string", "to", "a", "pattern", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlLikeChainChecker.java#L140-L145
123,255
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlLikeChainChecker.java
SqlLikeChainChecker.indexMiddle
private static int indexMiddle( BinaryString pattern, MemorySegment[] segments, int start, int len) { return SegmentsUtil.find( segments, start, len, pattern.getSegments(), pattern.getOffset(), pattern.getSizeInBytes()); }
java
private static int indexMiddle( BinaryString pattern, MemorySegment[] segments, int start, int len) { return SegmentsUtil.find( segments, start, len, pattern.getSegments(), pattern.getOffset(), pattern.getSizeInBytes()); }
[ "private", "static", "int", "indexMiddle", "(", "BinaryString", "pattern", ",", "MemorySegment", "[", "]", "segments", ",", "int", "start", ",", "int", "len", ")", "{", "return", "SegmentsUtil", ".", "find", "(", "segments", ",", "start", ",", "len", ",", ...
Matches the middle of each string to its pattern. @return Returns absolute offset of the match.
[ "Matches", "the", "middle", "of", "each", "string", "to", "its", "pattern", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlLikeChainChecker.java#L161-L166
123,256
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rpc/RpcEndpoint.java
RpcEndpoint.getSelfGateway
public <C extends RpcGateway> C getSelfGateway(Class<C> selfGatewayType) { if (selfGatewayType.isInstance(rpcServer)) { @SuppressWarnings("unchecked") C selfGateway = ((C) rpcServer); return selfGateway; } else { throw new RuntimeException("RpcEndpoint does not implement the RpcGateway interface of typ...
java
public <C extends RpcGateway> C getSelfGateway(Class<C> selfGatewayType) { if (selfGatewayType.isInstance(rpcServer)) { @SuppressWarnings("unchecked") C selfGateway = ((C) rpcServer); return selfGateway; } else { throw new RuntimeException("RpcEndpoint does not implement the RpcGateway interface of typ...
[ "public", "<", "C", "extends", "RpcGateway", ">", "C", "getSelfGateway", "(", "Class", "<", "C", ">", "selfGatewayType", ")", "{", "if", "(", "selfGatewayType", ".", "isInstance", "(", "rpcServer", ")", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\""...
Returns a self gateway of the specified type which can be used to issue asynchronous calls against the RpcEndpoint. <p>IMPORTANT: The self gateway type must be implemented by the RpcEndpoint. Otherwise the method will fail. @param selfGatewayType class of the self gateway type @param <C> type of the self gateway to c...
[ "Returns", "a", "self", "gateway", "of", "the", "specified", "type", "which", "can", "be", "used", "to", "issue", "asynchronous", "calls", "against", "the", "RpcEndpoint", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/RpcEndpoint.java#L192-L201
123,257
apache/flink
flink-core/src/main/java/org/apache/flink/core/fs/FileSystemSafetyNet.java
FileSystemSafetyNet.closeSafetyNetAndGuardedResourcesForThread
@Internal public static void closeSafetyNetAndGuardedResourcesForThread() { SafetyNetCloseableRegistry registry = REGISTRIES.get(); if (null != registry) { REGISTRIES.remove(); IOUtils.closeQuietly(registry); } }
java
@Internal public static void closeSafetyNetAndGuardedResourcesForThread() { SafetyNetCloseableRegistry registry = REGISTRIES.get(); if (null != registry) { REGISTRIES.remove(); IOUtils.closeQuietly(registry); } }
[ "@", "Internal", "public", "static", "void", "closeSafetyNetAndGuardedResourcesForThread", "(", ")", "{", "SafetyNetCloseableRegistry", "registry", "=", "REGISTRIES", ".", "get", "(", ")", ";", "if", "(", "null", "!=", "registry", ")", "{", "REGISTRIES", ".", "r...
Closes the safety net for a thread. This closes all remaining unclosed streams that were opened by safety-net-guarded file systems. After this method was called, no streams can be opened any more from any FileSystem instance that was obtained while the thread was guarded by the safety net. <p>This method should be cal...
[ "Closes", "the", "safety", "net", "for", "a", "thread", ".", "This", "closes", "all", "remaining", "unclosed", "streams", "that", "were", "opened", "by", "safety", "-", "net", "-", "guarded", "file", "systems", ".", "After", "this", "method", "was", "calle...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/fs/FileSystemSafetyNet.java#L100-L107
123,258
apache/flink
flink-optimizer/src/main/java/org/apache/flink/optimizer/costs/Costs.java
Costs.addHeuristicNetworkCost
public void addHeuristicNetworkCost(double cost) { if (cost <= 0) { throw new IllegalArgumentException("Heuristic costs must be positive."); } this.heuristicNetworkCost += cost; // check for overflow if (this.heuristicNetworkCost < 0) { this.heuristicNetworkCost = Double.MAX_VALUE; } }
java
public void addHeuristicNetworkCost(double cost) { if (cost <= 0) { throw new IllegalArgumentException("Heuristic costs must be positive."); } this.heuristicNetworkCost += cost; // check for overflow if (this.heuristicNetworkCost < 0) { this.heuristicNetworkCost = Double.MAX_VALUE; } }
[ "public", "void", "addHeuristicNetworkCost", "(", "double", "cost", ")", "{", "if", "(", "cost", "<=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Heuristic costs must be positive.\"", ")", ";", "}", "this", ".", "heuristicNetworkCost", "+="...
Adds the heuristic costs for network to the current heuristic network costs for this Costs object. @param cost The heuristic network cost to add.
[ "Adds", "the", "heuristic", "costs", "for", "network", "to", "the", "current", "heuristic", "network", "costs", "for", "this", "Costs", "object", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/costs/Costs.java#L217-L226
123,259
apache/flink
flink-optimizer/src/main/java/org/apache/flink/optimizer/costs/Costs.java
Costs.addHeuristicDiskCost
public void addHeuristicDiskCost(double cost) { if (cost <= 0) { throw new IllegalArgumentException("Heuristic costs must be positive."); } this.heuristicDiskCost += cost; // check for overflow if (this.heuristicDiskCost < 0) { this.heuristicDiskCost = Double.MAX_VALUE; } }
java
public void addHeuristicDiskCost(double cost) { if (cost <= 0) { throw new IllegalArgumentException("Heuristic costs must be positive."); } this.heuristicDiskCost += cost; // check for overflow if (this.heuristicDiskCost < 0) { this.heuristicDiskCost = Double.MAX_VALUE; } }
[ "public", "void", "addHeuristicDiskCost", "(", "double", "cost", ")", "{", "if", "(", "cost", "<=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Heuristic costs must be positive.\"", ")", ";", "}", "this", ".", "heuristicDiskCost", "+=", "c...
Adds the heuristic costs for disk to the current heuristic disk costs for this Costs object. @param cost The heuristic disk cost to add.
[ "Adds", "the", "heuristic", "costs", "for", "disk", "to", "the", "current", "heuristic", "disk", "costs", "for", "this", "Costs", "object", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/costs/Costs.java#L255-L264
123,260
apache/flink
flink-optimizer/src/main/java/org/apache/flink/optimizer/costs/Costs.java
Costs.addHeuristicCpuCost
public void addHeuristicCpuCost(double cost) { if (cost <= 0) { throw new IllegalArgumentException("Heuristic costs must be positive."); } this.heuristicCpuCost += cost; // check for overflow if (this.heuristicCpuCost < 0) { this.heuristicCpuCost = Double.MAX_VALUE; } }
java
public void addHeuristicCpuCost(double cost) { if (cost <= 0) { throw new IllegalArgumentException("Heuristic costs must be positive."); } this.heuristicCpuCost += cost; // check for overflow if (this.heuristicCpuCost < 0) { this.heuristicCpuCost = Double.MAX_VALUE; } }
[ "public", "void", "addHeuristicCpuCost", "(", "double", "cost", ")", "{", "if", "(", "cost", "<=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Heuristic costs must be positive.\"", ")", ";", "}", "this", ".", "heuristicCpuCost", "+=", "cos...
Adds the given heuristic CPU cost to the current heuristic CPU cost for this Costs object. @param cost The heuristic CPU cost to add.
[ "Adds", "the", "given", "heuristic", "CPU", "cost", "to", "the", "current", "heuristic", "CPU", "cost", "for", "this", "Costs", "object", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/costs/Costs.java#L292-L301
123,261
apache/flink
flink-optimizer/src/main/java/org/apache/flink/optimizer/costs/Costs.java
Costs.subtractCosts
public void subtractCosts(Costs other) { if (this.networkCost != UNKNOWN && other.networkCost != UNKNOWN) { this.networkCost -= other.networkCost; if (this.networkCost < 0) { throw new IllegalArgumentException("Cannot subtract more cost then there is."); } } if (this.diskCost != UNKNOWN && other.disk...
java
public void subtractCosts(Costs other) { if (this.networkCost != UNKNOWN && other.networkCost != UNKNOWN) { this.networkCost -= other.networkCost; if (this.networkCost < 0) { throw new IllegalArgumentException("Cannot subtract more cost then there is."); } } if (this.diskCost != UNKNOWN && other.disk...
[ "public", "void", "subtractCosts", "(", "Costs", "other", ")", "{", "if", "(", "this", ".", "networkCost", "!=", "UNKNOWN", "&&", "other", ".", "networkCost", "!=", "UNKNOWN", ")", "{", "this", ".", "networkCost", "-=", "other", ".", "networkCost", ";", ...
Subtracts the given costs from these costs. If the given costs are unknown, then these costs are remain unchanged. @param other The costs to subtract.
[ "Subtracts", "the", "given", "costs", "from", "these", "costs", ".", "If", "the", "given", "costs", "are", "unknown", "then", "these", "costs", "are", "remain", "unchanged", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/costs/Costs.java#L343-L377
123,262
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/operators/JoinOperator.java
JoinOperator.withPartitioner
public JoinOperator<I1, I2, OUT> withPartitioner(Partitioner<?> partitioner) { if (partitioner != null) { keys1.validateCustomPartitioner(partitioner, null); keys2.validateCustomPartitioner(partitioner, null); } this.customPartitioner = getInput1().clean(partitioner); return this; }
java
public JoinOperator<I1, I2, OUT> withPartitioner(Partitioner<?> partitioner) { if (partitioner != null) { keys1.validateCustomPartitioner(partitioner, null); keys2.validateCustomPartitioner(partitioner, null); } this.customPartitioner = getInput1().clean(partitioner); return this; }
[ "public", "JoinOperator", "<", "I1", ",", "I2", ",", "OUT", ">", "withPartitioner", "(", "Partitioner", "<", "?", ">", "partitioner", ")", "{", "if", "(", "partitioner", "!=", "null", ")", "{", "keys1", ".", "validateCustomPartitioner", "(", "partitioner", ...
Sets a custom partitioner for this join. The partitioner will be called on the join keys to determine the partition a key should be assigned to. The partitioner is evaluated on both join inputs in the same way. <p>NOTE: A custom partitioner can only be used with single-field join keys, not with composite join keys. @...
[ "Sets", "a", "custom", "partitioner", "for", "this", "join", ".", "The", "partitioner", "will", "be", "called", "on", "the", "join", "keys", "to", "determine", "the", "partition", "a", "key", "should", "be", "assigned", "to", ".", "The", "partitioner", "is...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/JoinOperator.java#L187-L194
123,263
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/aggregate/BytesHashMap.java
BytesHashMap.append
public BinaryRow append(LookupInfo info, BinaryRow value) throws IOException { try { if (numElements >= growthThreshold) { growAndRehash(); //update info's bucketSegmentIndex and bucketOffset lookup(info.key); } BinaryRow toAppend = hashSetMode ? reusedValue : value; long pointerToAppended = r...
java
public BinaryRow append(LookupInfo info, BinaryRow value) throws IOException { try { if (numElements >= growthThreshold) { growAndRehash(); //update info's bucketSegmentIndex and bucketOffset lookup(info.key); } BinaryRow toAppend = hashSetMode ? reusedValue : value; long pointerToAppended = r...
[ "public", "BinaryRow", "append", "(", "LookupInfo", "info", ",", "BinaryRow", "value", ")", "throws", "IOException", "{", "try", "{", "if", "(", "numElements", ">=", "growthThreshold", ")", "{", "growAndRehash", "(", ")", ";", "//update info's bucketSegmentIndex a...
Append an value into the hash map's record area. @return An BinaryRow mapping to the memory segments in the map's record area belonging to the newly appended value. @throws EOFException if the map can't allocate much more memory.
[ "Append", "an", "value", "into", "the", "hash", "map", "s", "record", "area", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/aggregate/BytesHashMap.java#L315-L337
123,264
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/aggregate/BytesHashMap.java
BytesHashMap.reset
public void reset() { int numBuckets = bucketSegments.size() * numBucketsPerSegment; this.log2NumBuckets = MathUtils.log2strict(numBuckets); this.numBucketsMask = (1 << MathUtils.log2strict(numBuckets)) - 1; this.numBucketsMask2 = (1 << MathUtils.log2strict(numBuckets >> 1)) - 1; this.growthThreshold = (int) ...
java
public void reset() { int numBuckets = bucketSegments.size() * numBucketsPerSegment; this.log2NumBuckets = MathUtils.log2strict(numBuckets); this.numBucketsMask = (1 << MathUtils.log2strict(numBuckets)) - 1; this.numBucketsMask2 = (1 << MathUtils.log2strict(numBuckets >> 1)) - 1; this.growthThreshold = (int) ...
[ "public", "void", "reset", "(", ")", "{", "int", "numBuckets", "=", "bucketSegments", ".", "size", "(", ")", "*", "numBucketsPerSegment", ";", "this", ".", "log2NumBuckets", "=", "MathUtils", ".", "log2strict", "(", "numBuckets", ")", ";", "this", ".", "nu...
reset the map's record and bucket area's memory segments for reusing.
[ "reset", "the", "map", "s", "record", "and", "bucket", "area", "s", "memory", "segments", "for", "reusing", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/aggregate/BytesHashMap.java#L494-L507
123,265
apache/flink
flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java
Utils.calculateHeapSize
public static int calculateHeapSize(int memory, org.apache.flink.configuration.Configuration conf) { float memoryCutoffRatio = conf.getFloat(ResourceManagerOptions.CONTAINERIZED_HEAP_CUTOFF_RATIO); int minCutoff = conf.getInteger(ResourceManagerOptions.CONTAINERIZED_HEAP_CUTOFF_MIN); if (memoryCutoffRatio > 1 |...
java
public static int calculateHeapSize(int memory, org.apache.flink.configuration.Configuration conf) { float memoryCutoffRatio = conf.getFloat(ResourceManagerOptions.CONTAINERIZED_HEAP_CUTOFF_RATIO); int minCutoff = conf.getInteger(ResourceManagerOptions.CONTAINERIZED_HEAP_CUTOFF_MIN); if (memoryCutoffRatio > 1 |...
[ "public", "static", "int", "calculateHeapSize", "(", "int", "memory", ",", "org", ".", "apache", ".", "flink", ".", "configuration", ".", "Configuration", "conf", ")", "{", "float", "memoryCutoffRatio", "=", "conf", ".", "getFloat", "(", "ResourceManagerOptions"...
See documentation.
[ "See", "documentation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java#L86-L107
123,266
apache/flink
flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java
Utils.setupLocalResource
static Tuple2<Path, LocalResource> setupLocalResource( FileSystem fs, String appId, Path localSrcPath, Path homedir, String relativeTargetPath) throws IOException { File localFile = new File(localSrcPath.toUri().getPath()); if (localFile.isDirectory()) { throw new IllegalArgumentException("File to cop...
java
static Tuple2<Path, LocalResource> setupLocalResource( FileSystem fs, String appId, Path localSrcPath, Path homedir, String relativeTargetPath) throws IOException { File localFile = new File(localSrcPath.toUri().getPath()); if (localFile.isDirectory()) { throw new IllegalArgumentException("File to cop...
[ "static", "Tuple2", "<", "Path", ",", "LocalResource", ">", "setupLocalResource", "(", "FileSystem", "fs", ",", "String", "appId", ",", "Path", "localSrcPath", ",", "Path", "homedir", ",", "String", "relativeTargetPath", ")", "throws", "IOException", "{", "File"...
Copy a local file to a remote file system. @param fs remote filesystem @param appId application ID @param localSrcPath path to the local file @param homedir remote home directory base (will be extended) @param relativeTargetPath relative target path of the file (will be prefixed be the full home directory we set up) ...
[ "Copy", "a", "local", "file", "to", "a", "remote", "file", "system", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java#L138-L174
123,267
apache/flink
flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java
Utils.registerLocalResource
private static LocalResource registerLocalResource( Path remoteRsrcPath, long resourceSize, long resourceModificationTime) { LocalResource localResource = Records.newRecord(LocalResource.class); localResource.setResource(ConverterUtils.getYarnUrlFromURI(remoteRsrcPath.toUri())); localResource.setSize(res...
java
private static LocalResource registerLocalResource( Path remoteRsrcPath, long resourceSize, long resourceModificationTime) { LocalResource localResource = Records.newRecord(LocalResource.class); localResource.setResource(ConverterUtils.getYarnUrlFromURI(remoteRsrcPath.toUri())); localResource.setSize(res...
[ "private", "static", "LocalResource", "registerLocalResource", "(", "Path", "remoteRsrcPath", ",", "long", "resourceSize", ",", "long", "resourceModificationTime", ")", "{", "LocalResource", "localResource", "=", "Records", ".", "newRecord", "(", "LocalResource", ".", ...
Creates a YARN resource for the remote object at the given location. @param remoteRsrcPath remote location of the resource @param resourceSize size of the resource @param resourceModificationTime last modification time of the resource @return YARN resource
[ "Creates", "a", "YARN", "resource", "for", "the", "remote", "object", "at", "the", "given", "location", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java#L208-L219
123,268
apache/flink
flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java
Utils.obtainTokenForHBase
private static void obtainTokenForHBase(Credentials credentials, Configuration conf) throws IOException { if (UserGroupInformation.isSecurityEnabled()) { LOG.info("Attempting to obtain Kerberos security token for HBase"); try { // ---- // Intended call: HBaseConfiguration.addHbaseResources(conf); Cl...
java
private static void obtainTokenForHBase(Credentials credentials, Configuration conf) throws IOException { if (UserGroupInformation.isSecurityEnabled()) { LOG.info("Attempting to obtain Kerberos security token for HBase"); try { // ---- // Intended call: HBaseConfiguration.addHbaseResources(conf); Cl...
[ "private", "static", "void", "obtainTokenForHBase", "(", "Credentials", "credentials", ",", "Configuration", "conf", ")", "throws", "IOException", "{", "if", "(", "UserGroupInformation", ".", "isSecurityEnabled", "(", ")", ")", "{", "LOG", ".", "info", "(", "\"A...
Obtain Kerberos security token for HBase.
[ "Obtain", "Kerberos", "security", "token", "for", "HBase", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java#L262-L305
123,269
apache/flink
flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java
Utils.getEnvironmentVariables
public static Map<String, String> getEnvironmentVariables(String envPrefix, org.apache.flink.configuration.Configuration flinkConfiguration) { Map<String, String> result = new HashMap<>(); for (Map.Entry<String, String> entry: flinkConfiguration.toMap().entrySet()) { if (entry.getKey().startsWith(envPrefix) && ...
java
public static Map<String, String> getEnvironmentVariables(String envPrefix, org.apache.flink.configuration.Configuration flinkConfiguration) { Map<String, String> result = new HashMap<>(); for (Map.Entry<String, String> entry: flinkConfiguration.toMap().entrySet()) { if (entry.getKey().startsWith(envPrefix) && ...
[ "public", "static", "Map", "<", "String", ",", "String", ">", "getEnvironmentVariables", "(", "String", "envPrefix", ",", "org", ".", "apache", ".", "flink", ".", "configuration", ".", "Configuration", "flinkConfiguration", ")", "{", "Map", "<", "String", ",",...
Method to extract environment variables from the flinkConfiguration based on the given prefix String. @param envPrefix Prefix for the environment variables key @param flinkConfiguration The Flink config to get the environment variable defintion from
[ "Method", "to", "extract", "environment", "variables", "from", "the", "flinkConfiguration", "based", "on", "the", "given", "prefix", "String", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java#L337-L347
123,270
apache/flink
flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java
Utils.require
static void require(boolean condition, String message, Object... values) { if (!condition) { throw new RuntimeException(String.format(message, values)); } }
java
static void require(boolean condition, String message, Object... values) { if (!condition) { throw new RuntimeException(String.format(message, values)); } }
[ "static", "void", "require", "(", "boolean", "condition", ",", "String", "message", ",", "Object", "...", "values", ")", "{", "if", "(", "!", "condition", ")", "{", "throw", "new", "RuntimeException", "(", "String", ".", "format", "(", "message", ",", "v...
Validates a condition, throwing a RuntimeException if the condition is violated. @param condition The condition. @param message The message for the runtime exception, with format variables as defined by {@link String#format(String, Object...)}. @param values The format arguments.
[ "Validates", "a", "condition", "throwing", "a", "RuntimeException", "if", "the", "condition", "is", "violated", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java#L589-L593
123,271
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/AbstractMetricGroup.java
AbstractMetricGroup.getQueryServiceMetricInfo
public QueryScopeInfo getQueryServiceMetricInfo(CharacterFilter filter) { if (queryServiceScopeInfo == null) { queryServiceScopeInfo = createQueryServiceMetricInfo(filter); } return queryServiceScopeInfo; }
java
public QueryScopeInfo getQueryServiceMetricInfo(CharacterFilter filter) { if (queryServiceScopeInfo == null) { queryServiceScopeInfo = createQueryServiceMetricInfo(filter); } return queryServiceScopeInfo; }
[ "public", "QueryScopeInfo", "getQueryServiceMetricInfo", "(", "CharacterFilter", "filter", ")", "{", "if", "(", "queryServiceScopeInfo", "==", "null", ")", "{", "queryServiceScopeInfo", "=", "createQueryServiceMetricInfo", "(", "filter", ")", ";", "}", "return", "quer...
Returns the metric query service scope for this group. @param filter character filter @return query service scope
[ "Returns", "the", "metric", "query", "service", "scope", "for", "this", "group", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/AbstractMetricGroup.java#L206-L211
123,272
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/AbstractMetricGroup.java
AbstractMetricGroup.addMetric
protected void addMetric(String name, Metric metric) { if (metric == null) { LOG.warn("Ignoring attempted registration of a metric due to being null for name {}.", name); return; } // add the metric only if the group is still open synchronized (this) { if (!closed) { // immediately put without a 'c...
java
protected void addMetric(String name, Metric metric) { if (metric == null) { LOG.warn("Ignoring attempted registration of a metric due to being null for name {}.", name); return; } // add the metric only if the group is still open synchronized (this) { if (!closed) { // immediately put without a 'c...
[ "protected", "void", "addMetric", "(", "String", "name", ",", "Metric", "metric", ")", "{", "if", "(", "metric", "==", "null", ")", "{", "LOG", ".", "warn", "(", "\"Ignoring attempted registration of a metric due to being null for name {}.\"", ",", "name", ")", ";...
Adds the given metric to the group and registers it at the registry, if the group is not yet closed, and if no metric with the same name has been registered before. @param name the name to register the metric under @param metric the metric to register
[ "Adds", "the", "given", "metric", "to", "the", "group", "and", "registers", "it", "at", "the", "registry", "if", "the", "group", "is", "not", "yet", "closed", "and", "if", "no", "metric", "with", "the", "same", "name", "has", "been", "registered", "befor...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/AbstractMetricGroup.java#L373-L409
123,273
apache/flink
flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/expressions/RexNodeConverter.java
RexNodeConverter.valueAsCalendar
private static Calendar valueAsCalendar(Object value) { Date date = (Date) value; Calendar cal = Calendar.getInstance(); cal.setTime(date); return cal; }
java
private static Calendar valueAsCalendar(Object value) { Date date = (Date) value; Calendar cal = Calendar.getInstance(); cal.setTime(date); return cal; }
[ "private", "static", "Calendar", "valueAsCalendar", "(", "Object", "value", ")", "{", "Date", "date", "=", "(", "Date", ")", "value", ";", "Calendar", "cal", "=", "Calendar", ".", "getInstance", "(", ")", ";", "cal", ".", "setTime", "(", "date", ")", "...
Convert a Date value to a Calendar. Calcite's fromCalendarField functions use the Calendar.get methods, so the raw values of the individual fields are preserved when converted to the String formats. @return get the Calendar value
[ "Convert", "a", "Date", "value", "to", "a", "Calendar", ".", "Calcite", "s", "fromCalendarField", "functions", "use", "the", "Calendar", ".", "get", "methods", "so", "the", "raw", "values", "of", "the", "individual", "fields", "are", "preserved", "when", "co...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/expressions/RexNodeConverter.java#L234-L239
123,274
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/expressions/ExpressionUtils.java
ExpressionUtils.isFunctionOfType
public static boolean isFunctionOfType(Expression expr, FunctionDefinition.Type type) { return expr instanceof CallExpression && ((CallExpression) expr).getFunctionDefinition().getType() == type; }
java
public static boolean isFunctionOfType(Expression expr, FunctionDefinition.Type type) { return expr instanceof CallExpression && ((CallExpression) expr).getFunctionDefinition().getType() == type; }
[ "public", "static", "boolean", "isFunctionOfType", "(", "Expression", "expr", ",", "FunctionDefinition", ".", "Type", "type", ")", "{", "return", "expr", "instanceof", "CallExpression", "&&", "(", "(", "CallExpression", ")", "expr", ")", ".", "getFunctionDefinitio...
Checks if the expression is a function call of given type. @param expr expression to check @param type expected type of function @return true if the expression is function call of given type, false otherwise
[ "Checks", "if", "the", "expression", "is", "a", "function", "call", "of", "given", "type", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/expressions/ExpressionUtils.java#L58-L61
123,275
apache/flink
flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/HadoopBlockLocation.java
HadoopBlockLocation.stripHostname
private static String stripHostname(final String originalHostname) { // Check if the hostname domains the domain separator character final int index = originalHostname.indexOf(DOMAIN_SEPARATOR); if (index == -1) { return originalHostname; } // Make sure we are not stripping an IPv4 address final Matche...
java
private static String stripHostname(final String originalHostname) { // Check if the hostname domains the domain separator character final int index = originalHostname.indexOf(DOMAIN_SEPARATOR); if (index == -1) { return originalHostname; } // Make sure we are not stripping an IPv4 address final Matche...
[ "private", "static", "String", "stripHostname", "(", "final", "String", "originalHostname", ")", "{", "// Check if the hostname domains the domain separator character", "final", "int", "index", "=", "originalHostname", ".", "indexOf", "(", "DOMAIN_SEPARATOR", ")", ";", "i...
Looks for a domain suffix in a FQDN and strips it if present. @param originalHostname the original hostname, possibly an FQDN @return the stripped hostname without the domain suffix
[ "Looks", "for", "a", "domain", "suffix", "in", "a", "FQDN", "and", "strips", "it", "if", "present", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/HadoopBlockLocation.java#L93-L112
123,276
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/BarrierBuffer.java
BarrierBuffer.onBarrier
private void onBarrier(int channelIndex) throws IOException { if (!blockedChannels[channelIndex]) { blockedChannels[channelIndex] = true; numBarriersReceived++; if (LOG.isDebugEnabled()) { LOG.debug("{}: Received barrier from channel {}.", inputGate.getOwningTaskName(), channelIndex); } ...
java
private void onBarrier(int channelIndex) throws IOException { if (!blockedChannels[channelIndex]) { blockedChannels[channelIndex] = true; numBarriersReceived++; if (LOG.isDebugEnabled()) { LOG.debug("{}: Received barrier from channel {}.", inputGate.getOwningTaskName(), channelIndex); } ...
[ "private", "void", "onBarrier", "(", "int", "channelIndex", ")", "throws", "IOException", "{", "if", "(", "!", "blockedChannels", "[", "channelIndex", "]", ")", "{", "blockedChannels", "[", "channelIndex", "]", "=", "true", ";", "numBarriersReceived", "++", ";...
Blocks the given channel index, from which a barrier has been received. @param channelIndex The channel index to block.
[ "Blocks", "the", "given", "channel", "index", "from", "which", "a", "barrier", "has", "been", "received", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/BarrierBuffer.java#L482-L497
123,277
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/BarrierBuffer.java
BarrierBuffer.releaseBlocksAndResetBarriers
private void releaseBlocksAndResetBarriers() throws IOException { LOG.debug("{}: End of stream alignment, feeding buffered data back.", inputGate.getOwningTaskName()); for (int i = 0; i < blockedChannels.length; i++) { blockedChannels[i] = false; } if (currentBuffered == null) { // common case: no mo...
java
private void releaseBlocksAndResetBarriers() throws IOException { LOG.debug("{}: End of stream alignment, feeding buffered data back.", inputGate.getOwningTaskName()); for (int i = 0; i < blockedChannels.length; i++) { blockedChannels[i] = false; } if (currentBuffered == null) { // common case: no mo...
[ "private", "void", "releaseBlocksAndResetBarriers", "(", ")", "throws", "IOException", "{", "LOG", ".", "debug", "(", "\"{}: End of stream alignment, feeding buffered data back.\"", ",", "inputGate", ".", "getOwningTaskName", "(", ")", ")", ";", "for", "(", "int", "i"...
Releases the blocks on all channels and resets the barrier count. Makes sure the just written data is the next to be consumed.
[ "Releases", "the", "blocks", "on", "all", "channels", "and", "resets", "the", "barrier", "count", ".", "Makes", "sure", "the", "just", "written", "data", "is", "the", "next", "to", "be", "consumed", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/BarrierBuffer.java#L503-L548
123,278
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/io/FileOutputFormat.java
FileOutputFormat.initDefaultsFromConfiguration
public static void initDefaultsFromConfiguration(Configuration configuration) { final boolean overwrite = configuration.getBoolean(CoreOptions.FILESYTEM_DEFAULT_OVERRIDE); DEFAULT_WRITE_MODE = overwrite ? WriteMode.OVERWRITE : WriteMode.NO_OVERWRITE; final boolean alwaysCreateDirectory = configuration.getBoo...
java
public static void initDefaultsFromConfiguration(Configuration configuration) { final boolean overwrite = configuration.getBoolean(CoreOptions.FILESYTEM_DEFAULT_OVERRIDE); DEFAULT_WRITE_MODE = overwrite ? WriteMode.OVERWRITE : WriteMode.NO_OVERWRITE; final boolean alwaysCreateDirectory = configuration.getBoo...
[ "public", "static", "void", "initDefaultsFromConfiguration", "(", "Configuration", "configuration", ")", "{", "final", "boolean", "overwrite", "=", "configuration", ".", "getBoolean", "(", "CoreOptions", ".", "FILESYTEM_DEFAULT_OVERRIDE", ")", ";", "DEFAULT_WRITE_MODE", ...
Initialize defaults for output format. Needs to be a static method because it is configured for local cluster execution. @param configuration The configuration to load defaults from
[ "Initialize", "defaults", "for", "output", "format", ".", "Needs", "to", "be", "a", "static", "method", "because", "it", "is", "configured", "for", "local", "cluster", "execution", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/io/FileOutputFormat.java#L75-L83
123,279
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/io/FileOutputFormat.java
FileOutputFormat.initializeGlobal
@Override public void initializeGlobal(int parallelism) throws IOException { final Path path = getOutputFilePath(); final FileSystem fs = path.getFileSystem(); // only distributed file systems can be initialized at start-up time. if (fs.isDistributedFS()) { final WriteMode writeMode = getWriteMode();...
java
@Override public void initializeGlobal(int parallelism) throws IOException { final Path path = getOutputFilePath(); final FileSystem fs = path.getFileSystem(); // only distributed file systems can be initialized at start-up time. if (fs.isDistributedFS()) { final WriteMode writeMode = getWriteMode();...
[ "@", "Override", "public", "void", "initializeGlobal", "(", "int", "parallelism", ")", "throws", "IOException", "{", "final", "Path", "path", "=", "getOutputFilePath", "(", ")", ";", "final", "FileSystem", "fs", "=", "path", ".", "getFileSystem", "(", ")", "...
Initialization of the distributed file system if it is used. @param parallelism The task parallelism.
[ "Initialization", "of", "the", "distributed", "file", "system", "if", "it", "is", "used", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/io/FileOutputFormat.java#L272-L300
123,280
apache/flink
flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java
ExceptionUtils.findThrowable
public static <T extends Throwable> Optional<T> findThrowable(Throwable throwable, Class<T> searchType) { if (throwable == null || searchType == null) { return Optional.empty(); } Throwable t = throwable; while (t != null) { if (searchType.isAssignableFrom(t.getClass())) { return Optional.of(searchTy...
java
public static <T extends Throwable> Optional<T> findThrowable(Throwable throwable, Class<T> searchType) { if (throwable == null || searchType == null) { return Optional.empty(); } Throwable t = throwable; while (t != null) { if (searchType.isAssignableFrom(t.getClass())) { return Optional.of(searchTy...
[ "public", "static", "<", "T", "extends", "Throwable", ">", "Optional", "<", "T", ">", "findThrowable", "(", "Throwable", "throwable", ",", "Class", "<", "T", ">", "searchType", ")", "{", "if", "(", "throwable", "==", "null", "||", "searchType", "==", "nu...
Checks whether a throwable chain contains a specific type of exception and returns it. @param throwable the throwable chain to check. @param searchType the type of exception to search for in the chain. @return Optional throwable of the requested type if available, otherwise empty
[ "Checks", "whether", "a", "throwable", "chain", "contains", "a", "specific", "type", "of", "exception", "and", "returns", "it", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java#L324-L339
123,281
apache/flink
flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java
ExceptionUtils.findThrowable
public static Optional<Throwable> findThrowable(Throwable throwable, Predicate<Throwable> predicate) { if (throwable == null || predicate == null) { return Optional.empty(); } Throwable t = throwable; while (t != null) { if (predicate.test(t)) { return Optional.of(t); } else { t = t.getCause()...
java
public static Optional<Throwable> findThrowable(Throwable throwable, Predicate<Throwable> predicate) { if (throwable == null || predicate == null) { return Optional.empty(); } Throwable t = throwable; while (t != null) { if (predicate.test(t)) { return Optional.of(t); } else { t = t.getCause()...
[ "public", "static", "Optional", "<", "Throwable", ">", "findThrowable", "(", "Throwable", "throwable", ",", "Predicate", "<", "Throwable", ">", "predicate", ")", "{", "if", "(", "throwable", "==", "null", "||", "predicate", "==", "null", ")", "{", "return", ...
Checks whether a throwable chain contains an exception matching a predicate and returns it. @param throwable the throwable chain to check. @param predicate the predicate of the exception to search for in the chain. @return Optional throwable of the requested type if available, otherwise empty
[ "Checks", "whether", "a", "throwable", "chain", "contains", "an", "exception", "matching", "a", "predicate", "and", "returns", "it", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java#L348-L363
123,282
apache/flink
flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java
ExceptionUtils.findThrowableWithMessage
public static Optional<Throwable> findThrowableWithMessage(Throwable throwable, String searchMessage) { if (throwable == null || searchMessage == null) { return Optional.empty(); } Throwable t = throwable; while (t != null) { if (t.getMessage() != null && t.getMessage().contains(searchMessage)) { ret...
java
public static Optional<Throwable> findThrowableWithMessage(Throwable throwable, String searchMessage) { if (throwable == null || searchMessage == null) { return Optional.empty(); } Throwable t = throwable; while (t != null) { if (t.getMessage() != null && t.getMessage().contains(searchMessage)) { ret...
[ "public", "static", "Optional", "<", "Throwable", ">", "findThrowableWithMessage", "(", "Throwable", "throwable", ",", "String", "searchMessage", ")", "{", "if", "(", "throwable", "==", "null", "||", "searchMessage", "==", "null", ")", "{", "return", "Optional",...
Checks whether a throwable chain contains a specific error message and returns the corresponding throwable. @param throwable the throwable chain to check. @param searchMessage the error message to search for in the chain. @return Optional throwable containing the search message if available, otherwise empty
[ "Checks", "whether", "a", "throwable", "chain", "contains", "a", "specific", "error", "message", "and", "returns", "the", "corresponding", "throwable", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java#L372-L387
123,283
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/util/BloomFilter.java
BloomFilter.optimalNumOfBits
public static int optimalNumOfBits(long inputEntries, double fpp) { int numBits = (int) (-inputEntries * Math.log(fpp) / (Math.log(2) * Math.log(2))); return numBits; }
java
public static int optimalNumOfBits(long inputEntries, double fpp) { int numBits = (int) (-inputEntries * Math.log(fpp) / (Math.log(2) * Math.log(2))); return numBits; }
[ "public", "static", "int", "optimalNumOfBits", "(", "long", "inputEntries", ",", "double", "fpp", ")", "{", "int", "numBits", "=", "(", "int", ")", "(", "-", "inputEntries", "*", "Math", ".", "log", "(", "fpp", ")", "/", "(", "Math", ".", "log", "(",...
Compute optimal bits number with given input entries and expected false positive probability. @param inputEntries @param fpp @return optimal bits number
[ "Compute", "optimal", "bits", "number", "with", "given", "input", "entries", "and", "expected", "false", "positive", "probability", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/util/BloomFilter.java#L69-L72
123,284
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/util/BloomFilter.java
BloomFilter.optimalNumOfHashFunctions
static int optimalNumOfHashFunctions(long expectEntries, long bitSize) { return Math.max(1, (int) Math.round((double) bitSize / expectEntries * Math.log(2))); }
java
static int optimalNumOfHashFunctions(long expectEntries, long bitSize) { return Math.max(1, (int) Math.round((double) bitSize / expectEntries * Math.log(2))); }
[ "static", "int", "optimalNumOfHashFunctions", "(", "long", "expectEntries", ",", "long", "bitSize", ")", "{", "return", "Math", ".", "max", "(", "1", ",", "(", "int", ")", "Math", ".", "round", "(", "(", "double", ")", "bitSize", "/", "expectEntries", "*...
compute the optimal hash function number with given input entries and bits size, which would make the false positive probability lowest. @param expectEntries @param bitSize @return hash function number
[ "compute", "the", "optimal", "hash", "function", "number", "with", "given", "input", "entries", "and", "bits", "size", "which", "would", "make", "the", "false", "positive", "probability", "lowest", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/util/BloomFilter.java#L97-L99
123,285
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/shipping/OutputCollector.java
OutputCollector.getWriters
@SuppressWarnings("unchecked") public List<RecordWriter<SerializationDelegate<T>>> getWriters() { return Collections.unmodifiableList(Arrays.asList(this.writers)); }
java
@SuppressWarnings("unchecked") public List<RecordWriter<SerializationDelegate<T>>> getWriters() { return Collections.unmodifiableList(Arrays.asList(this.writers)); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "List", "<", "RecordWriter", "<", "SerializationDelegate", "<", "T", ">", ">", ">", "getWriters", "(", ")", "{", "return", "Collections", ".", "unmodifiableList", "(", "Arrays", ".", "asList", "(", ...
List of writers that are associated with this output collector @return list of writers
[ "List", "of", "writers", "that", "are", "associated", "with", "this", "output", "collector" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/shipping/OutputCollector.java#L93-L96
123,286
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/instance/SimpleSlot.java
SimpleSlot.tryAssignPayload
@Override public boolean tryAssignPayload(Payload payload) { Preconditions.checkNotNull(payload); // check that we can actually run in this slot if (isCanceled()) { return false; } // atomically assign the vertex if (!PAYLOAD_UPDATER.compareAndSet(this, null, payload)) { return false; } // we ...
java
@Override public boolean tryAssignPayload(Payload payload) { Preconditions.checkNotNull(payload); // check that we can actually run in this slot if (isCanceled()) { return false; } // atomically assign the vertex if (!PAYLOAD_UPDATER.compareAndSet(this, null, payload)) { return false; } // we ...
[ "@", "Override", "public", "boolean", "tryAssignPayload", "(", "Payload", "payload", ")", "{", "Preconditions", ".", "checkNotNull", "(", "payload", ")", ";", "// check that we can actually run in this slot", "if", "(", "isCanceled", "(", ")", ")", "{", "return", ...
Atomically sets the executed vertex, if no vertex has been assigned to this slot so far. @param payload The vertex to assign to this slot. @return True, if the vertex was assigned, false, otherwise.
[ "Atomically", "sets", "the", "executed", "vertex", "if", "no", "vertex", "has", "been", "assigned", "to", "this", "slot", "so", "far", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/instance/SimpleSlot.java#L171-L192
123,287
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/scope/ScopeFormats.java
ScopeFormats.fromConfig
public static ScopeFormats fromConfig(Configuration config) { String jmFormat = config.getString(MetricOptions.SCOPE_NAMING_JM); String jmJobFormat = config.getString(MetricOptions.SCOPE_NAMING_JM_JOB); String tmFormat = config.getString(MetricOptions.SCOPE_NAMING_TM); String tmJobFormat = config.getString(Metr...
java
public static ScopeFormats fromConfig(Configuration config) { String jmFormat = config.getString(MetricOptions.SCOPE_NAMING_JM); String jmJobFormat = config.getString(MetricOptions.SCOPE_NAMING_JM_JOB); String tmFormat = config.getString(MetricOptions.SCOPE_NAMING_TM); String tmJobFormat = config.getString(Metr...
[ "public", "static", "ScopeFormats", "fromConfig", "(", "Configuration", "config", ")", "{", "String", "jmFormat", "=", "config", ".", "getString", "(", "MetricOptions", ".", "SCOPE_NAMING_JM", ")", ";", "String", "jmJobFormat", "=", "config", ".", "getString", "...
Creates the scope formats as defined in the given configuration. @param config The configuration that defines the formats @return The ScopeFormats parsed from the configuration
[ "Creates", "the", "scope", "formats", "as", "defined", "in", "the", "given", "configuration", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/scope/ScopeFormats.java#L94-L103
123,288
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java
FileInputFormat.initDefaultsFromConfiguration
private static void initDefaultsFromConfiguration(Configuration configuration) { final long to = configuration.getLong(ConfigConstants.FS_STREAM_OPENING_TIMEOUT_KEY, ConfigConstants.DEFAULT_FS_STREAM_OPENING_TIMEOUT); if (to < 0) { LOG.error("Invalid timeout value for filesystem stream opening: " + to + ". Us...
java
private static void initDefaultsFromConfiguration(Configuration configuration) { final long to = configuration.getLong(ConfigConstants.FS_STREAM_OPENING_TIMEOUT_KEY, ConfigConstants.DEFAULT_FS_STREAM_OPENING_TIMEOUT); if (to < 0) { LOG.error("Invalid timeout value for filesystem stream opening: " + to + ". Us...
[ "private", "static", "void", "initDefaultsFromConfiguration", "(", "Configuration", "configuration", ")", "{", "final", "long", "to", "=", "configuration", ".", "getLong", "(", "ConfigConstants", ".", "FS_STREAM_OPENING_TIMEOUT_KEY", ",", "ConfigConstants", ".", "DEFAUL...
Initialize defaults for input format. Needs to be a static method because it is configured for local cluster execution. @param configuration The configuration to load defaults from
[ "Initialize", "defaults", "for", "input", "format", ".", "Needs", "to", "be", "a", "static", "method", "because", "it", "is", "configured", "for", "local", "cluster", "execution", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java#L104-L116
123,289
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java
FileInputFormat.getFilePaths
public Path[] getFilePaths() { if (supportsMultiPaths()) { if (this.filePaths == null) { return new Path[0]; } return this.filePaths; } else { if (this.filePath == null) { return new Path[0]; } return new Path[] {filePath}; } }
java
public Path[] getFilePaths() { if (supportsMultiPaths()) { if (this.filePaths == null) { return new Path[0]; } return this.filePaths; } else { if (this.filePath == null) { return new Path[0]; } return new Path[] {filePath}; } }
[ "public", "Path", "[", "]", "getFilePaths", "(", ")", "{", "if", "(", "supportsMultiPaths", "(", ")", ")", "{", "if", "(", "this", ".", "filePaths", "==", "null", ")", "{", "return", "new", "Path", "[", "0", "]", ";", "}", "return", "this", ".", ...
Returns the paths of all files to be read by the FileInputFormat. @return The list of all paths to read.
[ "Returns", "the", "paths", "of", "all", "files", "to", "be", "read", "by", "the", "FileInputFormat", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java#L285-L298
123,290
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java
FileInputFormat.addFilesInDir
private long addFilesInDir(Path path, List<FileStatus> files, boolean logExcludedFiles) throws IOException { final FileSystem fs = path.getFileSystem(); long length = 0; for(FileStatus dir: fs.listStatus(path)) { if (dir.isDir()) { if (acceptFile(dir) && enumerateNestedFiles) { length += addFiles...
java
private long addFilesInDir(Path path, List<FileStatus> files, boolean logExcludedFiles) throws IOException { final FileSystem fs = path.getFileSystem(); long length = 0; for(FileStatus dir: fs.listStatus(path)) { if (dir.isDir()) { if (acceptFile(dir) && enumerateNestedFiles) { length += addFiles...
[ "private", "long", "addFilesInDir", "(", "Path", "path", ",", "List", "<", "FileStatus", ">", "files", ",", "boolean", "logExcludedFiles", ")", "throws", "IOException", "{", "final", "FileSystem", "fs", "=", "path", ".", "getFileSystem", "(", ")", ";", "long...
Enumerate all files in the directory and recursive if enumerateNestedFiles is true. @return the total length of accepted files.
[ "Enumerate", "all", "files", "in", "the", "directory", "and", "recursive", "if", "enumerateNestedFiles", "is", "true", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java#L701-L730
123,291
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/SpillChannelManager.java
SpillChannelManager.addOpenChannels
public synchronized void addOpenChannels(List<FileIOChannel> toOpen) { checkArgument(!closed); for (FileIOChannel channel : toOpen) { openChannels.add(channel); channels.remove(channel.getChannelID()); } }
java
public synchronized void addOpenChannels(List<FileIOChannel> toOpen) { checkArgument(!closed); for (FileIOChannel channel : toOpen) { openChannels.add(channel); channels.remove(channel.getChannelID()); } }
[ "public", "synchronized", "void", "addOpenChannels", "(", "List", "<", "FileIOChannel", ">", "toOpen", ")", "{", "checkArgument", "(", "!", "closed", ")", ";", "for", "(", "FileIOChannel", "channel", ":", "toOpen", ")", "{", "openChannels", ".", "add", "(", ...
Open File channels.
[ "Open", "File", "channels", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/SpillChannelManager.java#L57-L63
123,292
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/window/internal/InternalWindowProcessFunction.java
InternalWindowProcessFunction.open
public void open(Context<K, W> ctx) throws Exception { this.ctx = ctx; this.windowAssigner.open(ctx); }
java
public void open(Context<K, W> ctx) throws Exception { this.ctx = ctx; this.windowAssigner.open(ctx); }
[ "public", "void", "open", "(", "Context", "<", "K", ",", "W", ">", "ctx", ")", "throws", "Exception", "{", "this", ".", "ctx", "=", "ctx", ";", "this", ".", "windowAssigner", ".", "open", "(", "ctx", ")", ";", "}" ]
Initialization method for the function. It is called before the actual working methods.
[ "Initialization", "method", "for", "the", "function", ".", "It", "is", "called", "before", "the", "actual", "working", "methods", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/window/internal/InternalWindowProcessFunction.java#L58-L61
123,293
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java
AllWindowedStream.sum
public SingleOutputStreamOperator<T> sum(int positionToSum) { return aggregate(new SumAggregator<>(positionToSum, input.getType(), input.getExecutionConfig())); }
java
public SingleOutputStreamOperator<T> sum(int positionToSum) { return aggregate(new SumAggregator<>(positionToSum, input.getType(), input.getExecutionConfig())); }
[ "public", "SingleOutputStreamOperator", "<", "T", ">", "sum", "(", "int", "positionToSum", ")", "{", "return", "aggregate", "(", "new", "SumAggregator", "<>", "(", "positionToSum", ",", "input", ".", "getType", "(", ")", ",", "input", ".", "getExecutionConfig"...
Applies an aggregation that sums every window of the data stream at the given position. @param positionToSum The position in the tuple/array to sum @return The transformed DataStream.
[ "Applies", "an", "aggregation", "that", "sums", "every", "window", "of", "the", "data", "stream", "at", "the", "given", "position", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java#L1378-L1380
123,294
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java
AllWindowedStream.sum
public SingleOutputStreamOperator<T> sum(String field) { return aggregate(new SumAggregator<>(field, input.getType(), input.getExecutionConfig())); }
java
public SingleOutputStreamOperator<T> sum(String field) { return aggregate(new SumAggregator<>(field, input.getType(), input.getExecutionConfig())); }
[ "public", "SingleOutputStreamOperator", "<", "T", ">", "sum", "(", "String", "field", ")", "{", "return", "aggregate", "(", "new", "SumAggregator", "<>", "(", "field", ",", "input", ".", "getType", "(", ")", ",", "input", ".", "getExecutionConfig", "(", ")...
Applies an aggregation that sums every window of the pojo data stream at the given field for every window. <p>A field expression is either the name of a public field or a getter method with parentheses of the stream's underlying type. A dot can be used to drill down into objects, as in {@code "field1.getInnerField2()"...
[ "Applies", "an", "aggregation", "that", "sums", "every", "window", "of", "the", "pojo", "data", "stream", "at", "the", "given", "field", "for", "every", "window", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java#L1393-L1395
123,295
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java
AllWindowedStream.min
public SingleOutputStreamOperator<T> min(int positionToMin) { return aggregate(new ComparableAggregator<>(positionToMin, input.getType(), AggregationFunction.AggregationType.MIN, input.getExecutionConfig())); }
java
public SingleOutputStreamOperator<T> min(int positionToMin) { return aggregate(new ComparableAggregator<>(positionToMin, input.getType(), AggregationFunction.AggregationType.MIN, input.getExecutionConfig())); }
[ "public", "SingleOutputStreamOperator", "<", "T", ">", "min", "(", "int", "positionToMin", ")", "{", "return", "aggregate", "(", "new", "ComparableAggregator", "<>", "(", "positionToMin", ",", "input", ".", "getType", "(", ")", ",", "AggregationFunction", ".", ...
Applies an aggregation that that gives the minimum value of every window of the data stream at the given position. @param positionToMin The position to minimize @return The transformed DataStream.
[ "Applies", "an", "aggregation", "that", "that", "gives", "the", "minimum", "value", "of", "every", "window", "of", "the", "data", "stream", "at", "the", "given", "position", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java#L1404-L1406
123,296
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java
AllWindowedStream.min
public SingleOutputStreamOperator<T> min(String field) { return aggregate(new ComparableAggregator<>(field, input.getType(), AggregationFunction.AggregationType.MIN, false, input.getExecutionConfig())); }
java
public SingleOutputStreamOperator<T> min(String field) { return aggregate(new ComparableAggregator<>(field, input.getType(), AggregationFunction.AggregationType.MIN, false, input.getExecutionConfig())); }
[ "public", "SingleOutputStreamOperator", "<", "T", ">", "min", "(", "String", "field", ")", "{", "return", "aggregate", "(", "new", "ComparableAggregator", "<>", "(", "field", ",", "input", ".", "getType", "(", ")", ",", "AggregationFunction", ".", "Aggregation...
Applies an aggregation that that gives the minimum value of the pojo data stream at the given field expression for every window. <p>A field expression is either the name of a public field or a getter method with parentheses of the {@link DataStream}S underlying type. A dot can be used to drill down into objects, as in...
[ "Applies", "an", "aggregation", "that", "that", "gives", "the", "minimum", "value", "of", "the", "pojo", "data", "stream", "at", "the", "given", "field", "expression", "for", "every", "window", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java#L1419-L1421
123,297
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java
AllWindowedStream.max
public SingleOutputStreamOperator<T> max(int positionToMax) { return aggregate(new ComparableAggregator<>(positionToMax, input.getType(), AggregationFunction.AggregationType.MAX, input.getExecutionConfig())); }
java
public SingleOutputStreamOperator<T> max(int positionToMax) { return aggregate(new ComparableAggregator<>(positionToMax, input.getType(), AggregationFunction.AggregationType.MAX, input.getExecutionConfig())); }
[ "public", "SingleOutputStreamOperator", "<", "T", ">", "max", "(", "int", "positionToMax", ")", "{", "return", "aggregate", "(", "new", "ComparableAggregator", "<>", "(", "positionToMax", ",", "input", ".", "getType", "(", ")", ",", "AggregationFunction", ".", ...
Applies an aggregation that gives the maximum value of every window of the data stream at the given position. @param positionToMax The position to maximize @return The transformed DataStream.
[ "Applies", "an", "aggregation", "that", "gives", "the", "maximum", "value", "of", "every", "window", "of", "the", "data", "stream", "at", "the", "given", "position", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java#L1484-L1486
123,298
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/operators/SortedGrouping.java
SortedGrouping.withPartitioner
public SortedGrouping<T> withPartitioner(Partitioner<?> partitioner) { Preconditions.checkNotNull(partitioner); getKeys().validateCustomPartitioner(partitioner, null); this.customPartitioner = partitioner; return this; }
java
public SortedGrouping<T> withPartitioner(Partitioner<?> partitioner) { Preconditions.checkNotNull(partitioner); getKeys().validateCustomPartitioner(partitioner, null); this.customPartitioner = partitioner; return this; }
[ "public", "SortedGrouping", "<", "T", ">", "withPartitioner", "(", "Partitioner", "<", "?", ">", "partitioner", ")", "{", "Preconditions", ".", "checkNotNull", "(", "partitioner", ")", ";", "getKeys", "(", ")", ".", "validateCustomPartitioner", "(", "partitioner...
Uses a custom partitioner for the grouping. @param partitioner The custom partitioner. @return The grouping object itself, to allow for method chaining.
[ "Uses", "a", "custom", "partitioner", "for", "the", "grouping", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/SortedGrouping.java#L142-L149
123,299
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/util/StringUtf8Utils.java
StringUtf8Utils.encodeUTF8
public static byte[] encodeUTF8(String str) { byte[] bytes = allocateReuseBytes(str.length() * MAX_BYTES_PER_CHAR); int len = encodeUTF8(str, bytes); return Arrays.copyOf(bytes, len); }
java
public static byte[] encodeUTF8(String str) { byte[] bytes = allocateReuseBytes(str.length() * MAX_BYTES_PER_CHAR); int len = encodeUTF8(str, bytes); return Arrays.copyOf(bytes, len); }
[ "public", "static", "byte", "[", "]", "encodeUTF8", "(", "String", "str", ")", "{", "byte", "[", "]", "bytes", "=", "allocateReuseBytes", "(", "str", ".", "length", "(", ")", "*", "MAX_BYTES_PER_CHAR", ")", ";", "int", "len", "=", "encodeUTF8", "(", "s...
This method must have the same result with JDK's String.getBytes.
[ "This", "method", "must", "have", "the", "same", "result", "with", "JDK", "s", "String", ".", "getBytes", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/util/StringUtf8Utils.java#L41-L45