name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_ExecutionConfig_toMap_rdh
/** * Convert UserConfig into a {@code Map<String, String>} representation. This can be used by * the runtime, for example for presenting the user config in the web frontend. * * @return Key/Value representation of the UserConfig */ public Map<String, String> toMap() { return Collections.emptyMap(); }
3.26
flink_ExecutionConfig_getNumberOfExecutionRetries_rdh
/** * Gets the number of times the system will try to re-execute failed tasks. A value of {@code -1} indicates that the system default value (as defined in the configuration) should be used. * * @return The number of times the system will try to re-execute failed tasks. * @deprecated Should no longer be used becaus...
3.26
flink_ExecutionConfig_enableAutoGeneratedUIDs_rdh
/** * Enables the Flink runtime to auto-generate UID's for operators. * * @see #disableAutoGeneratedUIDs() */ public void enableAutoGeneratedUIDs() { setAutoGeneratedUids(true); }
3.26
flink_ExecutionConfig_setDefaultInputDependencyConstraint_rdh
/** * This method is deprecated. It was used to set the {@link InputDependencyConstraint} utilized * by the old scheduler implementations which got removed as part of FLINK-20589. The current * implementation has no effect. * * @param ignored * Ignored parameter. * @deprecated due to the deprecation of {@code ...
3.26
flink_ExecutionConfig_getRegisteredTypesWithKryoSerializers_rdh
/** * Returns the registered types with Kryo Serializers. */ public LinkedHashMap<Class<?>, SerializableSerializer<?>> getRegisteredTypesWithKryoSerializers() { return registeredTypesWithKryoSerializers; }
3.26
flink_ExecutionConfig_setTaskCancellationInterval_rdh
/** * Sets the configuration parameter specifying the interval (in milliseconds) between * consecutive attempts to cancel a running task. * * @param interval * the interval (in milliseconds). */ public ExecutionConfig setTaskCancellationInterval(long interval) { configuration.set(TaskManagerOptions.TASK_CAN...
3.26
flink_ExecutionConfig_getRegisteredPojoTypes_rdh
/** * Returns the registered POJO types. */ public LinkedHashSet<Class<?>> getRegisteredPojoTypes() { return registeredPojoTypes; }
3.26
flink_ExecutionConfig_setAutoWatermarkInterval_rdh
/** * Sets the interval of the automatic watermark emission. Watermarks are used throughout the * streaming system to keep track of the progress of time. They are used, for example, for time * based windowing. * * <p>Setting an interval of {@code 0} will disable periodic watermark emission. * * @param interval ...
3.26
flink_ExecutionConfig_disableForceAvro_rdh
/** * Disables the Apache Avro serializer as the forced serializer for POJOs. */ public void disableForceAvro() { setForceAvro(false); }
3.26
flink_ExecutionConfig_getDefaultKryoSerializerClasses_rdh
/** * Returns the registered default Kryo Serializer classes. */ public LinkedHashMap<Class<?>, Class<? extends Serializer<?>>> getDefaultKryoSerializerClasses() { return defaultKryoSerializerClasses; }
3.26
flink_ExecutionConfig_enableClosureCleaner_rdh
// -------------------------------------------------------------------------------------------- /** * Enables the ClosureCleaner. This analyzes user code functions and sets fields to null that * are not used. This will in most cases make closures or anonymous inner classes serializable * that where not serializable ...
3.26
flink_ExecutionConfig_getRegisteredKryoTypes_rdh
/** * Returns the registered Kryo types. */ public LinkedHashSet<Class<?>> getRegisteredKryoTypes() { if (isForceKryoEnabled()) { // if we force kryo, we must also return all the types that // were previously only registered as POJO LinkedHashSet<Class<?>> result = new LinkedHashSet<>();re...
3.26
flink_ExecutionConfig_getLatencyTrackingInterval_rdh
/** * Returns the latency tracking interval. * * @return The latency tracking interval in milliseconds */ @PublicEvolving public long getLatencyTrackingInterval() { return configuration.get(MetricOptions.LATENCY_INTERVAL); }
3.26
flink_ExecutionConfig_getClosureCleanerLevel_rdh
/** * Returns the configured {@link ClosureCleanerLevel}. */ public ClosureCleanerLevel getClosureCleanerLevel() { return configuration.get(PipelineOptions.CLOSURE_CLEANER_LEVEL); }
3.26
flink_ExecutionConfig_getExecutionRetryDelay_rdh
/** * Returns the delay between execution retries. * * @return The delay between successive execution retries in milliseconds. * @deprecated Should no longer be used because it is subsumed by RestartStrategyConfiguration */ @Deprecatedpublic long getExecutionRetryDelay() { return executionRetryDelay; } /** ...
3.26
flink_ExecutionConfig_getTaskCancellationInterval_rdh
/** * Gets the interval (in milliseconds) between consecutive attempts to cancel a running task. */ public long getTaskCancellationInterval() {return configuration.get(TaskManagerOptions.TASK_CANCELLATION_INTERVAL); }
3.26
flink_ExecutionConfig_getDefaultKryoSerializers_rdh
/** * Returns the registered default Kryo Serializers. */public LinkedHashMap<Class<?>, SerializableSerializer<?>> getDefaultKryoSerializers() { return defaultKryoSerializers; }
3.26
flink_ExecutionConfig_disableForceKryo_rdh
/** * Disable use of Kryo serializer for all POJOs. */ public void disableForceKryo() { setForceKryo(false); }
3.26
flink_ExecutionConfig_enableForceAvro_rdh
/** * Forces Flink to use the Apache Avro serializer for POJOs. * * <p><b>Important:</b> Make sure to include the <i>flink-avro</i> module. */ public void enableForceAvro() {setForceAvro(true); }
3.26
flink_ExecutionConfig_registerTypeWithKryoSerializer_rdh
/** * Registers the given Serializer via its class as a serializer for the given type at the * KryoSerializer * * @param type * The class of the types serialized with the given serializer. * @param serializerClass * The class of the serializer to use. */ @SuppressWarnings("rawtypes") public void registerTyp...
3.26
flink_ExecutionConfig_enableGenericTypes_rdh
/** * Enables the use generic types which are serialized via Kryo. * * <p>Generic types are enabled by default. * * @see #disableGenericTypes() */ public void enableGenericTypes() { setGenericTypes(true); }
3.26
flink_ExecutionConfig_disableGenericTypes_rdh
/** * Disables the use of generic types (types that would be serialized via Kryo). If this option * is used, Flink will throw an {@code UnsupportedOperationException} whenever it encounters a * data type that would go through Kryo for serialization. ...
3.26
flink_KeyMap_isEmpty_rdh
/** * Checks whether the map is empty. * * @return True, if the map is empty, false otherwise. */ public boolean isEmpty() { return f0 == 0; }
3.26
flink_KeyMap_put_rdh
// ------------------------------------------------------------------------ // Gets and Puts // ------------------------------------------------------------------------ /** * Inserts the given value, mapped under the given key. If the table already contains a value * for the key, the value is replaced and returned. I...
3.26
flink_KeyMap_getLongestChainLength_rdh
/** * For testing only: Gets the length of the longest overflow chain. This method has linear * complexity. * * @return The length of the longest overflow chain. */ int getLongestChainLength() { int maxLen = 0; for (Entry<?, ?> entry ...
3.26
flink_KeyMap_getCurrentTableCapacity_rdh
/** * Gets the current table capacity, i.e., the number of slots in the hash table, without and * overflow chaining. * * @return The number of slots in the hash table. */ public int getCurrentTableCapacity() { return table.length;}
3.26
flink_KeyMap_getLog2TableCapacity_rdh
/** * Gets the base-2 logarithm of the hash table capacity, as returned by {@link #getCurrentTableCapacity()}. * * @return The base-2 logarithm of the hash table capacity. */ public int getLog2TableCapacity() { return log2size; }
3.26
flink_KeyMap_get_rdh
/** * Looks up the value mapped under the given key. Returns null if no value is mapped under this * key. * * @param key * The key to look up. * @return The value associated with the key, or null, if no value is found for the key. * @throws java.lang.NullPointerException * Thrown, if the key is null. */ pu...
3.26
flink_KeyMap_traverseMaps_rdh
// ------------------------------------------------------------------------ /** * Performs a traversal about logical the multi-map that results from the union of the given * maps. This method does not actually build a union of the map, but traverses the hash maps * together. * * @param maps * The array uf maps ...
3.26
flink_KeyMap_iterator_rdh
/** * Creates an iterator over the entries of this map. * * @return An iterator over the entries of this map. */ @Override public Iterator<Entry<K, V>> iterator() { return new Iterator<Entry<K, V>>() { private final Entry<K, V>[] tab = KeyMap.this.table; private Entry<K, V> nextEntry; private ...
3.26
flink_KeyMap_allocateTable_rdh
// Utilities // ------------------------------------------------------------------------ @SuppressWarnings("unchecked") private Entry<K, V>[] allocateTable(int numElements) { return ((Entry<K, V>[]) (new Entry<?, ?>[numElements]));}
3.26
flink_KeyMap_traverseAndCountElements_rdh
// ------------------------------------------------------------------------ // Testing Utilities // ------------------------------------------------------------------------ /** * For testing only: Actively counts the number of entries, rather than using the counter * variable. This method has linear complexity, rathe...
3.26
flink_KeyMap_size_rdh
// ------------------------------------------------------------------------ // Properties // ------------------------------------------------------------------------ /** * Gets the number of elements currently in the map. * * @return The number of elements currently in the map. */public int size() { return f0; ...
3.26
flink_SkipListValueSerializer_deserializeState_rdh
/** * Deserialize the state from the byte buffer which stores skip list value. * * @param memorySegment * the memory segment which stores the skip list value. * @param offset * the start position of the skip list value in the byte buffer. * @param len * length of the skip list value. */ S deserializeStat...
3.26
flink_SubtaskStateMapper_getNewToOldSubtasksMapping_rdh
/** * Returns a mapping new subtask index to all old subtask indexes. */ public RescaleMappings getNewToOldSubtasksMapping(int oldParallelism, int newParallelism) { return RescaleMappings.of(IntStream.range(0, newParallelism).mapToObj(channelIndex -> getOldSubtasks(channelIndex, oldParallelism, newParallelism)),...
3.26
flink_TypeExtractionUtils_checkAndExtractLambda_rdh
/** * Checks if the given function has been implemented using a Java 8 lambda. If yes, a * LambdaExecutable is returned describing the method/constructor. Otherwise null. * * @throws TypeExtractionException * lambda extraction is pretty hacky, it might fail for unknown * JVM issues. */ public static LambdaEx...
3.26
flink_TypeExtractionUtils_extractTypeArgument_rdh
/** * This method extracts the n-th type argument from the given type. An InvalidTypesException is * thrown if the type does not have any type arguments or if the index exceeds the number of * type arguments. * * @param t * Type to extract the type arguments from * @param index * Index of the type argument ...
3.26
flink_TypeExtractionUtils_getRawClass_rdh
/** * Returns the raw class of both parameterized types and generic arrays. Returns * java.lang.Object for all other types. */ public static Class<?> getRawClass(Type t) { if (isClassType(t)) { ...
3.26
flink_TypeExtractionUtils_getTypeHierarchy_rdh
/** * Traverses the type hierarchy of a type up until a certain stop class is found. * * @param t * type for which a hierarchy need to be created * @return type of the immediate child of the stop class */ public static Type getTypeHierarchy(List<Type> typeHierarchy, Type t, Class<?> stopAtClass) { while (!(...
3.26
flink_TypeExtractionUtils_getAllDeclaredMethods_rdh
/** * Returns all declared methods of a class including methods of superclasses. */ public static List<Method> getAllDeclaredMethods(Class<?> clazz) { List<Method> result = new ArrayList<>(); while (clazz != null) { Method[] methods = clazz.getDeclaredMethods(); Collections.addAll(result, meth...
3.26
flink_TypeExtractionUtils_getSingleAbstractMethod_rdh
/** * Extracts a Single Abstract Method (SAM) as defined in Java Specification (4.3.2. The Class * Object, 9.8 Functional Interfaces, 9.4.3 Interface Method Body) from given class. * * @param baseClass * a class that is a FunctionalInterface to retrieve a SAM from * @throws InvalidTypesException * if the giv...
3.26
flink_TypeExtractionUtils_sameTypeVars_rdh
/** * Checks whether two types are type variables describing the same. */ public static boolean sameTypeVars(Type t1, Type t2) { return (((t1 instanceof TypeVariable) && (t2 instanceof TypeVariable)) && ((TypeVariable<?>) (t1)).getName().equals(((TypeVariable<?>) (t2)).getName())) && ((TypeVariable<?>) (t1)).getG...
3.26
flink_TypeExtractionUtils_validateLambdaType_rdh
/** * Checks whether the given type has the generic parameters declared in the class definition. * * @param t * type to be validated */ public static void validateLambdaType(Class<?> baseClass, Type t) { if (!(t instanceof Class)) { return; } final Class<?> clazz = ((Class<?>) (t)); i...
3.26
flink_TypeExtractionUtils_hasSuperclass_rdh
/** * Returns true if the given class has a superclass of given name. * * @param clazz * class to be analyzed * @param superClassName * class name of the super class */ public static boolean hasSuperclass(Class<?> clazz, String superClassName) { List<Type> hierarchy = new ArrayList<>(); getTypeHierar...
3.26
flink_TypeExtractionUtils_typeToClass_rdh
/** * Convert ParameterizedType or Class to a Class. */ @SuppressWarnings("unchecked") public static <T> Class<T> typeToClass(Type t) { if (t instanceof Class) { return ((Class<T>) (t));} else if (t instanceof ParameterizedType) { return ((Class<T>) (((ParameterizedType) (t)).getRawType())); }...
3.26
flink_TypeExtractionUtils_isClassType_rdh
/** * Checks if a type can be converted to a Class. This is true for ParameterizedType and Class. */ public static boolean isClassType(Type t) { return (t instanceof Class<?>) || (t instanceof ParameterizedType); }
3.26
flink_TypeExtractionUtils_extractTypeFromLambda_rdh
/** * Extracts type from given index from lambda. It supports nested types. * * @param baseClass * SAM function that the lambda implements * @param exec * lambda function to extract the type from * @param lambdaTypeArgumentIndices * position of type to extract in type hierarchy * @param paramLen * cou...
3.26
flink_WindowJoin_main_rdh
// ************************************************************************* // PROGRAM // ************************************************************************* public static void main(String[] args) throws Exception { // parse the parameters final ParameterTool params = ParameterTool.fromArgs(args); fi...
3.26
flink_NettyShuffleUtils_getNetworkBuffersPerInputChannel_rdh
/** * Calculates and returns the number of required exclusive network buffers per input channel. */ public static int getNetworkBuffersPerInputChannel(final int configuredNetworkBuffersPerChannel) { return configuredNetworkBuffersPerChannel; }
3.26
flink_NettyShuffleUtils_getMinMaxFloatingBuffersPerInputGate_rdh
/** * Calculates and returns the floating network buffer pool size used by the input gate. The * left/right value of the returned pair represent the min/max buffers require by the pool. */ public static Pair<Integer, Integer> getMinMaxFloatingBuffersPerInputGate(final int numFloatingBuffersPerGate) { // We shou...
3.26
flink_NettyShuffleUtils_getMinMaxNetworkBuffersPerResultPartition_rdh
/** * Calculates and returns local network buffer pool size used by the result partition. The * left/right value of the returned pair represent the min/max buffers require by the pool. */ public static Pair<Integer, Integer> getMinMaxNetworkBuffersPerResultPartition(final int configuredNetworkBuffersPerChannel, fina...
3.26
flink_DuplicatingCheckpointOutputStream_closeAndGetSecondaryHandle_rdh
/** * Returns the state handle from the {@link #secondaryOutputStream}. Also reports suppressed * exceptions from earlier interactions with that stream. */ public StreamStateHandle closeAndGetSecondaryHandle() throws IOException { if (secondaryStreamException == null) {flushInternalBuffer(); return secon...
3.26
flink_DuplicatingCheckpointOutputStream_closeAndGetPrimaryHandle_rdh
/** * Returns the state handle from the {@link #primaryOutputStream}. */ public StreamStateHandle closeAndGetPrimaryHandle() throws IOException { flushInternalBuffer(); return primaryOutputStream.closeAndGetHandle(); }
3.26
flink_Vectorizer_setWriter_rdh
/** * Users are not supposed to use this method since this is intended to be used only by the * {@link OrcBulkWriter}. * * @param writer * the underlying ORC Writer. */ public void setWriter(Writer writer) { this.writer = writer; }
3.26
flink_Vectorizer_addUserMetadata_rdh
/** * Adds arbitrary user metadata to the outgoing ORC file. * * <p>Users who want to dynamically add new metadata either based on either the input or from an * external system can do so by calling <code>addUserMetadata(...)</code> inside the overridden * vectorize() method. * * @param key * a key to label th...
3.26
flink_NettyBufferPool_buffer_rdh
// ------------------------------------------------------------------------ // Delegate calls to the allocated and prohibit heap buffer allocations // ------------------------------------------------------------------------ @Override public ByteBuf buffer() { return alloc.buffer(); }
3.26
flink_SqlGatewayRestAPIDocGenerator_main_rdh
/** * Generates the Sql Gateway REST API documentation. * * @param args * args[0] contains the directory into which the generated files are placed * @throws IOException * if any file operation failed */ public static void main(String[] args) throws IOException, ConfigurationException { String outputDirec...
3.26
flink_HiveTypeUtil_toFlinkType_rdh
/** * Convert Hive data type to a Flink data type. * * @param hiveType * a Hive data type * @return the corresponding Flink data type */ public static DataType toFlinkType(TypeInfo hiveType) { checkNotNull(hiveType, "hiveType cannot be null"); switch (hiveType.getCategory()) { case PRIMITIVE : ...
3.26
flink_HiveTypeUtil_toHiveTypeInfo_rdh
/** * Convert Flink LogicalType to Hive TypeInfo. For types with a precision parameter, e.g. * timestamp, the supported precisions in Hive and Flink can be different. Therefore the * conversion will fail for those types if the precision is not supported by Hive and * checkPrecision is true. * * @param logicalType...
3.26
flink_HeapKeyedStateBackend_numKeyValueStateEntries_rdh
/** * Returns the total number of state entries across all keys for the given namespace. */@VisibleForTesting public int numKeyValueStateEntries(Object namespace) { int sum = 0; for (StateTable<?, ?, ?> state : f0.values()) { sum += state.sizeOfNames...
3.26
flink_HeapKeyedStateBackend_create_rdh
// ------------------------------------------------------------------------ // state backend operations // ------------------------------------------------------------------------ @Nonnull @Override public <T extends HeapPriorityQueueElement & PriorityComparable<? super T> & Keyed<?>> KeyGroupedInternalPriorityQueue<T>...
3.26
flink_LinkElement_link_rdh
/** * Creates a link with a given url. This url will be used as a description for that link. * * @param link * address that this link should point to * @return link representation */ public static LinkElement link(String link) { return new LinkElement(link, link); }
3.26
flink_TaskIOMetricGroup_getTaskInitializationDuration_rdh
/** * Returns the duration of time required for a task's restoring/initialization, which reaches * its maximum when the task begins running and remains constant throughout the task's running. * Return 0 when the task is not in initialization/running status. */ @VisibleForTesting public long getTaskInitializationDur...
3.26
flink_TaskIOMetricGroup_reuseRecordsInputCounter_rdh
// ============================================================================================ // Metric Reuse // ============================================================================================
3.26
flink_TaskIOMetricGroup_getNumBytesInCounter_rdh
// ============================================================================================ // Getters // ============================================================================================ public Counter getNumBytesInCounter() { return numBytesIn; }
3.26
flink_MultisetTypeInfo_getElementTypeInfo_rdh
// ------------------------------------------------------------------------ // MultisetTypeInfo specific properties // ------------------------------------------------------------------------ /** * Gets the type information for the elements contained in the Multiset */ public TypeInformation<T> getElementTypeInfo() {...
3.26
flink_Tuple21_copy_rdh
/** * Shallow tuple copy. * * @return A new Tuple with the same fields as this. */ @Override @SuppressWarnings("unchecked") public Tuple21<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20> copy() {return new Tuple21<>(this.f0, this.f1, this.f2, this.f3, this.f4, this.f5,...
3.26
flink_Tuple21_setFields_rdh
/** * Sets new values to all fields of the tuple. * * @param f0 * The value for field 0 * @param f1 * The value for field 1 * @param f2 * The value for field 2 * @param f3 * The value for field 3 * @param f4 * The value for field 4 * @param ...
3.26
flink_Tuple21_toString_rdh
// ------------------------------------------------------------------------------------------------- // standard utilities // ------------------------------------------------------------------------------------------------- /** * Creates a string representation of the tuple in the form (f0, f1, f2, f3, f4, f5, f6, f7,...
3.26
flink_Tuple21_of_rdh
/** * Creates a new tuple and assigns the given values to the tuple's fields. This is more * convenient than using the constructor, because the compiler can infer the generic type * arguments implicitly. For example: {@code Tuple3.of(n, x, s)} instead of {@code new * Tuple3<Integer, Double, String>(n, x, s)} */ pu...
3.26
flink_WindowOperatorBuilder_withInputCountIndex_rdh
/** * The index of COUNT(*) in the aggregates. -1 when the input doesn't * contain COUNT(*), i.e. * doesn't contain retraction messages. We make sure there is a * COUNT(*) if input stream * contains retraction. */ public WindowOperatorBuilder withInputCountIndex(int inputCountIndex) { this.inputCountIndex = inputCo...
3.26
flink_BlockInfo_setAccumulatedRecordCount_rdh
/** * Sets the accumulatedRecordCount to the specified value. * * @param accumulatedRecordCount * the accumulatedRecordCount to set */ public void setAccumulatedRecordCount(long accumulatedRecordCount) { this.accumulatedRecordCount = accumulatedRecordCount; }
3.26
flink_BlockInfo_getAccumulatedRecordCount_rdh
/** * Returns the accumulated record count. * * @return the accumulated record count */public long getAccumulatedRecordCount() { return this.accumulatedRecordCount; }
3.26
flink_BlockInfo_setRecordCount_rdh
/** * Sets the recordCount to the specified value. * * @param recordCount * the recordCount to set */ public void setRecordCount(long recordCount) { this.recordCount = recordCount; }
3.26
flink_BlockInfo_setFirstRecordStart_rdh
/** * Sets the firstRecordStart to the specified value. * * @param firstRecordStart * the firstRecordStart to set */ public void setFirstRecordStart(long firstRecordStart) { this.firstRecordStart = firstRecordStart; }
3.26
flink_DispatcherResourceManagerComponent_m0_rdh
/** * Deregister the Flink application from the resource management system by signalling the {@link ResourceManager} and also stop the process. * * @param applicationStatus * to terminate the application with * @param diagnostics * additional information about the shut down, can be {@code null} * @return Fut...
3.26
flink_RecordProcessorUtils_getRecordProcessor1_rdh
/** * Get record processor for the first input of {@link TwoInputStreamOperator}, which will omit * call of {@link StreamOperator#setKeyContextElement1} if it doesn't have key context. * * @param operator * the {@link TwoInputStreamOperator} * @return the record processor */ public static <T> ThrowingConsumer<...
3.26
flink_RecordProcessorUtils_getRecordProcessor2_rdh
/** * Get record processor for the second input of {@link TwoInputStreamOperator}, which will omit * call of {@link StreamOperator#setKeyContextElement2} if it doesn't have key context. * * @param operator * the {@link TwoInputStreamOperator} * @return the record processor */ public static <T> ThrowingConsumer...
3.26
flink_FileSink_build_rdh
/** * Creates the actual sink. */ public FileSink<IN> build() { return new FileSink<>(this); }
3.26
flink_AbstractPythonEnvironmentManager_constructEnvironmentVariables_rdh
/** * Constructs the environment variables which is used to launch the python UDF worker. * * @return The environment variables which contain the paths of the python dependencies. */ @VisibleForTesting public Map<String, String> constructEnvironmentVariables(String baseDirectory) throws IOException { Map<String...
3.26
flink_StreamGraphUtils_configureBufferTimeout_rdh
/** * Configure a stream node's buffer timeout according to the given transformation. * * @param streamGraph * The StreamGraph the node belongs to * @param nodeId * The node's id * @param transformation * A given transformation * @param defaultBufferTimeout * The default buffer timeout value */ publi...
3.26
flink_StreamGraphUtils_validateTransformationUid_rdh
/** * Throw {@link IllegalStateException} if the {@link PhysicalTransformation}'s uid or hash is * not set when auto generate uid is disabled. * * @param streamGraph * The given graph that the transformation is added to * @param transformation * The transformation needed to validate */ public static void va...
3.26
flink_StringifiedAccumulatorResult_stringifyAccumulatorResults_rdh
// ------------------------------------------------------------------------ // Utilities // ------------------------------------------------------------------------ /** * Flatten a map of accumulator names to Accumulator instances into an array of * StringifiedAccumulatorResult values. */...
3.26
flink_WindowsGrouping_buildTriggerWindowElementsIterator_rdh
/** * * @return the iterator of the next triggerable window's elements. */ public RowIterator<BinaryRowData> buildTriggerWindowElementsIterator() { currentWindow = nextWindow; // It is illegal to call this method after [[hasTriggerWindow()]] has returned `false`. Preconditions.checkState((watermark == ...
3.26
flink_WindowsGrouping_reset_rdh
/** * Reset for next group. */ public void reset() { nextWindow = null; watermark = Long.MIN_VALUE; triggerWindowStartIndex = 0; emptyWindowTriggered = true; resetBuffer(); }
3.26
flink_WindowsGrouping_hasTriggerWindow_rdh
/** * Check if there are windows could be triggered according to the current watermark. * * @return true when there are windows to be triggered. It is designed to be idempotent. */ public boolean hasTriggerWindow() { skipEmptyWindow(); Preconditions.checkState((watermark == Long.MIN_VALUE) || (nextWindo...
3.26
flink_WindowsGrouping_getTriggerWindow_rdh
/** * * @return the last triggered window. */ public TimeWindow getTriggerWindow() { return currentWindow; }
3.26
flink_ResettableExternalBuffer_close_rdh
/** * Delete all files and release the memory. */ @Override public void close() { clearChannels(); inMemoryBuffer.close(); pool.close(); }
3.26
flink_ResettableExternalBuffer_upperBound_rdh
// Find the index of the first element which is strictly greater than `goal` in `list`. // `list` must be sorted. // If every element in `list` is not larger than `goal`, return `list.size()`. private int upperBound(int goal, List<Integer> list) { if (list.size() == 0) { return 0; } if (list.get(list.size() - 1) <=...
3.26
flink_BasicArrayTypeInfo_getInfoFor_rdh
// -------------------------------------------------------------------------------------------- @SuppressWarnings("unchecked") @PublicEvolving public static <X, C> BasicArrayTypeInfo<X, C> getInfoFor(Class<X> type) { if (!type.isArray()) { throw new InvalidTypesException("The given class is no array.");} ...
3.26
flink_AscendingTimestampExtractor_extractTimestamp_rdh
// ------------------------------------------------------------------------ @Override public final long extractTimestamp(T element, long elementPrevTimestamp) { final long newTimestamp = extractAscendingTimestamp(element); if (newTimestamp >= this.currentTimestamp) { this.currentTimestamp = ne...
3.26
flink_AscendingTimestampExtractor_withViolationHandler_rdh
/** * Sets the handler for violations to the ascending timestamp order. * * @param handler * The violation handler to use. * @return This extractor. */ public AscendingTimestampExtractor<T> withViolationHandler(MonotonyViolationHandler handler) { this.violationHandler = requireNonNull(handler); return t...
3.26
flink_ChannelStateWriter_start_rdh
/** * No-op implementation of {@link ChannelStateWriter}. */class NoOpChannelStateWriter implements ChannelStateWriter { @Override public void start(long checkpointId, CheckpointOptions checkpointOptions) { }
3.26
flink_BooleanConditions_trueFunction_rdh
/** * * @return An {@link IterativeCondition} that always returns {@code true}. */public static <T> IterativeCondition<T> trueFunction() { return SimpleCondition.of(value -> true); }
3.26
flink_BooleanConditions_falseFunction_rdh
/** * * @return An {@link IterativeCondition} that always returns {@code false}. */ public static <T> IterativeCondition<T> falseFunction() { return SimpleCondition.of(value -> false); }
3.26
flink_PerJobMiniClusterFactory_m0_rdh
/** * Starts a {@link MiniCluster} and submits a job. */ public CompletableFuture<JobClient> m0(JobGraph jobGraph, ClassLoader userCodeClassloader) throws Exception { MiniClusterConfiguration miniClusterConfig = getMiniClusterConfig(jobGraph.getMaximumParallelism()); MiniCluster miniCluster = miniCluste...
3.26
flink_CompletedCheckpoint_registerSharedStatesAfterRestored_rdh
// ------------------------------------------------------------------------ // Shared State // ------------------------------------------------------------------------ /** * Register all shared states in the given registry. This method is called before the checkpoint * is added into the store. * * @param sharedStat...
3.26
flink_CompletedCheckpoint_checkpointsMatch_rdh
// ------------------------------------------------------------------------ // Miscellaneous // ------------------------------------------------------------------------ public static boolean checkpointsMatch(Collection<CompletedCheckpoint> first, Collection<CompletedCheckpoint> second) { if (first.size() != second....
3.26
flink_CompletedCheckpoint_getJobId_rdh
// ------------------------------------------------------------------------ // Properties // ------------------------------------------------------------------------ public JobID getJobId() { return job; }
3.26
flink_CompletedCheckpoint_markAsDiscarded_rdh
// ------------------------------------------------------------------------ // Discard and Dispose // ------------------------------------------------------------------------ public DiscardObject markAsDiscarded() { if (completedCheckpointStats != null) { completedCheckpointStats.discard(); } return...
3.26