name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_AsyncCheckpointRunnable_cleanup_rdh
/** * * @return discarded full/incremental size (if available). */ private Tuple2<Long, Long> cleanup() throws Exception { LOG.debug("Cleanup AsyncCheckpointRunnable for checkpoint {} of {}.", checkpointMetaData.getCheckpointId(), taskName); Exception exception = null; // clean up ongoing operator snapshot results a...
3.26
flink_HiveCatalogLock_createFactory_rdh
/** * Create a hive lock factory. */ public static Factory createFactory(HiveConf hiveConf) { return new HiveCatalogLockFactory(hiveConf); }
3.26
flink_ResourceManagerRuntimeServices_fromConfiguration_rdh
// -------------------- Static methods -------------------------------------- public static ResourceManagerRuntimeServices fromConfiguration(ResourceManagerRuntimeServicesConfiguration configuration, HighAvailabilityServices highAvailabilityServices, ScheduledExecutor scheduledExecutor, SlotManagerMetricGroup slotMana...
3.26
flink_ExternalSerializer_of_rdh
/** * Creates an instance of a {@link ExternalSerializer} defined by the given {@link DataType}. */ public static <I, E> ExternalSerializer<I, E> of(DataType dataType, boolean isInternalInput) { return new ExternalSerializer<>(dataType, InternalSerializers.create(dataType.getLogicalType()), isInternalInput); }
3.26
flink_ExternalSerializer_readObject_rdh
// --------------------------------------------------------------------------------- private void readObject(ObjectInputStream serialized) throws IOException, ClassNotFoundException { serialized.defaultReadObject(); initializeConverter(); }
3.26
flink_TPCHQuery10_m0_rdh
// ************************************************************************* // PROGRAM // ************************************************************************* public static void m0(String[] args) throws Exception { LOGGER.warn(DATASET_DEPRECATION_INFO); final ParameterTool params = ParameterTool.fromArgs(...
3.26
flink_HiveASTParseDriver_create_rdh
/** * Creates an HiveParserASTNode for the given token. The HiveParserASTNode is a * wrapper around antlr's CommonTree class that implements the Node interface. * * @param payload * The token. * @return Object (which is actually an HiveParserASTNode) for the token. */ @Override public Object create(Token paylo...
3.26
flink_HiveASTParseDriver_parse_rdh
/** * Parses a command, optionally assigning the parser's token stream to the given context. * * @param command * command to parse * @param ctx * context with which to associate this parser's token stream, or null if either no * context is available or the context already has an existing stream * @return ...
3.26
flink_ResultPartition_setup_rdh
/** * Registers a buffer pool with this result partition. * * <p>There is one pool for each result partition, which is shared by all its sub partitions. * * <p>The pool is registered with the partition *after* it as been constructed in order to * conform to the life-cycle of task registrations in the {@link TaskE...
3.26
flink_ResultPartition_canBeCompressed_rdh
/** * Whether the buffer can be compressed or not. Note that event is not compressed because it is * usually small and the size can become even larger after compression. */ protected boolean canBeCompressed(Buffer buffer) { return ((bufferCompressor != null) && buffer.isBuffer()) && (buffer.readableBytes() > 0); }
3.26
flink_ResultPartition_notifyEndOfData_rdh
// ------------------------------------------------------------------------ @Override public void notifyEndOfData(StopMode mode) throws IOException { throw new UnsupportedOperationException(); }
3.26
flink_ResultPartition_onSubpartitionAllDataProcessed_rdh
/** * The subpartition notifies that the corresponding downstream task have processed all the user * records. * * @see EndOfData * @param subpartition * The index of the subpartition sending the notification. */ public void onSubpartitionAllDataProcessed(int subpartition) { }
3.26
flink_ResultPartition_onConsumedSubpartition_rdh
// ------------------------------------------------------------------------ /** * Notification when a subpartition is released. */ void onConsumedSubpartition(int subpartitionIndex) { if (isReleased.get()) { return; } LOG.debug("{}: Received release notification for subpartition {}.", this, subpartitionIndex); }
3.26
flink_ResultPartition_finish_rdh
/** * Finishes the result partition. * * <p>After this operation, it is not possible to add further data to the result partition. * * <p>For BLOCKING results, this will trigger the deployment of consuming tasks. */ @Override public void finish() throws IOException { checkInProduceState(); isFinished = tru...
3.26
flink_ResultPartition_isReleased_rdh
/** * Whether this partition is released. * * <p>A partition is released when each subpartition is either consumed and communication is * closed by consumer or failed. A partition is also released if task is cancelled. */ @Override public boolean isReleased() { return isReleased.get(); }
3.26
flink_BuiltInFunctionDefinition_internal_rdh
/** * Specifies that this {@link BuiltInFunctionDefinition} is meant for internal purposes only * and should not be exposed when listing functions. */ public Builder internal() { this.isInternal = true; return this; }
3.26
flink_BuiltInFunctionDefinition_runtimeProvided_rdh
/** * Specifies that this {@link BuiltInFunctionDefinition} is implemented during code * generation. */ public Builder runtimeProvided() { this.isRuntimeProvided = true; return this; } /** * Specifies the runtime class implementing this {@link BuiltInFunctionDefinition}
3.26
flink_BuiltInFunctionDefinition_newBuilder_rdh
/** * Builder for configuring and creating instances of {@link BuiltInFunctionDefinition}. */ public static BuiltInFunctionDefinition.Builder newBuilder() { return new BuiltInFunctionDefinition.Builder(); }
3.26
flink_BuiltInFunctionDefinition_name_rdh
/** * Specifies a name that uniquely identifies a built-in function. * * <p>Please adhere to the following naming convention: * * <ul> * <li>Use upper case and separate words with underscore. * <li>Depending on the importance of the function, the underscore is sometimes omitted * e.g. for {@code IFNUL...
3.26
flink_BuiltInFunctionDefinition_version_rdh
/** * Specifies a version that will be persisted in the plan together with the function's name. * The default version is 1 for non-internal functions. * * <p>Note: Internal functions don't need to specify a version as we enforce a unique name * that includes a version (see {@link #name(String)}). */ public Builde...
3.26
flink_BuiltInFunctionDefinition_runtimeDeferred_rdh
/** * Specifies that this {@link BuiltInFunctionDefinition} will be mapped to a Calcite * function. */ public Builder runtimeDeferred() {// This method is just a marker method for clarity. It is equivalent to calling // neither {@link #runtimeProvided} nor {@link #runtimeClass}. return this; }
3.26
flink_FloatValueComparator_supportsSerializationWithKeyNormalization_rdh
// -------------------------------------------------------------------------------------------- // unsupported normalization // -------------------------------------------------------------------------------------------- @Override public boolean supportsSerializationWithKeyNormalization() { return false; }
3.26
flink_InterestingProperties_hashCode_rdh
// ------------------------------------------------------------------------ @Override public int hashCode() { final int prime = 31; int result = 1; result = (prime * result) + (globalProps == null ? 0 : globalProps.hashCode()); result = (prime * result) + (localProps == null ? 0 : localProps.hashCode(...
3.26
flink_InterestingProperties_getLocalProperties_rdh
/** * Gets the interesting local properties. * * @return The interesting local properties. */ public Set<RequestedLocalProperties> getLocalProperties() { return this.localProps; }
3.26
flink_InterestingProperties_addGlobalProperties_rdh
// ------------------------------------------------------------------------ public void addGlobalProperties(RequestedGlobalProperties props) {this.globalProps.add(props); }
3.26
flink_JobManagerMetricGroup_putVariables_rdh
// ------------------------------------------------------------------------ // Component Metric Group Specifics // ------------------------------------------------------------------------ @Override protected void putVariables(Map<String, String> variables) { variables.put(ScopeFormat.SCOPE_HOST, hostname); }
3.26
flink_JobManagerMetricGroup_addJob_rdh
// ------------------------------------------------------------------------ public JobManagerJobMetricGroup addJob(JobID jobId, String jobName) { // get or create a jobs metric group JobManagerJobMetricGroup currentJobGroup; synchronized(this) { if (!isClosed()) { currentJobGroup =...
3.26
flink_ResultPartitionManager_onConsumedPartition_rdh
// ------------------------------------------------------------------------ // Notifications // ------------------------------------------------------------------------ void onConsumedPartition(ResultPartition partition) { LOG.debug("Received consume notification from {}.", partition); synchronized(registeredPa...
3.26
flink_ResultPartitionManager_checkRequestPartitionListeners_rdh
/** * Check whether the partition request listener is timeout. */ private void checkRequestPartitionListeners() { List<PartitionRequestListener> timeoutPartitionRequestListeners = new LinkedList<>(); synchronized(registeredPartitions) { if (isShutdown) { return; } long now ...
3.26
flink_StatusWatermarkValve_markWatermarkUnaligned_rdh
/** * Mark the {@link InputChannelStatus} as watermark-unaligned and remove it from the {@link #alignedChannelStatuses}. * * @param inputChannelStatus * the input channel status to be marked */ private void markWatermarkUnaligned(InputChannelStatus inputChannelStatus) { if (inputChannelStatus.isWatermarkAlig...
3.26
flink_StatusWatermarkValve_inputWatermarkStatus_rdh
/** * Feed a {@link WatermarkStatus} into the valve. This may trigger the valve to output either a * new Watermark Status, for which {@link DataOutput#emitWatermarkStatus(WatermarkStatus)} will * be called, or a new Watermark, for which {@link DataOutput#emitWatermark(Watermark)} will be * called. * * @param wate...
3.26
flink_StatusWatermarkValve_markWatermarkAligned_rdh
/** * Mark the {@link InputChannelStatus} as watermark-aligned and add it to the {@link #alignedChannelStatuses}. * * @param inputChannelStatus * the input channel status to be marked */ private void markWatermarkAligned(InputChannelStatus inputChannelStatus) { if (!inputChannelStatus.isWatermarkAligned) { ...
3.26
flink_StatusWatermarkValve_adjustAlignedChannelStatuses_rdh
/** * Adjust the {@link #alignedChannelStatuses} when an element({@link InputChannelStatus}) in it * was modified. The {@link #alignedChannelStatuses} is a priority queue, when an element in it * was modified, we need to adjust the element's position to ensure its priority order. * * @param inputChannelStatus * ...
3.26
flink_StatusWatermarkValve_inputWatermark_rdh
/** * Feed a {@link Watermark} into the valve. If the input triggers the valve to output a new * Watermark, {@link DataOutput#emitWatermark(Watermark)} will be called to process the new * Watermark. * * @param watermark * the watermark to feed to the valve * @param channelIndex * the index of the channel th...
3.26
flink_Module_getTableSourceFactory_rdh
/** * Returns a {@link DynamicTableSourceFactory} for creating source tables. * * <p>A factory is determined with the following precedence rule: * * <ul> * <li>1. Factory provided by the corresponding catalog of a persisted table. * <li>2. Factory provided by a module. * <li>3. Factory discovered using Ja...
3.26
flink_Module_listFunctions_rdh
/** * List names of all functions in this module. * * <p>A module can decide to hide certain functions. For example, internal functions that can be * resolved via {@link #getFunctionDefinition(String)} but should not be listed by default. * * @param includeHiddenFunctions * whether to list hidden functions or ...
3.26
flink_Module_getTableSinkFactory_rdh
/** * Returns a {@link DynamicTableSinkFactory} for creating sink tables. * * <p>A factory is determined with the following precedence rule: * * <ul> * <li>1. Factory provided by the corresponding catalog of a persisted table. * <li>2. Factory provided by a module. * <li>3. Factory discovered using Java S...
3.26
flink_Module_getFunctionDefinition_rdh
/** * Get an optional of {@link FunctionDefinition} by a given name. * * <p>It includes hidden functions even though not listed in {@link #listFunctions()}. * * @param name * name of the {@link FunctionDefinition}. * @return an optional function definition */ default Optional<FunctionDefinition> getFunctionDe...
3.26
flink_RowDataLocalTimeZoneConverter_getSessionTimeZone_rdh
/** * Get time zone from the given session config. */ private static ZoneId getSessionTimeZone(ReadableConfig sessionConfig) { final String zone = sessionConfig.get(TableConfigOptions.LOCAL_TIME_ZONE); return TableConfigOptions.LOCAL_TIME_ZONE.defaultValue().equals(zone) ? ZoneId.systemDefault() : ZoneId.of(z...
3.26
flink_Checkpoints_storeCheckpointMetadata_rdh
// ------------------------------------------------------------------------ public static void storeCheckpointMetadata(CheckpointMetadata checkpointMetadata, OutputStream out) throws IOException { DataOutputStream dos = new DataOutputStream(out);storeCheckpointMetadata(checkpointMetadata, dos); }
3.26
flink_Checkpoints_disposeSavepoint_rdh
// ------------------------------------------------------------------------ // Savepoint Disposal Hooks // ------------------------------------------------------------------------ public static void disposeSavepoint(String pointer, CheckpointStorage checkpointStorage, ClassLoader classLoader) throws IOException, FlinkE...
3.26
flink_TimestampData_fromTimestamp_rdh
/** * Creates an instance of {@link TimestampData} from an instance of {@link Timestamp}. * * @param timestamp * an instance of {@link Timestamp} */ public static TimestampData fromTimestamp(Timestamp timestamp) { return fromLocalDateTime(timestamp.toLocalDateTime()); }
3.26
flink_TimestampData_m0_rdh
/** * Converts this {@link TimestampData} object to a {@link Timestamp}. */ public Timestamp m0() { return Timestamp.valueOf(toLocalDateTime()); }
3.26
flink_TimestampData_fromEpochMillis_rdh
/** * Creates an instance of {@link TimestampData} from milliseconds and a nanos-of-millisecond. * * @param milliseconds * the number of milliseconds since {@code 1970-01-01 00:00:00}; a negative * number is the number of milliseconds before {@code 1970-01-01 00:00:00} * @param nanosOfMillisecond * the nan...
3.26
flink_TimestampData_getMillisecond_rdh
/** * Returns the number of milliseconds since {@code 1970-01-01 00:00:00}. */ public long getMillisecond() { return millisecond; }
3.26
flink_TimestampData_fromInstant_rdh
/** * Creates an instance of {@link TimestampData} from an instance of {@link Instant}. * * @param instant * an instance of {@link Instant} */ public static TimestampData fromInstant(Instant instant) { long epochSecond = instant.getEpochSecond(); int nanoSecond = instant.getNano(); long millisecond = (epochSec...
3.26
flink_TimestampData_isCompact_rdh
/** * Returns whether the timestamp data is small enough to be stored in a long of milliseconds. */ public static boolean isCompact(int precision) { return precision <= 3; }
3.26
flink_TimestampData_toLocalDateTime_rdh
/** * Converts this {@link TimestampData} object to a {@link LocalDateTime}. */public LocalDateTime toLocalDateTime() { int date = ((int) (millisecond / MILLIS_PER_DAY)); int time = ((int) (millisecond % MILLIS_PER_DAY)); if (time < 0) {--date; time += MILLIS_PER_DAY; } long nanoOfDay = (t...
3.26
flink_TimestampData_fromLocalDateTime_rdh
/** * Creates an instance of {@link TimestampData} from an instance of {@link LocalDateTime}. * * @param dateTime * an instance of {@link LocalDateTime} */ public static TimestampData fromLocalDateTime(LocalDateTime dateTime) { long epochDay = dateTime.toLocalDate().toEpochDay(); long nanoOfDay = dateTime.toLoca...
3.26
flink_TimestampData_toInstant_rdh
/** * Converts this {@link TimestampData} object to a {@link Instant}. */ public Instant toInstant() { long epochSecond = millisecond / 1000; int milliOfSecond = ((int) (millisecond % 1000)); if (milliOfSecond < 0) { --epochSecond; milliOfSecond += 1000; } long nanoAdjustment = (mil...
3.26
flink_CliStrings_messageInfo_rdh
// -------------------------------------------------------------------------------------------- public static AttributedString messageInfo(String message) {return new AttributedStringBuilder().style(AttributedStyle.DEFAULT.bold().foreground(AttributedStyle.BLUE)).append("[INFO] ").append(message).toAttributedString(); ...
3.26
flink_StopWithSavepoint_onSavepointFailure_rdh
/** * Restarts the checkpoint scheduler and, if only the savepoint failed without a task failure / * job termination, transitions back to {@link Executing}. * * <p>This method must assume that {@link #onFailure}/{@link #onGloballyTerminalState} MAY * already be waiting for the savepoint operation to complete, itch...
3.26
flink_SystemProcessingTimeService_shutdownAndAwaitPending_rdh
/** * Shuts down and clean up the timer service provider hard and immediately. This does wait for * all timers to complete or until the time limit is exceeded. Any call to {@link #registerTimer(long, ProcessingTimeCallback)} will result in a hard exception after calling * this method. * * @param time * time to ...
3.26
flink_SystemProcessingTimeService_finalize_rdh
// safety net to destroy the thread pool @Override protected void finalize() throws Throwable { super.finalize(); timerService.shutdownNow(); }
3.26
flink_ResultPartitionMetrics_refreshAndGetTotal_rdh
// ------------------------------------------------------------------------ // these methods are package private to make access from the nested classes faster /** * Iterates over all sub-partitions and collects the total number of queued buffers in a * best-effort way. * * @return total number of queued buffers */...
3.26
flink_ResultPartitionMetrics_getTotalQueueLenGauge_rdh
// ------------------------------------------------------------------------ // Gauges to access the stats // ------------------------------------------------------------------------ private Gauge<Long> getTotalQueueLenGauge() { return new Gauge<Long>() { @Override public Long getValue() { ...
3.26
flink_ResultPartitionMetrics_refreshAndGetAvg_rdh
/** * Iterates over all sub-partitions and collects the average number of queued buffers in a * sub-partition in a best-effort way. * * @return average number of queued buffers per sub-partition */ float refreshAndGetAvg() { return partition.getNumberOfQueuedBuffers() / ((float) (partition.getNumberOfSubpartit...
3.26
flink_ResultPartitionMetrics_refreshAndGetMax_rdh
/** * Iterates over all sub-partitions and collects the maximum number of queued buffers in a * sub-partition in a best-effort way. * * @return maximum number of queued buffers per sub-partition */ int refreshAndGetMax() { int max = 0; int numSubpartitions = partition.getNumberOfSubpartitions(); for (i...
3.26
flink_ResultPartitionMetrics_registerQueueLengthMetrics_rdh
// ------------------------------------------------------------------------ // Static access // ------------------------------------------------------------------------ public static void registerQueueLengthMetrics(MetricGroup parent, ResultPartition[] partitions) { for (int i = 0; i < partitions.length; i++) { ...
3.26
flink_CatalogView_of_rdh
/** * Creates a basic implementation of this interface. * * <p>The signature is similar to a SQL {@code CREATE VIEW} statement. * * @param schema * unresolved schema * @param comment * optional comment * @param originalQuery * original text of the view definition * @param expandedQuery * expanded te...
3.26
flink_ReduceOperator_setCombineHint_rdh
/** * Sets the strategy to use for the combine phase of the reduce. * * <p>If this method is not called, then the default hint will be used. ({@link org.apache.flink.api.common.operators.base.ReduceOperatorBase.CombineHint#OPTIMIZER_CHOOSES}) * * @param strategy * The hint to use. * @return The ReduceOperator ...
3.26
flink_ReduceOperator_translateSelectorFunctionReducer_rdh
// -------------------------------------------------------------------------------------------- private static <T, K> SingleInputOperator<?, T, ?> translateSelectorFunctionReducer(SelectorFunctionKeys<T, ?> rawKeys, ReduceFunction<T> function, TypeInformation<T> inputType, String name, Operator<T> input, int parallelis...
3.26
flink_SharedResources_release_rdh
/** * Releases a lease (identified by the lease holder object) for the given type. If no further * leases exist, the resource is disposed. * * <p>This method takes an additional hook that is called when the resource is disposed. */ public void release(String type, Object leaseHolder, LongConsumer releaser) throws ...
3.26
flink_SharedResources_getOrAllocateSharedResource_rdh
/** * Gets the shared memory resource for the given owner and registers a lease. If the resource * does not yet exist, it will be created via the given initializer function. * * <p>The resource must be released when no longer used. That releases the lease. When all * leases are released, the resource is disposed. ...
3.26
flink_TaskDeploymentDescriptor_loadBigData_rdh
/** * Loads externalized data from the BLOB store back to the object. * * @param blobService * the blob store to use (may be <tt>null</tt> if {@link #serializedJobInformation} and {@link #serializedTaskInformation} are non-<tt>null</tt>) * @param shuffleDescriptorsCache * cache of ...
3.26
flink_TaskDeploymentDescriptor_m0_rdh
/** * Returns the task's job ID. * * @return the job ID this task belongs to */ public JobID m0() { return jobId; }
3.26
flink_TaskDeploymentDescriptor_getAttemptNumber_rdh
/** * Returns the attempt number of the subtask. */ public int getAttemptNumber() { return executionId.getAttemptNumber(); }
3.26
flink_ChainedMapDriver_getStub_rdh
// -------------------------------------------------------------------------------------------- public Function getStub() { return this.mapper; }
3.26
flink_ChainedMapDriver_setup_rdh
// -------------------------------------------------------------------------------------------- @Override public void setup(AbstractInvokable parent) { final MapFunction<IT, OT> mapper = BatchTask.instantiateUserCode(this.config, userCodeClassLoader, MapFunction.class); this.mapper = mapper; FunctionUtils....
3.26
flink_ChainedMapDriver_collect_rdh
// -------------------------------------------------------------------------------------------- @Override public void collect(IT record) { try { this.numRecordsIn.inc(); this.outputCollector.collect(this.mapper.map(record)); } catch (Exception ex) { throw new ExceptionInChainedStubExcept...
3.26
flink_ExternalServiceDecorator_getNamespacedExternalServiceName_rdh
/** * Generate namespaced name of the external rest Service by cluster Id, This is used by other * project, so do not delete it. */ public static String getNamespacedExternalServiceName(String clusterId, String namespace) { return (getExternalServiceName(clusterId) + ".") + namespace; }
3.26
flink_ExternalServiceDecorator_getExternalServiceName_rdh
/** * Generate name of the external rest Service. */ public static String getExternalServiceName(String clusterId) { return clusterId + Constants.FLINK_REST_SERVICE_SUFFIX; }
3.26
flink_InputFormatProvider_of_rdh
/** * Helper method for creating a static provider with a provided source parallelism. */ static InputFormatProvider of(InputFormat<RowData, ?> inputFormat, @Nullable Integer sourceParallelism) { return new InputFormatProvider() { @Override public InputFormat<RowData, ?> createInputFor...
3.26
flink_RpcSerializedValue_getSerializedDataLength_rdh
/** * Return length of serialized data, zero if no serialized data. */ public int getSerializedDataLength() { return serializedData == null ? 0 : serializedData.length; }
3.26
flink_RpcSerializedValue_m0_rdh
/** * Construct a serialized value to transfer on wire. * * @param value * nullable value * @return serialized value to transfer on wire * @throws IOException * exception during value serialization */ public static RpcSerializedValue m0(@Nullable Object value) throws IOException { byte[] v0 = (value =...
3.26
flink_DefaultRollingPolicy_getMaxPartSize_rdh
/** * Returns the maximum part file size before rolling. * * @return Max size in bytes */ public long getMaxPartSize() { return partSize; }
3.26
flink_DefaultRollingPolicy_getInactivityInterval_rdh
/** * Returns time duration of allowed inactivity after which a part file will have to roll. * * @return Time duration in milliseconds */public long getInactivityInterval() { return inactivityInterval; }
3.26
flink_DefaultRollingPolicy_m2_rdh
/** * Sets the interval of allowed inactivity after which a part file will have to roll. The * frequency at which this is checked is controlled by the {@link org.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink.RowFormatBuilder#withBucketCheckInterval(long)} * setting. * * @param interval * ...
3.26
flink_DefaultRollingPolicy_builder_rdh
/** * Creates a new {@link PolicyBuilder} that is used to configure and build an instance of {@code DefaultRollingPolicy}. */ public static DefaultRollingPolicy.PolicyBuilder builder() { return new DefaultRollingPolicy.PolicyBuilder(DEFAULT_MAX_PART_SIZE, DEFAULT_ROLLOVER_INTERVAL, DEFAULT_INACTIVITY_INTERVAL); }
3.26
flink_DefaultRollingPolicy_withRolloverInterval_rdh
/** * Sets the max time a part file can stay open before having to roll. The frequency at which * this is checked is controlled by the {@link org.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink.RowFormatBuilder#withBucketCheckInterval(long)} * setting. * * @param interval * the desired ro...
3.26
flink_DefaultRollingPolicy_build_rdh
/** * Creates the actual policy. */public <IN, BucketID> DefaultRollingPolicy<IN, BucketID> build() { return new DefaultRollingPolicy<>(partSize, rolloverInterval, inactivityInterval); }
3.26
flink_DefaultRollingPolicy_withInactivityInterval_rdh
/** * Sets the interval of allowed inactivity after which a part file will have to roll. The * frequency at which this is checked is controlled by the {@link org.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink.RowFormatBuilder#withBucketCheckInterval(long)} * setting. * * @param interval * ...
3.26
flink_DefaultRollingPolicy_m1_rdh
/** * Sets the part size above which a part file will have to roll. * * @param size * the allowed part size. * @deprecated Use {@link #withMaxPartSize(MemorySize)} instead. */ @Deprecated public DefaultRollingPolicy.PolicyBuilder m1(final long size) { Preconditions.checkState(size > 0L); return new Poli...
3.26
flink_DefaultRollingPolicy_withMaxPartSize_rdh
/** * Sets the part size above which a part file will have to roll. * * @param size * the allowed part size. */public DefaultRollingPolicy.PolicyBuilder withMaxPartSize(final MemorySize size) { Preconditions.checkNotNull(size, "Rolling policy memory size cannot be null"); return new PolicyBuilder(size....
3.26
flink_DefaultRollingPolicy_create_rdh
/** * This method is {@link Deprecated}, use {@link DefaultRollingPolicy#builder()} instead. */ @Deprecated public static DefaultRollingPolicy.PolicyBuilder create() {return builder(); } /** * A helper class that holds the configuration properties for the {@link DefaultRollingPolicy}. * The {@link PolicyBuilder#bu...
3.26
flink_DoubleValueComparator_supportsSerializationWithKeyNormalization_rdh
// -------------------------------------------------------------------------------------------- // unsupported normalization // -------------------------------------------------------------------------------------------- @Override public boolean supportsSerializationWithKeyNormalization() { return false; }
3.26
flink_FileDataIndexCache_handleRemove_rdh
// This is a callback after internal cache removed an entry from itself. private void handleRemove(RemovalNotification<CachedRegionKey, Object> removedEntry) { CachedRegionKey removedKey = removedEntry.getKey(); // remove the corresponding region from memory. T removedRegion = subpartitionFirstBufferIndexRe...
3.26
flink_FileDataIndexCache_put_rdh
/** * Put regions to cache. * * @param subpartition * the subpartition's id of regions. * @param fileRegions * regions to be cached. */ public void put(int subpartition, List<T> fileRegions) { TreeMap<Integer, T> treeMap = subpartitionFirstBufferIndexRegions.get(subpartition); for (T region : fileReg...
3.26
flink_EntropyInjector_isEntropyInjecting_rdh
// ------------------------------------------------------------------------ public static boolean isEntropyInjecting(FileSystem fs, Path target) { final EntropyInjectingFileSystem entropyFs = getEntropyFs(fs); return ((entropyFs != null) && (entropyFs.getEntropyInjectionKey() != null)) && target.getPath()....
3.26
flink_EntropyInjector_addEntropy_rdh
/** * Handles entropy injection across regular and entropy-aware file systems. * * <p>If the given file system is entropy-aware (a implements {@link EntropyInjectingFileSystem}), then this method replaces the entropy marker in the path with * random characters. The entropy marker is defined by {@link EntropyInjecti...
3.26
flink_EntropyInjector_createEntropyAware_rdh
/** * Handles entropy injection across regular and entropy-aware file systems. * * <p>If the given file system is entropy-aware (a implements {@link EntropyInjectingFileSystem}), then this method replaces the entropy marker in the path with * random characters. The entropy marker is defined by {@link EntropyInjecti...
3.26
flink_BinaryStringData_fromBytes_rdh
/** * Creates a {@link BinaryStringData} instance from the given UTF-8 bytes with offset and number * of bytes. */ public static BinaryStringData fromBytes(byte[] bytes, int offset, int numBytes) { return new BinaryStringData(new MemorySegment[]{ MemorySegmentFactory.wrap(bytes) }, offset, numBytes); }
3.26
flink_BinaryStringData_copy_rdh
/** * Copy a new {@code BinaryStringData}. */ public BinaryStringData copy() { ensureMaterialized(); byte[] copy = BinarySegmentUtils.copyToBytes(binarySection.segments, binarySection.offset, binarySection.sizeInBytes); return new BinaryStringData(new MemorySegment[]{ MemorySegmentFactory.wrap(copy) }...
3.26
flink_BinaryStringData_getByteOneSegment_rdh
// ------------------------------------------------------------------------------------------ // Internal methods on BinaryStringData // ------------------------------------------------------------------------------------------ byte getByteOneSegment(int i) { return binarySection.segments[0].get(binarySection.offse...
3.26
flink_BinaryStringData_numBytesForFirstByte_rdh
/** * Returns the number of bytes for a code point with the first byte as `b`. * * @param b * The first byte of a code point */ static int numBytesForFirstByte(final byte b) { if (b >= 0) { // 1 byte, 7 bits: 0xxxxxxx return ...
3.26
flink_BinaryStringData_blankString_rdh
/** * Creates a {@link BinaryStringData} instance that contains `length` spaces. */ public static BinaryStringData blankString(int length) { byte[] spaces = new byte[length]; Arrays.fill(spaces, ((byte) (' '))); return fromBytes(spaces); }
3.26
flink_BinaryStringData_byteAt_rdh
/** * Returns the {@code byte} value at the specified index. An index ranges from {@code 0} to * {@code binarySection.sizeInBytes - 1}. * * @param index * the index of the {@code byte} value. * @return the {@code byte} value at the specified index of this UTF-8 bytes. * @exception IndexOutOfBoundsException * ...
3.26
flink_BinaryStringData_numChars_rdh
// ------------------------------------------------------------------------------------------ // Public methods on BinaryStringData // ------------------------------------------------------------------------------------------ /** * Returns the number of UTF-8 code points in the string. */ public int numChars() { ...
3.26
flink_BinaryStringData_toBytes_rdh
// ------------------------------------------------------------------------------------------ // Public Interfaces // ------------------------------------------------------------------------------------------ @Override public byte[] toBytes() { ensureMaterialized(); return BinarySegmentUtils.getBytes(binarySect...
3.26
flink_BinaryStringData_toLowerCase_rdh
/** * Converts all of the characters in this {@code BinaryStringData} to lower case. * * @return the {@code BinaryStringData}, converted to lowercase. */ public BinaryStringData toLowerCase() { if (javaObject != null) { ...
3.26