name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_ExecEdge_hashShuffle_rdh
/** * Return hash {@link Shuffle}. * * @param keys * hash keys */ public static Shuffle hashShuffle(int[] keys) { return new HashShuffle(keys); }
3.26
flink_ExecEdge_translateToPlan_rdh
/** * Translates this edge into a Flink operator. * * @param planner * The {@link Planner} of the translated Table. */ public Transformation<?> translateToPlan(Planner planner) { return source.translateToPlan(planner); }
3.26
flink_RowType_validateFields_rdh
// -------------------------------------------------------------------------------------------- private static void validateFields(List<RowField> fields) { final List<String> fieldNames = fields.stream().map(f -> f.name).collect(Collectors.toList());if (fieldNames.stream().anyMatch(StringUti...
3.26
flink_BinaryHashBucketArea_startLookup_rdh
/** * Probe start lookup joined build rows. */ void startLookup(int hashCode) { final int posHashCode = findBucket(hashCode); // get the bucket for the given hash code final int bucketArrayPos = posHashCode >> table.bucketsPerSegmentBits; final int bucketInSegmentOffset = (posHashCode & table.bucketsPerSegmentMask)...
3.26
flink_BinaryHashBucketArea_buildBloomFilterAndFree_rdh
/** * Three situations: 1.Not use bloom filter, just free memory. 2.In rehash, free new memory and * let rehash go build bloom filter from old memory. 3.Not in rehash and use bloom filter, build * it and free memory. */ void buildBloomFilterAndFree() { if (inReHash || (!table.useBloomFilters)) { freeMemory(); } els...
3.26
flink_BinaryHashBucketArea_insertToBucket_rdh
/** * Insert into bucket by hashCode and pointer. * * @return return false when spill own partition. */ boolean insertToBucket(int hashCode, int pointer, boolean sizeAddAndCheckResize) throws IOException { final int posHashCode = findBucket(hashCode); // get the bucket for the given hash code final int v47 = posHas...
3.26
flink_BinaryHashBucketArea_appendRecordAndInsert_rdh
/** * Append record and insert to bucket. */ boolean appendRecordAndInsert(BinaryRowData record, int hashCode) throws IOException { final int posHashCode = findBucket(hashCode); // get the bucket for the given hash code final int bucketArrayPos = posHashCode >> table.bucketsPerSegmentBits; final int bucketInSegment...
3.26
flink_BinaryHashBucketArea_findFirstSameBuildRow_rdh
/** * For distinct build. */ private boolean findFirstSameBuildRow(MemorySegment bucket, int searchHashCode, int bucketInSegmentOffset, BinaryRowData buildRowToInsert) { int posInSegment = bucketInSegmentOffset + BUCKET_HEADER_LENGTH; int countInBucket = bucket.getShort(bucketInSegmentOffset + HEADER_COUNT_OFFSET); i...
3.26
flink_SimpleCounter_inc_rdh
/** * Increment the current count by the given value. * * @param n * value to increment the current count by */ @Override public void inc(long n) { count += n; }
3.26
flink_SimpleCounter_dec_rdh
/** * Decrement the current count by the given value. * * @param n * value to decrement the current count by */ @Override public void dec(long n) { count -= n; }
3.26
flink_ColumnOperationUtils_addOrReplaceColumns_rdh
/** * Creates a projection list that adds new or replaces existing (if a column with corresponding * name already exists) columns. * * <p><b>NOTE:</b> Resulting expression are still unresolved. * * @param inputFields * names of current columns * @param newExpressions * new columns to add * @return project...
3.26
flink_ColumnOperationUtils_dropFields_rdh
/** * Creates a projection list that removes given columns. * * <p><b>NOTE:</b> Resulting expression are still unresolved. * * @param inputFields * names of current columns * @param dropExpressions * columns to remove * @return projection expressions */static List<Expression> dropFields(List<String> input...
3.26
flink_DefaultFileWriterBucketFactory_getNewBucket_rdh
/** * A factory returning {@link FileWriter writer}. */
3.26
flink_MessageHeaders_getCustomHeaders_rdh
/** * Returns a collection of custom HTTP headers. * * <p>This default implementation returns an empty list. Override this method to provide custom * headers if needed. * * @return a collection of custom {@link HttpHeaders}, empty by default. */ default Collection<HttpHeader> getCustomHeaders() {return Collectio...
3.26
flink_MessageHeaders_operationId_rdh
/** * Returns a short description for this header suitable for method code generation. * * @return short description */ default String operationId() { final String className = getClass().getSimpleName(); if (getHttpMethod() != HttpMethodWrapper.GET) { throw new Un...
3.26
flink_KvStateInternalRequest_deserializeMessage_rdh
/** * A {@link MessageDeserializer deserializer} for {@link KvStateInternalRequest}. */public static class KvStateInternalRequestDeserializer implements MessageDeserializer<KvStateInternalRequest> { @Override public KvStateInternalRequest deserializeMessage(ByteBuf buf) { KvStateID kvStateId = new...
3.26
flink_HsSubpartitionFileReaderImpl_getNextOffsetToLoad_rdh
/** * Returns Long.MAX_VALUE if it shouldn't load. */ private long getNextOffsetToLoad() { int bufferIndex = bufferIndexManager.getNextToLoad(); if (bufferIndex < 0) {return Long.MAX_VALUE; } else { return cachedRegionManager.getFileOffset(bufferIndex); } }
3.26
flink_HsSubpartitionFileReaderImpl_compareTo_rdh
/** * Provides priority calculation logic for io scheduler. */ @Override public int compareTo(HsSubpartitionFileReader that) { checkArgument(that instanceof HsSubpartitionFileReaderImpl); return Long.compare(getNextOffsetToLoad(), ((HsSubpartitionFileReaderImpl) (that)).getNextOffsetToLoad()); }
3.26
flink_HsSubpartitionFileReaderImpl_prepareForScheduling_rdh
/** * Refresh downstream consumption progress for another round scheduling of reading. */ @Override public void prepareForScheduling() { // Access the consuming offset with lock, to prevent loading any buffer released from the // memory data manager that is already consumed. int consumingOffset = operati...
3.26
flink_HsSubpartitionFileReaderImpl_updateCachedRegionIfNeeded_rdh
// ------------------------------------------------------------------------ // Internal Methods // ------------------------------------------------------------------------ /** * Points the cursors to the given buffer index, if possible. */ private void updateCachedRegionIfNeeded(int bufferIndex) { if (isInCachedR...
3.26
flink_HsSubpartitionFileReaderImpl_updateConsumingOffset_rdh
// ------------------------------------------------------------------------ // Called by HsSubpartitionFileReader // ------------------------------------------------------------------------ public void updateConsumingOffset(int consumingOffset) { this.consumingOffset = consumingOffset; }
3.26
flink_HsSubpartitionFileReaderImpl_getFileOffset_rdh
/** * Return Long.MAX_VALUE if region does not exist to giving the lowest priority. */private long getFileOffset(int bufferIndex) { updateCachedRegionIfNeeded(bufferIndex); return currentBufferIndex == (-1) ? Long.MAX_VALUE : offset; }
3.26
flink_HsSubpartitionFileReaderImpl_readBuffers_rdh
/** * Read subpartition data into buffers. * * <p>This transfers the ownership of used buffers to this class. It's this class' * responsibility to release the buffers using the recycler when no longer needed. * * <p>Calling this method does not always use up all the provided buffers. It's this class' * decision ...
3.26
flink_HsSubpartitionFileReaderImpl_getNextToLoad_rdh
/** * Returns a negative value if shouldn't load. */ private int getNextToLoad() { int nextToLoad = Math.max(lastLoaded, lastConsumed) + 1; int maxToLoad = lastConsumed + maxBuffersReadAhead; return nextToLoad <= maxToLoad ? nextToLoad ...
3.26
flink_QueryableStateStream_getKeySerializer_rdh
/** * Returns the key serializer for the queryable state instance. * * @return Key serializer for the state instance. */ public TypeSerializer<K> getKeySerializer() { return keySerializer;}
3.26
flink_PbSchemaValidationUtils_validateTypeMatch_rdh
/** * Validate type match of general type. * * @param fd * the {@link Descriptors.Descriptor} of the protobuf object. * @param logicalType * the corresponding {@link LogicalType} to the {@link FieldDescriptor} */ private static void validateTypeMatch(FieldDescriptor fd, Lo...
3.26
flink_PbSchemaValidationUtils_m0_rdh
/** * Only validate type match for simple type like int, long, string, boolean. * * @param fd * {@link FieldDescriptor} in proto descriptor * @param logicalTypeRoot * {@link LogicalTypeRoot} of row element */ private static void m0(FieldDescriptor fd, LogicalTypeRoot logicalTypeRoot) { if (!TYPE_MATCH_MA...
3.26
flink_FlinkContainerTestEnvironment_getFlinkContainers_rdh
/** * Get instance of Flink containers for cluster controlling. * * @return Flink cluster on Testcontainers */public FlinkContainers getFlinkContainers() { return this.flinkContainers; }
3.26
flink_KubernetesJobGraphStoreUtil_jobIDToName_rdh
/** * Convert a {@link JobID} to config map key. We will add prefix {@link Constants#JOB_GRAPH_STORE_KEY_PREFIX}. * * @param jobID * job id * @return a key to store job graph in the ConfigMap */ public String jobIDToName(JobID jobID) { return JOB_GRAPH_STORE_KEY_PREFIX + jobID; }
3.26
flink_KubernetesJobGraphStoreUtil_nameToJobID_rdh
/** * Convert a key in ConfigMap to {@link JobID}. The key is stored with prefix {@link Constants#JOB_GRAPH_STORE_KEY_PREFIX}. * * @param key * job graph key in ConfigMap. * @return the parsed {@link JobID}. */ public JobID nameToJobID(String key) { return JobID.fromHexString(key.substring(JOB_GRAPH_STORE_K...
3.26
flink_DataStream_setConnectionType_rdh
/** * Internal function for setting the partitioner for the DataStream. * * @param partitioner * Partitioner to set. * @return The modified DataStream. */ protected DataStream<T> setConnectionType(StreamPartitioner<T> partitioner) { return new DataStream<>(this.getExecutionEnvironment(), new PartitionTransf...
3.26
flink_DataStream_rescale_rdh
/** * Sets the partitioning of the {@link DataStream} so that the output elements are distributed * evenly to a subset of instances of the next operation in a round-robin fashion. * * <p>The subset of downstream operations to which the upstream operation sends elements depends * on the degree of parallelism of bot...
3.26
flink_DataStream_printToErr_rdh
/** * Writes a DataStream to the standard error stream (stderr). * * <p>For each element of the DataStream the result of {@link Object#toString()} is written. * * <p>NOTE: This will print to stderr on the machine where the code is executed, i.e. the Flink * worker. * * @param...
3.26
flink_DataStream_addSink_rdh
/** * Adds the given sink to this DataStream. Only streams with sinks added will be executed once * the {@link StreamExecutionEnvironment#execute()} method is called. * * @param sinkFunction * The object containing the sink's invoke function. * @return The closed DataStream. */ public DataStreamSink<T> addSink...
3.26
flink_DataStream_map_rdh
/** * Applies a Map transformation on a {@link DataStream}. The transformation calls a {@link MapFunction} for each element of the DataStream. Each MapFunction call returns exactly one * element. The user can also extend {@link RichMapFunction} to gain access to other features * provided by the {@link org.apache.fli...
3.26
flink_DataStream_filter_rdh
/** * Applies a Filter transformation on a {@link DataStream}. The transformation calls a {@link FilterFunction} for each element of the DataStream and retains only those element for which * the function returns true. Elements for which the function returns false are filtered. The * user can also extend {@link RichF...
3.26
flink_DataStream_shuffle_rdh
/** * Sets the partitioning of the {@link DataStream} so that the output elements are shuffled * uniformly randomly to the next operation. * * @return The DataStream with shuffle partitioning set. */ @PublicEvolving public DataStream<T> shuffle() { return setConnectionType(n...
3.26
flink_DataStream_project_rdh
/** * Initiates a Project transformation on a {@link Tuple} {@link DataStream}.<br> * <b>Note: Only Tuple DataStreams can be projected.</b> * * <p>The transformation projects each Tuple of the DataSet onto a (sub)set of fields. * * @param fieldIndexes * The field indexes of the input tuples that are retained. ...
3.26
flink_DataStream_countWindowAll_rdh
/** * Windows this {@code DataStream} into sliding count windows. * * <p>Note: This operation is inherently non-parallel since all elements have to pass through * the same operator instance. * * @param size * The size of the windows in number of elements. * @param slide * The slide interval in number of el...
3.26
flink_DataStream_executeAndCollect_rdh
/** * Triggers the distributed execution of the streaming dataflow and returns an iterator over the * elements of the given DataStream. * * <p>The DataStream application is executed in the regular distributed manner on the target * environment, and the events from the stream are polled back to this application pro...
3.26
flink_DataStream_partitionCustom_rdh
// private helper method for custom partitioning private <K> DataStream<T> partitionCustom(Partitioner<K> partitioner, Keys<T> keys) { KeySelector<T, K> keySelector = KeySelectorUtil.getSelectorForOneKey(keys, partitioner, getType(), getExecutionConfig()); return setConnectionType(new CustomPartitionerWrapper...
3.26
flink_DataStream_getPreferredResources_rdh
/** * Gets the preferred resources for this operator. * * @return The preferred resources set for this operator. */ @PublicEvolving public ResourceSpec getPreferredResources() { return transformation.getPreferredResources(); }
3.26
flink_DataStream_m1_rdh
/** * Windows this {@code DataStream} into tumbling count windows. * * <p>Note: This operation is inherently non-parallel since all elements have to pass through * the same operator instance. * * @param size * The size of the windows in number of elements. */ public AllWindowedStream<T, GlobalWindow> m1(long ...
3.26
flink_DataStream_process_rdh
/** * Applies the given {@link ProcessFunction} on the input stream, thereby creating a transformed * output stream. * * <p>The function will be called for every element in the input streams and can produce zero or * more output elements. * * @param processFunction * The {@link ProcessFunction} that is called...
3.26
flink_DataStream_flatMap_rdh
/** * Applies a FlatMap transformation on a {@link DataStream}. The transformation calls a {@link FlatMapFunction} for each element of the DataStream. Each FlatMapFunction call can return any * number of elements including none. The user can also extend {@link RichFlatMapFunction} to * gain access to other features ...
3.26
flink_DataStream_union_rdh
/** * Creates a new {@link DataStream} by merging {@link DataStream} outputs of the same type with * each other. The DataStreams merged using this operator will be transformed simultaneously. * * @param streams * The DataStreams to union output with. * @return The {@link DataStream}. */ @SafeVarargs public fin...
3.26
flink_DataStream_getExecutionEnvironment_rdh
/** * Returns the {@link StreamExecutionEnvironment} that was used to create this {@link DataStream}. * * @return The Execution Environment */ public StreamExecutionEnvironment getExecutionEnvironment() { return environment; }
3.26
flink_DataStream_collectAsync_rdh
/** * Sets up the collection of the elements in this {@link DataStream}, which can be retrieved * later via the given {@link Collector}. * * <p>Caution: When multiple streams are being collected it is recommended to consume all * streams in parallel to not back-pressure the job. * * <p>Caution: Closing the itera...
3.26
flink_DataStream_windowAll_rdh
/** * Windows this data stream to a {@code AllWindowedStream}, which evaluates windows over a non * key grouped stream. Elements are put into windows by a {@link org.apache.flink.streaming.api.windowing.assigners.WindowAssigner}. The grouping of elements * is done by window. * * <p>A {@link org.apache.flink.stream...
3.26
flink_DataStream_print_rdh
/** * Writes a DataStream to the standard output stream (stdout). * * <p>For each element of the DataStream the result of {@link Object#toString()} is written. * * <p>NOTE: This will print to stdout on the machine where the code is executed, i.e. the Flink * worker. * * @param sinkIdentifier * The string to ...
3.26
flink_DataStream_writeToSocket_rdh
/** * Writes the DataStream to a socket as a byte array. The format of the output is specified by a * {@link SerializationSchema}. * * @param hostName * host of the socket * @param port * port of the socket * @param schema * schema for serialization * @return the closed DataStream */ @PublicEvolving pu...
3.26
flink_DataStream_transform_rdh
/** * Method for passing user defined operators created by the given factory along with the type * information that will transform the DataStream. * * <p>This method uses the rather new operator factories and should only be used when custom * factories are needed. * * @param operatorName * name of the operato...
3.26
flink_DataStream_getType_rdh
/** * Gets the type of the stream. * * @return The type of the datastream. */ public TypeInformation<T> getType() { return transformation.getOutputType(); }
3.26
flink_DataStream_broadcast_rdh
/** * Sets the partitioning of the {@link DataStream} so that the output elements are broadcasted * to every parallel instance of the next operation. * * @return The DataStream with broadcast partitioning set. */ public DataStream<T> broadcast() { return setConnectionType(new BroadcastPartitioner<T>()); } /**...
3.26
flink_DataStream_assignTimestampsAndWatermarks_rdh
/** * Assigns timestamps to the elements in the data stream and creates watermarks based on events, * to signal event time progress. * * <p>This method uses the deprecated watermark generator interfaces. Please switch to {@link #assignTimestampsAndWatermarks(WatermarkStrategy)} to use the new interfaces instead. Th...
3.26
flink_DataStream_rebalance_rdh
/** * Sets the partitioning of the {@link DataStream} so that the output elements are distributed * evenly to instances of the next operation in a round-robin fashion. * * @return The DataStream with rebalance partitioning set. */ public DataStream<T> rebalance() { return setConnectionType(new RebalancePartit...
3.26
flink_DataStream_getOutput_rdh
/** * Returns an iterator over the collected elements. The returned iterator must only be used * once the job execution was triggered. * * <p>This method will always return the same iterator instance. * * @return iterator over collected elements */public CloseableIterator<T> getOutput() { // we intentionally...
3.26
flink_DataStream_connect_rdh
/** * Creates a new {@link BroadcastConnectedStream} by connecting the current {@link DataStream} * or {@link KeyedStream} with a {@link BroadcastStream}. * * <p>The latter can be created using the {@link #broadcast(MapStateDescriptor[])} method. * * <p>The resulting stream can be further processed using the {@co...
3.26
flink_DataStream_global_rdh
/** * Sets the partitioning of the {@link DataStream} so that the output values all go to the first * instance of the next processing operator. Use this setting with care since it might cause a * serious performance bottleneck in the application. * * @return The DataStream with shuffle partitioning set. */ @Publi...
3.26
flink_DataStream_join_rdh
/** * Creates a join operation. See {@link JoinedStreams} for an example of how the keys and window * can be specified. */ public <T2> JoinedStreams<T, T2> join(DataStream<T2> otherStream) { return new JoinedStreams<>(this, otherStream); } /** * Windows this {@code DataStream} into tumbling time windows. * *...
3.26
flink_DataStream_keyBy_rdh
/** * Partitions the operator state of a {@link DataStream} using field expressions. A field * expression is either the name of a public field or a getter method with parentheses of the * {@link DataStream}'s underlying type. A dot can be used to drill down into objects, as in * {@code "field1.getInnerField2()"}. ...
3.26
flink_DataStream_clean_rdh
/** * Invokes the {@link org.apache.flink.api.java.ClosureCleaner} on the given function if closure * cleaning is enabled in the {@link ExecutionConfig}. * * @return The cleaned Function */ protected <F> F clean(F f) {return getExecutionEnvironment().clean(f); }
3.26
flink_DataStream_getId_rdh
/** * Returns the ID of the {@link DataStream} in the current {@link StreamExecutionEnvironment}. * * @return ID of the DataStream */ @Internal public int getId() { return transformation.getId();}
3.26
flink_DataStream_sinkTo_rdh
/** * Adds the given {@link Sink} to this DataStream. Only streams with sinks added will be * executed once the {@link StreamExecutionEnvironment#execute()} method is called. * * <p>This method is intended to be used only to recover a snapshot where no uid...
3.26
flink_HiveParserIntervalDayTime_clone_rdh
/** * Return a copy of this object. */ public Object clone() { return new HiveParserIntervalDayTime(f0, nanos); }
3.26
flink_HiveParserIntervalDayTime_getDouble_rdh
/** * * @return double representation of the interval day time, accurate to nanoseconds */ public double getDouble() { return f0 + (nanos / 1000000000); }
3.26
flink_HiveParserIntervalDayTime_normalizeSecondsAndNanos_rdh
// Ensures that the seconds and nanoseconds fields have consistent sign protected void normalizeSecondsAndNanos() { if ((f0 > 0) && (nanos < 0)) { --f0; nanos += HiveParserIntervalUtils.NANOS_PER_SEC; } else if ((f0 < 0) && (nanos > 0)) { ++f0; nanos -= HiveParserIntervalUtils.NANOS_PER_SEC; } }
3.26
flink_MemoryLogger_getDirectMemoryStatsAsString_rdh
/** * Returns a String with the <strong>direct</strong> memory footprint. * * <p>These stats are not part of the other memory beans. * * @param bufferPoolMxBean * The direct buffer pool bean or <code>null</code> if none available. * @return A string with the count, total capacit...
3.26
flink_MemoryLogger_getMemoryPoolStatsAsString_rdh
/** * Gets the memory pool statistics from the JVM. * * @param poolBeans * The collection of memory pool beans. * @return A string denoting the names and sizes of the memory pools. */ public static String getMemoryPoolStatsAsString(List<MemoryPoolMXBean> poolBeans) { StringBuilder bld = new StringBuilder("Off-h...
3.26
flink_MemoryLogger_getGarbageCollectorStatsAsString_rdh
/** * Gets the garbage collection statistics from the JVM. * * @param gcMXBeans * The collection of garbage collector beans. * @return A string denoting the number of times and total elapsed time in garbage collection. */ public static String getGarbageCollectorStatsAsString(List<GarbageCollectorMXBean> gcMXBe...
3.26
flink_MemoryLogger_getMemoryUsageStatsAsString_rdh
/** * Gets the memory footprint of the JVM in a string representation. * * @return A string describing how much heap memory and direct memory are allocated and used. */ public static String getMemoryUsageStatsAsString(MemoryMXBean memoryMXBean) { MemoryUsage heap = memoryMXBean.getHeapMemoryUsage(); MemoryU...
3.26
flink_MemoryLogger_run_rdh
// ------------------------------------------------------------------------ @Override public void run() { try { while (running && ((monitored == null) || (!monitored.isDone()))) { logger.info(getMemoryUsageStatsAsString(memoryBean)); logger.info(getDirectMemoryStatsAsString(directBu...
3.26
flink_OpFusionCodegenSpecGenerator_setup_rdh
/** * Initializes the operator spec generator needed information. This method must be called before * produce and consume related method. */ public void setup(Context context) { this.managedMemoryFraction = context.getManagedMemoryFraction(); this.opFusionCodegenSpec.setup(opFusionContext); }
3.26
flink_DistributedRandomSampler_sample_rdh
/** * Combine the first phase and second phase in sequence, implemented for test purpose only. * * @param input * Source data. * @return Sample result in sequence. */ @Override public Iterator<T> sample(Iterator<T> input) { return sampleInCoordinator(sampleInPartition(input)); }
3.26
flink_DistributedRandomSampler_sampleInCoordinator_rdh
/** * Sample algorithm for the second phase. This operation should be executed as the UDF of an all * reduce operation. * * @param input * The intermediate sample output generated in the first phase. * @return The sampled output. */ public Iterator<T> sampleInCoordinator(Ite...
3.26
flink_AbstractPagedOutputView_seekOutput_rdh
/** * Sets the internal state to the given memory segment and the given position within the * segment. * * @param seg * The memory segment to write the next bytes to. * @param position * The position to start writing the next bytes to. */ protected void seekOutput(MemorySegment seg, int position) { this...
3.26
flink_AbstractPagedOutputView_m0_rdh
// -------------------------------------------------------------------------------------------- // Data Output Specific methods // -------------------------------------------------------------------------------------------- @Override public void m0(int b) throws IOException { writeByte(b); }
3.26
flink_AbstractPagedOutputView_clear_rdh
/** * Clears the internal state. Any successive write calls will fail until either {@link #advance()} or {@link #seekOutput(MemorySegment, int)} is called. * * @see #advance() * @see #seekOutput(MemorySegment, int) */ protected void clear() { this.currentSegment = null; this.positionInSegment = this.head...
3.26
flink_AbstractPagedOutputView_advance_rdh
/** * Moves the output view to the next page. This method invokes internally the {@link #nextSegment(MemorySegment, int)} method to give the current memory segment to the concrete * subclass' implementation and obtain the next segment to write to. Writing will continue * inside the ne...
3.26
flink_AbstractPagedOutputView_getSegmentSize_rdh
/** * Gets the size of the segments used by this view. * * @return The memory segment size. */ public int getSegmentSize() {return this.segmentSize; }
3.26
flink_AbstractPagedOutputView_getCurrentPositionInSegment_rdh
/** * Gets the current write position (the position where the next bytes will be written) in the * current memory segment. * * @return The current write offset in the current memory segment. */ public int getCurrentPositionInSegment() { return this.positionInSegment; }
3.26
flink_AbstractPagedOutputView_getHeaderLength_rdh
/** * * @return header length. */ public int getHeaderLength() { return headerLength; }
3.26
flink_CompositeTypeSerializerSnapshot_internalWriteOuterSnapshot_rdh
// ------------------------------------------------------------------------------------------ // Utilities // ------------------------------------------------------------------------------------------ private void internalWriteOuterSnapshot(DataOutputView out) throws IOException { out.writeInt(MAGI...
3.26
flink_CompositeTypeSerializerSnapshot_writeOuterSnapshot_rdh
// ------------------------------------------------------------------------------------------ // Outer snapshot methods; need to be overridden if outer snapshot is not empty, // or in other words, the outer serializer has extra configuration beyond its nested // serializers. // -----------------------------------------...
3.26
flink_CompositeTypeSerializerSnapshot_readOuterSnapshot_rdh
/** * Reads the outer snapshot, i.e. any information beyond the nested serializers of the outer * serializer. * * <p>The base implementation of this methods reads nothing, i.e. it assumes that the outer * serializer only has nested serializers and no extra information. Otherwise, if the outer * serializer contain...
3.26
flink_CommonExecSink_getFieldInfoForLengthEnforcer_rdh
/** * Returns a List of {@link ConstraintEnforcer.FieldInfo}, each containing the info needed to * determine whether a string or binary value needs trimming and/or padding. */ private List<ConstraintEnforcer.FieldInfo> getFieldInfoForLengthEnforcer(RowType physicalType, LengthEnforcerType enforcerType) { Logical...
3.26
flink_CommonExecSink_applyConstraintValidations_rdh
/** * Apply an operator to filter or report error to process not-null values for not-null fields. */ private Transformation<RowData> applyConstraintValidations(Transformation<RowData> inputTransform, ExecNodeConfig config, RowType physicalRowType) { final ConstraintEnforcer.Builder validatorBuilder = ConstraintEn...
3.26
flink_CommonExecSink_deriveSinkParallelism_rdh
/** * Returns the parallelism of sink operator, it assumes the sink runtime provider implements * {@link ParallelismProvider}. It returns parallelism defined in {@link ParallelismProvider} if * the parallelism is provided, otherwise it uses parallelism of input transformation. */ private int deriveSinkParallelism(T...
3.26
flink_CommonExecSink_applyKeyBy_rdh
/** * Apply a primary key partition transformation to guarantee the strict ordering of changelog * messages. */ private Transformation<RowData> applyKeyBy(ExecNodeConfig config, ClassLoader classLoader, Transformation<RowData> inputTransform, int[] primaryKeys, int sinkParallelism, int inputParallelism, boolean need...
3.26
flink_CommonExecSink_getTargetRowKind_rdh
/** * Get the target row-kind that the row data should change to, assuming the current row kind is * RowKind.INSERT. Return Optional.empty() if it doesn't need to change. Currently, it'll only * consider row-level delete/update. */ private Optional<RowKind> getTargetRowKind() { if (t...
3.26
flink_TypeInfoLogicalTypeConverter_fromLogicalTypeToTypeInfo_rdh
/** * Use {@link BigDecimalTypeInfo} to retain precision and scale of decimal. */ public static TypeInformation fromLogicalTypeToTypeInfo(LogicalType type) { DataType dataType = fromLogicalTypeToDataType(type).nullable().bridgedTo(ClassLogicalTypeConverter.getDefaultExternalClassForType(type)); return TypeInf...
3.26
flink_TypeInfoLogicalTypeConverter_fromTypeInfoToLogicalType_rdh
/** * It will lose some information. (Like {@link PojoTypeInfo} will converted to {@link RowType}) * It and {@link TypeInfoLogicalTypeConverter#fromLogicalTypeToTypeInfo} not allows * back-and-forth conversion. */ public static LogicalType fromTypeInfoToLogicalType(TypeInformation typeInfo) { DataType dataType ...
3.26
flink_ReusingBuildSecondReOpenableHashJoinIterator_reopenProbe_rdh
/** * Set new input for probe side * * @throws IOException */ public void reopenProbe(MutableObjectIterator<V1> probeInput) throws IOException { reopenHashTable.reopenProbe(probeInput); }
3.26
flink_AbstractRowTimeUnboundedPrecedingOver_processElement_rdh
/** * Puts an element from the input stream into state if it is not late. Registers a timer for the * next watermark. * * @param input * The input value. * @param ctx * A {@link Context} that allows querying the timestamp of the element and getting * TimerService for registering timers and querying the ti...
3.26
flink_AbstractRowTimeUnboundedPrecedingOver_insertToSortedList_rdh
/** * Inserts timestamps in order into a linked list. If timestamps arrive in order (as in case of * using the RocksDB state backend) this is just an append with O(1). */ private void insertToSortedList(Long recordTimestamp) { ListIterator<Long> listIterator = sortedTimestamps.listIterator(sortedTimestamps.size...
3.26
flink_Tumble_over_rdh
/** * Creates a tumbling window. Tumbling windows are fixed-size, consecutive, non-overlapping * windows of a specified fixed length. For example, a tumbling window of 5 minutes size groups * elements in 5 minutes intervals. * * @param size * the size of the window as time or row-count interval. * @return a pa...
3.26
flink_StateBackend_useManagedMemory_rdh
/** * Whether the state backend uses Flink's managed memory. */ default boolean useManagedMemory() { return false; }
3.26
flink_StateBackend_getName_rdh
/** * Return the name of this backend, default is simple class name. {@link org.apache.flink.runtime.state.delegate.DelegatingStateBackend} may return the simple class * name of the delegated backend. */ default String getName() { return this.getClass().getSimpleName(); } /** * Creates a new {@link Checkpointa...
3.26
flink_StateBackend_createKeyedStateBackend_rdh
/** * Creates a new {@link CheckpointableKeyedStateBackend} with the given managed memory fraction. * Backends that use managed memory are required to implement this interface. */ default <K> CheckpointableKeyedStateBackend<K> createKeyedStateBackend(Environment env, JobID jobID, String operatorIdentifier, TypeSer...
3.26
flink_StateBackend_supportsNoClaimRestoreMode_rdh
/** * Tells if a state backend supports the {@link RestoreMode#NO_CLAIM} mode. * * <p>If a state backend supports {@code NO_CLAIM} mode, it should create an independent * snapshot when it receives {@link CheckpointType#FULL_CHECKPOINT} in {@link Snapshotable#snapshot(long, long, CheckpointStreamFactory, CheckpointO...
3.26