name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_AbfsOutputStream_flush_rdh | /**
* Flushes this output stream and forces any buffered output bytes to be
* written out. If any data remains in the payload it is committed to the
* service. Data is queued for writing and forced out to the service
* before the call returns.
*/
@Override
public void flush() throws IOException {
if (!disableOutp... | 3.26 |
hadoop_AbfsOutputStream_clearActiveBlock_rdh | /**
* Clear the active block.
*/
private void clearActiveBlock() {
if (activeBlock != null) {
LOG.debug("Clearing active block");
}
synchronized(this) {
activeBlock = null;
}
} | 3.26 |
hadoop_AbfsOutputStream_write_rdh | /**
* Writes length bytes from the specified byte array starting at off to
* this output stream.
*
* @param data
* the byte array to write.
* @param off
* the start off in the data.
* @param length
* the number of bytes to write.
* @throws IOException
* if an I/O error occurs. In particular, an IOExc... | 3.26 |
hadoop_AbfsOutputStream_m0_rdh | /**
* Upload a block of data.
* This will take the block.
*
* @param blockToUpload
* block to upload.
* @throws IOException
* upload failure
*/
private void m0(DataBlocks.DataBlock blockToUpload,
boolean isFlush, boolean... | 3.26 |
hadoop_AbfsOutputStream_hsync_rdh | /**
* Similar to posix fsync, flush out the data in client's user buffer
* all the way to the disk device (but the disk may have it in its cache).
*
* @throws IOException
* if error occurs
*/
@Override
public void hsync() throws IOException {
if (supportFlush) {
flushInternal(false);
}
} | 3.26 |
hadoop_AbfsOutputStream_m1_rdh | /**
* Throw the last error recorded if not null.
* After the stream is closed, this is always set to
* an exception, so acts as a guard against method invocation once
* closed.
*
* @throws IOException
* if lastError is set
*/
private void m1() throws IOException {
if (lastError != null) {
throw las... | 3.26 |
hadoop_AbfsOutputStream_toString_rdh | /**
* Appending AbfsOutputStream statistics to base toString().
*
* @return String with AbfsOutputStream statistics.
*/
@Override
public String toString() {
final StringBuilder sb = new StringBuilder(super.toString());
sb.append("AbfsOutputStream@").append(this.hashCode());
sb.append("){");
sb.append(outputStreamS... | 3.26 |
hadoop_AbfsOutputStream_writeAppendBlobCurrentBufferToService_rdh | /**
* Appending the current active data block to service. Clearing the active
* data block and releasing all buffered data.
*
* @throws IOException
* if there is any failure while starting an upload for
* the dataBlock or while closing the BlockUploadData.
*/
private void
writeAppendBlobCurrentBufferToServi... | 3.26 |
hadoop_AbfsOutputStream_createBlockIfNeeded_rdh | /**
* Demand create a destination block.
*
* @return the active block; null if there isn't one.
* @throws IOException
* on any failure to create
*/
private synchronized DataBlock createBlockIfNeeded() throws IOException {
if (activeBlock == null) {
blockCount++;
activeBlock = blockFactory.cr... | 3.26 |
hadoop_AbfsOutputStream_hflush_rdh | /**
* Flush out the data in client's user buffer. After the return of
* this call, new readers will see the data.
*
* @throws IOException
* if any error occurs
*/
@Override
public void hflush() throws IOException {
if (supportFlush) {
flushInternal(false);
}
} | 3.26 |
hadoop_AbfsOutputStream_getOutputStreamStatistics_rdh | /**
* Getter method for AbfsOutputStream statistics.
*
* @return statistics for AbfsOutputStream.
*/
@VisibleForTesting public AbfsOutputStreamStatistics getOutputStreamStatistics() {
return outputStreamStatistics;
} | 3.26 |
hadoop_AbfsOutputStream_shrinkWriteOperationQueue_rdh | /**
* Try to remove the completed write operations from the beginning of write
* operation FIFO queue.
*/
private synchronized void shrinkWriteOperationQueue() throws IOException {
try {
WriteOperation peek = writeOperations.peek();
while ((peek != null) && peek.task.isDone()) {
peek.task.get();
lastTotalAppendOffse... | 3.26 |
hadoop_S3LogParser_eNoTrailing_rdh | /**
* An entry in the regexp.
*
* @param name
* name of the group
* @param pattern
* pattern to use in the regexp
* @return the pattern for the regexp
*/
private static String eNoTrailing(String name, String pattern) {
return String.format("(?<%s>%s)", name, pattern);
} | 3.26 |
hadoop_S3LogParser_q_rdh | /**
* Quoted entry using the {@link #QUOTED} pattern.
*
* @param name
* name of the element (for code clarity only)
* @return the pattern for the regexp
*/
private static String q(String name) {
return e(name, QUOTED);
} | 3.26 |
hadoop_S3LogParser_e_rdh | /**
* Simple entry using the {@link #SIMPLE} pattern.
*
* @param name
* name of the element (for code clarity only)
* @return the pattern for the regexp
*/
private static String e(String name) {
return e(name, SIMPLE);
} | 3.26 |
hadoop_ResponseInfo__r_rdh | // Value is raw HTML and shouldn't be escaped
public ResponseInfo _r(String key, Object value) {
items.add(Item.of(key, value, true));
return this;} | 3.26 |
hadoop_ResponseInfo_$about_rdh | // Do NOT add any constructors here, unless...
public static ResponseInfo $about(String about) {
ResponseInfo info = new ResponseInfo();
info.about = about;
return info;
} | 3.26 |
hadoop_Hadoop20JHParser_canParse_rdh | /**
* Can this parser parse the input?
*
* @param input
* @return Whether this parser can parse the input.
* @throws IOException
* We will deem a stream to be a good 0.20 job history stream if the
* first line is exactly "Meta VERSION=\"1\" ."
*/
public static boolean canParse(InputStream input) throws IOEx... | 3.26 |
flink_RelWindowProperties_create_rdh | /**
* Creates a {@link RelWindowProperties}, may return null if the window properties can't be
* propagated (loss window start and window end columns).
*/
@Nullablepublic static RelWindowProperties create(ImmutableBitSet windowStartColumns, ImmutableBitSet windowEndColumns, ImmutableBitSet window... | 3.26 |
flink_KeyValueDataType_m0_rdh | // --------------------------------------------------------------------------------------------
private DataType m0(DataType innerDataType) {
if (conversionClass == MapData.class) {
return innerDataType.bridgedTo(toInternalConversionClass(innerDataType.getLogicalType()));
}
return innerDataType;
} | 3.26 |
flink_SymbolUtil_commonToCalcite_rdh | /**
* Converts from a common to a Calcite symbol. The common symbol can be a publicly exposed one
* such as {@link TimeIntervalUnit} or internal one such as {@link DateTimeUtils.TimeUnitRange}.
*/
public static Enum<?> commonToCalcite(Enum<?> commonSymbol) {
checkCommonSymbol(commonSymbol);
Enum<?> calciteSy... | 3.26 |
flink_SymbolUtil_addSymbolMapping_rdh | // --------------------------------------------------------------------------------------------
// Helper methods
// --------------------------------------------------------------------------------------------
private static void addSymbolMapping(@Nullable
TableSymbol commonSymbol, @Nullable
Enum<?> commonInternalSymbo... | 3.26 |
flink_SymbolUtil_calciteToCommon_rdh | /**
* Converts from Calcite to a common symbol. The common symbol can be a publicly exposed one
* such as {@link TimeIntervalUnit} or internal one such as {@link DateTimeUtils.TimeUnitRange}.
* Since the common symbol is optional, the input is returned as a fallback.
*/
public static Enum<?> calciteToCommon(Enum<?>... | 3.26 |
flink_SizeBasedWindowFunction_windowSizeAttribute_rdh | /**
* The field for the window size.
*/
default LocalReferenceExpression windowSizeAttribute() {
return localRef("window_size", DataTypes.INT());
} | 3.26 |
flink_JobManagerJobMetricGroup_m0_rdh | // ------------------------------------------------------------------------
// Component Metric Group Specifics
// ------------------------------------------------------------------------
@Override
protected Iterable<? extends ComponentMetricGroup> m0() {
return operators.values();
} | 3.26 |
flink_S3RecoverableWriter_castToS3Recoverable_rdh | // --------------------------- Utils ---------------------------
private static S3Recoverable castToS3Recoverable(CommitRecoverable recoverable) {
if (recoverable instanceof S3Recoverable)
{
return ((S3Recoverable) (recoverable));
}
throw new IllegalArgumentException("S3 File System cannot recov... | 3.26 |
flink_S3RecoverableWriter_m1_rdh | // --------------------------- Static Constructor ---------------------------
public static S3RecoverableWriter m1(final FileSystem fs, final FunctionWithException<File, RefCountedFileWithStream, IOException> tempFileCreator, final S3AccessHelper s3AccessHelper, final Executor uploadThreadPool, final long userDefinedMi... | 3.26 |
flink_CrossNode_getOperator_rdh | // ------------------------------------------------------------------------
@Override
public CrossOperatorBase<?, ?, ?, ?> getOperator() {
return ((CrossOperatorBase<?, ?, ?, ?>) (super.getOperator()));
} | 3.26 |
flink_SlicingWindowAggOperatorBuilder_countStarIndex_rdh | /**
* Specify the index position of the COUNT(*) value in the accumulator buffer. This is only
* required for Hopping windows which uses this to determine whether the window is empty and
* then decide whether to register timer for the next window.
*
* @see HoppingSliceAssigner#nextTriggerWindow(long, Supplier)
*/... | 3.26 |
flink_SinkUtils_tryAcquire_rdh | /**
* Acquire permits on the given semaphore within a given allowed timeout and deal with errors.
*
* @param permits
* the mumber of permits to acquire.
* @param maxConcurrentRequests
* the maximum number of permits the semaphore was initialized
* with.
* @param maxConcurrentRequestsTimeout
* the timeo... | 3.26 |
flink_HadoopDataOutputStream_getHadoopOutputStream_rdh | /**
* Gets the wrapped Hadoop output stream.
*
* @return The wrapped Hadoop output stream.
*/
public FSDataOutputStream getHadoopOutputStream() {
return f0;
} | 3.26 |
flink_RateLimiter_notifyCheckpointComplete_rdh | /**
* Notifies this {@code RateLimiter} that the checkpoint with the given {@code checkpointId}
* completed and was committed. Makes it possible to implement rate limiters that control data
* emission per checkpoint cycle.
*
* @param checkpointId
* The ID of the checkpoint that has been completed.
*/
default v... | 3.26 |
flink_EndOfPartitionEvent_read_rdh | // ------------------------------------------------------------------------
@Override
public void read(DataInputView in) {
// Nothing to do here
} | 3.26 |
flink_EndOfPartitionEvent_hashCode_rdh | // ------------------------------------------------------------------------
@Override
public int hashCode() {
return 1965146673;
} | 3.26 |
flink_ReusingBuildFirstHashJoinIterator_open_rdh | // --------------------------------------------------------------------------------------------
@Override
public void open() throws IOException, MemoryAllocationException, InterruptedException {
this.hashJoin.open(this.firstInput, this.secondInput, buildSideOuterJoin);
} | 3.26 |
flink_DualInputSemanticProperties_addForwardedField_rdh | /**
* Adds, to the existing information, a field that is forwarded directly from the source
* record(s) in the first input to the destination record(s).
*
* @param input
* the input of the source field
* @param sourceField
* the position in the source record
* @param targetField
* the position in the des... | 3.26 |
flink_DualInputSemanticProperties_addReadFields_rdh | /**
* Adds, to the existing information, field(s) that are read in the source record(s) from the
* first input.
*
* @param input
* the input of the read fields
* @param readFields
* the position(s) in the source record(s)
*/
public void addReadFields(int input,
FieldSet readFields) {
if ((input != 0) && ... | 3.26 |
flink_CheckpointStatsSnapshot_getLatestRestoredCheckpoint_rdh | /**
* Returns the latest restored checkpoint.
*
* @return Latest restored checkpoint or <code>null</code>.
*/
@Nullable
public RestoredCheckpointStats getLatestRestoredCheckpoint() {
return latestRestoredCheckpoint;
} | 3.26 |
flink_PlanJSONDumpGenerator_setEncodeForHTML_rdh | // --------------------------------------------------------------------------------------------
public void setEncodeForHTML(boolean encodeForHTML) {
this.f0 = encodeForHTML;
} | 3.26 |
flink_PlanJSONDumpGenerator_compilePlanToJSON_rdh | // --------------------------------------------------------------------------------------------
private void compilePlanToJSON(List<DumpableNode<?>> nodes, PrintWriter writer) {
// initialization to assign node ids
this.nodeIds = new HashMap<DumpableNode<?>, Integer>();this.nodeCnt = 0;
// JSON header
... | 3.26 |
flink_JobVertexInputInfo_getExecutionVertexInputInfos_rdh | /**
* The input information of subtasks of this job vertex.
*/
public List<ExecutionVertexInputInfo> getExecutionVertexInputInfos() {
return executionVertexInputInfos;
} | 3.26 |
flink_HiveParserSqlSumAggFunction_isDistinct_rdh | // ~ Methods ----------------------------------------------------------------
@Override
public boolean isDistinct() {
return isDistinct;
} | 3.26 |
flink_Buckets_getMaxPartCounter_rdh | // --------------------------- Testing Methods -----------------------------
@VisibleForTesting
public long getMaxPartCounter() {
return maxPartCounter;
} | 3.26 |
flink_Buckets_initializeState_rdh | /**
* Initializes the state after recovery from a failure.
*
* <p>During this process:
*
* <ol>
* <li>we set the initial value for part counter to the maximum value used before across all
* tasks and buckets. This guarantees that we do not overwrite valid data,
* <li>we commit any pending files for pr... | 3.26 |
flink_ArrayListConverter_createObjectArrayKind_rdh | /**
* Creates the kind of array for {@link List#toArray(Object[])}.
*/
private static Object[] createObjectArrayKind(Class<?> elementClazz) {
// e.g. int[] is not a Object[]
if (elementClazz.isPrimitive()) {
return ((Object[]) (Array.newInstance(primitiveToWrapper(elementClazz), 0)));
}
// e.g... | 3.26 |
flink_BlockingBackChannel_getReadEndAfterSuperstepEnded_rdh | /**
* Called by iteration head after it has sent all input for the current superstep through the
* data channel (blocks iteration head).
*/
public DataInputView getReadEndAfterSuperstepEnded() {
try {
return queue.take().switchBuffers();
} catch (InterruptedException
| IOException e) {
... | 3.26 |
flink_BlockingBackChannel_getWriteEnd_rdh | /**
* Called by iteration tail to save the output of the current superstep.
*/
public DataOutputView getWriteEnd() {
return buffer;
} | 3.26 |
flink_RowDataUtil_isRetractMsg_rdh | /**
* Returns true if the message is either {@link RowKind#DELETE} or {@link RowKind#UPDATE_BEFORE}, which refers to a retract operation of aggregation.
*/
public static boolean isRetractMsg(RowData row) {
RowKind kind = row.getRowKind();
return (kind == RowKind.UPDATE_BEFORE) || (kind == RowKind.DELETE);
} | 3.26 |
flink_RowDataUtil_isAccumulateMsg_rdh | /**
* Returns true if the message is either {@link RowKind#INSERT} or {@link RowKind#UPDATE_AFTER},
* which refers to an accumulate operation of aggregation.
*/
public static boolean isAccumulateMsg(RowData row) {
RowKind kind = row.getRowKind();
return (kind == RowKind.INSERT) || (kind == RowKind.UPDATE_AF... | 3.26 |
flink_UnsafeMemoryBudget_reserveMemory_rdh | /**
* Reserve memory of certain size if it is available.
*
* <p>Adjusted version of {@link java.nio.Bits#reserveMemory(long, int)} taken from Java 11.
*/
@SuppressWarnings({ "OverlyComplexMethod", "JavadocReference", "NestedTryStatement" })
void reserveMemory(long size) throws MemoryReservationException {
long ... | 3.26 |
flink_ObjectColumnSummary_getNonNullCount_rdh | /**
* The number of non-null values in this column.
*/@Override
public long getNonNullCount() {
return 0;
} | 3.26 |
flink_Optimizer_getDefaultParallelism_rdh | // ------------------------------------------------------------------------
// Getters / Setters
// ------------------------------------------------------------------------
public int getDefaultParallelism() {
return defaultParallelism;
} | 3.26 |
flink_Optimizer_getPostPassFromPlan_rdh | // ------------------------------------------------------------------------
// Miscellaneous
// ------------------------------------------------------------------------
private OptimizerPostPass getPostPassFromPlan(Plan program) {
final String className = program.getPostPassClassName();
if (className == null) {
thr... | 3.26 |
flink_Optimizer_compile_rdh | /**
* Translates the given program to an OptimizedPlan. The optimized plan describes for each
* operator which strategy to use (such as hash join versus sort-merge join), what data exchange
* method to use (local pipe forward, shuffle, broadcast), what exchange mode to use (pipelined,
* batch), where to cache inter... | 3.26 |
flink_AvroSerializer_isImmutableType_rdh | // ------------------------------------------------------------------------
// Properties
// ------------------------------------------------------------------------
@Override
public boolean isImmutableType() {
return false;
} | 3.26 |
flink_AvroSerializer_readObject_rdh | // -------- backwards compatibility with 1.5, 1.6 -----------
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
/* Please see FLINK-11436 for details on why manual deserialization is required.
During the release of Flink 1.7, the value of serialVersionUID was uptick to 2L (was ... | 3.26 |
flink_AvroSerializer_createInstance_rdh | // ------------------------------------------------------------------------
@Override
@SuppressWarnings("unchecked")
public T createInstance() {
checkAvroInitialized();
return ((T) (avroData.newRecord(null, runtimeSchema)));
} | 3.26 |
flink_AvroSerializer_isGenericRecord_rdh | // ------------------------------------------------------------------------
// Utilities
// ------------------------------------------------------------------------
static boolean isGenericRecord(Class<?> type)
{
return (!SpecificRecord.class.isAssignableFrom(type)) && GenericRecord.class.isAssignableFrom(type);
} | 3.26 |
flink_AvroSerializer_snapshotConfiguration_rdh | // ------------------------------------------------------------------------
// Compatibility and Upgrades
// ------------------------------------------------------------------------
@Override
public TypeSerializerSnapshot<T> snapshotConfiguration() {
if (configSnapshot == null) {
checkAvroInitialized();configSnaps... | 3.26 |
flink_AvroSerializer_copy_rdh | // ------------------------------------------------------------------------
// Copying
// ------------------------------------------------------------------------
@Override
public T copy(T from) { if (CONCURRENT_ACCESS_CHECK) {
enterExclusiveThread();
}
try {
checkAvroInitialized();
retu... | 3.26 |
flink_AvroSerializer_m0_rdh | // ------------------------------------------------------------------------
@Nonnull
public Class<T> m0() {
return type;
} | 3.26 |
flink_AvroSerializer_checkAvroInitialized_rdh | // ------------------------------------------------------------------------
// Initialization
// ------------------------------------------------------------------------
private void checkAvroInitialized() {
if (writer == null) {
initializeAvro();
}
} | 3.26 |
flink_AvroSerializer_enterExclusiveThread_rdh | // --------------------------------------------------------------------------------------------
// Concurrency checks
// --------------------------------------------------------------------------------------------
private void enterExclusiveThread() {
// we use simple get, check, set here, rather than CAS
// we don't n... | 3.26 |
flink_DynamicProcessingTimeSessionWindows_mergeWindows_rdh | /**
* Merge overlapping {@link TimeWindow}s.
*/
@Override
public void mergeWindows(Collection<TimeWindow> windows, MergeCallback<TimeWindow> c) {
TimeWindow.mergeWindows(windows, c);
} | 3.26 |
flink_DynamicProcessingTimeSessionWindows_withDynamicGap_rdh | /**
* Creates a new {@code SessionWindows} {@link WindowAssigner} that assigns elements to sessions
* based on the element timestamp.
*
* @param sessionWindowTimeGapExtractor
* The extractor to use to extract the time gap from the
* input elements
* @return The policy.
*/... | 3.26 |
flink_LocalBufferPool_m2_rdh | /**
* Destroy is called after the produce or consume phase of a task finishes.
*/
@Override
public void m2() {
// NOTE: if you change this logic, be sure to update recycle() as well!
CompletableFuture<?> toNotify = null;
synchronized(availableMemorySegments) {
if
(!isDestroyed) {
... | 3.26 |
flink_LocalBufferPool_requestMemorySegmentFromGlobalWhenAvailable_rdh | /**
* Tries to obtain a buffer from global pool as soon as one pool is available. Note that
* multiple {@link LocalBufferPool}s might wait on the future of the global pool, hence this
* method double-check if a new buffer is really needed at the time it becomes available.
*/
@GuardedBy("availableMemorySegments")
pr... | 3.26 |
flink_LocalBufferPool_reserveSegments_rdh | // ------------------------------------------------------------------------
// Properties
// ------------------------------------------------------------------------
@Override
public void reserveSegments(int numberOfSegmentsToReserve) throws IOException {checkArgument(numberOfSegmentsToReserve <= numberOfRequiredMe... | 3.26 |
flink_LocalBufferPool_mayNotifyAvailable_rdh | // ------------------------------------------------------------------------
/**
* Notifies the potential segment consumer of the new available segments by completing the
* previous uncompleted future.
*/
private void mayNotifyAvailable(@Nullable
CompletableFuture<?> toNotify) {
if (toNotify != null) {
to... | 3.26 |
flink_RelTimeIndicatorConverter_materializeProcTime_rdh | // ----------------------------------------------------------------------------------------
// Utility
// ----------------------------------------------------------------------------------------
private RelNode materializeProcTime(RelNode node) {
// there is no need to add a redundant calc to materialize proc-time if ... | 3.26 |
flink_ShortParser_parseField_rdh | /**
* Static utility to parse a field of type short from a byte sequence that represents text
* characters (such as when read from a file stream).
*
* @param bytes
* The bytes containing the text data that should be parsed.
* @param startPos
* The offset to start the parsing.
* @param length
* The length... | 3.26 |
flink_ShortParser_m0_rdh | /**
* Static utility to parse a field of type short from a byte sequence that represents text
* characters (such as when read from a file stream).
*
* @param bytes
* The bytes containing the text data that should be parsed.
* @param startPos
* The offset to start the parsing.
* @param length
* The lengt... | 3.26 |
flink_EitherSerializerSnapshot_getCurrentVersion_rdh | // ------------------------------------------------------------------------
@Override
public int getCurrentVersion() {
return CURRENT_VERSION;
} | 3.26 |
flink_SummaryAggregatorFactory_m0_rdh | /**
* Create a SummaryAggregator for the supplied type.
*
* @param <T>
* the type to aggregate
* @param <R>
* the result type of the aggregation
*/
@SuppressWarnings("unchecked")
public static <T, R> Aggregator<T, R> m0(Class<T> type) {
if (type == Long.class) ... | 3.26 |
flink_ReusingBuildSecondHashJoinIterator_open_rdh | // --------------------------------------------------------------------------------------------
@Override
public void open() throws IOException, MemoryAllocationException, InterruptedException {
this.hashJoin.open(this.secondInput, this.firstInput, buildSideOuterJoin);
} | 3.26 |
flink_RestartStrategies_exponentialDelayRestart_rdh | /**
* Generates a ExponentialDelayRestartStrategyConfiguration.
*
* @param initialBackoff
* Starting duration between restarts
* @param maxBackoff
* The highest possible duration between restarts
* @param backoffMultiplier
* Delay multiplier how many times is the delay longer than before
* @param resetBa... | 3.26 |
flink_RestartStrategies_fromConfiguration_rdh | /**
* Reads a {@link RestartStrategyConfiguration} from a given {@link ReadableConfig}.
*
* @param configuration
* configuration object to retrieve parameters from
* @return {@link Optional#empty()} when no restart strategy parameters provided
*/
public static Optional<RestartStrategyConfiguration> fromConfigur... | 3.26 |
flink_RestartStrategies_fixedDelayRestart_rdh | /**
* Generates a FixedDelayRestartStrategyConfiguration.
*
* @param restartAttempts
* Number of restart attempts for the FixedDelayRestartStrategy
* @param delayInterval
* Delay in-between restart attempts for the FixedDelayRestartStrategy
* @return FixedDelayRestartStrategy
*/
public static RestartStrateg... | 3.26 |
flink_RestartStrategies_failureRateRestart_rdh | /**
* Generates a FailureRateRestartStrategyConfiguration.
*
* @param failureRate
* Maximum number of restarts in given interval {@code failureInterval}
* before failing a job
* @param failureInterval
* Time interval for failures
* @param delayInterval
* Delay in-between restart attempts
*/
public sta... | 3.26 |
flink_FlinkRelMetadataQuery_getColumnOriginNullCount_rdh | /**
* Returns origin null count of the given column.
*
* @param rel
* the relational expression
* @param index
* the index of the given column
* @return the null count of the given column if can be estimated, else return null.
*/
public Double getColumnOriginNullCount(RelNode rel, int index) {
for (; ;)... | 3.26 |
flink_FlinkRelMetadataQuery_getUpsertKeysInKeyGroupRange_rdh | /**
* Determines the set of upsert minimal keys in a single key group range, which means can ignore
* exchange by partition keys.
*
* <p>Some optimizations can rely on this ability to do upsert in a single key group range.
*/
public Set<ImmutableBitSet> getUpsertKeysInKeyGroupRange(RelNode rel, int[] partitionKeys... | 3.26 |
flink_FlinkRelMetadataQuery_getRelModifiedMonotonicity_rdh | /**
* Returns the {@link RelModifiedMonotonicity} statistic.
*
* @param rel
* the relational expression
* @return the monotonicity for the corresponding RelNode
*/
public RelModifiedMonotonicity getRelModifiedMonotonicity(RelNode rel) {
for (; ;) {
try {
return modifiedMonotonicityHand... | 3.26 |
flink_FlinkRelMetadataQuery_getRelWindowProperties_rdh | /**
* Returns the {@link RelWindowProperties} statistic.
*
* @param rel
* the relational expression
* @return the window properties for the corresponding RelNode
*/
public RelWindowProperties
getRelWindowProperties(RelNode rel) {
for (... | 3.26 |
flink_FlinkRelMetadataQuery_reuseOrCreate_rdh | /**
* Reuse input metadataQuery instance if it could cast to FlinkRelMetadataQuery class, or create
* one if not.
*
* @param mq
* metadataQuery which try to reuse
* @return a FlinkRelMetadataQuery instance
*/
public static FlinkRelMetadataQuery reuseOrCreate(RelMetadataQuery mq) {
if (mq instanceof FlinkRe... | 3.26 |
flink_FlinkRelMetadataQuery_getColumnNullCount_rdh | /**
* Returns the null count of the given column.
*
* @param rel
* the relational expression
* @param index
* the index of the given column
* @return the null count of the given column if can be estimated, else return null.
*/
public Double getColumnNullCount(RelNode rel, int index) {
for (; ;) {try {
... | 3.26 |
flink_Executing_maybeRescale_rdh | /**
* Rescale the job if {@link Context#shouldRescale} is true. Otherwise, force a rescale using
* {@link Executing#forceRescale()} after {@link JobManagerOptions#SCHEDULER_SCALING_INTERVAL_MAX}.
*/
private void maybeRescale() {rescaleScheduled = false;
if (context.shouldRescale(getExecutionGraph(), false)) {
... | 3.26 |
flink_Executing_forceRescale_rdh | /**
* Force rescaling as long as the target parallelism is different from the current one.
*/
private void forceRescale() {
if (context.shouldRescale(getExecutionGraph(), true)) {
getLogger().info("Added resources are still there after {} time({}), force a rescale.", JobManagerOptions.SCHEDULER_SCALING_IN... | 3.26 |
flink_SyntaxHighlightStyle_getQuotedStyle_rdh | /**
* Returns the style for a SQL character literal, such as {@code 'Hello, world!'}.
*
* @return Style for SQL character literals
*/
public AttributedStyle getQuotedStyle() {
return singleQuotedStyle;
} | 3.26 |
flink_SyntaxHighlightStyle_getHintStyle_rdh | /**
* Returns the style for a SQL hint, such as {@literal /*+ This is a hint *}{@literal /}.
*
* @return Style for SQL hints
*/
public AttributedStyle
getHintStyle() {
return hintStyle;
} | 3.26 |
flink_SyntaxHighlightStyle_getCommentStyle_rdh | /**
* Returns the style for a SQL comments, such as {@literal /* This is a comment *}{@literal /}
* or {@literal -- End of line comment}.
*
* @return Style for SQL comments
*/
public AttributedStyle getCommentStyle() {
return commentStyle;
} | 3.26 |
flink_Pool_pollEntry_rdh | /**
* Gets the next cached entry. This blocks until the next entry is available.
*/
public T pollEntry() throws InterruptedException {
return pool.take();} | 3.26 |
flink_Pool_add_rdh | /**
* Adds an entry to the pool with an optional payload. This method fails if called more often
* than the pool capacity specified during construction.
*/
public synchronized void add(T object) {
if (poolSize >= poolCapacity) {
throw new IllegalStateException("No space left in pool");
... | 3.26 |
flink_Pool_tryPollEntry_rdh | /**
* Tries to get the next cached entry. If the pool is empty, this method returns null.
*/
@Nullable
public T tryPollEntry() {
return pool.poll();
} | 3.26 |
flink_Pool_addBack_rdh | /**
* Internal callback to put an entry back to the pool.
*/
void addBack(T object) {
pool.add(object);
} | 3.26 |
flink_ExecutorThreadFactory_newThread_rdh | // ------------------------------------------------------------------------
@Override
public Thread newThread(Runnable runnable) {
Thread t = new Thread(group, runnable, namePrefix + threadNumber.getAndIncrement());
t.setDaemon(true);
t.setPriority(threadPriority);
// optional handler for uncaught excep... | 3.26 |
flink_BlockingBackChannelBroker_instance_rdh | /**
* Retrieve singleton instance.
*/
public static Broker<BlockingBackChannel> instance() {
return INSTANCE;
} | 3.26 |
flink_TableFunction_finish_rdh | /**
* This method is called at the end of data processing. After this method is called, no more
* records can be produced for the downstream operators.
*
* <p><b>NOTE:</b>This method does not need to close any resources. You should release external
* resources in the {@link #close()} method. More details can see {... | 3.26 |
flink_TableFunction_setCollector_rdh | /**
* Internal use. Sets the current collector.
*/
public final void setCollector(Collector<T> collector) {
this.collector = collector;
}
/**
* Returns the result type of the evaluation method.
*
* @deprecated This method uses the old type system and is based on the old reflective
extraction logic. The method... | 3.26 |
flink_TableFunction_collect_rdh | /**
* Emits an (implicit or explicit) output row.
*
* <p>If null is emitted as an explicit row, it will be skipped by the runtime. For implicit
* rows, the row's field will be null.
*
* @param row
* the output row
*/
protected final void collect(T row) {
collector.collect(row);} | 3.26 |
flink_QueryableStateUtils_createKvStateServer_rdh | /**
* Initializes the {@link KvStateServer server} responsible for sending the requested internal
* state to the {@link KvStateClientProxy client proxy}.
*
* @param address
* the address to bind to.
* @param ports
* the range of ports the state server will attempt to listen to (see {@link org.apache.flink.co... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.