id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
124,000
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/MutableHashTable.java
MutableHashTable.buildBloomFilterForBucket
final void buildBloomFilterForBucket(int bucketInSegmentPos, MemorySegment bucket, HashPartition<BT, PT> p) { final int count = bucket.getShort(bucketInSegmentPos + HEADER_COUNT_OFFSET); if (count <= 0) { return; } int[] hashCodes = new int[count]; // As the hashcode and bloom filter occupy same bytes, so...
java
final void buildBloomFilterForBucket(int bucketInSegmentPos, MemorySegment bucket, HashPartition<BT, PT> p) { final int count = bucket.getShort(bucketInSegmentPos + HEADER_COUNT_OFFSET); if (count <= 0) { return; } int[] hashCodes = new int[count]; // As the hashcode and bloom filter occupy same bytes, so...
[ "final", "void", "buildBloomFilterForBucket", "(", "int", "bucketInSegmentPos", ",", "MemorySegment", "bucket", ",", "HashPartition", "<", "BT", ",", "PT", ">", "p", ")", "{", "final", "int", "count", "=", "bucket", ".", "getShort", "(", "bucketInSegmentPos", ...
Set all the bucket memory except bucket header as the bit set of bloom filter, and use hash code of build records to build bloom filter.
[ "Set", "all", "the", "bucket", "memory", "except", "bucket", "header", "as", "the", "bit", "set", "of", "bloom", "filter", "and", "use", "hash", "code", "of", "build", "records", "to", "build", "bloom", "filter", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/MutableHashTable.java#L1269-L1285
124,001
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/MutableHashTable.java
MutableHashTable.getNumWriteBehindBuffers
public static int getNumWriteBehindBuffers(int numBuffers) { int numIOBufs = (int) (Math.log(numBuffers) / Math.log(4) - 1.5); return numIOBufs > 6 ? 6 : numIOBufs; }
java
public static int getNumWriteBehindBuffers(int numBuffers) { int numIOBufs = (int) (Math.log(numBuffers) / Math.log(4) - 1.5); return numIOBufs > 6 ? 6 : numIOBufs; }
[ "public", "static", "int", "getNumWriteBehindBuffers", "(", "int", "numBuffers", ")", "{", "int", "numIOBufs", "=", "(", "int", ")", "(", "Math", ".", "log", "(", "numBuffers", ")", "/", "Math", ".", "log", "(", "4", ")", "-", "1.5", ")", ";", "retur...
Determines the number of buffers to be used for asynchronous write behind. It is currently computed as the logarithm of the number of buffers to the base 4, rounded up, minus 2. The upper limit for the number of write behind buffers is however set to six. @param numBuffers The number of available buffers. @return The ...
[ "Determines", "the", "number", "of", "buffers", "to", "be", "used", "for", "asynchronous", "write", "behind", ".", "It", "is", "currently", "computed", "as", "the", "logarithm", "of", "the", "number", "of", "buffers", "to", "the", "base", "4", "rounded", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/MutableHashTable.java#L1427-L1430
124,002
apache/flink
flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java
PackagedProgram.getPlanWithoutJars
public JobWithJars getPlanWithoutJars() throws ProgramInvocationException { if (isUsingProgramEntryPoint()) { return new JobWithJars(getPlan(), Collections.<URL>emptyList(), classpaths, userCodeClassLoader); } else { throw new ProgramInvocationException("Cannot create a " + JobWithJars.class.getSimpleName() +...
java
public JobWithJars getPlanWithoutJars() throws ProgramInvocationException { if (isUsingProgramEntryPoint()) { return new JobWithJars(getPlan(), Collections.<URL>emptyList(), classpaths, userCodeClassLoader); } else { throw new ProgramInvocationException("Cannot create a " + JobWithJars.class.getSimpleName() +...
[ "public", "JobWithJars", "getPlanWithoutJars", "(", ")", "throws", "ProgramInvocationException", "{", "if", "(", "isUsingProgramEntryPoint", "(", ")", ")", "{", "return", "new", "JobWithJars", "(", "getPlan", "(", ")", ",", "Collections", ".", "<", "URL", ">", ...
Returns the plan without the required jars when the files are already provided by the cluster. @return The plan without attached jar files. @throws ProgramInvocationException
[ "Returns", "the", "plan", "without", "the", "required", "jars", "when", "the", "files", "are", "already", "provided", "by", "the", "cluster", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java#L292-L299
124,003
apache/flink
flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java
PackagedProgram.getAllLibraries
public List<URL> getAllLibraries() { List<URL> libs = new ArrayList<URL>(this.extractedTempLibraries.size() + 1); if (jarFile != null) { libs.add(jarFile); } for (File tmpLib : this.extractedTempLibraries) { try { libs.add(tmpLib.getAbsoluteFile().toURI().toURL()); } catch (MalformedURLExceptio...
java
public List<URL> getAllLibraries() { List<URL> libs = new ArrayList<URL>(this.extractedTempLibraries.size() + 1); if (jarFile != null) { libs.add(jarFile); } for (File tmpLib : this.extractedTempLibraries) { try { libs.add(tmpLib.getAbsoluteFile().toURI().toURL()); } catch (MalformedURLExceptio...
[ "public", "List", "<", "URL", ">", "getAllLibraries", "(", ")", "{", "List", "<", "URL", ">", "libs", "=", "new", "ArrayList", "<", "URL", ">", "(", "this", ".", "extractedTempLibraries", ".", "size", "(", ")", "+", "1", ")", ";", "if", "(", "jarFi...
Returns all provided libraries needed to run the program.
[ "Returns", "all", "provided", "libraries", "needed", "to", "run", "the", "program", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java#L448-L464
124,004
apache/flink
flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java
PackagedProgram.getPlan
private Plan getPlan() throws ProgramInvocationException { if (this.plan == null) { Thread.currentThread().setContextClassLoader(this.userCodeClassLoader); this.plan = createPlanFromProgram(this.program, this.args); } return this.plan; }
java
private Plan getPlan() throws ProgramInvocationException { if (this.plan == null) { Thread.currentThread().setContextClassLoader(this.userCodeClassLoader); this.plan = createPlanFromProgram(this.program, this.args); } return this.plan; }
[ "private", "Plan", "getPlan", "(", ")", "throws", "ProgramInvocationException", "{", "if", "(", "this", ".", "plan", "==", "null", ")", "{", "Thread", ".", "currentThread", "(", ")", ".", "setContextClassLoader", "(", "this", ".", "userCodeClassLoader", ")", ...
Returns the plan as generated from the Pact Assembler. @return The program's plan. @throws ProgramInvocationException Thrown, if an error occurred in the program while creating the program's {@link Plan}.
[ "Returns", "the", "plan", "as", "generated", "from", "the", "Pact", "Assembler", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java#L481-L488
124,005
apache/flink
flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java
PackagedProgram.createPlanFromProgram
private static Plan createPlanFromProgram(Program program, String[] options) throws ProgramInvocationException { try { return program.getPlan(options); } catch (Throwable t) { throw new ProgramInvocationException("Error while calling the program: " + t.getMessage(), t); } }
java
private static Plan createPlanFromProgram(Program program, String[] options) throws ProgramInvocationException { try { return program.getPlan(options); } catch (Throwable t) { throw new ProgramInvocationException("Error while calling the program: " + t.getMessage(), t); } }
[ "private", "static", "Plan", "createPlanFromProgram", "(", "Program", "program", ",", "String", "[", "]", "options", ")", "throws", "ProgramInvocationException", "{", "try", "{", "return", "program", ".", "getPlan", "(", "options", ")", ";", "}", "catch", "(",...
Takes the jar described by the given file and invokes its pact assembler class to assemble a plan. The assembler class name is either passed through a parameter, or it is read from the manifest of the jar. The assembler is handed the given options for its assembly. @param program The program to create the plan for. @p...
[ "Takes", "the", "jar", "described", "by", "the", "given", "file", "and", "invokes", "its", "pact", "assembler", "class", "to", "assemble", "a", "plan", ".", "The", "assembler", "class", "name", "is", "either", "passed", "through", "a", "parameter", "or", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java#L651-L657
124,006
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServicesConfiguration.java
TaskManagerServicesConfiguration.fromConfiguration
public static TaskManagerServicesConfiguration fromConfiguration( Configuration configuration, long maxJvmHeapMemory, InetAddress remoteAddress, boolean localCommunication) { final String[] tmpDirs = ConfigurationUtils.parseTempDirectories(configuration); String[] localStateRootDir = ConfigurationUtils....
java
public static TaskManagerServicesConfiguration fromConfiguration( Configuration configuration, long maxJvmHeapMemory, InetAddress remoteAddress, boolean localCommunication) { final String[] tmpDirs = ConfigurationUtils.parseTempDirectories(configuration); String[] localStateRootDir = ConfigurationUtils....
[ "public", "static", "TaskManagerServicesConfiguration", "fromConfiguration", "(", "Configuration", "configuration", ",", "long", "maxJvmHeapMemory", ",", "InetAddress", "remoteAddress", ",", "boolean", "localCommunication", ")", "{", "final", "String", "[", "]", "tmpDirs"...
Utility method to extract TaskManager config parameters from the configuration and to sanity check them. @param configuration The configuration. @param maxJvmHeapMemory The maximum JVM heap size, in bytes. @param remoteAddress identifying the IP address under which the TaskManager will be accessible @param localCommun...
[ "Utility", "method", "to", "extract", "TaskManager", "config", "parameters", "from", "the", "configuration", "and", "to", "sanity", "check", "them", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServicesConfiguration.java#L205-L248
124,007
apache/flink
flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/streaming/data/PythonDualInputStreamer.java
PythonDualInputStreamer.streamBufferWithGroups
public final void streamBufferWithGroups(Iterator<IN1> iterator1, Iterator<IN2> iterator2, Collector<OUT> c) { SingleElementPushBackIterator<IN1> i1 = new SingleElementPushBackIterator<>(iterator1); SingleElementPushBackIterator<IN2> i2 = new SingleElementPushBackIterator<>(iterator2); try { int size; if (i...
java
public final void streamBufferWithGroups(Iterator<IN1> iterator1, Iterator<IN2> iterator2, Collector<OUT> c) { SingleElementPushBackIterator<IN1> i1 = new SingleElementPushBackIterator<>(iterator1); SingleElementPushBackIterator<IN2> i2 = new SingleElementPushBackIterator<>(iterator2); try { int size; if (i...
[ "public", "final", "void", "streamBufferWithGroups", "(", "Iterator", "<", "IN1", ">", "iterator1", ",", "Iterator", "<", "IN2", ">", "iterator2", ",", "Collector", "<", "OUT", ">", "c", ")", "{", "SingleElementPushBackIterator", "<", "IN1", ">", "i1", "=", ...
Sends all values contained in both iterators to the external process and collects all results. @param iterator1 first input stream @param iterator2 second input stream @param c collector
[ "Sends", "all", "values", "contained", "in", "both", "iterators", "to", "the", "external", "process", "and", "collects", "all", "results", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/streaming/data/PythonDualInputStreamer.java#L50-L98
124,008
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/SetOperationFactory.java
SetOperationFactory.create
public TableOperation create( SetTableOperationType type, TableOperation left, TableOperation right, boolean all) { failIfStreaming(type, all); validateSetOperation(type, left, right); return new SetTableOperation(left, right, type, all); }
java
public TableOperation create( SetTableOperationType type, TableOperation left, TableOperation right, boolean all) { failIfStreaming(type, all); validateSetOperation(type, left, right); return new SetTableOperation(left, right, type, all); }
[ "public", "TableOperation", "create", "(", "SetTableOperationType", "type", ",", "TableOperation", "left", ",", "TableOperation", "right", ",", "boolean", "all", ")", "{", "failIfStreaming", "(", "type", ",", "all", ")", ";", "validateSetOperation", "(", "type", ...
Creates a valid algebraic operation. @param type type of operation to create @param left first relational operation of the operation @param right second relational operation of the operation @param all flag defining how duplicates should be handled @return creates a valid algebraic operation
[ "Creates", "a", "valid", "algebraic", "operation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/SetOperationFactory.java#L53-L61
124,009
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/operators/UnionOperator.java
UnionOperator.translateToDataFlow
@Override protected Union<T> translateToDataFlow(Operator<T> input1, Operator<T> input2) { return new Union<T>(input1, input2, unionLocationName); }
java
@Override protected Union<T> translateToDataFlow(Operator<T> input1, Operator<T> input2) { return new Union<T>(input1, input2, unionLocationName); }
[ "@", "Override", "protected", "Union", "<", "T", ">", "translateToDataFlow", "(", "Operator", "<", "T", ">", "input1", ",", "Operator", "<", "T", ">", "input2", ")", "{", "return", "new", "Union", "<", "T", ">", "(", "input1", ",", "input2", ",", "un...
Returns the BinaryNodeTranslation of the Union. @param input1 The first input of the union, as a common API operator. @param input2 The second input of the union, as a common API operator. @return The common API union operator.
[ "Returns", "the", "BinaryNodeTranslation", "of", "the", "Union", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/UnionOperator.java#L61-L64
124,010
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/tuple/Tuple.java
Tuple.getFieldNotNull
public <T> T getFieldNotNull(int pos){ T field = getField(pos); if (field != null) { return field; } else { throw new NullFieldException(pos); } }
java
public <T> T getFieldNotNull(int pos){ T field = getField(pos); if (field != null) { return field; } else { throw new NullFieldException(pos); } }
[ "public", "<", "T", ">", "T", "getFieldNotNull", "(", "int", "pos", ")", "{", "T", "field", "=", "getField", "(", "pos", ")", ";", "if", "(", "field", "!=", "null", ")", "{", "return", "field", ";", "}", "else", "{", "throw", "new", "NullFieldExcep...
Gets the field at the specified position, throws NullFieldException if the field is null. Used for comparing key fields. @param pos The position of the field, zero indexed. @return The field at the specified position. @throws IndexOutOfBoundsException Thrown, if the position is negative, or equal to, or larger than th...
[ "Gets", "the", "field", "at", "the", "specified", "position", "throws", "NullFieldException", "if", "the", "field", "is", "null", ".", "Used", "for", "comparing", "key", "fields", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/tuple/Tuple.java#L62-L69
124,011
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/tuple/Tuple.java
Tuple.newInstance
public static Tuple newInstance(int arity) { switch (arity) { case 0: return Tuple0.INSTANCE; case 1: return new Tuple1(); case 2: return new Tuple2(); case 3: return new Tuple3(); case 4: return new Tuple4(); case 5: return new Tuple5(); case 6: return new Tuple6(); case 7: return new Tuple7(...
java
public static Tuple newInstance(int arity) { switch (arity) { case 0: return Tuple0.INSTANCE; case 1: return new Tuple1(); case 2: return new Tuple2(); case 3: return new Tuple3(); case 4: return new Tuple4(); case 5: return new Tuple5(); case 6: return new Tuple6(); case 7: return new Tuple7(...
[ "public", "static", "Tuple", "newInstance", "(", "int", "arity", ")", "{", "switch", "(", "arity", ")", "{", "case", "0", ":", "return", "Tuple0", ".", "INSTANCE", ";", "case", "1", ":", "return", "new", "Tuple1", "(", ")", ";", "case", "2", ":", "...
GENERATED FROM org.apache.flink.api.java.tuple.TupleGenerator.
[ "GENERATED", "FROM", "org", ".", "apache", ".", "flink", ".", "api", ".", "java", ".", "tuple", ".", "TupleGenerator", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/tuple/Tuple.java#L116-L146
124,012
apache/flink
flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/streaming/data/PythonSingleInputStreamer.java
PythonSingleInputStreamer.streamBufferWithoutGroups
public final void streamBufferWithoutGroups(Iterator<IN> iterator, Collector<OUT> c) { SingleElementPushBackIterator<IN> i = new SingleElementPushBackIterator<>(iterator); try { int size; if (i.hasNext()) { while (true) { int sig = in.readInt(); switch (sig) { case SIGNAL_BUFFER_REQUEST: ...
java
public final void streamBufferWithoutGroups(Iterator<IN> iterator, Collector<OUT> c) { SingleElementPushBackIterator<IN> i = new SingleElementPushBackIterator<>(iterator); try { int size; if (i.hasNext()) { while (true) { int sig = in.readInt(); switch (sig) { case SIGNAL_BUFFER_REQUEST: ...
[ "public", "final", "void", "streamBufferWithoutGroups", "(", "Iterator", "<", "IN", ">", "iterator", ",", "Collector", "<", "OUT", ">", "c", ")", "{", "SingleElementPushBackIterator", "<", "IN", ">", "i", "=", "new", "SingleElementPushBackIterator", "<>", "(", ...
Sends all values contained in the iterator to the external process and collects all results. @param iterator input stream @param c collector
[ "Sends", "all", "values", "contained", "in", "the", "iterator", "to", "the", "external", "process", "and", "collects", "all", "results", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/streaming/data/PythonSingleInputStreamer.java#L47-L90
124,013
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerBase.java
FlinkKafkaProducerBase.getKafkaProducer
@VisibleForTesting protected <K, V> KafkaProducer<K, V> getKafkaProducer(Properties props) { return new KafkaProducer<>(props); }
java
@VisibleForTesting protected <K, V> KafkaProducer<K, V> getKafkaProducer(Properties props) { return new KafkaProducer<>(props); }
[ "@", "VisibleForTesting", "protected", "<", "K", ",", "V", ">", "KafkaProducer", "<", "K", ",", "V", ">", "getKafkaProducer", "(", "Properties", "props", ")", "{", "return", "new", "KafkaProducer", "<>", "(", "props", ")", ";", "}" ]
Used for testing only.
[ "Used", "for", "testing", "only", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerBase.java#L203-L206
124,014
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerBase.java
FlinkKafkaProducerBase.invoke
@Override public void invoke(IN next, Context context) throws Exception { // propagate asynchronous errors checkErroneous(); byte[] serializedKey = schema.serializeKey(next); byte[] serializedValue = schema.serializeValue(next); String targetTopic = schema.getTargetTopic(next); if (targetTopic == null) { ...
java
@Override public void invoke(IN next, Context context) throws Exception { // propagate asynchronous errors checkErroneous(); byte[] serializedKey = schema.serializeKey(next); byte[] serializedValue = schema.serializeValue(next); String targetTopic = schema.getTargetTopic(next); if (targetTopic == null) { ...
[ "@", "Override", "public", "void", "invoke", "(", "IN", "next", ",", "Context", "context", ")", "throws", "Exception", "{", "// propagate asynchronous errors", "checkErroneous", "(", ")", ";", "byte", "[", "]", "serializedKey", "=", "schema", ".", "serializeKey"...
Called when new data arrives to the sink, and forwards it to Kafka. @param next The incoming data
[ "Called", "when", "new", "data", "arrives", "to", "the", "sink", "and", "forwards", "it", "to", "Kafka", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerBase.java#L280-L314
124,015
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/broadcast/BroadcastVariableManager.java
BroadcastVariableManager.materializeBroadcastVariable
public <T> BroadcastVariableMaterialization<T, ?> materializeBroadcastVariable(String name, int superstep, BatchTask<?, ?> holder, MutableReader<?> reader, TypeSerializerFactory<T> serializerFactory) throws IOException { final BroadcastVariableKey key = new BroadcastVariableKey(holder.getEnvironment().getJobVertex...
java
public <T> BroadcastVariableMaterialization<T, ?> materializeBroadcastVariable(String name, int superstep, BatchTask<?, ?> holder, MutableReader<?> reader, TypeSerializerFactory<T> serializerFactory) throws IOException { final BroadcastVariableKey key = new BroadcastVariableKey(holder.getEnvironment().getJobVertex...
[ "public", "<", "T", ">", "BroadcastVariableMaterialization", "<", "T", ",", "?", ">", "materializeBroadcastVariable", "(", "String", "name", ",", "int", "superstep", ",", "BatchTask", "<", "?", ",", "?", ">", "holder", ",", "MutableReader", "<", "?", ">", ...
Materializes the broadcast variable for the given name, scoped to the given task and its iteration superstep. An existing materialization created by another parallel subtask may be returned, if it hasn't expired yet.
[ "Materializes", "the", "broadcast", "variable", "for", "the", "given", "name", "scoped", "to", "the", "given", "task", "and", "its", "iteration", "superstep", ".", "An", "existing", "materialization", "created", "by", "another", "parallel", "subtask", "may", "be...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/broadcast/BroadcastVariableManager.java#L45-L85
124,016
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/operators/base/CoGroupRawOperatorBase.java
CoGroupRawOperatorBase.setGroupOrder
public void setGroupOrder(int inputNum, Ordering order) { if (inputNum == 0) { this.groupOrder1 = order; } else if (inputNum == 1) { this.groupOrder2 = order; } else { throw new IndexOutOfBoundsException(); } }
java
public void setGroupOrder(int inputNum, Ordering order) { if (inputNum == 0) { this.groupOrder1 = order; } else if (inputNum == 1) { this.groupOrder2 = order; } else { throw new IndexOutOfBoundsException(); } }
[ "public", "void", "setGroupOrder", "(", "int", "inputNum", ",", "Ordering", "order", ")", "{", "if", "(", "inputNum", "==", "0", ")", "{", "this", ".", "groupOrder1", "=", "order", ";", "}", "else", "if", "(", "inputNum", "==", "1", ")", "{", "this",...
Sets the order of the elements within a group for the given input. @param inputNum The number of the input (here either <i>0</i> or <i>1</i>). @param order The order for the elements in a group.
[ "Sets", "the", "order", "of", "the", "elements", "within", "a", "group", "for", "the", "given", "input", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/base/CoGroupRawOperatorBase.java#L89-L97
124,017
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/operators/Ordering.java
Ordering.appendOrdering
public Ordering appendOrdering(Integer index, Class<? extends Comparable<?>> type, Order order) { if (index < 0) { throw new IllegalArgumentException("The key index must not be negative."); } if (order == null) { throw new NullPointerException(); } if (order == Order.NONE) { throw new IllegalArgument...
java
public Ordering appendOrdering(Integer index, Class<? extends Comparable<?>> type, Order order) { if (index < 0) { throw new IllegalArgumentException("The key index must not be negative."); } if (order == null) { throw new NullPointerException(); } if (order == Order.NONE) { throw new IllegalArgument...
[ "public", "Ordering", "appendOrdering", "(", "Integer", "index", ",", "Class", "<", "?", "extends", "Comparable", "<", "?", ">", ">", "type", ",", "Order", "order", ")", "{", "if", "(", "index", "<", "0", ")", "{", "throw", "new", "IllegalArgumentExcepti...
Extends this ordering by appending an additional order requirement. If the index has been previously appended then the unmodified Ordering is returned. @param index Field index of the appended order requirement. @param type Type of the appended order requirement. @param order Order of the appended order requirement. ...
[ "Extends", "this", "ordering", "by", "appending", "an", "additional", "order", "requirement", ".", "If", "the", "index", "has", "been", "previously", "appended", "then", "the", "unmodified", "Ordering", "is", "returned", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/Ordering.java#L67-L85
124,018
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/proxy/DynamoDBStreamsProxy.java
DynamoDBStreamsProxy.createKinesisClient
@Override protected AmazonKinesis createKinesisClient(Properties configProps) { ClientConfiguration awsClientConfig = new ClientConfigurationFactory().getConfig(); setAwsClientConfigProperties(awsClientConfig, configProps); AWSCredentialsProvider credentials = getCredentialsProvider(configProps); awsClientCon...
java
@Override protected AmazonKinesis createKinesisClient(Properties configProps) { ClientConfiguration awsClientConfig = new ClientConfigurationFactory().getConfig(); setAwsClientConfigProperties(awsClientConfig, configProps); AWSCredentialsProvider credentials = getCredentialsProvider(configProps); awsClientCon...
[ "@", "Override", "protected", "AmazonKinesis", "createKinesisClient", "(", "Properties", "configProps", ")", "{", "ClientConfiguration", "awsClientConfig", "=", "new", "ClientConfigurationFactory", "(", ")", ".", "getConfig", "(", ")", ";", "setAwsClientConfigProperties",...
Creates an AmazonDynamoDBStreamsAdapterClient. Uses it as the internal client interacting with the DynamoDB streams. @param configProps configuration properties @return an AWS DynamoDB streams adapter client
[ "Creates", "an", "AmazonDynamoDBStreamsAdapterClient", ".", "Uses", "it", "as", "the", "internal", "client", "interacting", "with", "the", "DynamoDB", "streams", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/proxy/DynamoDBStreamsProxy.java#L77-L100
124,019
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/scope/ScopeFormat.java
ScopeFormat.concat
public static String concat(CharacterFilter filter, Character delimiter, String... components) { StringBuilder sb = new StringBuilder(); sb.append(filter.filterCharacters(components[0])); for (int x = 1; x < components.length; x++) { sb.append(delimiter); sb.append(filter.filterCharacters(components[x])); ...
java
public static String concat(CharacterFilter filter, Character delimiter, String... components) { StringBuilder sb = new StringBuilder(); sb.append(filter.filterCharacters(components[0])); for (int x = 1; x < components.length; x++) { sb.append(delimiter); sb.append(filter.filterCharacters(components[x])); ...
[ "public", "static", "String", "concat", "(", "CharacterFilter", "filter", ",", "Character", "delimiter", ",", "String", "...", "components", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "filter", ".",...
Concatenates the given component names separated by the delimiter character. Additionally the character filter is applied to all component names. @param filter Character filter to be applied to the component names @param delimiter Delimiter to separate component names @param components Array of component names @return...
[ "Concatenates", "the", "given", "component", "names", "separated", "by", "the", "delimiter", "character", ".", "Additionally", "the", "character", "filter", "is", "applied", "to", "all", "component", "names", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/scope/ScopeFormat.java#L228-L236
124,020
apache/flink
flink-docs/src/main/java/org/apache/flink/docs/rest/RestAPIDocGenerator.java
RestAPIDocGenerator.main
public static void main(String[] args) throws IOException { String outputDirectory = args[0]; for (final RestAPIVersion apiVersion : RestAPIVersion.values()) { if (apiVersion == RestAPIVersion.V0) { // this version exists only for testing purposes continue; } createHtmlFile( new DocumentingDis...
java
public static void main(String[] args) throws IOException { String outputDirectory = args[0]; for (final RestAPIVersion apiVersion : RestAPIVersion.values()) { if (apiVersion == RestAPIVersion.V0) { // this version exists only for testing purposes continue; } createHtmlFile( new DocumentingDis...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "IOException", "{", "String", "outputDirectory", "=", "args", "[", "0", "]", ";", "for", "(", "final", "RestAPIVersion", "apiVersion", ":", "RestAPIVersion", ".", "values", ...
Generates the REST API documentation. @param args args[0] contains the directory into which the generated files are placed @throws IOException if any file operation failed
[ "Generates", "the", "REST", "API", "documentation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-docs/src/main/java/org/apache/flink/docs/rest/RestAPIDocGenerator.java#L102-L115
124,021
apache/flink
flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSchemaConverter.java
AvroSchemaConverter.convertToTypeInfo
@SuppressWarnings("unchecked") public static <T extends SpecificRecord> TypeInformation<Row> convertToTypeInfo(Class<T> avroClass) { Preconditions.checkNotNull(avroClass, "Avro specific record class must not be null."); // determine schema to retrieve deterministic field order final Schema schema = SpecificData....
java
@SuppressWarnings("unchecked") public static <T extends SpecificRecord> TypeInformation<Row> convertToTypeInfo(Class<T> avroClass) { Preconditions.checkNotNull(avroClass, "Avro specific record class must not be null."); // determine schema to retrieve deterministic field order final Schema schema = SpecificData....
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", "extends", "SpecificRecord", ">", "TypeInformation", "<", "Row", ">", "convertToTypeInfo", "(", "Class", "<", "T", ">", "avroClass", ")", "{", "Preconditions", ".", "checkNotNull",...
Converts an Avro class into a nested row structure with deterministic field order and data types that are compatible with Flink's Table & SQL API. @param avroClass Avro specific record that contains schema information @return type information matching the schema
[ "Converts", "an", "Avro", "class", "into", "a", "nested", "row", "structure", "with", "deterministic", "field", "order", "and", "data", "types", "that", "are", "compatible", "with", "Flink", "s", "Table", "&", "SQL", "API", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSchemaConverter.java#L58-L64
124,022
apache/flink
flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSchemaConverter.java
AvroSchemaConverter.convertToTypeInfo
@SuppressWarnings("unchecked") public static <T> TypeInformation<T> convertToTypeInfo(String avroSchemaString) { Preconditions.checkNotNull(avroSchemaString, "Avro schema must not be null."); final Schema schema; try { schema = new Schema.Parser().parse(avroSchemaString); } catch (SchemaParseException e) { ...
java
@SuppressWarnings("unchecked") public static <T> TypeInformation<T> convertToTypeInfo(String avroSchemaString) { Preconditions.checkNotNull(avroSchemaString, "Avro schema must not be null."); final Schema schema; try { schema = new Schema.Parser().parse(avroSchemaString); } catch (SchemaParseException e) { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "TypeInformation", "<", "T", ">", "convertToTypeInfo", "(", "String", "avroSchemaString", ")", "{", "Preconditions", ".", "checkNotNull", "(", "avroSchemaString", ",", "\"Avro s...
Converts an Avro schema string into a nested row structure with deterministic field order and data types that are compatible with Flink's Table & SQL API. @param avroSchemaString Avro schema definition string @return type information matching the schema
[ "Converts", "an", "Avro", "schema", "string", "into", "a", "nested", "row", "structure", "with", "deterministic", "field", "order", "and", "data", "types", "that", "are", "compatible", "with", "Flink", "s", "Table", "&", "SQL", "API", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSchemaConverter.java#L73-L83
124,023
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
ExecutionEnvironment.registerTypeWithKryoSerializer
public void registerTypeWithKryoSerializer(Class<?> type, Class<? extends Serializer<?>> serializerClass) { config.registerTypeWithKryoSerializer(type, serializerClass); }
java
public void registerTypeWithKryoSerializer(Class<?> type, Class<? extends Serializer<?>> serializerClass) { config.registerTypeWithKryoSerializer(type, serializerClass); }
[ "public", "void", "registerTypeWithKryoSerializer", "(", "Class", "<", "?", ">", "type", ",", "Class", "<", "?", "extends", "Serializer", "<", "?", ">", ">", "serializerClass", ")", "{", "config", ".", "registerTypeWithKryoSerializer", "(", "type", ",", "seria...
Registers the given Serializer via its class as a serializer for the given type at the KryoSerializer. @param type The class of the types serialized with the given serializer. @param serializerClass The class of the serializer to use.
[ "Registers", "the", "given", "Serializer", "via", "its", "class", "as", "a", "serializer", "for", "the", "given", "type", "at", "the", "KryoSerializer", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java#L354-L356
124,024
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
ExecutionEnvironment.fromCollection
public <X> DataSource<X> fromCollection(Collection<X> data) { if (data == null) { throw new IllegalArgumentException("The data must not be null."); } if (data.size() == 0) { throw new IllegalArgumentException("The size of the collection must not be empty."); } X firstValue = data.iterator().next(); ...
java
public <X> DataSource<X> fromCollection(Collection<X> data) { if (data == null) { throw new IllegalArgumentException("The data must not be null."); } if (data.size() == 0) { throw new IllegalArgumentException("The size of the collection must not be empty."); } X firstValue = data.iterator().next(); ...
[ "public", "<", "X", ">", "DataSource", "<", "X", ">", "fromCollection", "(", "Collection", "<", "X", ">", "data", ")", "{", "if", "(", "data", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The data must not be null.\"", ")", "...
Creates a DataSet from the given non-empty collection. The type of the data set is that of the elements in the collection. <p>The framework will try and determine the exact type from the collection elements. In case of generic elements, it may be necessary to manually supply the type information via {@link #fromCollec...
[ "Creates", "a", "DataSet", "from", "the", "given", "non", "-", "empty", "collection", ".", "The", "type", "of", "the", "data", "set", "is", "that", "of", "the", "elements", "in", "the", "collection", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java#L602-L615
124,025
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
ExecutionEnvironment.fromCollection
public <X> DataSource<X> fromCollection(Collection<X> data, TypeInformation<X> type) { return fromCollection(data, type, Utils.getCallLocationName()); }
java
public <X> DataSource<X> fromCollection(Collection<X> data, TypeInformation<X> type) { return fromCollection(data, type, Utils.getCallLocationName()); }
[ "public", "<", "X", ">", "DataSource", "<", "X", ">", "fromCollection", "(", "Collection", "<", "X", ">", "data", ",", "TypeInformation", "<", "X", ">", "type", ")", "{", "return", "fromCollection", "(", "data", ",", "type", ",", "Utils", ".", "getCall...
Creates a DataSet from the given non-empty collection. Note that this operation will result in a non-parallel data source, i.e. a data source with a parallelism of one. <p>The returned DataSet is typed to the given TypeInformation. @param data The collection of elements to create the data set from. @param type The Ty...
[ "Creates", "a", "DataSet", "from", "the", "given", "non", "-", "empty", "collection", ".", "Note", "that", "this", "operation", "will", "result", "in", "a", "non", "-", "parallel", "data", "source", "i", ".", "e", ".", "a", "data", "source", "with", "a...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java#L629-L631
124,026
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
ExecutionEnvironment.fromParallelCollection
private <X> DataSource<X> fromParallelCollection(SplittableIterator<X> iterator, TypeInformation<X> type, String callLocationName) { return new DataSource<>(this, new ParallelIteratorInputFormat<>(iterator), type, callLocationName); }
java
private <X> DataSource<X> fromParallelCollection(SplittableIterator<X> iterator, TypeInformation<X> type, String callLocationName) { return new DataSource<>(this, new ParallelIteratorInputFormat<>(iterator), type, callLocationName); }
[ "private", "<", "X", ">", "DataSource", "<", "X", ">", "fromParallelCollection", "(", "SplittableIterator", "<", "X", ">", "iterator", ",", "TypeInformation", "<", "X", ">", "type", ",", "String", "callLocationName", ")", "{", "return", "new", "DataSource", ...
private helper for passing different call location names
[ "private", "helper", "for", "passing", "different", "call", "location", "names" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java#L784-L786
124,027
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
ExecutionEnvironment.registerCachedFilesWithPlan
protected void registerCachedFilesWithPlan(Plan p) throws IOException { for (Tuple2<String, DistributedCacheEntry> entry : cacheFile) { p.registerCachedFile(entry.f0, entry.f1); } }
java
protected void registerCachedFilesWithPlan(Plan p) throws IOException { for (Tuple2<String, DistributedCacheEntry> entry : cacheFile) { p.registerCachedFile(entry.f0, entry.f1); } }
[ "protected", "void", "registerCachedFilesWithPlan", "(", "Plan", "p", ")", "throws", "IOException", "{", "for", "(", "Tuple2", "<", "String", ",", "DistributedCacheEntry", ">", "entry", ":", "cacheFile", ")", "{", "p", ".", "registerCachedFile", "(", "entry", ...
Registers all files that were registered at this execution environment's cache registry of the given plan's cache registry. @param p The plan to register files at. @throws IOException Thrown if checks for existence and sanity fail.
[ "Registers", "all", "files", "that", "were", "registered", "at", "this", "execution", "environment", "s", "cache", "registry", "of", "the", "given", "plan", "s", "cache", "registry", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java#L889-L893
124,028
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/operator/CepOperator.java
CepOperator.processEvent
private void processEvent(NFAState nfaState, IN event, long timestamp) throws Exception { try (SharedBufferAccessor<IN> sharedBufferAccessor = partialMatches.getAccessor()) { Collection<Map<String, List<IN>>> patterns = nfa.process(sharedBufferAccessor, nfaState, event, timestamp, afterMatchSkipStrategy, cepTi...
java
private void processEvent(NFAState nfaState, IN event, long timestamp) throws Exception { try (SharedBufferAccessor<IN> sharedBufferAccessor = partialMatches.getAccessor()) { Collection<Map<String, List<IN>>> patterns = nfa.process(sharedBufferAccessor, nfaState, event, timestamp, afterMatchSkipStrategy, cepTi...
[ "private", "void", "processEvent", "(", "NFAState", "nfaState", ",", "IN", "event", ",", "long", "timestamp", ")", "throws", "Exception", "{", "try", "(", "SharedBufferAccessor", "<", "IN", ">", "sharedBufferAccessor", "=", "partialMatches", ".", "getAccessor", ...
Process the given event by giving it to the NFA and outputting the produced set of matched event sequences. @param nfaState Our NFAState object @param event The current event to be processed @param timestamp The timestamp of the event
[ "Process", "the", "given", "event", "by", "giving", "it", "to", "the", "NFA", "and", "outputting", "the", "produced", "set", "of", "matched", "event", "sequences", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/operator/CepOperator.java#L422-L428
124,029
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AsyncDataStream.java
AsyncDataStream.addOperator
private static <IN, OUT> SingleOutputStreamOperator<OUT> addOperator( DataStream<IN> in, AsyncFunction<IN, OUT> func, long timeout, int bufSize, OutputMode mode) { TypeInformation<OUT> outTypeInfo = TypeExtractor.getUnaryOperatorReturnType( func, AsyncFunction.class, 0, 1, new int[]{1, ...
java
private static <IN, OUT> SingleOutputStreamOperator<OUT> addOperator( DataStream<IN> in, AsyncFunction<IN, OUT> func, long timeout, int bufSize, OutputMode mode) { TypeInformation<OUT> outTypeInfo = TypeExtractor.getUnaryOperatorReturnType( func, AsyncFunction.class, 0, 1, new int[]{1, ...
[ "private", "static", "<", "IN", ",", "OUT", ">", "SingleOutputStreamOperator", "<", "OUT", ">", "addOperator", "(", "DataStream", "<", "IN", ">", "in", ",", "AsyncFunction", "<", "IN", ",", "OUT", ">", "func", ",", "long", "timeout", ",", "int", "bufSize...
Add an AsyncWaitOperator. @param in The {@link DataStream} where the {@link AsyncWaitOperator} will be added. @param func {@link AsyncFunction} wrapped inside {@link AsyncWaitOperator}. @param timeout for the asynchronous operation to complete @param bufSize The max number of inputs the {@link AsyncWaitOperator} can h...
[ "Add", "an", "AsyncWaitOperator", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AsyncDataStream.java#L63-L88
124,030
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AsyncDataStream.java
AsyncDataStream.unorderedWait
public static <IN, OUT> SingleOutputStreamOperator<OUT> unorderedWait( DataStream<IN> in, AsyncFunction<IN, OUT> func, long timeout, TimeUnit timeUnit, int capacity) { return addOperator(in, func, timeUnit.toMillis(timeout), capacity, OutputMode.UNORDERED); }
java
public static <IN, OUT> SingleOutputStreamOperator<OUT> unorderedWait( DataStream<IN> in, AsyncFunction<IN, OUT> func, long timeout, TimeUnit timeUnit, int capacity) { return addOperator(in, func, timeUnit.toMillis(timeout), capacity, OutputMode.UNORDERED); }
[ "public", "static", "<", "IN", ",", "OUT", ">", "SingleOutputStreamOperator", "<", "OUT", ">", "unorderedWait", "(", "DataStream", "<", "IN", ">", "in", ",", "AsyncFunction", "<", "IN", ",", "OUT", ">", "func", ",", "long", "timeout", ",", "TimeUnit", "t...
Add an AsyncWaitOperator. The order of output stream records may be reordered. @param in Input {@link DataStream} @param func {@link AsyncFunction} @param timeout for the asynchronous operation to complete @param timeUnit of the given timeout @param capacity The max number of async i/o operation that can be triggered ...
[ "Add", "an", "AsyncWaitOperator", ".", "The", "order", "of", "output", "stream", "records", "may", "be", "reordered", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AsyncDataStream.java#L102-L109
124,031
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AsyncDataStream.java
AsyncDataStream.orderedWait
public static <IN, OUT> SingleOutputStreamOperator<OUT> orderedWait( DataStream<IN> in, AsyncFunction<IN, OUT> func, long timeout, TimeUnit timeUnit, int capacity) { return addOperator(in, func, timeUnit.toMillis(timeout), capacity, OutputMode.ORDERED); }
java
public static <IN, OUT> SingleOutputStreamOperator<OUT> orderedWait( DataStream<IN> in, AsyncFunction<IN, OUT> func, long timeout, TimeUnit timeUnit, int capacity) { return addOperator(in, func, timeUnit.toMillis(timeout), capacity, OutputMode.ORDERED); }
[ "public", "static", "<", "IN", ",", "OUT", ">", "SingleOutputStreamOperator", "<", "OUT", ">", "orderedWait", "(", "DataStream", "<", "IN", ">", "in", ",", "AsyncFunction", "<", "IN", ",", "OUT", ">", "func", ",", "long", "timeout", ",", "TimeUnit", "tim...
Add an AsyncWaitOperator. The order to process input records is guaranteed to be the same as input ones. @param in Input {@link DataStream} @param func {@link AsyncFunction} @param timeout for the asynchronous operation to complete @param timeUnit of the given timeout @param capacity The max number of async i/o operat...
[ "Add", "an", "AsyncWaitOperator", ".", "The", "order", "to", "process", "input", "records", "is", "guaranteed", "to", "be", "the", "same", "as", "input", "ones", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AsyncDataStream.java#L147-L154
124,032
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/FunctionContext.java
FunctionContext.getJobParameter
public String getJobParameter(String key, String defaultValue) { final GlobalJobParameters conf = context.getExecutionConfig().getGlobalJobParameters(); if (conf != null && conf.toMap().containsKey(key)) { return conf.toMap().get(key); } else { return defaultValue; } }
java
public String getJobParameter(String key, String defaultValue) { final GlobalJobParameters conf = context.getExecutionConfig().getGlobalJobParameters(); if (conf != null && conf.toMap().containsKey(key)) { return conf.toMap().get(key); } else { return defaultValue; } }
[ "public", "String", "getJobParameter", "(", "String", "key", ",", "String", "defaultValue", ")", "{", "final", "GlobalJobParameters", "conf", "=", "context", ".", "getExecutionConfig", "(", ")", ".", "getGlobalJobParameters", "(", ")", ";", "if", "(", "conf", ...
Gets the global job parameter value associated with the given key as a string. @param key key pointing to the associated value @param defaultValue default value which is returned in case global job parameter is null or there is no value associated with the given key @return (default) value associated with the...
[ "Gets", "the", "global", "job", "parameter", "value", "associated", "with", "the", "given", "key", "as", "a", "string", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/FunctionContext.java#L76-L83
124,033
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/time/Deadline.java
Deadline.fromNow
public static Deadline fromNow(Duration duration) { return new Deadline(Math.addExact(System.nanoTime(), duration.toNanos())); }
java
public static Deadline fromNow(Duration duration) { return new Deadline(Math.addExact(System.nanoTime(), duration.toNanos())); }
[ "public", "static", "Deadline", "fromNow", "(", "Duration", "duration", ")", "{", "return", "new", "Deadline", "(", "Math", ".", "addExact", "(", "System", ".", "nanoTime", "(", ")", ",", "duration", ".", "toNanos", "(", ")", ")", ")", ";", "}" ]
Constructs a Deadline that is a given duration after now.
[ "Constructs", "a", "Deadline", "that", "is", "a", "given", "duration", "after", "now", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/time/Deadline.java#L79-L81
124,034
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.start
public void start(ResourceManagerId newResourceManagerId, Executor newMainThreadExecutor, ResourceActions newResourceActions) { LOG.info("Starting the SlotManager."); this.resourceManagerId = Preconditions.checkNotNull(newResourceManagerId); mainThreadExecutor = Preconditions.checkNotNull(newMainThreadExecutor);...
java
public void start(ResourceManagerId newResourceManagerId, Executor newMainThreadExecutor, ResourceActions newResourceActions) { LOG.info("Starting the SlotManager."); this.resourceManagerId = Preconditions.checkNotNull(newResourceManagerId); mainThreadExecutor = Preconditions.checkNotNull(newMainThreadExecutor);...
[ "public", "void", "start", "(", "ResourceManagerId", "newResourceManagerId", ",", "Executor", "newMainThreadExecutor", ",", "ResourceActions", "newResourceActions", ")", "{", "LOG", ".", "info", "(", "\"Starting the SlotManager.\"", ")", ";", "this", ".", "resourceManag...
Starts the slot manager with the given leader id and resource manager actions. @param newResourceManagerId to use for communication with the task managers @param newMainThreadExecutor to use to run code in the ResourceManager's main thread @param newResourceActions to use for resource (de-)allocations
[ "Starts", "the", "slot", "manager", "with", "the", "given", "leader", "id", "and", "resource", "manager", "actions", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L203-L225
124,035
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.suspend
public void suspend() { LOG.info("Suspending the SlotManager."); // stop the timeout checks for the TaskManagers and the SlotRequests if (taskManagerTimeoutCheck != null) { taskManagerTimeoutCheck.cancel(false); taskManagerTimeoutCheck = null; } if (slotRequestTimeoutCheck != null) { slotRequestTim...
java
public void suspend() { LOG.info("Suspending the SlotManager."); // stop the timeout checks for the TaskManagers and the SlotRequests if (taskManagerTimeoutCheck != null) { taskManagerTimeoutCheck.cancel(false); taskManagerTimeoutCheck = null; } if (slotRequestTimeoutCheck != null) { slotRequestTim...
[ "public", "void", "suspend", "(", ")", "{", "LOG", ".", "info", "(", "\"Suspending the SlotManager.\"", ")", ";", "// stop the timeout checks for the TaskManagers and the SlotRequests", "if", "(", "taskManagerTimeoutCheck", "!=", "null", ")", "{", "taskManagerTimeoutCheck",...
Suspends the component. This clears the internal state of the slot manager.
[ "Suspends", "the", "component", ".", "This", "clears", "the", "internal", "state", "of", "the", "slot", "manager", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L230-L259
124,036
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.registerSlotRequest
public boolean registerSlotRequest(SlotRequest slotRequest) throws SlotManagerException { checkInit(); if (checkDuplicateRequest(slotRequest.getAllocationId())) { LOG.debug("Ignoring a duplicate slot request with allocation id {}.", slotRequest.getAllocationId()); return false; } else { PendingSlotRequ...
java
public boolean registerSlotRequest(SlotRequest slotRequest) throws SlotManagerException { checkInit(); if (checkDuplicateRequest(slotRequest.getAllocationId())) { LOG.debug("Ignoring a duplicate slot request with allocation id {}.", slotRequest.getAllocationId()); return false; } else { PendingSlotRequ...
[ "public", "boolean", "registerSlotRequest", "(", "SlotRequest", "slotRequest", ")", "throws", "SlotManagerException", "{", "checkInit", "(", ")", ";", "if", "(", "checkDuplicateRequest", "(", "slotRequest", ".", "getAllocationId", "(", ")", ")", ")", "{", "LOG", ...
Requests a slot with the respective resource profile. @param slotRequest specifying the requested slot specs @return true if the slot request was registered; false if the request is a duplicate @throws SlotManagerException if the slot request failed (e.g. not enough resources left)
[ "Requests", "a", "slot", "with", "the", "respective", "resource", "profile", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L284-L307
124,037
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.unregisterSlotRequest
public boolean unregisterSlotRequest(AllocationID allocationId) { checkInit(); PendingSlotRequest pendingSlotRequest = pendingSlotRequests.remove(allocationId); if (null != pendingSlotRequest) { LOG.debug("Cancel slot request {}.", allocationId); cancelPendingSlotRequest(pendingSlotRequest); return t...
java
public boolean unregisterSlotRequest(AllocationID allocationId) { checkInit(); PendingSlotRequest pendingSlotRequest = pendingSlotRequests.remove(allocationId); if (null != pendingSlotRequest) { LOG.debug("Cancel slot request {}.", allocationId); cancelPendingSlotRequest(pendingSlotRequest); return t...
[ "public", "boolean", "unregisterSlotRequest", "(", "AllocationID", "allocationId", ")", "{", "checkInit", "(", ")", ";", "PendingSlotRequest", "pendingSlotRequest", "=", "pendingSlotRequests", ".", "remove", "(", "allocationId", ")", ";", "if", "(", "null", "!=", ...
Cancels and removes a pending slot request with the given allocation id. If there is no such pending request, then nothing is done. @param allocationId identifying the pending slot request @return True if a pending slot request was found; otherwise false
[ "Cancels", "and", "removes", "a", "pending", "slot", "request", "with", "the", "given", "allocation", "id", ".", "If", "there", "is", "no", "such", "pending", "request", "then", "nothing", "is", "done", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L316-L332
124,038
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.registerTaskManager
public void registerTaskManager(final TaskExecutorConnection taskExecutorConnection, SlotReport initialSlotReport) { checkInit(); LOG.debug("Registering TaskManager {} under {} at the SlotManager.", taskExecutorConnection.getResourceID(), taskExecutorConnection.getInstanceID()); // we identify task managers by ...
java
public void registerTaskManager(final TaskExecutorConnection taskExecutorConnection, SlotReport initialSlotReport) { checkInit(); LOG.debug("Registering TaskManager {} under {} at the SlotManager.", taskExecutorConnection.getResourceID(), taskExecutorConnection.getInstanceID()); // we identify task managers by ...
[ "public", "void", "registerTaskManager", "(", "final", "TaskExecutorConnection", "taskExecutorConnection", ",", "SlotReport", "initialSlotReport", ")", "{", "checkInit", "(", ")", ";", "LOG", ".", "debug", "(", "\"Registering TaskManager {} under {} at the SlotManager.\"", ...
Registers a new task manager at the slot manager. This will make the task managers slots known and, thus, available for allocation. @param taskExecutorConnection for the new task manager @param initialSlotReport for the new task manager
[ "Registers", "a", "new", "task", "manager", "at", "the", "slot", "manager", ".", "This", "will", "make", "the", "task", "managers", "slots", "known", "and", "thus", "available", "for", "allocation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L341-L374
124,039
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.unregisterTaskManager
public boolean unregisterTaskManager(InstanceID instanceId) { checkInit(); LOG.debug("Unregister TaskManager {} from the SlotManager.", instanceId); TaskManagerRegistration taskManagerRegistration = taskManagerRegistrations.remove(instanceId); if (null != taskManagerRegistration) { internalUnregisterTaskM...
java
public boolean unregisterTaskManager(InstanceID instanceId) { checkInit(); LOG.debug("Unregister TaskManager {} from the SlotManager.", instanceId); TaskManagerRegistration taskManagerRegistration = taskManagerRegistrations.remove(instanceId); if (null != taskManagerRegistration) { internalUnregisterTaskM...
[ "public", "boolean", "unregisterTaskManager", "(", "InstanceID", "instanceId", ")", "{", "checkInit", "(", ")", ";", "LOG", ".", "debug", "(", "\"Unregister TaskManager {} from the SlotManager.\"", ",", "instanceId", ")", ";", "TaskManagerRegistration", "taskManagerRegist...
Unregisters the task manager identified by the given instance id and its associated slots from the slot manager. @param instanceId identifying the task manager to unregister @return True if there existed a registered task manager with the given instance id
[ "Unregisters", "the", "task", "manager", "identified", "by", "the", "given", "instance", "id", "and", "its", "associated", "slots", "from", "the", "slot", "manager", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L383-L399
124,040
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.reportSlotStatus
public boolean reportSlotStatus(InstanceID instanceId, SlotReport slotReport) { checkInit(); LOG.debug("Received slot report from instance {}: {}.", instanceId, slotReport); TaskManagerRegistration taskManagerRegistration = taskManagerRegistrations.get(instanceId); if (null != taskManagerRegistration) { ...
java
public boolean reportSlotStatus(InstanceID instanceId, SlotReport slotReport) { checkInit(); LOG.debug("Received slot report from instance {}: {}.", instanceId, slotReport); TaskManagerRegistration taskManagerRegistration = taskManagerRegistrations.get(instanceId); if (null != taskManagerRegistration) { ...
[ "public", "boolean", "reportSlotStatus", "(", "InstanceID", "instanceId", ",", "SlotReport", "slotReport", ")", "{", "checkInit", "(", ")", ";", "LOG", ".", "debug", "(", "\"Received slot report from instance {}: {}.\"", ",", "instanceId", ",", "slotReport", ")", ";...
Reports the current slot allocations for a task manager identified by the given instance id. @param instanceId identifying the task manager for which to report the slot status @param slotReport containing the status for all of its slots @return true if the slot status has been updated successfully, otherwise false
[ "Reports", "the", "current", "slot", "allocations", "for", "a", "task", "manager", "identified", "by", "the", "given", "instance", "id", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L408-L427
124,041
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.freeSlot
public void freeSlot(SlotID slotId, AllocationID allocationId) { checkInit(); TaskManagerSlot slot = slots.get(slotId); if (null != slot) { if (slot.getState() == TaskManagerSlot.State.ALLOCATED) { if (Objects.equals(allocationId, slot.getAllocationId())) { TaskManagerRegistration taskManagerRegist...
java
public void freeSlot(SlotID slotId, AllocationID allocationId) { checkInit(); TaskManagerSlot slot = slots.get(slotId); if (null != slot) { if (slot.getState() == TaskManagerSlot.State.ALLOCATED) { if (Objects.equals(allocationId, slot.getAllocationId())) { TaskManagerRegistration taskManagerRegist...
[ "public", "void", "freeSlot", "(", "SlotID", "slotId", ",", "AllocationID", "allocationId", ")", "{", "checkInit", "(", ")", ";", "TaskManagerSlot", "slot", "=", "slots", ".", "get", "(", "slotId", ")", ";", "if", "(", "null", "!=", "slot", ")", "{", "...
Free the given slot from the given allocation. If the slot is still allocated by the given allocation id, then the slot will be marked as free and will be subject to new slot requests. @param slotId identifying the slot to free @param allocationId with which the slot is presumably allocated
[ "Free", "the", "given", "slot", "from", "the", "given", "allocation", ".", "If", "the", "slot", "is", "still", "allocated", "by", "the", "given", "allocation", "id", "then", "the", "slot", "will", "be", "marked", "as", "free", "and", "will", "be", "subje...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L436-L463
124,042
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.findMatchingRequest
protected PendingSlotRequest findMatchingRequest(ResourceProfile slotResourceProfile) { for (PendingSlotRequest pendingSlotRequest : pendingSlotRequests.values()) { if (!pendingSlotRequest.isAssigned() && slotResourceProfile.isMatching(pendingSlotRequest.getResourceProfile())) { return pendingSlotRequest; ...
java
protected PendingSlotRequest findMatchingRequest(ResourceProfile slotResourceProfile) { for (PendingSlotRequest pendingSlotRequest : pendingSlotRequests.values()) { if (!pendingSlotRequest.isAssigned() && slotResourceProfile.isMatching(pendingSlotRequest.getResourceProfile())) { return pendingSlotRequest; ...
[ "protected", "PendingSlotRequest", "findMatchingRequest", "(", "ResourceProfile", "slotResourceProfile", ")", "{", "for", "(", "PendingSlotRequest", "pendingSlotRequest", ":", "pendingSlotRequests", ".", "values", "(", ")", ")", "{", "if", "(", "!", "pendingSlotRequest"...
Finds a matching slot request for a given resource profile. If there is no such request, the method returns null. <p>Note: If you want to change the behaviour of the slot manager wrt slot allocation and request fulfillment, then you should override this method. @param slotResourceProfile defining the resources of an ...
[ "Finds", "a", "matching", "slot", "request", "for", "a", "given", "resource", "profile", ".", "If", "there", "is", "no", "such", "request", "the", "method", "returns", "null", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L480-L489
124,043
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.findMatchingSlot
protected TaskManagerSlot findMatchingSlot(ResourceProfile requestResourceProfile) { Iterator<Map.Entry<SlotID, TaskManagerSlot>> iterator = freeSlots.entrySet().iterator(); while (iterator.hasNext()) { TaskManagerSlot taskManagerSlot = iterator.next().getValue(); // sanity check Preconditions.checkState...
java
protected TaskManagerSlot findMatchingSlot(ResourceProfile requestResourceProfile) { Iterator<Map.Entry<SlotID, TaskManagerSlot>> iterator = freeSlots.entrySet().iterator(); while (iterator.hasNext()) { TaskManagerSlot taskManagerSlot = iterator.next().getValue(); // sanity check Preconditions.checkState...
[ "protected", "TaskManagerSlot", "findMatchingSlot", "(", "ResourceProfile", "requestResourceProfile", ")", "{", "Iterator", "<", "Map", ".", "Entry", "<", "SlotID", ",", "TaskManagerSlot", ">", ">", "iterator", "=", "freeSlots", ".", "entrySet", "(", ")", ".", "...
Finds a matching slot for a given resource profile. A matching slot has at least as many resources available as the given resource profile. If there is no such slot available, then the method returns null. <p>Note: If you want to change the behaviour of the slot manager wrt slot allocation and request fulfillment, the...
[ "Finds", "a", "matching", "slot", "for", "a", "given", "resource", "profile", ".", "A", "matching", "slot", "has", "at", "least", "as", "many", "resources", "available", "as", "the", "given", "resource", "profile", ".", "If", "there", "is", "no", "such", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L503-L522
124,044
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.registerSlot
private void registerSlot( SlotID slotId, AllocationID allocationId, JobID jobId, ResourceProfile resourceProfile, TaskExecutorConnection taskManagerConnection) { if (slots.containsKey(slotId)) { // remove the old slot first removeSlot(slotId); } final TaskManagerSlot slot = createAndRegist...
java
private void registerSlot( SlotID slotId, AllocationID allocationId, JobID jobId, ResourceProfile resourceProfile, TaskExecutorConnection taskManagerConnection) { if (slots.containsKey(slotId)) { // remove the old slot first removeSlot(slotId); } final TaskManagerSlot slot = createAndRegist...
[ "private", "void", "registerSlot", "(", "SlotID", "slotId", ",", "AllocationID", "allocationId", ",", "JobID", "jobId", ",", "ResourceProfile", "resourceProfile", ",", "TaskExecutorConnection", "taskManagerConnection", ")", "{", "if", "(", "slots", ".", "containsKey",...
Registers a slot for the given task manager at the slot manager. The slot is identified by the given slot id. The given resource profile defines the available resources for the slot. The task manager connection can be used to communicate with the task manager. @param slotId identifying the slot on the task manager @pa...
[ "Registers", "a", "slot", "for", "the", "given", "task", "manager", "at", "the", "slot", "manager", ".", "The", "slot", "is", "identified", "by", "the", "given", "slot", "id", ".", "The", "given", "resource", "profile", "defines", "the", "available", "reso...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L538-L573
124,045
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.updateSlot
private boolean updateSlot(SlotID slotId, AllocationID allocationId, JobID jobId) { final TaskManagerSlot slot = slots.get(slotId); if (slot != null) { final TaskManagerRegistration taskManagerRegistration = taskManagerRegistrations.get(slot.getInstanceId()); if (taskManagerRegistration != null) { updat...
java
private boolean updateSlot(SlotID slotId, AllocationID allocationId, JobID jobId) { final TaskManagerSlot slot = slots.get(slotId); if (slot != null) { final TaskManagerRegistration taskManagerRegistration = taskManagerRegistrations.get(slot.getInstanceId()); if (taskManagerRegistration != null) { updat...
[ "private", "boolean", "updateSlot", "(", "SlotID", "slotId", ",", "AllocationID", "allocationId", ",", "JobID", "jobId", ")", "{", "final", "TaskManagerSlot", "slot", "=", "slots", ".", "get", "(", "slotId", ")", ";", "if", "(", "slot", "!=", "null", ")", ...
Updates a slot with the given allocation id. @param slotId to update @param allocationId specifying the current allocation of the slot @param jobId specifying the job to which the slot is allocated @return True if the slot could be updated; otherwise false
[ "Updates", "a", "slot", "with", "the", "given", "allocation", "id", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L604-L623
124,046
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.internalRequestSlot
private void internalRequestSlot(PendingSlotRequest pendingSlotRequest) throws ResourceManagerException { final ResourceProfile resourceProfile = pendingSlotRequest.getResourceProfile(); TaskManagerSlot taskManagerSlot = findMatchingSlot(resourceProfile); if (taskManagerSlot != null) { allocateSlot(taskManage...
java
private void internalRequestSlot(PendingSlotRequest pendingSlotRequest) throws ResourceManagerException { final ResourceProfile resourceProfile = pendingSlotRequest.getResourceProfile(); TaskManagerSlot taskManagerSlot = findMatchingSlot(resourceProfile); if (taskManagerSlot != null) { allocateSlot(taskManage...
[ "private", "void", "internalRequestSlot", "(", "PendingSlotRequest", "pendingSlotRequest", ")", "throws", "ResourceManagerException", "{", "final", "ResourceProfile", "resourceProfile", "=", "pendingSlotRequest", ".", "getResourceProfile", "(", ")", ";", "TaskManagerSlot", ...
Tries to allocate a slot for the given slot request. If there is no slot available, the resource manager is informed to allocate more resources and a timeout for the request is registered. @param pendingSlotRequest to allocate a slot for @throws ResourceManagerException if the resource manager cannot allocate more res...
[ "Tries", "to", "allocate", "a", "slot", "for", "the", "given", "slot", "request", ".", "If", "there", "is", "no", "slot", "available", "the", "resource", "manager", "is", "informed", "to", "allocate", "more", "resources", "and", "a", "timeout", "for", "the...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L709-L724
124,047
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.allocateSlot
private void allocateSlot(TaskManagerSlot taskManagerSlot, PendingSlotRequest pendingSlotRequest) { Preconditions.checkState(taskManagerSlot.getState() == TaskManagerSlot.State.FREE); TaskExecutorConnection taskExecutorConnection = taskManagerSlot.getTaskManagerConnection(); TaskExecutorGateway gateway = taskExe...
java
private void allocateSlot(TaskManagerSlot taskManagerSlot, PendingSlotRequest pendingSlotRequest) { Preconditions.checkState(taskManagerSlot.getState() == TaskManagerSlot.State.FREE); TaskExecutorConnection taskExecutorConnection = taskManagerSlot.getTaskManagerConnection(); TaskExecutorGateway gateway = taskExe...
[ "private", "void", "allocateSlot", "(", "TaskManagerSlot", "taskManagerSlot", ",", "PendingSlotRequest", "pendingSlotRequest", ")", "{", "Preconditions", ".", "checkState", "(", "taskManagerSlot", ".", "getState", "(", ")", "==", "TaskManagerSlot", ".", "State", ".", ...
Allocates the given slot for the given slot request. This entails sending a registration message to the task manager and treating failures. @param taskManagerSlot to allocate for the given slot request @param pendingSlotRequest to allocate the given slot for
[ "Allocates", "the", "given", "slot", "for", "the", "given", "slot", "request", ".", "This", "entails", "sending", "a", "registration", "message", "to", "the", "task", "manager", "and", "treating", "failures", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L767-L834
124,048
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.handleFreeSlot
private void handleFreeSlot(TaskManagerSlot freeSlot) { Preconditions.checkState(freeSlot.getState() == TaskManagerSlot.State.FREE); PendingSlotRequest pendingSlotRequest = findMatchingRequest(freeSlot.getResourceProfile()); if (null != pendingSlotRequest) { allocateSlot(freeSlot, pendingSlotRequest); } el...
java
private void handleFreeSlot(TaskManagerSlot freeSlot) { Preconditions.checkState(freeSlot.getState() == TaskManagerSlot.State.FREE); PendingSlotRequest pendingSlotRequest = findMatchingRequest(freeSlot.getResourceProfile()); if (null != pendingSlotRequest) { allocateSlot(freeSlot, pendingSlotRequest); } el...
[ "private", "void", "handleFreeSlot", "(", "TaskManagerSlot", "freeSlot", ")", "{", "Preconditions", ".", "checkState", "(", "freeSlot", ".", "getState", "(", ")", "==", "TaskManagerSlot", ".", "State", ".", "FREE", ")", ";", "PendingSlotRequest", "pendingSlotReque...
Handles a free slot. It first tries to find a pending slot request which can be fulfilled. If there is no such request, then it will add the slot to the set of free slots. @param freeSlot to find a new slot request for
[ "Handles", "a", "free", "slot", ".", "It", "first", "tries", "to", "find", "a", "pending", "slot", "request", "which", "can", "be", "fulfilled", ".", "If", "there", "is", "no", "such", "request", "then", "it", "will", "add", "the", "slot", "to", "the",...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L850-L860
124,049
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.removeSlot
private void removeSlot(SlotID slotId) { TaskManagerSlot slot = slots.remove(slotId); if (null != slot) { freeSlots.remove(slotId); if (slot.getState() == TaskManagerSlot.State.PENDING) { // reject the pending slot request --> triggering a new allocation attempt rejectPendingSlotRequest( slot.g...
java
private void removeSlot(SlotID slotId) { TaskManagerSlot slot = slots.remove(slotId); if (null != slot) { freeSlots.remove(slotId); if (slot.getState() == TaskManagerSlot.State.PENDING) { // reject the pending slot request --> triggering a new allocation attempt rejectPendingSlotRequest( slot.g...
[ "private", "void", "removeSlot", "(", "SlotID", "slotId", ")", "{", "TaskManagerSlot", "slot", "=", "slots", ".", "remove", "(", "slotId", ")", ";", "if", "(", "null", "!=", "slot", ")", "{", "freeSlots", ".", "remove", "(", "slotId", ")", ";", "if", ...
Removes the given slot from the slot manager. @param slotId identifying the slot to remove
[ "Removes", "the", "given", "slot", "from", "the", "slot", "manager", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L878-L904
124,050
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.removeSlotRequestFromSlot
private void removeSlotRequestFromSlot(SlotID slotId, AllocationID allocationId) { TaskManagerSlot taskManagerSlot = slots.get(slotId); if (null != taskManagerSlot) { if (taskManagerSlot.getState() == TaskManagerSlot.State.PENDING && Objects.equals(allocationId, taskManagerSlot.getAssignedSlotRequest().getAlloc...
java
private void removeSlotRequestFromSlot(SlotID slotId, AllocationID allocationId) { TaskManagerSlot taskManagerSlot = slots.get(slotId); if (null != taskManagerSlot) { if (taskManagerSlot.getState() == TaskManagerSlot.State.PENDING && Objects.equals(allocationId, taskManagerSlot.getAssignedSlotRequest().getAlloc...
[ "private", "void", "removeSlotRequestFromSlot", "(", "SlotID", "slotId", ",", "AllocationID", "allocationId", ")", "{", "TaskManagerSlot", "taskManagerSlot", "=", "slots", ".", "get", "(", "slotId", ")", ";", "if", "(", "null", "!=", "taskManagerSlot", ")", "{",...
Removes a pending slot request identified by the given allocation id from a slot identified by the given slot id. @param slotId identifying the slot @param allocationId identifying the presumable assigned pending slot request
[ "Removes", "a", "pending", "slot", "request", "identified", "by", "the", "given", "allocation", "id", "from", "a", "slot", "identified", "by", "the", "given", "slot", "id", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L917-L939
124,051
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.handleFailedSlotRequest
private void handleFailedSlotRequest(SlotID slotId, AllocationID allocationId, Throwable cause) { PendingSlotRequest pendingSlotRequest = pendingSlotRequests.get(allocationId); LOG.debug("Slot request with allocation id {} failed for slot {}.", allocationId, slotId, cause); if (null != pendingSlotRequest) { ...
java
private void handleFailedSlotRequest(SlotID slotId, AllocationID allocationId, Throwable cause) { PendingSlotRequest pendingSlotRequest = pendingSlotRequests.get(allocationId); LOG.debug("Slot request with allocation id {} failed for slot {}.", allocationId, slotId, cause); if (null != pendingSlotRequest) { ...
[ "private", "void", "handleFailedSlotRequest", "(", "SlotID", "slotId", ",", "AllocationID", "allocationId", ",", "Throwable", "cause", ")", "{", "PendingSlotRequest", "pendingSlotRequest", "=", "pendingSlotRequests", ".", "get", "(", "allocationId", ")", ";", "LOG", ...
Handles a failed slot request. The slot manager tries to find a new slot fulfilling the resource requirements for the failed slot request. @param slotId identifying the slot which was assigned to the slot request before @param allocationId identifying the failed slot request @param cause of the failure
[ "Handles", "a", "failed", "slot", "request", ".", "The", "slot", "manager", "tries", "to", "find", "a", "new", "slot", "fulfilling", "the", "resource", "requirements", "for", "the", "failed", "slot", "request", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L949-L970
124,052
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.cancelPendingSlotRequest
private void cancelPendingSlotRequest(PendingSlotRequest pendingSlotRequest) { CompletableFuture<Acknowledge> request = pendingSlotRequest.getRequestFuture(); returnPendingTaskManagerSlotIfAssigned(pendingSlotRequest); if (null != request) { request.cancel(false); } }
java
private void cancelPendingSlotRequest(PendingSlotRequest pendingSlotRequest) { CompletableFuture<Acknowledge> request = pendingSlotRequest.getRequestFuture(); returnPendingTaskManagerSlotIfAssigned(pendingSlotRequest); if (null != request) { request.cancel(false); } }
[ "private", "void", "cancelPendingSlotRequest", "(", "PendingSlotRequest", "pendingSlotRequest", ")", "{", "CompletableFuture", "<", "Acknowledge", ">", "request", "=", "pendingSlotRequest", ".", "getRequestFuture", "(", ")", ";", "returnPendingTaskManagerSlotIfAssigned", "(...
Cancels the given slot request. @param pendingSlotRequest to cancel
[ "Cancels", "the", "given", "slot", "request", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L994-L1002
124,053
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/KafkaTableSourceBase.java
KafkaTableSourceBase.getKafkaConsumer
protected FlinkKafkaConsumerBase<Row> getKafkaConsumer( String topic, Properties properties, DeserializationSchema<Row> deserializationSchema) { FlinkKafkaConsumerBase<Row> kafkaConsumer = createKafkaConsumer(topic, properties, deserializationSchema); switch (startupMode) { case EARLIEST: kafkaC...
java
protected FlinkKafkaConsumerBase<Row> getKafkaConsumer( String topic, Properties properties, DeserializationSchema<Row> deserializationSchema) { FlinkKafkaConsumerBase<Row> kafkaConsumer = createKafkaConsumer(topic, properties, deserializationSchema); switch (startupMode) { case EARLIEST: kafkaC...
[ "protected", "FlinkKafkaConsumerBase", "<", "Row", ">", "getKafkaConsumer", "(", "String", "topic", ",", "Properties", "properties", ",", "DeserializationSchema", "<", "Row", ">", "deserializationSchema", ")", "{", "FlinkKafkaConsumerBase", "<", "Row", ">", "kafkaCons...
Returns a version-specific Kafka consumer with the start position configured. @param topic Kafka topic to consume. @param properties Properties for the Kafka consumer. @param deserializationSchema Deserialization schema to use for Kafka records. @return The version-specific Kafka consumer
[ "Returns", "a", "version", "-", "specific", "Kafka", "consumer", "with", "the", "start", "position", "configured", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/KafkaTableSourceBase.java#L256-L277
124,054
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/tasks/AbstractInvokable.java
AbstractInvokable.triggerCheckpoint
public boolean triggerCheckpoint(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, boolean advanceToEndOfEventTime) throws Exception { throw new UnsupportedOperationException(String.format("triggerCheckpoint not supported by %s", this.getClass().getName())); }
java
public boolean triggerCheckpoint(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, boolean advanceToEndOfEventTime) throws Exception { throw new UnsupportedOperationException(String.format("triggerCheckpoint not supported by %s", this.getClass().getName())); }
[ "public", "boolean", "triggerCheckpoint", "(", "CheckpointMetaData", "checkpointMetaData", ",", "CheckpointOptions", "checkpointOptions", ",", "boolean", "advanceToEndOfEventTime", ")", "throws", "Exception", "{", "throw", "new", "UnsupportedOperationException", "(", "String"...
This method is called to trigger a checkpoint, asynchronously by the checkpoint coordinator. <p>This method is called for tasks that start the checkpoints by injecting the initial barriers, i.e., the source tasks. In contrast, checkpoints on downstream operators, which are the result of receiving checkpoint barriers, ...
[ "This", "method", "is", "called", "to", "trigger", "a", "checkpoint", "asynchronously", "by", "the", "checkpoint", "coordinator", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/tasks/AbstractInvokable.java#L211-L213
124,055
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/tasks/AbstractInvokable.java
AbstractInvokable.triggerCheckpointOnBarrier
public void triggerCheckpointOnBarrier(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, CheckpointMetrics checkpointMetrics) throws Exception { throw new UnsupportedOperationException(String.format("triggerCheckpointOnBarrier not supported by %s", this.getClass().getName())); }
java
public void triggerCheckpointOnBarrier(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, CheckpointMetrics checkpointMetrics) throws Exception { throw new UnsupportedOperationException(String.format("triggerCheckpointOnBarrier not supported by %s", this.getClass().getName())); }
[ "public", "void", "triggerCheckpointOnBarrier", "(", "CheckpointMetaData", "checkpointMetaData", ",", "CheckpointOptions", "checkpointOptions", ",", "CheckpointMetrics", "checkpointMetrics", ")", "throws", "Exception", "{", "throw", "new", "UnsupportedOperationException", "(", ...
This method is called when a checkpoint is triggered as a result of receiving checkpoint barriers on all input streams. @param checkpointMetaData Meta data for about this checkpoint @param checkpointOptions Options for performing this checkpoint @param checkpointMetrics Metrics about this checkpoint @throws Exception...
[ "This", "method", "is", "called", "when", "a", "checkpoint", "is", "triggered", "as", "a", "result", "of", "receiving", "checkpoint", "barriers", "on", "all", "input", "streams", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/tasks/AbstractInvokable.java#L225-L227
124,056
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/JobExecutionResult.java
JobExecutionResult.getAllAccumulatorResults
public Map<String, Object> getAllAccumulatorResults() { return accumulatorResults.entrySet() .stream() .collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().getUnchecked())); }
java
public Map<String, Object> getAllAccumulatorResults() { return accumulatorResults.entrySet() .stream() .collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().getUnchecked())); }
[ "public", "Map", "<", "String", ",", "Object", ">", "getAllAccumulatorResults", "(", ")", "{", "return", "accumulatorResults", ".", "entrySet", "(", ")", ".", "stream", "(", ")", ".", "collect", "(", "Collectors", ".", "toMap", "(", "Map", ".", "Entry", ...
Gets all accumulators produced by the job. The map contains the accumulators as mappings from the accumulator name to the accumulator value. @return A map containing all accumulators produced by the job.
[ "Gets", "all", "accumulators", "produced", "by", "the", "job", ".", "The", "map", "contains", "the", "accumulators", "as", "mappings", "from", "the", "accumulator", "name", "to", "the", "accumulator", "value", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/JobExecutionResult.java#L99-L103
124,057
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/JobExecutionResult.java
JobExecutionResult.getIntCounterResult
@Deprecated @PublicEvolving public Integer getIntCounterResult(String accumulatorName) { Object result = this.accumulatorResults.get(accumulatorName).getUnchecked(); if (result == null) { return null; } if (!(result instanceof Integer)) { throw new ClassCastException("Requested result of the accumulator...
java
@Deprecated @PublicEvolving public Integer getIntCounterResult(String accumulatorName) { Object result = this.accumulatorResults.get(accumulatorName).getUnchecked(); if (result == null) { return null; } if (!(result instanceof Integer)) { throw new ClassCastException("Requested result of the accumulator...
[ "@", "Deprecated", "@", "PublicEvolving", "public", "Integer", "getIntCounterResult", "(", "String", "accumulatorName", ")", "{", "Object", "result", "=", "this", ".", "accumulatorResults", ".", "get", "(", "accumulatorName", ")", ".", "getUnchecked", "(", ")", ...
Gets the accumulator with the given name as an integer. @param accumulatorName Name of the counter @return Result of the counter, or null if the counter does not exist @throws java.lang.ClassCastException Thrown, if the accumulator was not aggregating a {@link java.lang.Integer} @deprecated Will be removed in future v...
[ "Gets", "the", "accumulator", "with", "the", "given", "name", "as", "an", "integer", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/JobExecutionResult.java#L113-L125
124,058
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyMessage.java
NettyMessage.allocateBuffer
private static ByteBuf allocateBuffer( ByteBufAllocator allocator, byte id, int messageHeaderLength, int contentLength, boolean allocateForContent) { checkArgument(contentLength <= Integer.MAX_VALUE - FRAME_HEADER_LENGTH); final ByteBuf buffer; if (!allocateForContent) { buffer = allocator.dire...
java
private static ByteBuf allocateBuffer( ByteBufAllocator allocator, byte id, int messageHeaderLength, int contentLength, boolean allocateForContent) { checkArgument(contentLength <= Integer.MAX_VALUE - FRAME_HEADER_LENGTH); final ByteBuf buffer; if (!allocateForContent) { buffer = allocator.dire...
[ "private", "static", "ByteBuf", "allocateBuffer", "(", "ByteBufAllocator", "allocator", ",", "byte", "id", ",", "int", "messageHeaderLength", ",", "int", "contentLength", ",", "boolean", "allocateForContent", ")", "{", "checkArgument", "(", "contentLength", "<=", "I...
Allocates a new buffer and adds some header information for the frame decoder. <p>If the <tt>contentLength</tt> is unknown, you must write the actual length after adding the contents as an integer to position <tt>0</tt>! @param allocator byte buffer allocator to use @param id {@link NettyMessage} subclass ID @param m...
[ "Allocates", "a", "new", "buffer", "and", "adds", "some", "header", "information", "for", "the", "frame", "decoder", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyMessage.java#L136-L158
124,059
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/TwoPhaseCommitSinkFunction.java
TwoPhaseCommitSinkFunction.setTransactionTimeout
protected TwoPhaseCommitSinkFunction<IN, TXN, CONTEXT> setTransactionTimeout(long transactionTimeout) { checkArgument(transactionTimeout >= 0, "transactionTimeout must not be negative"); this.transactionTimeout = transactionTimeout; return this; }
java
protected TwoPhaseCommitSinkFunction<IN, TXN, CONTEXT> setTransactionTimeout(long transactionTimeout) { checkArgument(transactionTimeout >= 0, "transactionTimeout must not be negative"); this.transactionTimeout = transactionTimeout; return this; }
[ "protected", "TwoPhaseCommitSinkFunction", "<", "IN", ",", "TXN", ",", "CONTEXT", ">", "setTransactionTimeout", "(", "long", "transactionTimeout", ")", "{", "checkArgument", "(", "transactionTimeout", ">=", "0", ",", "\"transactionTimeout must not be negative\"", ")", "...
Sets the transaction timeout. Setting only the transaction timeout has no effect in itself. @param transactionTimeout The transaction timeout in ms. @see #ignoreFailuresAfterTransactionTimeout() @see #enableTransactionTimeoutWarnings(double)
[ "Sets", "the", "transaction", "timeout", ".", "Setting", "only", "the", "transaction", "timeout", "has", "no", "effect", "in", "itself", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/TwoPhaseCommitSinkFunction.java#L436-L440
124,060
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/utils/MurmurHash.java
MurmurHash.hash
public int hash() { hash ^= 4 * count; hash ^= hash >>> 16; hash *= 0x85ebca6b; hash ^= hash >>> 13; hash *= 0xc2b2ae35; hash ^= hash >>> 16; return hash; }
java
public int hash() { hash ^= 4 * count; hash ^= hash >>> 16; hash *= 0x85ebca6b; hash ^= hash >>> 13; hash *= 0xc2b2ae35; hash ^= hash >>> 16; return hash; }
[ "public", "int", "hash", "(", ")", "{", "hash", "^=", "4", "*", "count", ";", "hash", "^=", "hash", ">>>", "16", ";", "hash", "*=", "0x85ebca6b", ";", "hash", "^=", "hash", ">>>", "13", ";", "hash", "*=", "0xc2b2ae35", ";", "hash", "^=", "hash", ...
Finalize and return the MurmurHash output. @return 32-bit hash
[ "Finalize", "and", "return", "the", "MurmurHash", "output", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/utils/MurmurHash.java#L119-L128
124,061
apache/flink
flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/LaunchableMesosWorker.java
LaunchableMesosWorker.extractPortKeys
static Set<String> extractPortKeys(Configuration config) { final LinkedHashSet<String> tmPortKeys = new LinkedHashSet<>(TM_PORT_KEYS); final String portKeys = config.getString(PORT_ASSIGNMENTS); if (portKeys != null) { Arrays.stream(portKeys.split(",")) .map(String::trim) .peek(key -> LOG.debug("Addi...
java
static Set<String> extractPortKeys(Configuration config) { final LinkedHashSet<String> tmPortKeys = new LinkedHashSet<>(TM_PORT_KEYS); final String portKeys = config.getString(PORT_ASSIGNMENTS); if (portKeys != null) { Arrays.stream(portKeys.split(",")) .map(String::trim) .peek(key -> LOG.debug("Addi...
[ "static", "Set", "<", "String", ">", "extractPortKeys", "(", "Configuration", "config", ")", "{", "final", "LinkedHashSet", "<", "String", ">", "tmPortKeys", "=", "new", "LinkedHashSet", "<>", "(", "TM_PORT_KEYS", ")", ";", "final", "String", "portKeys", "=", ...
Get the port keys representing the TM's configured endpoints. This includes mandatory TM endpoints such as data and rpc as well as optionally configured endpoints for services such as prometheus reporter @param config to extract the port keys from @return A deterministically ordered Set of port keys to expose from the...
[ "Get", "the", "port", "keys", "representing", "the", "TM", "s", "configured", "endpoints", ".", "This", "includes", "mandatory", "TM", "endpoints", "such", "as", "data", "and", "rpc", "as", "well", "as", "optionally", "configured", "endpoints", "for", "service...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/LaunchableMesosWorker.java#L350-L363
124,062
apache/flink
flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/LaunchableMesosWorker.java
LaunchableMesosWorker.configureArtifactServer
static void configureArtifactServer(MesosArtifactServer server, ContainerSpecification container) throws IOException { // serve the artifacts associated with the container environment for (ContainerSpecification.Artifact artifact : container.getArtifacts()) { server.addPath(artifact.source, artifact.dest); } ...
java
static void configureArtifactServer(MesosArtifactServer server, ContainerSpecification container) throws IOException { // serve the artifacts associated with the container environment for (ContainerSpecification.Artifact artifact : container.getArtifacts()) { server.addPath(artifact.source, artifact.dest); } ...
[ "static", "void", "configureArtifactServer", "(", "MesosArtifactServer", "server", ",", "ContainerSpecification", "container", ")", "throws", "IOException", "{", "// serve the artifacts associated with the container environment", "for", "(", "ContainerSpecification", ".", "Artifa...
Configures an artifact server to serve the artifacts associated with a container specification. @param server the server to configure. @param container the container with artifacts to serve. @throws IOException if the artifacts cannot be accessed.
[ "Configures", "an", "artifact", "server", "to", "serve", "the", "artifacts", "associated", "with", "a", "container", "specification", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/LaunchableMesosWorker.java#L379-L384
124,063
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/generator/CirculantGraph.java
CirculantGraph.addRange
public CirculantGraph addRange(long offset, long length) { Preconditions.checkArgument(offset >= MINIMUM_OFFSET, "Range offset must be at least " + MINIMUM_OFFSET); Preconditions.checkArgument(length <= vertexCount - offset, "Range length must not be greater than the vertex count minus the range offset."); ...
java
public CirculantGraph addRange(long offset, long length) { Preconditions.checkArgument(offset >= MINIMUM_OFFSET, "Range offset must be at least " + MINIMUM_OFFSET); Preconditions.checkArgument(length <= vertexCount - offset, "Range length must not be greater than the vertex count minus the range offset."); ...
[ "public", "CirculantGraph", "addRange", "(", "long", "offset", ",", "long", "length", ")", "{", "Preconditions", ".", "checkArgument", "(", "offset", ">=", "MINIMUM_OFFSET", ",", "\"Range offset must be at least \"", "+", "MINIMUM_OFFSET", ")", ";", "Preconditions", ...
Required configuration for each range of offsets in the graph. @param offset first offset appointing the vertices' position @param length number of contiguous offsets in range @return this
[ "Required", "configuration", "for", "each", "range", "of", "offsets", "in", "the", "graph", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/generator/CirculantGraph.java#L81-L90
124,064
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java
ZooKeeperUtils.useNamespaceAndEnsurePath
public static CuratorFramework useNamespaceAndEnsurePath(final CuratorFramework client, final String path) throws Exception { Preconditions.checkNotNull(client, "client must not be null"); Preconditions.checkNotNull(path, "path must not be null"); // Ensure that the checkpoints path exists client.newNamespaceA...
java
public static CuratorFramework useNamespaceAndEnsurePath(final CuratorFramework client, final String path) throws Exception { Preconditions.checkNotNull(client, "client must not be null"); Preconditions.checkNotNull(path, "path must not be null"); // Ensure that the checkpoints path exists client.newNamespaceA...
[ "public", "static", "CuratorFramework", "useNamespaceAndEnsurePath", "(", "final", "CuratorFramework", "client", ",", "final", "String", "path", ")", "throws", "Exception", "{", "Preconditions", ".", "checkNotNull", "(", "client", ",", "\"client must not be null\"", ")"...
Returns a facade of the client that uses the specified namespace, and ensures that all nodes in the path exist. @param client ZK client @param path the new namespace @return ZK Client that uses the new namespace @throws Exception ZK errors
[ "Returns", "a", "facade", "of", "the", "client", "that", "uses", "the", "specified", "namespace", "and", "ensures", "that", "all", "nodes", "in", "the", "path", "exist", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java#L392-L402
124,065
apache/flink
flink-core/src/main/java/org/apache/flink/util/ReflectionUtil.java
ReflectionUtil.getFullTemplateType
public static FullTypeInfo getFullTemplateType(Type type, int templatePosition) { if (type instanceof ParameterizedType) { return getFullTemplateType(((ParameterizedType) type).getActualTypeArguments()[templatePosition]); } else { throw new IllegalArgumentException(); } }
java
public static FullTypeInfo getFullTemplateType(Type type, int templatePosition) { if (type instanceof ParameterizedType) { return getFullTemplateType(((ParameterizedType) type).getActualTypeArguments()[templatePosition]); } else { throw new IllegalArgumentException(); } }
[ "public", "static", "FullTypeInfo", "getFullTemplateType", "(", "Type", "type", ",", "int", "templatePosition", ")", "{", "if", "(", "type", "instanceof", "ParameterizedType", ")", "{", "return", "getFullTemplateType", "(", "(", "(", "ParameterizedType", ")", "typ...
Extract the full template type information from the given type's template parameter at the given position. @param type type to extract the full template parameter information from @param templatePosition describing at which position the template type parameter is @return Full type information describing the template p...
[ "Extract", "the", "full", "template", "type", "information", "from", "the", "given", "type", "s", "template", "parameter", "at", "the", "given", "position", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/ReflectionUtil.java#L169-L175
124,066
apache/flink
flink-core/src/main/java/org/apache/flink/util/ReflectionUtil.java
ReflectionUtil.getFullTemplateType
public static FullTypeInfo getFullTemplateType(Type type) { if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; FullTypeInfo[] templateTypeInfos = new FullTypeInfo[parameterizedType.getActualTypeArguments().length]; for (int i = 0; i < parameterizedType....
java
public static FullTypeInfo getFullTemplateType(Type type) { if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; FullTypeInfo[] templateTypeInfos = new FullTypeInfo[parameterizedType.getActualTypeArguments().length]; for (int i = 0; i < parameterizedType....
[ "public", "static", "FullTypeInfo", "getFullTemplateType", "(", "Type", "type", ")", "{", "if", "(", "type", "instanceof", "ParameterizedType", ")", "{", "ParameterizedType", "parameterizedType", "=", "(", "ParameterizedType", ")", "type", ";", "FullTypeInfo", "[", ...
Extract the full type information from the given type. @param type to be analyzed @return Full type information describing the given type
[ "Extract", "the", "full", "type", "information", "from", "the", "given", "type", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/ReflectionUtil.java#L183-L197
124,067
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlLikeUtils.java
SqlLikeUtils.sqlToRegexLike
static String sqlToRegexLike( String sqlPattern, char escapeChar) { int i; final int len = sqlPattern.length(); final StringBuilder javaPattern = new StringBuilder(len + len); for (i = 0; i < len; i++) { char c = sqlPattern.charAt(i); if (JAVA_REGEX_SPECIALS.indexOf(c) >= 0) { javaPattern.append('...
java
static String sqlToRegexLike( String sqlPattern, char escapeChar) { int i; final int len = sqlPattern.length(); final StringBuilder javaPattern = new StringBuilder(len + len); for (i = 0; i < len; i++) { char c = sqlPattern.charAt(i); if (JAVA_REGEX_SPECIALS.indexOf(c) >= 0) { javaPattern.append('...
[ "static", "String", "sqlToRegexLike", "(", "String", "sqlPattern", ",", "char", "escapeChar", ")", "{", "int", "i", ";", "final", "int", "len", "=", "sqlPattern", ".", "length", "(", ")", ";", "final", "StringBuilder", "javaPattern", "=", "new", "StringBuild...
Translates a SQL LIKE pattern to Java regex pattern.
[ "Translates", "a", "SQL", "LIKE", "pattern", "to", "Java", "regex", "pattern", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlLikeUtils.java#L71-L104
124,068
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlLikeUtils.java
SqlLikeUtils.sqlToRegexSimilar
static String sqlToRegexSimilar( String sqlPattern, CharSequence escapeStr) { final char escapeChar; if (escapeStr != null) { if (escapeStr.length() != 1) { throw invalidEscapeCharacter(escapeStr.toString()); } escapeChar = escapeStr.charAt(0); } else { escapeChar = 0; } return sqlToRegexS...
java
static String sqlToRegexSimilar( String sqlPattern, CharSequence escapeStr) { final char escapeChar; if (escapeStr != null) { if (escapeStr.length() != 1) { throw invalidEscapeCharacter(escapeStr.toString()); } escapeChar = escapeStr.charAt(0); } else { escapeChar = 0; } return sqlToRegexS...
[ "static", "String", "sqlToRegexSimilar", "(", "String", "sqlPattern", ",", "CharSequence", "escapeStr", ")", "{", "final", "char", "escapeChar", ";", "if", "(", "escapeStr", "!=", "null", ")", "{", "if", "(", "escapeStr", ".", "length", "(", ")", "!=", "1"...
Translates a SQL SIMILAR pattern to Java regex pattern, with optional escape string.
[ "Translates", "a", "SQL", "SIMILAR", "pattern", "to", "Java", "regex", "pattern", "with", "optional", "escape", "string", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlLikeUtils.java#L213-L226
124,069
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlLikeUtils.java
SqlLikeUtils.sqlToRegexSimilar
static String sqlToRegexSimilar( String sqlPattern, char escapeChar) { similarEscapeRuleChecking(sqlPattern, escapeChar); boolean insideCharacterEnumeration = false; final StringBuilder javaPattern = new StringBuilder(sqlPattern.length() * 2); final int len = sqlPattern.length(); for (int i = 0; i < l...
java
static String sqlToRegexSimilar( String sqlPattern, char escapeChar) { similarEscapeRuleChecking(sqlPattern, escapeChar); boolean insideCharacterEnumeration = false; final StringBuilder javaPattern = new StringBuilder(sqlPattern.length() * 2); final int len = sqlPattern.length(); for (int i = 0; i < l...
[ "static", "String", "sqlToRegexSimilar", "(", "String", "sqlPattern", ",", "char", "escapeChar", ")", "{", "similarEscapeRuleChecking", "(", "sqlPattern", ",", "escapeChar", ")", ";", "boolean", "insideCharacterEnumeration", "=", "false", ";", "final", "StringBuilder"...
Translates SQL SIMILAR pattern to Java regex pattern.
[ "Translates", "SQL", "SIMILAR", "pattern", "to", "Java", "regex", "pattern", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlLikeUtils.java#L231-L306
124,070
apache/flink
flink-docs/src/main/java/org/apache/flink/docs/configuration/ConfigOptionsDocGenerator.java
ConfigOptionsDocGenerator.toHtmlTable
private static String toHtmlTable(final List<OptionWithMetaInfo> options) { StringBuilder htmlTable = new StringBuilder(); htmlTable.append("<table class=\"table table-bordered\">\n"); htmlTable.append(" <thead>\n"); htmlTable.append(" <tr>\n"); htmlTable.append(" <th class=\"text-left\" ...
java
private static String toHtmlTable(final List<OptionWithMetaInfo> options) { StringBuilder htmlTable = new StringBuilder(); htmlTable.append("<table class=\"table table-bordered\">\n"); htmlTable.append(" <thead>\n"); htmlTable.append(" <tr>\n"); htmlTable.append(" <th class=\"text-left\" ...
[ "private", "static", "String", "toHtmlTable", "(", "final", "List", "<", "OptionWithMetaInfo", ">", "options", ")", "{", "StringBuilder", "htmlTable", "=", "new", "StringBuilder", "(", ")", ";", "htmlTable", ".", "append", "(", "\"<table class=\\\"table table-border...
Transforms this configuration group into HTML formatted table. Options are sorted alphabetically by key. @param options list of options to include in this group @return string containing HTML formatted table
[ "Transforms", "this", "configuration", "group", "into", "HTML", "formatted", "table", ".", "Options", "are", "sorted", "alphabetically", "by", "key", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-docs/src/main/java/org/apache/flink/docs/configuration/ConfigOptionsDocGenerator.java#L232-L252
124,071
apache/flink
flink-docs/src/main/java/org/apache/flink/docs/configuration/ConfigOptionsDocGenerator.java
ConfigOptionsDocGenerator.toHtmlString
private static String toHtmlString(final OptionWithMetaInfo optionWithMetaInfo) { ConfigOption<?> option = optionWithMetaInfo.option; String defaultValue = stringifyDefault(optionWithMetaInfo); return "" + " <tr>\n" + " <td><h5>" + escapeCharacters(option.key()) + "</h5></td>\n" + " ...
java
private static String toHtmlString(final OptionWithMetaInfo optionWithMetaInfo) { ConfigOption<?> option = optionWithMetaInfo.option; String defaultValue = stringifyDefault(optionWithMetaInfo); return "" + " <tr>\n" + " <td><h5>" + escapeCharacters(option.key()) + "</h5></td>\n" + " ...
[ "private", "static", "String", "toHtmlString", "(", "final", "OptionWithMetaInfo", "optionWithMetaInfo", ")", "{", "ConfigOption", "<", "?", ">", "option", "=", "optionWithMetaInfo", ".", "option", ";", "String", "defaultValue", "=", "stringifyDefault", "(", "option...
Transforms option to table row. @param optionWithMetaInfo option to transform @return row with the option description
[ "Transforms", "option", "to", "table", "row", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-docs/src/main/java/org/apache/flink/docs/configuration/ConfigOptionsDocGenerator.java#L260-L270
124,072
apache/flink
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackend.java
RocksDBKeyedStateBackend.dispose
@Override public void dispose() { if (this.disposed) { return; } super.dispose(); // This call will block until all clients that still acquire access to the RocksDB instance have released it, // so that we cannot release the native resources while clients are still working with it in parallel. rocksDBR...
java
@Override public void dispose() { if (this.disposed) { return; } super.dispose(); // This call will block until all clients that still acquire access to the RocksDB instance have released it, // so that we cannot release the native resources while clients are still working with it in parallel. rocksDBR...
[ "@", "Override", "public", "void", "dispose", "(", ")", "{", "if", "(", "this", ".", "disposed", ")", "{", "return", ";", "}", "super", ".", "dispose", "(", ")", ";", "// This call will block until all clients that still acquire access to the RocksDB instance have rel...
Should only be called by one thread, and only after all accesses to the DB happened.
[ "Should", "only", "be", "called", "by", "one", "thread", "and", "only", "after", "all", "accesses", "to", "the", "DB", "happened", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackend.java#L305-L359
124,073
apache/flink
flink-core/src/main/java/org/apache/flink/types/StringValue.java
StringValue.startsWith
public boolean startsWith(CharSequence prefix, int startIndex) { final char[] thisChars = this.value; final int pLen = this.len; final int sLen = prefix.length(); if ((startIndex < 0) || (startIndex > pLen - sLen)) { return false; } int sPos = 0; while (sPos < sLen) { if (thisChars[startIndex++...
java
public boolean startsWith(CharSequence prefix, int startIndex) { final char[] thisChars = this.value; final int pLen = this.len; final int sLen = prefix.length(); if ((startIndex < 0) || (startIndex > pLen - sLen)) { return false; } int sPos = 0; while (sPos < sLen) { if (thisChars[startIndex++...
[ "public", "boolean", "startsWith", "(", "CharSequence", "prefix", ",", "int", "startIndex", ")", "{", "final", "char", "[", "]", "thisChars", "=", "this", ".", "value", ";", "final", "int", "pLen", "=", "this", ".", "len", ";", "final", "int", "sLen", ...
Checks whether the substring, starting at the specified index, starts with the given prefix string. @param prefix The prefix character sequence. @param startIndex The position to start checking for the prefix. @return True, if this StringValue substring, starting at position <code>startIndex</code> has <code>prefix</...
[ "Checks", "whether", "the", "substring", "starting", "at", "the", "specified", "index", "starts", "with", "the", "given", "prefix", "string", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/StringValue.java#L383-L399
124,074
apache/flink
flink-core/src/main/java/org/apache/flink/types/StringValue.java
StringValue.grow
private void grow(int size) { if (this.value.length < size) { char[] value = new char[ Math.max(this.value.length * 3 / 2, size)]; System.arraycopy(this.value, 0, value, 0, this.len); this.value = value; } }
java
private void grow(int size) { if (this.value.length < size) { char[] value = new char[ Math.max(this.value.length * 3 / 2, size)]; System.arraycopy(this.value, 0, value, 0, this.len); this.value = value; } }
[ "private", "void", "grow", "(", "int", "size", ")", "{", "if", "(", "this", ".", "value", ".", "length", "<", "size", ")", "{", "char", "[", "]", "value", "=", "new", "char", "[", "Math", ".", "max", "(", "this", ".", "value", ".", "length", "*...
Grow and retain content.
[ "Grow", "and", "retain", "content", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/StringValue.java#L732-L738
124,075
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/ExternalCatalogTable.java
ExternalCatalogTable.getTableStats
@Deprecated public Optional<TableStats> getTableStats() { DescriptorProperties normalizedProps = new DescriptorProperties(); normalizedProps.putProperties(normalizedProps); Optional<Long> rowCount = normalizedProps.getOptionalLong(STATISTICS_ROW_COUNT); if (rowCount.isPresent()) { Map<String, ColumnStats> c...
java
@Deprecated public Optional<TableStats> getTableStats() { DescriptorProperties normalizedProps = new DescriptorProperties(); normalizedProps.putProperties(normalizedProps); Optional<Long> rowCount = normalizedProps.getOptionalLong(STATISTICS_ROW_COUNT); if (rowCount.isPresent()) { Map<String, ColumnStats> c...
[ "@", "Deprecated", "public", "Optional", "<", "TableStats", ">", "getTableStats", "(", ")", "{", "DescriptorProperties", "normalizedProps", "=", "new", "DescriptorProperties", "(", ")", ";", "normalizedProps", ".", "putProperties", "(", "normalizedProps", ")", ";", ...
Reads table statistics from the descriptors properties. @deprecated This method exists for backwards-compatibility only.
[ "Reads", "table", "statistics", "from", "the", "descriptors", "properties", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/ExternalCatalogTable.java#L93-L104
124,076
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/io/HeaderlessChannelWriterOutputView.java
HeaderlessChannelWriterOutputView.close
@Override public int close() throws IOException { if (!writer.isClosed()) { int currentPositionInSegment = getCurrentPositionInSegment(); // write last segment writer.writeBlock(getCurrentSegment()); clear(); writer.getReturnQueue().clear(); this.writer.close(); return currentPositionInSegment...
java
@Override public int close() throws IOException { if (!writer.isClosed()) { int currentPositionInSegment = getCurrentPositionInSegment(); // write last segment writer.writeBlock(getCurrentSegment()); clear(); writer.getReturnQueue().clear(); this.writer.close(); return currentPositionInSegment...
[ "@", "Override", "public", "int", "close", "(", ")", "throws", "IOException", "{", "if", "(", "!", "writer", ".", "isClosed", "(", ")", ")", "{", "int", "currentPositionInSegment", "=", "getCurrentPositionInSegment", "(", ")", ";", "// write last segment", "wr...
Closes this OutputView, closing the underlying writer. And return number bytes in last memory segment.
[ "Closes", "this", "OutputView", "closing", "the", "underlying", "writer", ".", "And", "return", "number", "bytes", "in", "last", "memory", "segment", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/io/HeaderlessChannelWriterOutputView.java#L83-L97
124,077
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/pregel/VertexCentricConfiguration.java
VertexCentricConfiguration.addBroadcastSet
public void addBroadcastSet(String name, DataSet<?> data) { this.bcVars.add(new Tuple2<>(name, data)); }
java
public void addBroadcastSet(String name, DataSet<?> data) { this.bcVars.add(new Tuple2<>(name, data)); }
[ "public", "void", "addBroadcastSet", "(", "String", "name", ",", "DataSet", "<", "?", ">", "data", ")", "{", "this", ".", "bcVars", ".", "add", "(", "new", "Tuple2", "<>", "(", "name", ",", "data", ")", ")", ";", "}" ]
Adds a data set as a broadcast set to the compute function. @param name The name under which the broadcast data set is available in the compute function. @param data The data set to be broadcast.
[ "Adds", "a", "data", "set", "as", "a", "broadcast", "set", "to", "the", "compute", "function", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/pregel/VertexCentricConfiguration.java#L50-L52
124,078
apache/flink
flink-optimizer/src/main/java/org/apache/flink/optimizer/Optimizer.java
Optimizer.compile
public OptimizedPlan compile(Plan program) throws CompilerException { final OptimizerPostPass postPasser = getPostPassFromPlan(program); return compile(program, postPasser); }
java
public OptimizedPlan compile(Plan program) throws CompilerException { final OptimizerPostPass postPasser = getPostPassFromPlan(program); return compile(program, postPasser); }
[ "public", "OptimizedPlan", "compile", "(", "Plan", "program", ")", "throws", "CompilerException", "{", "final", "OptimizerPostPass", "postPasser", "=", "getPostPassFromPlan", "(", "program", ")", ";", "return", "compile", "(", "program", ",", "postPasser", ")", ";...
Translates the given program to an OptimizedPlan, where all nodes have their local strategy assigned and all channels have a shipping strategy assigned. For more details on the optimization phase, see the comments for {@link #compile(org.apache.flink.api.common.Plan, org.apache.flink.optimizer.postpass.OptimizerPostPa...
[ "Translates", "the", "given", "program", "to", "an", "OptimizedPlan", "where", "all", "nodes", "have", "their", "local", "strategy", "assigned", "and", "all", "channels", "have", "a", "shipping", "strategy", "assigned", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/Optimizer.java#L397-L400
124,079
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java
ResultPartition.registerBufferPool
public void registerBufferPool(BufferPool bufferPool) { checkArgument(bufferPool.getNumberOfRequiredMemorySegments() >= getNumberOfSubpartitions(), "Bug in result partition setup logic: Buffer pool has not enough guaranteed buffers for this result partition."); checkState(this.bufferPool == null, "Bug in resul...
java
public void registerBufferPool(BufferPool bufferPool) { checkArgument(bufferPool.getNumberOfRequiredMemorySegments() >= getNumberOfSubpartitions(), "Bug in result partition setup logic: Buffer pool has not enough guaranteed buffers for this result partition."); checkState(this.bufferPool == null, "Bug in resul...
[ "public", "void", "registerBufferPool", "(", "BufferPool", "bufferPool", ")", "{", "checkArgument", "(", "bufferPool", ".", "getNumberOfRequiredMemorySegments", "(", ")", ">=", "getNumberOfSubpartitions", "(", ")", ",", "\"Bug in result partition setup logic: Buffer pool has ...
Registers a buffer pool with this result partition. <p>There is one pool for each result partition, which is shared by all its sub partitions. <p>The pool is registered with the partition *after* it as been constructed in order to conform to the life-cycle of task registrations in the {@link TaskExecutor}.
[ "Registers", "a", "buffer", "pool", "with", "this", "result", "partition", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java#L185-L192
124,080
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java
ResultPartition.finish
public void finish() throws IOException { boolean success = false; try { checkInProduceState(); for (ResultSubpartition subpartition : subpartitions) { subpartition.finish(); } success = true; } finally { if (success) { isFinished = true; notifyPipelinedConsumers(); } } }
java
public void finish() throws IOException { boolean success = false; try { checkInProduceState(); for (ResultSubpartition subpartition : subpartitions) { subpartition.finish(); } success = true; } finally { if (success) { isFinished = true; notifyPipelinedConsumers(); } } }
[ "public", "void", "finish", "(", ")", "throws", "IOException", "{", "boolean", "success", "=", "false", ";", "try", "{", "checkInProduceState", "(", ")", ";", "for", "(", "ResultSubpartition", "subpartition", ":", "subpartitions", ")", "{", "subpartition", "."...
Finishes the result partition. <p>After this operation, it is not possible to add further data to the result partition. <p>For BLOCKING results, this will trigger the deployment of consuming tasks.
[ "Finishes", "the", "result", "partition", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java#L279-L298
124,081
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java
ResultPartition.release
public void release(Throwable cause) { if (isReleased.compareAndSet(false, true)) { LOG.debug("{}: Releasing {}.", owningTaskName, this); // Set the error cause if (cause != null) { this.cause = cause; } // Release all subpartitions for (ResultSubpartition subpartition : subpartitions) { t...
java
public void release(Throwable cause) { if (isReleased.compareAndSet(false, true)) { LOG.debug("{}: Releasing {}.", owningTaskName, this); // Set the error cause if (cause != null) { this.cause = cause; } // Release all subpartitions for (ResultSubpartition subpartition : subpartitions) { t...
[ "public", "void", "release", "(", "Throwable", "cause", ")", "{", "if", "(", "isReleased", ".", "compareAndSet", "(", "false", ",", "true", ")", ")", "{", "LOG", ".", "debug", "(", "\"{}: Releasing {}.\"", ",", "owningTaskName", ",", "this", ")", ";", "/...
Releases the result partition.
[ "Releases", "the", "result", "partition", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java#L307-L327
124,082
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java
ResultPartition.createSubpartitionView
public ResultSubpartitionView createSubpartitionView(int index, BufferAvailabilityListener availabilityListener) throws IOException { int refCnt = pendingReferences.get(); checkState(refCnt != -1, "Partition released."); checkState(refCnt > 0, "Partition not pinned."); checkElementIndex(index, subpartitions.l...
java
public ResultSubpartitionView createSubpartitionView(int index, BufferAvailabilityListener availabilityListener) throws IOException { int refCnt = pendingReferences.get(); checkState(refCnt != -1, "Partition released."); checkState(refCnt > 0, "Partition not pinned."); checkElementIndex(index, subpartitions.l...
[ "public", "ResultSubpartitionView", "createSubpartitionView", "(", "int", "index", ",", "BufferAvailabilityListener", "availabilityListener", ")", "throws", "IOException", "{", "int", "refCnt", "=", "pendingReferences", ".", "get", "(", ")", ";", "checkState", "(", "r...
Returns the requested subpartition.
[ "Returns", "the", "requested", "subpartition", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java#L343-L356
124,083
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java
ResultPartition.releaseMemory
@Override public void releaseMemory(int toRelease) throws IOException { checkArgument(toRelease > 0); for (ResultSubpartition subpartition : subpartitions) { toRelease -= subpartition.releaseMemory(); // Only release as much memory as needed if (toRelease <= 0) { break; } } }
java
@Override public void releaseMemory(int toRelease) throws IOException { checkArgument(toRelease > 0); for (ResultSubpartition subpartition : subpartitions) { toRelease -= subpartition.releaseMemory(); // Only release as much memory as needed if (toRelease <= 0) { break; } } }
[ "@", "Override", "public", "void", "releaseMemory", "(", "int", "toRelease", ")", "throws", "IOException", "{", "checkArgument", "(", "toRelease", ">", "0", ")", ";", "for", "(", "ResultSubpartition", "subpartition", ":", "subpartitions", ")", "{", "toRelease", ...
Releases buffers held by this result partition. <p>This is a callback from the buffer pool, which is registered for result partitions, which are back pressure-free.
[ "Releases", "buffers", "held", "by", "this", "result", "partition", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java#L373-L385
124,084
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java
ResultPartition.pin
void pin() { while (true) { int refCnt = pendingReferences.get(); if (refCnt >= 0) { if (pendingReferences.compareAndSet(refCnt, refCnt + subpartitions.length)) { break; } } else { throw new IllegalStateException("Released."); } } }
java
void pin() { while (true) { int refCnt = pendingReferences.get(); if (refCnt >= 0) { if (pendingReferences.compareAndSet(refCnt, refCnt + subpartitions.length)) { break; } } else { throw new IllegalStateException("Released."); } } }
[ "void", "pin", "(", ")", "{", "while", "(", "true", ")", "{", "int", "refCnt", "=", "pendingReferences", ".", "get", "(", ")", ";", "if", "(", "refCnt", ">=", "0", ")", "{", "if", "(", "pendingReferences", ".", "compareAndSet", "(", "refCnt", ",", ...
Pins the result partition. <p>The partition can only be released after each subpartition has been consumed once per pin operation.
[ "Pins", "the", "result", "partition", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java#L412-L425
124,085
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java
ResultPartition.onConsumedSubpartition
void onConsumedSubpartition(int subpartitionIndex) { if (isReleased.get()) { return; } int refCnt = pendingReferences.decrementAndGet(); if (refCnt == 0) { partitionManager.onConsumedPartition(this); } else if (refCnt < 0) { throw new IllegalStateException("All references released."); } LOG...
java
void onConsumedSubpartition(int subpartitionIndex) { if (isReleased.get()) { return; } int refCnt = pendingReferences.decrementAndGet(); if (refCnt == 0) { partitionManager.onConsumedPartition(this); } else if (refCnt < 0) { throw new IllegalStateException("All references released."); } LOG...
[ "void", "onConsumedSubpartition", "(", "int", "subpartitionIndex", ")", "{", "if", "(", "isReleased", ".", "get", "(", ")", ")", "{", "return", ";", "}", "int", "refCnt", "=", "pendingReferences", ".", "decrementAndGet", "(", ")", ";", "if", "(", "refCnt",...
Notification when a subpartition is released.
[ "Notification", "when", "a", "subpartition", "is", "released", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java#L430-L447
124,086
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java
ResultPartition.notifyPipelinedConsumers
private void notifyPipelinedConsumers() { if (sendScheduleOrUpdateConsumersMessage && !hasNotifiedPipelinedConsumers && partitionType.isPipelined()) { partitionConsumableNotifier.notifyPartitionConsumable(jobId, partitionId, taskActions); hasNotifiedPipelinedConsumers = true; } }
java
private void notifyPipelinedConsumers() { if (sendScheduleOrUpdateConsumersMessage && !hasNotifiedPipelinedConsumers && partitionType.isPipelined()) { partitionConsumableNotifier.notifyPartitionConsumable(jobId, partitionId, taskActions); hasNotifiedPipelinedConsumers = true; } }
[ "private", "void", "notifyPipelinedConsumers", "(", ")", "{", "if", "(", "sendScheduleOrUpdateConsumersMessage", "&&", "!", "hasNotifiedPipelinedConsumers", "&&", "partitionType", ".", "isPipelined", "(", ")", ")", "{", "partitionConsumableNotifier", ".", "notifyPartition...
Notifies pipelined consumers of this result partition once.
[ "Notifies", "pipelined", "consumers", "of", "this", "result", "partition", "once", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java#L462-L468
124,087
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/generator/RMatGraph.java
RMatGraph.setConstants
public RMatGraph<T> setConstants(float a, float b, float c) { Preconditions.checkArgument(a >= 0.0f && b >= 0.0f && c >= 0.0f && a + b + c <= 1.0f, "RMat parameters A, B, and C must be non-negative and sum to less than or equal to one"); this.a = a; this.b = b; this.c = c; return this; }
java
public RMatGraph<T> setConstants(float a, float b, float c) { Preconditions.checkArgument(a >= 0.0f && b >= 0.0f && c >= 0.0f && a + b + c <= 1.0f, "RMat parameters A, B, and C must be non-negative and sum to less than or equal to one"); this.a = a; this.b = b; this.c = c; return this; }
[ "public", "RMatGraph", "<", "T", ">", "setConstants", "(", "float", "a", ",", "float", "b", ",", "float", "c", ")", "{", "Preconditions", ".", "checkArgument", "(", "a", ">=", "0.0f", "&&", "b", ">=", "0.0f", "&&", "c", ">=", "0.0f", "&&", "a", "+"...
The parameters for recursively subdividing the adjacency matrix. <p>Setting A = B = C = 0.25 emulates the Erdős–Rényi model. <p>Graph500 uses A = 0.57, B = C = 0.19. @param a likelihood of source bit = 0, target bit = 0 @param b likelihood of source bit = 0, target bit = 1 @param c likelihood of source bit = 1, targ...
[ "The", "parameters", "for", "recursively", "subdividing", "the", "adjacency", "matrix", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/generator/RMatGraph.java#L112-L121
124,088
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/generator/RMatGraph.java
RMatGraph.setNoise
public RMatGraph<T> setNoise(boolean noiseEnabled, float noise) { Preconditions.checkArgument(noise >= 0.0f && noise <= 2.0f, "RMat parameter noise must be non-negative and less than or equal to 2.0"); this.noiseEnabled = noiseEnabled; this.noise = noise; return this; }
java
public RMatGraph<T> setNoise(boolean noiseEnabled, float noise) { Preconditions.checkArgument(noise >= 0.0f && noise <= 2.0f, "RMat parameter noise must be non-negative and less than or equal to 2.0"); this.noiseEnabled = noiseEnabled; this.noise = noise; return this; }
[ "public", "RMatGraph", "<", "T", ">", "setNoise", "(", "boolean", "noiseEnabled", ",", "float", "noise", ")", "{", "Preconditions", ".", "checkArgument", "(", "noise", ">=", "0.0f", "&&", "noise", "<=", "2.0f", ",", "\"RMat parameter noise must be non-negative and...
Enable and configure noise. Each edge is generated independently, but when noise is enabled the parameters A, B, and C are randomly increased or decreased, then normalized, by a fraction of the noise factor during the computation of each bit. @param noiseEnabled whether to enable noise perturbation @param noise streng...
[ "Enable", "and", "configure", "noise", ".", "Each", "edge", "is", "generated", "independently", "but", "when", "noise", "is", "enabled", "the", "parameters", "A", "B", "and", "C", "are", "randomly", "increased", "or", "decreased", "then", "normalized", "by", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/generator/RMatGraph.java#L133-L141
124,089
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/IterativeStream.java
IterativeStream.closeWith
@SuppressWarnings({ "unchecked", "rawtypes" }) public DataStream<T> closeWith(DataStream<T> feedbackStream) { Collection<StreamTransformation<?>> predecessors = feedbackStream.getTransformation().getTransitivePredecessors(); if (!predecessors.contains(this.transformation)) { throw new UnsupportedOperationExce...
java
@SuppressWarnings({ "unchecked", "rawtypes" }) public DataStream<T> closeWith(DataStream<T> feedbackStream) { Collection<StreamTransformation<?>> predecessors = feedbackStream.getTransformation().getTransitivePredecessors(); if (!predecessors.contains(this.transformation)) { throw new UnsupportedOperationExce...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "public", "DataStream", "<", "T", ">", "closeWith", "(", "DataStream", "<", "T", ">", "feedbackStream", ")", "{", "Collection", "<", "StreamTransformation", "<", "?", ">", ">"...
Closes the iteration. This method defines the end of the iterative program part that will be fed back to the start of the iteration. <p>A common usage pattern for streaming iterations is to use output splitting to send a part of the closing data stream to the head. Refer to {@link DataStream#split(org.apache.flink.str...
[ "Closes", "the", "iteration", ".", "This", "method", "defines", "the", "end", "of", "the", "iterative", "program", "part", "that", "will", "be", "fed", "back", "to", "the", "start", "of", "the", "iteration", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/IterativeStream.java#L67-L80
124,090
apache/flink
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliClient.java
CliClient.open
public void open() { isRunning = true; // print welcome terminal.writer().append(CliStrings.MESSAGE_WELCOME); // begin reading loop while (isRunning) { // make some space to previous command terminal.writer().append("\n"); terminal.flush(); final String line; try { line = lineReader.read...
java
public void open() { isRunning = true; // print welcome terminal.writer().append(CliStrings.MESSAGE_WELCOME); // begin reading loop while (isRunning) { // make some space to previous command terminal.writer().append("\n"); terminal.flush(); final String line; try { line = lineReader.read...
[ "public", "void", "open", "(", ")", "{", "isRunning", "=", "true", ";", "// print welcome", "terminal", ".", "writer", "(", ")", ".", "append", "(", "CliStrings", ".", "MESSAGE_WELCOME", ")", ";", "// begin reading loop", "while", "(", "isRunning", ")", "{",...
Opens the interactive CLI shell.
[ "Opens", "the", "interactive", "CLI", "shell", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliClient.java#L172-L202
124,091
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/SlotProfile.java
SlotProfile.noLocality
public static SlotProfile noLocality(ResourceProfile resourceProfile) { return new SlotProfile(resourceProfile, Collections.emptyList(), Collections.emptyList()); }
java
public static SlotProfile noLocality(ResourceProfile resourceProfile) { return new SlotProfile(resourceProfile, Collections.emptyList(), Collections.emptyList()); }
[ "public", "static", "SlotProfile", "noLocality", "(", "ResourceProfile", "resourceProfile", ")", "{", "return", "new", "SlotProfile", "(", "resourceProfile", ",", "Collections", ".", "emptyList", "(", ")", ",", "Collections", ".", "emptyList", "(", ")", ")", ";"...
Returns a slot profile for the given resource profile, without any locality requirements.
[ "Returns", "a", "slot", "profile", "for", "the", "given", "resource", "profile", "without", "any", "locality", "requirements", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/SlotProfile.java#L121-L123
124,092
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/SlotProfile.java
SlotProfile.preferredLocality
public static SlotProfile preferredLocality(ResourceProfile resourceProfile, Collection<TaskManagerLocation> preferredLocations) { return new SlotProfile(resourceProfile, preferredLocations, Collections.emptyList()); }
java
public static SlotProfile preferredLocality(ResourceProfile resourceProfile, Collection<TaskManagerLocation> preferredLocations) { return new SlotProfile(resourceProfile, preferredLocations, Collections.emptyList()); }
[ "public", "static", "SlotProfile", "preferredLocality", "(", "ResourceProfile", "resourceProfile", ",", "Collection", "<", "TaskManagerLocation", ">", "preferredLocations", ")", "{", "return", "new", "SlotProfile", "(", "resourceProfile", ",", "preferredLocations", ",", ...
Returns a slot profile for the given resource profile and the preferred locations. @param resourceProfile specifying the slot requirements @param preferredLocations specifying the preferred locations @return Slot profile with the given resource profile and preferred locations
[ "Returns", "a", "slot", "profile", "for", "the", "given", "resource", "profile", "and", "the", "preferred", "locations", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/SlotProfile.java#L132-L134
124,093
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/SlotProfile.java
SlotProfile.priorAllocation
public static SlotProfile priorAllocation(ResourceProfile resourceProfile, Collection<AllocationID> priorAllocations) { return new SlotProfile(resourceProfile, Collections.emptyList(), priorAllocations); }
java
public static SlotProfile priorAllocation(ResourceProfile resourceProfile, Collection<AllocationID> priorAllocations) { return new SlotProfile(resourceProfile, Collections.emptyList(), priorAllocations); }
[ "public", "static", "SlotProfile", "priorAllocation", "(", "ResourceProfile", "resourceProfile", ",", "Collection", "<", "AllocationID", ">", "priorAllocations", ")", "{", "return", "new", "SlotProfile", "(", "resourceProfile", ",", "Collections", ".", "emptyList", "(...
Returns a slot profile for the given resource profile and the prior allocations. @param resourceProfile specifying the slot requirements @param priorAllocations specifying the prior allocations @return Slot profile with the given resource profile and prior allocations
[ "Returns", "a", "slot", "profile", "for", "the", "given", "resource", "profile", "and", "the", "prior", "allocations", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/SlotProfile.java#L143-L145
124,094
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/pregel/MessageCombiner.java
MessageCombiner.sendCombinedMessage
public final void sendCombinedMessage(Message combinedMessage) { outValue.f1 = Either.Right(combinedMessage); out.collect(outValue); }
java
public final void sendCombinedMessage(Message combinedMessage) { outValue.f1 = Either.Right(combinedMessage); out.collect(outValue); }
[ "public", "final", "void", "sendCombinedMessage", "(", "Message", "combinedMessage", ")", "{", "outValue", ".", "f1", "=", "Either", ".", "Right", "(", "combinedMessage", ")", ";", "out", ".", "collect", "(", "outValue", ")", ";", "}" ]
Sends the combined message to the target vertex. @param combinedMessage @throws Exception
[ "Sends", "the", "combined", "message", "to", "the", "target", "vertex", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/pregel/MessageCombiner.java#L64-L67
124,095
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/summarize/aggregation/NumericSummaryAggregator.java
NumericSummaryAggregator.aggregate
@Override public void aggregate(T value) { if (value == null) { nullCount++; } else if (isNan(value)) { nanCount++; } else if (isInfinite(value)) { infinityCount++; } else { nonMissingCount++; min.aggregate(value); max.aggregate(value); sum.aggregate(value); double doubleValue ...
java
@Override public void aggregate(T value) { if (value == null) { nullCount++; } else if (isNan(value)) { nanCount++; } else if (isInfinite(value)) { infinityCount++; } else { nonMissingCount++; min.aggregate(value); max.aggregate(value); sum.aggregate(value); double doubleValue ...
[ "@", "Override", "public", "void", "aggregate", "(", "T", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "nullCount", "++", ";", "}", "else", "if", "(", "isNan", "(", "value", ")", ")", "{", "nanCount", "++", ";", "}", "else", "if...
Add a value to the current aggregation.
[ "Add", "a", "value", "to", "the", "current", "aggregation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/summarize/aggregation/NumericSummaryAggregator.java#L66-L90
124,096
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/summarize/aggregation/NumericSummaryAggregator.java
NumericSummaryAggregator.combine
@Override public void combine(Aggregator<T, NumericColumnSummary<T>> otherSameType) { NumericSummaryAggregator<T> other = (NumericSummaryAggregator<T>) otherSameType; nullCount += other.nullCount; nanCount += other.nanCount; infinityCount += other.infinityCount; if (nonMissingCount == 0) { nonMissingCou...
java
@Override public void combine(Aggregator<T, NumericColumnSummary<T>> otherSameType) { NumericSummaryAggregator<T> other = (NumericSummaryAggregator<T>) otherSameType; nullCount += other.nullCount; nanCount += other.nanCount; infinityCount += other.infinityCount; if (nonMissingCount == 0) { nonMissingCou...
[ "@", "Override", "public", "void", "combine", "(", "Aggregator", "<", "T", ",", "NumericColumnSummary", "<", "T", ">", ">", "otherSameType", ")", "{", "NumericSummaryAggregator", "<", "T", ">", "other", "=", "(", "NumericSummaryAggregator", "<", "T", ">", ")...
combine two aggregations.
[ "combine", "two", "aggregations", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/summarize/aggregation/NumericSummaryAggregator.java#L95-L127
124,097
apache/flink
flink-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraSink.java
CassandraSink.name
public CassandraSink<IN> name(String name) { if (useDataStreamSink) { getSinkTransformation().setName(name); } else { getStreamTransformation().setName(name); } return this; }
java
public CassandraSink<IN> name(String name) { if (useDataStreamSink) { getSinkTransformation().setName(name); } else { getStreamTransformation().setName(name); } return this; }
[ "public", "CassandraSink", "<", "IN", ">", "name", "(", "String", "name", ")", "{", "if", "(", "useDataStreamSink", ")", "{", "getSinkTransformation", "(", ")", ".", "setName", "(", "name", ")", ";", "}", "else", "{", "getStreamTransformation", "(", ")", ...
Sets the name of this sink. This name is used by the visualization and logging during runtime. @return The named sink.
[ "Sets", "the", "name", "of", "this", "sink", ".", "This", "name", "is", "used", "by", "the", "visualization", "and", "logging", "during", "runtime", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraSink.java#L78-L85
124,098
apache/flink
flink-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraSink.java
CassandraSink.uid
@PublicEvolving public CassandraSink<IN> uid(String uid) { if (useDataStreamSink) { getSinkTransformation().setUid(uid); } else { getStreamTransformation().setUid(uid); } return this; }
java
@PublicEvolving public CassandraSink<IN> uid(String uid) { if (useDataStreamSink) { getSinkTransformation().setUid(uid); } else { getStreamTransformation().setUid(uid); } return this; }
[ "@", "PublicEvolving", "public", "CassandraSink", "<", "IN", ">", "uid", "(", "String", "uid", ")", "{", "if", "(", "useDataStreamSink", ")", "{", "getSinkTransformation", "(", ")", ".", "setUid", "(", "uid", ")", ";", "}", "else", "{", "getStreamTransform...
Sets an ID for this operator. <p>The specified ID is used to assign the same operator ID across job submissions (for example when starting a job from a savepoint). <p><strong>Important</strong>: this ID needs to be unique per transformation and job. Otherwise, job submission will fail. @param uid The unique user-spe...
[ "Sets", "an", "ID", "for", "this", "operator", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraSink.java#L99-L107
124,099
apache/flink
flink-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraSink.java
CassandraSink.setParallelism
public CassandraSink<IN> setParallelism(int parallelism) { if (useDataStreamSink) { getSinkTransformation().setParallelism(parallelism); } else { getStreamTransformation().setParallelism(parallelism); } return this; }
java
public CassandraSink<IN> setParallelism(int parallelism) { if (useDataStreamSink) { getSinkTransformation().setParallelism(parallelism); } else { getStreamTransformation().setParallelism(parallelism); } return this; }
[ "public", "CassandraSink", "<", "IN", ">", "setParallelism", "(", "int", "parallelism", ")", "{", "if", "(", "useDataStreamSink", ")", "{", "getSinkTransformation", "(", ")", ".", "setParallelism", "(", "parallelism", ")", ";", "}", "else", "{", "getStreamTran...
Sets the parallelism for this sink. The degree must be higher than zero. @param parallelism The parallelism for this sink. @return The sink with set parallelism.
[ "Sets", "the", "parallelism", "for", "this", "sink", ".", "The", "degree", "must", "be", "higher", "than", "zero", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraSink.java#L143-L150