name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_InputTypeStrategies_comparable_rdh | /**
* Strategy that checks all types are comparable with each other. Requires at least one
* argument.
*/
public static InputTypeStrategy comparable(ConstantArgumentCount argumentCount, StructuredComparison requiredComparison) {
return new ComparableTypeStrategy(argumentCount, requiredComparison);
} | 3.26 |
flink_FloatWriter_forRow_rdh | /**
* {@link ArrowFieldWriter} for Float.
*/
@Internal
| 3.26 |
flink_DefaultVertexParallelismAndInputInfosDecider_decideParallelismAndEvenlyDistributeData_rdh | /**
* Decide parallelism and input infos, which will make the data be evenly distributed to
* downstream subtasks, such that different downstream subtasks consume roughly the same amount
* of data.
*
* @param jobVertexId
* The job vertex id
* @param consumedResults
* The information of consumed blocking res... | 3.26 |
flink_DefaultVertexParallelismAndInputInfosDecider_decideParallelismAndEvenlyDistributeSubpartitions_rdh | /**
* Decide parallelism and input infos, which will make the subpartitions be evenly distributed
* to downstream subtasks, such that different downstream subtasks consume roughly the same
* number of subpartitions.
*
* @param jobVertexId
* The job vertex id
* @param consumedResults
* The information of con... | 3.26 |
flink_NettyConfig_getServerConnectBacklog_rdh | // ------------------------------------------------------------------------
// Getters
// ------------------------------------------------------------------------
public int getServerConnectBacklog() {
return config.getInteger(NettyShuffleEnvironmentOptions.CONNECT_BACKLOG);
} | 3.26 |
flink_DecimalDataUtils_sign_rdh | /**
* SQL <code>SIGN</code> operator applied to BigDecimal values. preserve precision and scale.
*/
public static DecimalData sign(DecimalData b0) {
if (b0.isCompact()) {
return new DecimalData(b0.precision, b0.scale, signum(b0) * POW10[b0.scale], null);
} else {
return fromBigDecimal(BigDecimal.valueOf(s... | 3.26 |
flink_DecimalDataUtils_signum_rdh | /**
* Returns the signum function of this decimal. (The return value is -1 if this decimal is
* negative; 0 if this decimal is zero; and 1 if this decimal is positive.)
*
* @return the signum function of this decimal.
*/
public static int signum(DecimalData decimal) {
if (decimal.isCompact()) {
retu... | 3.26 |
flink_DecimalDataUtils_floor_rdh | // floor()/ceil() preserve precision, but set scale to 0.
// note that result may exceed the original precision.
public static DecimalData floor(DecimalData decimal) {
BigDecimal bd = decimal.toBigDecimal().setScale(0, RoundingMode.FLOOR);
return fromBigDecimal(bd, bd.precision(), 0);
} | 3.26 |
flink_DecimalDataUtils_sround_rdh | /**
* SQL <code>ROUND</code> operator applied to BigDecimal values.
*/
public static DecimalData sround(DecimalData b0, int r) {
if (r >= b0.scale) {
return b0;
}BigDecimal b2 = b0.toBigDecimal().movePointRight(r).setScale(0, RoundingMode.HALF_UP).movePointLeft(r);
int v14 =
b0.precision;
int s = b0.scale;
if (... | 3.26 |
flink_DecimalDataUtils_divideToIntegralValue_rdh | /**
* Returns a {@code DecimalData} whose value is the integer part of the quotient {@code (this /
* divisor)} rounded down.
*
* @param value
* value by which this {@code DecimalData} is to be divided.
* @param divisor
* value by which this {@code DecimalData} is to be divided.
* @return The integer part of... | 3.26 |
flink_DecimalDataUtils_castToIntegral_rdh | // cast decimal to integral or floating data types, by SQL standard.
// to cast to integer, rounding-DOWN is performed, and overflow will just return null.
// to cast to floats, overflow will not happen, because precision<=38.
public static long castToIntegral(DecimalData dec) {
BigDecimal bd = dec.toBigDecimal();
... | 3.26 |
flink_RuntimeRestAPIDocGenerator_main_rdh | /**
* Generates the Runtime REST API documentation.
*
* @param args
* args[0] contains the directory into which the generated files are placed
* @throws IOException
* if any file operation failed
*/
public static void
main(String[] args) throws IOException, ConfigurationException {
String outputDirector... | 3.26 |
flink_SqlAlterViewPropertiesConverter_convertSqlNode_rdh | /**
* A converter for {@link SqlAlterViewProperties}.
*/public class SqlAlterViewPropertiesConverter implements SqlNodeConverter<SqlAlterViewProperties> {
@Override
public Operation convertSqlNode(SqlAlterViewProperties
alterView, ConvertContext context) {
CatalogView oldView = validateAlterView(a... | 3.26 |
flink_FixedLengthByteKeyComparator_supportsSerializationWithKeyNormalization_rdh | // --------------------------------------------------------------------------------------------
// unsupported normalization
// --------------------------------------------------------------------------------------------
@Override
public boolean supportsSerializationWithKeyNormalization() {
return false;
} | 3.26 |
flink_HiveParserStorageFormat_fillStorageFormat_rdh | /**
* Returns true if the passed token was a storage format token and thus was processed
* accordingly.
*/
public boolean fillStorageFormat(HiveParserASTNode child) throws SemanticException {
switch (child.getToken().getType()) {
case HiveASTParser.TOK_TABLEFILEFORMAT :
if (child.getChildCou... | 3.26 |
flink_GroupCombineOperator_translateSelectorFunctionReducer_rdh | // --------------------------------------------------------------------------------------------
@SuppressWarnings("unchecked")
private static <IN, OUT, K> PlanUnwrappingGroupCombineOperator<IN, OUT, K> translateSelectorFunctionReducer(SelectorFunctionKeys<IN, ?> rawKeys, GroupCombineFunction<IN,
OUT> function, TypeInf... | 3.26 |
flink_GroupCombineOperator_translateToDataFlow_rdh | // --------------------------------------------------------------------------------------------
// Translation
// --------------------------------------------------------------------------------------------
@Override
protected GroupCombineOperatorBase<?, OUT, ?> translateToDataFlow(Operator<IN> input) {
String v2 =... | 3.26 |
flink_RocksDBIncrementalCheckpointUtils_beforeThePrefixBytes_rdh | /**
* check whether the bytes is before prefixBytes in the character order.
*/
public static boolean beforeThePrefixBytes(@Nonnull
byte[] bytes, @Nonnull
byte[] prefixBytes) {
final int prefixLength = prefixBytes.length;
for (int i =
0; i < prefixLength; ++i) {
int r = ((char) (prefixBytes[i])) -... | 3.26 |
flink_RocksDBIncrementalCheckpointUtils_stateHandleEvaluator_rdh | /**
* Evaluates state handle's "score" regarding to the target range when choosing the best state
* handle to init the initial db for recovery, if the overlap fraction is less than
* overlapFractionThreshold, then just return {@code Score.MIN} to mean the handle has no chance
* to be the initial handle.
*/
private... | 3.26 |
flink_RocksDBIncrementalCheckpointUtils_clipDBWithKeyGroupRange_rdh | /**
* The method to clip the db instance according to the target key group range using the {@link RocksDB#delete(ColumnFamilyHandle, byte[])}.
*
* @param db
* the RocksDB instance to be clipped.
* @param columnFamilyHandles
* the column families in the db instance.
* @param targetKeyGroupRange
* the targe... | 3.26 |
flink_RocksDBIncrementalCheckpointUtils_deleteRange_rdh | /**
* Delete the record falls into [beginKeyBytes, endKeyBytes) of the db.
*
* @param db
* the target need to be clipped.
* @param columnFamilyHandles
* the column family need to be clipped.
* @param beginKeyBytes
* the begin key bytes
* @param endKeyBytes
* the end key bytes
*/
private static void d... | 3.26 |
flink_RocksDBIncrementalCheckpointUtils_chooseTheBestStateHandleForInitial_rdh | /**
* Choose the best state handle according to the {@link #stateHandleEvaluator(KeyedStateHandle,
* KeyGroupRange, double)} to init the initial db.
*
* @param restoreStateHandles
* The candidate state handles.
* @param targetKeyGroupRange
* The... | 3.26 |
flink_CoLocationGroupImpl_getId_rdh | // --------------------------------------------------------------------------------------------
@Override
public AbstractID getId() {
return id;
} | 3.26 |
flink_CoLocationGroupImpl_addVertex_rdh | // --------------------------------------------------------------------------------------------
public void addVertex(JobVertex vertex) {
Preconditions.checkNotNull(vertex);
this.vertices.add(vertex);
} | 3.26 |
flink_StaticResultProvider_rowToInternalRow_rdh | /**
* This function supports only String, long, int and boolean fields.
*/
@VisibleForTesting
static RowData rowToInternalRow(Row row) {
Object[] values = new Object[row.getArity()];
for (int i = 0; i < row.getArity(); i++) {
Object value = row.getField(i);
if (value == null) {
val... | 3.26 |
flink_NonReusingBuildFirstHashJoinIterator_open_rdh | // --------------------------------------------------------------------------------------------
@Override
public void open() throws IOException, MemoryAllocationException, InterruptedException {
this.hashJoin.open(this.firstInput, this.secondInput, this.buildSideOuterJoin);
} | 3.26 |
flink_BlobKey_addToMessageDigest_rdh | /**
* Adds the BLOB key to the given {@link MessageDigest}.
*
* @param md
* the message digest to add the BLOB key to
*/
public void addToMessageDigest(MessageDigest md) {
md.update(this.key);
} | 3.26 |
flink_BlobKey_getHash_rdh | /**
* Returns the hash component of this key.
*
* @return a 20 bit hash of the contents the key refers to
*/
@VisibleForTesting
public byte[] getHash() {
return key;
} | 3.26 |
flink_BlobKey_readFromInputStream_rdh | // --------------------------------------------------------------------------------------------
/**
* Auxiliary method to read a BLOB key from an input stream.
*
* @param inputStream
* the input stream to read the BLOB key from
* @return the read BLOB key
* @throws IOException
* throw if an I/O error occurs ... | 3.26 |
flink_BlobKey_writeToOutputStream_rdh | /**
* Auxiliary method to write this BLOB key to an output stream.
*
* @param outputStream
* the output stream to write the BLOB key to
* @throws IOException
* thrown if an I/O error occurs while writing the BLOB key
*/
void writeToOutputStream(final OutputStream outputStream) throws IOException {
output... | 3.26 |
flink_BlobKey_createKey_rdh | /**
* Returns the right {@link BlobKey} subclass for the given parameters.
*
* @param type
* whether the referenced BLOB is permanent or transient
* @param key
* the actual key data
* @param random
* the random component of the key
* @return BlobKey subclass
*/
static BlobKey createKey(BlobType type, by... | 3.26 |
flink_JoinRecordStateViews_create_rdh | /**
* Creates a {@link JoinRecordStateView} depends on {@link JoinInputSideSpec}.
*/
public static JoinRecordStateView create(RuntimeContext ctx, String stateName, JoinInputSideSpec inputSideSpec, InternalTypeInfo<RowData> recordType, long retentionTime)
{
StateTtlConfig ttlConfig = createTtlConfig(retentionTime)... | 3.26 |
flink_Over_orderBy_rdh | /**
* Specifies the time attribute on which rows are ordered.
*
* <p>For streaming tables, reference a rowtime or proctime time attribute here to specify the
* time mode.
*
* <p>For batch tables, refer to a timestamp or long attribute.
*
* @param orderBy
* field reference
* @return an over window with defin... | 3.26 |
flink_Over_partitionBy_rdh | /**
* Partitions the elements on some partition keys.
*
* <p>Each partition is individually sorted and aggregate functions are applied to each
* partition separately.
*
* @param partitionBy
* list of field references
* @return an over window with defined partitioning
*/
public static OverWindowPartitioned pa... | 3.26 |
flink_Client_shutdown_rdh | /**
* Shuts down the client and closes all connections.
*
* <p>After a call to this method, all returned futures will be failed.
*
* @return A {@link CompletableFuture} that will be completed when the shutdown process is done.
*/
public CompletableFu... | 3.26 |
flink_TaskInfo_m0_rdh | /**
* Gets the parallelism with which the parallel task runs.
*
* @return The parallelism with which the parallel task runs.
*/
public int m0()
{
return this.numberOfParallelSubtasks;
} | 3.26 |
flink_TaskInfo_m1_rdh | /**
* Returns the name of the task, appended with the subtask indicator, such as "MyTask (3/6)#1",
* where 3 would be ({@link #getIndexOfThisSubtask()} + 1), and 6 would be {@link #getNumberOfParallelSubtasks()}, and 1 would be {@link #getAttemptNumber()}.
*
* @return The name of the task, with subtask indicator.
... | 3.26 |
flink_TaskInfo_getIndexOfThisSubtask_rdh | /**
* Gets the number of this parallel subtask. The numbering starts from 0 and goes up to
* parallelism-1 (parallelism as returned by {@link #getNumberOfParallelSubtasks()}).
*
* @return The index of the parallel subtask.
*/
public int getIndexOfThisSubtask(... | 3.26 |
flink_AbstractMergeIterator_crossFirst1withNValues_rdh | /**
* Crosses a single value from the first input with N values, all sharing a common key.
* Effectively realizes a <i>1:N</i> join.
*
* @param val1
* The value form the <i>1</i> side.
* @param firstValN
* The first of the values from the <i>N</i> side.
* @param valsN
* Iterator over remaining <i>N</i> s... | 3.26 |
flink_AbstractMergeIterator_crossSecond1withNValues_rdh | /**
* Crosses a single value from the second side with N values, all sharing a common key.
* Effectively realizes a <i>N:1</i> join.
*
* @param val1
* The value form the <i>1</i> side.
* @param firstValN
* The first of the values from the <i>N</i> side.
* @param valsN
* Iterator over remaining <i>N</i> s... | 3.26 |
flink_StreamTaskActionExecutor_synchronizedExecutor_rdh | /**
* Returns an ExecutionDecorator that synchronizes each invocation on a given object.
*/
static SynchronizedStreamTaskActionExecutor synchronizedExecutor(Object mutex) {
return new SynchronizedStreamTaskActionExecutor(mutex);
}
/**
* A {@link StreamTaskActionExecutor} that synchronizes every operation on t... | 3.26 |
flink_OptimizableHashSet_arraySize_rdh | /**
* Returns the least power of two smaller than or equal to 2<sup>30</sup> and larger than or
* equal to <code>Math.ceil( expected / f )</code>.
*
* @param expected
* the expected number of elements in a hash table.
* @param f
* the load factor.
* @return the minimum possible size for a backing array.
* ... | 3.26 |
flink_OptimizableHashSet_m0_rdh | /**
* Is there a null key.
*/
public boolean m0() {
return containsNull;
} | 3.26 |
flink_NullValueComparator_supportsSerializationWithKeyNormalization_rdh | // --------------------------------------------------------------------------------------------
// unsupported normalization
// --------------------------------------------------------------------------------------------
@Override
public boolean supportsSerializationWithKeyNormalization() {
return
false;
} | 3.26 |
flink_RequestedGlobalProperties_filterBySemanticProperties_rdh | /**
* Filters these properties by what can be preserved by the given SemanticProperties when
* propagated down to the given input.
*
* @param props
* The SemanticProperties which define which fields are preserved.
* @param input
* The index of the operator's input.
* @return The filtered RequestedGlobalProp... | 3.26 |
flink_RequestedGlobalProperties_reset_rdh | /**
* This method resets the properties to a state where no properties are given.
*/
public void reset() {
this.partitioning = PartitioningProperty.RANDOM_PARTITIONED;
this.ordering = null;
this.partitioningFields = null;
this.dataDistribution = null;
this.customPartitioner =
null;
} | 3.26 |
flink_RequestedGlobalProperties_hashCode_rdh | // ------------------------------------------------------------------------
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result =
(prime * result) + (partitioning == null ? 0 : partitioning.ordinal());
result = (prime * result) + (partitioningFields ==
null ? 0 : partitioningFields.hashCode(... | 3.26 |
flink_RequestedGlobalProperties_isMetBy_rdh | /**
* Checks, if this set of interesting properties, is met by the given produced properties.
*
* @param props
* The properties for which to check whether they meet these properties.
* @return True, if the properties are met, false otherwise.
*/
public boolean isMetBy(GlobalPrope... | 3.26 |
flink_RequestedGlobalProperties_getCustomPartitioner_rdh | /**
* Gets the custom partitioner associated with these properties.
*
* @return The custom partitioner associated with these properties.
*/
public Partitioner<?> getCustomPartitioner() {
return customPartitioner;
} | 3.26 |
flink_RequestedGlobalProperties_isTrivial_rdh | /**
* Checks, if the properties in this object are trivial, i.e. only standard values.
*/
public boolean isTrivial() {
return (this.partitioning == null) || (this.partitioning == PartitioningProperty.RANDOM_PARTITIONED);} | 3.26 |
flink_RequestedGlobalProperties_setHashPartitioned_rdh | // --------------------------------------------------------------------------------------------
/**
* Sets these properties to request a hash partitioning on the given fields.
*
* <p>If the fields are provided as {@link FieldSet}, then any permutation of the fields is a
* valid partitioning, including subsets. If t... | 3.26 |
flink_RequestedGlobalProperties_setCustomPartitioned_rdh | /**
* Sets these properties to request a custom partitioning with the given {@link Partitioner}
* instance.
*
* <p>If the fields are provided as {@link FieldSet}, then any permutation of the fields is a
* valid partitioning, including subsets. If the fields are given as a {@link FieldList}, then
* only an exact p... | 3.26 |
flink_RequestedGlobalProperties_setAnyPartitioning_rdh | /**
* Sets these properties to request some partitioning on the given fields. This will allow both
* hash partitioning and range partitioning to match.
*
* <p>If the fields are provided as {@link FieldSet}, then any permutation of the fields is a
* valid partitioning, including subsets. If the fields are given as ... | 3.26 |
flink_RequestedGlobalProperties_parameterizeChannel_rdh | /**
* Parametrizes the ship strategy fields of a channel such that the channel produces the desired
* global properties.
*
* @param channel
* The channel to parametrize.
* @param globalDopChange
* Flag indicating whether the parallelism changes between sender and
* receiver.
* @param exchangeMode
* Th... | 3.26 |
flink_Tuple25_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_Tuple25_copy_rdh | /**
* Shallow tuple copy.
*
* @return A new Tuple with the same fields as this.
*/
@Override
@SuppressWarnings("unchecked")
public Tuple25<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18,
T19, T20, T21, T22, T23, T24> copy() {
return new Tuple25<>(this.f0, this.f1, this.f2, thi... | 3.26 |
flink_Tuple25_toString_rdh | // -------------------------------------------------------------------------------------------------
// standard utilities
// -------------------------------------------------------------------------------------------------
/**
* Creates a string representation of the tuple in the form (f0, f1, f2, f3, f4, f5, f6, f7,... | 3.26 |
flink_Tuple25_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
* @param f4
* The value for field 4
* @param f5
* The value for field 5
* @param f6
* The valu... | 3.26 |
flink_CliChangelogResultView_getHelpOptions_rdh | // --------------------------------------------------------------------------------------------
private List<Tuple2<String, String>> getHelpOptions() {
final List<Tuple2<String, String>> options = new ArrayList<>();
options.add(Tuple2.of("Q", CliStrings.RESULT_QUIT));
options.add(Tuple2.of("R", CliStrings.RESULT_REFRE... | 3.26 |
flink_SharedBufferAccessor_releaseEvent_rdh | /**
* Decreases the reference counter for the given event so that it can be removed once the
* reference counter reaches 0.
*
* @param eventId
* id of the event
* @throws Exception
* Thrown if the system cannot access the state.
*/
public void releaseEvent(EventId eventId) throws Exception {
Lockable<V... | 3.26 |
flink_SharedBufferAccessor_lockNode_rdh | /**
* Increases the reference counter for the given entry so that it is not accidentally removed.
*
* @param node
* id of the entry
* @param version
* dewey number of the (potential) edge that locks the given node
*/
public void lockNode(final NodeId node, final DeweyNumber version) {
Lockable<SharedBuff... | 3.26 |
flink_SharedBufferAccessor_releaseNode_rdh | /**
* Decreases the reference counter for the given entry so that it can be removed once the
* reference counter reaches 0.
*
* @param node
* id of the entry
* @param version
* dewey number of the (potential) edge that locked the given node
* @throws Exception
* Thrown if the system cannot access the sta... | 3.26 |
flink_SharedBufferAccessor_extractPatterns_rdh | /**
* Returns all elements from the previous relation starting at the given entry.
*
* @param nodeId
* id of the starting entry
* @param version
* Version of the previous relation which shall be extracted
* @return Collection of previous relations starting with the given value
*/
public List<Map<String, Lis... | 3.26 |
flink_SharedBufferAccessor_materializeMatch_rdh | /**
* Extracts the real event from the sharedBuffer with pre-extracted eventId.
*
* @param match
* the matched event's eventId.
* @return the event associated with the eventId.
*/
public Map<String, List<V>> materializeMatch(Map<String, List<EventId>> match) {
Map<String, List<V>> materializedMatch = Collec... | 3.26 |
flink_SharedBufferAccessor_close_rdh | /**
* Persists the entry in the cache to the underlay state.
*
* @throws Exception
* Thrown if the system cannot access the state.
*/
public void close() throws Exception {
sharedBuffer.flushCache();
} | 3.26 |
flink_SharedBufferAccessor_put_rdh | /**
* Stores given value (value + timestamp) under the given state. It assigns a preceding element
* relation to the previous entry.
*
* @param stateName
* name of the state that the event should be assigned to
* @param eventId
* unique id of event assigned by this SharedBuffer
* @param previousNodeId
* ... | 3.26 |
flink_SharedBufferAccessor_lockEvent_rdh | /**
* Increases the reference counter for the given event so that it is not accidentally removed.
*
* @param eventId
* id of the entry
*/
private void lockEvent(EventId eventId) {
Lockable<V> eventWrapper = sharedBuffer.getEvent(eventId);
checkState(eventWrapper != null, "Referring to non existent even... | 3.26 |
flink_SharedBufferAccessor_registerEvent_rdh | /**
* Adds another unique event to the shared buffer and assigns a unique id for it. It
* automatically creates a lock on this event, so it won't be removed during processing of that
* event. Therefore the lock should be removed after processing all {@link org.apache.flink.cep.nfa.ComputationState}s
*
* <p><b>NOTE... | 3.26 |
flink_SharedBufferAccessor_advanceTime_rdh | /**
* Notifies shared buffer that there will be no events with timestamp <&eq; the given value.
* It allows to clear internal counters for number of events seen so far per timestamp.
*
* @param timestamp
* watermark, no earlier events wil... | 3.26 |
flink_Broker_handIn_rdh | /**
* Hand in the object to share.
*/
public void handIn(String key, V obj) {
if (!retrieveSharedQueue(key).offer(obj)) {
throw new RuntimeException("Could not register the given element, broker slot is already occupied.");
}} | 3.26 |
flink_Broker_remove_rdh | /**
* Blocking retrieval and removal of the object to share.
*/
public void remove(String key) {
mediations.remove(key);
} | 3.26 |
flink_Broker_get_rdh | /**
* Blocking retrieval and removal of the object to share.
*/
public V get(String key) {
try {
BlockingQueue<V> queue = retrieveSharedQueue(key);
V objToShare = queue.take();
if (!queue.offer(objToShare)) {
... | 3.26 |
flink_Broker_retrieveSharedQueue_rdh | /**
* Thread-safe call to get a shared {@link BlockingQueue}.
*/
private BlockingQueue<V> retrieveSharedQueue(String key) {
BlockingQueue<V> queue = mediations.get(key);if (queue == null) {
queue = new ArrayBlockingQueue<V>(1);
BlockingQueue<V> commonQueue = mediations.putIfAbsent(key, queue);
... | 3.26 |
flink_Broker_getAndRemove_rdh | /**
* Blocking retrieval and removal of the object to share.
*/
public V getAndRemove(String key) {
try {V objToShare = retrieveSharedQueue(key).take();
mediations.remove(key);
return objToShare;
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
} | 3.26 |
flink_FileCache_shutdown_rdh | /**
* Shuts down the file cache by cancelling all.
*/
public void shutdown() {
synchronized(lock) {
// first shutdown the thread pool
ScheduledExecutorService es = this.executorService;
if (es != null) {
es.shutdown();
try {
es.awaitTermination(clean... | 3.26 |
flink_FileCache_createTmpFile_rdh | // ------------------------------------------------------------------------
/**
* If the file doesn't exists locally, retrieve the file from the blob-service.
*
* @param entry
* The cache entry descriptor (path, executable flag)
* @param jobID
* The ID of the job for which the file is copied.
* @return The h... | 3.26 |
flink_StreamTask_advanceToEndOfEventTime_rdh | /**
* Emits the {@link org.apache.flink.streaming.api.watermark.Watermark#MAX_WATERMARK
* MAX_WATERMARK} so that all registered timers are fired.
*
* <p>This is used by the source task when the job is {@code TERMINATED}. In the case, we want
* all the timers registered throughout the pipeline to fire and the relat... | 3.26 |
flink_StreamTask_createStateBackend_rdh | // ------------------------------------------------------------------------
// State backend
// ------------------------------------------------------------------------
private StateBackend createStateBackend() throws Exception {
final StateBackend fromApplication = configuration.getStateBackend(getUserCodeClassLoa... | 3.26 |
flink_StreamTask_m0_rdh | /**
* The finalize method shuts down the timer. This is a fail-safe shutdown, in case the original
* shutdown method was never called.
*
* <p>This should not be relied upon! It will cause shutdown to happen much later than if manual
* shutdown is attempted, and cause threads to linger for longer than needed.
*/
@... | 3.26 |
flink_StreamTask_getTaskNameWithSubtaskAndId_rdh | /**
* Gets the name of the task, appended with the subtask indicator and execution id.
*
* @return The name of the task, with subtask indicator and execution id.
*/
String getTaskNameWithSubtaskAndId() {
return ((getEnvironment().getTaskInfo().getTaskNameWithSubtasks() + " (") + getEnvironment().getExecutionId()) ... | 3.26 |
flink_StreamTask_toString_rdh | // ------------------------------------------------------------------------
// Utilities
// ------------------------------------------------------------------------
@Override
public String toString() {
return getName();
} | 3.26 |
flink_StreamTask_getCheckpointBarrierHandler_rdh | /**
* Acquires the optional {@link CheckpointBarrierHandler} associated with this stream task. The
* {@code CheckpointBarrierHandler} should exist if the task has data inputs and requires to
* align the barriers.
*/
protected Optional<CheckpointBarrierHandler>
getCheckpointBarrierHandler() {
return Optional.empty()... | 3.26 |
flink_StreamTask_disableInterruptOnCancel_rdh | /**
* While we are outside the user code, we do not want to be interrupted further upon
* cancellation. The shutdown logic below needs to make sure it does not issue calls that block
* and stall shutdown. Additionally, the cancellation watch dog will issue a hard-cancel (kill
* the TaskManager process) as a backup ... | 3.26 |
flink_StreamTask_processInput_rdh | /**
* This method implements the default action of the task (e.g. processing one event from the
* input). Implementations should (in general) be non-blocking.
*
* @param controller
* controller object for collaborative interaction between the action and the
* stream task.
* @t... | 3.26 |
flink_StreamTask_closeAllOperators_rdh | /**
* Closes all the operators if not closed before.
*/
private void closeAllOperators() throws Exception {
if ((operatorChain != null) && (!closedOperators)) {
closedOperators
= true;
operatorChain.closeAllOperators();}
} | 3.26 |
flink_StreamTask_handleAsyncException_rdh | /**
* Handles an exception thrown by another thread (e.g. a TriggerTask), other than the one
* executing the main task by failing the task entirely.
*
* <p>In more detail, it marks task execution failed for an external reason (a reason other than
* the task code itself throwing an exception). If the task is alread... | 3.26 |
flink_StreamTask_m3_rdh | /**
* Returns the {@link TimerService} responsible for telling the current processing time and
* registering actual timers.
*/
@VisibleForTesting
TimerService m3() {
return timerService;
} | 3.26 |
flink_StreamTask_getName_rdh | // ------------------------------------------------------------------------
// Access to properties and utilities
// ------------------------------------------------------------------------
/**
* Gets the name of the task, in the form "taskname (2/5)".
*
* @return The name of the task.
*/
public final String getNam... | 3.26 |
flink_StreamTask_dispatchOperatorEvent_rdh | // ------------------------------------------------------------------------
// Operator Events
// ------------------------------------------------------------------------
@Override
public void dispatchOperatorEvent(OperatorID operator, SerializedValue<OperatorEvent> event) throws FlinkException {
try {
main... | 3.26 |
flink_StreamTask_createStreamTaskStateInitializer_rdh | // ------------------------------------------------------------------------
// Core work methods of the Stream Task
// ------------------------------------------------------------------------
public StreamTaskStateInitializer createStreamTaskStateInitializer() {
InternalTimeServiceManager.Provider timerServiceProvider ... | 3.26 |
flink_StreamTask_triggerCheckpointAsync_rdh | // ------------------------------------------------------------------------
// Checkpoint and Restore
// ------------------------------------------------------------------------
@Override
public CompletableFuture<Boolean> triggerCheckpointAsync(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions)... | 3.26 |
flink_StreamTask_createRecordWriterDelegate_rdh | // ------------------------------------------------------------------------
@VisibleForTesting
public static <OUT> RecordWriterDelegate<SerializationDelegate<StreamRecord<OUT>>> createRecordWriterDelegate(StreamConfig configuration, Environment environment) {
List<RecordWriter<SerializationDelegate<StreamRecord<O... | 3.26 |
flink_ThrowableClassifier_findThrowableOfThrowableType_rdh | /**
* Checks whether a throwable chain contains a specific throwable type and returns the
* corresponding throwable.
*
* @param throwable
* the throwable chain to check.
* @param throwableType
* the throwable type to search for in the chain.
* @return Optional throwable o... | 3.26 |
flink_EmbeddedLeaderService_addContender_rdh | // ------------------------------------------------------------------------
// adding and removing contenders & listeners
// ------------------------------------------------------------------------
/**
* Callback from leader contenders when they start their service.
*/
private void addContender(EmbeddedLeaderElection... | 3.26 |
flink_EmbeddedLeaderService_m1_rdh | // ------------------------------------------------------------------------
// creating contenders and listeners
// ------------------------------------------------------------------------
public LeaderElection m1(String componentId) {
checkState(!shutdown, "leader election service is shut down");
return new Em... | 3.26 |
flink_EmbeddedLeaderService_confirmLeader_rdh | /**
* Callback from leader contenders when they confirm a leader grant.
*/
private void confirmLeader(final EmbeddedLeaderElection embeddedLeaderElection, final UUID leaderSessionId, final String leaderAddress) {
synchronized(f0) {
// if the leader election was shut down in the mea... | 3.26 |
flink_EmbeddedLeaderService_removeContender_rdh | /**
* Callback from leader contenders when they stop their service.
*/
private void removeContender(EmbeddedLeaderElection embeddedLeaderElection) {
synchronized(f0) {
// if the leader election was not even started, simply do nothing
if ((!embeddedLeaderElection.running) || shutdown) {
... | 3.26 |
flink_EmbeddedLeaderService_shutdown_rdh | // ------------------------------------------------------------------------
// shutdown and errors
// ------------------------------------------------------------------------
/**
* Shuts down this leader election service.
*
* <p>This method does not perform a clean revocation of the leader status and no notification... | 3.26 |
flink_SlotSharingExecutionSlotAllocator_allocateSlotsForVertices_rdh | /**
* Creates logical {@link SlotExecutionVertexAssignment}s from physical shared slots.
*
* <p>The allocation has the following steps:
*
* <ol>
* <li>Map the executions to {@link ExecutionSlotSharingGroup}s using {@link SlotSharingStrategy}
* <li>Check which {@link ExecutionSlotSharingGroup}s already have s... | 3.26 |
flink_TimestampWriter_forRow_rdh | /**
* {@link ArrowFieldWriter} for Timestamp.
*/
| 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.