name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_Transition_eventType_rdh
// ------------------------------------------------------------------------ public EventType eventType() { return eventType; }
3.26
flink_AbstractMapTypeInfo_getValueTypeInfo_rdh
/** * Returns the type information for the values in the map. * * @return The type information for the values in the map. */ public TypeInformation<V> getValueTypeInfo() {return valueTypeInfo; }
3.26
flink_AbstractMapTypeInfo_equals_rdh
// ------------------------------------------------------------------------ @Override public boolean equals(Object o) { if (this == o) { return true; } if ((o == null) || (getClass() != o.getClass())) { return false; } AbstractMapTypeInfo<?, ?, ?> that = ((AbstractMapTypeInfo<...
3.26
flink_AbstractMapTypeInfo_isBasicType_rdh
// ------------------------------------------------------------------------ @Override public boolean isBasicType() { return false; }
3.26
flink_AbstractMapTypeInfo_getKeyTypeInfo_rdh
// ------------------------------------------------------------------------ /** * Returns the type information for the keys in the map. * * @return The type information for the keys in the map. */public TypeInformation<K> getKeyTypeInfo() { return keyTypeInfo; }
3.26
flink_DeclineCheckpoint_getSerializedCheckpointException_rdh
// -------------------------------------------------------------------------------------------- /** * Gets the reason why the checkpoint was declined. * * @return The reason why the checkpoint was declined */ @Nonnull public SerializedCheckpointException getSerializedCheckpointException() { return serializedCh...
3.26
flink_DeclineCheckpoint_toString_rdh
// -------------------------------------------------------------------------------------------- @Override public String toString() { return String.format("Declined Checkpoint %d for (%s/%s): %s", getCheckpointId(), getJob(), getTaskExecutionId(), serializedCheckpointException.getCheckpointFailureReason()); }
3.26
flink_FunctionAnnotation_readDualForwardAnnotations_rdh
// -------------------------------------------------------------------------------------------- /** * Reads the annotations of a user defined function with two inputs and returns semantic * properties according to the forwarded fields annotated. * * @param udfClass * The user defined function, represented by its...
3.26
flink_FunctionAnnotation_readSingleForwardAnnotations_rdh
// -------------------------------------------------------------------------------------------- // Function Annotation Handling // -------------------------------------------------------------------------------------------- /** * Reads the annotations of a user defined function with one input and returns semantic * p...
3.26
flink_PatternStreamBuilder_build_rdh
/** * Creates a data stream containing results of {@link PatternProcessFunction} to fully matching * event patterns. * * @param processFunction * function to be applied to matching event sequences * @param outTypeInfo * output TypeInformation of {@link PatternProcessFunction#processMatch(Map, * PatternPro...
3.26
flink_PatternStreamBuilder_forStreamAndPattern_rdh
// ---------------------------------------- factory-like methods // ---------------------------------------- // static <IN> PatternStreamBuilder<IN> forStreamAndPattern(final DataStream<IN> inputStream, final Pattern<IN, ?> pattern) { return new PatternStreamBuilder<>(inputStream, pattern, TimeBehaviour.EventTime, ...
3.26
flink_Acknowledge_get_rdh
/** * Gets the singleton instance. * * @return The singleton instance. */ public static Acknowledge get() { return INSTANCE; }
3.26
flink_Acknowledge_readResolve_rdh
/** * Read resolve to preserve the singleton object property. (per best practices, this should have * visibility 'protected') */ protected Object readResolve() throws ObjectStreamException { return INSTANCE; }
3.26
flink_AbstractBinaryWriter_write_rdh
/** * Writes the specified byte to this output stream. The general contract for <code>write * </code> is that one byte is written to the output stream. The byte to be written is the * eight low-order bits of the argument <code>b</code>. The 24 high-order bits of <code>b * </code> are ignored. */ @Override public v...
3.26
flink_AbstractBinaryWriter_writeString_rdh
/** * See {@link BinarySegmentUtils#readStringData(MemorySegment[], int, int, long)}. */ @Override public void writeString(int pos, StringData input) { BinaryStringData string = ((BinaryStringData) (input)); if (string.getSegments() == null) { String javaObject = string.toString(); writeBytes...
3.26
flink_ResourceManagerPartitionTrackerImpl_setHostedDataSetsAndCheckCorruption_rdh
/** * Updates the data sets for which the given task executor is hosting partitions and returns * data sets that were corrupted due to a loss of partitions. * * @param taskExecutorId * ID of the hosting TaskExecutor * @param reportEntries * IDs of data sets for which partitions are hosted * @return corrupte...
3.26
flink_ResourceManagerPartitionTrackerImpl_areAllMapsEmpty_rdh
/** * Returns whether all maps are empty; used for checking for resource leaks in case entries * aren't properly removed. * * @return whether all contained maps are empty */ @VisibleForTesting boolean areAllMapsEmpty() { return ((taskExecutorToDataSets.isEmpty() && dataSetToTaskExecutors.isEmpty()) && dataSetM...
3.26
flink_MailboxMetricsController_startLatencyMeasurement_rdh
/** * Starts mailbox latency measurement. This requires setup of latency measurement via {@link MailboxMetricsController#setupLatencyMeasurement(TimerService, MailboxExecutor)}. Latency is * measured through execution of a mail that is triggered by default in the interval defined by * {@link MailboxMetricsController...
3.26
flink_MailboxMetricsController_isLatencyMeasurementStarted_rdh
/** * Indicates if latency mesurement has been started. * * @return True if latency measurement has been started. */ public boolean isLatencyMeasurementStarted() { return f0; }
3.26
flink_MailboxMetricsController_isLatencyMeasurementSetup_rdh
/** * Indicates if latency measurement has been setup. * * @return True if latency measurement has been setup. */ public boolean isLatencyMeasurementSetup() { return (this.timerService != null) && (this.mailboxExecutor != null); } /** * Gets {@link Counter} for number of mails processed. * * @return {@link ...
3.26
flink_MailboxMetricsController_setupLatencyMeasurement_rdh
/** * Sets up latency measurement with required {@link TimerService} and {@link MailboxExecutor}. * * <p>Note: For each instance, latency measurement can be set up only once. * * @param timerService * {@link TimerService} used for latency measurement. * @param mailboxExecutor * {@link MailboxExecutor} used ...
3.26
flink_ConfluentRegistryAvroSerializationSchema_forSpecific_rdh
/** * Creates {@link AvroSerializationSchema} that produces byte arrays that were generated from * Avro schema and writes the writer schema to Confluent Schema Registry. * * @param tClass * the type to be serialized * @param subject * subject of schema registry to produce * @param schemaRegistryUrl * URL...
3.26
flink_ConfluentRegistryAvroSerializationSchema_forGeneric_rdh
/** * Creates {@link AvroSerializationSchema} that produces byte arrays that were generated from * Avro schema and writes the writer schema to Confluent Schema Registry. * * @param subject * subject of schema registry to produce * @param schema * schema that will be used for serialization * @param schemaReg...
3.26
flink_YarnLocalResourceDescriptor_toLocalResource_rdh
/** * Transforms this local resource descriptor to a {@link LocalResource}. * * @return YARN resource */ public LocalResource toLocalResource() { return Utils.registerLocalResource(path, size, modificationTime, visibility, resourceType); }
3.26
flink_FunctionUtils_nullFn_rdh
/** * Function which returns {@code null} (type: Void). * * @param <T> * input type * @return Function which returns {@code null}. */@SuppressWarnings("unchecked") public static <T> Function<T, Void> nullFn() { return ((Function<T, Void>) (f0)); }
3.26
flink_FunctionUtils_asCallable_rdh
/** * Converts {@link RunnableWithException} into a {@link Callable} that will return the {@code result}. */ public static <T> Callable<T> asCallable(RunnableWithException command, T result) { return () -> { command.run(); return result; }; }
3.26
flink_FunctionUtils_ignoreFn_rdh
/** * Consumer which ignores the input. * * @param <T> * type of the input * @return Ignoring {@link Consumer} */ @SuppressWarnings("unchecked") public static <T> Consumer<T> ignoreFn() { return ((Consumer<T>) (IGNORE_FN)); }
3.26
flink_FunctionUtils_uncheckedConsumer_rdh
/** * Converts a {@link ThrowingConsumer} into a {@link Consumer} which throws checked exceptions * as unchecked. * * @param throwingConsumer * to convert into a {@link Consumer} * @param <A> * input type * @return {@link Consumer} which throws all checked exceptions as unchecked */ public static <A> Cons...
3.26
flink_FunctionUtils_uncheckedFunction_rdh
/** * Convert at {@link FunctionWithException} into a {@link Function}. * * @param functionWithException * function with exception to convert into a function * @param <A> * input type * @param <B> * output type * @return {@link Function} which throws all checked exception as an unchecked exception. */ p...
3.26
flink_SortedGrouping_first_rdh
/** * Returns a new set containing the first n elements in this grouped and sorted {@link DataSet}. * * @param n * The desired number of elements for each group. * @return A GroupReduceOperator that represents the DataSet containing the elements. */ public GroupReduceOperator<T, T> first(int n) { if (n < 1...
3.26
flink_SortedGrouping_withPartitioner_rdh
/** * Uses a custom partitioner for the grouping. * * @param partitioner * The custom partitioner. * @return The grouping object itself, to allow for method chaining. */ public SortedGrouping<T> withPartitioner(Partitioner<?> partitioner) { Preconditions.checkNotNull(partitioner); getKeys().validateCust...
3.26
flink_SortedGrouping_reduceGroup_rdh
/** * Applies a GroupReduce transformation on a grouped and sorted {@link DataSet}. * * <p>The transformation calls a {@link org.apache.flink.api.common.functions.RichGroupReduceFunction} for each group of the DataSet. * A GroupReduceFunction can iterate over all elements of a group and emit any number of output *...
3.26
flink_SortedGrouping_sortGroup_rdh
/** * Sorts {@link org.apache.flink.api.java.tuple.Tuple} or POJO elements within a group on the * specified field in the specified {@link Order}. * * <p><b>Note: Only groups of Tuple or Pojo elements can be sorted.</b> * * <p>Groups can be sorted by multiple fields by chaining {@link #sortGroup(String, Order)} ...
3.26
flink_SortedGrouping_getGroupSortKeyPositions_rdh
// -------------------------------------------------------------------------------------------- protected int[] getGroupSortKeyPositions() { return this.groupSortKeyPositions; }
3.26
flink_SortedGrouping_combineGroup_rdh
/** * Applies a GroupCombineFunction on a grouped {@link DataSet}. A CombineFunction is similar to * a GroupReduceFunction but does not perform a full data exchange. Instead, the CombineFunction * calls the combine method once per partition for combining a group of results. This operator * is suitable for combining...
3.26
flink_GSRecoverableWriterCommitter_writeFinalBlob_rdh
/** * Writes the final blob by composing the temporary blobs and copying, if necessary. */ private void writeFinalBlob() { // do we have any component blobs? List<GSBlobIdentifier> blobIdentifiers = recoverable.getComponentBlobIds(options); if (blobIdentifiers.isEmpty()) { ...
3.26
flink_GSRecoverableWriterCommitter_composeBlobs_rdh
/** * Helper to compose an arbitrary number of blobs into a final blob, staying under the * composeMaxBlobs limit for any individual compose operation. * * @param sourceBlobIdentifiers * The source blob ids to compose * @param targetBlobIdentifier * The target blob id for the composed result */private void ...
3.26
flink_GSRecoverableWriterCommitter_cleanupTemporaryBlobs_rdh
/** * Clean up after a successful commit operation, by deleting any temporary blobs associated with * the final blob. */ private void cleanupTemporaryBlobs() { LOGGER.trace("Cleaning up temporary blobs for recoverable with options {}: {}", options, recoverable); // determine the partial name for the temporary object...
3.26
flink_HashPartitionIterator_advanceAndRead_rdh
/* jump to the next partition and continue reading from that */ private BT advanceAndRead() throws IOException { if (!partitions.hasNext()) { return null; } currentPartition = partitions.next(); currentPartition.setReadPosition(0); try { return serializer.deserialize(currentPart...
3.26
flink_RocksDBStateUploader_uploadFilesToCheckpointFs_rdh
/** * Upload all the files to checkpoint fileSystem using specified number of threads. * * @param files * The files will be uploaded to checkpoint filesystem. * @param checkpointStreamFactory * The checkpoint streamFactory used to create outputstream. * @param stateScope * @throws Exception * Thrown if c...
3.26
flink_OutputEmitter_forward_rdh
// -------------------------------------------------------------------------------------------- private int forward() { return 0; }
3.26
flink_OutputEmitter_setup_rdh
// ------------------------------------------------------------------------ @Override public void setup(int numberOfChannels) { this.numberOfChannels = numberOfChannels; }
3.26
flink_DebeziumJsonFormatFactory_validateEncodingFormatOptions_rdh
/** * Validator for debezium encoding format. */ private static void validateEncodingFormatOptions(ReadableConfig tableOptions) { JsonFormatOptionsUtil.validateEncodingFormatOptions(tableOptions);// validator for {@link SCHEMA_INCLUDE} if (tableOptions.get(SCHEMA_INCLUDE)) { throw new ValidationException(String...
3.26
flink_PartitionWriterFactory_get_rdh
/** * Util for get a {@link PartitionWriterFactory}. */ static <T> PartitionWriterFactory<T> get(boolean dynamicPartition, boolean grouped, LinkedHashMap<String, String> staticPartitions) { if (dynamicPartition) { return grouped ? GroupedPartitionWriter::new : DynamicPartitionWriter::new; } else { ...
3.26
flink_ResourceManager_onNewTokensObtained_rdh
// ------------------------------------------------------------------------ // Resource Management // ------------------------------------------------------------------------ @Override public void onNewTokensObtained(byte[] tokens) throws Exception { latestTokens.set(tokens);log.info("Updating delegation tokens for...
3.26
flink_ResourceManager_m5_rdh
/** * Stops the given worker if supported. * * @param worker * The worker. */ public void m5(WorkerType worker) { if (resourceAllocator.isSupported()) { resourceAllocator.cleaningUpDisconnectedResource(worker.getResourceID()); } }
3.26
flink_ResourceManager_setFailUnfulfillableRequest_rdh
/** * Set {@link SlotManager} whether to fail unfulfillable slot requests. * * @param failUnfulfillableRequest * whether to fail unfulfillable requests */ protected void setFailUnfulfillableRequest(boolean failUnfulfillableRequest) { slotManager.setFailUnfulfillableRequest(failUnfulfillableRequest); }
3.26
flink_ResourceManager_closeTaskManagerConnection_rdh
/** * This method should be called by the framework once it detects that a currently registered * task executor has failed. * * @param resourceID * Id of the TaskManager that has failed. * @param cause * The exception which cause the TaskManager failed. * @return The {@link WorkerType} of the closed connect...
3.26
flink_ResourceManager_onStart_rdh
// ------------------------------------------------------------------------ // RPC lifecycle methods // ------------------------------------------------------------------------ @Override public final void onStart() throws Exception { try { log.info("Starting the resource manage...
3.26
flink_ResourceManager_registerTaskExecutorInternal_rdh
/** * Registers a new TaskExecutor. * * @param taskExecutorRegistration * task executor registration parameters * @return RegistrationResponse */ private RegistrationResponse registerTaskExecutorInternal(TaskExecutorGateway taskExecutorGateway, TaskExecutorRegistration taskExecutorRegistration) { ResourceID ta...
3.26
flink_ResourceManager_onFatalError_rdh
// ------------------------------------------------------------------------ // Error Handling // ------------------------------------------------------------------------ /** * Notifies the ResourceManager that a fatal error has occurred and it cannot proceed. * * @param t * The exception describing the fatal erro...
3.26
flink_ResourceManager_getNodeIdOfTaskManager_rdh
// ------------------------------------------------------------------------ // Internal methods // ------------------------------------------------------------------------ @VisibleForTesting String getNodeIdOfTaskManager(ResourceID taskManagerId) { checkState(taskExecutors.containsKey(taskManagerId)); return taskExecut...
3.26
flink_ResourceManager_closeJobManagerConnection_rdh
/** * This method should be called by the framework once it detects that a currently registered job * manager has failed. * * @param jobId * identifying the job whose leader shall be disconnected. * @param resourceRequirementHandling * indicating how existing resource requirements for the * corresponding ...
3.26
flink_ResourceManager_m3_rdh
/** * Registers a new JobMaster. * * @param jobMasterGateway * to communicate with the registering JobMaster * @param jobId * of the job for which the JobMaster is responsible * @param jobManagerAddress * address of the JobMaster * @param jobManagerResourceId * ResourceID of the JobMaster * @return R...
3.26
flink_ResourceManager_deregisterApplication_rdh
/** * Cleanup application and shut down cluster. * * @param finalStatus * of the Flink application * @param diagnostics * diagnostics message for the Flink application or {@code null} */ @Override public CompletableFuture<Acknowledge> deregisterApplication(final ApplicationStatus finalStatus, @Nullable final...
3.26
flink_ResourceManager_requestTaskExecutorThreadInfoGateway_rdh
// Bug; see FLINK-27954 @Override @Local public CompletableFuture<TaskExecutorThreadInfoGateway> requestTaskExecutorThreadInfoGateway(ResourceID taskManagerId, Time timeout) { final WorkerRegistration<WorkerType> taskExecutor = taskExecutors.get(taskManagerId); if (taskExecutor == null) { return FutureUtils.completedEx...
3.26
flink_ResourceManager_registerJobMaster_rdh
// ------------------------------------------------------------------------ // RPC methods // ------------------------------------------------------------------------ @Override public CompletableFuture<RegistrationResponse> registerJobMaster(final JobMasterId jobMasterId, final ResourceID jobManagerResourceId, final ...
3.26
flink_ExecutionPlanUtil_getExecutionPlanAsJSON_rdh
/** * Extracts the execution plan (as JSON) from the given {@link Plan}. */ public static String getExecutionPlanAsJSON(Plan plan) { checkNotNull(plan); ExecutionPlanJSONGenerator jsonGenerator = getJSONGenerator(); return jsonGenerator.getExecutionPlan(plan); }
3.26
flink_BufferSizeEMA_calculateBufferSize_rdh
/** * Calculating the buffer size over total possible buffers size and number of buffers in use. * * @param totalBufferSizeInBytes * Total buffers size. * @param totalBuffers * Total number of buffers in use. * @return Throughput calculated according to implemented algorithm. */ public int calculateBufferSi...
3.26
flink_HiveSetProcessor_startWithHiveSpecialVariablePrefix_rdh
/** * check whether the variable's name is started with the special variable prefix that Hive * reserves. */ public static boolean startWithHiveSpecialVariablePrefix(String varname) { String[] hiveSpecialVariablePrefix = new String[]{ ENV_PREFIX, SYSTEM_PREFIX, HIVECONF_PREFIX, HIVEVAR_PREFIX, METACONF_PREFI...
3.26
flink_HiveSetProcessor_setVariable_rdh
/** * Set variable following Hive's implementation. */ public static void setVariable(HiveConf hiveConf, Map<String, String> hiveVariables, String varname, String varvalue) { if (varname.startsWith(ENV_PREFIX)) { throw new UnsupportedOperationException("env:* variables can not be ...
3.26
flink_StandaloneLeaderRetrievalService_start_rdh
// ------------------------------------------------------------------------ @Override public void start(LeaderRetrievalListener listener) { checkNotNull(listener, "Listener must not be null."); synchronized(startStopLock) { checkState(!started, "StandaloneLeaderRetrievalService can only be started once...
3.26
flink_HiveTablePartition_ofTable_rdh
/** * Creates a HiveTablePartition to represent a hive table. * * @param hiveConf * the HiveConf used to connect to HMS * @param hiveVersion * the version of hive in use, if it's null the version will be automatically * detected * @param dbName * name of the database * @param tableName * name of th...
3.26
flink_HiveTablePartition_ofPartition_rdh
/** * Creates a HiveTablePartition to represent a hive partition. * * @param hiveConf * the HiveConf used to connect to HMS * @param hiveVersion * the version of hive in use, if it's null the version will be automatically * detected * @param dbName * name of the database * @param tableName * name o...
3.26
flink_SetOperationFactory_create_rdh
/** * Creates a valid algebraic operation. * * @param type * type of operation to create * @param left * first relational operation of the operation * @param right * second relational operation of the operation * @param all * flag defining how duplicates should be handled * @return creates a valid al...
3.26
flink_AlterSchemaConverter_convertAlterSchema_rdh
/** * Convert ALTER TABLE DROP WATERMARK to generate an updated {@link Schema}. */ public Operation convertAlterSchema(SqlAlterTableDropWatermark dropWatermark, ResolvedCatalogTable oldTable) { if (oldTable.getResolvedSchema().getWatermarkSpecs().isEmpty()) { throw new ValidationException(...
3.26
flink_AlterSchemaConverter_buildUpdatedColumn_rdh
// -------------------------------------------------------------------------------------------- private void buildUpdatedColumn(Schema.Builder builder, ResolvedCatalogTable oldTable, BiConsumer<Schema.Builder, Schema.UnresolvedColumn> columnConsumer) { // build column oldTable.getUnresolvedSchema().getColumns().forEach...
3.26
flink_MetricAssertions_isCloseTo_rdh
/** * Verifies that the gauges value is close to the expected value within a certain deviation. * * @param value * the expected value * @param epsilon * the maximum deviation from the expected value * @return this assertion object */ public GaugeAssert<T> isCloseTo(long value, long epsilon) { assertTh...
3.26
flink_DeltaIterationBase_getInitialWorkset_rdh
/** * Returns the initial workset input, or null, if none is set. * * @return The iteration's workset input. */ public Operator<WT> getInitialWorkset() { return getSecondInput(); }
3.26
flink_DeltaIterationBase_setBroadcastVariables_rdh
/** * The DeltaIteration meta operator cannot have broadcast inputs. This method always throws an * exception. * * @param inputs * Ignored */ public <X> void setBroadcastVariables(Map<String, Operator<X>> inputs) { throw new UnsupportedOperationException("The DeltaIteration meta operator cannot have broa...
3.26
flink_DeltaIterationBase_setInitialSolutionSet_rdh
/** * Sets the given input as the initial solution set. * * @param input * The contract to set the initial solution set. */ public void setInitialSolutionSet(Operator input) { setFirstInput(input); }
3.26
flink_DeltaIterationBase_setBroadcastVariable_rdh
/** * The DeltaIteration meta operator cannot have broadcast inputs. This method always throws an * exception. * * @param name * Ignored. * @param root * Ignored. */ public void setBroadcastVariable(String name, Operator<?> root) { throw new UnsupportedOperationException("The DeltaIteration meta operato...
3.26
flink_DeltaIterationBase_setInitialWorkset_rdh
/** * Sets the given input as the initial workset. * * @param input * The contract to set as the initial workset. */ public void setInitialWorkset(Operator<WT> input) { setSecondInput(input); }
3.26
flink_DeltaIterationBase_getBroadcastInputs_rdh
/** * DeltaIteration meta operator cannot have broadcast inputs. * * @return An empty map. */ public Map<String, Operator<?>> getBroadcastInputs() { return Collections.emptyMap(); }
3.26
flink_DeltaIterationBase_getInitialSolutionSet_rdh
// -------------------------------------------------------------------------------------------- // Getting / Setting the Inputs // -------------------------------------------------------------------------------------------- /** * Returns the initial solution set input, or null, if none is set. * * @return The iterat...
3.26
flink_DeltaIterationBase_setNextWorkset_rdh
/** * Sets the contract of the step function that represents the next workset. This contract is * considered one of the two sinks of the step function (the other one being the solution set * delta). * * @param result * The contract representing the next workset. */ public void setNextWorkset(Operator<WT> resul...
3.26
flink_DeltaIterationBase_setSolutionSetDelta_rdh
/** * Sets the contract of the step function that represents the solution set delta. This contract * is considered one of the two sinks of the step function (the other one being the next * workset). * * @param delta * The contract representing the solution set delta. */ public void setSolutionSetDelta(Operator...
3.26
flink_DeltaIterationBase_getSolutionSetKeyFields_rdh
// -------------------------------------------------------------------------------------------- public int[] getSolutionSetKeyFields() {return this.solutionSetKeyFields; }
3.26
flink_DeltaIterationBase_setSolutionSetUnManaged_rdh
/** * Sets whether to keep the solution set in managed memory (safe against heap exhaustion) or * unmanaged memory (objects on heap). * * @param solutionSetUnManaged * True to keep the solution set in unmanaged memory, false to keep * it in managed memory. * @see #isSolutionSetUnManaged() */ public void set...
3.26
flink_BatchTask_initBroadcastInputReaders_rdh
/** * Creates the record readers for the extra broadcast inputs as configured by {@link TaskConfig#getNumBroadcastInputs()}. This method requires that the task configuration, the * driver, and the user-code class loader are set. */ protected void initBroadcastInputReaders() throws Exception { final int numBroadc...
3.26
flink_BatchTask_getOutputCollector_rdh
// -------------------------------------------------------------------------------------------- // Result Shipping and Chained Tasks // -------------------------------------------------------------------------------------------- /** * Creates the {@link Collector} for the given task, as described by the given configur...
3.26
flink_BatchTask_initOutputs_rdh
/** * Creates a writer for each output. Creates an OutputCollector which forwards its input to all * writers. The output collector applies the configured shipping strategy. */ @SuppressWarnings("unchecked") public static <T> Collector<T> initOutputs(AbstractInvokable containingTask, UserCodeClassLoader cl, TaskConfi...
3.26
flink_BatchTask_closeUserCode_rdh
/** * Closes the given stub using its {@link org.apache.flink.api.common.functions.RichFunction#close()} method. If the close call * produces an exception, a new exception with a standard error message is created, using the * encountered exception as its cause. * * @param stub * The user code instance to be clo...
3.26
flink_BatchTask_closeChainedTasks_rdh
/** * Closes all chained tasks, in the order as they are stored in the array. The closing process * creates a standardized log info message. * ...
3.26
flink_BatchTask_openChainedTasks_rdh
// -------------------------------------------------------------------------------------------- // Chained Task LifeCycle // -------------------------------------------------------------------------------------------- /** * Opens all chained tasks, in the order as they are stored in the array. The opening process * c...
3.26
flink_BatchTask_getLastOutputCollector_rdh
// -------------------------------------------------------------------------------------------- // Task Setup and Teardown // -------------------------------------------------------------------------------------------- /** * * @return the last output collector in the collector chain */ @SuppressWarnings("unchecked")...
3.26
flink_BatchTask_cancelChainedTasks_rdh
/** * Cancels all tasks via their {@link ChainedDriver#cancelTask()} method. Any occurring * exception and error is suppressed, such that the canceling method of every task is invoked in * all cases. * * @param tasks * The tasks to be canceled. */ public static void cancelChainedTasks(List<ChainedDriver<?, ?>>...
3.26
flink_BatchTask_instantiateUserCode_rdh
// -------------------------------------------------------------------------------------------- // Miscellaneous Utilities // -------------------------------------------------------------------------------------------- /** * Instantiates a user code class from is definition in the task configuration. The class is * i...
3.26
flink_BatchTask_initBroadcastInputsSerializers_rdh
/** * Creates all the serializers and iterators for the broadcast inputs. */protected void initBroadcastInputsSerializers(int numBroadcastInputs) { this.broadcastInputSerializers = new TypeSerializerFactory<?>[numBroadcastInputs]; ClassLoader userCodeClassLoader = getUserCodeClassLoader(); f...
3.26
flink_BatchTask_invoke_rdh
// -------------------------------------------------------------------------------------------- // Task Interface // -------------------------------------------------------------------------------------------- /** * The main work method. */@Override public void invoke() throws Exception {/...
3.26
flink_BatchTask_constructLogString_rdh
// ============================================================================================ // Static Utilities // // Utilities are consolidated here to ensure a uniform way of running, // logging, exception handling, and error messages. // ==========================================================================...
3.26
flink_BatchTask_initInputReaders_rdh
/** * Creates the record readers for the number of inputs as defined by {@link #getNumTaskInputs()}. This method requires that the task configuration, the driver, and the * user-code class loader are set. */protected void initInputReaders() throws Exception {final int numInputs = getNumTaskInputs(); final Mutab...
3.26
flink_BatchTask_setLastOutputCollector_rdh
/** * Sets the last output {@link Collector} of the collector chain of this {@link BatchTask}. * * <p>In case of chained tasks, the output collector of the last {@link ChainedDriver} is set. * Otherwise it is the single collector of the {@link BatchTask}. * * @param newOutputCollector * new output collector to...
3.26
flink_BatchTask_logAndThrowException_rdh
/** * Prints an error message and throws the given exception. If the exception is of the type * {@link ExceptionInChainedStubException} then the chain of contained exceptions is followed * until an exception of a different type is found. * * @param ex * The exception to be thrown. * @param parent * The pare...
3.26
flink_BatchTask_initLocalStrategies_rdh
/** * NOTE: This method must be invoked after the invocation of {@code #initInputReaders()} and * {@code #initInputSerializersAndComparators(int)}! */ protected void initLocalStrategies(int numInputs) throws Exception { final MemoryManager memMan = getMemoryManager(); final IOManager ioMan = getIOManager();...
3.26
flink_BatchTask_openUserCode_rdh
// -------------------------------------------------------------------------------------------- // User Code LifeCycle // -------------------------------------------------------------------------------------------- /** * Opens the given stub using its {@link org.apache.flink.api.common.functions.RichFunction#open(Open...
3.26
flink_BatchTask_initialize_rdh
// -------------------------------------------------------------------------------------------- // Main Work Methods // -------------------------------------------------------------------------------------------- protected void initialize() throws Exception { // create the operator try {this.driver.setup(this); } catch...
3.26
flink_BatchTask_initInputsSerializersAndComparators_rdh
/** * Creates all the serializers and comparators. */ protected void initInputsSerializersAndComparators(int numInputs, int numComparators) { this.inputSerializers = new TypeSerializerFactory<?>[numInputs]; this.inputComparators = (numComparators > 0) ? new TypeComparator<?>[numComparators] : null;this.in...
3.26
flink_OutputFormatBase_close_rdh
/** * Close the format waiting for pending writes and reports errors. */ @Override public final void close() throws IOException {checkAsyncErrors(); flush(); checkAsyncErrors(); postClose(); } /** * Tear down the OutputFormat. This method is called at the end of {@link OutputFormatBase#close()}
3.26
flink_OutputFormatBase_writeRecord_rdh
/** * Asynchronously write a record and deal with {@link OutputFormatBase#maxConcurrentRequests}. * To specify how a record is written, please override the {@link OutputFormatBase#send(Object)} * method. */ @Overridepublic final void writeRecord(OUT record) throws IOException { checkAsyn...
3.26