name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_GenericInputFormat_open_rdh | // --------------------------------------------------------------------------------------------
@Overridepublic void open(GenericInputSplit split) throws IOException {
this.partitionNumber = split.getSplitNumber();
} | 3.26 |
flink_ActiveResourceManager_m0_rdh | /**
* Allocates a resource using the worker resource specification.
*
* @param workerResourceSpec
* workerResourceSpec specifies the size of the to be allocated
* resource
*/
@VisibleForTesting
public void m0(WorkerResourceSpec workerResourceSpec) {
final TaskExecutorProcessSpec taskExecutorProcessSpec = ... | 3.26 |
flink_ActiveResourceManager_onPreviousAttemptWorkersRecovered_rdh | // ------------------------------------------------------------------------
// ResourceEventListener
// ------------------------------------------------------------------------
@Override
public void onPreviousAttemptWorkersRecovered(Collection<WorkerType> recoveredWorkers) {
getMainThreadExecutor().assertRunningInM... | 3.26 |
flink_ActiveResourceManager_m3_rdh | // ------------------------------------------------------------------------
// Testing
// ------------------------------------------------------------------------
@VisibleForTesting
<T> CompletableFuture<T> m3(Callable<T> callable, Time timeout) {
return callAsync(callable,
TimeUtils.toDuration(timeout));
} | 3.26 |
flink_ActiveResourceManager_recordStartWorkerFailure_rdh | /**
* Record failure number of starting worker in ResourceManagers. Return whether maximum failure
* rate is reached.
*
* @return whether max failure rate is reached
*/private boolean recordStartWorkerFailure() {
f0.markEvent();
try {
f0.checkAgainstThreshold();
} catch (ThresholdMeter.ThresholdExceedException e) ... | 3.26 |
flink_ActiveResourceManager_initialize_rdh | // ------------------------------------------------------------------------
// ResourceManager
// ------------------------------------------------------------------------
@Override
protected void initialize() throws ResourceManagerException {
try {
resourceManagerDriver.initialize(this, new GatewayMainThrea... | 3.26 |
flink_ActiveResourceManager_checkResourceDeclarations_rdh | // ------------------------------------------------------------------------
// Internal
// ------------------------------------------------------------------------
private void checkResourceDeclarations() {
validateRunsInMainThread();
for (ResourceDeclaration resourceDeclaration : resourceDeclarations) {
... | 3.26 |
flink_BigIntParser_parseField_rdh | /**
* Static utility to parse a field of type BigInteger from a byte sequence that represents text
* characters (such as when read from a file stream).
*
* @param bytes
* The bytes containing the text data that should be parsed.
* @param startPos
* The offset to start the parsing.
* @param length
* The l... | 3.26 |
flink_StringValueUtils_m0_rdh | /**
* Gets the next token from the string. If another token is available, the token is stored
* in the given target StringValue object.
*
* @param target
* The StringValue object to store the next token in.
* @return True, if there was another token, false if not.
*/
public ... | 3.26 |
flink_StringValueUtils_setStringToTokenize_rdh | /**
* Sets the string to be tokenized and resets the state of the tokenizer.
*
* @param string
* The string value to be tokenized.
*/
public void setStringToTokenize(StringValue string) {
this.toTokenize = string;
this.pos = 0;
this.limit = string.length();
} | 3.26 |
flink_StringValueUtils_replaceNonWordChars_rdh | /**
* Replaces all non-word characters in a string by a given character. The only characters not
* replaced are the characters that qualify as word characters or digit characters with respect
* to {@link Character#isLetter(char)} or {@link Character#isDigit(char)}, as well as the
* underscore ch... | 3.26 |
flink_StringValueUtils_toLowerCase_rdh | /**
* Converts the given <code>StringValue</code> into a lower case variant.
*
* @param string
* The string to convert to lower case.
*/
public static void toLowerCase(StringValue string) {
final char[] v0 = string.getCharArray();
final int len = string.length();
for (int i = 0; i < len; i++) {
... | 3.26 |
flink_RestartBackoffTimeStrategyFactoryLoader_createRestartBackoffTimeStrategyFactory_rdh | /**
* Creates {@link RestartBackoffTimeStrategy.Factory} from the given configuration.
*
* <p>The strategy factory is decided in order as follows:
*
* <ol>
* <li>Strategy set within job graph, i.e. {@link RestartStrategies.RestartStrategyConfiguration}, unless the config is {@link RestartStrategies.FallbackRest... | 3.26 |
flink_UnmodifiableConfiguration_m0_rdh | // --------------------------------------------------------------------------------------------
// All mutating methods must fail
// --------------------------------------------------------------------------------------------
@Override
public void m0(Properties props) {
// override to make the UnmodifiableConfigura... | 3.26 |
flink_KeyedOperatorTransformation_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_KeyedOperatorTransformation_window_rdh | /**
* Windows this transformation into a {@code WindowedOperatorTransformation}, which bootstraps
* state that can be restored by a {@code WindowOperator}. Elements are put into windows by a
* {@link WindowAssigner}. The grouping of elements is done both by key and by window.
*
* <p>A {@link org.apache.flink.strea... | 3.26 |
flink_ContinuousProcessingTimeTrigger_m0_rdh | /**
* Creates a trigger that continuously fires based on the given interval.
*
* @param interval
* The time interval at which to fire.
* @param <W>
* The type of {@link Window Windows} on which this trigger can operate.
*/public static <W extends Window> ContinuousProcessingTimeTrigger<W> m0(Time interval) ... | 3.26 |
flink_AbstractOneInputTransformationTranslator_translateInternal_rdh | /**
* A utility base class for one input {@link Transformation transformations} that provides a
* function for configuring common graph properties.
*/
abstract class AbstractOneInputTransformationTranslator<IN, OUT, OP extends Transformation<OUT>> extends SimpleTransformationTranslator<OUT, OP> {protected Collection... | 3.26 |
flink_OverWindowPartitioned_orderBy_rdh | /**
* Specifies the time attribute on which rows are ordered.
*
* <p>For streaming tables, reference a rowtime or proctime time attribute here to specify the
* time mode.
*
* <p>For batch tables, refer to a timestamp or long attribute.
*
* @param orderBy
* field reference
* @return an over window with defin... | 3.26 |
flink_LocalDateComparator_compareSerializedLocalDate_rdh | // Static Helpers for Date Comparison
// --------------------------------------------------------------------------------------------
public static int compareSerializedLocalDate(DataInputView
firstSource, DataInputView secondSource, boolean ascendingComparison) throws IOException {
int cmp = firstSource.readInt()... | 3.26 |
flink_FunctionLookup_lookupBuiltInFunction_rdh | /**
* Helper method for looking up a built-in function.
*/
default ContextResolvedFunction lookupBuiltInFunction(BuiltInFunctionDefinition definition) {return lookupFunction(UnresolvedIdentifier.of(definition.getName())).orElseThrow(() -> new TableException(String.format("Required built-in function [%s] could not be... | 3.26 |
flink_GettingStartedExample_eval_rdh | // the 'eval()' method defines input and output types (reflectively extracted)
// and contains the runtime logic
public String eval(String street, String zipCode, String city) {
return (((normalize(street) + ", ") +
normalize(zipCode)) + ", ") + normalize(city);
} | 3.26 |
flink_ShortValueComparator_supportsSerializationWithKeyNormalization_rdh | // --------------------------------------------------------------------------------------------
// unsupported normalization
// --------------------------------------------------------------------------------------------
@Override
public boolean
supportsSerializationWithKeyNormalization() {
return false;
} | 3.26 |
flink_JobClient_reportHeartbeat_rdh | /**
* The client reports the heartbeat to the dispatcher for aliveness.
*/
default void reportHeartbeat(long expiredTimestamp) {
} | 3.26 |
flink_JobClient_stopWithSavepoint_rdh | /**
* Stops the associated job on Flink cluster.
*
* <p>Stopping works only for streaming programs. Be aware, that the job might continue to run
* for a while after sending the stop command, because after sources stopped to emit data all
* operators need to finish processing.
*
* ... | 3.26 |
flink_JobClient_triggerSavepoint_rdh | /**
* Triggers a savepoint for the associated job. The savepoint will be written to the given
* savepoint directory, or {@link org.apache.flink.configuration.CheckpointingOptions#SAVEPOINT_DIRECTORY} if it is null.
*
* @param savepointDirectory
* directory the savepoint should be written to
* @return a {@link C... | 3.26 |
flink_JobGraphJobInformation_copyJobGraph_rdh | /**
* Returns a copy of a jobGraph that can be mutated.
*/
public JobGraph copyJobGraph() {
return
InstantiationUtil.cloneUnchecked(jobGraph);
} | 3.26 |
flink_PojoTestUtils_assertSerializedAsPojoWithoutKryo_rdh | /**
* Verifies that instances of the given class fulfill all conditions to be serialized with the
* {@link PojoSerializer}, as documented <a
* href="https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/datastream/fault-tolerance/serialization/types_serialization/#pojos">here</a>,
* without any field being ... | 3.26 |
flink_PojoTestUtils_assertSerializedAsPojo_rdh | /**
* Verifies that instances of the given class fulfill all conditions to be serialized with the
* {@link PojoSerializer}, as documented <a
* href="https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/datastream/fault-tolerance/serialization/types_serialization/#pojos">here</a>.
*
* <p>Note that this che... | 3.26 |
flink_BinaryRowDataSerializer_getSerializedRowFixedPartLength_rdh | /**
* Return fixed part length to serialize one row.
*/
public int getSerializedRowFixedPartLength() {
return getFixedLengthPartSize() + LENGTH_SIZE_IN_BYTES;
} | 3.26 |
flink_BinaryRowDataSerializer_copyFromPagesToView_rdh | /**
* Copy a binaryRow which stored in paged input view to output view.
*
* @param source
* source paged input view where the binary row stored
* @param target
* the target output view.
*/
public void copyFromPagesToView(AbstractPagedInputView source, DataOutputView target) throws IOException
{
checkSkip... | 3.26 |
flink_BinaryRowDataSerializer_serializeToPages_rdh | // ============================ Page related operations ===================================
@Override
public int serializeToPages(BinaryRowData record, AbstractPagedOutputView
headerLessView) throws IOException {
checkArgument(headerLessView.getHeaderLength() == 0);
int skip = checkSkipWriteForFixLengthPart(hea... | 3.26 |
flink_BinaryRowDataSerializer_checkSkipWriteForFixLengthPart_rdh | /**
* We need skip bytes to write when the remain bytes of current segment is not enough to write
* binary row fixed part. See {@link BinaryRowData}.
*/
private int checkSkipWriteForFixLengthPart(AbstractPagedOutputView out) throws IOException {
// skip if there is no enough size.
int v22 = out.getSegmentSiz... | 3.26 |
flink_BinaryRowDataSerializer_pointTo_rdh | /**
* Point row to memory segments with offset(in the AbstractPagedInputView) and length.
*
* @param length
* row length.
* @param reuse
* reuse BinaryRowData object.
* @param headerLessView
* source memory segments container.
*/
public void pointTo(int length, BinaryRowData reuse, AbstractPagedInputVi... | 3.26 |
flink_BinaryRowDataSerializer_checkSkipReadForFixLengthPart_rdh | /**
* We need skip bytes to read when the remain bytes of current segment is not enough to write
* binary row fixed part. See {@link BinaryRowData}.
*/
public void checkSkipReadForFixLengthPart(AbstractPagedInputView source) throws IOException {
// skip if there is no enough size.
// Note: Use currentSegm... | 3.26 |
flink_CopyOnWriteStateTable_stateSnapshot_rdh | // Snapshotting
// ----------------------------------------------------------------------------------------------------
/**
* Creates a snapshot of this {@link CopyOnWriteStateTable}, to be written in checkpointing.
*
* @return a snapshot from this {@link CopyOnWriteStateTable}, for checkpointing.
*/
@Nonnull
@Over... | 3.26 |
flink_PythonConfig_getLocalTimeZone_rdh | /**
* Returns the current session time zone id. It is used when converting to/from {@code TIMESTAMP
* WITH LOCAL TIME ZONE}.
*
* @see org.apache.flink.table.types.logical.LocalZonedTimestampType
*/
private static ZoneId getLocalTimeZone(ReadableConfig config) {String v3 = config.get(TableConfigOptions.LOCAL_TIME... | 3.26 |
flink_GeneratorFunction_close_rdh | /**
* Tear-down method for the function.
*/
default void close()
throws Exception {
} | 3.26 |
flink_BulkDecodingFormat_applyFilters_rdh | /**
* Provides a list of filters in conjunctive form for filtering on a best-effort basis.
*/
default void applyFilters(List<ResolvedExpression> filters) {
} | 3.26 |
flink_ConfigurationParserUtils_loadCommonConfiguration_rdh | /**
* Generate configuration from only the config file and dynamic properties.
*
* @param args
* the commandline arguments
* @param cmdLineSyntax
* the syntax for this application
* @return generated configuration
* @throws FlinkParseException
* if the configuration cannot be generated
*/
public static ... | 3.26 |
flink_ConfigurationParserUtils_getPageSize_rdh | /**
* Parses the configuration to get the page size and validates the value.
*
* @param configuration
* configuration object
* @return size of memory segment
*/
public static int getPageSize(Configuration configuration) {
final int pageSize = checkedDownCast(configuration.get(TaskManagerOptions.MEMORY_SEGME... | 3.26 |
flink_ConfigurationParserUtils_checkConfigParameter_rdh | /**
* Validates a condition for a config parameter and displays a standard exception, if the
* condition does not hold.
*
* @param condition
* The condition that must hold. If the condition is false, an exception is
* thrown.
* @param parameter
* The parameter value. Will be shown in the exception message... | 3.26 |
flink_FileSystemCheckpointStorage_getMinFileSizeThreshold_rdh | /**
* Gets the threshold below which state is stored as part of the metadata, rather than in files.
* This threshold ensures that the backend does not create a large amount of very small files,
* where potentially the file pointers are larger than the state itself.
*
* <p>If not explicitly configured, this is the ... | 3.26 |
flink_FileSystemCheckpointStorage_getSavepointPath_rdh | /**
*
* @return The default location where savepoints will be externalized if set.
*/
@Nullablepublic Path getSavepointPath() {
return location.getBaseSavepointPath();
} | 3.26 |
flink_FileSystemCheckpointStorage_getCheckpointPath_rdh | /**
* Gets the base directory where all the checkpoints are stored. The job-specific checkpoint
* directory is created inside this directory.
*
* @return The base directory for checkpoints.
*/
@Nonnull
public Path getCheckpointPath() {
// we know that this can never be null by the way of constructor checks
... | 3.26 |
flink_FileSystemCheckpointStorage_m0_rdh | /**
* Gets the write buffer size for created checkpoint stream.
*
* <p>If not explicitly configured, this is the default value of {@link CheckpointingOptions#FS_WRITE_BUFFER_SIZE}.
*
* @return The write buffer size, in bytes.
*/
public int m0() {
return writeBufferSize >= 0 ? writeBufferSize : CheckpointingOp... | 3.26 |
flink_FileSystemCheckpointStorage_createFromConfig_rdh | /**
* Creates a new {@link FileSystemCheckpointStorage} using the given configuration.
*
* @param config
* The Flink configuration (loaded by the TaskManager).
* @param classLoader
* The class loader that should be used to load the checkpoint storage.
* @return The created checkpoint storage.
* @throws Ille... | 3.26 |
flink_FlinkMetricContainer_updateMetrics_rdh | /**
* Update Flink's internal metrics ({@link #flinkCounterCache}) with the latest metrics for a
* given step.
*/
private void updateMetrics(String stepName) {
MetricResults metricResults = asAttemptedOnlyMetricResults(metricsContainers);
MetricQueryResults metricQueryResults = metricResults.queryMetrics(M... | 3.26 |
flink_BackendRestorerProcedure_createAndRestore_rdh | /**
* Creates a new state backend and restores it from the provided set of state snapshot
* alternatives.
*
* @param restoreOptions
* list of prioritized state snapshot alternatives for recovery.
* @return the created (and restored) state backend.
* @throws Exception
* if... | 3.26 |
flink_AbstractCachedBuildSideJoinDriver_isInputResettable_rdh | // --------------------------------------------------------------------------------------------
@Override
public boolean isInputResettable(int inputNum) {
if ((inputNum < 0) || (inputNum > 1)) {
throw new IndexOutOfBoundsException();
}return inputNum == buildSideIndex;
} | 3.26 |
flink_JsonFormatOptionsUtil_getMapNullKeyMode_rdh | /**
* Creates handling mode for null key map data.
*
* <p>See {@link #JSON_MAP_NULL_KEY_MODE_FAIL}, {@link #JSON_MAP_NULL_KEY_MODE_DROP}, and {@link #JSON_MAP_NULL_KEY_MODE_LITERAL} for more information.
*/
public static MapNullKeyMode getMapNullKeyMode(ReadableConfig config) {
String mapNullKeyMode = config.ge... | 3.26 |
flink_JsonFormatOptionsUtil_getTimestampFormat_rdh | // --------------------------------------------------------------------------------------------
// Utilities
// --------------------------------------------------------------------------------------------
public static TimestampFormat getTimestampFormat(ReadableConfig config) {
String v0 = config.get(TIMESTAMP_FOR... | 3.26 |
flink_JsonFormatOptionsUtil_validateTimestampFormat_rdh | /**
* Validates timestamp format which value should be SQL or ISO-8601.
*/
static void validateTimestampFormat(ReadableConfig tableOptions) {String timestampFormat =
tableOptions.get(TIMESTAMP_FORMAT);if (!TIMESTAMP_FORMAT_ENUM.contains(timestampFormat)) {
throw new ValidationException(String.format("Unsu... | 3.26 |
flink_JsonFormatOptionsUtil_validateDecodingFormatOptions_rdh | // --------------------------------------------------------------------------------------------
// Validation
// --------------------------------------------------------------------------------------------
/**
* Validator for json decoding format.
*/
public static void validateDecodingFormatOptions(ReadableConfig tab... | 3.26 |
flink_JsonFormatOptionsUtil_validateEncodingFormatOptions_rdh | /**
* Validator for json encoding format.
*/
public static void validateEncodingFormatOptions(ReadableConfig tableOptions) {
// validator for {@link MAP_NULL_KEY_MODE}
Set<String>
nullKeyModes = Arrays.stream(JsonFormatOptions.MapNullKeyMode.values()).map(Objects::toString).collect(Collectors.toSet());if... | 3.26 |
flink_NodeId_m0_rdh | // ------------------------------------------------------------------------
@Override
public TypeSerializerSnapshot<NodeId> m0() {
return new NodeIdSerializerSnapshot(this);
} | 3.26 |
flink_NodeId_readObject_rdh | // ------------------------------------------------------------------------
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
if (eventIdSerializer ==
null) {
// the nested serializer will be null if this was read from a savepoint take... | 3.26 |
flink_BoundedOutOfOrdernessWatermarks_onEvent_rdh | // ------------------------------------------------------------------------
@Override
public void onEvent(T event, long eventTimestamp, WatermarkOutput output) {
maxTimestamp = Math.max(maxTimestamp,
eventTimestamp);
} | 3.26 |
flink_ClockService_of_rdh | /**
* Creates a {@link ClockService} from the given {@link InternalTimerService}.
*/
static ClockService of(InternalTimerService<?> timerService) {
return timerService::currentProcessingTime;
} | 3.26 |
flink_ClockService_m0_rdh | /**
* Creates a {@link ClockService} which assigns as current processing time the result of calling
* {@link System#currentTimeMillis()}.
*/
static ClockService m0() {
return System::currentTimeMillis;} | 3.26 |
flink_CheckedThread_sync_rdh | /**
* Waits with timeout until the thread is completed and checks whether any error occurred during
* the execution. In case of timeout an {@link Exception} is thrown.
*
* <p>This method blocks like {@link #join()}, but performs an additional check for exceptions
* thrown from the {@link #go()} method.
*/
public ... | 3.26 |
flink_CheckedThread_run_rdh | // ------------------------------------------------------------------------
/**
* This method is final - thread work should go into the {@link #go()} method instead.
*/
@Override
public final void run() {
try {
go();
} catch (Throwable t) {
error
= t;
}
} | 3.26 |
flink_CheckedThread_trySync_rdh | /**
* Waits with timeout until the thread is completed and checks whether any error occurred during
* the execution.
*
* <p>This method blocks like {@link #join()}, but performs an additional check for exceptions
* thrown from the {@link #go()} method.
*/
public void trySync(long timeout) throws Exception {
... | 3.26 |
flink_TableConnectorUtils_generateRuntimeName_rdh | /**
* Returns the table connector name used for logging and web UI.
*/public static String generateRuntimeName(Class<?> clazz, String[] fields) {
String className = clazz.getSimpleName();
if (null == fields) {
return className + "(*)";
} else {
return ((className + "(") + String.join... | 3.26 |
flink_HadoopBlockLocation_stripHostname_rdh | // ------------------------------------------------------------------------
// utilities
// ------------------------------------------------------------------------
/**
* Looks for a domain suffix in a FQDN and strips it if present.
*
* @param originalHostname
* the original hostname, possibly an FQDN
* @return ... | 3.26 |
flink_Either_setValue_rdh | /**
* Sets the encapsulated value to another value
*
* @param value
* the new value of the encapsulated value
*/
public void setValue(R value) {
this.value = value;
} | 3.26 |
flink_Either_m0_rdh | /**
* Creates a left value of {@link Either}
*/
public static <L, R> Left<L, R> m0(L left) {
return new Left<L, R>(left);
} | 3.26 |
flink_Either_obtainLeft_rdh | /**
* Utility function for {@link EitherSerializer} to support object reuse.
*
* <p>To support object reuse both subclasses of Either contain a reference to an instance of
* the other type. This method provides access to and initializes the cross-reference.
*
* @param input
* container for Left or Right value
... | 3.26 |
flink_Either_Left_rdh | /**
* Create a Left value of Either
*/
public static <L, R> Either<L, R> Left(L value) {
return new Left<L, R>(value);
} | 3.26 |
flink_Either_Right_rdh | /**
* Create a Right value of Either
*/
public static <L, R> Either<L, R> Right(R value) {
return new Right<L, R>(value);
} | 3.26 |
flink_Either_isLeft_rdh | /**
*
* @return true if this is a Left value, false if this is a Right value
*/
public final boolean isLeft() {
return getClass() == Either.Left.class;} | 3.26 |
flink_KeyGroupRangeOffsets_setKeyGroupOffset_rdh | /**
* Sets the offset for the given key-group. The key-group must be contained in the range.
*
* @param keyGroup
* Key-group for which we set the offset. Must be contained in the range.
* @param offset
* Offset for the key-group.
*/
public void setKeyGroupOffset(int keyGroup, long offset) {
offsets[computeK... | 3.26 |
flink_KeyGroupRangeOffsets_getKeyGroupOffset_rdh | /**
* Returns the offset for the given key-group. The key-group must be contained in the range.
*
* @param keyGroup
* Key-group for which we query the offset. Key-group must be contained in the
* range.
* @return The offset for the given key-group which must be contained in the range.
*/
public long getKeyGr... | 3.26 |
flink_TimestampStringUtils_toLocalDateTime_rdh | /**
* Convert a calcite's {@link TimestampString} to a {@link LocalDateTime}.
*/
public static LocalDateTime toLocalDateTime(TimestampString timestampString) {
final String v = timestampString.toString();final int year = Integer.parseInt(v.substring(0, 4));
final int month = Integer.parseInt... | 3.26 |
flink_TimestampStringUtils_fromLocalDateTime_rdh | /**
* Convert a {@link LocalDateTime} to a calcite's {@link TimestampString}.
*/
public static TimestampString fromLocalDateTime(LocalDateTime ldt) {
return new TimestampString(ldt.getYear(), ldt.getMonthValue(), ldt.getDayOfMonth(), ldt.getHour(), ldt.getMinute(), ldt.getSecond()).withNanos(ldt.getNano());
} | 3.26 |
flink_KryoUtils_applyRegistrations_rdh | /**
* Apply a list of {@link KryoRegistration} to a Kryo instance. The list of registrations is
* assumed to already be a final resolution of all possible registration overwrites.
*
* <p>The registrations are applied in the given order and always specify the registration id,
* using the given {@code firstRegistrat... | 3.26 |
flink_KryoUtils_m0_rdh | /**
* Tries to copy the given record from using the provided Kryo instance. If this fails, then the
* record from is copied by serializing it into a byte buffer and deserializing it from there.
*
* @param from
* Element to copy
* @param kryo
* Kryo instance to use
* @param serializer
* TypeSerializer whi... | 3.26 |
flink_NettyShuffleMaster_computeShuffleMemorySizeForTask_rdh | /**
* JM announces network memory requirement from the calculating result of this method. Please
* note that the calculating algorithm depends on both I/O details of a vertex and network
* configuration, e.g. {@link NettyShuffleEnvironmentOptions#NETWORK_BUFFERS_PER_CHANNEL} and
* {@link NettyShuffleEnvironmentOpti... | 3.26 |
flink_StatePathExtractor_getStateFilePathFromStreamStateHandle_rdh | /**
* This method recursively looks for the contained {@link FileStateHandle}s in a given {@link StreamStateHandle}.
*
* @param handle
* the {@code StreamStateHandle} to check for a contained {@code FileStateHandle}
* @return the file path if the given {@code StreamStateHandle} contains a {@code FileStateHandle}... | 3.26 |
flink_SavepointLoader_loadSavepointMetadata_rdh | /**
* Takes the given string (representing a pointer to a checkpoint) and resolves it to a file
* status for the checkpoint's metadata file.
*
* <p>This should only be used when the user code class loader is the current classloader for
* the thread.
*
* @param savepointPath
* The path to an external savepoint... | 3.26 |
flink_InputFormatTableSource_isBounded_rdh | /**
* Always returns true which indicates this is a bounded source.
*/
@Override
public final boolean isBounded() {
return true;
} | 3.26 |
flink_DefaultJobGraphStore_localCleanupAsync_rdh | /**
* Releases the locks on the specified {@link JobGraph}.
*
* <p>Releasing the locks allows that another instance can delete the job from the {@link JobGraphStore}.
*
* @param jobId
* specifying the job to release the locks for
* @param executor
* the executor being used for the asynchronous execution of ... | 3.26 |
flink_DefaultJobGraphStore_verifyIsRunning_rdh | /**
* Verifies that the state is running.
*/
private void verifyIsRunning() {
checkState(running, "Not running. Forgot to call start()?");
} | 3.26 |
flink_WriteSinkFunction_invoke_rdh | /**
* Implementation of the invoke method of the SinkFunction class. Collects the incoming tuples
* in tupleList and appends the list to the end of the target file if updateCondition() is true
* or the current tuple is the endTuple.
*/
@Override
public void invoke(IN tuple) {
tupleList.add(tuple);
i... | 3.26 |
flink_WriteSinkFunction_cleanFile_rdh | /**
* Creates target file if it does not exist, cleans it if it exists.
*
* @param path
* is the path to the location where the tuples are written
*/
protected void cleanFile(String path) {
try {
PrintWriter writer;
writer = new PrintWriter(path);
writer.print("");
writer.clos... | 3.26 |
flink_QueryableStateConfiguration_getProxyPortRange_rdh | // ------------------------------------------------------------------------
/**
* Returns the port range where the queryable state client proxy can listen. See {@link org.apache.flink.configuration.QueryableStateOptions#PROXY_PORT_RANGE
* QueryableStateOptions.PROXY_PORT_RANGE}.
*/
public Iterator<Integer> getProxyP... | 3.26 |
flink_QueryableStateConfiguration_m0_rdh | /**
* Returns the number of query threads for the queryable state client proxy.
*/
public int m0() {
return numPQueryThreads;
} | 3.26 |
flink_QueryableStateConfiguration_fromConfiguration_rdh | /**
* Creates the {@link QueryableStateConfiguration} from the given Configuration.
*/
public static QueryableStateConfiguration fromConfiguration(Configuration config) {
if (!config.getBoolean(QueryableStateOptions.ENABLE_QUERYABLE_STATE_PROXY_SERVER)) {
return null;
}
final Iterator<Integer> pro... | 3.26 |
flink_QueryableStateConfiguration_disabled_rdh | // ------------------------------------------------------------------------
/**
* Gets the configuration describing the queryable state as deactivated.
*/
public static QueryableStateConfiguration disabled() {
final Iterator<Integer> proxyPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.PROXY_PORT_RA... | 3.26 |
flink_QueryableStateConfiguration_getStateServerPortRange_rdh | /**
* Returns the port range where the queryable state server can listen. See {@link org.apache.flink.configuration.QueryableStateOptions#SERVER_PORT_RANGE
* QueryableStateOptions.SERVER_PORT_RANGE}.
*/
public Iterator<Integer> getStateServerPortRange() {
return qserverPortRange;
} | 3.26 |
flink_QueryableStateConfiguration_toString_rdh | // ------------------------------------------------------------------------
@Override
public String toString() {
return (((((((("QueryableStateConfiguration{" + "numProxyServerThreads=") + numProxyThreads) + ", numProxyQueryThreads=") + numPQueryThreads) + ", numStateServerThreads=") + numServerThreads) + ", numSt... | 3.26 |
flink_DeweyNumber_increase_rdh | /**
* Creates a new dewey number from this such that its last digit is increased by the supplied
* number.
*
* @param times
* how many times to increase the Dewey number
* @return A new dewey number derived from this whose last digit is increased by given number
*/
public DeweyNumber increase(int times) {
... | 3.26 |
flink_DeweyNumber_isCompatibleWith_rdh | /**
* Checks whether this dewey number is compatible to the other dewey number.
*
* <p>True iff this contains other as a prefix or iff they differ only in the last digit whereas
* the last digit of this is greater than the last digit of other.
*
* @param other
* The other dewey number to check compatibility ag... | 3.26 |
flink_DeweyNumber_snapshotConfiguration_rdh | // -----------------------------------------------------------------------------------
@Override
public TypeSerializerSnapshot<DeweyNumber> snapshotConfiguration() {
return new DeweyNumberSerializerSnapshot();
} | 3.26 |
flink_DeweyNumber_m1_rdh | /**
* Creates a dewey number from a string representation. The input string must be a dot separated
* string of integers.
*
* @param deweyNumberString
* Dot separated string of integers
* @return Dewey number generated from the given input string
*/
public static DeweyNumber m1(final String deweyNumberString) ... | 3.26 |
flink_DeweyNumber_addStage_rdh | /**
* Creates a new dewey number from this such that a 0 is appended as new last digit.
*
* @return A new dewey number which contains this as a prefix and has 0 as last digit
*/
public DeweyNumber addStage() {
int[] newDeweyNumber = Arrays.copyOf(deweyNumber, deweyNumber.length + 1);
return new
Dew... | 3.26 |
flink_LambdaUtil_withContextClassLoader_rdh | /**
* Runs the given runnable with the given ClassLoader as the thread's {@link Thread#setContextClassLoader(ClassLoader) context class loader}.
*
* <p>The method will make sure to set the context class loader of the calling thread back to
* what it was before after the runnable completed.
*/
public static <R, E e... | 3.26 |
flink_LambdaUtil_applyToAllWhileSuppressingExceptions_rdh | /**
* This method supplies all elements from the input to the consumer. Exceptions that happen on
* elements are suppressed until all elements are processed. If exceptions happened for one or
* more of the inputs, they are reported in a combining suppressed exception.
*
* @param inputs
... | 3.26 |
flink_PythonOperatorChainingOptimizer_of_rdh | /**
* No chaining happens.
*/
public static ChainInfo of(Transformation<?> newTransformation) {
return new ChainInfo(newTransformation, Collections.emptyList());
} | 3.26 |
flink_PythonOperatorChainingOptimizer_apply_rdh | /**
* Perform chaining optimization. It will iterate the transformations defined in the given
* StreamExecutionEnvironment and update them with the chained transformations. Besides, it will
* return the transformation after chaining optimization for the given transformation.
*/
@SuppressWarnings("unchecked")
public... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.