name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_BlobServerConnection_writeErrorToStream_rdh
/** * Writes to the output stream the error return code, and the given exception in serialized * form. * * @param out * Thr output stream to write to. * @param t * The exception to send. * @throws IOException * Thrown, if the output stream could not be written to. */ private static void writeErrorToStre...
3.26
flink_KubernetesEntrypointUtils_loadConfiguration_rdh
/** * For non-HA cluster, {@link JobManagerOptions#ADDRESS} has be set to Kubernetes service name * on client side. See {@link KubernetesClusterDescriptor#deployClusterInternal}. So the * TaskManager will use service address to contact with JobManager. For HA cluster, {@link JobManagerOptions#ADDRESS...
3.26
flink_StateBootstrapTransformation_getMaxParallelism_rdh
/** * * @return The max parallelism for this operator. */ int getMaxParallelism(int globalMaxParallelism) { return operatorMaxParallelism.orElse(globalMaxParallelism);}
3.26
flink_StateBootstrapTransformation_writeOperatorState_rdh
/** * * @param operatorID * The operator id for the stream operator. * @param stateBackend * The state backend for the job. * @param config * Additional configurations applied to the bootstrap stream tasks. * @param globalMaxParallelism * Global max parallelism set for the savepoint. * @param savepoin...
3.26
flink_RocksDBMemoryControllerUtils_calculateRocksDBMutableLimit_rdh
/** * Calculate {@code mutable_limit_} as RocksDB calculates it in <a * href="https://github.com/dataArtisans/frocksdb/blob/FRocksDB-5.17.2/memtable/write_buffer_manager.cc#L54"> * here</a>. * * @param bufferSize * write buffer size * @return mutableLimit */ static long calculateRocksDBMutableLimit(long buff...
3.26
flink_RocksDBMemoryControllerUtils_validateArenaBlockSize_rdh
/** * RocksDB starts flushing the active memtable constantly in the case when the arena block size * is greater than mutable limit (as calculated in {@link #calculateRocksDBMutableLimit(long)}). * * <p>This happens because in such a case the check <a * href="https://github.com/dataArtisans/frocksdb/blob/958f191d3f...
3.26
flink_RocksDBMemoryControllerUtils_m0_rdh
/** * Allocate memory controllable RocksDB shared resources. * * @param totalMemorySize * The total memory limit size. * @param writeBufferRatio * The ratio of total memory which is occupied by write buffer manager. * @param highPriorityPoolRatio * The high priority pool ratio of cache. * @param factory ...
3.26
flink_RocksDBMemoryControllerUtils_calculateWriteBufferManagerCapacity_rdh
/** * Calculate the actual memory capacity of write buffer manager, which would be shared among * rocksDB instance(s). The formula to use here could refer to the doc of {@link #calculateActualCacheCapacity(long, double)}. * * @param totalMemorySize * Total off-heap memory size reserved for RocksDB instance(s). ...
3.26
flink_RocksDBMemoryControllerUtils_calculateActualCacheCapacity_rdh
/** * Calculate the actual memory capacity of cache, which would be shared among rocksDB * instance(s). We introduce this method because: a) We cannot create a strict capacity limit * cache util FLINK-15532 resolved. b) Regardless of the memory usage of blocks pinned by * RocksDB iterators, which is difficult to ca...
3.26
flink_RocksDBMemoryControllerUtils_calculateRocksDBDefaultArenaBlockSize_rdh
/** * Calculate the default arena block size as RocksDB calculates it in <a * href="https://github.com/dataArtisans/frocksdb/blob/49bc897d5d768026f1eb816d960c1f2383396ef4/db/column_family.cc#L196-L201"> * here</a>. * * @return the default arena block size * @param writeBufferSize * the write buffer size (bytes...
3.26
flink_SortedMapTypeInfo_getTypeClass_rdh
// ------------------------------------------------------------------------ @SuppressWarnings("unchecked") @Override public Class<SortedMap<K, V>> getTypeClass() {return ((Class<SortedMap<K, V>>) (Class<?>) (SortedMap.class)); }
3.26
flink_MetadataSerializers_getSerializer_rdh
/** * Returns the {@link MetadataSerializer} for the given savepoint version. * * @param version * Savepoint version to get serializer for * @return Savepoint for the given version * @throws IllegalArgumentException * If unknown savepoint version */ public static MetadataSerializer getSerializer(int version...
3.26
flink_StateTable_remove_rdh
/** * Removes the mapping for the composite of active key and given namespace. This method should * be preferred over {@link #removeAndGetOld(N)} when the caller is not interested in the old * state. * * @param namespace * the namespace of the mapping to remove. Not null. */ ...
3.26
flink_StateTable_put_rdh
// Snapshot / Restore ------------------------------------------------------------------------- public void put(K key, int keyGroup, N namespace, S state) { checkKeyNamespacePreconditions(key, namespace); getMapForKeyGroup(keyGroup).put(key, namespace, state); }
3.26
flink_StateTable_getState_rdh
// ------------------------------------------------------------------------ // access to maps // ------------------------------------------------------------------------ /** * Returns the internal data structure. */@VisibleForTesting public StateMap<K, N, S>[] getState() { return keyGroupedStateMaps; }
3.26
flink_StateTable_size_rdh
/** * Returns the total number of entries in this {@link StateTable}. This is the sum of both * sub-tables. * * @return the number of entries in this {@link StateTable}. */ public int size() { int count = 0; for (StateMap<K, N, S> stateMap : keyGroupedStateMaps) { count += stateMap.size(); } ...
3.26
flink_StateTable_m0_rdh
/** * Applies the given {@link StateTransformationFunction} to the state (1st input argument), * using the given value as second input argument. The result of {@link StateTransformationFunction#apply(Object, Object)} is then stored as the new state. This * function is basically an optimization for get-update-put pat...
3.26
flink_StateTable_isEmpty_rdh
// Main interface methods of StateTable ------------------------------------------------------- /** * Returns whether this {@link StateTable} is empty. * * @return {@code true} if this {@link StateTable} has no elements, {@code false} otherwise. * @see #size() */ public boolean isEmpty() { return size() == 0; ...
3.26
flink_StateTable_containsKey_rdh
/** * Returns whether this table contains a mapping for the composite of active key and given * namespace. * * @param namespace * the namespace in the composite key to search for. Not null. * @return {@code true} if this map contains the specified key/namespace composite key, {@code false} otherwise. */ public...
3.26
flink_StateTable_getKeySerializer_rdh
// Meta data setter / getter and toString ----------------------------------------------------- public TypeSerializer<K> getKeySerializer() { return keySerializer;}
3.26
flink_StateTable_get_rdh
// ------------------------------------------------------------------------ private S get(K key, int keyGroupIndex, N namespace) { checkKeyNamespacePreconditions(key, namespace);return getMapForKeyGroup(keyGroupIndex).get(key, namespace); }
3.26
flink_StateTable_indexToOffset_rdh
/** * Translates a key-group id to the internal array offset. */ private int indexToOffset(int index) { return index - getKeyGroupOffset(); }
3.26
flink_StateTable_sizeOfNamespace_rdh
// For testing -------------------------------------------------------------------------------- @VisibleForTesting public int sizeOfNamespace(Object namespace) { int count = 0; for (StateMap<K, N, S> stateMap : keyGroupedStateMaps) { count += stateMap.sizeOfNamespace(namespace); } return count;...
3.26
flink_SqlTimestampParser_parseField_rdh
/** * Static utility to parse a field of type Timestamp 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 le...
3.26
flink_DefaultScheduler_getNumberOfRestarts_rdh
// ------------------------------------------------------------------------ // SchedulerNG // ------------------------------------------------------------------------ @Override protected long getNumberOfRestarts() { return f0.getNumberOfRestarts(); }
3.26
flink_DefaultScheduler_allocateSlotsAndDeploy_rdh
// ------------------------------------------------------------------------ // SchedulerOperations // ------------------------------------------------------------------------ @Override public void allocateSlotsAndDeploy(final List<ExecutionVertexID> verticesToDeploy) { final Map<ExecutionVertexID, ExecutionVertexVersio...
3.26
flink_OrcNoHiveColumnarRowInputFormat_createPartitionedFormat_rdh
/** * Create a partitioned {@link OrcColumnarRowInputFormat}, the partition columns can be * generated by split. */ public static <SplitT extends FileSourceSplit> OrcColumnarRowInputFormat<?, SplitT> createPartitionedFormat(Configuration hadoopConfig, RowType tableType, List<String> partitionKeys, PartitionFieldE...
3.26
flink_LocalityAwareSplitAssigner_getNext_rdh
// -------------------------------------------------------------------------------------------- @Override public Optional<FileSourceSplit> getNext(@Nullable String host) { // for a null host, we always return a remote split if (StringUtils.isNullOrWhitespaceOnly(host)) {final Optional<FileSourceSplit> split = getRemote...
3.26
flink_LocalityAwareSplitAssigner_getNextUnassignedMinLocalCountSplit_rdh
/** * Retrieves a LocatableInputSplit with minimum local count. InputSplits which have already * been assigned (i.e., which are not contained in the provided set) are filtered out. The * returned input split is NOT removed from the provided set. * * @param unassignedSplits * Set of unassigned input splits. * @...
3.26
flink_LocalityAwareSplitAssigner_addInputSplit_rdh
/** * Adds a single input split. */ void addInputSplit(SplitWithInfo split) { int localCount = split.getLocalCount(); if (minLocalCount == (-1)) { // first split to add this.minLocalCount = localCount; this.elementCycleCount = 1; this.splits.offerFirst(split); } els...
3.26
flink_ProcessFunction_onTimer_rdh
/** * Called when a timer set using {@link TimerService} fires. * * @param timestamp * The timestamp of the firing timer. * @param ctx * An {@link OnTimerContext} that allows querying the timestamp of the firing timer, * querying the {@link TimeDomain} of the firing timer and getting a {@link TimerService}...
3.26
flink_ChainedReduceCombineDriver_m0_rdh
// ------------------------------------------------------------------------ @Override public Function m0() { return reducer; }
3.26
flink_NettyShuffleMetricFactory_registerLegacyNetworkMetrics_rdh
/** * Registers legacy network metric groups before shuffle service refactoring. * * <p>Registers legacy metric groups if shuffle service implementation is original default one. * * @deprecated should be removed in future */ @SuppressWarnings("DeprecatedIsStillUsed") @Deprecated public static void registerLegacyN...
3.26
flink_YearMonthIntervalType_getResolutionFormat_rdh
// -------------------------------------------------------------------------------------------- private String getResolutionFormat() { switch (resolution) { case YEAR : return YEAR_FORMAT; case YEAR_TO_MONTH : return YEAR_TO_MONTH_FORMAT; case MONTH : retu...
3.26
flink_RexNodeJsonDeserializer_deserializeSqlOperator_rdh
// -------------------------------------------------------------------------------------------- /** * Logic shared with {@link AggregateCallJsonDeserializer}. */ static SqlOperator deserializeSqlOperator(JsonNode jsonNode, SerdeContext serdeContext) { final SqlSyntax syntax; if (jsonNode.has(FIELD_NAME_SYNTAX)) { syn...
3.26
flink_IterationSynchronizationSinkTask_invoke_rdh
// -------------------------------------------------------------------------------------------- @Override public void invoke() throws Exception { this.headEventReader = new MutableRecordReader<>(getEnvironment().getInputGate(0), getEnvironment().getTaskManagerInfo().getTmpDirectories()); TaskConfig taskConfig =...
3.26
flink_IterationSynchronizationSinkTask_terminationRequested_rdh
// -------------------------------------------------------------------------------------------- @Override public boolean terminationRequested() { return terminated.get(); }
3.26
flink_Watermark_getTimestamp_rdh
/** * Returns the timestamp associated with this {@link Watermark} in milliseconds. */ public long getTimestamp() { return timestamp; }
3.26
flink_Watermark_equals_rdh
// ------------------------------------------------------------------------ @Override public boolean equals(Object o) { return (this == o) || (((o != null) && (o.getClass() == Watermark.class)) && (((Watermark) (o)).timestamp == timestamp)); }
3.26
flink_GeneratingIteratorSourceReader_convert_rdh
// ------------------------------------------------------------------------ @Override protected O convert(E value) { try { return generatorFunction.map(value); } catch (Exception e) { String message = String.format("A user-provided generator function threw an exception on this input: %s", ...
3.26
flink_PartitionCommitPolicy_validatePolicyChain_rdh
/** * Validate commit policy. */ static void validatePolicyChain(boolean isEmptyMetastore, String policyKind) { if (policyKind != null) { String[] policyStrings = policyKind.split(","); for (String policy : policyStrings) {if (isEmptyMetastore && METASTORE.equalsIgnoreCase(policy)) { ...
3.26
flink_StringUtils_byteToHexString_rdh
/** * Given an array of bytes it will convert the bytes to a hex string representation of the * bytes. * * @param bytes * the bytes to convert in a hex string * @return hex string representation of the byte array */ public static String byteToHexString(final byte[] bytes) { return byteToHexString(bytes, ...
3.26
flink_StringUtils_readString_rdh
/** * Reads a non-null String from the given input. * * @param in * The input to read from * @return The deserialized String * @throws IOException * Thrown, if the reading or the deserialization fails. */ public static String readString(DataInputView in) throws IOException { return StringValue.readString...
3.26
flink_StringUtils_writeString_rdh
/** * Writes a String to the given output. The written string can be read with {@link #readString(DataInputView)}. * * @param str * The string to write * @param out * The output to write to * @throws IOException * Thrown, if the writing or the serialization fails. */ public static void writeString(@Nonnu...
3.26
flink_StringUtils_readNullableString_rdh
/** * Reads a String from the given input. The string may be null and must have been written with * {@link #writeNullableString(String, DataOutputView)}. * * @param in * The input to read from. * @return The deserialized string, or null. * @throws IOException * Thrown, if the reading or the deserialization ...
3.26
flink_StringUtils_isNullOrWhitespaceOnly_rdh
/** * Checks if the string is null, empty, or contains only whitespace characters. A whitespace * character is defined via {@link Character#isWhitespace(char)}. * * @param str * The string to check * @return True, if the string is null or blank, false otherwise. */ public static boolean isNullOrWhitespaceOnly...
3.26
flink_StringUtils_toQuotedListString_rdh
/** * Generates a string containing a comma-separated list of values in double-quotes. Uses * lower-cased values returned from {@link Object#toString()} method for each element in the * given array. Null values are skipped. * * @param values * array of elements for the list * @return The string with quoted lis...
3.26
flink_StringUtils_showControlCharacters_rdh
/** * Replaces control characters by their escape-coded version. For example, if the string * contains a line break character ('\n'), this character will be replaced by the two characters * backslash '\' and 'n'. As a consequence, the resulting string will not contain any more * control characters. * * @param str...
3.26
flink_StringUtils_writeNullableString_rdh
/** * Writes a String to the given output. The string may be null. The written string can be read * with {@link #readNullableString(DataInputView)}- * * @param str * The string to write, or null. * @param out * The output to write to. * @throws IOException * Thrown, if the writing or the serialization fa...
3.26
flink_StringUtils_getRandomString_rdh
/** * Creates a random string with a length within the given interval. The string contains only * characters that can be represented as a single code point. * * @param rnd * The random used to create the strings. * @param minLength * The minimum string length. * @param maxLength * The maximum string leng...
3.26
flink_StaticFileServerHandler_checkFileValidity_rdh
/** * Checks various conditions for file access. If all checks pass this method returns, and * processing of the request may continue. If any check fails this method throws a {@link RestHandlerException}, and further processing of the request must be limited to sending an * error response. */ public static void che...
3.26
flink_StaticFileServerHandler_sendNotModified_rdh
// ------------------------------------------------------------------------ // Utilities to encode headers and responses // ------------------------------------------------------------------------ /** * Send the "304 Not Modified" response. This response can be used when the file timestamp is * the same as what the b...
3.26
flink_StaticFileServerHandler_respondToRequest_rdh
/** * Response when running with leading JobManager. */ private void respondToRequest(ChannelHandlerContext ctx, HttpRequest request, String requestPath) throws IOException, ParseException, URISyntaxException, RestHandlerException { // convert to absolute path final File file = new F...
3.26
flink_StaticFileServerHandler_setContentTypeHeader_rdh
/** * Sets the content type header for the HTTP Response. * * @param response * HTTP response * @param file * file to extract content type */ public static void setContentTypeHeader(HttpResponse response, File file) { String mimeType = MimeTypes.getMimeTypeForFileName(file.getName()); String mimeFinal = (mim...
3.26
flink_StaticFileServerHandler_setDateAndCacheHeaders_rdh
/** * Sets the "date" and "cache" headers for the HTTP Response. * * @param response * The HTTP response object. * @param fileToCache * File to extract the modification timestamp from. */ public static void setDateAndCacheHeaders(HttpResponse response, File fileToCache) { SimpleDateFormat dateFormatter = new...
3.26
flink_StaticFileServerHandler_respondAsLeader_rdh
// ------------------------------------------------------------------------ // Responses to requests // ------------------------------------------------------------------------ @Override protected void respondAsLeader(ChannelHandlerContext channelHandlerContext, RoutedRequest routedRequest, T gateway) throws Exception ...
3.26
flink_StaticFileServerHandler_setDateHeader_rdh
/** * Sets the "date" header for the HTTP response. * * @param response * HTTP response */ public static void setDateHeader(FullHttpResponse response) { SimpleDateFormat dateFormatter = new SimpleDateFormat(HTTP_DATE_FORMAT, Locale.US); dateFormatter.setTimeZone(GMT_TIMEZONE); Calendar time = new GregorianCale...
3.26
flink_WritableTypeInfo_getWritableTypeInfo_rdh
// -------------------------------------------------------------------------------------------- @PublicEvolving static <T extends Writable> TypeInformation<T> getWritableTypeInfo(Class<T> typeClass) { if (Writable.class.isAssignableFrom(typeClass) && (!typeClass.equals(Writable.class))) { return new Writa...
3.26
flink_ContextEnvironment_setAsContext_rdh
// -------------------------------------------------------------------------------------------- public static void setAsContext(final PipelineExecutorServiceLoader executorServiceLoader, final Configuration configuration, final ClassLoader userCodeClassLoader, final boolean enforceSingleJobExecution, final boolean su...
3.26
flink_PlannerTypeInferenceUtilImpl_getValidationErrorMessage_rdh
/** * Return the validation error message of this {@link PlannerExpression} or return the * validation error message of it's children if it passes the validation. Return empty if all * validation succeeded. */ private Optional<String> getValidationErrorMessage(PlannerExpression plannerCall) { ValidationResult ...
3.26
flink_RocksDBMapState_get_rdh
// ------------------------------------------------------------------------ // MapState Implementation // ------------------------------------------------------------------------ @Overridepublic UV get(UK userKey) throws IOException, RocksDBException { byte[] rawKeyBytes = serializeCurrentKeyWithGroupAndNamespacePl...
3.26
flink_RocksDBMapState_deserializeUserKey_rdh
// ------------------------------------------------------------------------ // Serialization Methods // ------------------------------------------------------------------------ private static <UK> UK deserializeUserKey(DataInputDeserializer dataInputView, int userKeyOffset, byte[] rawKeyBytes, TypeSerializer<UK> keySer...
3.26
flink_TaskExecutorLocalStateStoresManager_retainLocalStateForAllocations_rdh
/** * Retains the given set of allocations. All other allocations will be released. * * @param allocationsToRetain */ public void retainLocalStateForAllocations(Set<AllocationID> allocationsToRetain) { final Collection<AllocationID> allocationIds = findStoredAllocations(); allocationIds.stream().filter(allo...
3.26
flink_TaskExecutorLocalStateStoresManager_cleanupAllocationBaseDirs_rdh
/** * Deletes the base dirs for this allocation id (recursively). */ private void cleanupAllocationBaseDirs(AllocationID allocationID) { // clear the base dirs for this allocation id. File[] allocationDirectories = allocationBaseDirectories(allocationID); for (File directory : allocationDirectories) { ...
3.26
flink_GenericMetricGroup_makeScopeComponents_rdh
// ------------------------------------------------------------------------ private static String[] makeScopeComponents(AbstractMetricGroup parent, String name) { if (parent != null) { String[] parentComponents = parent.getScopeComponents(); if ((parentComponents != null) && (parentComponents.length...
3.26
flink_AbstractBytesHashMap_appendRecord_rdh
// ----------------------- Append ----------------------- public int appendRecord(LookupInfo<K, BinaryRowData> lookupInfo, BinaryRowData value) throws IOException { final long oldLastPosition = outView.getCurrentOffset(); // serialize the key into the BytesHashMap record area int skip = keySerializer.seri...
3.26
flink_AbstractBytesHashMap_free_rdh
/** * * @param reservedRecordMemory * reserved fixed memory or not. */ public void free(boolean reservedRecordMemory) { recordArea.release(); destructiveIterator = null; super.free(reservedRecordMemory); }
3.26
flink_AbstractBytesHashMap_getVariableLength_rdh
// ----------------------- Private methods ----------------------- static int getVariableLength(LogicalType[] types) { int length = 0; for (LogicalType type : types) { if (!BinaryRowData.isInFixedLengthPart(type)) { // find a better way of computing generic type field variable-length ...
3.26
flink_AbstractBytesHashMap_m0_rdh
/** * Returns an iterator for iterating over the entries of this map. */ @SuppressWarnings("WeakerAccess") public KeyValueIterator<K, BinaryRowData> m0(boolean requiresCopy) { if (destructiveIterator != null) { throw new IllegalArgumentException("DestructiveIterator is not null, so this method can't be in...
3.26
flink_AbstractBytesHashMap_getNumKeys_rdh
// ----------------------- Abstract Interface ----------------------- @Override public long getNumKeys() { return numElements; }
3.26
flink_AbstractBytesHashMap_reset_rdh
/** * reset the map's record and bucket area's memory segments for reusing. */ public void reset() { // reset the record segments. recordArea.reset(); destructiveIterator = null; super.reset(); }
3.26
flink_AbstractBytesHashMap_entryIterator_rdh
// ----------------------- Iterator ----------------------- private KeyValueIterator<K, BinaryRowData> entryIterator(boolean requiresCopy) { return new EntryIterator(requiresCopy); }
3.26
flink_HiveGenericUDTF_setCollector_rdh
// Will only take effect after calling open() @VisibleForTesting protected final void setCollector(Collector collector) { function.setCollector(collector); }
3.26
flink_TimestampsAndWatermarks_createMainOutput_rdh
/** * Creates the ReaderOutput for the source reader, than internally runs the timestamp extraction * and watermark generation. */ ReaderOutput<T> createMainOutput(PushingAsyncDataInput.DataOutput<T> output, WatermarkUpdateListener watermarkCallback) { }
3.26
flink_TimestampsAndWatermarks_createProgressiveEventTimeLogic_rdh
// ------------------------------------------------------------------------ // factories // ------------------------------------------------------------------------ static <E> TimestampsAndWatermarks<E> createProgressiveEventTimeLogic(WatermarkStrategy<E> watermarkStrategy, MetricGroup metrics, ProcessingTimeService ti...
3.26
flink_TaskManagerSlotInformation_isMatchingRequirement_rdh
/** * Returns true if the required {@link ResourceProfile} can be fulfilled by this slot. * * @param required * resources * @return true if the this slot can fulfill the resource requirements */ default boolean isMatchingRequirement(ResourceProfile required) { return getResourceProfile().isMatching(required...
3.26
flink_TaskMetricGroup_putVariables_rdh
// ------------------------------------------------------------------------ // Component Metric Group Specifics // ------------------------------------------------------------------------ @Override protected void putVariables(Map<String, String> variables) { variables.put(ScopeFormat.SCOPE_TASK_VERTEX_ID, vertexId....
3.26
flink_TaskMetricGroup_parent_rdh
// ------------------------------------------------------------------------ // properties // ------------------------------------------------------------------------ public final TaskManagerJobMetricGroup parent() { return parent; }
3.26
flink_TaskMetricGroup_getOrAddOperator_rdh
// operators and cleanup // ------------------------------------------------------------------------ public InternalOperatorMetricGroup getOrAddOperator(String operatorName) { return getOrAddOperator(OperatorID.fromJobVertexID(vertexId), operatorName); }
3.26
flink_NetworkBufferAllocator_allocatePooledNetworkBuffer_rdh
/** * Allocates a pooled network buffer for the specific input channel. * * @param receiverId * The id of the requested input channel. * @return The pooled network buffer. */ @Nullable Buffer allocatePooledNetworkBuffer(InputChannelID receiverId) { Buffer buffer = n...
3.26
flink_NetworkBufferAllocator_allocateUnPooledNetworkBuffer_rdh
/** * Allocates an un-pooled network buffer with the specific size. * * @param size * The requested buffer size. * @param dataType * The data type this buffer represents. * @return The un-pooled network buffer. */ Buffer allocateUnPooledNetworkBuffer(int size, Buffer.DataType dataType) { checkArgument(size ...
3.26
flink_ClearJoinHintsWithInvalidPropagationShuttle_getInvalidJoinHint_rdh
/** * Get the invalid join hint in this node. * * <p>The invalid join meets the following requirement: * * <p>1. This hint name is same with the join hint that needs to be removed * * <p>2.The length of this hint should be same with the length of pr...
3.26
flink_BinaryExternalSorter_run_rdh
/** * Implements exception handling and delegates to go(). */ public void run() { try { go(); } catch (Throwable t) { internalHandleException(new IOException((("Thread '" + getName()) + "' terminated due to an exception: ") + t.getMessage(), t));} }
3.26
flink_BinaryExternalSorter_setResultIterator_rdh
// ------------------------------------------------------------------------ // Inter-Thread Communication // ------------------------------------------------------------------------ /** * Sets the result iterator. By setting the result iterator, all threads that are waiting for * the result iterator are notified and ...
3.26
flink_BinaryExternalSorter_go_rdh
/** * Entry point of the thread. */ public void go() throws IOException { final Queue<CircularElement> cache = new ArrayDeque<>(); CircularElement element; boolean cacheOnly = false; // ------------------- In-Memory Cache ------------------------ // fill cache while (isRunning()) { // ...
3.26
flink_BinaryExternalSorter_internalHandleException_rdh
/** * Internally handles an exception and makes sure that this method returns without a * problem. * * @param ioex * The exception to handle. */ private void internalHandleException(IOException ioex) { if (!isRunning()) { // discard any exception that occurs when after the thread is killed. ...
3.26
flink_BinaryExternalSorter_startThreads_rdh
// ------------------------------------------------------------------------ // Factory Methods // ------------------------------------------------------------------------ /** * Starts all the threads that are used by this sorter. */ public void startThreads() { if (this.sortThread != null) { this.sortThre...
3.26
flink_BinaryExternalSorter_close_rdh
/** * Shuts down all the threads initiated by this sorter. Also releases all previously allocated * memory, if it has not yet been released by the threads, and closes and deletes all channels * (removing the temporary files). * * <p>The threads are set to exit directly, but depending on their operation, it may tak...
3.26
flink_BinaryExternalSorter_setResultIteratorException_rdh
/** * Reports an exception to all threads that are waiting for the result iterator. * * @param ioex * The exception to be reported to the threads that wait for the result iterator. */ private void setResultIteratorException(IOException ioex) { synchronized(this.iteratorLock) { if (this.iteratorExce...
3.26
flink_SingleLogicalSlot_release_rdh
// ------------------------------------------------------------------------- // AllocatedSlot.Payload implementation // ------------------------------------------------------------------------- /** * A release of the payload by the {@link AllocatedSlot} triggers a release of the payload of * the logical slot. * * @...
3.26
flink_StateTableByKeyGroupReaders_readerForVersion_rdh
/** * Creates a new StateTableByKeyGroupReader that inserts de-serialized mappings into the given * table, using the de-serialization algorithm that matches the given version. * * @param <K> * type of key. * @param <N> * type of namespace. * @param <S> * type of state. * @param stateTable * the {@lin...
3.26
flink_CanalJsonFormatFactory_validateEncodingFormatOptions_rdh
/** * Validator for canal encoding format. */ private static void validateEncodingFormatOptions(ReadableConfig tableOptions) { JsonFormatOptionsUtil.validateEncodingFormatOptions(tableOptions); }
3.26
flink_CanalJsonFormatFactory_validateDecodingFormatOptions_rdh
/** * Validator for canal decoding format. */ private static void validateDecodingFormatOptions(ReadableConfig tableOptions) { JsonFormatOptionsUtil.validateDecodingFormatOptions(tableOptions); }
3.26
flink_DistinctType_newBuilder_rdh
/** * Creates a builder for a {@link DistinctType}. */ public static DistinctType.Builder newBuilder(ObjectIdentifier objectIdentifier, LogicalType sourceType) { return new DistinctType.Builder(objectIdentifier, sourceType); }
3.26
flink_JarHandlerUtils_getProgramArgs_rdh
/** * Parse program arguments in jar run or plan request. */ private static <R extends JarRequestBody, M extends MessageParameters> List<String> getProgramArgs(HandlerRequest<R> request, Logger log) throws RestHandlerException { JarRequestBody requestBody = request.getRequestBody(); @SuppressWarnings("depreca...
3.26
flink_JarHandlerUtils_tokenizeArguments_rdh
/** * Takes program arguments as a single string, and splits them into a list of string. * * <pre> * tokenizeArguments("--foo bar") = ["--foo" "bar"] * tokenizeArguments("--foo \"bar baz\"") = ["--foo" "bar baz"] * tokenizeArguments("--foo 'bar baz'") = ["--foo" "bar baz"] * tokenizeArguments(...
3.26
flink_StreamContextEnvironment_collectNotAllowedConfigurations_rdh
/** * Collects programmatic configuration changes. * * <p>Configuration is spread across instances of {@link Configuration} and POJOs (e.g. {@link ExecutionConfig}), so we need to have logic for comparing both. For supporting wildcards, the * first can be accomplished by simply removing keys, the latter by setting ...
3.26
flink_StreamContextEnvironment_checkNotAllowedConfigurations_rdh
// -------------------------------------------------------------------------------------------- // Program Configuration Validation // -------------------------------------------------------------------------------------------- private void checkNotAllowedConfigurations() throws MutatedConfigurationException { final Co...
3.26
flink_StreamContextEnvironment_setAsContext_rdh
// -------------------------------------------------------------------------------------------- public static void setAsContext(final PipelineExecutorServiceLoader executorServiceLoader, final Configuration clusterConfiguration, final ClassLoader userCodeClassLoader, final boolean enforceSingleJobExecution, final boole...
3.26
flink_SerializationSchema_open_rdh
/** * Initialization method for the schema. It is called before the actual working methods {@link #serialize(Object)} and thus suitable for one time setup work. * * <p>The provided {@link InitializationContext} can be used to access additional features such * as e.g. registering user metrics. * * @param context ...
3.26