name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_InternalTimersSnapshotReaderWriters_getReaderForVersion_rdh | // -------------------------------------------------------------------------------
// Readers
// - pre-versioned: Flink 1.4.0
// - v1: Flink 1.4.1
// -------------------------------------------------------------------------------
public static <K, N> InternalTimersSnapshotReader<K, N> getReaderForVersion(int version, C... | 3.26 |
flink_MemoryUtils_allocateUnsafe_rdh | /**
* Allocates unsafe native memory.
*
* @param size
* size of the unsafe memory to allocate.
* @return address of the allocated unsafe memory
*/
static long allocateUnsafe(long size) {
return UNSAFE.allocateMemory(Math.max(1L, size));
} | 3.26 |
flink_MemoryUtils_getByteBufferAddress_rdh | /**
* Get native memory address wrapped by the given {@link ByteBuffer}.
*
* @param buffer
* {@link ByteBuffer} which wraps the native memory address to get
* @return native memory address wrapped by the given {@link ByteBuffer}
*/
static long getByteBufferAddress(ByteBuffer buffer) {
Preconditions.checkNot... | 3.26 |
flink_MemoryUtils_createMemoryCleaner_rdh | /**
* Creates a cleaner to release the unsafe memory.
*
* @param address
* address of the unsafe memory to release
* @param customCleanup
* A custom action to clean up GC
* @return action to run to release the unsafe memory manually
*/
static Runnable createMemoryCleaner(long address, Runnable customCleanup... | 3.26 |
flink_MemoryUtils_wrapUnsafeMemoryWithByteBuffer_rdh | /**
* Wraps the unsafe native memory with a {@link ByteBuffer}.
*
* @param address
* address of the unsafe memory to wrap
* @param size
* size of the unsafe memory to wrap
* @return a {@link ByteBuffer} which is a view of the given unsafe memory
*/
static ByteBuffer ... | 3.26 |
flink_TimestampsAndWatermarksTransformation_getWatermarkStrategy_rdh | /**
* Returns the {@code WatermarkStrategy} to use.
*/
public WatermarkStrategy<IN> getWatermarkStrategy() {
return watermarkStrategy;
} | 3.26 |
flink_TimestampsAndWatermarksTransformation_getInputType_rdh | /**
* Returns the {@code TypeInformation} for the elements of the input.
*/
public TypeInformation<IN> getInputType() {
return input.getOutputType();
} | 3.26 |
flink_ChannelStatePersister_parseEvent_rdh | /**
* Parses the buffer as an event and returns the {@link CheckpointBarrier} if the event is
* indeed a barrier or returns null in all other cases.
*/
@Nullable
protected AbstractEvent parseEvent(Buffer buffer) throws IOException {
if (buffer.isBuffer()) {
return null;
} else {
AbstractEvent event = EventS... | 3.26 |
flink_SavepointRestoreSettings_toConfiguration_rdh | // -------------------------- Parsing to and from a configuration object
// ------------------------------------
public static void toConfiguration(final SavepointRestoreSettings savepointRestoreSettings, final Configuration configuration) {
configuration.set(SavepointConfigOptions.SAVEPOINT_IGNORE_UNCLAIMED_STATE, sav... | 3.26 |
flink_SavepointRestoreSettings_none_rdh | // ------------------------------------------------------------------------
public static SavepointRestoreSettings none() {
return NONE;
} | 3.26 |
flink_SavepointRestoreSettings_getRestoreMode_rdh | /**
* Tells how to restore from the given savepoint.
*/
public RestoreMode getRestoreMode() {
return restoreMode;
} | 3.26 |
flink_InternalSourceReaderMetricGroup_watermarkEmitted_rdh | /**
* Called when a watermark was emitted.
*
* <p>Note this function should be called before the actual watermark is emitted such that
* chained processing does not influence the statistics.
*/
public void watermarkEmitted(long watermark) {
if (watermark == MAX_WATERMARK_TIMESTAMP) {
return;
... | 3.26 |
flink_InternalSourceReaderMetricGroup_getLastEmitTime_rdh | /**
* This is a rough approximation. If the source is busy, we assume that <code>
* emit time == now()
* </code>. If it's idling, we just take the time it started idling as the last emit time.
*/
private long getLastEmitTime() {
return isIdling() ? idleStartTime : clock.absoluteTimeMillis();
} | 3.26 |
flink_InternalSourceReaderMetricGroup_recordEmitted_rdh | /**
* Called when a new record was emitted with the given timestamp. {@link TimestampAssigner#NO_TIMESTAMP} should be indicated that the record did not have a timestamp.
*
* <p>Note this function should be called before the actual record is emitted such that chained
* processing does not influence the statistics.
... | 3.26 |
flink_ParquetRowDataWriter_write_rdh | /**
* It writes a record to Parquet.
*
* @param record
* Contains the record that is going to be written.
*/
public void
write(final RowData record) {
recordConsumer.startMessage();
rowWriter.write(record);
recordConsumer.endMessage();
} | 3.26 |
flink_ProcessingTimeServiceUtil_getProcessingTimeDelay_rdh | /**
* Returns the remaining delay of the processing time specified by {@code processingTimestamp}.
* This delay guarantees that the timer will be fired at least 1ms after the time it's
* registered for.
*
* @param processingTimestamp
* the processing time in milliseconds
* @param currentTimestamp
* the curr... | 3.26 |
flink_InputProperty_keepInputAsIsDistribution_rdh | /**
* A special distribution which indicators the data distribution is the same as its input.
*
* @param inputDistribution
* the input distribution
* @param strict
* whether the input distribution is strictly guaranteed
*/
public static KeepInputAsIsDistribution keepInputAsIsDistribution(RequiredDistribution... | 3.26 |
flink_InputProperty_hashDistribution_rdh | /**
* The input will read the records whose keys hash to a particular hash value.
*
* @param keys
* hash keys
*/
public static HashDistribution hashDistribution(int[] keys) {
return new HashDistribution(keys);
} | 3.26 |
flink_SignalHandler_handle_rdh | /**
* Handle an incoming signal.
*
* @param signal
* The incoming signal
*/
@Override
public void handle(Signal signal) {
LOG.info("RECEIVED SIGNAL {}: SIG{}. Shutting down as requested.",
signal.getNumber(), signal.getName());
prevHandler.handle(signal);
} | 3.26 |
flink_SignalHandler_register_rdh | /**
* Register some signal handlers.
*
* @param LOG
* The slf4j logger
*/
public static void register(final Logger LOG) {
synchronized(SignalHandler.class) {
if (registered) {
return;
}
registered = true;
final String[] SIGNALS =
(OperatingSystem.isWindo... | 3.26 |
flink_HiveParserJoinTypeCheckCtx_getInputRRList_rdh | /**
*
* @return the inputRR List
*/
public List<HiveParserRowResolver> getInputRRList() {
return inputRRLst;
} | 3.26 |
flink_VertexThreadInfoStats_getEndTime_rdh | /**
* Returns the timestamp, when all samples where collected.
*
* @return Timestamp, when all samples where collected
*/
@Override
public long getEndTime() {
return endTime;
} | 3.26 |
flink_VertexThreadInfoStats_getSamplesBySubtask_rdh | /**
* Returns the a map of thread info samples by subtask (execution ID).
*
* @return Map of thread info samples by task (execution ID)
*/
public Map<ExecutionAttemptID, Collection<ThreadInfoSample>> getSamplesBySubtask()
{
return samplesBySubtask;
} | 3.26 |
flink_UpsertTestSinkBuilder_setValueSerializationSchema_rdh | /**
* Sets the value {@link SerializationSchema} that transforms incoming records to byte[].
*
* @param valueSerializationSchema
* @return {@link UpsertTestSinkBuilder}
*/
public UpsertTestSinkBuilder<IN> setValueSerializationSchema(SerializationSchema<IN> valueSerializationSchema) {
this.valueSerializationSch... | 3.26 |
flink_UpsertTestSinkBuilder_build_rdh | /**
* Constructs the {@link UpsertTestSink} with the configured properties.
*
* @return {@link UpsertTestSink}
*/
public UpsertTestSink<IN> build() {
checkNotNull(outputFile);
checkNotNull(keySerializationSchema);
checkNotNull(valueSerializationSchema);
return new UpsertTestSink<>(outputFile, keySer... | 3.26 |
flink_UpsertTestSinkBuilder_setKeySerializationSchema_rdh | /**
* Sets the key {@link SerializationSchema} that transforms incoming records to byte[].
*
* @param keySerializationSchema
* @return {@link UpsertTestSinkBuilder}
*/
public UpsertTestSinkBuilder<IN> setKeySerializationSchema(SerializationSchema<IN> keySerializationSchema) {
this.keySerializationSchema = chec... | 3.26 |
flink_UpsertTestSinkBuilder_setOutputFile_rdh | /**
* Sets the output {@link File} to write to.
*
* @param outputFile
* @return {@link UpsertTestSinkBuilder}
*/
public UpsertTestSinkBuilder<IN> setOutputFile(File outputFile) {this.outputFile = checkNotNull(outputFile);
return this;
} | 3.26 |
flink_SymbolArgumentTypeStrategy_equals_rdh | // ---------------------------------------------------------------------------------------------
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
}
if ((other == null) || (getClass() != other.getClass())) {
return false;
}
SymbolArgumentTypeStrategy ... | 3.26 |
flink_SimpleStreamFormat_isSplittable_rdh | // ------------------------------------------------------------------------
// pre-defined methods from Stream Format
// ------------------------------------------------------------------------
/**
* This format is always not splittable.
*/
@Override
public final boolean isSplittable() {
return false;
} | 3.26 |
flink_PartitionedFileWriter_m1_rdh | /**
* Writes a list of {@link Buffer}s to this {@link PartitionedFile}. It guarantees that after
* the return of this method, the target buffers can be released. In a data region, all data of
* the same subpartition must be written together.
*
* <p>Note: The caller is responsible for recycling the target buffers a... | 3.26 |
flink_PartitionedFileWriter_releaseQuietly_rdh | /**
* Used to close and delete the failed {@link PartitionedFile} when any exception occurs.
*/
public void releaseQuietly() {
IOUtils.closeQuietly(this);
IOUtils.deleteFileQuietly(dataFilePath);
IOUtils.deleteFileQuietly(indexFilePath);
} | 3.26 |
flink_PartitionedFileWriter_m0_rdh | /**
* Persists the region index of the current data region and starts a new region to write.
*
* <p>Note: The caller is responsible for releasing the failed {@link PartitionedFile} if any
* exception occurs.
*
* @param isBroadcastRegion
* Whether it's a broadcast region. See {@link #isBroadcastRegion}.
*/
pub... | 3.26 |
flink_PartitionedFileWriter_finish_rdh | /**
* Finishes writing the {@link PartitionedFile} which closes the file channel and returns the
* corresponding {@link PartitionedFile}.
*
* <p>Note: The caller is responsible for releasing the failed {@link PartitionedFile} if any
* exception occurs.
*/
public PartitionedFile finish() throws IOException {
... | 3.26 |
flink_SolutionSetBroker_instance_rdh | /**
* Retrieve the singleton instance.
*/
public static Broker<Object> instance() {
return INSTANCE;
} | 3.26 |
flink_ExecutableOperationUtils_createDynamicTableSink_rdh | /**
* Creates a {@link DynamicTableSink} from a {@link CatalogTable}.
*
* <p>It'll try to create table sink from to {@param catalog}, then try to create from {@param sinkFactorySupplier} passed secondly. Otherwise, an attempt is made to discover a matching
* factory using Java SPI (see {@link Factory} for details).... | 3.26 |
flink_SqlTimeTypeInfo_hashCode_rdh | // --------------------------------------------------------------------------------------------
@Override
public int hashCode() {
return Objects.hash(clazz, f0, f1);
} | 3.26 |
flink_SqlTimeTypeInfo_instantiateComparator_rdh | // --------------------------------------------------------------------------------------------
private static <X> TypeComparator<X> instantiateComparator(Class<? extends TypeComparator<X>> comparatorClass, boolean ascendingOrder) {
try {
Constructor<? extends TypeComparator<X>> constructor = comparatorClas... | 3.26 |
flink_DefaultCompletedCheckpointStore_addCheckpointAndSubsumeOldestOne_rdh | /**
* Synchronously writes the new checkpoints to state handle store and asynchronously removes
* older ones.
*
* @param checkpoint
* Completed checkpoint to add.
* @throws PossibleInconsistentStateException
* if adding the checkpoint failed and leaving the
* system in a possibly inconsistent state, i.e. ... | 3.26 |
flink_DefaultCompletedCheckpointStore_tryRemove_rdh | /**
* Tries to remove the checkpoint identified by the given checkpoint id.
*
* @param checkpointId
* identifying the checkpoint to remove
* @return true if the checkpoint could be removed
*/
private boolean tryRemove(long checkpointId) throws Exception {
return checkpointStateHandleStore.releaseAndTryRemov... | 3.26 |
flink_DefaultCompletedCheckpointStore_tryRemoveCompletedCheckpoint_rdh | // ---------------------------------------------------------------------------------------------------------
// Private methods
// ---------------------------------------------------------------------------------------------------------
private boolean tryRemoveCompletedCheckpoint(CompletedCheckpoint completedCheckpoin... | 3.26 |
flink_StandardDeCompressors_getCommonSuffixes_rdh | // ------------------------------------------------------------------------
/**
* Gets all common file extensions of supported file compression formats.
*/
public static Collection<String> getCommonSuffixes() {
return COMMON_SUFFIXES;
} | 3.26 |
flink_StandardDeCompressors_m0_rdh | // ------------------------------------------------------------------------
private static Map<String,
InflaterInputStreamFactory<?>> m0(final InflaterInputStreamFactory<?>... decompressors) {
final LinkedHashMap<String, InflaterInputStreamFactory<?>> map = new LinkedHashMap<>(decompressors.length);
for (Inflat... | 3.26 |
flink_StandardDeCompressors_getDecompressorForExtension_rdh | /**
* Gets the decompressor for a file extension. Returns null if there is no decompressor for this
* file extension.
*/
@Nullable
public static InflaterInputStreamFactory<?> getDecompressorForExtension(String extension) {
return DECOMPRESSORS.get(extension);
} | 3.26 |
flink_StandardDeCompressors_getDecompressorForFileName_rdh | /**
* Gets the decompressor for a file name. This checks the file against all known and supported
* file extensions. Returns null if there is no decompressor for this file name.
*/
@Nullable
public static InflaterInputStreamFactory<?> getDecompressorForFileName(String fileName) {
for (final Map.Entry<String, Inf... | 3.26 |
flink_SourceStreamTask_triggerCheckpointAsync_rdh | // ------------------------------------------------------------------------
// Checkpointing
// ------------------------------------------------------------------------
@Override
public CompletableFuture<Boolean> triggerCheckpointAsync(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions) {
if... | 3.26 |
flink_SavepointReader_readBroadcastState_rdh | /**
* Read operator {@code BroadcastState} from a {@code Savepoint}.
*
* @param identifier
* The identifier of the operator.
* @param name
* The (unique) name for the state.
* @param keyTypeInfo
* The type information for the keys in the state.
* @param valueTypeInfo
* The type information for the val... | 3.26 |
flink_SavepointReader_readKeyedState_rdh | /**
* Read keyed state from an operator in a {@code Savepoint}.
*
* @param identifier
* The identifier of the operator.
* @param function
* The {@link KeyedStateReaderFunction} that is called for each key in state.
* @param <K>
* The type of the key in state.
* @param <OUT>
* The output type of the tr... | 3.26 |
flink_SavepointReader_readUnionState_rdh | /**
* Read operator {@code UnionState} from a {@code Savepoint} when a custom serializer was used;
* e.g., a different serializer than the one returned by {@code TypeInformation#createSerializer}.
*
* @param identifier
* The identifier of the operator.
* @param name
* The (unique) name for the state.
* @par... | 3.26 |
flink_SavepointReader_read_rdh | /**
* Loads an existing savepoint. Useful if you want to query the state of an existing
* application.
*
* @param env
* The execution environment used to transform the savepoint.
* @param path
* The path to an existing savepoint on disk.
* @param stateBackend
* The state backend of the savepoint.
* @ret... | 3.26 |
flink_SavepointReader_readListState_rdh | /**
* Read operator {@code ListState} from a {@code Savepoint} when a custom serializer was used;
* e.g., a different serializer than the one returned by {@code TypeInformation#createSerializer}.
*
* @param identifier
* The identifier of the operator.
* @param name
* The (unique) name for the state.
* @para... | 3.26 |
flink_SavepointReader_m0_rdh | /**
*
* @deprecated use {@link #readKeyedState(OperatorIdentifier, KeyedStateReaderFunction)}
*/
@Deprecated
public <K, OUT> DataStream<OUT> m0(String uid, KeyedStateReaderFunction<K, OUT> function) throws
IOException {
return m0(OperatorIdentifier.forUid(uid), function);
} | 3.26 |
flink_SavepointReader_window_rdh | /**
* Read window state from an operator in a {@code Savepoint}. This method supports reading from
* any type of window.
*
* @param windowSerializer
* The serializer used for the window type.
* @return A {@link WindowSavepointReader}.
*/
public <W extends Window> WindowSavepointReader<W> window(TypeSerializer<... | 3.26 |
flink_FileSystem_loadFileSystemFactories_rdh | // ------------------------------------------------------------------------
/**
* Loads the factories for the file systems directly supported by Flink. Aside from the {@link LocalFileSystem}, these file systems are loaded via Java's service framework.
*
* @return A map from the file system scheme to corresponding fi... | 3.26 |
flink_FileSystem_m0_rdh | // ------------------------------------------------------------------------
// Initialization
// ------------------------------------------------------------------------
/**
* Initializes the shared file system settings.
*
* <p>The given configuration is passed to each file system factory to initialize the respectiv... | 3.26 |
flink_FileSystem_exists_rdh | /**
* Check if exists.
*
* @param f
* source file
*/
public boolean exists(final Path f) throws IOException {
try {
return getFileStatus(f) != null;
} catch (FileNotFoundException e) {
return false;
}
} | 3.26 |
flink_FileSystem_initOutPathLocalFS_rdh | // ------------------------------------------------------------------------
// output directory initialization
// ------------------------------------------------------------------------
/**
* Initializes output directories on local file systems according to the given write mode.
*
* <ul>
* <li>WriteMode.NO_OVERW... | 3.26 |
flink_FileSystem_getLocalFileSystem_rdh | // ------------------------------------------------------------------------
// Obtaining File System Instances
// ------------------------------------------------------------------------
/**
* Returns a reference to the {@link FileSystem} instance for accessing the local file system.
*
* @return a reference to the {... | 3.26 |
flink_FileSystem_createRecoverableWriter_rdh | /**
* Creates a new {@link RecoverableWriter}. A recoverable writer creates streams that can
* persist and recover their intermediate state. Persisting and recovering intermediate state is
* a core building block for writing to files that span multiple checkpoints.
*
* <p>The returned object can act as a shared fa... | 3.26 |
flink_FileSystem_getDefaultFsUri_rdh | /**
* Gets the default file system URI that is used for paths and file systems that do not specify
* and explicit scheme.
*
* <p>As an example, assume the default file system URI is set to {@code 'hdfs://someserver:9000/'}. A file path of {@code '/user/USERNAME/in.txt'} is interpreted as
* {@code 'hdfs://someserve... | 3.26 |
flink_FileSystem_initialize_rdh | /**
* Initializes the shared file system settings.
*
* <p>The given configuration is passed to each file system factory to initialize the respective
* file systems. Because the configuration of file systems may be different subsequent to the
* call of this method, this method clears the file system instance cache.... | 3.26 |
flink_FileSystem_initOutPathDistFS_rdh | /**
* Initializes output directories on distributed file systems according to the given write mode.
*
* <p>WriteMode.NO_OVERWRITE & parallel output: - A directory is created if the output path
* does not exist. - An existing file or directory raises an exception.
*
* <p>WriteMode.NO_OVERWRITE & NONE paral... | 3.26 |
flink_FileSystem_create_rdh | /**
* Opens an FSDataOutputStream at the indicated Path.
*
* @param f
* the file name to open
* @param overwrite
* if a file with this name already exists, then if true, the file will be
* overwritten, and if false an error will be thrown.
* @throws IOException
* Thrown, if the stream could not be open... | 3.26 |
flink_HsBufferContext_release_rdh | /**
* Mark buffer status to release.
*/
public void release() {
if (isReleased()) {
return;
} released = true;
// decrease ref count when buffer is released from memory.
buffer.recycleBuffer();
} | 3.26 |
flink_InternalWindowProcessFunction_open_rdh | /**
* Initialization method for the function. It is called before the actual working methods.
*/
public void open(Context<K, W> ctx) throws Exception {
this.ctx = ctx;
this.windowAssigner.open(ctx);
} | 3.26 |
flink_InternalWindowProcessFunction_close_rdh | /**
* The tear-down method of the function. It is called after the last call to the main working
* methods.
*/
public void close() throws Exception {
} | 3.26 |
flink_InternalWindowProcessFunction_cleanupTime_rdh | /**
* Returns the cleanup time for a window, which is {@code window.maxTimestamp +
* allowedLateness}. In case this leads to a value greated than {@link Long#MAX_VALUE} then a
* cleanup time of {@link Long#MAX_VALUE} is returned.
*
* @param window
* the window whose cleanup time we are computing.
*/
private lo... | 3.26 |
flink_InternalWindowProcessFunction_isCleanupTime_rdh | /**
* Returns {@code true} if the given time is the cleanup time for the given window.
*/
protected final boolean
isCleanupTime(W window, long time) {
return time == toEpochMillsForTimer(cleanupTime(window), ctx.getShiftTimeZone());
} | 3.26 |
flink_InternalWindowProcessFunction_isWindowLate_rdh | /**
* Returns {@code true} if the watermark is after the end timestamp plus the allowed lateness of
* the given window.
*/
protected boolean isWindowLate(W window) {
return windowAssigner.isEventTime() && (toEpochMillsForTimer(cleanupTime(window), ctx.getShiftTimeZone()) <= ctx.currentWatermark());
} | 3.26 |
flink_PythonShellParser_constructYarnOption_rdh | /**
* Constructs yarn options. The python shell option will add prefix 'y' to align yarn options in
* `flink run`.
*
* @param options
* Options that will be used in `flink run`.
* @param yarnOption
* Python shell yarn options.
* @param commandLine
* Parsed Python shell parser options.
*/
private static ... | 3.26 |
flink_PythonShellParser_parseLocal_rdh | /**
* Parses Python shell options and transfer to options which will be used in `java` to exec a
* flink job in local mini cluster.
*
* @param args
* Python shell options.
* @return Options used in `java` run.
*/
static List<String> parseLocal(String[] args) {
String[] params = new String[args.length - 1]... | 3.26 |
flink_PythonShellParser_printError_rdh | /**
* Prints the error message and help for the client.
*
* @param msg
* error message
*/
private static void printError(String msg) {
System.err.println(msg);
System.err.println("Valid cluster type are \"local\", \"remote <hostname> <portnumber>\", \"yarn\".");
System.err.println();
System.err.... | 3.26 |
flink_PythonShellParser_parseRemote_rdh | /**
* Parses Python shell options and transfer to options which will be used in `flink run -m
* ${jobmanager_address}` to submit flink job in a remote jobmanager. The Python shell options
* "remote ${hostname} ${portnumber}" will be transferred to "-m ${hostname}:${portnumber}".
*
* @param args
* Python shell o... | 3.26 |
flink_PythonShellParser_printHelp_rdh | /**
* Prints the help for the client.
*/
private static void printHelp() {
System.out.print("Flink Python Shell\n");
System.out.print("Usage: pyflink-shell.sh [local|remote|yarn] [options] <args>...\n");
System.out.print('\n');
printLocalHelp();
printRemoteHelp();
printYarnHelp();
System.o... | 3.26 |
flink_BufferReaderWriterUtil_writeBuffer_rdh | // ------------------------------------------------------------------------
// ByteBuffer read / write
// ------------------------------------------------------------------------
static boolean writeBuffer(Buffer buffer, ByteBuffer memory) {
final int bufferSize = buffer.getSize();
if (memory.remaining() < (buf... | 3.26 |
flink_BufferReaderWriterUtil_configureByteBuffer_rdh | // ------------------------------------------------------------------------
// Utils
// ------------------------------------------------------------------------
static void configureByteBuffer(ByteBuffer buffer) {
buffer.order(ByteOrder.nativeOrder());
} | 3.26 |
flink_BufferReaderWriterUtil_writeToByteChannel_rdh | // ------------------------------------------------------------------------
// ByteChannel read / write
// ------------------------------------------------------------------------
static long writeToByteChannel(FileChannel channel, Buffer buffer,
ByteBuffer[] arrayWithHeaderBuffer) throws IOExcepti... | 3.26 |
flink_BufferReaderWriterUtil_positionToNextBuffer_rdh | /**
* Skip one data buffer from the channel's current position by headerBuffer.
*/
public static void positionToNextBuffer(FileChannel channel, ByteBuffer headerBuffer) throws IOException {
headerBuffer.clear();
if (!tryReadByteBuffer(channel, headerBuffer)) {
throwCorruptDataException();
}
h... | 3.26 |
flink_DataSetFineGrainedRecoveryTestProgram_main_rdh | /**
* Program to test fine grained recovery.
*/
public class DataSetFineGrainedRecoveryTestProgram {public static void
main(String[] args) throws Exception {
final ParameterTool params = ParameterTool.fromArgs(args);
final String latchFilePath = params.getRequired("latchFilePath");
final... | 3.26 |
flink_AbstractRichFunction_open_rdh | // --------------------------------------------------------------------------------------------
// Default life cycle methods
// --------------------------------------------------------------------------------------------
@Override
public void
open(Configuration parameters) throws Exception {
} | 3.26 |
flink_SerializedJobExecutionResult_getNetRuntime_rdh | /**
* Gets the net execution time of the job, i.e., the execution time in the parallel system,
* without the pre-flight steps like the optimizer in a desired time unit.
*
* @param desiredUnit
* the unit of the <tt>NetRuntime</tt>
* @return The net execution time in the desired unit.
*/public long getNetRuntime... | 3.26 |
flink_CompletedCheckpointStats_getExternalPath_rdh | // Completed checkpoint specific methods
// ------------------------------------------------------------------------
/**
* Returns the external pointer of this checkpoint.
*/
public String getExternalPath() {
return externalPointer;
} | 3.26 |
flink_SessionWithGapOnTime_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 SessionWithGapOnTimeWithA... | 3.26 |
flink_LongZeroConvergence_m0_rdh | /**
* Returns true, if the aggregator value is zero, false otherwise.
*
* @param iteration
* The number of the iteration superstep. Ignored in this case.
* @param value
* The aggregator value, which is compared to zero.
* @return True, if the aggregator value is zero, false otherwise.
*/@Override
public boo... | 3.26 |
flink_MapPartitionOperatorBase_m0_rdh | // --------------------------------------------------------------------------------------------
@Override
protected List<OUT> m0(List<IN> inputData, RuntimeContext ctx, ExecutionConfig executionConfig) throws Exception {
MapPartitionFunction<IN, OUT> function = this.userFunction.getUserCodeObject();
FunctionUti... | 3.26 |
flink_Dispatcher_getShutDownFuture_rdh | // ------------------------------------------------------
public CompletableFuture<ApplicationStatus> getShutDownFuture() {
return shutDownFuture;
} | 3.26 |
flink_Dispatcher_terminateRunningJobs_rdh | /**
* Terminate all currently running {@link JobManagerRunner}s.
*/
private void terminateRunningJobs() {
log.info("Stopping all currently running jobs of dispatcher {}.", getAddress());
final Set<JobID> jobsToRemove = jobManagerRunnerRegistry.getRunningJobIds();
for (JobID jobId : jobsToRemove) {
... | 3.26 |
flink_Dispatcher_onStart_rdh | // ------------------------------------------------------
// Lifecycle methods
// ------------------------------------------------------
@Overridepublic void onStart() throws Exception {
try {
startDispatcherServices();
} catch (Throwable t) {
final DispatcherException exception = new Dispatch... | 3.26 |
flink_Dispatcher_submitJob_rdh | // ------------------------------------------------------
// RPCs
// ------------------------------------------------------
@Override
public CompletableFuture<Acknowledge> submitJob(JobGraph jobGraph, Time timeout) {
final JobID jobID = jobGraph.getJobID();
log.info("Received JobGraph submission '{}' ({}).", ... | 3.26 |
flink_Dispatcher_getJobMasterGateway_rdh | /**
* Ensures that the JobMasterGateway is available.
*/private CompletableFuture<JobMasterGateway> getJobMasterGateway(JobID jobId) {
if (!jobManagerRunnerRegistry.isRegistered(jobId)) {
return
FutureUtils.completedExceptionally(new FlinkJobNotFoundException(jobId));
}
final JobManagerRu... | 3.26 |
flink_Dispatcher_createDirtyJobResultEntryIfMissingAsync_rdh | /**
* Creates a dirty entry in the {@link #jobResultStore} if there's no entry at all for the given
* {@code executionGraph} in the {@code JobResultStore}.
*
* @param executionGraph
* The {@link AccessExecutionGraph} for which the {@link JobResult} shall
* be persisted.
* @param hasCleanJobResultEntry
* T... | 3.26 |
flink_TypeSerializerSingleton_m0_rdh | // --------------------------------------------------------------------------------------------
@Overridepublic TypeSerializerSingleton<T> m0() {
return this;
} | 3.26 |
flink_GlobalWindows_m0_rdh | /**
* Creates a new {@code GlobalWindows} {@link WindowAssigner} that assigns all elements to the
* same {@link GlobalWindow}.
*
* @return The global window policy.
*/
public static GlobalWindows m0() {
return new GlobalWindows();
} | 3.26 |
flink_IterativeStream_closeWith_rdh | /**
* Closes the iteration. This method defines the end of the iterative program part that will
* be fed back to the start of the iteration as the second input in the {@link ConnectedStreams}.
*
* @param feedbackStream
* {@link DataStream} that will be used as second input to the
* iteration head.
* @return ... | 3.26 |
flink_IterativeStream_withFeedbackType_rdh | /**
* Changes the feedback type of the iteration and allows the user to apply co-transformations on
* the input and feedback stream, as in a {@link ConnectedStreams}.
*
* <p>For type safety the user needs to define the feedback type
*
* @param feedbackType
* The type information of the feedback stream.
* @ret... | 3.26 |
flink_TextInputFormat_getCharsetName_rdh | // --------------------------------------------------------------------------------------------
public String getCharsetName() {
return charsetName;
} | 3.26 |
flink_TextInputFormat_toString_rdh | // --------------------------------------------------------------------------------------------
@Override
public String toString() {
return (("TextInputFormat (" + Arrays.toString(getFilePaths())) + ") - ") + this.charsetName;
} | 3.26 |
flink_TextInputFormat_readRecord_rdh | // --------------------------------------------------------------------------------------------
@Override
public String readRecord(String reusable, byte[] bytes, int offset, int numBytes) throws IOException {// Check if \n is used as delimiter and the end of this line is a \r, then remove \r from
// the line
if... | 3.26 |
flink_TextInputFormat_configure_rdh | // --------------------------------------------------------------------------------------------
@Override
public void configure(Configuration parameters) { super.configure(parameters);
if ((charsetName == null) || (!Charset.isSupported(charsetName))) {
throw new RuntimeException("Unsupported charset: " + c... | 3.26 |
flink_MultiStateKeyIterator_remove_rdh | /**
* Removes the current key from <b>ALL</b> known states in the state backend.
*/
@Override
public void remove() {if (currentKey == null) {
return;
}
for (StateDescriptor<?, ?> descriptor : descriptors) {
try {
State state = backend.getPartitionedState(VoidNamespace.INSTANCE, VoidNamespaceSerializer.INST... | 3.26 |
flink_ResultPartitionFactory_isOverdraftBufferNeeded_rdh | /**
* Return whether this result partition need overdraft buffer.
*/private static boolean isOverdraftBufferNeeded(ResultPartitionType resultPartitionType) {
// Only pipelined / pipelined-bounded partition needs overdraft buffer. More
// specifically, there is no reason to request more buffers for non-pipelin... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.