name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_FileInputFormat_getFilePaths_rdh | /**
* Returns the paths of all files to be read by the FileInputFormat.
*
* @return The list of all paths to read.
*/public Path[] getFilePaths() {
if (supportsMultiPaths()) {
if (this.filePaths == null) {
return new Path[0];
}
return this.filePaths;
} else {
if (... | 3.26 |
flink_FileInputFormat_open_rdh | // --------------------------------------------------------------------------------------------
/**
* Opens an input stream to the file defined in the input format. The stream is positioned at
* the beginning of the given split.
*
* <p>The stream is actually opened in an asynchronous thread to make sure any interru... | 3.26 |
flink_FileInputFormat_extractFileExtension_rdh | /**
* Returns the extension of a file name (!= a path).
*
* @return the extension of the file name or {@code null} if there is no extension.
*/
protected static String extractFileExtension(String fileName) {
checkNotNull(fileName); int lastPeriodIndex = fileName.lastIndexOf('.');
if (lastPeriodIndex < 0) {... | 3.26 |
flink_FileInputFormat_getFilePath_rdh | // --------------------------------------------------------------------------------------------
// Getters/setters for the configurable parameters
// --------------------------------------------------------------------------------------------
/**
*
* @return The path of the file to read.
* @deprecated Please use get... | 3.26 |
flink_FileInputFormat_decorateInputStream_rdh | /**
* This method allows to wrap/decorate the raw {@link FSDataInputStream} for a certain file
* split, e.g., for decoding. When overriding this method, also consider adapting {@link FileInputFormat#testForUnsplittable} if your stream decoration renders the input file
* unsplittable. Also consider calling existing s... | 3.26 |
flink_FileInputFormat_getStatistics_rdh | /**
* Obtains basic file statistics containing only file size. If the input is a directory, then
* the size is the sum of all contained files.
*
* @see org.apache.flink.api.common.io.InputFormat#getStatistics(org.apache.flink.api.common.io.statistics.BaseStatistics)
*/
@Override
public FileBaseStatistics getStatis... | 3.26 |
flink_FileInputFormat_getBlockIndexForPosition_rdh | /**
* Retrieves the index of the <tt>BlockLocation</tt> that contains the part of the file
* described by the given offset.
*
* @param blocks
* The different blocks of the file. Must be ordered by their offset.
* @param offset
* The offset of the position in the file.
* @param startIndex
* The earliest i... | 3.26 |
flink_FileInputFormat_close_rdh | /**
* Closes the file input stream of the input format.
*/
@Override
public void close() throws IOException {
if (this.stream != null) {
// close input stream
this.stream.close();
stream = null;
}
} | 3.26 |
flink_OperatorIDGenerator_fromUid_rdh | /**
* Generate {@link OperatorID}'s from {@code uid}'s.
*
* <p>{@link org.apache.flink.streaming.api.graph.StreamGraphHasherV2#traverseStreamGraphAndGenerateHashes(StreamGraph)}
*
* @param uid
* {@code DataStream} operator uid.
* @return corresponding {@link OperatorID}
*/
public static OperatorID fromUid(Str... | 3.26 |
flink_CheckpointProperties_equals_rdh | // ------------------------------------------------------------------------
@Override
public boolean equals(Object o) { if (this == o) {
return true;
}
if ((o ==
null) || (getClass() != o.getClass())) {
return false;
}
CheckpointProperties that = ((CheckpointProperties) (o));
return ((((... | 3.26 |
flink_CheckpointProperties_isUnclaimed_rdh | /**
* Returns whether the checkpoint should be restored in a {@link RestoreMode#NO_CLAIM} mode.
*/
public boolean isUnclaimed() {
return unclaimed;
} | 3.26 |
flink_CheckpointProperties_forUnclaimedSnapshot_rdh | /**
* Creates the checkpoint properties for a snapshot restored in {@link RestoreMode#NO_CLAIM}.
* Those properties should not be used when triggering a checkpoint/savepoint. They're useful
* when restoring a {@link CompletedCheckpointStore} after a JM failover.
*
* @return Checkpoint properties for a snapshot res... | 3.26 |
flink_CheckpointProperties_forceCheckpoint_rdh | // ------------------------------------------------------------------------
/**
* Returns whether the checkpoint should be forced.
*
* <p>Forced checkpoints ignore the configured maximum number of concurrent checkpoints and
* minimum time between checkpoints. Furthermore, they are not subsumed by more recent
* che... | 3.26 |
flink_CheckpointProperties_forCheckpoint_rdh | /**
* Creates the checkpoint properties for a checkpoint.
*
* <p>Checkpoints may be queued in case too many other checkpoints are currently happening. They
* are garbage collected automatically, except when the owning job terminates in state {@link JobStatus#FAILED}. The user is required to configure the clean up b... | 3.26 |
flink_CheckpointProperties_getCheckpointType_rdh | /**
* Gets the type of the checkpoint (checkpoint / savepoint).
*/public SnapshotType getCheckpointType() {
return checkpointType;
} | 3.26 |
flink_CheckpointProperties_forSavepoint_rdh | /**
* Creates the checkpoint properties for a (manually triggered) savepoint.
*
* <p>Savepoints are not queued due to time trigger limits. They have to be garbage collected
* manually.
*
* @return Checkpoint properties for a (manually triggered) savepoint.
*/
public static CheckpointProperties forSavepoint(boole... | 3.26 |
flink_SqlNodeConvertUtils_validateAlterView_rdh | /**
* Validate the view to alter is valid and existed and return the {@link CatalogView} to alter.
*/
static CatalogView validateAlterView(SqlAlterView alterView, ConvertContext context) {
UnresolvedIdentifier unresolvedIdentifier = UnresolvedIdentifier.of(alterView.fullViewName());
ObjectIdentifier viewIden... | 3.26 |
flink_SqlNodeConvertUtils_toCatalogView_rdh | /**
* convert the query part of a VIEW statement into a {@link CatalogView}.
*/
static CatalogView toCatalogView(SqlNode query, List<SqlNode> viewFields, Map<String, String> viewOptions, String viewComment, ConvertContext context) {
// Put the sql string unparse (getQuotedSqlString()) in front of
// the node... | 3.26 |
flink_MetricRegistryImpl_startQueryService_rdh | /**
* Initializes the MetricQueryService.
*
* @param rpcService
* RpcService to create the MetricQueryService on
* @param resourceID
* resource ID used to disambiguate the actor name
*/
public void startQueryService(RpcService rpcService, ResourceID resourceID) {
synchronized(lock) {
Precondition... | 3.26 |
flink_MetricRegistryImpl_closeAsync_rdh | /**
* Shuts down this registry and the associated {@link MetricReporter}.
*
* <p>NOTE: This operation is asynchronous and returns a future which is completed once the
* shutdown operation has been completed.
*
* @return Future which is completed once the {@l... | 3.26 |
flink_MetricRegistryImpl_getMetricQueryServiceGatewayRpcAddress_rdh | /**
* Returns the address under which the {@link MetricQueryService} is reachable.
*
* @return address of the metric query service
*/
@Override
@Nullable
public String getMetricQueryServiceGatewayRpcAddress() {
if (queryService != null) {
return queryService.getSelfGateway(MetricQueryServiceGateway.... | 3.26 |
flink_MetricRegistryImpl_register_rdh | // ------------------------------------------------------------------------
// Metrics (de)registration
// ------------------------------------------------------------------------
@Override
public void register(Metric metric, String metricName, AbstractMetricGroup group) {
synchronized(lock) {
if (isShu... | 3.26 |
flink_MetricRegistryImpl_isShutdown_rdh | /**
* Returns whether this registry has been shutdown.
*
* @return true, if this registry was shutdown, otherwise false
*/
public boolean isShutdown() {
synchronized(lock) {
return isShutdown;
}
} | 3.26 |
flink_MetricRegistryImpl_getQueryService_rdh | // ------------------------------------------------------------------------
@VisibleForTesting
@Nullable
MetricQueryService getQueryService() {
return queryService;
} | 3.26 |
flink_MurmurHashUtils_hashUnsafeBytes_rdh | /**
* Hash unsafe bytes.
*
* @param base
* base unsafe object
* @param offset
* offset for unsafe object
* @param lengthInBytes
* length in bytes
* @return hash code
*/
public static int hashUnsafeBytes(Object base, long offset, int lengthInBytes) {
return hashUnsafeBytes(base, offset,
lengthInB... | 3.26 |
flink_MurmurHashUtils_fmix_rdh | // Finalization mix - force all bits of a hash block to avalanche
private static int fmix(int h1, int length) {
h1 ^= length;
return fmix(h1);
} | 3.26 |
flink_MurmurHashUtils_hashUnsafeBytesByWords_rdh | /**
* Hash unsafe bytes, length must be aligned to 4 bytes.
*
* @param base
* base unsafe object
* @param offset
* offset for unsafe object
* @param lengthInBytes
* length in bytes
* @return hash code
*/
public static int hashUnsafeBytesByWords(Object base, long offset, int lengthInBytes) {
return h... | 3.26 |
flink_MurmurHashUtils_hashBytesByWords_rdh | /**
* Hash bytes in MemorySegment, length must be aligned to 4 bytes.
*
* @param segment
* segment.
* @param offset
* offset for MemorySegment
* @param lengthInBytes
* length in MemorySegment
* @return hash code
*/
public static int
hashBytesByWords(MemorySegment segment, int offset, int lengthInBytes) ... | 3.26 |
flink_SerdeUtils_serializeSplitAssignments_rdh | /**
* Serialize a mapping from subtask ids to lists of assigned splits. The serialized format is
* following:
*
* <pre>
* 4 bytes - number of subtasks
* 4 bytes - split serializer version
* N bytes - [assignment_for_subtask]
* 4 bytes - subtask id
* 4 bytes - number of assigned splits
* N bytes - [assig... | 3.26 |
flink_SerdeUtils_deserializeSplitAssignments_rdh | /**
* Deserialize the given bytes returned by {@link #serializeSplitAssignments(Map,
* SimpleVersionedSerializer)}.
*
* @param serialized
* the serialized bytes returned by {@link #serializeSplitAssignments(Map,
* SimpleVersionedSerializer)}.
* @param splitSerializer
* the split serializer for the splits.... | 3.26 |
flink_AbstractUdfStreamOperator_notifyCheckpointComplete_rdh | // ------------------------------------------------------------------------
// checkpointing and recovery
// ------------------------------------------------------------------------
@Override
public void notifyCheckpointComplete(long checkpointId) throws Exception {
super.notifyCheckpointComplete(checkpointId);
... | 3.26 |
flink_AbstractUdfStreamOperator_getUserFunctionParameters_rdh | // ------------------------------------------------------------------------
// Utilities
// ------------------------------------------------------------------------
/**
* Since the streaming API does not implement any parametrization of functions via a
* configuration, the config returned here is actually empty.
*
... | 3.26 |
flink_AbstractUdfStreamOperator_setup_rdh | // ------------------------------------------------------------------------
// operator life cycle
// ------------------------------------------------------------------------
@Override
public void setup(StreamTask<?, ?> containingTask, StreamConfig config, Output<StreamRecord<OUT>> output) {
super.setup(containin... | 3.26 |
flink_AbstractUdfStreamOperator_setOutputType_rdh | // ------------------------------------------------------------------------
// Output type configuration
// ------------------------------------------------------------------------
@Override
public void setOutputType(TypeInformation<OUT> outTypeInfo, ExecutionConfig executionConfig) {
StreamingFunctionUtils.setOutp... | 3.26 |
flink_OpenApiSpecGenerator_injectAsyncOperationResultSchema_rdh | /**
* The {@link AsynchronousOperationResult} contains a generic 'operation' field that can't be
* properly extracted from swagger. This method injects these manually.
*
* <p>Resulting spec diff:
*
* <pre>
* AsynchronousOperationResult:
* type: object
* properties:
* operation:
* - type: object
... | 3.26 |
flink_OpenApiSpecGenerator_overrideIdSchemas_rdh | /**
* Various ID classes are effectively internal classes that aren't sufficiently annotated to
* work with automatic schema extraction. This method overrides the schema of these to a string
* regex pattern.
*
* <p>Resulting spec diff:
*
* <pre>
* JobID:
* - type: object
* - properties:
* - upperPart:
* - ... | 3.26 |
flink_AbstractMultipleInputTransformation_getInputTypes_rdh | /**
* Returns the {@code TypeInformation} for the elements from the inputs.
*/
public List<TypeInformation<?>> getInputTypes() {return inputs.stream().map(Transformation::getOutputType).collect(Collectors.toList());
} | 3.26 |
flink_AbstractMultipleInputTransformation_getOperatorFactory_rdh | /**
* Returns the {@code StreamOperatorFactory} of this Transformation.
*/
public StreamOperatorFactory<OUT> getOperatorFactory() {
return operatorFactory;
} | 3.26 |
flink_CostEstimator_costOperator_rdh | // ------------------------------------------------------------------------
/**
* This method computes the cost of an operator. The cost is composed of cost for input
* shipping, locally processing an input, and running the operator.
*
* <p>It requires at least that all inputs are set and have a proper ship strateg... | 3.26 |
flink_BufferConsumer_skip_rdh | /**
*
* @param bytesToSkip
* number of bytes to skip from currentReaderPosition
*/
void skip(int bytesToSkip) {
writerPosition.update();
int v2 = writerPosition.getCached();
int bytesReadable = v2 - currentReaderPosition;
checkState(bytesToSkip <= bytesReadable, "bytes to skip beyond readable rang... | 3.26 |
flink_BufferConsumer_copy_rdh | /**
* Returns a retained copy with separate indexes. This allows to read from the same {@link MemorySegment} twice.
*
* <p>WARNING: the newly returned {@link BufferConsumer} will have its reader index copied from
* the original buffer. In other words, data already consumed before copying will not be visible
* to t... | 3.26 |
flink_BufferConsumer_copyWithReaderPosition_rdh | /**
* Returns a retained copy with separate indexes and sets the reader position to the given
* value. This allows to read from the same {@link MemorySegment} twice starting from the
* supplied position.
*
* @param readerPosition
* the new reader position. Can be less than the {@link #currentReaderPosition}, bu... | 3.26 |
flink_BufferConsumer_isFinished_rdh | /**
* Checks whether the {@link BufferBuilder} has already been finished.
*
* <p>BEWARE: this method accesses the cached value of the position marker which is only updated
* after calls to {@link #build()} and {@link #skip(int)}!
*
* @return <tt>true</tt> if the buffer was finished, <tt>false</tt> otherwise
*/
p... | 3.26 |
flink_BufferConsumer_m0_rdh | /**
* Returns true if there is new data available for reading.
*/
public boolean m0() {
return currentReaderPosition < writerPosition.getLatest();
} | 3.26 |
flink_RawByteArrayConverter_create_rdh | // --------------------------------------------------------------------------------------------
// Factory method
// --------------------------------------------------------------------------------------------
public static RawByteArrayConverter<?> create(DataType dataType) {
final LogicalType v0 = dataType.getLogi... | 3.26 |
flink_CollectAggFunction_getArgumentDataTypes_rdh | // Planning
// --------------------------------------------------------------------------------------------
@Override
public List<DataType> getArgumentDataTypes() {
return Collections.singletonList(elementDataType);
} | 3.26 |
flink_SinkFunction_finish_rdh | /**
* This method is called at the end of data processing.
*
* <p>The method is expected to flush all remaining buffered data. Exceptions will cause the
* pipeline to be recognized as failed, because the last data items are not processed properly.
* You may use this method to flush remaining buffered elements in t... | 3.26 |
flink_SinkFunction_writeWatermark_rdh | /**
* Writes the given watermark to the sink. This function is called for every watermark.
*
* <p>This method is intended for advanced sinks that propagate watermarks.
*
* @param watermark
* The watermark.
* @throws Exception
* This method may throw exceptions. Throwing an exception will cause the
* oper... | 3.26 |
flink_SinkFunction_invoke_rdh | /**
* Writes the given value to the sink. This function is called for every record.
*
* <p>You have to override this method when implementing a {@code SinkFunction}, this is a
* {@code default} method for backward compatibility with the old-style method only.
*
* @param value
* The input record.
* @param cont... | 3.26 |
flink_DoubleValue_toString_rdh | // --------------------------------------------------------------------------------------------
@Override
public String toString() {return String.valueOf(this.value);
} | 3.26 |
flink_DoubleValue_read_rdh | // --------------------------------------------------------------------------------------------
@Override
public void read(DataInputView in) throws IOException {
this.value = in.readDouble();
} | 3.26 |
flink_DoubleValue_m0_rdh | /**
* Sets the value of the encapsulated primitive double.
*
* @param value
* the new value of the encapsulated primitive double.
*/
public void m0(double value) {
this.value = value;
} | 3.26 |
flink_DoubleValue_getBinaryLength_rdh | // --------------------------------------------------------------------------------------------
@Override
public int getBinaryLength() {
return 8;
} | 3.26 |
flink_DoubleValue_getValue_rdh | /**
* Returns the value of the encapsulated primitive double.
*
* @return the value of the encapsulated primitive double.
*/
public double getValue()
{
return this.value;
} | 3.26 |
flink_JobExceptionsInfoWithHistory_equals_rdh | // hashCode and equals are necessary for the test classes deriving from
// RestResponseMarshallingTestBase
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (((o == null) || (getClass() != o.getClass())) || (!super.equals(o))) {
return false;}
RootException... | 3.26 |
flink_LongHashPartition_updateIndex_rdh | /**
* Update the address in array for given key.
*/
private void updateIndex(long key, int hashCode, long address, int size, MemorySegment dataSegment, int currentPositionInSegment) throws IOException {
assert f2 <= (numBuckets / 2);
int
bucketId = findBucket(hashCode);// each bucket occupied 16 bytes (lo... | 3.26 |
flink_LongHashPartition_valueIter_rdh | /**
* Returns an iterator of BinaryRowData for multiple linked values.
*/
MatchIterator valueIter(long address) {
iterator.set(address);
return iterator;
} | 3.26 |
flink_LongHashPartition_get_rdh | /**
* Returns an iterator for all the values for the given key, or null if no value found.
*/
public MatchIterator get(long key,
int hashCode) {
int bucket = findBucket(hashCode);
int bucketOffset = bucket << 4;
MemorySegment segment
= buckets[bucketOffset >>> segme... | 3.26 |
flink_LongHashPartition_setReadPosition_rdh | // ------------------ PagedInputView for read --------------------
@Override
public void setReadPosition(long pointer) {
final int bufferNum = ((int) (pointer >>> this.segmentSizeBits));
final int offset = ((int) (pointer & segmentSizeMask));
this.currentBufferNum = bufferNum;
seekInput(this.partition... | 3.26 |
flink_SupportsRowLevelDelete_getRowLevelDeleteMode_rdh | /**
* Planner will rewrite delete statement to query base on the {@link RowLevelDeleteInfo},
* keeping the query of delete unchanged by default(in `DELETE_ROWS` mode), or changing the
* query to the complementary set in REMAINING_ROWS mode.
*
* <p>Take the following SQL as an example:
*
* <pre>{@code DELETE FROM... | 3.26 |
flink_AggregatingStateDescriptor_getAggregateFunction_rdh | /**
* Returns the aggregate function to be used for the state.
*/
public AggregateFunction<IN, ACC, OUT> getAggregateFunction() {
return aggFunction;
} | 3.26 |
flink_DecodingFormat_listReadableMetadata_rdh | /**
* Returns the map of metadata keys and their corresponding data types that can be produced by
* this format for reading. By default, this method returns an empty map.
*
* <p>Metadata columns add additional columns to the table's schema. A decoding format is
* responsible to add requested metadata columns at th... | 3.26 |
flink_DecodingFormat_applyReadableMetadata_rdh | /**
* Provides a list of metadata keys that the produced row must contain as appended metadata
* columns. By default, this method throws an exception if metadata keys are defined.
*
* <p>See {@link SupportsReadingMetadata} for more information.
*
* <p>Note: This method is only used if the outer {@link DynamicTabl... | 3.26 |
flink_AbstractAutoCloseableRegistry_registerCloseable_rdh | /**
* Registers a {@link AutoCloseable} with the registry. In case the registry is already closed,
* this method throws an {@link IllegalStateException} and closes the passed {@link AutoCloseable}.
*
* @param closeable
* Closeable to register.
* @throws IOException
* exception when the registry was closed be... | 3.26 |
flink_AbstractAutoCloseableRegistry_removeCloseableInternal_rdh | /**
* Removes a mapping from the registry map, respecting locking.
*/
protected final boolean removeCloseableInternal(R closeable) {
synchronized(getSynchronizationLock()) {
return closeableToRef.remove(closeable) != null;
}} | 3.26 |
flink_MiniCluster_getHaLeadershipControl_rdh | /**
* Returns {@link HaLeadershipControl} if enabled.
*
* <p>{@link HaLeadershipControl} allows granting and revoking leadership of HA components, e.g.
* JobManager. The method return {@link Optional#empty()} if the control is not enabled in
* {@link MiniClusterConfiguration}.
*
* <p>Enabling this feature disabl... | 3.26 |
flink_MiniCluster_createRemoteRpcService_rdh | /**
* Factory method to instantiate the remote RPC service.
*
* @param configuration
* Flink configuration.
* @param externalAddress
* The external address to access the RPC service.
* @param externalPortRange
* The external port range to access the RPC service.
* @param bindAddress
* The address to b... | 3.26 |
flink_MiniCluster_runDetached_rdh | // ------------------------------------------------------------------------
// running jobs
// ------------------------------------------------------------------------
/**
* This method executes a job in detached mode. The method returns immediately after the job has
* been added to the
*
* @param job
* The Flin... | 3.26 |
flink_MiniCluster_start_rdh | /**
* Starts the mini cluster, based on the configured properties.
*
* @throws Exception
* This method passes on any exception that occurs during the startup of the
* mini cluster.
*/
public void start() throws Exception {
synchronized(lock) {
checkState(!running, "MiniCluster is already running");
LOG.info(... | 3.26 |
flink_MiniCluster_create_rdh | /**
* Create a new {@link TerminatingFatalErrorHandler} for the {@link TaskExecutor} with the
* given index.
*
* @param index
* into the {@link #taskManagers} collection to identify the correct {@link TaskExecutor}.
* @return {@link TerminatingFatalErrorHandler} for the given index
*/
@GuardedBy("lock")
privat... | 3.26 |
flink_MiniCluster_getArchivedExecutionGraph_rdh | // ------------------------------------------------------------------------
// Accessing jobs
// ------------------------------------------------------------------------
public CompletableFuture<ArchivedExecutionGraph> getArchivedExecutionGraph(JobID jobId) {
return runDispatcherCommand(dispatcherGateway -> dispatcherG... | 3.26 |
flink_MiniCluster_m2_rdh | // ------------------------------------------------------------------------
/**
* Factory method to create the metric registry for the mini cluster.
*
* @param config
* The configuration of the mini cluster
* @param maximumMessageSizeInBytes
* the maximum message size
*/
protected MetricRegistryImpl m2(Confi... | 3.26 |
flink_MiniCluster_initializeIOFormatClasses_rdh | // ------------------------------------------------------------------------
// miscellaneous utilities
// ------------------------------------------------------------------------
private void initializeIOFormatClasses(Configuration configuration) {
// TODO: That we still have to call something like this is a crime agai... | 3.26 |
flink_MiniCluster_closeAsync_rdh | /**
* Shuts down the mini cluster, failing all currently executing jobs. The mini cluster can be
* started again by calling the {@link #start()} method again.
*
* <p>This method shuts down all started services and components, even if an exception occurs in
* the process of shutting down some component.
*
* @retu... | 3.26 |
flink_MiniCluster_startTaskManager_rdh | /**
* Starts additional TaskManager process.
*
* <p>When the MiniCluster starts up, it always starts {@link MiniClusterConfiguration#getNumTaskManagers} TaskManagers. All TaskManagers are indexed from
* 0 to the number of TaskManagers, started so far, minus one. This method starts a TaskManager
* with the next ind... | 3.26 |
flink_MiniCluster_executeJobBlocking_rdh | /**
* This method runs a job in blocking mode. The method returns only after the job completed
* successfully, or after it failed terminally.
*
* @param job
* The Flink job to execute
* @return The result of the job execution
* @throws JobExecutionException
* Thrown if anything went amiss during initial job... | 3.26 |
flink_MiniCluster_terminateTaskManager_rdh | /**
* Terminates a TaskManager with the given index.
*
* <p>See {@link #startTaskManager()} to understand how TaskManagers are indexed. This method
* terminates a TaskManager with a given index but it does not clear the index. The index stays
* occupied for the lifetime of the MiniCluster and its TaskManager stays... | 3.26 |
flink_MiniCluster_createLocalRpcService_rdh | /**
* Factory method to instantiate the local RPC service.
*
* @param configuration
* Flink configuration.
* @param rpcSystem
* @return The instantiated RPC service
*/
protected RpcService createLocalRpcService(Configuration configuration, RpcSystem rpcSystem) throws Exception {
return rpcSystem.localServi... | 3.26 |
flink_MiniCluster_checkRestoreModeForChangelogStateBackend_rdh | // HACK: temporary hack to make the randomized changelog state backend tests work with forced
// full snapshots. This option should be removed once changelog state backend supports forced
// full snapshots
private void checkRestoreModeForChangelogStateBackend(JobGraph jobGraph) {
final SavepointRestoreSettings savep... | 3.26 |
flink_MiniCluster_shutDownResourceManagerComponents_rdh | // ------------------------------------------------------------------------
// Internal methods
// ------------------------------------------------------------------------
@GuardedBy("lock")
private CompletableFuture<Void> shutDownResourceManagerComponents() {
final Collection<CompletableFuture<Void>> terminationFu... | 3.26 |
flink_MiniCluster_isRunning_rdh | // ------------------------------------------------------------------------
// life cycle
// ------------------------------------------------------------------------
/**
* Checks if the mini cluster was started and is running.
*/
public boolean isRunning() {
return running;
} | 3.26 |
flink_TieredStorageConfiguration_getEachTierExclusiveBufferNum_rdh | /**
* Get exclusive buffer number of each tier.
*
* @return buffer number of each tier.
*/
public List<Integer> getEachTierExclusiveBufferNum() {
return tierExclusiveBuffers;
} | 3.26 |
flink_TieredStorageConfiguration_getRemoteStorageBasePath_rdh | /**
* Get the base path on remote storage.
*
* @return string if the remote storage path is configured otherwise null.
*/
public String getRemoteStorageBasePath() {
return remoteStorageBasePath;
} | 3.26 |
flink_TieredStorageConfiguration_getAccumulatorExclusiveBuffers_rdh | /**
* Get exclusive buffer number of accumulator.
*
* <p>The buffer number is used to compare with the subpartition number to determine the type of
* {@link BufferAccumulator}.
*
* <p>If the exclusive buffer number is larger than (subpartitionNum + 1), the a... | 3.26 |
flink_TieredStorageConfiguration_getMemoryTierNumBytesPerSegment_rdh | /**
* Get the segment size of memory tier.
*
* @return segment size.
*/
public int getMemoryTierNumBytesPerSegment()
{
return memoryTierNumBytesPerSegment;
} | 3.26 |
flink_TieredStorageConfiguration_getTotalExclusiveBufferNum_rdh | /**
* Get the total exclusive buffer number.
*
* @return the total exclusive buffer number.
*/
public int getTotalExclusiveBufferNum() {
return ((accumulatorExclusiveBuffers + memoryTierExclusiveBuffers) + diskTierExclusiveBuffers) + (remoteStorageBasePath == null ? 0 : remoteTierExclusiveBuffers);
} | 3.26 |
flink_TieredStorageConfiguration_m0_rdh | /**
* Maximum time to wait when requesting read buffers from the buffer pool before throwing an
* exception in {@link DiskIOScheduler}.
*
* @return timeout duration.
*/
public Duration m0() {
return diskIOSchedulerRequestTimeout;
} | 3.26 |
flink_TieredStorageConfiguration_getMemoryTierExclusiveBuffers_rdh | /**
* Get exclusive buffer number of memory tier.
*
* @return the buffer number.
*/
public int getMemoryTierExclusiveBuffers() { return
memoryTierExclusiveBuffers;
} | 3.26 |
flink_TieredStorageConfiguration_getMinReserveDiskSpaceFraction_rdh | /**
* Minimum reserved disk space fraction in disk tier.
*
* @return the fraction.
*/
public float getMinReserveDiskSpaceFraction() {
return minReserveDiskSpaceFraction;
} | 3.26 |
flink_AbstractFsCheckpointStorageAccess_hasDefaultSavepointLocation_rdh | // ------------------------------------------------------------------------
// CheckpointStorage implementation
// ------------------------------------------------------------------------
@Override
public boolean hasDefaultSavepointLocation() {
return defaultSavepointDirectory != null;
} | 3.26 |
flink_AbstractFsCheckpointStorageAccess_encodePathAsReference_rdh | // Encoding / Decoding of References
// ------------------------------------------------------------------------
/**
* Encodes the given path as a reference in bytes. The path is encoded as a UTF-8 string and
* prepended as a magic number.
*
* @param path
* The path to encode.
* @return The location reference.
... | 3.26 |
flink_AbstractFsCheckpointStorageAccess_decodePathFromReference_rdh | /**
* Decodes the given reference into a path. This method validates that the reference bytes start
* with the correct magic number (as written by {@link #encodePathAsReference(Path)}) and
* converts the remaining bytes back to a proper path.
*
* @param reference
* The bytes representing the reference.
* @retu... | 3.26 |
flink_AbstractFsCheckpointStorageAccess_createCheckpointDirectory_rdh | /**
* Creates the directory path for the data exclusive to a specific checkpoint.
*
* @param baseDirectory
* The base directory into which the job checkpoints.
* @param checkpointId
* The ID (logical timestamp) of the checkpoint.
*/
protected static Path createCheckpointDirectory(Path baseDirectory, long che... | 3.26 |
flink_AbstractFsCheckpointStorageAccess_resolveCheckpointPointer_rdh | /**
* Takes the given string (representing a pointer to a checkpoint) and resolves it to a file
* status for the checkpoint's metadata file.
*
* @param checkpointPointer
* The pointer to resolve.
* @return A state handle to checkpoint/savepoint's metadata.... | 3.26 |
flink_AbstractFsCheckpointStorageAccess_getDefaultSavepointDirectory_rdh | /**
* Gets the default directory for savepoints. Returns null, if no default savepoint directory is
* configured.
*/
@Nullable
public Path getDefaultSavepointDirectory() {
return defaultSavepointDirectory;
} | 3.26 |
flink_FileRegionBuffer_readInto_rdh | // ------------------------------------------------------------------------
// Utils
// ------------------------------------------------------------------------
public Buffer readInto(MemorySegment segment) throws IOException {
final ByteBuffer buffer = segment.wrap(0, bufferSize());
BufferReaderWriterUtil.read... | 3.26 |
flink_FileRegionBuffer_getNioBufferReadable_rdh | /**
* This method is only called by tests and by event-deserialization, like checkpoint barriers.
* Because such events are not used for bounded intermediate results, this method currently
* executes only in tests.
*/
@Override
public ByteBuffer getNioBufferReadable() {
try {
final ByteBuffer buffer = B... | 3.26 |
flink_FileRegionBuffer_isBuffer_rdh | // ------------------------------------------------------------------------
// Buffer override methods
// ------------------------------------------------------------------------
@Override
public boolean isBuffer() {
return dataType.isBuffer();
} | 3.26 |
flink_IterableUtils_flatMap_rdh | /**
* Flatmap the two-dimensional {@link Iterable} into an one-dimensional {@link Iterable} and
* convert the keys into items.
*
* @param itemGroups
* to flatmap
* @param mapper
* convert the {@link K} into {@link V}
* @param <K>
* type of key in the two-dimensional iterable
* @param <V>
* type of it... | 3.26 |
flink_ResultPartitionType_canBePipelinedConsumed_rdh | /**
* return if this partition's upstream and downstream support scheduling in the same time.
*/
public boolean canBePipelinedConsumed() {
return (f1 == ConsumingConstraint.CAN_BE_PIPELINED)
|| (f1 == ConsumingConstraint.MUST_BE_PIPELINED);
} | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.