id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
123,600
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/instance/SlotSharingGroupAssignment.java
SlotSharingGroupAssignment.getNumberOfAvailableSlotsForGroup
public int getNumberOfAvailableSlotsForGroup(AbstractID groupId) { synchronized (lock) { Map<ResourceID, List<SharedSlot>> available = availableSlotsPerJid.get(groupId); if (available != null) { Set<SharedSlot> set = new HashSet<SharedSlot>(); for (List<SharedSlot> list : available.values()) { fo...
java
public int getNumberOfAvailableSlotsForGroup(AbstractID groupId) { synchronized (lock) { Map<ResourceID, List<SharedSlot>> available = availableSlotsPerJid.get(groupId); if (available != null) { Set<SharedSlot> set = new HashSet<SharedSlot>(); for (List<SharedSlot> list : available.values()) { fo...
[ "public", "int", "getNumberOfAvailableSlotsForGroup", "(", "AbstractID", "groupId", ")", "{", "synchronized", "(", "lock", ")", "{", "Map", "<", "ResourceID", ",", "List", "<", "SharedSlot", ">", ">", "available", "=", "availableSlotsPerJid", ".", "get", "(", ...
Gets the number of shared slots into which the given group can place subtasks or nested task groups. @param groupId The ID of the group. @return The number of shared slots available to the given job vertex.
[ "Gets", "the", "number", "of", "shared", "slots", "into", "which", "the", "given", "group", "can", "place", "subtasks", "or", "nested", "task", "groups", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/instance/SlotSharingGroupAssignment.java#L125-L147
123,601
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/instance/SlotSharingGroupAssignment.java
SlotSharingGroupAssignment.getSlotForTask
public SimpleSlot getSlotForTask(CoLocationConstraint constraint, Iterable<TaskManagerLocation> locationPreferences) { synchronized (lock) { if (constraint.isAssignedAndAlive()) { // the shared slot of the co-location group is initialized and set we allocate a sub-slot final SharedSlot shared = constraint....
java
public SimpleSlot getSlotForTask(CoLocationConstraint constraint, Iterable<TaskManagerLocation> locationPreferences) { synchronized (lock) { if (constraint.isAssignedAndAlive()) { // the shared slot of the co-location group is initialized and set we allocate a sub-slot final SharedSlot shared = constraint....
[ "public", "SimpleSlot", "getSlotForTask", "(", "CoLocationConstraint", "constraint", ",", "Iterable", "<", "TaskManagerLocation", ">", "locationPreferences", ")", "{", "synchronized", "(", "lock", ")", "{", "if", "(", "constraint", ".", "isAssignedAndAlive", "(", ")...
Gets a slot for a task that has a co-location constraint. This method tries to grab a slot form the location-constraint's shared slot. If that slot has not been initialized, then the method tries to grab another slot that is available for the location-constraint-group. <p>In cases where the co-location constraint has ...
[ "Gets", "a", "slot", "for", "a", "task", "that", "has", "a", "co", "-", "location", "constraint", ".", "This", "method", "tries", "to", "grab", "a", "slot", "form", "the", "location", "-", "constraint", "s", "shared", "slot", ".", "If", "that", "slot",...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/instance/SlotSharingGroupAssignment.java#L310-L383
123,602
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/instance/SlotSharingGroupAssignment.java
SlotSharingGroupAssignment.releaseSimpleSlot
void releaseSimpleSlot(SimpleSlot simpleSlot) { synchronized (lock) { // try to transition to the CANCELED state. That state marks // that the releasing is in progress if (simpleSlot.markCancelled()) { // sanity checks if (simpleSlot.isAlive()) { throw new IllegalStateException("slot is still a...
java
void releaseSimpleSlot(SimpleSlot simpleSlot) { synchronized (lock) { // try to transition to the CANCELED state. That state marks // that the releasing is in progress if (simpleSlot.markCancelled()) { // sanity checks if (simpleSlot.isAlive()) { throw new IllegalStateException("slot is still a...
[ "void", "releaseSimpleSlot", "(", "SimpleSlot", "simpleSlot", ")", "{", "synchronized", "(", "lock", ")", "{", "// try to transition to the CANCELED state. That state marks", "// that the releasing is in progress", "if", "(", "simpleSlot", ".", "markCancelled", "(", ")", ")...
Releases the simple slot from the assignment group. @param simpleSlot The SimpleSlot to be released
[ "Releases", "the", "simple", "slot", "from", "the", "assignment", "group", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/instance/SlotSharingGroupAssignment.java#L457-L509
123,603
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/operators/util/FieldSet.java
FieldSet.toArray
public int[] toArray() { int[] a = new int[this.collection.size()]; int i = 0; for (int col : this.collection) { a[i++] = col; } return a; }
java
public int[] toArray() { int[] a = new int[this.collection.size()]; int i = 0; for (int col : this.collection) { a[i++] = col; } return a; }
[ "public", "int", "[", "]", "toArray", "(", ")", "{", "int", "[", "]", "a", "=", "new", "int", "[", "this", ".", "collection", ".", "size", "(", ")", "]", ";", "int", "i", "=", "0", ";", "for", "(", "int", "col", ":", "this", ".", "collection"...
Transforms the field set into an array of field IDs. Whether the IDs are ordered or unordered depends on the specific subclass of the field set. @return An array of all contained field IDs.
[ "Transforms", "the", "field", "set", "into", "an", "array", "of", "field", "IDs", ".", "Whether", "the", "IDs", "are", "ordered", "or", "unordered", "depends", "on", "the", "specific", "subclass", "of", "the", "field", "set", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/util/FieldSet.java#L207-L214
123,604
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/AdamicAdar.java
AdamicAdar.setMinimumScore
public AdamicAdar<K, VV, EV> setMinimumScore(float score) { Preconditions.checkArgument(score >= 0, "Minimum score must be non-negative"); this.minimumScore = score; return this; }
java
public AdamicAdar<K, VV, EV> setMinimumScore(float score) { Preconditions.checkArgument(score >= 0, "Minimum score must be non-negative"); this.minimumScore = score; return this; }
[ "public", "AdamicAdar", "<", "K", ",", "VV", ",", "EV", ">", "setMinimumScore", "(", "float", "score", ")", "{", "Preconditions", ".", "checkArgument", "(", "score", ">=", "0", ",", "\"Minimum score must be non-negative\"", ")", ";", "this", ".", "minimumScore...
Filter out Adamic-Adar scores less than the given minimum. @param score minimum score @return this
[ "Filter", "out", "Adamic", "-", "Adar", "scores", "less", "than", "the", "given", "minimum", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/AdamicAdar.java#L94-L100
123,605
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/AdamicAdar.java
AdamicAdar.setMinimumRatio
public AdamicAdar<K, VV, EV> setMinimumRatio(float ratio) { Preconditions.checkArgument(ratio >= 0, "Minimum ratio must be non-negative"); this.minimumRatio = ratio; return this; }
java
public AdamicAdar<K, VV, EV> setMinimumRatio(float ratio) { Preconditions.checkArgument(ratio >= 0, "Minimum ratio must be non-negative"); this.minimumRatio = ratio; return this; }
[ "public", "AdamicAdar", "<", "K", ",", "VV", ",", "EV", ">", "setMinimumRatio", "(", "float", "ratio", ")", "{", "Preconditions", ".", "checkArgument", "(", "ratio", ">=", "0", ",", "\"Minimum ratio must be non-negative\"", ")", ";", "this", ".", "minimumRatio...
Filter out Adamic-Adar scores less than the given ratio times the average score. @param ratio minimum ratio @return this
[ "Filter", "out", "Adamic", "-", "Adar", "scores", "less", "than", "the", "given", "ratio", "times", "the", "average", "score", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/AdamicAdar.java#L108-L114
123,606
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Schema.java
Schema.schema
public Schema schema(TableSchema schema) { tableSchema.clear(); lastField = null; for (int i = 0; i < schema.getFieldCount(); i++) { field(schema.getFieldName(i).get(), schema.getFieldType(i).get()); } return this; }
java
public Schema schema(TableSchema schema) { tableSchema.clear(); lastField = null; for (int i = 0; i < schema.getFieldCount(); i++) { field(schema.getFieldName(i).get(), schema.getFieldType(i).get()); } return this; }
[ "public", "Schema", "schema", "(", "TableSchema", "schema", ")", "{", "tableSchema", ".", "clear", "(", ")", ";", "lastField", "=", "null", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "schema", ".", "getFieldCount", "(", ")", ";", "i", "+...
Sets the schema with field names and the types. Required. <p>This method overwrites existing fields added with {@link #field(String, TypeInformation)}. @param schema the table schema
[ "Sets", "the", "schema", "with", "field", "names", "and", "the", "types", ".", "Required", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Schema.java#L59-L66
123,607
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Schema.java
Schema.field
public Schema field(String fieldName, TypeInformation<?> fieldType) { field(fieldName, TypeStringUtils.writeTypeInfo(fieldType)); return this; }
java
public Schema field(String fieldName, TypeInformation<?> fieldType) { field(fieldName, TypeStringUtils.writeTypeInfo(fieldType)); return this; }
[ "public", "Schema", "field", "(", "String", "fieldName", ",", "TypeInformation", "<", "?", ">", "fieldType", ")", "{", "field", "(", "fieldName", ",", "TypeStringUtils", ".", "writeTypeInfo", "(", "fieldType", ")", ")", ";", "return", "this", ";", "}" ]
Adds a field with the field name and the type information. Required. This method can be called multiple times. The call order of this method defines also the order of the fields in a row. @param fieldName the field name @param fieldType the type information of the field
[ "Adds", "a", "field", "with", "the", "field", "name", "and", "the", "type", "information", ".", "Required", ".", "This", "method", "can", "be", "called", "multiple", "times", ".", "The", "call", "order", "of", "this", "method", "defines", "also", "the", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Schema.java#L76-L79
123,608
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Schema.java
Schema.field
public Schema field(String fieldName, String fieldType) { if (tableSchema.containsKey(fieldName)) { throw new ValidationException("Duplicate field name $fieldName."); } LinkedHashMap<String, String> fieldProperties = new LinkedHashMap<>(); fieldProperties.put(SCHEMA_TYPE, fieldType); tableSchema.put(fiel...
java
public Schema field(String fieldName, String fieldType) { if (tableSchema.containsKey(fieldName)) { throw new ValidationException("Duplicate field name $fieldName."); } LinkedHashMap<String, String> fieldProperties = new LinkedHashMap<>(); fieldProperties.put(SCHEMA_TYPE, fieldType); tableSchema.put(fiel...
[ "public", "Schema", "field", "(", "String", "fieldName", ",", "String", "fieldType", ")", "{", "if", "(", "tableSchema", ".", "containsKey", "(", "fieldName", ")", ")", "{", "throw", "new", "ValidationException", "(", "\"Duplicate field name $fieldName.\"", ")", ...
Adds a field with the field name and the type string. Required. This method can be called multiple times. The call order of this method defines also the order of the fields in a row. @param fieldName the field name @param fieldType the type string of the field
[ "Adds", "a", "field", "with", "the", "field", "name", "and", "the", "type", "string", ".", "Required", ".", "This", "method", "can", "be", "called", "multiple", "times", ".", "The", "call", "order", "of", "this", "method", "defines", "also", "the", "orde...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Schema.java#L89-L101
123,609
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Schema.java
Schema.from
public Schema from(String originFieldName) { if (lastField == null) { throw new ValidationException("No field previously defined. Use field() before."); } tableSchema.get(lastField).put(SCHEMA_FROM, originFieldName); lastField = null; return this; }
java
public Schema from(String originFieldName) { if (lastField == null) { throw new ValidationException("No field previously defined. Use field() before."); } tableSchema.get(lastField).put(SCHEMA_FROM, originFieldName); lastField = null; return this; }
[ "public", "Schema", "from", "(", "String", "originFieldName", ")", "{", "if", "(", "lastField", "==", "null", ")", "{", "throw", "new", "ValidationException", "(", "\"No field previously defined. Use field() before.\"", ")", ";", "}", "tableSchema", ".", "get", "(...
Specifies the origin of the previously defined field. The origin field is defined by a connector or format. <p>E.g. field("myString", Types.STRING).from("CSV_MY_STRING") <p>Note: Field names are matched by the exact name by default (case sensitive).
[ "Specifies", "the", "origin", "of", "the", "previously", "defined", "field", ".", "The", "origin", "field", "is", "defined", "by", "a", "connector", "or", "format", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Schema.java#L111-L118
123,610
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Schema.java
Schema.proctime
public Schema proctime() { if (lastField == null) { throw new ValidationException("No field defined previously. Use field() before."); } tableSchema.get(lastField).put(SCHEMA_PROCTIME, "true"); lastField = null; return this; }
java
public Schema proctime() { if (lastField == null) { throw new ValidationException("No field defined previously. Use field() before."); } tableSchema.get(lastField).put(SCHEMA_PROCTIME, "true"); lastField = null; return this; }
[ "public", "Schema", "proctime", "(", ")", "{", "if", "(", "lastField", "==", "null", ")", "{", "throw", "new", "ValidationException", "(", "\"No field defined previously. Use field() before.\"", ")", ";", "}", "tableSchema", ".", "get", "(", "lastField", ")", "....
Specifies the previously defined field as a processing-time attribute. <p>E.g. field("proctime", Types.SQL_TIMESTAMP).proctime()
[ "Specifies", "the", "previously", "defined", "field", "as", "a", "processing", "-", "time", "attribute", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Schema.java#L125-L132
123,611
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Schema.java
Schema.rowtime
public Schema rowtime(Rowtime rowtime) { if (lastField == null) { throw new ValidationException("No field defined previously. Use field() before."); } tableSchema.get(lastField).putAll(rowtime.toProperties()); lastField = null; return this; }
java
public Schema rowtime(Rowtime rowtime) { if (lastField == null) { throw new ValidationException("No field defined previously. Use field() before."); } tableSchema.get(lastField).putAll(rowtime.toProperties()); lastField = null; return this; }
[ "public", "Schema", "rowtime", "(", "Rowtime", "rowtime", ")", "{", "if", "(", "lastField", "==", "null", ")", "{", "throw", "new", "ValidationException", "(", "\"No field defined previously. Use field() before.\"", ")", ";", "}", "tableSchema", ".", "get", "(", ...
Specifies the previously defined field as an event-time attribute. <p>E.g. field("rowtime", Types.SQL_TIMESTAMP).rowtime(...)
[ "Specifies", "the", "previously", "defined", "field", "as", "an", "event", "-", "time", "attribute", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Schema.java#L139-L146
123,612
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/async/queue/StreamElementQueueEntry.java
StreamElementQueueEntry.onComplete
public void onComplete( final Consumer<StreamElementQueueEntry<T>> completeFunction, Executor executor) { final StreamElementQueueEntry<T> thisReference = this; getFuture().whenCompleteAsync( // call the complete function for normal completion as well as exceptional completion // see FLINK-6435 (val...
java
public void onComplete( final Consumer<StreamElementQueueEntry<T>> completeFunction, Executor executor) { final StreamElementQueueEntry<T> thisReference = this; getFuture().whenCompleteAsync( // call the complete function for normal completion as well as exceptional completion // see FLINK-6435 (val...
[ "public", "void", "onComplete", "(", "final", "Consumer", "<", "StreamElementQueueEntry", "<", "T", ">", ">", "completeFunction", ",", "Executor", "executor", ")", "{", "final", "StreamElementQueueEntry", "<", "T", ">", "thisReference", "=", "this", ";", "getFut...
Register the given complete function to be called once this queue entry has been completed. @param completeFunction to call when the queue entry has been completed @param executor to run the complete function
[ "Register", "the", "given", "complete", "function", "to", "be", "called", "once", "this", "queue", "entry", "has", "been", "completed", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/async/queue/StreamElementQueueEntry.java#L64-L74
123,613
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/ContainerSpecification.java
ContainerSpecification.formatSystemProperties
public static String formatSystemProperties(Configuration jvmArgs) { StringBuilder sb = new StringBuilder(); for(Map.Entry<String,String> entry : jvmArgs.toMap().entrySet()) { if(sb.length() > 0) { sb.append(" "); } boolean quoted = entry.getValue().contains(" "); if(quoted) { sb.append("\""); ...
java
public static String formatSystemProperties(Configuration jvmArgs) { StringBuilder sb = new StringBuilder(); for(Map.Entry<String,String> entry : jvmArgs.toMap().entrySet()) { if(sb.length() > 0) { sb.append(" "); } boolean quoted = entry.getValue().contains(" "); if(quoted) { sb.append("\""); ...
[ "public", "static", "String", "formatSystemProperties", "(", "Configuration", "jvmArgs", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "entry", ":", "jvmArgs",...
Format the system properties as a shell-compatible command-line argument.
[ "Format", "the", "system", "properties", "as", "a", "shell", "-", "compatible", "command", "-", "line", "argument", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/ContainerSpecification.java#L189-L205
123,614
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TimerService.java
TimerService.registerTimeout
public void registerTimeout(final K key, final long delay, final TimeUnit unit) { Preconditions.checkState(timeoutListener != null, "The " + getClass().getSimpleName() + " has not been started."); if (timeouts.containsKey(key)) { unregisterTimeout(key); } timeouts.put(key, new Timeout<>(timeoutListener,...
java
public void registerTimeout(final K key, final long delay, final TimeUnit unit) { Preconditions.checkState(timeoutListener != null, "The " + getClass().getSimpleName() + " has not been started."); if (timeouts.containsKey(key)) { unregisterTimeout(key); } timeouts.put(key, new Timeout<>(timeoutListener,...
[ "public", "void", "registerTimeout", "(", "final", "K", "key", ",", "final", "long", "delay", ",", "final", "TimeUnit", "unit", ")", "{", "Preconditions", ".", "checkState", "(", "timeoutListener", "!=", "null", ",", "\"The \"", "+", "getClass", "(", ")", ...
Register a timeout for the given key which shall occur in the given delay. @param key for which to register the timeout @param delay until the timeout @param unit of the timeout delay
[ "Register", "a", "timeout", "for", "the", "given", "key", "which", "shall", "occur", "in", "the", "given", "delay", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TimerService.java#L101-L110
123,615
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TimerService.java
TimerService.unregisterTimeout
public void unregisterTimeout(K key) { Timeout<K> timeout = timeouts.remove(key); if (timeout != null) { timeout.cancel(); } }
java
public void unregisterTimeout(K key) { Timeout<K> timeout = timeouts.remove(key); if (timeout != null) { timeout.cancel(); } }
[ "public", "void", "unregisterTimeout", "(", "K", "key", ")", "{", "Timeout", "<", "K", ">", "timeout", "=", "timeouts", ".", "remove", "(", "key", ")", ";", "if", "(", "timeout", "!=", "null", ")", "{", "timeout", ".", "cancel", "(", ")", ";", "}",...
Unregister the timeout for the given key. @param key for which to unregister the timeout
[ "Unregister", "the", "timeout", "for", "the", "given", "key", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TimerService.java#L117-L123
123,616
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TimerService.java
TimerService.unregisterAllTimeouts
protected void unregisterAllTimeouts() { for (Timeout<K> timeout : timeouts.values()) { timeout.cancel(); } timeouts.clear(); }
java
protected void unregisterAllTimeouts() { for (Timeout<K> timeout : timeouts.values()) { timeout.cancel(); } timeouts.clear(); }
[ "protected", "void", "unregisterAllTimeouts", "(", ")", "{", "for", "(", "Timeout", "<", "K", ">", "timeout", ":", "timeouts", ".", "values", "(", ")", ")", "{", "timeout", ".", "cancel", "(", ")", ";", "}", "timeouts", ".", "clear", "(", ")", ";", ...
Unregister all timeouts.
[ "Unregister", "all", "timeouts", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TimerService.java#L128-L133
123,617
apache/flink
flink-core/src/main/java/org/apache/flink/core/memory/MemorySegmentFactory.java
MemorySegmentFactory.allocateUnpooledOffHeapMemory
public static MemorySegment allocateUnpooledOffHeapMemory(int size, Object owner) { ByteBuffer memory = ByteBuffer.allocateDirect(size); return wrapPooledOffHeapMemory(memory, owner); }
java
public static MemorySegment allocateUnpooledOffHeapMemory(int size, Object owner) { ByteBuffer memory = ByteBuffer.allocateDirect(size); return wrapPooledOffHeapMemory(memory, owner); }
[ "public", "static", "MemorySegment", "allocateUnpooledOffHeapMemory", "(", "int", "size", ",", "Object", "owner", ")", "{", "ByteBuffer", "memory", "=", "ByteBuffer", ".", "allocateDirect", "(", "size", ")", ";", "return", "wrapPooledOffHeapMemory", "(", "memory", ...
Allocates some unpooled off-heap memory and creates a new memory segment that represents that memory. @param size The size of the off-heap memory segment to allocate. @param owner The owner to associate with the off-heap memory segment. @return A new memory segment, backed by unpooled off-heap memory.
[ "Allocates", "some", "unpooled", "off", "-", "heap", "memory", "and", "creates", "a", "new", "memory", "segment", "that", "represents", "that", "memory", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/memory/MemorySegmentFactory.java#L85-L88
123,618
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/iomanager/AsynchronousBufferFileWriter.java
AsynchronousBufferFileWriter.writeBlock
@Override public void writeBlock(Buffer buffer) throws IOException { try { // if successfully added, the buffer will be recycled after the write operation addRequest(new BufferWriteRequest(this, buffer)); } catch (Throwable e) { // if not added, we need to recycle here buffer.recycleBuffer(); Except...
java
@Override public void writeBlock(Buffer buffer) throws IOException { try { // if successfully added, the buffer will be recycled after the write operation addRequest(new BufferWriteRequest(this, buffer)); } catch (Throwable e) { // if not added, we need to recycle here buffer.recycleBuffer(); Except...
[ "@", "Override", "public", "void", "writeBlock", "(", "Buffer", "buffer", ")", "throws", "IOException", "{", "try", "{", "// if successfully added, the buffer will be recycled after the write operation", "addRequest", "(", "new", "BufferWriteRequest", "(", "this", ",", "b...
Writes the given block asynchronously. @param buffer the buffer to be written (will be recycled when done) @throws IOException thrown if adding the write operation fails
[ "Writes", "the", "given", "block", "asynchronously", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/iomanager/AsynchronousBufferFileWriter.java#L44-L55
123,619
apache/flink
flink-core/src/main/java/org/apache/flink/types/Record.java
Record.setNumFields
public void setNumFields(final int numFields) { final int oldNumFields = this.numFields; // check whether we increase or decrease the fields if (numFields > oldNumFields) { makeSpace(numFields); for (int i = oldNumFields; i < numFields; i++) { this.offsets[i] = NULL_INDICATOR_OFFSET; } markModifi...
java
public void setNumFields(final int numFields) { final int oldNumFields = this.numFields; // check whether we increase or decrease the fields if (numFields > oldNumFields) { makeSpace(numFields); for (int i = oldNumFields; i < numFields; i++) { this.offsets[i] = NULL_INDICATOR_OFFSET; } markModifi...
[ "public", "void", "setNumFields", "(", "final", "int", "numFields", ")", "{", "final", "int", "oldNumFields", "=", "this", ".", "numFields", ";", "// check whether we increase or decrease the fields ", "if", "(", "numFields", ">", "oldNumFields", ")", "{", "makeSpac...
Sets the number of fields in the record. If the new number of fields is longer than the current number of fields, then null fields are appended. If the new number of fields is smaller than the current number of fields, then the last fields are truncated. @param numFields The new number of fields.
[ "Sets", "the", "number", "of", "fields", "in", "the", "record", ".", "If", "the", "new", "number", "of", "fields", "is", "longer", "than", "the", "current", "number", "of", "fields", "then", "null", "fields", "are", "appended", ".", "If", "the", "new", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/Record.java#L144-L161
123,620
apache/flink
flink-core/src/main/java/org/apache/flink/types/Record.java
Record.makeSpace
public void makeSpace(int numFields) { final int oldNumFields = this.numFields; // increase the number of fields in the arrays if (this.offsets == null) { this.offsets = new int[numFields]; } else if (this.offsets.length < numFields) { int[] newOffs = new int[Math.max(numFields + 1, oldNumFields << 1)];...
java
public void makeSpace(int numFields) { final int oldNumFields = this.numFields; // increase the number of fields in the arrays if (this.offsets == null) { this.offsets = new int[numFields]; } else if (this.offsets.length < numFields) { int[] newOffs = new int[Math.max(numFields + 1, oldNumFields << 1)];...
[ "public", "void", "makeSpace", "(", "int", "numFields", ")", "{", "final", "int", "oldNumFields", "=", "this", ".", "numFields", ";", "// increase the number of fields in the arrays", "if", "(", "this", ".", "offsets", "==", "null", ")", "{", "this", ".", "off...
Reserves space for at least the given number of fields in the internal arrays. @param numFields The number of fields to reserve space for.
[ "Reserves", "space", "for", "at", "least", "the", "given", "number", "of", "fields", "in", "the", "internal", "arrays", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/Record.java#L168-L206
123,621
apache/flink
flink-core/src/main/java/org/apache/flink/types/Record.java
Record.getField
@SuppressWarnings("unchecked") public <T extends Value> T getField(final int fieldNum, final Class<T> type) { // range check if (fieldNum < 0 || fieldNum >= this.numFields) { throw new IndexOutOfBoundsException(fieldNum + " for range [0.." + (this.numFields - 1) + "]"); } // get offset and check for null...
java
@SuppressWarnings("unchecked") public <T extends Value> T getField(final int fieldNum, final Class<T> type) { // range check if (fieldNum < 0 || fieldNum >= this.numFields) { throw new IndexOutOfBoundsException(fieldNum + " for range [0.." + (this.numFields - 1) + "]"); } // get offset and check for null...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "Value", ">", "T", "getField", "(", "final", "int", "fieldNum", ",", "final", "Class", "<", "T", ">", "type", ")", "{", "// range check", "if", "(", "fieldNum", "<", "0", ...
Gets the field at the given position from the record. This method checks internally, if this instance of the record has previously returned a value for this field. If so, it reuses the object, if not, it creates one from the supplied class. @param <T> The type of the field. @param fieldNum The logical position of the...
[ "Gets", "the", "field", "at", "the", "given", "position", "from", "the", "record", ".", "This", "method", "checks", "internally", "if", "this", "instance", "of", "the", "record", "has", "previously", "returned", "a", "value", "for", "this", "field", ".", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/Record.java#L222-L255
123,622
apache/flink
flink-core/src/main/java/org/apache/flink/types/Record.java
Record.getFieldInto
public boolean getFieldInto(int fieldNum, Value target) { // range check if (fieldNum < 0 || fieldNum >= this.numFields) { throw new IndexOutOfBoundsException(); } // get offset and check for null int offset = this.offsets[fieldNum]; if (offset == NULL_INDICATOR_OFFSET) { return false; } else i...
java
public boolean getFieldInto(int fieldNum, Value target) { // range check if (fieldNum < 0 || fieldNum >= this.numFields) { throw new IndexOutOfBoundsException(); } // get offset and check for null int offset = this.offsets[fieldNum]; if (offset == NULL_INDICATOR_OFFSET) { return false; } else i...
[ "public", "boolean", "getFieldInto", "(", "int", "fieldNum", ",", "Value", "target", ")", "{", "// range check", "if", "(", "fieldNum", "<", "0", "||", "fieldNum", ">=", "this", ".", "numFields", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", ")...
Gets the field at the given position. If the field at that position is null, then this method leaves the target field unchanged and returns false. @param fieldNum The position of the field. @param target The value to deserialize the field into. @return True, if the field was deserialized properly, false, if the field ...
[ "Gets", "the", "field", "at", "the", "given", "position", ".", "If", "the", "field", "at", "that", "position", "is", "null", "then", "this", "method", "leaves", "the", "target", "field", "unchanged", "and", "returns", "false", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/Record.java#L303-L324
123,623
apache/flink
flink-core/src/main/java/org/apache/flink/types/Record.java
Record.getFieldsInto
public boolean getFieldsInto(int[] positions, Value[] targets) { for (int i = 0; i < positions.length; i++) { if (!getFieldInto(positions[i], targets[i])) { return false; } } return true; }
java
public boolean getFieldsInto(int[] positions, Value[] targets) { for (int i = 0; i < positions.length; i++) { if (!getFieldInto(positions[i], targets[i])) { return false; } } return true; }
[ "public", "boolean", "getFieldsInto", "(", "int", "[", "]", "positions", ",", "Value", "[", "]", "targets", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "positions", ".", "length", ";", "i", "++", ")", "{", "if", "(", "!", "getField...
Gets the fields at the given positions into an array. If at any position a field is null, then this method returns false. All fields that have been successfully read until the failing read are correctly contained in the record. All other fields are not set. @param positions The positions of the fields to get. @param t...
[ "Gets", "the", "fields", "at", "the", "given", "positions", "into", "an", "array", ".", "If", "at", "any", "position", "a", "field", "is", "null", "then", "this", "method", "returns", "false", ".", "All", "fields", "that", "have", "been", "successfully", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/Record.java#L337-L344
123,624
apache/flink
flink-core/src/main/java/org/apache/flink/types/Record.java
Record.equalsFields
public final boolean equalsFields(int[] positions, Value[] searchValues, Value[] deserializationHolders) { for (int i = 0; i < positions.length; i++) { final Value v = getField(positions[i], deserializationHolders[i]); if (v == null || (!v.equals(searchValues[i]))) { return false; } } return true; }
java
public final boolean equalsFields(int[] positions, Value[] searchValues, Value[] deserializationHolders) { for (int i = 0; i < positions.length; i++) { final Value v = getField(positions[i], deserializationHolders[i]); if (v == null || (!v.equals(searchValues[i]))) { return false; } } return true; }
[ "public", "final", "boolean", "equalsFields", "(", "int", "[", "]", "positions", ",", "Value", "[", "]", "searchValues", ",", "Value", "[", "]", "deserializationHolders", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "positions", ".", "len...
Checks the values of this record and a given list of values at specified positions for equality. The values of this record are deserialized and compared against the corresponding search value. The position specify which values are compared. The method returns true if the values on all positions are equal and false othe...
[ "Checks", "the", "values", "of", "this", "record", "and", "a", "given", "list", "of", "values", "at", "specified", "positions", "for", "equality", ".", "The", "values", "of", "this", "record", "are", "deserialized", "and", "compared", "against", "the", "corr...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/Record.java#L910-L918
123,625
apache/flink
flink-core/src/main/java/org/apache/flink/types/Record.java
Record.updateBinaryRepresenation
public void updateBinaryRepresenation() { // check whether the binary state is in sync final int firstModified = this.firstModifiedPos; if (firstModified == Integer.MAX_VALUE) { return; } final InternalDeSerializer serializer = this.serializer; final int[] offsets = this.offsets; final int numFields...
java
public void updateBinaryRepresenation() { // check whether the binary state is in sync final int firstModified = this.firstModifiedPos; if (firstModified == Integer.MAX_VALUE) { return; } final InternalDeSerializer serializer = this.serializer; final int[] offsets = this.offsets; final int numFields...
[ "public", "void", "updateBinaryRepresenation", "(", ")", "{", "// check whether the binary state is in sync", "final", "int", "firstModified", "=", "this", ".", "firstModifiedPos", ";", "if", "(", "firstModified", "==", "Integer", ".", "MAX_VALUE", ")", "{", "return",...
Updates the binary representation of the data, such that it reflects the state of the currently stored fields. If the binary representation is already up to date, nothing happens. Otherwise, this function triggers the modified fields to serialize themselves into the records buffer and afterwards updates the offset tabl...
[ "Updates", "the", "binary", "representation", "of", "the", "data", "such", "that", "it", "reflects", "the", "state", "of", "the", "currently", "stored", "fields", ".", "If", "the", "binary", "representation", "is", "already", "up", "to", "date", "nothing", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/Record.java#L928-L1009
123,626
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/pregel/VertexCentricIteration.java
VertexCentricIteration.withEdges
public static <K, VV, EV, Message> VertexCentricIteration<K, VV, EV, Message> withEdges( DataSet<Edge<K, EV>> edgesWithValue, ComputeFunction<K, VV, EV, Message> cf, int maximumNumberOfIterations) { return new VertexCentricIteration<>(cf, edgesWithValue, null, maximumNumberOfIterations); }
java
public static <K, VV, EV, Message> VertexCentricIteration<K, VV, EV, Message> withEdges( DataSet<Edge<K, EV>> edgesWithValue, ComputeFunction<K, VV, EV, Message> cf, int maximumNumberOfIterations) { return new VertexCentricIteration<>(cf, edgesWithValue, null, maximumNumberOfIterations); }
[ "public", "static", "<", "K", ",", "VV", ",", "EV", ",", "Message", ">", "VertexCentricIteration", "<", "K", ",", "VV", ",", "EV", ",", "Message", ">", "withEdges", "(", "DataSet", "<", "Edge", "<", "K", ",", "EV", ">", ">", "edgesWithValue", ",", ...
Creates a new vertex-centric iteration operator. @param edgesWithValue The data set containing edges. @param cf The compute function @param <K> The type of the vertex key (the vertex identifier). @param <VV> The type of the vertex value (the state of the vertex). @param <Message> The type of the message sent between ...
[ "Creates", "a", "new", "vertex", "-", "centric", "iteration", "operator", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/pregel/VertexCentricIteration.java#L238-L244
123,627
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/pregel/VertexCentricIteration.java
VertexCentricIteration.setUpIteration
private void setUpIteration(DeltaIteration<?, ?> iteration) { // set up the iteration operator if (this.configuration != null) { iteration.name(this.configuration.getName("Vertex-centric iteration (" + computeFunction + ")")); iteration.parallelism(this.configuration.getParallelism()); iteration.setSolut...
java
private void setUpIteration(DeltaIteration<?, ?> iteration) { // set up the iteration operator if (this.configuration != null) { iteration.name(this.configuration.getName("Vertex-centric iteration (" + computeFunction + ")")); iteration.parallelism(this.configuration.getParallelism()); iteration.setSolut...
[ "private", "void", "setUpIteration", "(", "DeltaIteration", "<", "?", ",", "?", ">", "iteration", ")", "{", "// set up the iteration operator", "if", "(", "this", ".", "configuration", "!=", "null", ")", "{", "iteration", ".", "name", "(", "this", ".", "conf...
Helper method which sets up an iteration with the given vertex value. @param iteration
[ "Helper", "method", "which", "sets", "up", "an", "iteration", "with", "the", "given", "vertex", "value", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/pregel/VertexCentricIteration.java#L443-L461
123,628
apache/flink
flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/Kafka08Fetcher.java
Kafka08Fetcher.getTopics
private static List<String> getTopics(List<KafkaTopicPartitionState<TopicAndPartition>> partitions) { HashSet<String> uniqueTopics = new HashSet<>(); for (KafkaTopicPartitionState<TopicAndPartition> fp: partitions) { uniqueTopics.add(fp.getTopic()); } return new ArrayList<>(uniqueTopics); }
java
private static List<String> getTopics(List<KafkaTopicPartitionState<TopicAndPartition>> partitions) { HashSet<String> uniqueTopics = new HashSet<>(); for (KafkaTopicPartitionState<TopicAndPartition> fp: partitions) { uniqueTopics.add(fp.getTopic()); } return new ArrayList<>(uniqueTopics); }
[ "private", "static", "List", "<", "String", ">", "getTopics", "(", "List", "<", "KafkaTopicPartitionState", "<", "TopicAndPartition", ">", ">", "partitions", ")", "{", "HashSet", "<", "String", ">", "uniqueTopics", "=", "new", "HashSet", "<>", "(", ")", ";",...
Returns a list of unique topics from for the given partitions. @param partitions A the partitions @return A list of unique topics
[ "Returns", "a", "list", "of", "unique", "topics", "from", "for", "the", "given", "partitions", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/Kafka08Fetcher.java#L413-L419
123,629
apache/flink
flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/Kafka08Fetcher.java
Kafka08Fetcher.findLeaderForPartitions
private static Map<Node, List<KafkaTopicPartitionState<TopicAndPartition>>> findLeaderForPartitions( List<KafkaTopicPartitionState<TopicAndPartition>> partitionsToAssign, Properties kafkaProperties) throws Exception { if (partitionsToAssign.isEmpty()) { throw new IllegalArgumentException("Leader request for ...
java
private static Map<Node, List<KafkaTopicPartitionState<TopicAndPartition>>> findLeaderForPartitions( List<KafkaTopicPartitionState<TopicAndPartition>> partitionsToAssign, Properties kafkaProperties) throws Exception { if (partitionsToAssign.isEmpty()) { throw new IllegalArgumentException("Leader request for ...
[ "private", "static", "Map", "<", "Node", ",", "List", "<", "KafkaTopicPartitionState", "<", "TopicAndPartition", ">", ">", ">", "findLeaderForPartitions", "(", "List", "<", "KafkaTopicPartitionState", "<", "TopicAndPartition", ">", ">", "partitionsToAssign", ",", "P...
Find leaders for the partitions. <p>From a high level, the method does the following: - Get a list of FetchPartitions (usually only a few partitions) - Get the list of topics from the FetchPartitions list and request the partitions for the topics. (Kafka doesn't support getting leaders for a set of partitions) - Build...
[ "Find", "leaders", "for", "the", "partitions", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/Kafka08Fetcher.java#L432-L494
123,630
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/KinesisConfigUtil.java
KinesisConfigUtil.validateAwsConfiguration
public static void validateAwsConfiguration(Properties config) { if (config.containsKey(AWSConfigConstants.AWS_CREDENTIALS_PROVIDER)) { String credentialsProviderType = config.getProperty(AWSConfigConstants.AWS_CREDENTIALS_PROVIDER); // value specified for AWSConfigConstants.AWS_CREDENTIALS_PROVIDER needs to b...
java
public static void validateAwsConfiguration(Properties config) { if (config.containsKey(AWSConfigConstants.AWS_CREDENTIALS_PROVIDER)) { String credentialsProviderType = config.getProperty(AWSConfigConstants.AWS_CREDENTIALS_PROVIDER); // value specified for AWSConfigConstants.AWS_CREDENTIALS_PROVIDER needs to b...
[ "public", "static", "void", "validateAwsConfiguration", "(", "Properties", "config", ")", "{", "if", "(", "config", ".", "containsKey", "(", "AWSConfigConstants", ".", "AWS_CREDENTIALS_PROVIDER", ")", ")", "{", "String", "credentialsProviderType", "=", "config", "."...
Validate configuration properties related to Amazon AWS service.
[ "Validate", "configuration", "properties", "related", "to", "Amazon", "AWS", "service", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/KinesisConfigUtil.java#L267-L303
123,631
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/MemoryLogger.java
MemoryLogger.getMemoryUsageStatsAsString
public static String getMemoryUsageStatsAsString(MemoryMXBean memoryMXBean) { MemoryUsage heap = memoryMXBean.getHeapMemoryUsage(); MemoryUsage nonHeap = memoryMXBean.getNonHeapMemoryUsage(); long heapUsed = heap.getUsed() >> 20; long heapCommitted = heap.getCommitted() >> 20; long heapMax = heap.getMax() >>...
java
public static String getMemoryUsageStatsAsString(MemoryMXBean memoryMXBean) { MemoryUsage heap = memoryMXBean.getHeapMemoryUsage(); MemoryUsage nonHeap = memoryMXBean.getNonHeapMemoryUsage(); long heapUsed = heap.getUsed() >> 20; long heapCommitted = heap.getCommitted() >> 20; long heapMax = heap.getMax() >>...
[ "public", "static", "String", "getMemoryUsageStatsAsString", "(", "MemoryMXBean", "memoryMXBean", ")", "{", "MemoryUsage", "heap", "=", "memoryMXBean", ".", "getHeapMemoryUsage", "(", ")", ";", "MemoryUsage", "nonHeap", "=", "memoryMXBean", ".", "getNonHeapMemoryUsage",...
Gets the memory footprint of the JVM in a string representation. @return A string describing how much heap memory and direct memory are allocated and used.
[ "Gets", "the", "memory", "footprint", "of", "the", "JVM", "in", "a", "string", "representation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/MemoryLogger.java#L156-L171
123,632
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/MemoryLogger.java
MemoryLogger.getMemoryPoolStatsAsString
public static String getMemoryPoolStatsAsString(List<MemoryPoolMXBean> poolBeans) { StringBuilder bld = new StringBuilder("Off-heap pool stats: "); int count = 0; for (MemoryPoolMXBean bean : poolBeans) { if (bean.getType() == MemoryType.NON_HEAP) { if (count > 0) { bld.append(", "); } coun...
java
public static String getMemoryPoolStatsAsString(List<MemoryPoolMXBean> poolBeans) { StringBuilder bld = new StringBuilder("Off-heap pool stats: "); int count = 0; for (MemoryPoolMXBean bean : poolBeans) { if (bean.getType() == MemoryType.NON_HEAP) { if (count > 0) { bld.append(", "); } coun...
[ "public", "static", "String", "getMemoryPoolStatsAsString", "(", "List", "<", "MemoryPoolMXBean", ">", "poolBeans", ")", "{", "StringBuilder", "bld", "=", "new", "StringBuilder", "(", "\"Off-heap pool stats: \"", ")", ";", "int", "count", "=", "0", ";", "for", "...
Gets the memory pool statistics from the JVM. @param poolBeans The collection of memory pool beans. @return A string denoting the names and sizes of the memory pools.
[ "Gets", "the", "memory", "pool", "statistics", "from", "the", "JVM", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/MemoryLogger.java#L200-L223
123,633
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/MemoryLogger.java
MemoryLogger.getGarbageCollectorStatsAsString
public static String getGarbageCollectorStatsAsString(List<GarbageCollectorMXBean> gcMXBeans) { StringBuilder bld = new StringBuilder("Garbage collector stats: "); for (GarbageCollectorMXBean bean : gcMXBeans) { bld.append('[').append(bean.getName()).append(", GC TIME (ms): ").append(bean.getCollectionTime())...
java
public static String getGarbageCollectorStatsAsString(List<GarbageCollectorMXBean> gcMXBeans) { StringBuilder bld = new StringBuilder("Garbage collector stats: "); for (GarbageCollectorMXBean bean : gcMXBeans) { bld.append('[').append(bean.getName()).append(", GC TIME (ms): ").append(bean.getCollectionTime())...
[ "public", "static", "String", "getGarbageCollectorStatsAsString", "(", "List", "<", "GarbageCollectorMXBean", ">", "gcMXBeans", ")", "{", "StringBuilder", "bld", "=", "new", "StringBuilder", "(", "\"Garbage collector stats: \"", ")", ";", "for", "(", "GarbageCollectorMX...
Gets the garbage collection statistics from the JVM. @param gcMXBeans The collection of garbage collector beans. @return A string denoting the number of times and total elapsed time in garbage collection.
[ "Gets", "the", "garbage", "collection", "statistics", "from", "the", "JVM", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/MemoryLogger.java#L231-L246
123,634
apache/flink
flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/drivers/parameter/Simplify.java
Simplify.simplify
public <T extends Comparable<T>> Graph<T, NullValue, NullValue> simplify(Graph<T, NullValue, NullValue> graph, int parallelism) throws Exception { switch (value) { case DIRECTED: graph = graph .run(new org.apache.flink.graph.asm.simple.directed.Simplify<T, NullValue, NullValue>() .setParallelism(...
java
public <T extends Comparable<T>> Graph<T, NullValue, NullValue> simplify(Graph<T, NullValue, NullValue> graph, int parallelism) throws Exception { switch (value) { case DIRECTED: graph = graph .run(new org.apache.flink.graph.asm.simple.directed.Simplify<T, NullValue, NullValue>() .setParallelism(...
[ "public", "<", "T", "extends", "Comparable", "<", "T", ">", ">", "Graph", "<", "T", ",", "NullValue", ",", "NullValue", ">", "simplify", "(", "Graph", "<", "T", ",", "NullValue", ",", "NullValue", ">", "graph", ",", "int", "parallelism", ")", "throws",...
Simplify the given graph based on the configured value. @param graph input graph @param <T> graph key type @return output graph @throws Exception on error
[ "Simplify", "the", "given", "graph", "based", "on", "the", "configured", "value", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/drivers/parameter/Simplify.java#L112-L133
123,635
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/sampling/DistributedRandomSampler.java
DistributedRandomSampler.sampleInCoordinator
public Iterator<T> sampleInCoordinator(Iterator<IntermediateSampleData<T>> input) { if (numSamples == 0) { return emptyIterable; } // This queue holds fixed number elements with the top K weight for the coordinator. PriorityQueue<IntermediateSampleData<T>> reservoir = new PriorityQueue<IntermediateSampleDat...
java
public Iterator<T> sampleInCoordinator(Iterator<IntermediateSampleData<T>> input) { if (numSamples == 0) { return emptyIterable; } // This queue holds fixed number elements with the top K weight for the coordinator. PriorityQueue<IntermediateSampleData<T>> reservoir = new PriorityQueue<IntermediateSampleDat...
[ "public", "Iterator", "<", "T", ">", "sampleInCoordinator", "(", "Iterator", "<", "IntermediateSampleData", "<", "T", ">", ">", "input", ")", "{", "if", "(", "numSamples", "==", "0", ")", "{", "return", "emptyIterable", ";", "}", "// This queue holds fixed num...
Sample algorithm for the second phase. This operation should be executed as the UDF of an all reduce operation. @param input The intermediate sample output generated in the first phase. @return The sampled output.
[ "Sample", "algorithm", "for", "the", "second", "phase", ".", "This", "operation", "should", "be", "executed", "as", "the", "UDF", "of", "an", "all", "reduce", "operation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/sampling/DistributedRandomSampler.java#L73-L117
123,636
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/sampling/DistributedRandomSampler.java
DistributedRandomSampler.sample
@Override public Iterator<T> sample(Iterator<T> input) { return sampleInCoordinator(sampleInPartition(input)); }
java
@Override public Iterator<T> sample(Iterator<T> input) { return sampleInCoordinator(sampleInPartition(input)); }
[ "@", "Override", "public", "Iterator", "<", "T", ">", "sample", "(", "Iterator", "<", "T", ">", "input", ")", "{", "return", "sampleInCoordinator", "(", "sampleInPartition", "(", "input", ")", ")", ";", "}" ]
Combine the first phase and second phase in sequence, implemented for test purpose only. @param input Source data. @return Sample result in sequence.
[ "Combine", "the", "first", "phase", "and", "second", "phase", "in", "sequence", "implemented", "for", "test", "purpose", "only", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/sampling/DistributedRandomSampler.java#L125-L128
123,637
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/FixedDelayRestartStrategy.java
FixedDelayRestartStrategy.createFactory
public static FixedDelayRestartStrategyFactory createFactory(Configuration configuration) throws Exception { int maxAttempts = configuration.getInteger(ConfigConstants.RESTART_STRATEGY_FIXED_DELAY_ATTEMPTS, 1); String delayString = configuration.getString(ConfigConstants.RESTART_STRATEGY_FIXED_DELAY_DELAY); lon...
java
public static FixedDelayRestartStrategyFactory createFactory(Configuration configuration) throws Exception { int maxAttempts = configuration.getInteger(ConfigConstants.RESTART_STRATEGY_FIXED_DELAY_ATTEMPTS, 1); String delayString = configuration.getString(ConfigConstants.RESTART_STRATEGY_FIXED_DELAY_DELAY); lon...
[ "public", "static", "FixedDelayRestartStrategyFactory", "createFactory", "(", "Configuration", "configuration", ")", "throws", "Exception", "{", "int", "maxAttempts", "=", "configuration", ".", "getInteger", "(", "ConfigConstants", ".", "RESTART_STRATEGY_FIXED_DELAY_ATTEMPTS"...
Creates a FixedDelayRestartStrategy from the given Configuration. @param configuration Configuration containing the parameter values for the restart strategy @return Initialized instance of FixedDelayRestartStrategy @throws Exception
[ "Creates", "a", "FixedDelayRestartStrategy", "from", "the", "given", "Configuration", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/FixedDelayRestartStrategy.java#L75-L91
123,638
apache/flink
flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/examples/IncrementalSSSP.java
IncrementalSSSP.isInSSSP
public static boolean isInSSSP(final Edge<Long, Double> edgeToBeRemoved, DataSet<Edge<Long, Double>> edgesInSSSP) throws Exception { return edgesInSSSP.filter(new FilterFunction<Edge<Long, Double>>() { @Override public boolean filter(Edge<Long, Double> edge) throws Exception { return edge.equals(edgeToBeRe...
java
public static boolean isInSSSP(final Edge<Long, Double> edgeToBeRemoved, DataSet<Edge<Long, Double>> edgesInSSSP) throws Exception { return edgesInSSSP.filter(new FilterFunction<Edge<Long, Double>>() { @Override public boolean filter(Edge<Long, Double> edge) throws Exception { return edge.equals(edgeToBeRe...
[ "public", "static", "boolean", "isInSSSP", "(", "final", "Edge", "<", "Long", ",", "Double", ">", "edgeToBeRemoved", ",", "DataSet", "<", "Edge", "<", "Long", ",", "Double", ">", ">", "edgesInSSSP", ")", "throws", "Exception", "{", "return", "edgesInSSSP", ...
Function that verifies whether the edge to be removed is part of the SSSP or not. If it is, the src vertex will be invalidated. @param edgeToBeRemoved @param edgesInSSSP @return true or false
[ "Function", "that", "verifies", "whether", "the", "edge", "to", "be", "removed", "is", "part", "of", "the", "SSSP", "or", "not", ".", "If", "it", "is", "the", "src", "vertex", "will", "be", "invalidated", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/examples/IncrementalSSSP.java#L140-L148
123,639
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlot.java
TaskSlot.add
public boolean add(Task task) { // Check that this slot has been assigned to the job sending this task Preconditions.checkArgument(task.getJobID().equals(jobId), "The task's job id does not match the " + "job id for which the slot has been allocated."); Preconditions.checkArgument(task.getAllocationId().equals...
java
public boolean add(Task task) { // Check that this slot has been assigned to the job sending this task Preconditions.checkArgument(task.getJobID().equals(jobId), "The task's job id does not match the " + "job id for which the slot has been allocated."); Preconditions.checkArgument(task.getAllocationId().equals...
[ "public", "boolean", "add", "(", "Task", "task", ")", "{", "// Check that this slot has been assigned to the job sending this task", "Preconditions", ".", "checkArgument", "(", "task", ".", "getJobID", "(", ")", ".", "equals", "(", "jobId", ")", ",", "\"The task's job...
Add the given task to the task slot. This is only possible if there is not already another task with the same execution attempt id added to the task slot. In this case, the method returns true. Otherwise the task slot is left unchanged and false is returned. <p>In case that the task slot state is not active an {@link ...
[ "Add", "the", "given", "task", "to", "the", "task", "slot", ".", "This", "is", "only", "possible", "if", "there", "is", "not", "already", "another", "task", "with", "the", "same", "execution", "attempt", "id", "added", "to", "the", "task", "slot", ".", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlot.java#L162-L178
123,640
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlot.java
TaskSlot.markActive
public boolean markActive() { if (TaskSlotState.ALLOCATED == state || TaskSlotState.ACTIVE == state) { state = TaskSlotState.ACTIVE; return true; } else { return false; } }
java
public boolean markActive() { if (TaskSlotState.ALLOCATED == state || TaskSlotState.ACTIVE == state) { state = TaskSlotState.ACTIVE; return true; } else { return false; } }
[ "public", "boolean", "markActive", "(", ")", "{", "if", "(", "TaskSlotState", ".", "ALLOCATED", "==", "state", "||", "TaskSlotState", ".", "ACTIVE", "==", "state", ")", "{", "state", "=", "TaskSlotState", ".", "ACTIVE", ";", "return", "true", ";", "}", "...
Mark this slot as active. A slot can only be marked active if it's in state allocated. <p>The method returns true if the slot was set to active. Otherwise it returns false. @return True if the new state of the slot is active; otherwise false
[ "Mark", "this", "slot", "as", "active", ".", "A", "slot", "can", "only", "be", "marked", "active", "if", "it", "s", "in", "state", "allocated", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlot.java#L237-L245
123,641
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlot.java
TaskSlot.markFree
public boolean markFree() { if (isEmpty()) { state = TaskSlotState.FREE; this.jobId = null; this.allocationId = null; return true; } else { return false; } }
java
public boolean markFree() { if (isEmpty()) { state = TaskSlotState.FREE; this.jobId = null; this.allocationId = null; return true; } else { return false; } }
[ "public", "boolean", "markFree", "(", ")", "{", "if", "(", "isEmpty", "(", ")", ")", "{", "state", "=", "TaskSlotState", ".", "FREE", ";", "this", ".", "jobId", "=", "null", ";", "this", ".", "allocationId", "=", "null", ";", "return", "true", ";", ...
Mark the slot as free. A slot can only be marked as free if it's empty. @return True if the new state is free; otherwise false
[ "Mark", "the", "slot", "as", "free", ".", "A", "slot", "can", "only", "be", "marked", "as", "free", "if", "it", "s", "empty", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlot.java#L268-L278
123,642
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlot.java
TaskSlot.generateSlotOffer
public SlotOffer generateSlotOffer() { Preconditions.checkState(TaskSlotState.ACTIVE == state || TaskSlotState.ALLOCATED == state, "The task slot is not in state active or allocated."); Preconditions.checkState(allocationId != null, "The task slot are not allocated"); return new SlotOffer(allocationId, index,...
java
public SlotOffer generateSlotOffer() { Preconditions.checkState(TaskSlotState.ACTIVE == state || TaskSlotState.ALLOCATED == state, "The task slot is not in state active or allocated."); Preconditions.checkState(allocationId != null, "The task slot are not allocated"); return new SlotOffer(allocationId, index,...
[ "public", "SlotOffer", "generateSlotOffer", "(", ")", "{", "Preconditions", ".", "checkState", "(", "TaskSlotState", ".", "ACTIVE", "==", "state", "||", "TaskSlotState", ".", "ALLOCATED", "==", "state", ",", "\"The task slot is not in state active or allocated.\"", ")",...
Generate the slot offer from this TaskSlot. @return The sot offer which this task slot can provide
[ "Generate", "the", "slot", "offer", "from", "this", "TaskSlot", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlot.java#L295-L301
123,643
apache/flink
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateBackend.java
RocksDBStateBackend.configure
@Override public RocksDBStateBackend configure(Configuration config, ClassLoader classLoader) { return new RocksDBStateBackend(this, config, classLoader); }
java
@Override public RocksDBStateBackend configure(Configuration config, ClassLoader classLoader) { return new RocksDBStateBackend(this, config, classLoader); }
[ "@", "Override", "public", "RocksDBStateBackend", "configure", "(", "Configuration", "config", ",", "ClassLoader", "classLoader", ")", "{", "return", "new", "RocksDBStateBackend", "(", "this", ",", "config", ",", "classLoader", ")", ";", "}" ]
Creates a copy of this state backend that uses the values defined in the configuration for fields where that were not yet specified in this state backend. @param config The configuration. @param classLoader The class loader. @return The re-configured variant of the state backend
[ "Creates", "a", "copy", "of", "this", "state", "backend", "that", "uses", "the", "values", "defined", "in", "the", "configuration", "for", "fields", "where", "that", "were", "not", "yet", "specified", "in", "this", "state", "backend", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateBackend.java#L373-L376
123,644
apache/flink
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateBackend.java
RocksDBStateBackend.getDbStoragePaths
public String[] getDbStoragePaths() { if (localRocksDbDirectories == null) { return null; } else { String[] paths = new String[localRocksDbDirectories.length]; for (int i = 0; i < paths.length; i++) { paths[i] = localRocksDbDirectories[i].toString(); } return paths; } }
java
public String[] getDbStoragePaths() { if (localRocksDbDirectories == null) { return null; } else { String[] paths = new String[localRocksDbDirectories.length]; for (int i = 0; i < paths.length; i++) { paths[i] = localRocksDbDirectories[i].toString(); } return paths; } }
[ "public", "String", "[", "]", "getDbStoragePaths", "(", ")", "{", "if", "(", "localRocksDbDirectories", "==", "null", ")", "{", "return", "null", ";", "}", "else", "{", "String", "[", "]", "paths", "=", "new", "String", "[", "localRocksDbDirectories", ".",...
Gets the configured local DB storage paths, or null, if none were configured. <p>Under these directories on the TaskManager, RocksDB stores its SST files and metadata files. These directories do not need to be persistent, they can be ephermeral, meaning that they are lost on a machine failure, because state in RocksDB...
[ "Gets", "the", "configured", "local", "DB", "storage", "paths", "or", "null", "if", "none", "were", "configured", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateBackend.java#L683-L693
123,645
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
SingleInputGate.assignExclusiveSegments
public void assignExclusiveSegments(NetworkBufferPool networkBufferPool, int networkBuffersPerChannel) throws IOException { checkState(this.isCreditBased, "Bug in input gate setup logic: exclusive buffers only exist with credit-based flow control."); checkState(this.networkBufferPool == null, "Bug in input gate set...
java
public void assignExclusiveSegments(NetworkBufferPool networkBufferPool, int networkBuffersPerChannel) throws IOException { checkState(this.isCreditBased, "Bug in input gate setup logic: exclusive buffers only exist with credit-based flow control."); checkState(this.networkBufferPool == null, "Bug in input gate set...
[ "public", "void", "assignExclusiveSegments", "(", "NetworkBufferPool", "networkBufferPool", ",", "int", "networkBuffersPerChannel", ")", "throws", "IOException", "{", "checkState", "(", "this", ".", "isCreditBased", ",", "\"Bug in input gate setup logic: exclusive buffers only ...
Assign the exclusive buffers to all remote input channels directly for credit-based mode. @param networkBufferPool The global pool to request and recycle exclusive buffers @param networkBuffersPerChannel The number of exclusive buffers for each channel
[ "Assign", "the", "exclusive", "buffers", "to", "all", "remote", "input", "channels", "directly", "for", "credit", "-", "based", "mode", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java#L305-L321
123,646
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
SingleInputGate.retriggerPartitionRequest
public void retriggerPartitionRequest(IntermediateResultPartitionID partitionId) throws IOException, InterruptedException { synchronized (requestLock) { if (!isReleased) { final InputChannel ch = inputChannels.get(partitionId); checkNotNull(ch, "Unknown input channel with ID " + partitionId); LOG.deb...
java
public void retriggerPartitionRequest(IntermediateResultPartitionID partitionId) throws IOException, InterruptedException { synchronized (requestLock) { if (!isReleased) { final InputChannel ch = inputChannels.get(partitionId); checkNotNull(ch, "Unknown input channel with ID " + partitionId); LOG.deb...
[ "public", "void", "retriggerPartitionRequest", "(", "IntermediateResultPartitionID", "partitionId", ")", "throws", "IOException", ",", "InterruptedException", "{", "synchronized", "(", "requestLock", ")", "{", "if", "(", "!", "isReleased", ")", "{", "final", "InputCha...
Retriggers a partition request.
[ "Retriggers", "a", "partition", "request", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java#L400-L428
123,647
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
SingleInputGate.create
public static SingleInputGate create( String owningTaskName, JobID jobId, InputGateDeploymentDescriptor igdd, NetworkEnvironment networkEnvironment, TaskEventPublisher taskEventPublisher, TaskActions taskActions, InputChannelMetrics metrics, Counter numBytesInCounter) { final IntermediateDataSetID co...
java
public static SingleInputGate create( String owningTaskName, JobID jobId, InputGateDeploymentDescriptor igdd, NetworkEnvironment networkEnvironment, TaskEventPublisher taskEventPublisher, TaskActions taskActions, InputChannelMetrics metrics, Counter numBytesInCounter) { final IntermediateDataSetID co...
[ "public", "static", "SingleInputGate", "create", "(", "String", "owningTaskName", ",", "JobID", "jobId", ",", "InputGateDeploymentDescriptor", "igdd", ",", "NetworkEnvironment", "networkEnvironment", ",", "TaskEventPublisher", "taskEventPublisher", ",", "TaskActions", "task...
Creates an input gate and all of its input channels.
[ "Creates", "an", "input", "gate", "and", "all", "of", "its", "input", "channels", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java#L669-L753
123,648
apache/flink
flink-core/src/main/java/org/apache/flink/util/NetUtils.java
NetUtils.getAvailablePort
public static int getAvailablePort() { for (int i = 0; i < 50; i++) { try (ServerSocket serverSocket = new ServerSocket(0)) { int port = serverSocket.getLocalPort(); if (port != 0) { return port; } } catch (IOException ignored) {} } throw new RuntimeException("Could not find a free perm...
java
public static int getAvailablePort() { for (int i = 0; i < 50; i++) { try (ServerSocket serverSocket = new ServerSocket(0)) { int port = serverSocket.getLocalPort(); if (port != 0) { return port; } } catch (IOException ignored) {} } throw new RuntimeException("Could not find a free perm...
[ "public", "static", "int", "getAvailablePort", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "50", ";", "i", "++", ")", "{", "try", "(", "ServerSocket", "serverSocket", "=", "new", "ServerSocket", "(", "0", ")", ")", "{", "int", ...
Find a non-occupied port. @return A non-occupied port.
[ "Find", "a", "non", "-", "occupied", "port", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/NetUtils.java#L104-L116
123,649
apache/flink
flink-core/src/main/java/org/apache/flink/util/NetUtils.java
NetUtils.unresolvedHostToNormalizedString
public static String unresolvedHostToNormalizedString(String host) { // Return loopback interface address if host is null // This represents the behavior of {@code InetAddress.getByName } and RFC 3330 if (host == null) { host = InetAddress.getLoopbackAddress().getHostAddress(); } else { host = host.trim()...
java
public static String unresolvedHostToNormalizedString(String host) { // Return loopback interface address if host is null // This represents the behavior of {@code InetAddress.getByName } and RFC 3330 if (host == null) { host = InetAddress.getLoopbackAddress().getHostAddress(); } else { host = host.trim()...
[ "public", "static", "String", "unresolvedHostToNormalizedString", "(", "String", "host", ")", "{", "// Return loopback interface address if host is null", "// This represents the behavior of {@code InetAddress.getByName } and RFC 3330", "if", "(", "host", "==", "null", ")", "{", ...
Returns an address in a normalized format for Akka. When an IPv6 address is specified, it normalizes the IPv6 address to avoid complications with the exact URL match policy of Akka. @param host The hostname, IPv4 or IPv6 address @return host which will be normalized if it is an IPv6 address
[ "Returns", "an", "address", "in", "a", "normalized", "format", "for", "Akka", ".", "When", "an", "IPv6", "address", "is", "specified", "it", "normalizes", "the", "IPv6", "address", "to", "avoid", "complications", "with", "the", "exact", "URL", "match", "poli...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/NetUtils.java#L130-L155
123,650
apache/flink
flink-core/src/main/java/org/apache/flink/util/NetUtils.java
NetUtils.ipAddressToUrlString
public static String ipAddressToUrlString(InetAddress address) { if (address == null) { throw new NullPointerException("address is null"); } else if (address instanceof Inet4Address) { return address.getHostAddress(); } else if (address instanceof Inet6Address) { return getIPv6UrlRepresentation((Inet...
java
public static String ipAddressToUrlString(InetAddress address) { if (address == null) { throw new NullPointerException("address is null"); } else if (address instanceof Inet4Address) { return address.getHostAddress(); } else if (address instanceof Inet6Address) { return getIPv6UrlRepresentation((Inet...
[ "public", "static", "String", "ipAddressToUrlString", "(", "InetAddress", "address", ")", "{", "if", "(", "address", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"address is null\"", ")", ";", "}", "else", "if", "(", "address", "insta...
Encodes an IP address properly as a URL string. This method makes sure that IPv6 addresses have the proper formatting to be included in URLs. @param address The IP address to encode. @return The proper URL string encoded IP address.
[ "Encodes", "an", "IP", "address", "properly", "as", "a", "URL", "string", ".", "This", "method", "makes", "sure", "that", "IPv6", "addresses", "have", "the", "proper", "formatting", "to", "be", "included", "in", "URLs", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/NetUtils.java#L178-L191
123,651
apache/flink
flink-core/src/main/java/org/apache/flink/util/NetUtils.java
NetUtils.socketAddressToUrlString
public static String socketAddressToUrlString(InetSocketAddress address) { if (address.isUnresolved()) { throw new IllegalArgumentException("Address cannot be resolved: " + address.getHostString()); } return ipAddressAndPortToUrlString(address.getAddress(), address.getPort()); }
java
public static String socketAddressToUrlString(InetSocketAddress address) { if (address.isUnresolved()) { throw new IllegalArgumentException("Address cannot be resolved: " + address.getHostString()); } return ipAddressAndPortToUrlString(address.getAddress(), address.getPort()); }
[ "public", "static", "String", "socketAddressToUrlString", "(", "InetSocketAddress", "address", ")", "{", "if", "(", "address", ".", "isUnresolved", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Address cannot be resolved: \"", "+", "address",...
Encodes an IP address and port to be included in URL. in particular, this method makes sure that IPv6 addresses have the proper formatting to be included in URLs. @param address The socket address with the IP address and port. @return The proper URL string encoded IP address and port.
[ "Encodes", "an", "IP", "address", "and", "port", "to", "be", "included", "in", "URL", ".", "in", "particular", "this", "method", "makes", "sure", "that", "IPv6", "addresses", "have", "the", "proper", "formatting", "to", "be", "included", "in", "URLs", "." ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/NetUtils.java#L212-L217
123,652
apache/flink
flink-core/src/main/java/org/apache/flink/util/NetUtils.java
NetUtils.hostAndPortToUrlString
public static String hostAndPortToUrlString(String host, int port) throws UnknownHostException { return ipAddressAndPortToUrlString(InetAddress.getByName(host), port); }
java
public static String hostAndPortToUrlString(String host, int port) throws UnknownHostException { return ipAddressAndPortToUrlString(InetAddress.getByName(host), port); }
[ "public", "static", "String", "hostAndPortToUrlString", "(", "String", "host", ",", "int", "port", ")", "throws", "UnknownHostException", "{", "return", "ipAddressAndPortToUrlString", "(", "InetAddress", ".", "getByName", "(", "host", ")", ",", "port", ")", ";", ...
Normalizes and encodes a hostname and port to be included in URL. In particular, this method makes sure that IPv6 address literals have the proper formatting to be included in URLs. @param host The address to be included in the URL. @param port The port for the URL address. @return The proper URL string encoded IP add...
[ "Normalizes", "and", "encodes", "a", "hostname", "and", "port", "to", "be", "included", "in", "URL", ".", "In", "particular", "this", "method", "makes", "sure", "that", "IPv6", "address", "literals", "have", "the", "proper", "formatting", "to", "be", "includ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/NetUtils.java#L229-L231
123,653
apache/flink
flink-core/src/main/java/org/apache/flink/util/NetUtils.java
NetUtils.getIPv6UrlRepresentation
private static String getIPv6UrlRepresentation(byte[] addressBytes) { // first, convert bytes to 16 bit chunks int[] hextets = new int[8]; for (int i = 0; i < hextets.length; i++) { hextets[i] = (addressBytes[2 * i] & 0xFF) << 8 | (addressBytes[2 * i + 1] & 0xFF); } // now, find the sequence of zeros that...
java
private static String getIPv6UrlRepresentation(byte[] addressBytes) { // first, convert bytes to 16 bit chunks int[] hextets = new int[8]; for (int i = 0; i < hextets.length; i++) { hextets[i] = (addressBytes[2 * i] & 0xFF) << 8 | (addressBytes[2 * i + 1] & 0xFF); } // now, find the sequence of zeros that...
[ "private", "static", "String", "getIPv6UrlRepresentation", "(", "byte", "[", "]", "addressBytes", ")", "{", "// first, convert bytes to 16 bit chunks", "int", "[", "]", "hextets", "=", "new", "int", "[", "8", "]", ";", "for", "(", "int", "i", "=", "0", ";", ...
Creates a compressed URL style representation of an Inet6Address. <p>This method copies and adopts code from Google's Guava library. We re-implement this here in order to reduce dependency on Guava. The Guava library has frequently caused dependency conflicts in the past.
[ "Creates", "a", "compressed", "URL", "style", "representation", "of", "an", "Inet6Address", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/NetUtils.java#L251-L301
123,654
apache/flink
flink-core/src/main/java/org/apache/flink/util/NetUtils.java
NetUtils.getPortRangeFromString
public static Iterator<Integer> getPortRangeFromString(String rangeDefinition) throws NumberFormatException { final String[] ranges = rangeDefinition.trim().split(","); UnionIterator<Integer> iterators = new UnionIterator<>(); for (String rawRange: ranges) { Iterator<Integer> rangeIterator; String range =...
java
public static Iterator<Integer> getPortRangeFromString(String rangeDefinition) throws NumberFormatException { final String[] ranges = rangeDefinition.trim().split(","); UnionIterator<Integer> iterators = new UnionIterator<>(); for (String rawRange: ranges) { Iterator<Integer> rangeIterator; String range =...
[ "public", "static", "Iterator", "<", "Integer", ">", "getPortRangeFromString", "(", "String", "rangeDefinition", ")", "throws", "NumberFormatException", "{", "final", "String", "[", "]", "ranges", "=", "rangeDefinition", ".", "trim", "(", ")", ".", "split", "(",...
Returns an iterator over available ports defined by the range definition. @param rangeDefinition String describing a single port, a range of ports or multiple ranges. @return Set of ports from the range definition @throws NumberFormatException If an invalid string is passed.
[ "Returns", "an", "iterator", "over", "available", "ports", "defined", "by", "the", "range", "definition", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/NetUtils.java#L314-L365
123,655
apache/flink
flink-core/src/main/java/org/apache/flink/util/NetUtils.java
NetUtils.createSocketFromPorts
public static ServerSocket createSocketFromPorts(Iterator<Integer> portsIterator, SocketFactory factory) { while (portsIterator.hasNext()) { int port = portsIterator.next(); LOG.debug("Trying to open socket on port {}", port); try { return factory.createSocket(port); } catch (IOException | IllegalArgu...
java
public static ServerSocket createSocketFromPorts(Iterator<Integer> portsIterator, SocketFactory factory) { while (portsIterator.hasNext()) { int port = portsIterator.next(); LOG.debug("Trying to open socket on port {}", port); try { return factory.createSocket(port); } catch (IOException | IllegalArgu...
[ "public", "static", "ServerSocket", "createSocketFromPorts", "(", "Iterator", "<", "Integer", ">", "portsIterator", ",", "SocketFactory", "factory", ")", "{", "while", "(", "portsIterator", ".", "hasNext", "(", ")", ")", "{", "int", "port", "=", "portsIterator",...
Tries to allocate a socket from the given sets of ports. @param portsIterator A set of ports to choose from. @param factory A factory for creating the SocketServer @return null if no port was available or an allocated socket.
[ "Tries", "to", "allocate", "a", "socket", "from", "the", "given", "sets", "of", "ports", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/NetUtils.java#L374-L389
123,656
apache/flink
flink-optimizer/src/main/java/org/apache/flink/optimizer/dataproperties/GlobalProperties.java
GlobalProperties.setRangePartitioned
public void setRangePartitioned(Ordering ordering, DataDistribution distribution) { if (ordering == null) { throw new NullPointerException(); } this.partitioning = PartitioningProperty.RANGE_PARTITIONED; this.ordering = ordering; this.partitioningFields = ordering.getInvolvedIndexes(); this.distributi...
java
public void setRangePartitioned(Ordering ordering, DataDistribution distribution) { if (ordering == null) { throw new NullPointerException(); } this.partitioning = PartitioningProperty.RANGE_PARTITIONED; this.ordering = ordering; this.partitioningFields = ordering.getInvolvedIndexes(); this.distributi...
[ "public", "void", "setRangePartitioned", "(", "Ordering", "ordering", ",", "DataDistribution", "distribution", ")", "{", "if", "(", "ordering", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "this", ".", "partitioning", "="...
Set the parameters for range partition. @param ordering Order of the partitioned fields @param distribution The data distribution for range partition. User can supply a customized data distribution, also the data distribution can be null.
[ "Set", "the", "parameters", "for", "range", "partition", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/dataproperties/GlobalProperties.java#L109-L118
123,657
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.fromCollection
public static <K, VV, EV> Graph<K, VV, EV> fromCollection(Collection<Vertex<K, VV>> vertices, Collection<Edge<K, EV>> edges, ExecutionEnvironment context) { return fromDataSet(context.fromCollection(vertices), context.fromCollection(edges), context); }
java
public static <K, VV, EV> Graph<K, VV, EV> fromCollection(Collection<Vertex<K, VV>> vertices, Collection<Edge<K, EV>> edges, ExecutionEnvironment context) { return fromDataSet(context.fromCollection(vertices), context.fromCollection(edges), context); }
[ "public", "static", "<", "K", ",", "VV", ",", "EV", ">", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "fromCollection", "(", "Collection", "<", "Vertex", "<", "K", ",", "VV", ">", ">", "vertices", ",", "Collection", "<", "Edge", "<", "K", ",", ...
Creates a graph from a Collection of vertices and a Collection of edges. @param vertices a Collection of vertices. @param edges a Collection of edges. @param context the flink execution environment. @return the newly created graph.
[ "Creates", "a", "graph", "from", "a", "Collection", "of", "vertices", "and", "a", "Collection", "of", "edges", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L114-L119
123,658
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.fromCollection
public static <K, EV> Graph<K, NullValue, EV> fromCollection(Collection<Edge<K, EV>> edges, ExecutionEnvironment context) { return fromDataSet(context.fromCollection(edges), context); }
java
public static <K, EV> Graph<K, NullValue, EV> fromCollection(Collection<Edge<K, EV>> edges, ExecutionEnvironment context) { return fromDataSet(context.fromCollection(edges), context); }
[ "public", "static", "<", "K", ",", "EV", ">", "Graph", "<", "K", ",", "NullValue", ",", "EV", ">", "fromCollection", "(", "Collection", "<", "Edge", "<", "K", ",", "EV", ">", ">", "edges", ",", "ExecutionEnvironment", "context", ")", "{", "return", "...
Creates a graph from a Collection of edges. Vertices are created automatically and their values are set to NullValue. @param edges a Collection of edges. @param context the flink execution environment. @return the newly created graph.
[ "Creates", "a", "graph", "from", "a", "Collection", "of", "edges", ".", "Vertices", "are", "created", "automatically", "and", "their", "values", "are", "set", "to", "NullValue", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L130-L134
123,659
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.fromCollection
public static <K, VV, EV> Graph<K, VV, EV> fromCollection(Collection<Edge<K, EV>> edges, final MapFunction<K, VV> vertexValueInitializer, ExecutionEnvironment context) { return fromDataSet(context.fromCollection(edges), vertexValueInitializer, context); }
java
public static <K, VV, EV> Graph<K, VV, EV> fromCollection(Collection<Edge<K, EV>> edges, final MapFunction<K, VV> vertexValueInitializer, ExecutionEnvironment context) { return fromDataSet(context.fromCollection(edges), vertexValueInitializer, context); }
[ "public", "static", "<", "K", ",", "VV", ",", "EV", ">", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "fromCollection", "(", "Collection", "<", "Edge", "<", "K", ",", "EV", ">", ">", "edges", ",", "final", "MapFunction", "<", "K", ",", "VV", "...
Creates a graph from a Collection of edges. Vertices are created automatically and their values are set by applying the provided map function to the vertex IDs. @param edges a Collection of edges. @param vertexValueInitializer a map function that initializes the vertex values. It allows to apply a map transformation o...
[ "Creates", "a", "graph", "from", "a", "Collection", "of", "edges", ".", "Vertices", "are", "created", "automatically", "and", "their", "values", "are", "set", "by", "applying", "the", "provided", "map", "function", "to", "the", "vertex", "IDs", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L147-L151
123,660
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.fromDataSet
public static <K, VV, EV> Graph<K, VV, EV> fromDataSet(DataSet<Vertex<K, VV>> vertices, DataSet<Edge<K, EV>> edges, ExecutionEnvironment context) { return new Graph<>(vertices, edges, context); }
java
public static <K, VV, EV> Graph<K, VV, EV> fromDataSet(DataSet<Vertex<K, VV>> vertices, DataSet<Edge<K, EV>> edges, ExecutionEnvironment context) { return new Graph<>(vertices, edges, context); }
[ "public", "static", "<", "K", ",", "VV", ",", "EV", ">", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "fromDataSet", "(", "DataSet", "<", "Vertex", "<", "K", ",", "VV", ">", ">", "vertices", ",", "DataSet", "<", "Edge", "<", "K", ",", "EV", ...
Creates a graph from a DataSet of vertices and a DataSet of edges. @param vertices a DataSet of vertices. @param edges a DataSet of edges. @param context the flink execution environment. @return the newly created graph.
[ "Creates", "a", "graph", "from", "a", "DataSet", "of", "vertices", "and", "a", "DataSet", "of", "edges", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L161-L165
123,661
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.fromDataSet
public static <K, EV> Graph<K, NullValue, EV> fromDataSet( DataSet<Edge<K, EV>> edges, ExecutionEnvironment context) { DataSet<Vertex<K, NullValue>> vertices = edges .flatMap(new EmitSrcAndTarget<>()) .name("Source and target IDs") .distinct() .name("IDs"); return new Graph<>(vertices, edges, con...
java
public static <K, EV> Graph<K, NullValue, EV> fromDataSet( DataSet<Edge<K, EV>> edges, ExecutionEnvironment context) { DataSet<Vertex<K, NullValue>> vertices = edges .flatMap(new EmitSrcAndTarget<>()) .name("Source and target IDs") .distinct() .name("IDs"); return new Graph<>(vertices, edges, con...
[ "public", "static", "<", "K", ",", "EV", ">", "Graph", "<", "K", ",", "NullValue", ",", "EV", ">", "fromDataSet", "(", "DataSet", "<", "Edge", "<", "K", ",", "EV", ">", ">", "edges", ",", "ExecutionEnvironment", "context", ")", "{", "DataSet", "<", ...
Creates a graph from a DataSet of edges. Vertices are created automatically and their values are set to NullValue. @param edges a DataSet of edges. @param context the flink execution environment. @return the newly created graph.
[ "Creates", "a", "graph", "from", "a", "DataSet", "of", "edges", ".", "Vertices", "are", "created", "automatically", "and", "their", "values", "are", "set", "to", "NullValue", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L176-L186
123,662
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.fromDataSet
public static <K, VV, EV> Graph<K, VV, EV> fromDataSet(DataSet<Edge<K, EV>> edges, final MapFunction<K, VV> vertexValueInitializer, ExecutionEnvironment context) { TypeInformation<K> keyType = ((TupleTypeInfo<?>) edges.getType()).getTypeAt(0); TypeInformation<VV> valueType = TypeExtractor.createTypeInfo( M...
java
public static <K, VV, EV> Graph<K, VV, EV> fromDataSet(DataSet<Edge<K, EV>> edges, final MapFunction<K, VV> vertexValueInitializer, ExecutionEnvironment context) { TypeInformation<K> keyType = ((TupleTypeInfo<?>) edges.getType()).getTypeAt(0); TypeInformation<VV> valueType = TypeExtractor.createTypeInfo( M...
[ "public", "static", "<", "K", ",", "VV", ",", "EV", ">", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "fromDataSet", "(", "DataSet", "<", "Edge", "<", "K", ",", "EV", ">", ">", "edges", ",", "final", "MapFunction", "<", "K", ",", "VV", ">", ...
Creates a graph from a DataSet of edges. Vertices are created automatically and their values are set by applying the provided map function to the vertex IDs. @param edges a DataSet of edges. @param vertexValueInitializer the mapper function that initializes the vertex values. It allows to apply a map transformation on...
[ "Creates", "a", "graph", "from", "a", "DataSet", "of", "edges", ".", "Vertices", "are", "created", "automatically", "and", "their", "values", "are", "set", "by", "applying", "the", "provided", "map", "function", "to", "the", "vertex", "IDs", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L211-L239
123,663
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.fromTupleDataSet
public static <K, VV, EV> Graph<K, VV, EV> fromTupleDataSet(DataSet<Tuple2<K, VV>> vertices, DataSet<Tuple3<K, K, EV>> edges, ExecutionEnvironment context) { DataSet<Vertex<K, VV>> vertexDataSet = vertices .map(new Tuple2ToVertexMap<>()) .name("Type conversion"); DataSet<Edge<K, EV>> edgeDataSet = edges...
java
public static <K, VV, EV> Graph<K, VV, EV> fromTupleDataSet(DataSet<Tuple2<K, VV>> vertices, DataSet<Tuple3<K, K, EV>> edges, ExecutionEnvironment context) { DataSet<Vertex<K, VV>> vertexDataSet = vertices .map(new Tuple2ToVertexMap<>()) .name("Type conversion"); DataSet<Edge<K, EV>> edgeDataSet = edges...
[ "public", "static", "<", "K", ",", "VV", ",", "EV", ">", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "fromTupleDataSet", "(", "DataSet", "<", "Tuple2", "<", "K", ",", "VV", ">", ">", "vertices", ",", "DataSet", "<", "Tuple3", "<", "K", ",", "...
Creates a graph from a DataSet of Tuple2 objects for vertices and Tuple3 objects for edges. <p>The first field of the Tuple2 vertex object will become the vertex ID and the second field will become the vertex value. The first field of the Tuple3 object for edges will become the source ID, the second field will become ...
[ "Creates", "a", "graph", "from", "a", "DataSet", "of", "Tuple2", "objects", "for", "vertices", "and", "Tuple3", "objects", "for", "edges", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L268-L280
123,664
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.fromTuple2DataSet
public static <K> Graph<K, NullValue, NullValue> fromTuple2DataSet(DataSet<Tuple2<K, K>> edges, ExecutionEnvironment context) { DataSet<Edge<K, NullValue>> edgeDataSet = edges .map(new Tuple2ToEdgeMap<>()) .name("To Edge"); return fromDataSet(edgeDataSet, context); }
java
public static <K> Graph<K, NullValue, NullValue> fromTuple2DataSet(DataSet<Tuple2<K, K>> edges, ExecutionEnvironment context) { DataSet<Edge<K, NullValue>> edgeDataSet = edges .map(new Tuple2ToEdgeMap<>()) .name("To Edge"); return fromDataSet(edgeDataSet, context); }
[ "public", "static", "<", "K", ">", "Graph", "<", "K", ",", "NullValue", ",", "NullValue", ">", "fromTuple2DataSet", "(", "DataSet", "<", "Tuple2", "<", "K", ",", "K", ">", ">", "edges", ",", "ExecutionEnvironment", "context", ")", "{", "DataSet", "<", ...
Creates a graph from a DataSet of Tuple2 objects for edges. Each Tuple2 will become one Edge, where the source ID will be the first field of the Tuple2 and the target ID will be the second field of the Tuple2. <p>Edge value types and Vertex values types will be set to NullValue. @param edges a DataSet of Tuple2. @par...
[ "Creates", "a", "graph", "from", "a", "DataSet", "of", "Tuple2", "objects", "for", "edges", ".", "Each", "Tuple2", "will", "become", "one", "Edge", "where", "the", "source", "ID", "will", "be", "the", "first", "field", "of", "the", "Tuple2", "and", "the"...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L342-L350
123,665
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.fromCsvReader
public static GraphCsvReader fromCsvReader(String verticesPath, String edgesPath, ExecutionEnvironment context) { return new GraphCsvReader(verticesPath, edgesPath, context); }
java
public static GraphCsvReader fromCsvReader(String verticesPath, String edgesPath, ExecutionEnvironment context) { return new GraphCsvReader(verticesPath, edgesPath, context); }
[ "public", "static", "GraphCsvReader", "fromCsvReader", "(", "String", "verticesPath", ",", "String", "edgesPath", ",", "ExecutionEnvironment", "context", ")", "{", "return", "new", "GraphCsvReader", "(", "verticesPath", ",", "edgesPath", ",", "context", ")", ";", ...
Creates a Graph from a CSV file of vertices and a CSV file of edges. @param verticesPath path to a CSV file with the Vertex data. @param edgesPath path to a CSV file with the Edge data @param context the Flink execution environment. @return An instance of {@link org.apache.flink.graph.GraphCsvReader}, on which calling...
[ "Creates", "a", "Graph", "from", "a", "CSV", "file", "of", "vertices", "and", "a", "CSV", "file", "of", "edges", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L391-L393
123,666
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.fromCsvReader
public static <K, VV> GraphCsvReader fromCsvReader(String edgesPath, final MapFunction<K, VV> vertexValueInitializer, ExecutionEnvironment context) { return new GraphCsvReader(edgesPath, vertexValueInitializer, context); }
java
public static <K, VV> GraphCsvReader fromCsvReader(String edgesPath, final MapFunction<K, VV> vertexValueInitializer, ExecutionEnvironment context) { return new GraphCsvReader(edgesPath, vertexValueInitializer, context); }
[ "public", "static", "<", "K", ",", "VV", ">", "GraphCsvReader", "fromCsvReader", "(", "String", "edgesPath", ",", "final", "MapFunction", "<", "K", ",", "VV", ">", "vertexValueInitializer", ",", "ExecutionEnvironment", "context", ")", "{", "return", "new", "Gr...
Creates a graph from a CSV file of edges. Vertices will be created automatically and Vertex values can be initialized using a user-defined mapper. @param edgesPath a path to a CSV file with the Edge data @param vertexValueInitializer the mapper function that initializes the vertex values. It allows to apply a map tran...
[ "Creates", "a", "graph", "from", "a", "CSV", "file", "of", "edges", ".", "Vertices", "will", "be", "created", "automatically", "and", "Vertex", "values", "can", "be", "initialized", "using", "a", "user", "-", "defined", "mapper", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L428-L431
123,667
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.getTriplets
public DataSet<Triplet<K, VV, EV>> getTriplets() { return this.getVertices() .join(this.getEdges()).where(0).equalTo(0) .with(new ProjectEdgeWithSrcValue<>()) .name("Project edge with source value") .join(this.getVertices()).where(1).equalTo(0) .with(new ProjectEdgeWithVertexValues<>()) .name("Pro...
java
public DataSet<Triplet<K, VV, EV>> getTriplets() { return this.getVertices() .join(this.getEdges()).where(0).equalTo(0) .with(new ProjectEdgeWithSrcValue<>()) .name("Project edge with source value") .join(this.getVertices()).where(1).equalTo(0) .with(new ProjectEdgeWithVertexValues<>()) .name("Pro...
[ "public", "DataSet", "<", "Triplet", "<", "K", ",", "VV", ",", "EV", ">", ">", "getTriplets", "(", ")", "{", "return", "this", ".", "getVertices", "(", ")", ".", "join", "(", "this", ".", "getEdges", "(", ")", ")", ".", "where", "(", "0", ")", ...
This method allows access to the graph's edge values along with its source and target vertex values. @return a triplet DataSet consisting of (srcVertexId, trgVertexId, srcVertexValue, trgVertexValue, edgeValue)
[ "This", "method", "allows", "access", "to", "the", "graph", "s", "edge", "values", "along", "with", "its", "source", "and", "target", "vertex", "values", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L483-L491
123,668
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.joinWithVertices
public <T> Graph<K, VV, EV> joinWithVertices(DataSet<Tuple2<K, T>> inputDataSet, final VertexJoinFunction<VV, T> vertexJoinFunction) { DataSet<Vertex<K, VV>> resultedVertices = this.getVertices() .coGroup(inputDataSet).where(0).equalTo(0) .with(new ApplyCoGroupToVertexValues<>(vertexJoinFunction)) .n...
java
public <T> Graph<K, VV, EV> joinWithVertices(DataSet<Tuple2<K, T>> inputDataSet, final VertexJoinFunction<VV, T> vertexJoinFunction) { DataSet<Vertex<K, VV>> resultedVertices = this.getVertices() .coGroup(inputDataSet).where(0).equalTo(0) .with(new ApplyCoGroupToVertexValues<>(vertexJoinFunction)) .n...
[ "public", "<", "T", ">", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "joinWithVertices", "(", "DataSet", "<", "Tuple2", "<", "K", ",", "T", ">", ">", "inputDataSet", ",", "final", "VertexJoinFunction", "<", "VV", ",", "T", ">", "vertexJoinFunction", ...
Joins the vertex DataSet of this graph with an input Tuple2 DataSet and applies a user-defined transformation on the values of the matched records. The vertex ID and the first field of the Tuple2 DataSet are used as the join keys. @param inputDataSet the Tuple2 DataSet to join with. The first field of the Tuple2 is us...
[ "Joins", "the", "vertex", "DataSet", "of", "this", "graph", "with", "an", "input", "Tuple2", "DataSet", "and", "applies", "a", "user", "-", "defined", "transformation", "on", "the", "values", "of", "the", "matched", "records", ".", "The", "vertex", "ID", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L674-L682
123,669
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.joinWithEdges
public <T> Graph<K, VV, EV> joinWithEdges(DataSet<Tuple3<K, K, T>> inputDataSet, final EdgeJoinFunction<EV, T> edgeJoinFunction) { DataSet<Edge<K, EV>> resultedEdges = this.getEdges() .coGroup(inputDataSet).where(0, 1).equalTo(0, 1) .with(new ApplyCoGroupToEdgeValues<>(edgeJoinFunction)) .name("Join ...
java
public <T> Graph<K, VV, EV> joinWithEdges(DataSet<Tuple3<K, K, T>> inputDataSet, final EdgeJoinFunction<EV, T> edgeJoinFunction) { DataSet<Edge<K, EV>> resultedEdges = this.getEdges() .coGroup(inputDataSet).where(0, 1).equalTo(0, 1) .with(new ApplyCoGroupToEdgeValues<>(edgeJoinFunction)) .name("Join ...
[ "public", "<", "T", ">", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "joinWithEdges", "(", "DataSet", "<", "Tuple3", "<", "K", ",", "K", ",", "T", ">", ">", "inputDataSet", ",", "final", "EdgeJoinFunction", "<", "EV", ",", "T", ">", "edgeJoinFunc...
Joins the edge DataSet with an input DataSet on the composite key of both source and target IDs and applies a user-defined transformation on the values of the matched records. The first two fields of the input DataSet are used as join keys. @param inputDataSet the DataSet to join with. The first two fields of the Tupl...
[ "Joins", "the", "edge", "DataSet", "with", "an", "input", "DataSet", "on", "the", "composite", "key", "of", "both", "source", "and", "target", "IDs", "and", "applies", "a", "user", "-", "defined", "transformation", "on", "the", "values", "of", "the", "matc...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L728-L736
123,670
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.joinWithEdgesOnSource
public <T> Graph<K, VV, EV> joinWithEdgesOnSource(DataSet<Tuple2<K, T>> inputDataSet, final EdgeJoinFunction<EV, T> edgeJoinFunction) { DataSet<Edge<K, EV>> resultedEdges = this.getEdges() .coGroup(inputDataSet).where(0).equalTo(0) .with(new ApplyCoGroupToEdgeValuesOnEitherSourceOrTarget<>(edgeJoinFunctio...
java
public <T> Graph<K, VV, EV> joinWithEdgesOnSource(DataSet<Tuple2<K, T>> inputDataSet, final EdgeJoinFunction<EV, T> edgeJoinFunction) { DataSet<Edge<K, EV>> resultedEdges = this.getEdges() .coGroup(inputDataSet).where(0).equalTo(0) .with(new ApplyCoGroupToEdgeValuesOnEitherSourceOrTarget<>(edgeJoinFunctio...
[ "public", "<", "T", ">", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "joinWithEdgesOnSource", "(", "DataSet", "<", "Tuple2", "<", "K", ",", "T", ">", ">", "inputDataSet", ",", "final", "EdgeJoinFunction", "<", "EV", ",", "T", ">", "edgeJoinFunction",...
Joins the edge DataSet with an input Tuple2 DataSet and applies a user-defined transformation on the values of the matched records. The source ID of the edges input and the first field of the input DataSet are used as join keys. @param inputDataSet the DataSet to join with. The first field of the Tuple2 is used as the...
[ "Joins", "the", "edge", "DataSet", "with", "an", "input", "Tuple2", "DataSet", "and", "applies", "a", "user", "-", "defined", "transformation", "on", "the", "values", "of", "the", "matched", "records", ".", "The", "source", "ID", "of", "the", "edges", "inp...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L785-L794
123,671
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.filterOnVertices
public Graph<K, VV, EV> filterOnVertices(FilterFunction<Vertex<K, VV>> vertexFilter) { DataSet<Vertex<K, VV>> filteredVertices = this.vertices.filter(vertexFilter); DataSet<Edge<K, EV>> remainingEdges = this.edges.join(filteredVertices) .where(0).equalTo(0).with(new ProjectEdge<>()) .join(filteredVertices...
java
public Graph<K, VV, EV> filterOnVertices(FilterFunction<Vertex<K, VV>> vertexFilter) { DataSet<Vertex<K, VV>> filteredVertices = this.vertices.filter(vertexFilter); DataSet<Edge<K, EV>> remainingEdges = this.edges.join(filteredVertices) .where(0).equalTo(0).with(new ProjectEdge<>()) .join(filteredVertices...
[ "public", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "filterOnVertices", "(", "FilterFunction", "<", "Vertex", "<", "K", ",", "VV", ">", ">", "vertexFilter", ")", "{", "DataSet", "<", "Vertex", "<", "K", ",", "VV", ">", ">", "filteredVertices", "=...
Apply a filtering function to the graph and return a sub-graph that satisfies the predicates only for the vertices. @param vertexFilter the filter function for vertices. @return the resulting sub-graph.
[ "Apply", "a", "filtering", "function", "to", "the", "graph", "and", "return", "a", "sub", "-", "graph", "that", "satisfies", "the", "predicates", "only", "for", "the", "vertices", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L888-L898
123,672
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.filterOnEdges
public Graph<K, VV, EV> filterOnEdges(FilterFunction<Edge<K, EV>> edgeFilter) { DataSet<Edge<K, EV>> filteredEdges = this.edges.filter(edgeFilter).name("Filter on edges"); return new Graph<>(this.vertices, filteredEdges, this.context); }
java
public Graph<K, VV, EV> filterOnEdges(FilterFunction<Edge<K, EV>> edgeFilter) { DataSet<Edge<K, EV>> filteredEdges = this.edges.filter(edgeFilter).name("Filter on edges"); return new Graph<>(this.vertices, filteredEdges, this.context); }
[ "public", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "filterOnEdges", "(", "FilterFunction", "<", "Edge", "<", "K", ",", "EV", ">", ">", "edgeFilter", ")", "{", "DataSet", "<", "Edge", "<", "K", ",", "EV", ">", ">", "filteredEdges", "=", "this",...
Apply a filtering function to the graph and return a sub-graph that satisfies the predicates only for the edges. @param edgeFilter the filter function for edges. @return the resulting sub-graph.
[ "Apply", "a", "filtering", "function", "to", "the", "graph", "and", "return", "a", "sub", "-", "graph", "that", "satisfies", "the", "predicates", "only", "for", "the", "edges", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L907-L911
123,673
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.outDegrees
public DataSet<Tuple2<K, LongValue>> outDegrees() { return vertices.coGroup(edges).where(0).equalTo(0).with(new CountNeighborsCoGroup<>()) .name("Out-degree"); }
java
public DataSet<Tuple2<K, LongValue>> outDegrees() { return vertices.coGroup(edges).where(0).equalTo(0).with(new CountNeighborsCoGroup<>()) .name("Out-degree"); }
[ "public", "DataSet", "<", "Tuple2", "<", "K", ",", "LongValue", ">", ">", "outDegrees", "(", ")", "{", "return", "vertices", ".", "coGroup", "(", "edges", ")", ".", "where", "(", "0", ")", ".", "equalTo", "(", "0", ")", ".", "with", "(", "new", "...
Return the out-degree of all vertices in the graph. @return A DataSet of {@code Tuple2<vertexId, outDegree>}
[ "Return", "the", "out", "-", "degree", "of", "all", "vertices", "in", "the", "graph", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L926-L930
123,674
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.getDegrees
public DataSet<Tuple2<K, LongValue>> getDegrees() { return outDegrees() .union(inDegrees()).name("In- and out-degree") .groupBy(0).sum(1).name("Sum"); }
java
public DataSet<Tuple2<K, LongValue>> getDegrees() { return outDegrees() .union(inDegrees()).name("In- and out-degree") .groupBy(0).sum(1).name("Sum"); }
[ "public", "DataSet", "<", "Tuple2", "<", "K", ",", "LongValue", ">", ">", "getDegrees", "(", ")", "{", "return", "outDegrees", "(", ")", ".", "union", "(", "inDegrees", "(", ")", ")", ".", "name", "(", "\"In- and out-degree\"", ")", ".", "groupBy", "("...
Return the degree of all vertices in the graph. @return A DataSet of {@code Tuple2<vertexId, degree>}
[ "Return", "the", "degree", "of", "all", "vertices", "in", "the", "graph", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L974-L978
123,675
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.getUndirected
public Graph<K, VV, EV> getUndirected() { DataSet<Edge<K, EV>> undirectedEdges = edges. flatMap(new RegularAndReversedEdgesMap<>()).name("To undirected graph"); return new Graph<>(vertices, undirectedEdges, this.context); }
java
public Graph<K, VV, EV> getUndirected() { DataSet<Edge<K, EV>> undirectedEdges = edges. flatMap(new RegularAndReversedEdgesMap<>()).name("To undirected graph"); return new Graph<>(vertices, undirectedEdges, this.context); }
[ "public", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "getUndirected", "(", ")", "{", "DataSet", "<", "Edge", "<", "K", ",", "EV", ">", ">", "undirectedEdges", "=", "edges", ".", "flatMap", "(", "new", "RegularAndReversedEdgesMap", "<>", "(", ")", ...
This operation adds all inverse-direction edges to the graph. @return the undirected graph.
[ "This", "operation", "adds", "all", "inverse", "-", "direction", "edges", "to", "the", "graph", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L985-L990
123,676
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.groupReduceOnEdges
public <T> DataSet<T> groupReduceOnEdges(EdgesFunctionWithVertexValue<K, VV, EV, T> edgesFunction, EdgeDirection direction) throws IllegalArgumentException { switch (direction) { case IN: return vertices.coGroup(edges).where(0).equalTo(1) .with(new ApplyCoGroupFunction<>(edgesFunction)).name("GroupReduc...
java
public <T> DataSet<T> groupReduceOnEdges(EdgesFunctionWithVertexValue<K, VV, EV, T> edgesFunction, EdgeDirection direction) throws IllegalArgumentException { switch (direction) { case IN: return vertices.coGroup(edges).where(0).equalTo(1) .with(new ApplyCoGroupFunction<>(edgesFunction)).name("GroupReduc...
[ "public", "<", "T", ">", "DataSet", "<", "T", ">", "groupReduceOnEdges", "(", "EdgesFunctionWithVertexValue", "<", "K", ",", "VV", ",", "EV", ",", "T", ">", "edgesFunction", ",", "EdgeDirection", "direction", ")", "throws", "IllegalArgumentException", "{", "sw...
Groups by vertex and computes a GroupReduce transformation over the edge values of each vertex. The edgesFunction applied on the edges has access to both the id and the value of the grouping vertex. <p>For each vertex, the edgesFunction can iterate over all edges of this vertex with the specified direction, and emit a...
[ "Groups", "by", "vertex", "and", "computes", "a", "GroupReduce", "transformation", "over", "the", "edge", "values", "of", "each", "vertex", ".", "The", "edgesFunction", "applied", "on", "the", "edges", "has", "access", "to", "both", "the", "id", "and", "the"...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1006-L1024
123,677
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.reverse
public Graph<K, VV, EV> reverse() throws UnsupportedOperationException { DataSet<Edge<K, EV>> reversedEdges = edges.map(new ReverseEdgesMap<>()).name("Reverse edges"); return new Graph<>(vertices, reversedEdges, this.context); }
java
public Graph<K, VV, EV> reverse() throws UnsupportedOperationException { DataSet<Edge<K, EV>> reversedEdges = edges.map(new ReverseEdgesMap<>()).name("Reverse edges"); return new Graph<>(vertices, reversedEdges, this.context); }
[ "public", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "reverse", "(", ")", "throws", "UnsupportedOperationException", "{", "DataSet", "<", "Edge", "<", "K", ",", "EV", ">", ">", "reversedEdges", "=", "edges", ".", "map", "(", "new", "ReverseEdgesMap", ...
Reverse the direction of the edges in the graph. @return a new graph with all edges reversed @throws UnsupportedOperationException
[ "Reverse", "the", "direction", "of", "the", "edges", "in", "the", "graph", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1308-L1311
123,678
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.addVertex
public Graph<K, VV, EV> addVertex(final Vertex<K, VV> vertex) { List<Vertex<K, VV>> newVertex = new ArrayList<>(); newVertex.add(vertex); return addVertices(newVertex); }
java
public Graph<K, VV, EV> addVertex(final Vertex<K, VV> vertex) { List<Vertex<K, VV>> newVertex = new ArrayList<>(); newVertex.add(vertex); return addVertices(newVertex); }
[ "public", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "addVertex", "(", "final", "Vertex", "<", "K", ",", "VV", ">", "vertex", ")", "{", "List", "<", "Vertex", "<", "K", ",", "VV", ">", ">", "newVertex", "=", "new", "ArrayList", "<>", "(", ")...
Adds the input vertex to the graph. If the vertex already exists in the graph, it will not be added again. @param vertex the vertex to be added @return the new graph containing the existing vertices as well as the one just added
[ "Adds", "the", "input", "vertex", "to", "the", "graph", ".", "If", "the", "vertex", "already", "exists", "in", "the", "graph", "it", "will", "not", "be", "added", "again", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1365-L1370
123,679
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.addVertices
public Graph<K, VV, EV> addVertices(List<Vertex<K, VV>> verticesToAdd) { // Add the vertices DataSet<Vertex<K, VV>> newVertices = this.vertices.coGroup(this.context.fromCollection(verticesToAdd)) .where(0).equalTo(0).with(new VerticesUnionCoGroup<>()).name("Add vertices"); return new Graph<>(newVertices, thi...
java
public Graph<K, VV, EV> addVertices(List<Vertex<K, VV>> verticesToAdd) { // Add the vertices DataSet<Vertex<K, VV>> newVertices = this.vertices.coGroup(this.context.fromCollection(verticesToAdd)) .where(0).equalTo(0).with(new VerticesUnionCoGroup<>()).name("Add vertices"); return new Graph<>(newVertices, thi...
[ "public", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "addVertices", "(", "List", "<", "Vertex", "<", "K", ",", "VV", ">", ">", "verticesToAdd", ")", "{", "// Add the vertices", "DataSet", "<", "Vertex", "<", "K", ",", "VV", ">", ">", "newVertices"...
Adds the list of vertices, passed as input, to the graph. If the vertices already exist in the graph, they will not be added once more. @param verticesToAdd the list of vertices to add @return the new graph containing the existing and newly added vertices
[ "Adds", "the", "list", "of", "vertices", "passed", "as", "input", "to", "the", "graph", ".", "If", "the", "vertices", "already", "exist", "in", "the", "graph", "they", "will", "not", "be", "added", "once", "more", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1379-L1385
123,680
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.addEdge
public Graph<K, VV, EV> addEdge(Vertex<K, VV> source, Vertex<K, VV> target, EV edgeValue) { Graph<K, VV, EV> partialGraph = fromCollection(Arrays.asList(source, target), Collections.singletonList(new Edge<>(source.f0, target.f0, edgeValue)), this.context); return this.union(partialGraph); }
java
public Graph<K, VV, EV> addEdge(Vertex<K, VV> source, Vertex<K, VV> target, EV edgeValue) { Graph<K, VV, EV> partialGraph = fromCollection(Arrays.asList(source, target), Collections.singletonList(new Edge<>(source.f0, target.f0, edgeValue)), this.context); return this.union(partialGraph); }
[ "public", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "addEdge", "(", "Vertex", "<", "K", ",", "VV", ">", "source", ",", "Vertex", "<", "K", ",", "VV", ">", "target", ",", "EV", "edgeValue", ")", "{", "Graph", "<", "K", ",", "VV", ",", "EV"...
Adds the given edge to the graph. If the source and target vertices do not exist in the graph, they will also be added. @param source the source vertex of the edge @param target the target vertex of the edge @param edgeValue the edge value @return the new graph containing the existing vertices and edges plus the newly...
[ "Adds", "the", "given", "edge", "to", "the", "graph", ".", "If", "the", "source", "and", "target", "vertices", "do", "not", "exist", "in", "the", "graph", "they", "will", "also", "be", "added", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1415-L1420
123,681
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.addEdges
public Graph<K, VV, EV> addEdges(List<Edge<K, EV>> newEdges) { DataSet<Edge<K, EV>> newEdgesDataSet = this.context.fromCollection(newEdges); DataSet<Edge<K, EV>> validNewEdges = this.getVertices().join(newEdgesDataSet) .where(0).equalTo(0) .with(new JoinVerticesWithEdgesOnSrc<>()).name("Join with source")...
java
public Graph<K, VV, EV> addEdges(List<Edge<K, EV>> newEdges) { DataSet<Edge<K, EV>> newEdgesDataSet = this.context.fromCollection(newEdges); DataSet<Edge<K, EV>> validNewEdges = this.getVertices().join(newEdgesDataSet) .where(0).equalTo(0) .with(new JoinVerticesWithEdgesOnSrc<>()).name("Join with source")...
[ "public", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "addEdges", "(", "List", "<", "Edge", "<", "K", ",", "EV", ">", ">", "newEdges", ")", "{", "DataSet", "<", "Edge", "<", "K", ",", "EV", ">", ">", "newEdgesDataSet", "=", "this", ".", "cont...
Adds the given list edges to the graph. <p>When adding an edge for a non-existing set of vertices, the edge is considered invalid and ignored. @param newEdges the data set of edges to be added @return a new graph containing the existing edges plus the newly added edges.
[ "Adds", "the", "given", "list", "edges", "to", "the", "graph", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1430-L1441
123,682
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.removeVertex
public Graph<K, VV, EV> removeVertex(Vertex<K, VV> vertex) { List<Vertex<K, VV>> vertexToBeRemoved = new ArrayList<>(); vertexToBeRemoved.add(vertex); return removeVertices(vertexToBeRemoved); }
java
public Graph<K, VV, EV> removeVertex(Vertex<K, VV> vertex) { List<Vertex<K, VV>> vertexToBeRemoved = new ArrayList<>(); vertexToBeRemoved.add(vertex); return removeVertices(vertexToBeRemoved); }
[ "public", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "removeVertex", "(", "Vertex", "<", "K", ",", "VV", ">", "vertex", ")", "{", "List", "<", "Vertex", "<", "K", ",", "VV", ">", ">", "vertexToBeRemoved", "=", "new", "ArrayList", "<>", "(", ")...
Removes the given vertex and its edges from the graph. @param vertex the vertex to remove @return the new graph containing the existing vertices and edges without the removed vertex and its edges
[ "Removes", "the", "given", "vertex", "and", "its", "edges", "from", "the", "graph", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1470-L1476
123,683
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.removeEdge
public Graph<K, VV, EV> removeEdge(Edge<K, EV> edge) { DataSet<Edge<K, EV>> newEdges = getEdges().filter(new EdgeRemovalEdgeFilter<>(edge)).name("Remove edge"); return new Graph<>(this.vertices, newEdges, this.context); }
java
public Graph<K, VV, EV> removeEdge(Edge<K, EV> edge) { DataSet<Edge<K, EV>> newEdges = getEdges().filter(new EdgeRemovalEdgeFilter<>(edge)).name("Remove edge"); return new Graph<>(this.vertices, newEdges, this.context); }
[ "public", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "removeEdge", "(", "Edge", "<", "K", ",", "EV", ">", "edge", ")", "{", "DataSet", "<", "Edge", "<", "K", ",", "EV", ">", ">", "newEdges", "=", "getEdges", "(", ")", ".", "filter", "(", "...
Removes all edges that match the given edge from the graph. @param edge the edge to remove @return the new graph containing the existing vertices and edges without the removed edges
[ "Removes", "all", "edges", "that", "match", "the", "given", "edge", "from", "the", "graph", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1545-L1548
123,684
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.removeEdges
public Graph<K, VV, EV> removeEdges(List<Edge<K, EV>> edgesToBeRemoved) { DataSet<Edge<K, EV>> newEdges = getEdges().coGroup(this.context.fromCollection(edgesToBeRemoved)) .where(0, 1).equalTo(0, 1).with(new EdgeRemovalCoGroup<>()).name("Remove edges"); return new Graph<>(this.vertices, newEdges, context); }
java
public Graph<K, VV, EV> removeEdges(List<Edge<K, EV>> edgesToBeRemoved) { DataSet<Edge<K, EV>> newEdges = getEdges().coGroup(this.context.fromCollection(edgesToBeRemoved)) .where(0, 1).equalTo(0, 1).with(new EdgeRemovalCoGroup<>()).name("Remove edges"); return new Graph<>(this.vertices, newEdges, context); }
[ "public", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "removeEdges", "(", "List", "<", "Edge", "<", "K", ",", "EV", ">", ">", "edgesToBeRemoved", ")", "{", "DataSet", "<", "Edge", "<", "K", ",", "EV", ">", ">", "newEdges", "=", "getEdges", "(",...
Removes all the edges that match the edges in the given data set from the graph. @param edgesToBeRemoved the list of edges to be removed @return a new graph where the edges have been removed and in which the vertices remained intact
[ "Removes", "all", "the", "edges", "that", "match", "the", "edges", "in", "the", "given", "data", "set", "from", "the", "graph", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1571-L1577
123,685
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.union
public Graph<K, VV, EV> union(Graph<K, VV, EV> graph) { DataSet<Vertex<K, VV>> unionedVertices = graph .getVertices() .union(this.getVertices()) .name("Vertices") .distinct() .name("Vertices"); DataSet<Edge<K, EV>> unionedEdges = graph .getEdges() .union(this.getEdges()) .name("Edges"); ...
java
public Graph<K, VV, EV> union(Graph<K, VV, EV> graph) { DataSet<Vertex<K, VV>> unionedVertices = graph .getVertices() .union(this.getVertices()) .name("Vertices") .distinct() .name("Vertices"); DataSet<Edge<K, EV>> unionedEdges = graph .getEdges() .union(this.getEdges()) .name("Edges"); ...
[ "public", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "union", "(", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "graph", ")", "{", "DataSet", "<", "Vertex", "<", "K", ",", "VV", ">", ">", "unionedVertices", "=", "graph", ".", "getVertices", ...
Performs union on the vertices and edges sets of the input graphs removing duplicate vertices but maintaining duplicate edges. @param graph the graph to perform union with @return a new graph
[ "Performs", "union", "on", "the", "vertices", "and", "edges", "sets", "of", "the", "input", "graphs", "removing", "duplicate", "vertices", "but", "maintaining", "duplicate", "edges", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1599-L1613
123,686
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.intersect
public Graph<K, NullValue, EV> intersect(Graph<K, VV, EV> graph, boolean distinctEdges) { DataSet<Edge<K, EV>> intersectEdges; if (distinctEdges) { intersectEdges = getDistinctEdgeIntersection(graph.getEdges()); } else { intersectEdges = getPairwiseEdgeIntersection(graph.getEdges()); } return Graph.fro...
java
public Graph<K, NullValue, EV> intersect(Graph<K, VV, EV> graph, boolean distinctEdges) { DataSet<Edge<K, EV>> intersectEdges; if (distinctEdges) { intersectEdges = getDistinctEdgeIntersection(graph.getEdges()); } else { intersectEdges = getPairwiseEdgeIntersection(graph.getEdges()); } return Graph.fro...
[ "public", "Graph", "<", "K", ",", "NullValue", ",", "EV", ">", "intersect", "(", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "graph", ",", "boolean", "distinctEdges", ")", "{", "DataSet", "<", "Edge", "<", "K", ",", "EV", ">", ">", "intersectEdge...
Performs intersect on the edge sets of the input graphs. Edges are considered equal, if they have the same source identifier, target identifier and edge value. <p>The method computes pairs of equal edges from the input graphs. If the same edge occurs multiple times in the input graphs, there will be multiple edge pair...
[ "Performs", "intersect", "on", "the", "edge", "sets", "of", "the", "input", "graphs", ".", "Edges", "are", "considered", "equal", "if", "they", "have", "the", "same", "source", "identifier", "target", "identifier", "and", "edge", "value", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1647-L1656
123,687
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.getDistinctEdgeIntersection
private DataSet<Edge<K, EV>> getDistinctEdgeIntersection(DataSet<Edge<K, EV>> edges) { return this.getEdges() .join(edges) .where(0, 1, 2) .equalTo(0, 1, 2) .with(new JoinFunction<Edge<K, EV>, Edge<K, EV>, Edge<K, EV>>() { @Override public Edge<K, EV> join(Edge<K, EV> first, Edge<K, EV> seco...
java
private DataSet<Edge<K, EV>> getDistinctEdgeIntersection(DataSet<Edge<K, EV>> edges) { return this.getEdges() .join(edges) .where(0, 1, 2) .equalTo(0, 1, 2) .with(new JoinFunction<Edge<K, EV>, Edge<K, EV>, Edge<K, EV>>() { @Override public Edge<K, EV> join(Edge<K, EV> first, Edge<K, EV> seco...
[ "private", "DataSet", "<", "Edge", "<", "K", ",", "EV", ">", ">", "getDistinctEdgeIntersection", "(", "DataSet", "<", "Edge", "<", "K", ",", "EV", ">", ">", "edges", ")", "{", "return", "this", ".", "getEdges", "(", ")", ".", "join", "(", "edges", ...
Computes the intersection between the edge set and the given edge set. For all matching pairs, only one edge will be in the resulting data set. @param edges edges to compute intersection with @return edge set containing one edge for all matching pairs of the same edge
[ "Computes", "the", "intersection", "between", "the", "edge", "set", "and", "the", "given", "edge", "set", ".", "For", "all", "matching", "pairs", "only", "one", "edge", "will", "be", "in", "the", "resulting", "data", "set", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1665-L1678
123,688
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.getPairwiseEdgeIntersection
private DataSet<Edge<K, EV>> getPairwiseEdgeIntersection(DataSet<Edge<K, EV>> edges) { return this.getEdges() .coGroup(edges) .where(0, 1, 2) .equalTo(0, 1, 2) .with(new MatchingEdgeReducer<>()) .name("Intersect edges"); }
java
private DataSet<Edge<K, EV>> getPairwiseEdgeIntersection(DataSet<Edge<K, EV>> edges) { return this.getEdges() .coGroup(edges) .where(0, 1, 2) .equalTo(0, 1, 2) .with(new MatchingEdgeReducer<>()) .name("Intersect edges"); }
[ "private", "DataSet", "<", "Edge", "<", "K", ",", "EV", ">", ">", "getPairwiseEdgeIntersection", "(", "DataSet", "<", "Edge", "<", "K", ",", "EV", ">", ">", "edges", ")", "{", "return", "this", ".", "getEdges", "(", ")", ".", "coGroup", "(", "edges",...
Computes the intersection between the edge set and the given edge set. For all matching pairs, both edges will be in the resulting data set. @param edges edges to compute intersection with @return edge set containing both edges from all matching pairs of the same edge
[ "Computes", "the", "intersection", "between", "the", "edge", "set", "and", "the", "given", "edge", "set", ".", "For", "all", "matching", "pairs", "both", "edges", "will", "be", "in", "the", "resulting", "data", "set", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1687-L1694
123,689
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.runScatterGatherIteration
public <M> Graph<K, VV, EV> runScatterGatherIteration( ScatterFunction<K, VV, M, EV> scatterFunction, org.apache.flink.graph.spargel.GatherFunction<K, VV, M> gatherFunction, int maximumNumberOfIterations) { return this.runScatterGatherIteration(scatterFunction, gatherFunction, maximumNumberOfIterations,...
java
public <M> Graph<K, VV, EV> runScatterGatherIteration( ScatterFunction<K, VV, M, EV> scatterFunction, org.apache.flink.graph.spargel.GatherFunction<K, VV, M> gatherFunction, int maximumNumberOfIterations) { return this.runScatterGatherIteration(scatterFunction, gatherFunction, maximumNumberOfIterations,...
[ "public", "<", "M", ">", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "runScatterGatherIteration", "(", "ScatterFunction", "<", "K", ",", "VV", ",", "M", ",", "EV", ">", "scatterFunction", ",", "org", ".", "apache", ".", "flink", ".", "graph", ".", ...
Runs a ScatterGather iteration on the graph. No configuration options are provided. @param scatterFunction the scatter function @param gatherFunction the gather function @param maximumNumberOfIterations maximum number of iterations to perform @return the updated Graph after the scatter-gather iteration has converged ...
[ "Runs", "a", "ScatterGather", "iteration", "on", "the", "graph", ".", "No", "configuration", "options", "are", "provided", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1730-L1737
123,690
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.runScatterGatherIteration
public <M> Graph<K, VV, EV> runScatterGatherIteration( ScatterFunction<K, VV, M, EV> scatterFunction, org.apache.flink.graph.spargel.GatherFunction<K, VV, M> gatherFunction, int maximumNumberOfIterations, ScatterGatherConfiguration parameters) { ScatterGatherIteration<K, VV, M, EV> iteration = ScatterGather...
java
public <M> Graph<K, VV, EV> runScatterGatherIteration( ScatterFunction<K, VV, M, EV> scatterFunction, org.apache.flink.graph.spargel.GatherFunction<K, VV, M> gatherFunction, int maximumNumberOfIterations, ScatterGatherConfiguration parameters) { ScatterGatherIteration<K, VV, M, EV> iteration = ScatterGather...
[ "public", "<", "M", ">", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "runScatterGatherIteration", "(", "ScatterFunction", "<", "K", ",", "VV", ",", "M", ",", "EV", ">", "scatterFunction", ",", "org", ".", "apache", ".", "flink", ".", "graph", ".", ...
Runs a ScatterGather iteration on the graph with configuration options. @param scatterFunction the scatter function @param gatherFunction the gather function @param maximumNumberOfIterations maximum number of iterations to perform @param parameters the iteration configuration parameters @return the updated Graph afte...
[ "Runs", "a", "ScatterGather", "iteration", "on", "the", "graph", "with", "configuration", "options", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1750-L1763
123,691
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.runGatherSumApplyIteration
public <M> Graph<K, VV, EV> runGatherSumApplyIteration( org.apache.flink.graph.gsa.GatherFunction<VV, EV, M> gatherFunction, SumFunction<VV, EV, M> sumFunction, ApplyFunction<K, VV, M> applyFunction, int maximumNumberOfIterations) { return this.runGatherSumApplyIteration(gatherFunction, sumFunction, applyFunct...
java
public <M> Graph<K, VV, EV> runGatherSumApplyIteration( org.apache.flink.graph.gsa.GatherFunction<VV, EV, M> gatherFunction, SumFunction<VV, EV, M> sumFunction, ApplyFunction<K, VV, M> applyFunction, int maximumNumberOfIterations) { return this.runGatherSumApplyIteration(gatherFunction, sumFunction, applyFunct...
[ "public", "<", "M", ">", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "runGatherSumApplyIteration", "(", "org", ".", "apache", ".", "flink", ".", "graph", ".", "gsa", ".", "GatherFunction", "<", "VV", ",", "EV", ",", "M", ">", "gatherFunction", ",",...
Runs a Gather-Sum-Apply iteration on the graph. No configuration options are provided. @param gatherFunction the gather function collects information about adjacent vertices and edges @param sumFunction the sum function aggregates the gathered information @param applyFunction the apply function updates the vertex valu...
[ "Runs", "a", "Gather", "-", "Sum", "-", "Apply", "iteration", "on", "the", "graph", ".", "No", "configuration", "options", "are", "provided", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1778-L1784
123,692
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.runGatherSumApplyIteration
public <M> Graph<K, VV, EV> runGatherSumApplyIteration( org.apache.flink.graph.gsa.GatherFunction<VV, EV, M> gatherFunction, SumFunction<VV, EV, M> sumFunction, ApplyFunction<K, VV, M> applyFunction, int maximumNumberOfIterations, GSAConfiguration parameters) { GatherSumApplyIteration<K, VV, EV, M> iteratio...
java
public <M> Graph<K, VV, EV> runGatherSumApplyIteration( org.apache.flink.graph.gsa.GatherFunction<VV, EV, M> gatherFunction, SumFunction<VV, EV, M> sumFunction, ApplyFunction<K, VV, M> applyFunction, int maximumNumberOfIterations, GSAConfiguration parameters) { GatherSumApplyIteration<K, VV, EV, M> iteratio...
[ "public", "<", "M", ">", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "runGatherSumApplyIteration", "(", "org", ".", "apache", ".", "flink", ".", "graph", ".", "gsa", ".", "GatherFunction", "<", "VV", ",", "EV", ",", "M", ">", "gatherFunction", ",",...
Runs a Gather-Sum-Apply iteration on the graph with configuration options. @param gatherFunction the gather function collects information about adjacent vertices and edges @param sumFunction the sum function aggregates the gathered information @param applyFunction the apply function updates the vertex values with the ...
[ "Runs", "a", "Gather", "-", "Sum", "-", "Apply", "iteration", "on", "the", "graph", "with", "configuration", "options", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1799-L1812
123,693
apache/flink
flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/network/Client.java
Client.shutdown
public CompletableFuture<Void> shutdown() { final CompletableFuture<Void> newShutdownFuture = new CompletableFuture<>(); if (clientShutdownFuture.compareAndSet(null, newShutdownFuture)) { final List<CompletableFuture<Void>> connectionFutures = new ArrayList<>(); for (Map.Entry<InetSocketAddress, Established...
java
public CompletableFuture<Void> shutdown() { final CompletableFuture<Void> newShutdownFuture = new CompletableFuture<>(); if (clientShutdownFuture.compareAndSet(null, newShutdownFuture)) { final List<CompletableFuture<Void>> connectionFutures = new ArrayList<>(); for (Map.Entry<InetSocketAddress, Established...
[ "public", "CompletableFuture", "<", "Void", ">", "shutdown", "(", ")", "{", "final", "CompletableFuture", "<", "Void", ">", "newShutdownFuture", "=", "new", "CompletableFuture", "<>", "(", ")", ";", "if", "(", "clientShutdownFuture", ".", "compareAndSet", "(", ...
Shuts down the client and closes all connections. <p>After a call to this method, all returned futures will be failed. @return A {@link CompletableFuture} that will be completed when the shutdown process is done.
[ "Shuts", "down", "the", "client", "and", "closes", "all", "connections", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/network/Client.java#L178-L226
123,694
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java
SqlDateTimeUtils.toTimestamp
public static Long toTimestamp(String dateStr, String format, TimeZone tz) { SimpleDateFormat formatter = FORMATTER_CACHE.get(format); formatter.setTimeZone(tz); try { return formatter.parse(dateStr).getTime(); } catch (ParseException e) { return null; } }
java
public static Long toTimestamp(String dateStr, String format, TimeZone tz) { SimpleDateFormat formatter = FORMATTER_CACHE.get(format); formatter.setTimeZone(tz); try { return formatter.parse(dateStr).getTime(); } catch (ParseException e) { return null; } }
[ "public", "static", "Long", "toTimestamp", "(", "String", "dateStr", ",", "String", "format", ",", "TimeZone", "tz", ")", "{", "SimpleDateFormat", "formatter", "=", "FORMATTER_CACHE", ".", "get", "(", "format", ")", ";", "formatter", ".", "setTimeZone", "(", ...
Parse date time string to timestamp based on the given time zone and format. Returns null if parsing failed. @param dateStr the date time string @param format date time string format @param tz the time zone
[ "Parse", "date", "time", "string", "to", "timestamp", "based", "on", "the", "given", "time", "zone", "and", "format", ".", "Returns", "null", "if", "parsing", "failed", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java#L271-L279
123,695
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java
SqlDateTimeUtils.toTimestampTz
public static Long toTimestampTz(String dateStr, String format, String tzStr) { TimeZone tz = TIMEZONE_CACHE.get(tzStr); return toTimestamp(dateStr, format, tz); }
java
public static Long toTimestampTz(String dateStr, String format, String tzStr) { TimeZone tz = TIMEZONE_CACHE.get(tzStr); return toTimestamp(dateStr, format, tz); }
[ "public", "static", "Long", "toTimestampTz", "(", "String", "dateStr", ",", "String", "format", ",", "String", "tzStr", ")", "{", "TimeZone", "tz", "=", "TIMEZONE_CACHE", ".", "get", "(", "tzStr", ")", ";", "return", "toTimestamp", "(", "dateStr", ",", "fo...
Parse date time string to timestamp based on the given time zone string and format. Returns null if parsing failed. @param dateStr the date time string @param format the date time string format @param tzStr the time zone id string
[ "Parse", "date", "time", "string", "to", "timestamp", "based", "on", "the", "given", "time", "zone", "string", "and", "format", ".", "Returns", "null", "if", "parsing", "failed", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java#L289-L292
123,696
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java
SqlDateTimeUtils.strToDate
public static int strToDate(String dateStr, String fromFormat) { // It is OK to use UTC, we just want get the epoch days // TODO use offset, better performance long ts = parseToTimeMillis(dateStr, fromFormat, TimeZone.getTimeZone("UTC")); ZoneId zoneId = ZoneId.of("UTC"); Instant instant = Instant.ofEpochMil...
java
public static int strToDate(String dateStr, String fromFormat) { // It is OK to use UTC, we just want get the epoch days // TODO use offset, better performance long ts = parseToTimeMillis(dateStr, fromFormat, TimeZone.getTimeZone("UTC")); ZoneId zoneId = ZoneId.of("UTC"); Instant instant = Instant.ofEpochMil...
[ "public", "static", "int", "strToDate", "(", "String", "dateStr", ",", "String", "fromFormat", ")", "{", "// It is OK to use UTC, we just want get the epoch days", "// TODO use offset, better performance", "long", "ts", "=", "parseToTimeMillis", "(", "dateStr", ",", "fromF...
Returns the epoch days since 1970-01-01.
[ "Returns", "the", "epoch", "days", "since", "1970", "-", "01", "-", "01", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java#L306-L314
123,697
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java
SqlDateTimeUtils.dateFormat
public static String dateFormat(long ts, String format, TimeZone tz) { SimpleDateFormat formatter = FORMATTER_CACHE.get(format); formatter.setTimeZone(tz); Date dateTime = new Date(ts); return formatter.format(dateTime); }
java
public static String dateFormat(long ts, String format, TimeZone tz) { SimpleDateFormat formatter = FORMATTER_CACHE.get(format); formatter.setTimeZone(tz); Date dateTime = new Date(ts); return formatter.format(dateTime); }
[ "public", "static", "String", "dateFormat", "(", "long", "ts", ",", "String", "format", ",", "TimeZone", "tz", ")", "{", "SimpleDateFormat", "formatter", "=", "FORMATTER_CACHE", ".", "get", "(", "format", ")", ";", "formatter", ".", "setTimeZone", "(", "tz",...
Format a timestamp as specific. @param ts the timestamp to format. @param format the string formatter. @param tz the time zone
[ "Format", "a", "timestamp", "as", "specific", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java#L326-L331
123,698
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java
SqlDateTimeUtils.dateFormat
public static String dateFormat(String dateStr, String fromFormat, String toFormat, TimeZone tz) { SimpleDateFormat fromFormatter = FORMATTER_CACHE.get(fromFormat); fromFormatter.setTimeZone(tz); SimpleDateFormat toFormatter = FORMATTER_CACHE.get(toFormat); toFormatter.setTimeZone(tz); try { return toForma...
java
public static String dateFormat(String dateStr, String fromFormat, String toFormat, TimeZone tz) { SimpleDateFormat fromFormatter = FORMATTER_CACHE.get(fromFormat); fromFormatter.setTimeZone(tz); SimpleDateFormat toFormatter = FORMATTER_CACHE.get(toFormat); toFormatter.setTimeZone(tz); try { return toForma...
[ "public", "static", "String", "dateFormat", "(", "String", "dateStr", ",", "String", "fromFormat", ",", "String", "toFormat", ",", "TimeZone", "tz", ")", "{", "SimpleDateFormat", "fromFormatter", "=", "FORMATTER_CACHE", ".", "get", "(", "fromFormat", ")", ";", ...
Format a string datetime as specific. @param dateStr the string datetime. @param fromFormat the original date format. @param toFormat the target date format. @param tz the time zone.
[ "Format", "a", "string", "datetime", "as", "specific", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java#L340-L352
123,699
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java
SqlDateTimeUtils.convertTz
public static String convertTz(String dateStr, String format, String tzFrom, String tzTo) { return dateFormatTz(toTimestampTz(dateStr, format, tzFrom), tzTo); }
java
public static String convertTz(String dateStr, String format, String tzFrom, String tzTo) { return dateFormatTz(toTimestampTz(dateStr, format, tzFrom), tzTo); }
[ "public", "static", "String", "convertTz", "(", "String", "dateStr", ",", "String", "format", ",", "String", "tzFrom", ",", "String", "tzTo", ")", "{", "return", "dateFormatTz", "(", "toTimestampTz", "(", "dateStr", ",", "format", ",", "tzFrom", ")", ",", ...
Convert datetime string from a time zone to another time zone. @param dateStr the date time string @param format the date time format @param tzFrom the original time zone @param tzTo the target time zone
[ "Convert", "datetime", "string", "from", "a", "time", "zone", "to", "another", "time", "zone", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java#L376-L378