name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_TypeInferenceUtil_inferOutputType_rdh
/** * Infers an output type using the given {@link TypeStrategy}. It assumes that input arguments * have been adapted before if necessary. */ public static DataType inferOutputType(CallContext callContext, TypeStrategy outputTypeStrategy) { final Optional<DataType> potentialOutputType = outputTypeStrategy.inferT...
3.26
flink_TypeInferenceUtil_generateSignature_rdh
/** * Generates a signature of the given {@link FunctionDefinition}. */ public static String generateSignature(TypeInference typeInference, String name, FunctionDefinition definition) { if (typeInference.getTypedArguments().isPresent()) { return formatNamedOrTypedArguments(name, typeInference); } ...
3.26
flink_TypeInferenceUtil_runTypeInference_rdh
/** * Runs the entire type inference process. * * @param typeInference * type inference of the current call * @param callContext * call context of the current call * @param surroundingInfo * information about the outer wrapping call of a current function call * for performing input type inference */ p...
3.26
flink_TypeInferenceUtil_validateArgumentCount_rdh
/** * Validates argument counts. * * @param argumentCount * expected argument count * @param actualCount * actual argument count * @param throwOnFailure * if true, the function throws a {@link ValidationException} if the * actual value does not meet the expected ...
3.26
flink_TypeInferenceUtil_createInvalidCallException_rdh
/** * Returns an exception for an invalid call to a function. */ public static ValidationException createInvalidCallException(CallContext callContext, ValidationException cause) { return new ValidationException(String.format("Invalid function call:\n%s(%s)", callContext.getName(), callContext.getArgumentDataType...
3.26
flink_TypeInferenceUtil_adaptArguments_rdh
/** * Adapts the call's argument if necessary. * * <p>This includes casts that need to be inserted, reordering of arguments (*), or insertion of * default values (*) where (*) is future work. */ public static CallContext adaptArguments(TypeInference typeInference, CallContext callContext, @Nullable DataType output...
3.26
flink_TypeInferenceUtil_createUnexpectedException_rdh
/** * Returns an exception for an unexpected error during type inference. */ public static TableException createUnexpectedException(CallContext callContext, Throwable cause) { return new TableException(String.format("Unexpected error in type inference logic of function '%s'. This is a bug.", callContext.getName()...
3.26
flink_TypeInferenceUtil_runTypeInferenceInternal_rdh
// -------------------------------------------------------------------------------------------- private static Result runTypeInferenceInternal(TypeInference typeInference, CallContext callContext, @Nullable SurroundingInfo surroundingInfo) { try { validateArgumentCount(typeInference.getInputTypeStrategy().g...
3.26
flink_SsgNetworkMemoryCalculationUtils_enrichNetworkMemory_rdh
/** * Calculates network memory requirement of {@link ExecutionJobVertex} and update {@link ResourceProfile} of corresponding slot sharing group. */ public static void enrichNetworkMemory(SlotSharingGroup ssg, Function<JobVertexID, ExecutionJobVertex> ejvs, ShuffleMaster<?> shuffleMaster) { ResourceProfile origin...
3.26
flink_GenericTypeInfo_hashCode_rdh
// -------------------------------------------------------------------------------------------- @Override public int hashCode() { return typeClass.hashCode(); }
3.26
flink_NonSplittingRecursiveEnumerator_enumerateSplits_rdh
// ------------------------------------------------------------------------ @Override public Collection<FileSourceSplit> enumerateSplits(Path[] paths, int minDesiredSplits) throws IOException { final ArrayList<FileSourceSplit> splits = new ArrayList<>(); for (Path path : paths) { final FileSystem fs = p...
3.26
flink_DiskTierProducerAgent_emitEndOfSegmentEvent_rdh
// ------------------------------------------------------------------------ // Internal Methods // ------------------------------------------------------------------------ private void emitEndOfSegmentEvent(int subpartitionId) { try { diskCacheManager.appendEndOfSegmentEvent(EventSerializer.toSerializ...
3.26
flink_HsSelectiveSpillingStrategy_decideActionWithGlobalInfo_rdh
// from high to low. @Override public Decision decideActionWithGlobalInfo(HsSpillingInfoProvider spillingInfoProvider) { if (spillingInfoProvider.getNumTotalRequestedBuffers() < (spillingInfoProvider.getPoolSize() * spillThreshold)) { // In case situation changed since onMemoryUsageChanged() returns Opt...
3.26
flink_HsSelectiveSpillingStrategy_onBufferConsumed_rdh
// For the case of buffer consumed, this buffer need release. The control of the buffer is taken // over by the downstream task. @Override public Optional<Decision> onBufferConsumed(BufferIndexAndChannel consumedBuffer) {return Optional.of(Decision.builder().addBufferToRelease(consumedBuffer).build()); }
3.26
flink_HsSelectiveSpillingStrategy_m0_rdh
// When the amount of memory used exceeds the threshold, decide action based on global // information. Otherwise, no need to take action. @Overridepublic Optional<Decision> m0(int numTotalRequestedBuffers, int currentPoolSize) { return numTotalRequestedBuffers < (currentPoolSize * spillThreshold) ? Optional.of(Deci...
3.26
flink_KeyGroupRangeAssignment_computeKeyGroupForKeyHash_rdh
/** * Assigns the given key to a key-group index. * * @param keyHash * the hash of the key to assign * @param maxParallelism * the maximum supported parallelism, aka the number of key-groups. * @return the key-group to which the given key is assigned */ public static int computeKeyGroupForKeyHash(int keyHas...
3.26
flink_KeyGroupRangeAssignment_computeKeyGroupRangeForOperatorIndex_rdh
/** * Computes the range of key-groups that are assigned to a given operator under the given * parallelism and maximum parallelism. * * <p>IMPORTANT: maxParallelism must be <= Short.MAX_VALUE + 1 to avoid rounding problems in * this method. If we ever want to go beyond this boundary, this method must perform arith...
3.26
flink_KeyGroupRangeAssignment_assignKeyToParallelOperator_rdh
/** * Assigns the given key to a parallel operator index. * * @param key * the key to assign * @param maxParallelism * the maximum supported parallelism, aka the number of key-groups. * @param parallelism * the current parallelism of the operator * @return the index of the parallel operator to which the ...
3.26
flink_KeyGroupRangeAssignment_computeDefaultMaxParallelism_rdh
/** * Computes a default maximum parallelism from the operator parallelism. This is used in case * the user has not explicitly configured a maximum parallelism to still allow a certain degree * of scale-up. * * @param operatorParallelism * the operator parallelism as basis for computation. * @return the comput...
3.26
flink_KeyGroupRangeAssignment_assignToKeyGroup_rdh
/** * Assigns the given key to a key-group index. * * @param key * the key to assign * @param maxParallelism * the maximum supported parallelism, aka the number of key-groups. * @return the key-group to which the given key is assigned */ public static int assignToKeyGroup(Object key, int maxParallelism) { ...
3.26
flink_CsvReaderFormat_forSchema_rdh
/** * Builds a new {@code CsvReaderFormat} using a {@code CsvSchema} generator and {@code CsvMapper} factory. * * @param mapperFactory * The factory creating the {@code CsvMapper}. * @param schemaGenerator * A generator that creates and configures the Jackson CSV schema for * parsing specific CSV files, fr...
3.26
flink_CsvReaderFormat_withIgnoreParseErrors_rdh
/** * Returns a new {@code CsvReaderFormat} configured to ignore all parsing errors. All the other * options directly carried over from the subject of the method call. */ public CsvReaderFormat<T> withIgnoreParseErrors() { return new CsvReaderFormat<>(this.mapperFactory, this.schemaGenerator, this.rootType, thi...
3.26
flink_CsvReaderFormat_forPojo_rdh
/** * Builds a new {@code CsvReaderFormat} for reading CSV files mapped to the provided POJO class * definition. Produced reader uses default mapper and schema settings, use {@code forSchema} if * you need customizations. * * @param pojoType * The type class of the POJO. * @param <T> * The type of the retur...
3.26
flink_CallContext_newValidationError_rdh
/** * Creates a validation exception for exiting the type inference process with a meaningful * exception. */ default ValidationException newValidationError(String message, Object... args) {return new ValidationException(String.format(message, args)); }
3.26
flink_CallContext_fail_rdh
/** * Helper method for handling failures during the type inference process while considering the * {@code throwOnFailure} flag. * * <p>Shorthand for {@code if (throwOnFailure) throw ValidationException(...) else return * Optional.empty()}. */ default <T> Optional<T> fail(boolean t...
3.26
flink_FileDataIndexSpilledRegionManagerImpl_readRegionGroup_rdh
/** * Read region group from index file. * * @param offset * offset of this region group. * @param numRegions * number of regions of this region group. * @return List of all regions and its offset belong to this region group. */ private List<Tuple2<T, Long>> readRegionGroup(long offset, int numRegions) thro...
3.26
flink_JMXService_startInstance_rdh
/** * Start the JMV-wide singleton JMX server. * * <p>If JMXServer static instance is already started, it will not be started again. Instead a * warning will be logged indicating which port the existing JMXServer static instance is * exposing. * * @param portsConfig * port ...
3.26
flink_JMXService_stopInstance_rdh
/** * Stop the JMX server. */ public static synchronized void stopInstance() throws IOException { if (jmxServer != null) { jmxServer.stop(); jmxServer = null; } }
3.26
flink_JMXService_getInstance_rdh
/** * Acquire the global singleton JMXServer instance. */ public static Optional<JMXServer> getInstance() { return Optional.ofNullable(jmxServer); }
3.26
flink_OneInputOperatorTransformation_setMaxParallelism_rdh
/** * Sets the maximum parallelism of this operator. * * <p>The maximum parallelism specifies the upper bound for dynamic scaling. It also defines the * number of key groups used for partitioned state. * * @param maxParallelism * Maximum parallelism * @return The operator with set maximum parallelism */ @Pub...
3.26
flink_OneInputOperatorTransformation_m0_rdh
/** * It creates a new {@link KeyedOperatorTransformation} that uses the provided key with explicit * type information for partitioning its operator states. * * @param keySelector * The KeySelector to be used for extracting the key for partitioning. * @param keyType * The type information describing the key ...
3.26
flink_OneInputOperatorTransformation_keyBy_rdh
/** * Partitions the operator state of a {@link OperatorTransformation} using field expressions. A * field expression is either the name of a public field or a getter method with parentheses of * the {@code OperatorTransformation}'s underlying type. A dot can be used to drill down into * objects, as in {@code "fiel...
3.26
flink_OneInputOperatorTransformation_assignTimestamps_rdh
/** * Assigns an event time timestamp to each record. This value will be used when performing event * time computations such as assigning windows. */ public OneInputOperatorTransformation<T> assignTimestamps(TimestampAssigner<T> assigner) { this.timestamper = new TimestampAssignerWrapper<>(assigner); ret...
3.26
flink_OneInputOperatorTransformation_transform_rdh
/** * Method for passing user defined operators along with the type information that will transform * the OperatorTransformation. * * <p><b>IMPORTANT:</b> Any output from this operator will be discarded. * * @param factory * A factory returning transformation logic type of the return stream * @return An {@lin...
3.26
flink_PbCodegenUtils_getTypeStrFromProto_rdh
/** * Get java type str from {@link FieldDescriptor} which directly fetched from protobuf object. * * @return The returned code phrase will be used as java type str in codegen sections. * @throws PbCodegenException */ public static String getTypeStrFromProto(FieldDescriptor fd, boolean isList) throws PbCodegenEx...
3.26
flink_PbCodegenUtils_convertFlinkArrayElementToPbWithDefaultValueCode_rdh
/** * This method will be called from serializer of flink array/map type because flink contains * both array/map type in array format. Map/Array cannot contain null value in pb object then we * must do conversion in case of null values in map/array type. * * @param flinkArrDataVar * code phrase represent arrayD...
3.26
flink_PbCodegenUtils_flinkContainerElementCode_rdh
/** * * @param flinkContainerCode * code phrase which represent flink container type like row/array in * codegen sections * @param index * the index number in flink container type * @param eleType * the element type */ public static String flinkContainerEleme...
3.26
flink_PbCodegenUtils_getTypeStrFromLogicType_rdh
/** * Get java type str from {@link LogicalType} which directly fetched from flink type. * * @return The returned code phrase will be used as java type str in codegen sections. */ public static String getTypeStrFromLogicType(LogicalType type) { switch (type.getTypeRoot()) { case INTEGER : return "int"; case BIGINT ...
3.26
flink_PbCodegenUtils_pbDefaultValueCode_rdh
/** * Get protobuf default value from {@link FieldDescriptor}. * * @return The java code phrase which represents default value calculation. */ public static String pbDefaultValueCode(FieldDescriptor fieldDescriptor, PbFormatContext pbFormatContext) throws PbCodegenException { String nullLiteral = pbFormatContext.g...
3.26
flink_PythonOperatorUtils_setCurrentKeyForStreaming_rdh
/** * Set the current key for streaming operator. */ public static <K> void setCurrentKeyForStreaming(KeyedStateBackend<K> stateBackend, K currentKey) { if (!inBatchExecutionMode(stateBackend)) { stateBackend.setCurrentKey(currentKey); } }
3.26
flink_PythonOperatorUtils_setCurrentKeyForTimerService_rdh
/** * Set the current key for the timer service. */ public static <K, N> void setCurrentKeyForTimerService(InternalTimerService<N> internalTimerService, K currentKey) throws Exception { if (internalTimerService instanceof BatchExecutionInternalTimeService) { ((BatchExecutionInternalTimeService<K, N>) (int...
3.26
flink_PanedWindowProcessFunction_isPaneLate_rdh
/** * checks whether the pane is late (e.g. can be / has been cleanup) */ private boolean isPaneLate(W pane) { // whether the pane is late depends on the last window which the pane is belongs to is late return windowAssigner.isEventTime() && isWindowLate(windowAssigner.getLastWindow(pane)); }
3.26
flink_ExpressionUtils_extractValue_rdh
/** * Extracts the value (excluding null) of a given class from an expression assuming it is a * {@link ValueLiteralExpression}. * * @param expression * literal to extract the value from * @param targetClass * expected class to extract from the literal * @param <V> *...
3.26
flink_TableFunctionProvider_of_rdh
/** * Helper method for creating a static provider. */ static <T> TableFunctionProvider<T> of(TableFunction<T> tableFunction) { return () -> tableFunction; }
3.26
flink_FailedCheckpointStats_getEndToEndDuration_rdh
/** * Returns the end to end duration until the checkpoint failure. */ @Override public long getEndToEndDuration() { return Math.max(0, failureTimestamp - triggerTimestamp); }
3.26
flink_SortedMapSerializer_snapshotConfiguration_rdh
// -------------------------------------------------------------------------------------------- // Serializer configuration snapshot // -------------------------------------------------------------------------------------------- @Override public TypeSerializerSnapshot<SortedMap<K, V>> snapshotConfiguration() { return n...
3.26
flink_MimeTypes_getMimeTypeForFileName_rdh
/** * Gets the MIME type for the file with the given name, by extension. This method tries to * extract the file extension and then use the {@link #getMimeTypeForExtension(String)} to * determine the MIME type. If the extension cannot be determined, or the extension is * unrecognized, this method return {@code null...
3.26
flink_MimeTypes_getMimeTypeForExtension_rdh
/** * Gets the MIME type for the file with the given extension. If the mime type is not recognized, * this method returns null. * * @param fileExtension * The file extension. * @return The MIME type, or {@code null}, if the file extension is not recognized. */ public static String getMimeTypeForExtension(Strin...
3.26
flink_RepeatingSequenceInputTypeStrategy_equals_rdh
// --------------------------------------------------------------------------------------------- @Override public boolean equals(Object other) { if (this == other) { return true; } if ((other == null) || (getClass() != other.getClass())) { return false; } final RepeatingS...
3.26
flink_DefaultResourceCleaner_withPrioritizedCleanup_rdh
/** * Prioritized cleanups run before their regular counterparts. This method enables the * caller to model dependencies between cleanup tasks. The order in which cleanable * resources are added matters, i.e. if two cleanable resources are added as prioritized * cleanup tasks, the resource being added first will bl...
3.26
flink_DefaultResourceCleaner_withRegularCleanup_rdh
/** * Regular cleanups are resources for which the cleanup is triggered after all prioritized * cleanups succeeded. All added regular cleanups will run concurrently to each other. * * @param label * The label being used when logging errors in the given cleanup. * @param regularCleanup * The cleanup callback ...
3.26
flink_PartitionRequestQueue_addCreditOrResumeConsumption_rdh
/** * Adds unannounced credits from the consumer or resumes data consumption after an exactly-once * checkpoint and enqueues the corresponding reader for this consumer (if not enqueued yet). * * @param receiverId * The input channel id to identify the consumer. * @param operation * The operation to be perfor...
3.26
flink_PartitionRequestQueue_enqueueAvailableReader_rdh
/** * Try to enqueue the reader once receiving credit notification from the consumer or receiving * non-empty reader notification from the producer. * * <p>NOTE: Only one thread would trigger the actual enqueue after checking the reader's * availability, so there is no race condition here. ...
3.26
flink_PartitionRequestQueue_announceBacklog_rdh
/** * Announces remaining backlog to the consumer after the available data notification or data * consumption resumption. */ private void announceBacklog(NetworkSequenceViewReader reader, int backlog) { checkArgument(backlog > 0, "Backlog must be positive."); NettyMessage.BacklogAnnouncement announcement = new Netty...
3.26
flink_PartitionRequestQueue_getAvailableReaders_rdh
/** * Accesses internal state to verify reader registration in the unit tests. * * <p><strong>Do not use anywhere else!</strong> * * @return readers which are enqueued available for transferring data */ @VisibleForTesting ArrayDeque<NetworkSequenceViewReader> getAvailableReaders() { return availableReaders;}
3.26
flink_PartitionRequestQueue_notifyRequiredSegmentId_rdh
/** * Notify the id of required segment from the consumer. * * @param receiverId * The input channel id to identify the consumer. * @param segmentId * The id of required segment. */ void notifyRequiredSegmentId(InputChannelID receiverId, int segmentId) { if (fatalError) { return; } NetworkSequenceViewRea...
3.26
flink_AbstractStreamOperatorV2_getProcessingTimeService_rdh
/** * Returns the {@link ProcessingTimeService} responsible for getting the current processing time * and registering timers. */ @VisibleForTesting public ProcessingTimeService getProcessingTimeService() { return processingTimeService; }
3.26
flink_AbstractStreamOperatorV2_getPartitionedState_rdh
/** * Creates a partitioned state handle, using the state backend configured for this task. * * @throws IllegalStateException * Thrown, if the key/value state was already initialized. * @throws Exception * Thrown, if the state backend cannot create the key/value state. */ protected <S extends State, N> S get...
3.26
flink_AbstractStreamOperatorV2_getExecutionConfig_rdh
// ------------------------------------------------------------------------ // Properties and Services // ------------------------------------------------------------------------ /** * Gets the execution config defined on the execution environment of the job to which this * operator belongs. * * @return The job's e...
3.26
flink_AbstractStreamOperatorV2_getRuntimeContext_rdh
/** * Returns a context that allows the operator to query information about the execution and also * to interact with systems such as broadcast variables and managed state. This also allows to * register timers. */ public StreamingRuntimeContext getRuntimeContext() { return runtimeContext; }
3.26
flink_AbstractStreamOperatorV2_snapshotState_rdh
/** * Stream operators with state, which want to participate in a snapshot need to override this * hook method. * * @param context * context that provides information and means required for taking a snapshot */ @Override public void snapshotState(StateSnapshotContext context) throws Exception { }
3.26
flink_AbstractStreamOperatorV2_m3_rdh
// ------------------------------------------------------------------------ // Watermark handling // ------------------------------------------------------------------------ /** * Returns a {@link InternalTimerService} that can be used to query current processing time and * event time and to set timers. An operator c...
3.26
flink_AbstractStreamOperatorV2_open_rdh
/** * This method is called immediately before any elements are processed, it should contain the * operator's initialization logic, e.g. state initialization. * * <p>The default implementation does nothing. * * @throws Exception * An exception in this method causes the operator to fail. */ @Override public vo...
3.26
flink_AbstractStreamOperatorV2_initializeState_rdh
/** * Stream operators with state which can be restored need to override this hook method. * * @param context * context that allows to register different states. */ @Override public void initializeState(StateInitializationContext context) throws Exception { }
3.26
flink_AbstractStreamOperatorV2_isUsingCustomRawKeyedState_rdh
/** * Indicates whether or not implementations of this class is writing to the raw keyed state * streams on snapshots, using {@link #snapshotState(StateSnapshotContext)}. If yes, subclasses * should override this method to return {@code true}. * * <p>Subclasses need to explicitly indicate the use of raw keyed stat...
3.26
flink_AbstractKubernetesStepDecorator_decorateFlinkPod_rdh
/** * Apply transformations on the given FlinkPod in accordance to this feature. Note that we * should return a FlinkPod that keeps all of the properties of the passed FlinkPod object. * * <p>So this is correct: * * <pre>{@code Pod decoratedPod = new PodBuilder(pod) // Keeps the original state * ... * ....
3.26
flink_AbstractKubernetesStepDecorator_buildAccompanyingKubernetesResources_rdh
/** * Note that the method could have a side effect of modifying the Flink Configuration object, * such as update the JobManager address. */ @Override public List<HasMetadata> buildAccompanyingKubernetesResources() throws IOException { return Collections.emptyList(); }
3.26
flink_CheckpointsCleaner_addSubsumedCheckpoint_rdh
/** * Add one subsumed checkpoint to CheckpointsCleaner, the subsumed checkpoint would be discarded * at {@link #cleanSubsumedCheckpoints(long, Set, Runnable, Executor)}. * * @param completedCheckpoint * which is subsumed. */ public void addSubsumedCheckpoint(CompletedCheckpoint completedCheckpoint) { synchroni...
3.26
flink_CheckpointsCleaner_cleanSubsumedCheckpoints_rdh
/** * Clean checkpoint that is not in the given {@param stillInUse}. * * @param upTo * lowest CheckpointID which is still valid. * @param stillInUse * the state of those checkpoints are still referenced. * @param postCleanAction * post action after cleaning. * @param executor * is used to perform the ...
3.26
flink_AbstractOrcFileInputFormat_seek_rdh
/** * The argument of {@link RecordReader#seekToRow(long)} must come from {@link RecordReader#getRowNumber()}. The internal implementation of ORC is very confusing. It * has special behavior when dealing with Predicate. */ public void seek(CheckpointedPosition position) throws...
3.26
flink_AbstractOrcFileInputFormat_orcVectorizedRowBatch_rdh
/** * Gets the ORC VectorizedRowBatch structure from this batch. */ public OrcVectorizedBatchWrapper<BatchT> orcVectorizedRowBatch() { return orcVectorizedRowBatch; }
3.26
flink_AbstractOrcFileInputFormat_createReader_rdh
// ------------------------------------------------------------------------ @Override public OrcVectorizedReader<T, BatchT> createReader(final Configuration config, final SplitT split) throws IOException { final int numBatchesToCirculate = config.getInteger(SourceReaderOptions.ELEMENT_QUEUE_CAPACITY); final Poo...
3.26
flink_JobResultDeserializer_assertNextToken_rdh
/** * Advances the token and asserts that it matches the required {@link JsonToken}. */ private static void assertNextToken(final JsonParser p, final JsonToken requiredJsonToken) throws IOException { final JsonToken jsonToken = p.nextToken(); if (jsonToken != requiredJsonToken) { throw new JsonMappi...
3.26
flink_LookupCacheManager_keepCacheOnRelease_rdh
// ---------------------------- For testing purpose ------------------------------ public static void keepCacheOnRelease(boolean toKeep) { keepCacheOnRelease = toKeep; }
3.26
flink_LookupCacheManager_registerCacheIfAbsent_rdh
/** * Register a cache instance with identifier to the manager. * * <p>If the cache with the given identifier is already registered in the manager, this method * will return the registered one, otherwise this method will register the given cache into the * manager then return. * * @param cacheIdentifier * ide...
3.26
flink_LookupCacheManager_unregisterCache_rdh
/** * Release the cache with the given identifier from the manager. * * <p>The manager will track a reference count of managed caches, and will close the cache if * the reference count reaches 0. */public synchronized void unregisterCache(String cacheIdentifier) { RefCountedCache refCountedCache = checkNotNull...
3.26
flink_LookupCacheManager_getInstance_rdh
/** * Get the shared instance of {@link LookupCacheManager}. */ public static synchronized LookupCacheManager getInstance() { if (instance == null) { instance = new LookupCacheManager(); } return instance; }
3.26
flink_ResourceManagerId_fromUuidOrNull_rdh
/** * If the given uuid is null, this returns null, otherwise a ResourceManagerId that corresponds * to the UUID, via {@link #ResourceManagerId(UUID)}. */ public static ResourceManagerId fromUuidOrNull(@Nullable UUID uuid) { return uuid == null ? null : new ResourceManagerId(uuid); }
3.26
flink_ResourceManagerId_toUUID_rdh
/** * Creates a UUID with the bits from this ResourceManagerId. */ public UUID toUUID() { return new UUID(getUpperPart(), getLowerPart()); }
3.26
flink_ResourceManagerId_fromUuid_rdh
/** * Creates a ResourceManagerId that corresponds to the given UUID. */ public static ResourceManagerId fromUuid(UUID uuid) { return new ResourceManagerId(uuid); }
3.26
flink_CachedDataStream_invalidate_rdh
/** * Invalidate the cache intermediate result of this DataStream to release the physical * resources. Users are not required to invoke this method to release physical resources unless * they want to. Cache will be recreated if it is used after invalidated. */public void invalidate() throws Exception { final C...
3.26
flink_ApiExpressionUtils_objectToExpression_rdh
/** * Converts a given object to an expression. * * <p>It converts: * * <ul> * <li>{@code null} to null literal * <li>{@link Row} to a call to a row constructor expression * <li>{@link Map} to a call to a map constructor expression * <li>{@link List} to a call to an array constructor expression * <l...
3.26
flink_ApiExpressionUtils_isFunction_rdh
/** * Checks if the given expression is a given builtin function. * * @param expression * expression to check * @param functionDefinition * expected function definition * @return true if the given expression is a given function call */public static boolean isFunction(Expression expression, BuiltInFunctionDe...
3.26
flink_ApiExpressionUtils_isFunctionOfKind_rdh
/** * Checks if the expression is a function call of given type. * * @param expression * expression to check * @param kind * expected type of function * @return true if the expression is function call of given type, false otherwise */ public static boolean isFunctionOfKind(Expression expression, FunctionKin...
3.26
flink_RetryingExecutor_execute_rdh
/** * Execute the given action according to the retry policy. * * <p>NOTE: the action must be idempotent because multiple instances of it can be executed * concurrently (if the policy allows retries). */ <T> void execute(RetryPolicy retryPolicy, RetriableAction<T> action) { LOG.debug("execute with retryPolicy:...
3.26
flink_RichAsyncFunction_getDistributedCache_rdh
// ----------------------------------------------------------------------------------- // Unsupported operations // ----------------------------------------------------------------------------------- @Override public DistributedCache getDistributedCache() { throw new UnsupportedOperationException("Distributed cache...
3.26
flink_RichAsyncFunction_getIterationAggregator_rdh
// ----------------------------------------------------------------------------------- // Unsupported operations // ----------------------------------------------------------------------------------- @Overridepublic <T extends Aggregator<?>> T getIterationAggregator(String name) { throw new UnsupportedOperationExce...
3.26
flink_AsyncSinkWriter_snapshotState_rdh
/** * All in-flight requests that are relevant for the snapshot have been completed, but there may * still be request entries in the internal buffers that are yet to be sent to the endpoint. * These request entries are stored in the snapshot state so that they don't get lost in case of * a failure/restart of the ap...
3.26
flink_AsyncSinkWriter_createNextAvailableBatch_rdh
/** * Creates the next batch of request entries while respecting the {@code maxBatchSize} and * {@code maxBatchSizeInBytes}. Also adds these to the metrics counters. */private List<RequestEntryT> createNextAvailableBatch(RequestInfo requestInfo) { List<RequestEntryT> batch = new ArrayList<>(requestInfo.getBatchS...
3.26
flink_AsyncSinkWriter_completeRequest_rdh
/** * Marks an in-flight request as completed and prepends failed requestEntries back to the * internal requestEntry buffer for later retry. * * @param failedRequestEntries * requestEntries that need to be retried */ private void completeRequest(List<RequestEntryT> failedRequestEntries, int batchSize, long requ...
3.26
flink_AsyncSinkWriter_nonBlockingFlush_rdh
/** * Determines if a call to flush will be non-blocking (i.e. {@code inFlightRequestsCount} is * strictly smaller than {@code maxInFlightRequests}). Also requires one of the following * requirements to be met: * * <ul> * <li>The number of elements buffered is greater than or equal to the {@code maxBatchSize} ...
3.26
flink_AsyncSinkWriter_flush_rdh
/** * In flight requests will be retried if the sink is still healthy. But if in-flight requests * fail after a checkpoint has been triggered and Flink needs to recover from the checkpoint, * the (failed) in-flight requests are gone and cannot be retried. Hence, there cannot be any * outstanding in-flight requests ...
3.26
flink_LeaderInformationRegister_forComponentId_rdh
/** * Returns the {@link LeaderInformation} that is stored or an empty {@code Optional} if no entry * exists for the passed {@code componentId}. */public Optional<LeaderInformation> forComponentId(String componentId) { return Optional.ofNullable(leaderInformationPerComponentId.get(componentId)); }
3.26
flink_LeaderInformationRegister_of_rdh
/** * Creates a single-entry instance containing only the passed information. */public static LeaderInformationRegister of(String componentId, LeaderInformation leaderInformation) { return new LeaderInformationRegister(Collections.singletonMap(componentId, leaderInformation)); }
3.26
flink_LeaderInformationRegister_merge_rdh
/** * Merges another {@code LeaderInformationRegister} with additional leader information into a * new {@code LeaderInformationRegister} instance. Any existing {@link LeaderInformation} for * the passed {@code componentId} will be overwritten. * * <p>Empty {@code LeaderInformation} results in the removal of the co...
3.26
flink_LeaderInformationRegister_clear_rdh
/** * Creates a new {@code LeaderInformationRegister} that matches the passed {@code LeaderInformationRegister} except for the entry of {@code componentId} which is removed if it * existed. */ public static LeaderInformationRegister clear(@Nullable LeaderInformationRegister leaderInformationRegister, String compone...
3.26
flink_LeaderInformationRegister_getRegisteredComponentIds_rdh
/** * Returns the {@code componentId}s for which leader information is stored. */ public Iterable<String> getRegisteredComponentIds() { return leaderInformationPerComponentId.keySet(); }
3.26
flink_LeaderInformationRegister_hasLeaderInformation_rdh
/** * Checks whether the register holds non-empty {@link LeaderInformation} for the passed {@code componentId}. */ public boolean hasLeaderInformation(String componentId) {return leaderInformationPerComponentId.containsKey(componentId); } /** * Checks that no non-empty {@link LeaderInformation} is stored. * * @re...
3.26
flink_GlobalConfiguration_isSensitive_rdh
/** * Check whether the key is a hidden key. * * @param key * the config key */ public static boolean isSensitive(String key) { Preconditions.checkNotNull(key, "key is null"); final String v13 = key.toLowerCase(); for (String hideKey : SENSITIVE_KEYS) { if ((v13.length() >= hideKey.length...
3.26
flink_GlobalConfiguration_loadConfiguration_rdh
/** * Loads the configuration files from the specified directory. If the dynamic properties * configuration is not null, then it is added to the loaded configuration. * * @param configDir * directory to load the configuration from * @param dynamicProperties * configuration fil...
3.26