name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_AbstractPythonFunctionOperator_m1_rdh
/** * Advances the watermark of all managed timer services, potentially firing event time timers. * It also ensures that the fired timers are processed in the Python user-defined functions. */ private void m1(Watermark watermark) throws Exception { if (getTimeServiceManager().isPresent()) { InternalTimeS...
3.26
flink_AbstractPythonFunctionOperator_checkInvokeFinishBundleByCount_rdh
/** * Checks whether to invoke finishBundle by elements count. Called in processElement. */ protected void checkInvokeFinishBundleByCount() throws Exception { if (elementCount >= maxBundleSize) { invokeFinishBundle(); } }
3.26
flink_AbstractPythonFunctionOperator_isBundleFinished_rdh
/** * Returns whether the bundle is finished. */ public boolean isBundleFinished() { return elementCount == 0; }
3.26
flink_AbstractPythonFunctionOperator_getConfiguration_rdh
/** * Returns the {@link Configuration}. */ public Configuration getConfiguration() { return config; }
3.26
flink_AbstractPythonFunctionOperator_checkInvokeFinishBundleByTime_rdh
/** * Checks whether to invoke finishBundle by timeout. */ private void checkInvokeFinishBundleByTime() throws Exception { long now = getProcessingTimeService().getCurrentProcessingTime(); if ((now - lastFinishBundleTime) >= maxBundleTimeMills) { ...
3.26
flink_ShuffleMaster_close_rdh
/** * Closes this shuffle master service which should release all resources. A shuffle master will * only be closed when the cluster is shut down. */ @Override default void close() throws Exception { }
3.26
flink_ShuffleMaster_registerJob_rdh
/** * Registers the target job together with the corresponding {@link JobShuffleContext} to this * shuffle master. Through the shuffle context, one can obtain some basic information like job * ID, job configuration. It enables ShuffleMaster to notify JobMaster about lost result * partitions, so that JobMaster can i...
3.26
flink_ShuffleMaster_unregisterJob_rdh
/** * Unregisters the target job from this shuffle master, which means the corresponding job has * reached a global termination state and all the allocated resources except for the cluster * partitions can be cleared. * * @param jobID * ID of the target job to be unregistered. */ default void unregisterJob(Job...
3.26
flink_ShuffleMaster_start_rdh
/** * Starts this shuffle master as a service. One can do some initialization here, for example * getting access and connecting to the external system. */ default void start() throws Exception { }
3.26
flink_ShuffleMaster_computeShuffleMemorySizeForTask_rdh
/** * Compute shuffle memory size for a task with the given {@link TaskInputsOutputsDescriptor}. * * @param taskInputsOutputsDescriptor * describes task inputs and outputs information for shuffle * memory calculation. * @return shuffle memory size for a task with the given {@link TaskInputsOutputsDescriptor}....
3.26
flink_BernoulliSampler_sample_rdh
/** * Sample the input elements, for each input element, take a Bernoulli trail for sampling. * * @param input * Elements to be sampled. * @return The sampled result which is lazy computed upon input elements. */ @Override public Iterator<T> sample(final Iterator<T> input) { ...
3.26
flink_AsyncTableFunctionProvider_of_rdh
/** * Helper method for creating a static provider. */ static <T> AsyncTableFunctionProvider<T> of(AsyncTableFunction<T> asyncTableFunction) { return () -> asyncTableFunction; }
3.26
flink_HsFullSpillingStrategy_checkRelease_rdh
/** * Release subpartition's spilled buffer from head. Each subpartition fairly retains a fixed * number of buffers, and all the remaining buffers are released. If this subpartition does not * have so many qualified buffers, all of them will be retained. */ private void checkRelease(HsSpillingInfoProvider spillingI...
3.26
flink_HsFullSpillingStrategy_onBufferFinished_rdh
// For the case of buffer finished, whenever the number of unSpillBuffers reaches // numBuffersTriggerSpillingRatio times currentPoolSize, make a decision based on global // information. Otherwise, no need to take action. @Override public Optional<Decision> onBufferFinished(int numTotalUnSpillBuffers, int currentPoolSi...
3.26
flink_HsFullSpillingStrategy_m0_rdh
// For the case of buffer consumed, there is no need to take action for HsFullSpillingStrategy. @Override public Optional<Decision> m0(BufferIndexAndChannel consumedBuffer) { return Optional.of(Decision.NO_ACTION); }
3.26
flink_ZooKeeperJobGraphStoreWatcher_fromEvent_rdh
/** * Returns a JobID for the event's path. */ private JobID fromEvent(PathChildrenCacheEvent event) {return JobID.fromHexString(ZKPaths.getNodeFromPath(event.getData().getPath())); }
3.26
flink_TransitiveClosureNaive_join_rdh
/** * left: Path (z,x) - x is reachable by z right: Edge (x,y) - * edge x-->y exists out: Path (z,y) - y is reachable by z */ @Override public Tuple2<Long, Long> join(Tuple2<Long, Long> left, Tuple2<Long, Long> right) throws Exception { return new Tuple2<Long, Long>(left.f0, right.f1); }
3.26
flink_ExecutorUtils_gracefulShutdown_rdh
/** * Gracefully shutdown the given {@link ExecutorService}. The call waits the given timeout that * all ExecutorServices terminate. If the ExecutorServices do not terminate in this time, they * will be shut down hard. * * @param timeout * to wait for the termination of all ExecutorServices * @param unit * ...
3.26
flink_ExecutorUtils_m0_rdh
/** * Shuts the given {@link ExecutorService} down in a non-blocking fashion. The shut down will be * executed by a thread from the common fork-join pool. * * <p>The executor services will be shut down gracefully for the given timeout period. * Afterwards {@link ExecutorService#shutdownNow()} will be called. * *...
3.26
flink_TestLoggerResource_asSingleTestResource_rdh
/** * Enables the use of {@link TestLoggerResource} for try-with-resources statement. */ public static SingleTestResource asSingleTestResource(String loggerName, Level level) throws Throwable { return new SingleTestResource(loggerName, level); }
3.26
flink_ExecutionVertex_notifyPendingDeployment_rdh
// -------------------------------------------------------------------------------------------- // Miscellaneous // -------------------------------------------------------------------------------------------- void notifyPendingDeployment(Execution execution) { // only forward this notification if the execution is s...
3.26
flink_ExecutionVertex_executionFinished_rdh
// -------------------------------------------------------------------------------------------- // Notifications from the Execution Attempt // -------------------------------------------------------------------------------------------- void executionFinished(Execution execution) { getJobVertex().executionVertexFini...
3.26
flink_ExecutionVertex_finishPartitionsIfNeeded_rdh
/** * Mark partition finished if needed. * * @return list of finished partitions. */ @VisibleForTestingpublic List<IntermediateResultPartition> finishPartitionsIfNeeded() { List<IntermediateResultPartition> finishedPartitions = null;MarkPartitionFinishedStrategy markPartitionFinishedStrategy = getExecutionGrap...
3.26
flink_ExecutionVertex_toString_rdh
// -------------------------------------------------------------------------------------------- // Utilities // -------------------------------------------------------------------------------------------- @Override public String toString() { return getTaskNameWithSubtaskIndex(); }
3.26
flink_ExecutionVertex_cancel_rdh
/** * Cancels this ExecutionVertex. * * @return A future that completes once the execution has reached its final state. */ public CompletableFuture<?> cancel() { // to avoid any case of mixup in the presence of concurrent calls, // we copy a reference to the stack to make sure both calls go to the same Exec...
3.26
flink_ExecutionVertex_createNewExecution_rdh
// -------------------------------------------------------------------------------------------- Execution createNewExecution(final long timestamp) { return new Execution(getExecutionGraphAccessor().getFutureExecutor(), this, nextAttemptNumber++, timestamp, timeout); }
3.26
flink_ExecutionVertex_addConsumedPartitionGroup_rdh
// -------------------------------------------------------------------------------------------- // Graph building // -------------------------------------------------------------------------------------------- public void addConsumedPartitionGroup(ConsumedPartitionGroup consumedPartitions) { getExecutionGraphAccess...
3.26
flink_ExecutionVertex_notifyStateTransition_rdh
/** * Simply forward this notification. */ void notifyStateTransition(Execution execution, ExecutionState previousState, ExecutionState newState) { // only forward this notification if the execution is still the current execution // otherwise we have an outdated execution if (isCurrentExecution(execution)...
3.26
flink_ExecutionVertex_resetForNewExecution_rdh
// -------------------------------------------------------------------------------------------- // Actions // -------------------------------------------------------------------------------------------- /** * Archives the current Execution and creates a new Execution for this vertex. */ public void resetForNewExecuti...
3.26
flink_ExecutionVertex_markFailed_rdh
/** * This method marks the task as failed, but will make no attempt to remove task execution from * the task manager. It is intended for cases where the task is known not to be deployed yet. * * @param t * The exception that caused the task to fail. */ public void markFailed(Throwable t) { currentExecu...
3.26
flink_ExecutionVertex_getTaskNameWithSubtaskIndex_rdh
/** * Creates a simple name representation in the style 'taskname (x/y)', where 'taskname' is the * name as returned by {@link #getTaskName()}, 'x' is the parallel subtask index as returned by * {@link #getParallelSubtaskIndex()}{@code + 1}, and 'y' is the total number of tasks, as * returned b...
3.26
flink_SinkContextUtil_forTimestamp_rdh
/** * Creates a {@link SinkFunction.Context} that throws an exception when trying to access the * current watermark or processing time. */public static Context forTimestamp(long timestamp) { return new SinkFunction.Context() { @Override public long currentProcessingTime() { throw new ...
3.26
flink_PlannerFactoryUtil_createPlanner_rdh
/** * Discovers a planner factory and creates a planner instance. */ public static Planner createPlanner(Executor executor, TableConfig tableConfig, ClassLoader userClassLoader, ModuleManager moduleManager, CatalogManager catalogManager, FunctionCatalog functionCatalog) { final PlannerFactory plannerFactory = Fac...
3.26
flink_CachingAsyncLookupFunction_updateLatestLoadTime_rdh
// --------------------------------- Helper functions ---------------------------- private synchronized void updateLatestLoadTime(long loadTime) { if (latestLoadTime == UNINITIALIZED) { cacheMetricGroup.latestLoadTimeGauge(() -> latestLoadTime); } latestLoadTime = loadTime; }
3.26
flink_ManagedTableListener_isManagedTable_rdh
/** * Check a resolved catalog table is Flink's managed table or not. */ public static boolean isManagedTable(@Nullable Catalog catalog, CatalogBaseTable table) { if ((catalog == null) || (!catalog.supportsManagedTable())) { // catalog not support managed table return false; }if ((table.getTa...
3.26
flink_ManagedTableListener_notifyTableDrop_rdh
/** * Notify for dropping managed table. */ public void notifyTableDrop(@Nullable Catalog catalog, ObjectIdentifier identifier, ResolvedCatalogBaseTable<?> table, boolean isTemporary, boolean ignoreIfNotExists) {if (isManagedTable(catalog, table)) { discoverManagedTableFactory(classLoader).onDropTable(creat...
3.26
flink_ManagedTableListener_notifyTableCompaction_rdh
/** * Notify compaction for managed table. */ public Map<String, String> notifyTableCompaction(@Nullable Catalog catalog, ObjectIdentifier identifier, ResolvedCatalogBaseTable<?> table, CatalogPartitionSpec partitionSpec, boolean isTemporary) { if (isManagedTable(catalog, table)) { if (RuntimeExecutionMo...
3.26
flink_ManagedTableListener_notifyTableCreation_rdh
/** * Notify for creating managed table. */ public ResolvedCatalogBaseTable<?> notifyTableCreation(@Nullable Catalog catalog, ObjectIdentifier identifier, ResolvedCatalogBaseTable<?> table, boolean isTemporary, boolean ignoreIfExists) { if (isManagedTable(catalog, table)) { ResolvedCatalogTable managedTab...
3.26
flink_ManagedTableListener_m0_rdh
/** * Enrich options for creating managed table. */ private ResolvedCatalogTable m0(ObjectIdentifier identifier, ResolvedCatalogBaseTable<?> table, boolean isTemporary) { if (!(table instanceof ResolvedCatalogTable)) { throw new UnsupportedOperationException("Managed table only supports catalog table,...
3.26
flink_AliasOperationUtils_createAliasList_rdh
/** * Creates a list of valid alias expressions. Resulting expression might still contain {@link UnresolvedReferenceExpression}. * * @param aliases * aliases to validate * @param child * relational operation on top of which to apply the aliases * @return validated list of aliases */ static List<Expression> ...
3.26
flink_Created_startScheduling_rdh
/** * Starts the scheduling by going into the {@link WaitingForResources} state. */ void startScheduling() { context.goToWaitingForResources(null); }
3.26
flink_PekkoRpcServiceUtils_extractMaximumFramesize_rdh
// ------------------------------------------------------------------------ // RPC service configuration // ------------------------------------------------------------------------ public static long extractMaximumFramesize(Configuration configuration) { String maxFrameSizeStr = configuration.getString(AkkaOptions...
3.26
flink_PekkoRpcServiceUtils_createRemoteRpcService_rdh
// ------------------------------------------------------------------------ // RPC instantiation // ------------------------------------------------------------------------ static PekkoRpcService createRemoteRpcService(Configuration configuration, @Nullable String externalAddress, String externalPortRange, @Nullable St...
3.26
flink_PekkoRpcServiceUtils_getRpcUrl_rdh
/** * * @param hostname * The hostname or address where the target RPC service is listening. * @param port * The port where the target RPC service is listening. * @param endpointName * The name of the RPC endpoint. * @param addressResolution * Whether to try address resolution of the given hostname or ...
3.26
flink_NFACompiler_createLoopingGroupPatternState_rdh
/** * Create the states for the group pattern as a looping one. * * @param groupPattern * the group pattern to create the states for * @param sinkState * the state that the group pattern being converted should point to * @return the first state of the states of the group pattern */ private State<T> createLo...
3.26
flink_NFACompiler_createSingletonState_rdh
/** * Creates a simple single state. For an OPTIONAL state it also consists of a similar state * without the PROCEED edge, so that for each PROCEED transition branches in computation * state graph can be created only once. * * @param ignoreCondition * condition that should be applied to IGNORE transition * @pa...
3.26
flink_NFACompiler_compileFactory_rdh
/** * Compiles the given pattern into a {@link NFAFactory}. The NFA factory can be used to * create multiple NFAs. */ void compileFactory() { Pattern<T, ?> lastPattern = f0; checkPatternNameUniqueness(); checkPatternSkipStrategy(); // we're traversing the pattern from the end to the b...
3.26
flink_NFACompiler_m1_rdh
/** * Creates a "complex" state consisting of given number of states with same {@link IterativeCondition}. * * @param sinkState * the state that the created state should point to * @param proceedState * state that the state being converted should proceed to * @param times * number of times the state shoul...
3.26
flink_NFACompiler_createLooping_rdh
/** * Creates the given state as a looping one. Looping state is one with TAKE edge to itself * and PROCEED edge to the sinkState. It also consists of a similar state without the * PROCEED edge, so that for each PROCEED transition branches in computation state graph can * be created only once. * * @param sinkStat...
3.26
flink_NFACompiler_m0_rdh
/** * Check pattern window times between events. */ private void m0() { windowTime.ifPresent(windowTime -> { if (windowTimes.values().stream().anyMatch(time -> time > windowTime)) { throw new MalformedPatternException("The window length between the previous and current event cannot be ...
3.26
flink_NFACompiler_createEndingState_rdh
/** * Creates the dummy Final {@link State} of the NFA graph. * * @return dummy Final state */ private State<T> createEndingState() { State<T> endState = createState(ENDING_STATE_NAME, StateType.Final); windowTime = Optional.ofNullable(f0.getWindowTime()).map(Time::toMilliseconds); ...
3.26
flink_NFACompiler_checkPatternNameUniqueness_rdh
/** * Check if the given pattern's name is already used or not. If yes, it throws a {@link MalformedPatternException}. * * @param pattern * The pattern to be checked */ private void checkPatternNameUniqueness(final Pattern pattern) { if (pattern...
3.26
flink_NFACompiler_createGroupPatternState_rdh
/** * Create all the states for the group pattern. * * @param groupPattern * the group pattern to create the states for * @param sinkState * the state that the group pattern being converted should point to * @param proceedState * the state that the group pattern being converted should proceed to * @param...
3.26
flink_NFACompiler_isCurrentGroupPatternFirstOfLoop_rdh
/** * Checks if the current group pattern is the head of the TIMES/LOOPING quantifier or not a * TIMES/LOOPING quantifier pattern. */ private boolean isCurrentGroupPatternFirstOfLoop() { if (firstOfLoopMap.containsKey(currentGroupPattern)) { return firstOfLoopMap.get(currentGroupPattern); } else { return true; } } ...
3.26
flink_NFACompiler_copyWithoutTransitiveNots_rdh
/** * This method creates an alternative state that is target for TAKE transition from an * optional State. Accepting an event in optional State discards all not Patterns that were * present before it. * * <p>E.g for a Pattern * begin("a").notFollowedBy("b").followedByAny("c").optional().followedByAny("d") a sequ...
3.26
flink_NFACompiler_getCurrentNotCondition_rdh
/** * Retrieves list of conditions resulting in Stop state and names of the corresponding NOT * patterns. * * <p>A current not condition can be produced in two cases: * * <ol> * <li>the previous pattern is a {@link Quantifier.ConsumingStrategy#NOT_FOLLOW} * <li>exists a ...
3.26
flink_NFACompiler_setCurrentGroupPatternFirstOfLoop_rdh
/** * Marks the current group pattern as the head of the TIMES quantifier or not. * * @param isFirstOfLoop * whether the current group pattern is the head of the TIMES * quantifier */ @SuppressWarnings("unchecked") private void setCurrentGroupPatternFirstOfLoop(boolean isFirstOfLoop) { if (f0 instanceof Grou...
3.26
flink_NFACompiler_checkPatternSkipStrategy_rdh
/** * Check pattern after match skip strategy. */ private void checkPatternSkipStrategy() { if (afterMatchSkipStrategy.getPatternName().isPresent()) { String patternName = afterMatchSkipStrategy.getPatternName().get(); Pattern<T, ?> pattern = f0; while ((pattern.getPrevious() != null) &...
3.26
flink_NFACompiler_canProduceEmptyMatches_rdh
/** * Verifies if the provided pattern can possibly generate empty match. Example of patterns that * can possibly generate empty matches are: A*, A?, A* B? etc. * * @param pattern * pattern to check * @return true if empty match could potentially match the pattern, false otherwise ...
3.26
flink_NFACompiler_isPatternOptional_rdh
/** * Checks if the given pattern is optional. If the given pattern is the head of a group * pattern, the optional status depends on the group pattern. */ private boolean isPatternOptional(Pattern<T, ?> pattern) { return pattern.getQuantifier().hasProperty(QuantifierProperty.OPTIONAL); }
3.26
flink_NFACompiler_createState_rdh
/** * Creates a state with {@link State.StateType#Normal} and adds it to the collection of * created states. Should be used instead of instantiating with new operator. * * @param name * the name of the state * @param stateType * the type of the state * @return the created state */ private State<T> createSt...
3.26
flink_NFACompiler_getTrueFunction_rdh
/** * * @return An true function extended with stop(until) condition if necessary. */ @SuppressWarnings("unchecked") private IterativeCondition<T> getTrueFunction() { IterativeCondition<T> trueCondition = BooleanConditions.trueFunction(); if ((currentGroupPattern != null) && (currentGroupPattern.getUntilCondition() ...
3.26
flink_NFACompiler_createMiddleStates_rdh
/** * Creates all the states between Start and Final state. * * @param sinkState * the state that last state should point to (always the Final state) * @return the next state after Start in the resulting graph */ private State<T> createMiddleStates(final State<T> sinkState) { State<T> lastSink = sinkState; ...
3.26
flink_AdaptiveScheduler_hasDesiredResources_rdh
// ---------------------------------------------------------------- @Override public boolean hasDesiredResources() { final Collection<? extends SlotInfo> freeSlots = declarativeSlotPool.getFreeSlotInfoTracker().getFreeSlotsInformation(); return hasDesiredResources(desiredResources, freeSlots); }
3.26
flink_AdaptiveScheduler_computeVertexParallelismStoreForExecution_rdh
/** * Creates the parallelism store that should be used to build the {@link ExecutionGraph}, which * will respect the vertex parallelism of the passed {@link JobGraph} in all execution modes. * * @param jobGraph * The job graph for execution. * @param executionMode * The mode of scheduler execution. * @para...
3.26
flink_AdaptiveScheduler_computeReactiveModeVertexParallelismStore_rdh
/** * Creates the parallelism store for a set of vertices, optionally with a flag to leave the * vertex parallelism unchanged. If the flag is set, the parallelisms must be valid for * execution. * * <p>We need to set parallelism to the max possible value when requesting resources, but when * executing the graph w...
3.26
flink_AdaptiveScheduler_computeVertexParallelismStore_rdh
/** * Creates the parallelism store that should be used for determining scheduling requirements, * which may choose different parallelisms than set in the {@link JobGraph} depending on the * execution mode. * * @param jobGraph * The job graph for execution. * @param executionMode * The mode of scheduler exe...
3.26
flink_AdaptiveScheduler_transitionToState_rdh
// ---------------------------------------------------------------- /** * Transition the scheduler to another state. This method guards against state transitions while * there is already a transition ongoing. This effectively means that you can not call this * method from a State constructor or State#onLeave. * * ...
3.26
flink_AdaptiveScheduler_shouldRescale_rdh
/** * In regular mode, rescale the job if added resource meets {@link JobManagerOptions#MIN_PARALLELISM_INCREASE}. In force mode rescale if the parallelism has * changed. */ @Override public boolean shouldRescale(ExecutionGraph executionGraph, boolean forceRescale) { final Optional<VertexParallelism> maybeNewPar...
3.26
flink_AdaptiveScheduler_checkIdleSlotTimeout_rdh
/** * Check for slots that are idle for more than {@link JobManagerOptions#SLOT_IDLE_TIMEOUT} and * release them back to the ResourceManager. */ private void checkIdleSlotTimeout() { if (getState().getJobStatus().isGloballyTerminalState()) { // Job has reached the terminal state, so we can return all slo...
3.26
flink_PekkoInvocationHandler_ask_rdh
/** * Sends the message to the RPC endpoint and returns a future containing its response. * * @param message * to send to the RPC endpoint * @param timeout * time to wait until the response future is failed with a {@link TimeoutException} * @return Response future */ protected CompletableFuture<?> ask(Objec...
3.26
flink_PekkoInvocationHandler_createRpcInvocationMessage_rdh
/** * Create the RpcInvocation message for the given RPC. * * @param declaringClassName * of the RPC * @param methodName * of the RPC * @param isLocalRpcInvocation * whether the RPC must be sent as a local message * @param parameterTypes * of the RPC * @param args * of the RPC * @return RpcInvoca...
3.26
flink_PekkoInvocationHandler_tell_rdh
// ------------------------------------------------------------------------ // Helper methods // ------------------------------------------------------------------------ /** * Sends the message to the RPC endpoint. * * @param message * to send to the RPC endpoint. */ protected void tell(Object message) { rpc...
3.26
flink_RpcSystem_load_rdh
/** * Loads the RpcSystem. * * @param config * Flink configuration * @return loaded RpcSystem */ static RpcSystem load(Configuration config) { final PriorityQueue<RpcSystemLoader> rpcSystemLoaders = new PriorityQueue<>(Comparator.comparingInt(RpcSystemLoader::getLoadPriority)); ServiceLoader.load(RpcSys...
3.26
flink_RpcSystem_close_rdh
/** * Hook to cleanup resources, like common thread pools or classloaders. */ @Override default void close() { }
3.26
flink_TumblingEventTimeWindows_of_rdh
/** * Creates a new {@code TumblingEventTimeWindows} {@link WindowAssigner} that assigns elements * to time windows based on the element timestamp, offset and a staggering offset, depending on * the staggering policy. * * @param size * The size of the generated windows. * @param offset * The globalOffset wh...
3.26
flink_OnMainThreadJobManagerRunnerRegistry_getWrappedDelegate_rdh
/** * Returns the delegated {@link JobManagerRunnerRegistry}. This method can be used to workaround * the main thread safeguard. */ @Overridepublic JobManagerRunnerRegistry getWrappedDelegate() { return this.delegate; }
3.26
flink_MetricFetcherImpl_queryMetrics_rdh
/** * Query the metrics from the given QueryServiceGateway. * * @param queryServiceGateway * to query for metrics */ private CompletableFuture<Void> queryMetrics(final MetricQueryServiceGateway queryServiceGateway) { ...
3.26
flink_MetricFetcherImpl_update_rdh
/** * This method can be used to signal this MetricFetcher that the metrics are still in use and * should be updated. */ @Override public void update() { synchronized(this) { long currentTime = System.currentTimeMillis(); // Before all querying metric tasks are completed, new metric updating task...
3.26
flink_MetricFetcherImpl_retrieveAndQueryMetrics_rdh
/** * Retrieves and queries the specified QueryServiceGateway. * * @param queryServiceAddress * specifying the QueryServiceGateway */private CompletableFuture<Void> retrieveAndQueryMetrics(String queryServiceAddress) { LOG.debug("Retrieve metric query service gateway for {}", queryServiceAddress); final ...
3.26
flink_MetricFetcherImpl_m0_rdh
/** * Returns the MetricStore containing all stored metrics. * * @return MetricStore containing all stored metrics; */@Override public MetricStore m0() { return metrics; }
3.26
flink_ScalaCsvOutputFormat_m0_rdh
// -------------------------------------------------------------------------------------------- @Override public String m0() { return ((("CsvOutputFormat (path: " + this.getOutputFilePath()) + ", delimiter: ") + this.fieldDelimiter) + ")"; }
3.26
flink_ScalaCsvOutputFormat_open_rdh
// -------------------------------------------------------------------------------------------- @Override public void open(int taskNumber, int numTasks) throws IOException { super.open(taskNumber, numTasks);this.wrt = (this.charsetName == null) ? new OutputStreamWriter(new BufferedO...
3.26
flink_ScalaCsvOutputFormat_setQuoteStrings_rdh
/** * Configures whether the output format should quote string values. String values are fields of * type {@link String} and {@link org.apache.flink.types.StringValue}, as well as all subclasses * of the latter. * * <p>By default, strings are not quoted. * * @param quoteStrings * Flag indicating whether strin...
3.26
flink_ScalaCsvOutputFormat_setAllowNullValues_rdh
/** * Configures the format to either allow null values (writing an empty field), or to throw an * exception when encountering a null field. * * <p>By default, null values are allowed. * * @param allowNulls * Flag to indicate whether the output format should accept null values. */ public void setAllowNullValu...
3.26
flink_ScalaCsvOutputFormat_setInputType_rdh
/** * The purpose of this method is solely to check whether the data type to be processed is in * fact a tuple type. */ @Override public void setInputType(TypeInformation<?> type, ExecutionConfig executionConfig) { if (!type.isTupleType()) { throw new InvalidProgramException(("The " + ScalaCsvOut...
3.26
flink_ScalaCsvOutputFormat_setCharsetName_rdh
/** * Sets the charset with which the CSV strings are written to the file. If not specified, the * output format uses the systems default character encoding. * * @param charsetName * The name of charset to use for encoding the output. */ public void setCharsetName(String charsetName) { this.charsetName = ...
3.26
flink_CoGroupWithSolutionSetFirstDriver_initialize_rdh
// -------------------------------------------------------------------------------------------- @Override @SuppressWarnings("unchecked") public void initialize() { final TypeComparator<IT1> solutionSetComparator; // grab a handle to the hash table from the iteration broker if...
3.26
flink_CoGroupWithSolutionSetFirstDriver_setup_rdh
// -------------------------------------------------------------------------------------------- @Override public void setup(TaskContext<CoGroupFunction<IT1, IT2, OT>, OT> context) { this.taskContext = context; this.running = true; }
3.26
flink_TableFunctionResultFuture_setInput_rdh
/** * Sets the input row from left table, which will be used to cross join with the result of right * table. */ public void setInput(Object input) { this.input = input; }
3.26
flink_TableFunctionResultFuture_getResultFuture_rdh
/** * Gets the internal collector which used to emit the final row. */ public ResultFuture<?> getResultFuture() { return this.resultFuture; }
3.26
flink_TableFunctionResultFuture_setResultFuture_rdh
/** * Sets the current collector, which used to emit the final row. */ public void setResultFuture(ResultFuture<?> resultFuture) { this.resultFuture = resultFuture; }
3.26
flink_SqlConstraintValidator_validateAndChangeColumnNullability_rdh
/** * Check constraints and change the nullability of primary key columns. * * @throws SqlValidateException * if encountered duplicate primary key constraints, or the * constraint is enforced or unique. */ public static void validateAndChangeColumnNullability(List<SqlTableConstraint> tableConstraints, SqlNode...
3.26
flink_SqlConstraintValidator_validate_rdh
/** * Check table constraint. */ private static void validate(SqlTableConstraint constraint) throws SqlValidateException { if (constraint.isUnique()) { throw new SqlValidateException(constraint.getParserPosition(), "UNIQUE constraint is not supported yet"); } if (constraint.isEnforced()) { ...
3.26
flink_SqlConstraintValidator_getFullConstraints_rdh
/** * Returns the column constraints plus the table constraints. */ public static List<SqlTableConstraint> getFullConstraints(List<SqlTableConstraint> tableConstraints, SqlNodeList columnList) { List<SqlTableConstraint> ret = new ArrayList<>(); columnList.forEach(column -> { SqlTableColumn tableColum...
3.26
flink_UnionOperator_translateToDataFlow_rdh
/** * Returns the BinaryNodeTranslation of the Union. * * @param input1 * The first input of the union, as a common API operator. * @param input2 * The second input of the union, as a common API operator. * @return The common API union operator. */@Override protected Union<T> translateToDataFlow(Operator<T>...
3.26
flink_ResourceManagerUtils_parseRestBindPortFromWebInterfaceUrl_rdh
/** * Parse the port from the webInterfaceUrl. * * @param webInterfaceUrl * The web interface url to be parsed * @return the parsed rest port or -1 if failed */ public static Integer parseRestBindPortFromWebInterfaceUrl(String webInterfaceUrl) { if (webInterfaceUrl != null) { final int lastColon = ...
3.26
flink_TypeComparator_compareAgainstReference_rdh
// -------------------------------------------------------------------------------------------- @SuppressWarnings("rawtypes") public int compareAgainstReference(Comparable[] keys) { throw new UnsupportedOperationException("Workaround hack."); }
3.26
flink_CliClient_executeInInteractiveMode_rdh
/** * Opens the interactive CLI shell. */ public void executeInInteractiveMode() { executeInInteractiveMode(null); }
3.26
flink_CliClient_executeInNonInteractiveMode_rdh
/** * Opens the non-interactive CLI shell. */ public void executeInNonInteractiveMode(String content) { try { terminal = terminalFactory.get(); executeFile(content, terminal.output(), ExecutionMode.NON_INTERACTIVE_EXECUTION); } finally { closeTerminal(); } }
3.26