name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_ExecutionEnvironment_registerType_rdh | /**
* Registers the given type with the serialization stack. If the type is eventually serialized
* as a POJO, then the type is registered with the POJO serializer. If the type ends up being
* serialized with Kryo, then it will be registered at Kryo to make sure that only tags are
* written.
*
* @param type
* ... | 3.26 |
flink_ExecutionEnvironment_clearJobListeners_rdh | /**
* Clear all registered {@link JobListener}s.
*/
@PublicEvolving
public void clearJobListeners() {
this.jobListeners.clear();
}
/**
* Triggers the program execution asynchronously. The environment will execute all parts of the
* program that have resulted in a "sink" operation. Sink operations are for examp... | 3.26 |
flink_ExecutionEnvironment_registerCachedFile_rdh | /**
* Registers a file at the distributed cache under the given name. The file will be accessible
* from any user-defined function in the (distributed) runtime under a local path. Files may be
* local files (which will be distributed via BlobServer), or files in a distributed file
* system. The runtime will copy th... | 3.26 |
flink_ExecutionEnvironment_registerTypeWithKryoSerializer_rdh | /**
* Registers the given Serializer via its class as a serializer for the given type at the
* KryoSerializer.
*
* @param type
* The class of the types serialized with the given serializer.
* @param serializerClass
* The class of the serializer to use.
*/
public void registerTypeWithKryoSerializer(Class<?> ... | 3.26 |
flink_ExecutionEnvironment_getJobListeners_rdh | /**
* Gets the config JobListeners.
*/
protected List<JobListener> getJobListeners() {
return jobListeners;}
/**
* Gets the parallelism with which operation are executed by default. Operations can
* individually override this value to use a specific parallelism via {@link Operator#setParallelism(int)}. Other ... | 3.26 |
flink_ExecutionEnvironment_createLocalEnvironmentWithWebUI_rdh | /**
* Creates a {@link LocalEnvironment} for local program execution that also starts the web
* monitoring UI.
*
* <p>The local execution environment will run the program in a multi-threaded fashion in the
* same JVM as the environment was created in. It will use the parallelism specified in the
* parameter.
*
... | 3.26 |
flink_ExecutionEnvironment_fromParallelCollection_rdh | // private helper for passing different call location names
private <X> DataSource<X> fromParallelCollection(SplittableIterator<X> iterator, TypeInformation<X> type, String callLocationName) {
return new DataSource<>(this, new ParallelIteratorInputFormat<>(iterator), type, callLocationName);
} | 3.26 |
flink_ExecutionEnvironment_createLocalEnvironment_rdh | /**
* Creates a {@link LocalEnvironment} which is used for executing Flink jobs.
*
* @param configuration
* to start the {@link LocalEnvironment} with
* @param defaultParallelism
* to initialize the {@link LocalEnvironment} with
* @return {@link LocalEnvironment}
*/
private static LocalEnvironment createLoc... | 3.26 |
flink_ExecutionEnvironment_setRestartStrategy_rdh | /**
* Sets the restart strategy configuration. The configuration specifies which restart strategy
* will be used for the execution graph in case of a restart.
*
* @param restartStrategyConfiguration
* Restart strategy configuration to be set
*/
@PublicEvolving
public void setRestartStrategy(RestartStrategies.Re... | 3.26 |
flink_ExecutionEnvironment_fromCollection_rdh | /**
* Creates a DataSet from the given iterator. Because the iterator will remain unmodified until
* the actual execution happens, the type of data returned by the iterator must be given
* explicitly in the form of the type information. This method is useful for cases where the
* type is generic. In that case, the ... | 3.26 |
flink_ExecutionEnvironment_setDefaultLocalParallelism_rdh | /**
* Sets the default parallelism that will be used for the local execution environment created by
* {@link #createLocalEnvironment()}.
*
* @param parallelism
* The parallelism to use as the default local parallelism.
*/
public static void setDefaultLocalParallelism(int parallelism) {
defaultLocalDop = parall... | 3.26 |
flink_ExecutionEnvironment_createRemoteEnvironment_rdh | /**
* Creates a {@link RemoteEnvironment}. The remote environment sends (parts of) the program to a
* cluster for execution. Note that all file paths used in the program must be accessible from
* the cluster. The execution will use the specified parallelism.
*
* @param host
* The host name or address of the mas... | 3.26 |
flink_ExecutionEnvironment_getRestartStrategy_rdh | /**
* Returns the specified restart strategy configuration.
*
* @return The restart strategy configuration to be used
*/
@PublicEvolving
public RestartStrategyConfiguration getRestartStrategy() {
return config.getRestartStrategy();
}
/**
* Sets the number of times that failed tasks are re-executed. A value of... | 3.26 |
flink_ExecutionEnvironment_readFile_rdh | // ------------------------------------ File Input Format
// -----------------------------------------
public <X> DataSource<X> readFile(FileInputFormat<X> inputFormat, String filePath) {
if (inputFormat
== null) { throw new IllegalArgumentException("InputFormat must not be null.");
}
if
(filePath =... | 3.26 |
flink_ExecutionEnvironment_getDefaultLocalParallelism_rdh | // --------------------------------------------------------------------------------------------
// Default parallelism for local execution
// --------------------------------------------------------------------------------------------
/**
* Gets the default parallelism that will be used for the local execution environ... | 3.26 |
flink_ExecutionEnvironment_resetContextEnvironment_rdh | /**
* Un-sets the context environment factory. After this method is called, the call to {@link #getExecutionEnvironment()} will again return a default local execution environment, and it
* is possible to explicitly instantiate the LocalEnvironment and the RemoteEnvironment.
*/
protected static void resetContextEnvir... | 3.26 |
flink_ExecutionEnvironment_setParallelism_rdh | /**
* Sets the parallelism for operations executed through this environment. Setting a parallelism
* of x here will cause all operators (such as join, map, reduce) to run with x parallel
* instances.
*
* <p>This method overrides the default parallelism for this environment. The {@link LocalEnvironment} uses by def... | 3.26 |
flink_ExecutionEnvironment_configure_rdh | /**
* Sets all relevant options contained in the {@link ReadableConfig} such as e.g. {@link PipelineOptions#CACHED_FILES}. It will reconfigure {@link ExecutionEnvironment} and {@link ExecutionConfig}.
*
* <p>It will change the value of a setting only if a corresponding option was set in the {@code configuration}. If... | 3.26 |
flink_ExecutionEnvironment_readTextFileWithValue_rdh | /**
* Creates a {@link DataSet} that represents the Strings produced by reading the given file line
* wise. This method is similar to {@link #readTextFile(String, String)}, but it produces a
* DataSet with mutable {@link StringValue} objects, rather than Java Strings. StringValues can... | 3.26 |
flink_ExecutionEnvironment_createCollectionsEnvironment_rdh | /**
* Creates a {@link CollectionEnvironment} that uses Java Collections underneath. This will
* execute in a single thread in the current JVM. It is very fast but will fail if the data does
* not fit into memory. parallelism will always be 1. This is useful during implementation and
* for debugging.
*
* @return ... | 3.26 |
flink_ExecutionEnvironment_createProgramPlan_rdh | /**
* Creates the program's {@link Plan}. The plan is a description of all data sources, data
* sinks, and operations and how they interact, as an isolated unit that can be executed with an
* {@link PipelineExecutor}. Obtaining a plan and starting it with an executor is an alternative
* way to run a program and is ... | 3.26 |
flink_ExecutionEnvironment_execute_rdh | /**
* Triggers the program execution. The environment will execute all parts of the program that
* have resulted in a "sink" operation. Sink operations are for example printing results ({@link DataSet#print()}, writing results (e.g. {@link DataSet#writeAsText(String)}, {@link DataSet#write(org.apache.flink.api.common... | 3.26 |
flink_ExecutionEnvironment_readCsvFile_rdh | // ----------------------------------- CSV Input Format ---------------------------------------
/**
* Creates a CSV reader to read a comma separated value (CSV) file. The reader has options to
* define parameters and field types and will eventually produce the DataSet that corresponds to
* the read and parsed CSV in... | 3.26 |
flink_ExecutionEnvironment_getLastJobExecutionResult_rdh | /**
* Returns the {@link org.apache.flink.api.common.JobExecutionResult} of the last executed job.
*
* @return The execution result from the latest job execution.
*/
public JobExecutionResult getLastJobExecutionResult() {
return this.lastJobExecutionResult;
} | 3.26 |
flink_ExecutionEnvironment_initializeContextEnvironment_rdh | // --------------------------------------------------------------------------------------------
// Methods to control the context environment and creation of explicit environments other
// than the context environment
// --------------------------------------------------------------------------------------------
/**
*... | 3.26 |
flink_ExecutionEnvironment_getJobName_rdh | /**
* Gets the job name. If user defined job name is not found in the configuration, the default
* name based on the timestamp when this method is invoked will return.
*
* @return A job name.
*/
private String getJobName() {
return configuration.getString(PipelineOptions.NAME, "Flink Java Job at " + Calendar.g... | 3.26 |
flink_GSCommitRecoverable_getComponentBlobIds_rdh | /**
* Returns the list of component blob ids, which have to be resolved from the temporary bucket
* name, prefix, and component ids. Resolving them this way vs. storing the blob ids directly
* allows us to move in-progress blobs by changing options to point to new in-progress
* locations.
*
* @param options
* ... | 3.26 |
flink_AvroParquetRecordFormat_createReader_rdh | /**
* Creates a new reader to read avro {@link GenericRecord} from Parquet input stream.
*
* <p>Several wrapper classes haven be created to Flink abstraction become compatible with the
* parquet abstraction. Please refer to the inner classes {@link AvroParquetRecordReader},
* {@link ParquetInputFile}, {@code FSDat... | 3.26 |
flink_AvroParquetRecordFormat_getProducedType_rdh | /**
* Gets the type produced by this format. This type will be the type produced by the file source
* as a whole.
*/
@Override
public TypeInformation<E> getProducedType() {return type; } | 3.26 |
flink_AvroParquetRecordFormat_restoreReader_rdh | /**
* Restores the reader from a checkpointed position. It is in fact identical since only {@link CheckpointedPosition#NO_OFFSET} as the {@code restoredOffset} is support.
*/
@Override
public Reader<E> restoreReader(Configuration config, FSDataInputStream stream, long restoredOffset, long fileLen, long splitEnd) thro... | 3.26 |
flink_AvroParquetRecordFormat_isSplittable_rdh | /**
* Current version does not support splitting.
*/
@Override
public boolean isSplittable() {
return false;
} | 3.26 |
flink_Tuple4_of_rdh | /**
* Creates a new tuple and assigns the given values to the tuple's fields. This is more
* convenient than using the constructor, because the compiler can infer the generic type
* arguments implicitly. For example: {@code Tuple3.of(n, x, s)} instead of {@code new
* Tuple3<Integer, Double, String>(n, x, s)}
*/
pu... | 3.26 |
flink_Tuple4_equals_rdh | /**
* Deep equality for tuples by calling equals() on the tuple members.
*
* @param o
* the object checked for equality
* @return true if this is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
... | 3.26 |
flink_Tuple4_copy_rdh | /**
* Shallow tuple copy.
*
* @return A new Tuple with the same fields as this.
*/
@Override
@SuppressWarnings("unchecked")
public Tuple4<T0,
T1, T2, T3> copy() {
return new Tuple4<>(this.f0, this.f1, this.f2, this.f3);
} | 3.26 |
flink_Tuple4_toString_rdh | // -------------------------------------------------------------------------------------------------
// standard utilities
// -------------------------------------------------------------------------------------------------
/**
* Creates a string representation of the tuple in the form (f0, f1, f2, f3), where the
* i... | 3.26 |
flink_Tuple4_setFields_rdh | /**
* Sets new values to all fields of the tuple.
*
* @param f0
* The value for field 0
* @param f1
* The value for field 1
* @param f2
* The value for field 2
* @param f3
* The value for field 3
*/
public void setFields(T0 f0, T1 f1, T2 f2, T3 f3) {
this.f0 = f0;
this.f1 = f1;
this.f2 =... | 3.26 |
flink_EvictingWindowSavepointReader_reduce_rdh | /**
* Reads window state generated using a {@link ReduceFunction}.
*
* @param uid
* The uid of the operator.
* @param function
* The reduce function used to create the window.
* @param readerFunction
* The window reader function.
* @param keyType
* The key type of the window.
* @param reduceType
* ... | 3.26 |
flink_EvictingWindowSavepointReader_process_rdh | /**
* Reads window state generated without any preaggregation such as {@code WindowedStream#apply}
* and {@code WindowedStream#process}.
*
* @param uid
* The uid of the operator.
* @param readerFunction
* The window reader function.
* @param keyType
* The key type of the window.
* @param stateType
* ... | 3.26 |
flink_EvictingWindowSavepointReader_aggregate_rdh | /**
* Reads window state generated using an {@link AggregateFunction}.
*
* @param uid
* The uid of the operator.
* @param aggregateFunction
* The aggregate function used to create the window.
* @param readerFunction
* The window reader function.
* @param keyType
* The key type of the window.
* @param... | 3.26 |
flink_SocketClientSink_open_rdh | // ------------------------------------------------------------------------
// Life cycle
// ------------------------------------------------------------------------
/**
* Initialize the connection with the Socket in the server.
*
* @param openContext
* the context.
*/
@Override
public void open(OpenContext open... | 3.26 |
flink_SocketClientSink_getCurrentNumberOfRetries_rdh | // ------------------------------------------------------------------------
// For testing
// ------------------------------------------------------------------------
int getCurrentNumberOfRetries() {
synchronized(lock) {
return retries;
}
} | 3.26 |
flink_SocketClientSink_invoke_rdh | /**
* Called when new data arrives to the sink, and forwards it to Socket.
*
* @param value
* The value to write to the socket.
*/
@Override
public void invoke(IN value) throws Exception {
byte[] msg = schema.serialize(value);
try {
outputStream.write(m... | 3.26 |
flink_SocketClientSink_close_rdh | /**
* Closes the connection with the Socket server.
*/
@Overridepublic void close() throws Exception {
// flag this as not running any more
isRunning = false;
// clean up in locked scope, so there is no concurrent change to the stream and client
synchronized(lock) {
// we notify first (this st... | 3.26 |
flink_SocketClientSink_createConnection_rdh | // ------------------------------------------------------------------------
// Utilities
// ------------------------------------------------------------------------
private void createConnection() throws IOException {
client =
new Socket(hostName, port);
client.setKeepAlive(true);
client.setTcpNoDelay... | 3.26 |
flink_JoinWithSolutionSetSecondDriver_initialize_rdh | // --------------------------------------------------------------------------------------------
@Override
@SuppressWarnings("unchecked")
public void initialize() throws Exception {
final TypeSerializer<IT2> solutionSetSerializer;
final TypeComparator<IT2> solutionSetComparator;
// grab a handle to the hash ... | 3.26 |
flink_JoinWithSolutionSetSecondDriver_setup_rdh | // --------------------------------------------------------------------------------------------
@Override
public void setup(TaskContext<FlatJoinFunction<IT1, IT2, OT>, OT> context) {
this.taskContext = context;
this.running = true;
} | 3.26 |
flink_InputGateDeploymentDescriptor_getConsumedPartitionType_rdh | /**
* Returns the type of this input channel's consumed result partition.
*
* @return consumed result partition type
*/
public ResultPartitionType getConsumedPartitionType() {
return f1;
} | 3.26 |
flink_InputGateDeploymentDescriptor_getConsumedSubpartitionIndexRange_rdh | /**
* Return the index range of the consumed subpartitions.
*/
public IndexRange getConsumedSubpartitionIndexRange() {
return consumedSubpartitionIndexRange;
} | 3.26 |
flink_DistCp_isLocal_rdh | // -----------------------------------------------------------------------------------------
// HELPER METHODS
// -----------------------------------------------------------------------------------------
private static boolean isLocal(final ExecutionEnvironment env) {
return env instanceof LocalEnvironment;
} | 3.26 |
flink_AsyncDynamicTableSinkBuilder_setMaxBufferedRequests_rdh | /**
*
* @param maxBufferedRequests
* the maximum buffer length. Callbacks to add elements to the buffer
* and calls to write will block if this length has been reached and will only unblock if
* elements from the buffer have been removed for flushing.
* @return {@link ConcreteBuilderT} itself
*/
public Con... | 3.26 |
flink_AsyncDynamicTableSinkBuilder_m0_rdh | /**
*
* @param maxInFlightRequests
* maximum number of uncompleted calls to submitRequestEntries that
* the SinkWriter will allow at any given point. Once this point has reached, writes and
* callbacks to add elements to the buffer may block until one or more requests to
* submitRequestEntries completes.
... | 3.26 |
flink_AsyncDynamicTableSinkBuilder_setMaxBatchSize_rdh | /**
*
* @param maxBatchSize
* maximum number of elements that may be passed in a list to be written
* downstream.
* @return {@link ConcreteBuilderT} itself
*/public ConcreteBuilderT setMaxBatchSize(int maxBatchSize) {
this.maxBatchSize = maxBatchSize;
return ((ConcreteBuilderT) (this));
} | 3.26 |
flink_AsyncDynamicTableSinkBuilder_setMaxTimeInBufferMS_rdh | /**
*
* @param maxTimeInBufferMS
* the maximum amount of time an element may remain in the buffer. In
* most cases elements are flushed as a result of the batch size (in bytes or number) being
* reached or during a snapshot. However, there are scenarios where an element may remain in
* the buffer forever ... | 3.26 |
flink_AsyncDynamicTableSinkBuilder_setMaxBufferSizeInBytes_rdh | /**
*
* @param maxBufferSizeInBytes
* a flush will be attempted if the most recent call to write
* introduces an element to the buffer such that the total size of the buffer is greater
* than or equal to this threshold value.
* @return {@link ConcreteBuilderT} itself
*/
... | 3.26 |
flink_MetricQueryService_createMetricQueryService_rdh | /**
* Starts the MetricQueryService actor in the given actor system.
*
* @param rpcService
* The rpcService running the MetricQueryService
* @param resourceID
* resource ID to disambiguate the actor name
* @return actor reference to the MetricQueryService
*/
public static MetricQueryService createMetricQuer... | 3.26 |
flink_MetricQueryService_replaceInvalidChars_rdh | /**
* Lightweight method to replace unsupported characters. If the string does not contain any
* unsupported characters, this method creates no new string (and in fact no new objects at
* all).
*
* <p>Replacements:
*
* <ul>
* <li>{@code space : . ,} are replaced by {@code _} (underscore)
* </ul>
*/
private ... | 3.26 |
flink_SimpleOperatorFactory_of_rdh | /**
* Create a SimpleOperatorFactory from existed StreamOperator.
*/
@SuppressWarnings("unchecked")
public static <OUT> SimpleOperatorFactory<OUT> of(StreamOperator<OUT> operator) {
if (operator == null) {
return null;
} else if ((operator instanceof StreamSource) && (... | 3.26 |
flink_WatermarkAssignerOperator_processWatermark_rdh | /**
* Override the base implementation to completely ignore watermarks propagated from upstream (we
* rely only on the {@link WatermarkGenerator} to emit watermarks from here).
*/
@Override
public void processWatermark(Watermark mark) throws Exception {
// if we receive a Long.MAX_VALUE watermark we forward it since... | 3.26 |
flink_StreamNonDeterministicPhysicalPlanResolver_resolvePhysicalPlan_rdh | /**
* Try to resolve the NDU problem if configured {@link OptimizerConfigOptions#TABLE_OPTIMIZER_NONDETERMINISTIC_UPDATE_STRATEGY} is in `TRY_RESOLVE`
* mode. Will raise an error if the NDU issues in the given plan can not be completely solved.
*/
public static List<RelNode> resolvePhysicalPlan(List<RelNode> expande... | 3.26 |
flink_ExecutionConfigAccessor_fromConfiguration_rdh | /**
* Creates an {@link ExecutionConfigAccessor} based on the provided {@link Configuration}.
*/
public static ExecutionConfigAccessor fromConfiguration(final Configuration configuration) {
return new ExecutionConfigAccessor(checkNotNull(configuration));
} | 3.26 |
flink_ExecutionConfigAccessor_fromProgramOptions_rdh | /**
* Creates an {@link ExecutionConfigAccessor} based on the provided {@link ProgramOptions} as
* provided by the user through the CLI.
*/
public static <T> ExecutionConfigAccessor fromProgramOptions(final ProgramOptions options, final List<T> jobJars) {
checkNotNull(options);
checkNotNull(jobJars);
f... | 3.26 |
flink_TGetQueryIdReq_findByThriftIdOrThrow_rdh | /**
* Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null)
throw new IllegalArgumentException(("Field " + fieldId) + " doesn't exist!");
... | 3.26 |
flink_TGetQueryIdReq_isSet_rdh | /**
* Returns true if field corresponding to fieldID is set (has been assigned a value) and false
* otherwise
*/
public boolean isSet(_Fields field) {if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case OPERATION_HANDLE :
return isSetOperationHandl... | 3.26 |
flink_TGetQueryIdReq_findByName_rdh | /**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);} | 3.26 |
flink_TGetQueryIdReq_findByThriftId_rdh | /**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch (fieldId) {
case 1 :
// OPERATION_HANDLE
return OPERATION_HANDLE;
default :
return null;
}
} | 3.26 |
flink_TGetQueryIdReq_isSetOperationHandle_rdh | /**
* Returns true if field operationHandle is set (has been assigned a value) and false otherwise
*/
public boolean isSetOperationHandle() {return this.operationHandle != null;
} | 3.26 |
flink_RequestJobsWithIDsOverview_readResolve_rdh | /**
* Preserve the singleton property by returning the singleton instance
*/
private Object readResolve() {
return
INSTANCE;
} | 3.26 |
flink_RequestJobsWithIDsOverview_hashCode_rdh | // ------------------------------------------------------------------------
@Override
public int hashCode() {
return RequestJobsWithIDsOverview.class.hashCode();
} | 3.26 |
flink_OuterJoinPaddingUtil_padLeft_rdh | /**
* Returns a padding result with the given left row.
*
* @param leftRow
* the left row to pad
* @return the reusable null padding result
*/
public final RowData padLeft(RowData leftRow) {
return joinedRow.replace(leftRow, rightNullPaddingRow);
} | 3.26 |
flink_OuterJoinPaddingUtil_m0_rdh | /**
* Returns a padding result with the given right row.
*
* @param rightRow
* the right row to pad
* @return the reusable null padding result
*/
public final RowData m0(RowData rightRow) {
return joinedRow.replace(leftNullPaddingRow,
rightRow);
} | 3.26 |
flink_StopWithSavepointTerminationManager_stopWithSavepoint_rdh | /**
* Enforces the correct completion order of the passed {@code CompletableFuture} instances in
* accordance to the contract of {@link StopWithSavepointTerminationHandler}.
*
* @param completedSavepointFuture
* The {@code CompletableFuture} of the savepoint creation step.
* @param terminatedExecutionStatesFutu... | 3.26 |
flink_ArrowWriter_getFieldWriters_rdh | /**
* Gets the field writers.
*/
public ArrowFieldWriter<IN>[] getFieldWriters() {
return fieldWriters;
} | 3.26 |
flink_ArrowWriter_write_rdh | /**
* Writes the specified row which is serialized into Arrow format.
*/
public void write(IN row) {
for (int i = 0; i < fieldWriters.length; i++) {
fieldWriters[i].write(row, i);
}
} | 3.26 |
flink_ArrowWriter_finish_rdh | /**
* Finishes the writing of the current row batch.
*/
public void finish() {
root.setRowCount(fieldWriters[0].getCount());
for (ArrowFieldWriter<IN> fieldWriter : fieldWriters) {
fieldWriter.finish();
}
} | 3.26 |
flink_ArrowWriter_reset_rdh | /**
* Resets the state of the writer to write the next batch of rows.
*/
public void reset() {
root.setRowCount(0);
for (ArrowFieldWriter fieldWriter : fieldWriters) {
fieldWriter.reset();
}
} | 3.26 |
flink_S3RecoverableFsDataOutputStream_write_rdh | // ------------------------------------------------------------------------
// stream methods
// ------------------------------------------------------------------------
@Override
public void
write(int b) throws IOException {
f1.write(b);
} | 3.26 |
flink_S3RecoverableFsDataOutputStream_persist_rdh | // ------------------------------------------------------------------------
// recoverable stream methods
// ------------------------------------------------------------------------
@Override
public ResumeRecoverable persist() throws IOException {lock();
try {
f1.flush();
openNewPartIfNecessary(f0);... | 3.26 |
flink_S3RecoverableFsDataOutputStream_openNewPartIfNecessary_rdh | // ------------------------------------------------------------------------
private void openNewPartIfNecessary(long
sizeThreshold) throws IOException {
final long fileLength = f1.getPos();if (fileLength >= sizeThreshold) { lock();
try {
uploadCurrentAndOpenNewPart(fileLength);
} finally... | 3.26 |
flink_S3RecoverableFsDataOutputStream_lock_rdh | // ------------------------------------------------------------------------
// locking
// ------------------------------------------------------------------------
private void lock() throws IOException {
try {
lock.lockInterruptibly();
} catch (InterruptedException e) {
Thread.currentThread().i... | 3.26 |
flink_S3RecoverableFsDataOutputStream_newStream_rdh | // ------------------------------------------------------------------------
// factory methods
// ------------------------------------------------------------------------
public static S3RecoverableFsDataOutputStream newStream(final RecoverableMultiPartUpload upload, final FunctionWithException<File, RefCountedFileWith... | 3.26 |
flink_SupportsReadingMetadata_supportsMetadataProjection_rdh | /**
* Defines whether projections can be applied to metadata columns.
*
* <p>This method is only called if the source does <em>not</em> implement {@link SupportsProjectionPushDown}. By default, the planner will only apply metadata columns which
* have actually been selected in the query regardless. By returning {@c... | 3.26 |
flink_BytesKeyNormalizationUtil_putNormalizedKey_rdh | /**
* Writes the normalized key of given record. The normalized key consists of the key serialized
* as bytes and the timestamp of the record.
*
* <p>NOTE: The key does not represent a logical order. It can be used only for grouping keys!
*/
static <IN> void putNormalizedKey(Tuple2<byte[], StreamRecord<IN>>
record... | 3.26 |
flink_CombineValueIterator_set_rdh | /**
* Sets the interval for the values that are to be returned by this iterator.
*
* @param first
* The position of the first value to be returned.
* @param last
* The position of the last value to be returned.
*/
public void set(int first, int last) {
this.last = last;
this.position =
first;
... | 3.26 |
flink_InputSelection_from_rdh | /**
* Returns a {@code Builder} that uses the input mask of the specified {@code selection} as
* the initial mask.
*/
public static Builder from(InputSelection selection) {
Builder builder = new Builder();
builder.inputMask = selecti... | 3.26 |
flink_InputSelection_areAllInputsSelected_rdh | /**
* Tests if all inputs are selected.
*
* @return {@code true} if the input mask equals -1, {@code false} otherwise.
*/
public boolean areAllInputsSelected() {
return inputMask == (-1L);
}
/**
* Fairly select one of the two inputs for reading. When {@code inputMask} includes two inputs
... | 3.26 |
flink_InputSelection_select_rdh | /**
* Selects an input identified by the given {@code inputId}.
*
* @param inputId
* the input id numbered starting from 1 to 64, and `1` indicates the first
* input. Specially, `-1` indicates all inputs.
* @return a reference to this object.
*/
public Builder select(int inputId) {
if ((inputId > 0) && (... | 3.26 |
flink_InputSelection_build_rdh | /**
* Build normalized mask, if all inputs were manually selected, inputMask will be normalized
* to -1.
*/
public InputSelection build(int inputCount) {
long allSelectedMask = (1L << inputCount) - 1;
if (inputMask == allSelectedMask) {
inputMask = -1;
} else if (inputMask > allSelectedMas... | 3.26 |
flink_InputSelection_isInputSelected_rdh | /**
* Tests if the input specified by {@code inputId} is selected.
*
* @param inputId
* The input id, see the description of {@code inputId} in {@link Builder#select(int)}.
* @return {@code true} if the input is selected, {@code false} otherwise.
*/
public boolean isInputSelected(int inputId) {
return
(... | 3.26 |
flink_InMemoryPartition_appendRecord_rdh | // --------------------------------------------------------------------------------------------------
/**
* Inserts the given object into the current buffer. This method returns a pointer that can be
* used to address the written record in this partition.
*
* @param record
* The object to be written to the parti... | 3.26 |
flink_InMemoryPartition_resetOverflowBuckets_rdh | /**
* resets overflow bucket counters and returns freed memory and should only be used for resizing
*
* @return freed memory segments
*/
public ArrayList<MemorySegment> resetOverflowBuckets() {
this.numOverflowSegments
= 0;
this.nextOverflowBucket = 0;
ArrayList<MemorySegment> result = new ArrayList... | 3.26 |
flink_InMemoryPartition_getBlockCount_rdh | /**
*
* @return number of segments owned by partition
*/
public int getBlockCount() {
return this.partitionPages.size();
} | 3.26 |
flink_InMemoryPartition_getPartitionNumber_rdh | // --------------------------------------------------------------------------------------------------
/**
* Gets the partition number of this partition.
*
* @return This partition's number.
*/
public int getPartitionNumber() {
return this.partitionNumber;
} | 3.26 |
flink_InMemoryPartition_setPartitionNumber_rdh | /**
* overwrites partition number and should only be used on compaction partition
*
* @param number
* new partition
*/
public void setPartitionNumber(int number) {
this.partitionNumber = number;
} | 3.26 |
flink_InMemoryPartition_allocateSegments_rdh | /**
* attempts to allocate specified number of segments and should only be used by compaction
* partition fails silently if not enough segments are available since next compaction could
* still succeed
*
* @param numberOfSegments
* allocation count
*/
public void allocateSegments(int numberOfSegments) {
wh... | 3.26 |
flink_InMemoryPartition_setIsCompacted_rdh | /**
* sets compaction status (should only be set <code>true</code> directly after compaction and
* <code>false</code> when garbage was created)
*
* @param compacted
* compaction status
*/
public void setIsCompacted(boolean compacted) {
this.compacted = compacted;
} | 3.26 |
flink_InMemoryPartition_isCompacted_rdh | /**
*
* @return true if garbage exists in partition
*/
public boolean isCompacted() {
return
this.compacted;
} | 3.26 |
flink_InMemoryPartition_m0_rdh | /**
* number of records in partition including garbage
*
* @return number record count
*/
public long m0() {return this.recordCounter;
} | 3.26 |
flink_InMemoryPartition_resetRWViews_rdh | /**
* resets read and write views and should only be used on compaction partition
*/
public void resetRWViews()
{this.writeView.resetTo(0L);
this.readView.setReadPosition(0L);} | 3.26 |
flink_InMemoryPartition_resetRecordCounter_rdh | /**
* sets record counter to zero and should only be used on compaction partition
*/
public void resetRecordCounter() {
this.recordCounter = 0L;
} | 3.26 |
flink_InMemoryPartition_clearAllMemory_rdh | /**
* releases all of the partition's segments (pages and overflow buckets)
*
* @param target
* memory pool to release segments to
*/
public void clearAllMemory(List<MemorySegment> target) {
// return the overflow segments
if (this.overflowSegments != null) {
for (int k = 0; k < this.numOverflowS... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.