name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_StateTtlConfig_m0_rdh | /**
* Sets the ttl time.
*
* @param ttl
* The ttl time.
*/
@Nonnull
public Builder m0(@Nonnull
Time ttl) {
this.ttl = ttl;return this;
} | 3.26 |
flink_StateTtlConfig_setStateVisibility_rdh | /**
* Sets the state visibility.
*
* @param stateVisibility
* The state visibility configures whether expired user value can be
* returned or not.
*/
@Nonnull
public Builder setStateVisibility(@Nonnull
StateVisibility stateVisibility) {
this.stateVisibility = stateVisibility;
return this;
} | 3.26 |
flink_StateTtlConfig_disableCleanupInBackground_rdh | /**
* Disable default cleanup of expired state in background (enabled by default).
*
* <p>If some specific cleanup is configured, e.g. {@link #cleanupIncrementally(int,
* boolean)} or {@link #cleanupInRocksdbCompactFilter(long)} or {@link #cleanupInRocksdbCompactFilter(long, Time)} , this setting does not disable i... | 3.26 |
flink_StateTtlConfig_setTtlTimeCharacteristic_rdh | /**
* Sets the time characteristic.
*
* @param ttlTimeCharacteristic
* The time characteristic configures time scale to use for
* ttl.
*/
@Nonnull
public Builder setTtlTimeCharacteristic(@Nonnull
TtlTimeCharacteristic ttlTimeCharacteristic) {
this.ttlTimeCharacteristic = ttlTimeCharacteristic;
return ... | 3.26 |
flink_AsynchronousBufferFileWriter_writeBlock_rdh | /**
* 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
*/
@Override
public void writeBlock(Buffer buffer) throws IOException {
try {
// if successfully added, the buf... | 3.26 |
flink_ShortValue_getMaxNormalizedKeyLen_rdh | // --------------------------------------------------------------------------------------------
@Override
public int getMaxNormalizedKeyLen()
{
return 2;
} | 3.26 |
flink_ShortValue_setValue_rdh | /**
* Sets the encapsulated short to the specified value.
*
* @param value
* the new value of the encapsulated short.
*/
public void setValue(short value) {
this.value = value;
} | 3.26 |
flink_ShortValue_getBinaryLength_rdh | // --------------------------------------------------------------------------------------------
@Override
public int getBinaryLength() {
return 2;
} | 3.26 |
flink_ShortValue_read_rdh | // --------------------------------------------------------------------------------------------
@Override
public void read(DataInputView in) throws IOException {
this.value = in.readShort();
} | 3.26 |
flink_SingleInputUdfOperator_setSemanticProperties_rdh | /**
* Sets the semantic properties for the user-defined function (UDF). The semantic properties
* define how fields of tuples and other objects are modified or preserved through this UDF. The
* configured properties can be retrieved via {@link UdfOperator#getSemanticProperties()}.
*
* @param properties
* The se... | 3.26 |
flink_SingleInputUdfOperator_withParameters_rdh | // --------------------------------------------------------------------------------------------
// Fluent API methods
// --------------------------------------------------------------------------------------------
@Override
public O withParameters(Configuration parameters) {
this.parameters = parameters;@SuppressWa... | 3.26 |
flink_SingleInputUdfOperator_getBroadcastSets_rdh | // --------------------------------------------------------------------------------------------
// Accessors
// --------------------------------------------------------------------------------------------
@Override@Internal
public Map<String, DataSet<?>> getBroadcastSets() {
return this.broadcastVariables == null ... | 3.26 |
flink_SingleInputUdfOperator_returns_rdh | /**
* Adds a type information hint about the return type of this operator. This method can be used
* in cases where Flink cannot determine automatically what the produced type of a function is.
* That can be the case if the function uses generic type variables in the return type that
* cannot be inferred from the i... | 3.26 |
flink_SingleInputUdfOperator_withForwardedFields_rdh | /**
* Adds semantic information about forwarded fields of the user-defined function. The forwarded
* fields information declares fields which are never modified by the function and which are
* forwarded at the same position to the output or unchanged copied to another position in the
* output.
*
* <p>Fields that ... | 3.26 |
flink_Sink_metadataConsumer_rdh | /**
* Returns a metadata consumer, the {@link SinkWriter} can publish metadata events of type
* {@link MetaT} to the consumer.
*
* <p>It is recommended to use a separate thread pool to publish the metadata because
* enqueuing a lot of these messages in the mailbox may lead to a performance decrease.
* thread, and... | 3.26 |
flink_SlideWithSizeAndSlideOnTime_as_rdh | /**
* Assigns an alias for this window that the following {@code groupBy()} and {@code select()}
* clause can refer to. {@code select()} statement can access window properties such as window
* start or end time.
*
* @param alias
* alias for this window
* @return this window
*/
public SlideWithSizeAndSlideOnTi... | 3.26 |
flink_CustomSinkOperatorUidHashes_setCommitterUidHash_rdh | /**
* Sets the uid hash of the committer operator used to recover state.
*
* @param committerUidHash
* uid hash denoting the committer operator
* @return {@link SinkOperatorUidHashesBuilder}
*/
public SinkOperatorUidHashesBuilder setCommitterUidHash(String committerUidHash) {
this.committerUidHash = committer... | 3.26 |
flink_CustomSinkOperatorUidHashes_setGlobalCommitterUidHash_rdh | /**
* Sets the uid hash of the global committer operator used to recover state.
*
* @param globalCommitterUidHash
* uid hash denoting the global committer operator
* @return {@link SinkOperatorUidHashesBuilder}
*/
public SinkOperatorUidHashesBuilder setGlobalCommitterUidHash(String globalCommitterUidHash) {
... | 3.26 |
flink_CustomSinkOperatorUidHashes_builder_rdh | /**
* Creates a builder to construct {@link CustomSinkOperatorUidHashes}.
*
* @return {@link SinkOperatorUidHashesBuilder}
*/public static
SinkOperatorUidHashesBuilder builder() {
return new SinkOperatorUidHashesBuilder();
} | 3.26 |
flink_CustomSinkOperatorUidHashes_build_rdh | /**
* Constructs the {@link CustomSinkOperatorUidHashes} with the given uid hashes.
*
* @return {@link CustomSinkOperatorUidHashes}
*/
public CustomSinkOperatorUidHashes build() {
return new CustomSinkOperatorUidHashes(writerUidHash, committerUidHash, globalCommitterUidHash);
} | 3.26 |
flink_CustomSinkOperatorUidHashes_setWriterUidHash_rdh | /**
* Sets the uid hash of the writer operator used to recover state.
*
* @param writerUidHash
* uid hash denoting writer operator
* @return {@link SinkOperatorUidHashesBuilder}
*/
public SinkOperatorUidHashesBuilder setWriterUidHash(String writerUidHash) {
this.writerUidHash = writerUidHash;
return thi... | 3.26 |
flink_AbstractFileStateBackend_resolveCheckpoint_rdh | // ------------------------------------------------------------------------
// Initialization and metadata storage
// ------------------------------------------------------------------------
@Override
public CompletedCheckpointStorageLocation resolveCheckpoint(String pointer) throws IOException {
return AbstractFs... | 3.26 |
flink_AbstractFileStateBackend_validatePath_rdh | // ------------------------------------------------------------------------
// Utilities
// ------------------------------------------------------------------------
/**
* Checks the validity of the path's scheme and path.
*
* @param path
* The path to check.
* @return The URI as a Path.
* @throws IllegalArgumen... | 3.26 |
flink_AbstractFileStateBackend_getCheckpointPath_rdh | // ------------------------------------------------------------------------
/**
* Gets the checkpoint base directory. Jobs will create job-specific subdirectories for
* checkpoints within this directory. May be null, if not configured.
*
* @return The checkpoint base directory
*/
@Nullable
public Path getCheckpoin... | 3.26 |
flink_WindowedStateTransformation_aggregate_rdh | /**
* Applies the given window function to each window. The window function is called for each
* evaluation of the window for each key individually. The output of the window function is
* interpreted as a regular non-windowed stream.
*
* <p>Arriving data is incrementally aggregated using the given aggregate functi... | 3.26 |
flink_WindowedStateTransformation_process_rdh | /**
* Applies the given window function to each window. The window function is called for each
* evaluation of the window for each key individually. The output of the window function is
* interpreted as a regular non-windowed stream.
*
* <p>Note that this function requires that all data in the windows is buffered ... | 3.26 |
flink_WindowedStateTransformation_evictor_rdh | /**
* Sets the {@code Evictor} that should be used to evict elements from a window before emission.
*
* <p>Note: When using an evictor window performance will degrade significantly, since
* incremental aggregation of window results cannot be used.
*/
@PublicEvolving
public WindowedStateTransformation<T, K, W> evi... | 3.26 |
flink_WindowedStateTransformation_reduce_rdh | /**
* Applies the given window function to each window. The window function is called for each
* evaluation of the window for each key individually. The output of the window function is
* interpreted as a regular non-windowed stream.
*
* <p>Arriving data is incrementally aggregated using the given reducer.
*
* @... | 3.26 |
flink_WindowedStateTransformation_m0_rdh | // Aggregation Function
// ------------------------------------------------------------------------
/**
* Applies the given aggregation function to each window. The aggregation function is called for
* each element, aggregating values incrementally and keeping the state to one accumulator per
* key and window.
*
*... | 3.26 |
flink_WindowedStateTransformation_trigger_rdh | /**
* Sets the {@code Trigger} that should be used to trigger window emission.
*/
@PublicEvolvingpublic WindowedStateTransformation<T, K, W> trigger(Trigger<? super T, ? super W> trigger) {
builder.trigger(trigger);
return this;
} | 3.26 |
flink_WindowedStateTransformation_apply_rdh | /**
* Applies the given window function to each window. The window function is called for each
* evaluation of the window for each key individually. The output of the window function is
* interpreted as a regular non-windowed stream.
*
* <p>Note that this function requires that all data in the windows is buffered ... | 3.26 |
flink_TumblingProcessingTimeWindows_of_rdh | /**
* Creates a new {@code TumblingProcessingTimeWindows} {@link WindowAssigner} that assigns
* elements to time windows based on the element timestamp, offset and a staggering offset,
* depending on the staggering policy.
*
* @param size
* The size of the generated windows.
* @param offset
* The offset whi... | 3.26 |
flink_QuickSort_sort_rdh | /**
* Sort the given range of items using quick sort. {@inheritDoc } If the recursion depth falls
* below {@link #getMaxDepth}, then switch to {@link HeapSort}.
*/
public void sort(final IndexedSortable s, int p, int r)
{
int recordsPerSegment
= s.recordsPerSegment();
int recordSize = s.recordSize();
... | 3.26 |
flink_QuickSort_sortInternal_rdh | /**
* Sort the given range of items using quick sort. If the recursion depth falls below {@link #getMaxDepth}, then switch to {@link HeapSort}.
*
* @param s
* paged sortable
* @param recordsPerSegment
* number of records per memory segment
* @param recordSize
* number o... | 3.26 |
flink_QuickSort_m1_rdh | /**
* Deepest recursion before giving up and doing a heapsort. Returns 2 * ceil(log(n)).
*/
protected static int m1(int x) {
if (x <= 0) {
throw new IllegalArgumentException("Undefined for " + x);
}
return (32 - Integer.numberOfLeadingZeros(x - 1)) << 2;
} | 3.26 |
flink_QuickSort_m0_rdh | /**
* Fix the records into sorted order, swapping when the first record is greater than the second
* record.
*
* @param s
* paged sortable
* @param pN
* page number of first record
* @param pO
* page offset of first record
* @param rN
* page number of second record
* @param rO
* page offset of se... | 3.26 |
flink_HsSubpartitionConsumer_getSubpartitionBacklog_rdh | // -------------------------------
// Internal Methods
// -------------------------------
@SuppressWarnings("FieldAccessNotGuarded")
private int getSubpartitionBacklog() {
if ((memoryDataView == null) || (diskDataView == null)) {
return 0;
}
return Math.max(memoryDataView.getBacklog(), diskDataVie... | 3.26 |
flink_HsSubpartitionConsumer_setDiskDataView_rdh | /**
* Set {@link HsDataView} for this subpartition, this method only called when {@link HsSubpartitionFileReader} is creating.
*/
void setDiskDataView(HsDataView diskDataView) {
synchronized(lock) {
checkState(this.diskDataView == null, "repeatedly set disk data view is not allowed.");
this.diskD... | 3.26 |
flink_HsSubpartitionConsumer_setMemoryDataView_rdh | /**
* Set {@link HsDataView} for this subpartition, this method only called when {@link HsSubpartitionFileReader} is creating.
*/
void setMemoryDataView(HsDataView memoryDataView) {
synchronized(lock) {
checkState(this.memoryDataView == null, "repeatedly set memory data view is not allowed.");
thi... | 3.26 |
flink_BackgroundTask_finishedBackgroundTask_rdh | /**
* Creates a finished background task which can be used as the start of a background task chain.
*
* @param <V>
* type of the background task
* @return A finished background task
*/
static <V> BackgroundTask<V>
finishedBackgroundTask() {
return new BackgroundTask<>();
} | 3.26 |
flink_BackgroundTask_initialBackgroundTask_rdh | /**
* Creates an initial background task. This means that this background task has no predecessor.
*
* @param task
* task to run
* @param executor
* executor to run the task
* @param <V>
* type of the result
* @return initial {@link BackgroundTask} representing the task to execute
*/
static <V> Backgrou... | 3.26 |
flink_BackgroundTask_m1_rdh | /**
* Runs the given task after this background task has completed (normally or exceptionally).
*
* @param task
* task to run after this background task has completed
* @param executor
* executor to run the task
* @param <V>
* type of the result
* @return new {@link BackgroundTask} representing the new t... | 3.26 |
flink_BackgroundTask_abort_rdh | /**
* Abort the execution of this background task. This method has only an effect if the background
* task has not been started yet.
*/
void abort() {
isAborted = true;
} | 3.26 |
flink_JobStatusPollingUtils_getJobResult_rdh | /**
* Polls the {@link JobStatus} of a job periodically and when the job has reached a terminal
* state, it requests its {@link JobResult}.
*
* @param dispatcherGateway
* the {@link DispatcherGateway} to be used for requesting the details
* of the job.
* @param jobId
* the id of the job
* @param schedule... | 3.26 |
flink_DeclarationRewriter_extractLocalVariable_rdh | /**
*
* @return new name.
*/
private String extractLocalVariable(JavaParser.VariableDeclaratorIdContext decId, JavaParser.TypeTypeContext typeType, boolean forceNewName) {
String name = decId.getText();
if (forceN... | 3.26 |
flink_GenericInMemoryCatalogStoreFactory_createCatalogStore_rdh | /**
* Catalog store factory for {@link GenericInMemoryCatalogStore}.
*/
@Internal public class GenericInMemoryCatalogStoreFactory implements CatalogStoreFactory {
@Override
public CatalogStore createCatalogStore() {
return new GenericInMemoryCatalogStore();
} | 3.26 |
flink_CommonTestUtils_containsCause_rdh | /**
* Checks whether the given throwable contains the given cause as a cause. The cause is not
* checked on equality but on type equality.
*
* @param throwable
* Throwable to check for the cause
* @param cause
* Cause to look for
* @return True if the given Throwable contains the given cause (type equality)... | 3.26 |
flink_CommonTestUtils_createTempFile_rdh | /**
* Creates a temporary file that contains the given string. The file is written with the
* platform's default encoding.
*
* <p>The temp file is automatically deleted on JVM exit.
*
* @param contents
* The contents to be written to the file.
* @return The temp file URI.
*/
public static String createTemp... | 3.26 |
flink_CommonTestUtils_setEnv_rdh | // ------------------------------------------------------------------------
// Manipulation of environment
// ------------------------------------------------------------------------
public static void setEnv(Map<String, String> newenv) {m0(newenv, true);
} | 3.26 |
flink_CommonTestUtils_assertThrows_rdh | /**
* Checks whether an exception with a message occurs when running a piece of code.
*/
public static void assertThrows(String msg, Class<? extends Exception> expected, Callable<?> code) {
try {
Object result = code.call();
Assert.fail("Previous method call should have failed but ... | 3.26 |
flink_CommonTestUtils_waitUtil_rdh | /**
* Wait util the given condition is met or timeout.
*
* @param condition
* the condition to wait for.
* @param timeout
* the maximum time to wait for the condition to become true.
* @param errorMsg
* the error message to include in the <code>TimeoutException</code> if the
* condition was not met bef... | 3.26 |
flink_CommonTestUtils_blockForeverNonInterruptibly_rdh | /**
* Permanently blocks the current thread. The thread cannot be woken up via {@link Thread#interrupt()}.
*/
public static void blockForeverNonInterruptibly() {
final Object lock = new Object();
// noinspection InfiniteLoopStatement
while (true) {
try {
// noinspection Synchronizati... | 3.26 |
flink_CommonTestUtils_createCopySerializable_rdh | /**
* Creates a copy of an object via Java Serialization.
*
* @param original
* The original object.
* @return The copied object.
*/
public static <T extends Serializable> T createCopySerializable(T original) throws IOException {
if (original == null) {
throw new IllegalArgumentException();
}
... | 3.26 |
flink_CommonTestUtils_m0_rdh | // This code is taken slightly modified from: http://stackoverflow.com/a/7201825/568695
// it changes the environment variables of this JVM. Use only for testing purposes!
@SuppressWarnings("unchecked")
public static void m0(Map<String, String> newenv, boolean clearExisting) {
try {
Map<String, String> env ... | 3.26 |
flink_TableFactoryUtil_findAndCreateTableSource_rdh | /**
* Creates a {@link TableSource} from a {@link CatalogTable}.
*
* <p>It considers {@link Catalog#getFactory()} if provided.
*/
@SuppressWarnings("unchecked")
public static <T> TableSource<T> findAndCreateTableSource(@Nullable
Catalog catalog, ObjectIdentifier objectIdentifier, CatalogTable catalogTable, Readabl... | 3.26 |
flink_TableFactoryUtil_buildCatalogStoreFactoryContext_rdh | /**
* Build a {@link CatalogStoreFactory.Context} for opening the {@link CatalogStoreFactory}.
*
* <p>The configuration format should be as follows:
*
* <pre>{@code table.catalog-store.kind: {identifier}
* table.catalog-store.{identifier}.{param1}: xxx
* table.catalog-store.{identifier}.{param2}: xxx}</pre>
*/
... | 3.26 |
flink_TableFactoryUtil_findAndCreateCatalogStoreFactory_rdh | /**
* Finds and creates a {@link CatalogStoreFactory} using the provided {@link Configuration} and
* user classloader.
*
* <p>The configuration format should be as follows:
*
* <pre>{@code table.catalog-store.kind: {identifier}
* table.catalog-store.{identifier}.{param1}: xxx
* table.catalog-store.{identifier}.... | 3.26 |
flink_TableFactoryUtil_m0_rdh | /**
* Creates a table sink for a {@link CatalogTable} using table factory associated with the
* catalog.
*/public static Optional<TableSink> m0(Catalog catalog, TableSinkFactory.Context context) {
TableFactory tableFactory = catalog.getTableFactory().orElse(null);
if (tableFactory instanceof TableSinkFactory) {
ret... | 3.26 |
flink_TableFactoryUtil_findCatalogModificationListenerList_rdh | /**
* Find and create modification listener list from configuration.
*/public static List<CatalogModificationListener> findCatalogModificationListenerList(final ReadableConfig configuration, final ClassLoader classLoader) {
return configuration.getOptional(TableConfigOptions.TABLE_CATALOG_MODIFICATION_LISTENERS).orEl... | 3.26 |
flink_TableFactoryUtil_isLegacyConnectorOptions_rdh | /**
* Checks whether the {@link CatalogTable} uses legacy connector sink options.
*/
public static boolean isLegacyConnectorOptions(@Nullable
Catalog catalog, ReadableConfig configuration, boolean isStreamingMode, ObjectIdentifier objectIdentifier, CatalogTable catalogTable, boolean isTemporary) {
// normalize opti... | 3.26 |
flink_TableFactoryUtil_findAndCreateTableSink_rdh | /**
* Creates a {@link TableSink} from a {@link CatalogTable}.
*
* <p>It considers {@link Catalog#getFactory()} if provided.
*/
@SuppressWarnings("unchecked")
public static <T> TableSink<T> findAndCreateTableSink(@Nullable
Catalog catalog, ObjectIdentifier objectIdentifier, CatalogTable catalogTable, ReadableConfig... | 3.26 |
flink_AvroFactory_extractAvroSpecificSchema_rdh | /**
* Extracts an Avro {@link Schema} from a {@link SpecificRecord}. We do this either via {@link SpecificData} or by instantiating a record and extracting the schema from the instance.
*/
public static <T> Schema extractAvroSpecificSchema(Class<T> type, SpecificData specificData) {
Optional<Schema> newSchemaOpti... | 3.26 |
flink_AvroFactory_m0_rdh | /**
* Extracts an Avro {@link Schema} from a {@link SpecificRecord}. We do this by creating an
* instance of the class using the zero-argument constructor and calling {@link SpecificRecord#getSchema()} on it.
*/
private static Optional<Schema> m0(Class<?> type) {
try {
SpecificRecord instance = ((Speci... | 3.26 |
flink_AvroFactory_create_rdh | /**
* Creates Avro Writer and Reader for a specific type.
*
* <p>Given an input type, and possible the current schema, and a previously known schema (also
* known as writer schema) create will deduce the best way to initialize a reader and writer
* according to the following rules:
*
... | 3.26 |
flink_AvroFactory_getSpecificDataForClass_rdh | /**
* Creates a {@link SpecificData} object for a given class. Possibly uses the specific data from
* the generated class with logical conversions applied (avro >= 1.9.x).
*
* <p>Copied over from {@code SpecificData#getForClass(Class<T> c)} we do not use the method
* directly, because we want to be API backwards c... | 3.26 |
flink_SelectByMinFunction_reduce_rdh | /**
* Reduce implementation, returns smaller tuple or value1 if both tuples are equal. Comparison
* highly depends on the order and amount of fields chosen as indices. All given fields (at
* construction time) are checked in the same order as defined (at construction time). If both
* tuples are equal in one index, ... | 3.26 |
flink_LookupFunctionProvider_of_rdh | /**
* Helper function for creating a static provider.
*/
static LookupFunctionProvider of(LookupFunction lookupFunction) {
return () -> lookupFunction;
} | 3.26 |
flink_ReadOnlySlicedNetworkBuffer_getMemorySegment_rdh | /**
* Returns the underlying memory segment.
*
* <p><strong>BEWARE:</strong> Although we cannot set the memory segment read-only it should be
* handled as if it was!.
*
* @return the memory segment backing this buffer
*/
@Override public
MemorySegment getMemorySegment() {
return getBuffer().getMemorySegment... | 3.26 |
flink_ArchivedExecution_getAttemptId_rdh | // --------------------------------------------------------------------------------------------
// Accessors
// --------------------------------------------------------------------------------------------
@Override
public ExecutionAttemptID getAttemptId() {
return attemptId;
} | 3.26 |
flink_StopWithSavepointTerminationHandlerImpl_terminateSuccessfully_rdh | /**
* Handles the successful termination of the {@code StopWithSavepointTerminationHandler}.
*
* @param completedSavepoint
* the completed savepoint
*/
private void terminateSuccessfully(CompletedCheckpoint completedSavepoint) {
result.complete(completedSavepoint.getExternalPointer());
} | 3.26 |
flink_StopWithSavepointTerminationHandlerImpl_terminateExceptionally_rdh | /**
* Handles the termination of the {@code StopWithSavepointTerminationHandler} exceptionally
* without triggering a global job fail-over but restarting the checkpointing. It does restart
* the checkpoint scheduling.
*
* @param throwable
* the error that caused the exceptional termination.
*/
private void ter... | 3.26 |
flink_StopWithSavepointTerminationHandlerImpl_terminateExceptionallyWithGlobalFailover_rdh | /**
* Handles the termination of the {@code StopWithSavepointTerminationHandler} exceptionally
* after triggering a global job fail-over.
*
* @param unfinishedExecutionStates
* the unfinished states that caused the failure.
* @param savepointPath
* the path to the successfully created savepoint.
*/
private ... | 3.26 |
flink_DeclarativeSlotManager_checkInit_rdh | // ---------------------------------------------------------------------------------------------
// Internal utility methods
// ---------------------------------------------------------------------------------------------
private void check... | 3.26 |
flink_DeclarativeSlotManager_start_rdh | // ---------------------------------------------------------------------------------------------
// Component lifecycle methods
// ---------------------------------------------------------------------------------------------
/**
* Starts the slot manager with the given leader id and resource manager actions.
*
* @pa... | 3.26 |
flink_DeclarativeSlotManager_checkResourceRequirementsWithDelay_rdh | // ---------------------------------------------------------------------------------------------
// Requirement matching
// ---------------------------------------------------------------------------------------------
/**
* Depending on the implementation of {@link ResourceAllocationStrategy}, checking resource
* req... | 3.26 |
flink_DeclarativeSlotManager_reportSlotStatus_rdh | /**
* Reports the current slot allocations for a task manager identified by the given instance id.
*
* @param instanceId
* identifying the task manager for which to report the slot status
* @param slotReport
* containing the status for all of its slots
* @return true if the slot status has been updated succe... | 3.26 |
flink_DeclarativeSlotManager_close_rdh | /**
* Closes the slot manager.
*
* @throws Exception
* if the close operation fails
*/
@Override
public void close() throws Exception {
LOG.info("Closing the slot manager.");
suspend();
} | 3.26 |
flink_DeclarativeSlotManager_freeSlot_rdh | /**
* Free the given slot from the given allocation. If the slot is still allocated by the given
* allocation id, then the slot will be marked as free and will be subject to new slot requests.
*
* @param slotId
* identifying the slot to free... | 3.26 |
flink_DeclarativeSlotManager_clearResourceRequirements_rdh | // ---------------------------------------------------------------------------------------------
// Public API
// ---------------------------------------------------------------------------------------------
@Override
public void clearResourceRequirements(JobID jobId) {
checkInit();
maybeReclaimInactiveSlots(jo... | 3.26 |
flink_DeclarativeSlotManager_getNumberRegisteredSlots_rdh | // ---------------------------------------------------------------------------------------------
// Legacy APIs
// ---------------------------------------------------------------------------------------------
@Override
public int getNumberRegisteredSlots() {
return taskExecutorManager.getNumberRegisteredSlots()... | 3.26 |
flink_DeclarativeSlotManager_checkResourceRequirements_rdh | /**
* Matches resource requirements against available resources. In a first round requirements are
* matched against free slot, and any match results in a slot allocation. The remaining
* unfulfilled requirements are matched against pending slots, allocating more workers if no
* matching pending slot could be found... | 3.26 |
flink_DeclarativeSlotManager_suspend_rdh | /**
* Suspends the component. This clears the internal state of the slot manager.
*/
@Override
public void suspend() {
if (!started) {return;
}
LOG.info("Suspending the slot manager.");
slotManagerMetricGroup.close();
resourceTracker.clear();
if (taskExecutorManager != null) {
taskExec... | 3.26 |
flink_DeclarativeSlotManager_internalTryAllocateSlots_rdh | /**
* Tries to allocate slots for the given requirement. If there are not enough slots available,
* the resource manager is informed to allocate more resources.
*
* @param jobId
* job to allocate slots for
* @param targetAddress
* address of the jobmaster
* @param resourceRequirement
* required slots
* ... | 3.26 |
flink_DeclarativeSlotManager_allocateSlot_rdh | /**
* Allocates the given slot. This entails sending a registration message to the task manager and
* treating failures.
*
* @param taskManagerSlot
* slot to allocate
* @param jobId
* job for which the slot should be allocated for
* @param targetAddress
* address of the job master
* @param resourceProfi... | 3.26 |
flink_FrontMetricGroup_getLogicalScope_rdh | /**
*
* @deprecated work against the LogicalScopeProvider interface instead.
*/
@Override
@Deprecated
public String getLogicalScope(CharacterFilter filter, char delimiter) {
return parentMetricGroup.getLogicalScope(getDelimiterFilter(this.settings, filter), delimiter, this.settings.getReporterIndex());
} | 3.26 |
flink_SchemaTestUtils_open_rdh | /**
* Opens the given schema with a mock initialization context.
*
* @param schema
* to open
* @throws RuntimeException
* if the schema throws an exception
*/
public static void open(DeserializationSchema<?> schema) {
try {
schema.open(new DummyInitia... | 3.26 |
flink_TableSinkFactory_createTableSink_rdh | /**
* Creates and configures a {@link TableSink} based on the given {@link Context}.
*
* @param context
* context of this table sink.
* @return the configured table sink.
*/
default TableSink<T> createTableSink(Context context) {return createTableSink(context.getObjectIdentifier().toObjectPath(), context.getTab... | 3.26 |
flink_DataStreamSink_name_rdh | /**
* Sets the name of this sink. This name is used by the visualization and logging during
* runtime.
*
* @return The named sink.
*/
public DataStreamSink<T>
name(String name) {
transformation.setName(name);
return
this;
} | 3.26 |
flink_DataStreamSink_disableChaining_rdh | /**
* Turns off chaining for this operator so thread co-location will not be used as an
* optimization.
*
* <p>Chaining can be turned off for the whole job by {@link org.apache.flink.streaming.api.environment.StreamExecutionEnvironment#disableOperatorChaining()}
* however it is not advised for performance consider... | 3.26 |
flink_DataStreamSink_setDescription_rdh | /**
* Sets the description for this sink.
*
* <p>Description is used in json plan and web ui, but not in logging and metrics where only
* name is available. Description is expected to provide detailed information about the sink,
* while name is expected to be more simple, providing summary information only, so tha... | 3.26 |
flink_DataStreamSink_setParallelism_rdh | /**
* Sets the parallelism for this sink. The degree must be higher than zero.
*
* @param parallelism
* The parallelism for this sink.
* @return The sink with set parallelism.
*/
public DataStreamSink<T> setParallelism(int parallelism) {
transformation.setParallelism(parallelism);
return this;
} | 3.26 |
flink_DataStreamSink_uid_rdh | /**
* Sets an ID for this operator.
*
* <p>The specified ID is used to assign the same operator ID across job submissions (for
* example when starting a job from a savepoint).
*
* <p><strong>Important</strong>: this ID needs to be unique per transformation and job.
* Otherwise, job submission will fail.
*
* @p... | 3.26 |
flink_DataStreamSink_setUidHash_rdh | /**
* Sets an user provided hash for this operator. This will be used AS IS the create the
* JobVertexID.
*
* <p>The user provided hash is an alternative to the generated hashes, that is considered when
* identifying an operator through the default hash mechanics fails (e.g. because of changes
* between Flink ver... | 3.26 |
flink_DataStreamSink_setMaxParallelism_rdh | /**
* Sets the max parallelism for this sink.
*
* <p>The maximum parallelism specifies the upper bound for dynamic scaling. The degree must be
* higher than zero and less than the upper bound.
*
* @param maxParallelism
* The max parallelism for this sink.
* @return The sink with set parallelism.
*/
public Da... | 3.26 |
flink_DataStreamSink_setResources_rdh | /**
* Sets the resources for this sink, the minimum and preferred resources are the same by
* default.
*
* @param resources
* The resources for this sink.
* @return The sink with set minimum and preferred resources.
*/
private DataStreamSink<T> setResources(ResourceSpec resources) {
transformation.setResou... | 3.26 |
flink_DataStreamSink_m1_rdh | /**
* Returns the transformation that contains the actual sink operator of this sink.
*/
@Internal
public Transformation<T> m1() {
return transformation;
} | 3.26 |
flink_DataStreamSink_slotSharingGroup_rdh | /**
* Sets the slot sharing group of this operation. Parallel instances of operations that are in
* the same slot sharing group will be co-located in the same TaskManager slot, if possible.
*
* <p>Operations inherit the slot sharing group of input operations if all input operations are
* in the same slot sharing g... | 3.26 |
flink_VertexFlameGraph_waiting_rdh | // Indicates that it is waiting for the first samples to creating the flame graph
public static VertexFlameGraph waiting() {
return new VertexFlameGraph(-3, null);} | 3.26 |
flink_PackagingTestUtils_assertJarContainsServiceEntry_rdh | /**
* Verifies that the given jar contains a service entry file for the given service.
*
* <p>Caution: This only checks that the file exists; the content is not verified.
*/
public static void assertJarContainsServiceEntry(Path jarPath, Class<?> service) throws Exception {
final URI jar = jarPath.toUri();
t... | 3.26 |
flink_PackagingTestUtils_assertJarContainsOnlyFilesMatching_rdh | /**
* Verifies that all files in the jar match one of the provided allow strings.
*
* <p>An allow item ending on a {@code "/"} is treated as an allowed parent directory.
* Otherwise, it is treated as an allowed file.
*
* <p>For example, given a jar containing a file {@code META-INF/NOT... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.