name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_PartitionRequestListenerManager_removeExpiration_rdh
/** * Remove the expire partition request listener and add it to the given timeoutListeners. * * @param now * the timestamp * @param timeout * the timeout mills * @param timeoutListeners * the expire partition request listeners */ public void removeExpiration...
3.26
flink_ProcessingTimeoutTrigger_of_rdh
/** * Creates a new {@link ProcessingTimeoutTrigger} that fires when the inner trigger is fired or * when the timeout timer fires. * * <p>For example: {@code ProcessingTimeoutTrigger.of(CountTrigger.of(3), 100, false, true)}, * will create a CountTrigger with timeout of 100 millis. So, if the first record arrives ...
3.26
flink_RootExceptionHistoryEntry_fromGlobalFailure_rdh
/** * Creates a {@code RootExceptionHistoryEntry} based on the passed {@link ErrorInfo}. No * concurrent failures will be added. * * @param errorInfo * The failure information that shall be used to initialize the {@code RootExceptionHistoryEntry}. * @return The {@code RootExceptionHistoryEntry} instance. * @th...
3.26
flink_RootExceptionHistoryEntry_fromFailureHandlingResultSnapshot_rdh
/** * Creates a {@code RootExceptionHistoryEntry} based on the passed {@link FailureHandlingResultSnapshot}. * * @param snapshot * The reason for the failure. * @return The {@code RootExceptionHistoryEntry} instance. * @throws NullPointerException * if {@code cause} or {@code failingTaskName} are {@code null...
3.26
flink_BinaryInMemorySortBuffer_getIterator_rdh
// ------------------------------------------------------------------------- /** * Gets an iterator over all records in this buffer in their logical order. * * @return An iterator returning the records in their logical order. */ public MutableObjectIterator<BinaryRowData> getIterator() { return new MutableObjec...
3.26
flink_BinaryInMemorySortBuffer_reset_rdh
// ------------------------------------------------------------------------- // Memory Segment // ------------------------------------------------------------------------- /** * Resets the sort buffer back to the state where it is empty. All contained data is discarded. */ public void reset() { // reset all off...
3.26
flink_BinaryInMemorySortBuffer_createBuffer_rdh
/** * Create a memory sorter in `insert` way. */ public static BinaryInMemorySortBuffer createBuffer(NormalizedKeyComputer normalizedKeyComputer, AbstractRowDataSerializer<RowData> inputSerializer, BinaryRowDataSerializer serializer, RecordComparator comparator, MemorySegmentPool memoryPool) { checkArgument(memor...
3.26
flink_BinaryInMemorySortBuffer_write_rdh
/** * Writes a given record to this sort buffer. The written record will be appended and take the * last logical position. * * @param record * The record to be written. * @return True, if the record was successfully written, false, if the sort buffer was full. * @throws IOException * Thrown, if an error occ...
3.26
flink_MergingSharedSlotProfileRetrieverFactory_getSlotProfile_rdh
/** * Computes a {@link SlotProfile} of an execution slot sharing group. * * <p>The preferred locations of the {@link SlotProfile} is a union of the preferred * locations of all executions sharing the slot. The input locations within the bulk are * ignored to avoid cyclic dependencies within the region, e.g. in ca...
3.26
flink_TableFactoryService_findAllInternal_rdh
/** * Finds a table factory of the given class, property map, and classloader. * * @param factoryClass * desired factory class * @param properties * properties that describe the factory configuration * @param classLoader * classloader for service loading * @param <T> * factory class type * @return th...
3.26
flink_TableFactoryService_extractWildcardPrefixes_rdh
/** * Converts the prefix of properties with wildcards (e.g., "format.*"). */ private static List<String> extractWildcardPrefixes(List<String> propertyKeys) { return propertyKeys.stream().filter(p -> p.endsWith("*")).map(s -> s.substring(0, s.length() - 1)).collect(Collectors.toList()); }
3.26
flink_TableFactoryService_discoverFactories_rdh
/** * Searches for factories using Java service providers. * * @return all factories in the classpath */ private static List<TableFactory> discoverFactories(Optional<ClassLoader> classLoader) { try {List<TableFactory> result = new LinkedList<>(); ClassLoader cl = classLoader.orElse(Thread.currentThread(...
3.26
flink_TableFactoryService_normalizeSupportedProperties_rdh
/** * Prepares the supported properties of a factory to be used for match operations. */ private static Tuple2<List<String>, List<String>> normalizeSupportedProperties(TableFactory factory) { List<String> supportedProperties = factory.supportedProperties(); if (supportedProperties == null) { throw ne...
3.26
flink_TableFactoryService_filterByContext_rdh
/** * Filters for factories with matching context. * * @return all matching factories */ private static <T extends TableFactory> List<T> filterByContext(Class<T> factoryClass, Map<String, String> properties, List<T> classFactories) { List<T> matchingFacto...
3.26
flink_TableFactoryService_findSingleInternal_rdh
/** * Finds a table factory of the given class, property map, and classloader. * * @param factoryClass * desired factory class * @param properties * properties that describe the factory configuration * @param classLoader * classloader for service loading * @param <T> * factory class type * @return th...
3.26
flink_TableFactoryService_findAll_rdh
/** * Finds all table factories of the given class and property map. * * @param factoryClass * desired factory class * @param propertyMap * properties that describe the factory configuration * @param <T> * factory class type * @return all the matching factories */ public static <T extends TableFactory> ...
3.26
flink_TableFactoryService_filter_rdh
/** * Filters found factories by factory class and with matching context. */ private static <T extends TableFactory> List<T> filter(List<TableFactory> foundFactories, Class<T> factoryClass, Map<String, String> properties) { Preconditions.checkNotNull(factoryClass); Preconditions.checkNotNull(properties);...
3.26
flink_TableFactoryService_normalizeContext_rdh
/** * Prepares the properties of a context to be used for match operations. */private static Map<String, String> normalizeContext(TableFactory factory) { Map<String, String> requiredContext = factory.requiredContext(); if (requiredContext == null) { throw new TableException(String.format("Required co...
3.26
flink_TableFactoryService_filterBySupportedProperties_rdh
/** * Filters the matching class factories by supported properties. */private static <T extends TableFactory> List<T> filterBySupportedProperties(Class<T> factoryClass, Map<String, String> properties, List<T> classFactories, List<T> contextFactories) { final List<String> plainGivenKeys = new LinkedList<>(); p...
3.26
flink_TableFactoryService_find_rdh
/** * Finds a table factory of the given class, property map, and classloader. * * @param factoryClass * desired factory class * @param propertyMap * properties that describe the factory configuration * @param classLoader * classloader for service loading * @param <T> * factory class type * @return t...
3.26
flink_IteratorSourceReaderBase_start_rdh
// ------------------------------------------------------------------------ @Override public void start() { // request a split if we don't have one if (remainingSplits.isEmpty()) { context.sendSplitRequest(); } start(context); }
3.26
flink_NoOpResultSubpartitionView_getNextBuffer_rdh
/** * A dummy implementation of the {@link ResultSubpartitionView}. */ public class NoOpResultSubpartitionView implements ResultSubpartitionView { @Nullable public BufferAndBacklog getNextBuffer() {return null; }
3.26
flink_CheckpointStatsCache_tryGet_rdh
/** * Try to look up a checkpoint by it's ID in the cache. * * @param checkpointId * ID of the checkpoint to look up. * @return The checkpoint or <code>null</code> if checkpoint not found. */ public AbstractCheckpointStats tryGet(long checkpointId) { if (cache != null) { return cache.getIfPresent(ch...
3.26
flink_CheckpointStatsCache_tryAdd_rdh
/** * Try to add the checkpoint to the cache. * * @param checkpoint * Checkpoint to be added. */ public void tryAdd(AbstractCheckpointStats checkpoint) { // Don't add in progress checkpoints as they will be replaced by their // completed/failed version eventually. if (((cache != null) && (checkpoint ...
3.26
flink_KvStateLocationRegistry_notifyKvStateUnregistered_rdh
/** * Notifies the registry about an unregistered KvState instance. * * @param jobVertexId * JobVertexID the KvState instance belongs to * @param keyGroupRange * Key group index the KvState instance belongs to * @param registrationName * Name under which the KvState has been registered * @throws IllegalA...
3.26
flink_KvStateLocationRegistry_notifyKvStateRegistered_rdh
/** * Notifies the registry about a registered KvState instance. * * @param jobVertexId * JobVertexID the KvState instance belongs to * @param keyGroupRange * Key group range the KvState instance belongs to * @param registrationName * Name under which the KvState has be...
3.26
flink_KvStateLocationRegistry_getKvStateLocation_rdh
/** * Returns the {@link KvStateLocation} for the registered KvState instance or <code>null</code> * if no location information is available. * * @param registrationName * Name under which the KvState instance is registered. * @return Location information or <code>null</code>. */ public KvStateLocation getKvS...
3.26
flink_VarBinaryType_ofEmptyLiteral_rdh
/** * The SQL standard defines that character string literals are allowed to be zero-length strings * (i.e., to contain no characters) even though it is not permitted to declare a type that is * zero. For consistent behavior, the same logic applies to binary strings. This has also * implications on variable-length ...
3.26
flink_EventsGenerator_nextInvalid_rdh
/** * Creates an event for an illegal state transition of one of the internal state machines. If * the generator has not yet started any state machines (for example, because no call to {@link #next(int, int)} was made, yet), this will return null. * * @return An event for a i...
3.26
flink_EventsGenerator_next_rdh
// ------------------------------------------------------------------------ /** * Creates a new random event. This method randomly pick either one of its currently running * state machines, or start a new state machine for a random IP address. * * <p>With {@link #errorProb} probability, the generated event will be ...
3.26
flink_TypeSerializerSchemaCompatibility_getReconfiguredSerializer_rdh
/** * Gets the reconfigured serializer. This throws an exception if {@link #isCompatibleWithReconfiguredSerializer()} is {@code false}. */public TypeSerializer<T> getReconfiguredSerializer() { Preconditions.checkState(isCompatibleWithReconfiguredSerializer(), "It is only possible to get a reconfigured serializer if t...
3.26
flink_TypeSerializerSchemaCompatibility_isIncompatible_rdh
/** * Returns whether or not the type of the compatibility is {@link Type#INCOMPATIBLE}. * * @return whether or not the type of the compatibility is {@link Type#INCOMPATIBLE}. */ public boolean isIncompatible() { return resultType == Type.INCOMPATIBLE; }
3.26
flink_TypeSerializerSchemaCompatibility_isCompatibleAfterMigration_rdh
/** * Returns whether or not the type of the compatibility is {@link Type#COMPATIBLE_AFTER_MIGRATION}. * * @return whether or not the type of the compatibility is {@link Type#COMPATIBLE_AFTER_MIGRATION}. */ public boolean isCompatibleAfterMigration() { return resultType == Type.COMPATIBLE_AFTER_MIGRATION;}
3.26
flink_TypeSerializerSchemaCompatibility_incompatible_rdh
/** * Returns a result that indicates there is no possible way for the new serializer to be * use-able. This normally indicates that there is no common Java class between what the * previous bytes can be deserialized into and what can be written by the new serializer. * * <p>In this case, there is no possible way ...
3.26
flink_TypeSerializerSchemaCompatibility_isCompatibleWithReconfiguredSerializer_rdh
/** * Returns whether or not the type of the compatibility is {@link Type#COMPATIBLE_WITH_RECONFIGURED_SERIALIZER}. * * @return whether or not the type of the compatibility is {@link Type#COMPATIBLE_WITH_RECONFIGURED_SERIALIZER}. */ public boolean isCompatibleWithReconfiguredSerializer() { return resultType == Type...
3.26
flink_TypeSerializerSchemaCompatibility_isCompatibleAsIs_rdh
/** * Returns whether or not the type of the compatibility is {@link Type#COMPATIBLE_AS_IS}. * * @return whether or not the type of the compatibility is {@link Type#COMPATIBLE_AS_IS}. */public boolean isCompatibleAsIs() { return resultType == Type.COMPATIBLE_AS_IS; }
3.26
flink_ByteValueComparator_supportsSerializationWithKeyNormalization_rdh
// -------------------------------------------------------------------------------------------- // unsupported normalization // -------------------------------------------------------------------------------------------- @Override public boolean supportsSerializationWithKeyNormalization() { return false; }
3.26
flink_RestoredCheckpointStats_getExternalPath_rdh
/** * Returns the external path if this checkpoint was persisted externally. * * @return External path of this checkpoint or <code>null</code>. */ @Nullable public String getExternalPath() { return externalPath; }
3.26
flink_RestoredCheckpointStats_getRestoreTimestamp_rdh
/** * Returns the timestamp when the checkpoint was restored. * * @return Timestamp when the checkpoint was restored. */ public long getRestoreTimestamp() { return restoreTimestamp; }
3.26
flink_RestoredCheckpointStats_getCheckpointId_rdh
/** * Returns the ID of this checkpoint. * * @return ID of this checkpoint. */ public long getCheckpointId() { return checkpointId; }
3.26
flink_RestoredCheckpointStats_getProperties_rdh
/** * Returns the properties of the restored checkpoint. * * @return Properties of the restored checkpoint. */ public CheckpointProperties getProperties() { return props;}
3.26
flink_HiveParserTypeCheckCtx_setOuterRR_rdh
/** * * @param outerRR * the outerRR to set */ public void setOuterRR(HiveParserRowResolver outerRR) { this.outerRR = outerRR; }
3.26
flink_HiveParserTypeCheckCtx_getOuterRR_rdh
/** * * @return the outerRR */ public HiveParserRowResolver getOuterRR() { return outerRR; }
3.26
flink_HiveParserTypeCheckCtx_setAllowStatefulFunctions_rdh
/** * * @param allowStatefulFunctions * whether to allow stateful UDF invocations */ public void setAllowStatefulFunctions(boolean allowStatefulFunctions) { this.allowStatefulFunctions = allowStatefulFunctions; }
3.26
flink_HiveParserTypeCheckCtx_getError_rdh
/** * * @return the error */ public String getError() { return error; }
3.26
flink_HiveParserTypeCheckCtx_getAllowStatefulFunctions_rdh
/** * * @return whether to allow stateful UDF invocations */ public boolean getAllowStatefulFunctions() { return allowStatefulFunctions; }
3.26
flink_HiveParserTypeCheckCtx_getUnparseTranslator_rdh
/** * * @return the unparseTranslator */ public HiveParserUnparseTranslator getUnparseTranslator() { return unparseTranslator; }
3.26
flink_HiveParserTypeCheckCtx_getSubqueryToRelNode_rdh
/** * * @return the outerRR */ public Map<HiveParserASTNode, RelNode> getSubqueryToRelNode() { return subqueryToRelNode; }
3.26
flink_HiveParserTypeCheckCtx_m0_rdh
/** * * @param unparseTranslator * the unparseTranslator to set */ public void m0(HiveParserUnparseTranslator unparseTranslator) { this.unparseTranslator = unparseTranslator; }
3.26
flink_HiveParserTypeCheckCtx_setInputRR_rdh
/** * * @param inputRR * the inputRR to set */ public void setInputRR(HiveParserRowResolver inputRR) { this.inputRR = inputRR; }
3.26
flink_HiveParserTypeCheckCtx_setSubqueryToRelNode_rdh
/** * * @param subqueryToRelNode * the subqueryToRelNode to set */ public void setSubqueryToRelNode(Map<HiveParserASTNode, RelNode> subqueryToRelNode) { this.subqueryToRelNode = subqueryToRelNode; }
3.26
flink_HiveParserTypeCheckCtx_getInputRR_rdh
/** * * @return the inputRR */ public HiveParserRowResolver getInputRR() { return inputRR; }
3.26
flink_HiveParserTypeCheckCtx_setError_rdh
/** * * @param error * the error to set */ public void setError(String error, HiveParserASTNode errorSrcNode) { if (LOG.isDebugEnabled()) { // Logger the callstack from which the error has been set. LOG.debug((("Setting error: [" + error) + "] from ") + (errorSrcNode == null ? "null" :...
3.26
flink_InternalOperatorIOMetricGroup_reuseOutputMetricsForTask_rdh
/** * Causes the containing task to use this operators output record counter. */ public void reuseOutputMetricsForTask() { TaskIOMetricGroup taskIO = parentMetricGroup.getTaskIOMetricGroup(); taskIO.reuseRecordsOutputCounter(this.numRecordsOut); }
3.26
flink_InternalOperatorIOMetricGroup_reuseInputMetricsForTask_rdh
/** * Causes the containing task to use this operators input record counter. */ public void reuseInputMetricsForTask() { TaskIOMetricGroup taskIO = parentMetricGroup.getTaskIOMetricGroup(); taskIO.reuseRecordsInputCounter(this.numRecordsIn); }
3.26
flink_SingleInputOperator_accept_rdh
// -------------------------------------------------------------------------------------------- /** * Accepts the visitor and applies it this instance. The visitors pre-visit method is called * and, if returning <tt>true</tt>, the visitor is recursively applied on the single input. * After the recursion returned, th...
3.26
flink_SingleInputOperator_setInput_rdh
/** * Sets the given operator as the input to this operator. * * @param input * The operator to use as the input. */ public void setInput(Operator<IN> input) {this.input = input; } /** * Sets the input to the union of the given operators. * * @param input * The operator(s) that form the input. * @depreca...
3.26
flink_SingleInputOperator_clearInputs_rdh
/** * Removes all inputs. */ public void clearInputs() { this.input = null; }
3.26
flink_SingleInputOperator_getSemanticProperties_rdh
// -------------------------------------------------------------------------------------------- public SingleInputSemanticProperties getSemanticProperties() { return this.semanticProperties;}
3.26
flink_SingleInputOperator_getInput_rdh
/** * Returns the input operator or data source, or null, if none is set. * * @return This operator's input. */ public Operator<IN> getInput() { return this.input; }
3.26
flink_SingleInputOperator_getOperatorInfo_rdh
// -------------------------------------------------------------------------------------------- /** * Gets the information about the operators input/output types. */ @Override @SuppressWarnings("unchecked") public UnaryOperatorInformation<IN, OUT> getOperatorInfo() { return ((UnaryOperatorInformation<IN, OUT>) (t...
3.26
flink_SingleInputOperator_getNumberOfInputs_rdh
// -------------------------------------------------------------------------------------------- @Override public final int getNumberOfInputs() { return 1; }
3.26
flink_BatchExecLegacySink_validateType_rdh
/** * Validate if class represented by the typeInfo is static and globally accessible. * * @param dataType * type to check * @throws TableException * if type does not meet these criteria */ private void validateType(DataType dataType) { Class<?> clazz = dataType.getConversionClass(); if (clazz == nul...
3.26
flink_DataTypeFactoryImpl_createSerializerExecutionConfig_rdh
// -------------------------------------------------------------------------------------------- /** * Creates a lazy {@link ExecutionConfig} that contains options for {@link TypeSerializer}s with * information from existing {@link ExecutionConfig} (if available) enriched with table {@link ReadableConfig}. */ private...
3.26
flink_DefaultCheckpointPlanCalculator_collectTaskRunningStatus_rdh
/** * Collects the task running status for each job vertex. * * @return The task running status for each job vertex. */ @VisibleForTesting Map<JobVertexID, BitSet> collectTaskRunningStatus() { Map<JobVertexID, BitSet> runningStatusByVertex = new HashMap<>(); for (ExecutionJobVertex vertex : jobVerticesInTop...
3.26
flink_DefaultCheckpointPlanCalculator_calculateAfterTasksFinished_rdh
/** * Calculates the checkpoint plan after some tasks have finished. We iterate the job graph to * find the task that is still running, but do not has precedent running tasks. * * @return The plan of this checkpoint. */ private CheckpointPlan calculateAfterTasksFinished() { // First collect the task running st...
3.26
flink_DefaultCheckpointPlanCalculator_checkTasksStarted_rdh
/** * Checks if all tasks to trigger have already been in RUNNING state. This method should be * called from JobMaster main thread executor. * * @throws CheckpointException * if some tasks to trigger have not turned into RUNNING yet. */ private void checkTasksStarted(List<Execution> toTrigger) throws Checkpoint...
3.26
flink_DefaultCheckpointPlanCalculator_calculateWithAllTasksRunning_rdh
/** * Computes the checkpoint plan when all tasks are running. It would simply marks all the source * tasks as need to trigger and all the tasks as need to wait and commit. * * @return The plan of this checkpoint. */ private CheckpointPlan calculateWithAllTasksRunning() { List<Execution> executionsToTrigger = sour...
3.26
flink_DefaultCheckpointPlanCalculator_checkAllTasksInitiated_rdh
/** * Checks if all tasks are attached with the current Execution already. This method should be * called from JobMaster main thread executor. * * @throws CheckpointException * if some tasks do not have attached Execution. */ private void checkAllTasksInitiated() throws CheckpointException { for (Execution...
3.26
flink_DefaultCheckpointPlanCalculator_hasActiveUpstreamVertex_rdh
/** * Every task must have active upstream tasks if * * <ol> * <li>ALL_TO_ALL connection and some predecessors are still running. * <li>POINTWISE connection and all predecessors are still running. * </ol> * * @param distribution * The distribution pattern between the upstream vertex and the current * ...
3.26
flink_BoundedFIFOQueue_size_rdh
/** * Returns the number of currently stored elements. * * @return The number of currently stored elements. */ public int size() { return this.elements.size();}
3.26
flink_BoundedFIFOQueue_iterator_rdh
/** * Returns the {@code BoundedFIFOQueue}'s {@link Iterator}. * * @return The queue's {@code Iterator}. */ @Override public Iterator<T> iterator() { return elements.iterator(); }
3.26
flink_RocksDBNativeMetricMonitor_setProperty_rdh
/** * Updates the value of metricView if the reference is still valid. */ private void setProperty(RocksDBNativePropertyMetricView metricView) { if (metricView.isClosed()) { return; } try { synchronized(lock) { if (rocksDB != null) { ...
3.26
flink_RocksDBNativeMetricMonitor_registerStatistics_rdh
/** * Register gauges to pull native metrics for the database. */ private void registerStatistics() { if (statistics != null) { for (TickerType tickerType : options.getMonitorTickerTypes()) { metricGroup.gauge(String.format("rocksdb.%s", tickerType.name().toLowerCase()), new RocksD...
3.26
flink_RocksDBNativeMetricMonitor_registerColumnFamily_rdh
/** * Register gauges to pull native metrics for the column family. * * @param columnFamilyName * group name for the new gauges * @param handle * native handle to the column family */ void registerColumnFamily(String columnFamilyName, ColumnFamilyHandle handle) { boolean columnFamilyAsVariable = options....
3.26
flink_RocksDBResourceContainer_getReadOptions_rdh
/** * Gets the RocksDB {@link ReadOptions} to be used for read operations. */ public ReadOptions getReadOptions() { ReadOptions opt = new ReadOptions(); handlesToClose.add(opt); // add user-defined options factory, if specified if (f0 != null) { opt = f0.createReadOptions(opt, handlesToClose);...
3.26
flink_RocksDBResourceContainer_createBaseCommonDBOptions_rdh
/** * Create a {@link DBOptions} for RocksDB, including some common settings. */ DBOptions createBaseCommonDBOptions() { return new DBOptions().setUseFsync(false).setStatsDumpPeriodSec(0); }
3.26
flink_RocksDBResourceContainer_internalGetOption_rdh
/** * Get a value for option from pre-defined option and configurable option settings. The priority * relationship is as below. * * <p>Configured value > pre-defined value > default value. * * @param option * the wanted option * @param <T> * the value type * @return the final value for the option accordin...
3.26
flink_RocksDBResourceContainer_getWriteOptions_rdh
/** * Gets the RocksDB {@link WriteOptions} to be used for write operations. */ public WriteOptions getWriteOptions() { // Disable WAL by default WriteOptions opt = new WriteOptions().setDisableWAL(true); handlesToClose.add(opt); // add user-defined options factory, if ...
3.26
flink_RocksDBResourceContainer_getColumnOptions_rdh
/** * Gets the RocksDB {@link ColumnFamilyOptions} to be used for all RocksDB instances. */ public ColumnFamilyOptions getColumnOptions() { // initial options from common profile ColumnFamilyOptions opt = createBaseCommonColumnOptions(); handlesToClose.add(opt); // load configurable options on top o...
3.26
flink_RocksDBResourceContainer_resolveFileLocation_rdh
/** * Verify log file location. * * @param logFilePath * Path to log file * @return File or null if not a valid log file */ private File resolveFileLocation(String logFilePath) { File logFile = new File(logFilePath); return logFile.exists() && logFile.canRead() ? logFile : null; }
3.26
flink_RocksDBResourceContainer_createBaseCommonColumnOptions_rdh
/** * Create a {@link ColumnFamilyOptions} for RocksDB, including some common settings. */ ColumnFamilyOptions createBaseCommonColumnOptions() { return new ColumnFamilyOptions(); }
3.26
flink_RocksDBResourceContainer_getDbOptions_rdh
/** * Gets the RocksDB {@link DBOptions} to be used for RocksDB instances. */ public DBOptions getDbOptions() { // initial options from common profile DBOptions opt = createBaseCommonDBOptions(); handlesToClose.add(opt); // load configurable options on top of pre-defin...
3.26
flink_RocksDBResourceContainer_relocateDefaultDbLogDir_rdh
/** * Relocates the default log directory of RocksDB with the Flink log directory. Finds the Flink * log directory using log.file Java property that is set during startup. * * @param dbOptions * The RocksDB {@link DBOptions}. */ private void relocateDefaultDbLogDir(DBOptions dbOptions) { String logFilePath = Sy...
3.26
flink_RocksDBResourceContainer_overwriteFilterIfExist_rdh
/** * Overwrite configured {@link Filter} if enable partitioned filter. Partitioned filter only * worked in full bloom filter, not blocked based. */ private boolean overwriteFilterIfExist(BlockBasedTableConfig blockBasedTableConfig) { if (blockBasedTableConfig.filterPolicy() != null) { // TODO Can get filter's conf...
3.26
flink_PekkoRpcService_connect_rdh
// this method does not mutate state and is thus thread-safe @Override public <F extends Serializable, C extends FencedRpcGateway<F>> CompletableFuture<C> connect(String address, F fencingToken, Class<C> clazz) { return connectInternal(address, clazz, (ActorRef actorRef) -> { Tuple2<String, String> ...
3.26
flink_PekkoRpcService_extractAddressHostname_rdh
// --------------------------------------------------------------------------------------- // Private helper methods // --------------------------------------------------------------------------------------- private Tuple2<String, String> extractAddressHostname(ActorRef actorRef) { final String actorAddress = Pekko...
3.26
flink_TaskStateSnapshot_getOutputRescalingDescriptor_rdh
/** * Returns the output channel mapping for rescaling with in-flight data or {@link InflightDataRescalingDescriptor#NO_RESCALE}. */ public InflightDataRescalingDescriptor getOutputRescalingDescriptor() { return getMapping(OperatorSubtaskState::getOutputRescalingDescriptor); }
3.26
flink_TaskStateSnapshot_getMapping_rdh
/** * Returns the only valid mapping as ensured by {@link StateAssignmentOperation}. */ private InflightDataRescalingDescriptor getMapping(Function<OperatorSubtaskState, InflightDataRescalingDescriptor> mappingExtractor) { return Iterators.getOnlyElement(subtaskStatesByOperatorID.values().stream().map(mappingExt...
3.26
flink_TaskStateSnapshot_isTaskFinished_rdh
/** * Returns whether all the operators of the task have called finished methods. */ public boolean isTaskFinished() { return isTaskFinished; }
3.26
flink_TaskStateSnapshot_m0_rdh
/** * Returns whether all the operators of the task are already finished on restoring. */ public boolean m0() { return isTaskDeployedAsFinished; }
3.26
flink_TaskStateSnapshot_putSubtaskStateByOperatorID_rdh
/** * Maps the given operator id to the given subtask state. Returns the subtask state of a * previous mapping, if such a mapping existed or null otherwise. */ public OperatorSubtaskState putSubtaskStateByOperatorID(@Nonnull OperatorID operatorID, @Nonnull OperatorSubtaskState state) { return subtaskStatesByOper...
3.26
flink_TaskStateSnapshot_getInputRescalingDescriptor_rdh
/** * Returns the input channel mapping for rescaling with in-flight data or {@link InflightDataRescalingDescriptor#NO_RESCALE}. */ public InflightDataRescalingDescriptor getInputRescalingDescriptor() { return getMapping(OperatorSubtaskState::getInputRescalingDescriptor); }
3.26
flink_TaskStateSnapshot_hasState_rdh
/** * Returns true if at least one {@link OperatorSubtaskState} in subtaskStatesByOperatorID has * state. */ public boolean hasState() { for (OperatorSubtaskState operatorSubtaskState : subtaskStatesByOperatorID.values()) { if ((operatorSubtaskState != null) && operatorSubtaskState.hasState()) { ...
3.26
flink_TaskStateSnapshot_getSubtaskStateByOperatorID_rdh
/** * Returns the subtask state for the given operator id (or null if not contained). */ @Nullable public OperatorSubtaskState getSubtaskStateByOperatorID(OperatorID operatorID) { return subtaskStatesByOperatorID.get(operatorID); }
3.26
flink_TaskStateSnapshot_getSubtaskStateMappings_rdh
/** * Returns the set of all mappings from operator id to the corresponding subtask state. */ public Set<Map.Entry<OperatorID, OperatorSubtaskState>> getSubtaskStateMappings() { return subtaskStatesByOperatorID.entrySet(); }
3.26
flink_FinalizeOnMaster_finalizeGlobal_rdh
/** * The method is invoked on the master (JobManager) after all (parallel) instances of an * OutputFormat finished. * * @param context * The context to get finalization infos. * @throws IOException * The finalization may throw exceptions, which may cause the job to abort. */ default void finalizeGlobal(Fin...
3.26
flink_RocksDBIncrementalRestoreOperation_restoreBaseDBFromLocalState_rdh
/** * Restores RocksDB instance from local state. */ private void restoreBaseDBFromLocalState(IncrementalLocalKeyedStateHandle localKeyedStateHandle) throws Exception { KeyedBackendSerializationProxy<K> serializationProxy = readMetaData(localKeyedStateHandle.getMetaDataStateHandle()); List<StateMetaInfoSnapshot> st...
3.26
flink_RocksDBIncrementalRestoreOperation_restoreWithoutRescaling_rdh
/** * Recovery from a single remote incremental state without rescaling. */ @SuppressWarnings("unchecked") private void restoreWithoutRescaling(KeyedStateHandle keyedStateHandle) throws Exception { logger.info("Starting to restore from state handle: {} without rescaling.", keyedStateHandle); if (keyedStateHa...
3.26
flink_RocksDBIncrementalRestoreOperation_restoreWithRescaling_rdh
/** * Recovery from multi incremental states with rescaling. For rescaling, this method creates a * temporary RocksDB instance for a key-groups shard. All contents from the temporary instance * are copied into the real restore instance and then the temporary instance is discarded. */ private void restoreWithRescali...
3.26