name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_WindowReader_reduce_rdh
/** * Reads window state generated using a {@link ReduceFunction}. * * @param uid * The uid of the operator. * @param function * The reduce function used to create the window. * @param readerFunction * The window reader function. * @param keyType * The key type of the window. * @param reduceType * ...
3.26
flink_WindowReader_aggregate_rdh
/** * Reads window state generated using an {@link AggregateFunction}. * * @param uid * The uid of the operator. * @param aggregateFunction * The aggregate function used to create the window. * @param readerFunction * The window reader function. * @param keyType * The key type of the window. * @param...
3.26
flink_MultipleFuturesAvailabilityHelper_anyOf_rdh
/** * Combine {@code availabilityFuture} using anyOf logic with other previously registered * futures. */ public void anyOf(final int idx, CompletableFuture<?> availabilityFuture) { if ((futuresToCombine[idx] == null) || futuresToCombine[idx].isDone()) { futuresToCombine[idx] = a...
3.26
flink_MultipleFuturesAvailabilityHelper_getAvailableFuture_rdh
/** * * @return combined future using anyOf logic */ public CompletableFuture<?> getAvailableFuture() { return availableFuture; }
3.26
flink_RouteResult_params_rdh
/** * Extracts all params in {@code pathParams} and {@code queryParams} matching the name. * * @return Unmodifiable list; the list is empty if there's no match */ public List<String> params(String name) { List<String> values = queryParams.get(name); String value = pathParams.get(name); if (values == nul...
3.26
flink_RouteResult_uri_rdh
/** * Returns the original request URI. */ public String uri() { return uri; }
3.26
flink_RouteResult_queryParams_rdh
/** * Returns all params in the query part of the request URI. */ public Map<String, List<String>> queryParams() { return queryParams; }
3.26
flink_RouteResult_param_rdh
/** * Extracts the param in {@code pathParams} first, then falls back to the first matching param * in {@code queryParams}. * * @return {@code null} if there's no match */ public String param(String name) { String pathValue = pathParams.get(name); return pathValue == null ? queryParam(name) : pathValue; ...
3.26
flink_RouteResult_queryParam_rdh
// ---------------------------------------------------------------------------- // Utilities to get params. /** * Extracts the first matching param in {@code queryParams}. * * @return {@code null} if there's no match */ public String queryParam(String name) { List<String> values = queryParams.get(name); ret...
3.26
flink_RouteResult_pathParams_rdh
/** * Returns all params embedded in the request path. */ public Map<String, String> pathParams() { return pathParams; }
3.26
flink_ShadeParser_parseShadeOutput_rdh
/** * Parses the output of a Maven build where {@code shade:shade} was used, and returns a set of * bundled dependencies for each module. * * <p>The returned dependencies will NEVER contain the scope or optional flag. * * <p>This method only considers the {@code shade-flink} and {@code...
3.26
flink_MapPartitionNode_computeOperatorSpecificDefaultEstimates_rdh
/** * Computes the estimates for the MapPartition operator. We assume that by default, Map takes * one value and transforms it into another value. The cardinality consequently stays the same. */ @Overrideprotected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics) { // we really cannot make ...
3.26
flink_SessionDispatcherLeaderProcess_create_rdh
// --------------------------------------------------------------- // Factory methods // --------------------------------------------------------------- public static SessionDispatcherLeaderProcess create(UUID leaderSessionId, DispatcherGatewayServiceFactory dispatcherFactory, JobGraphStore jobGraphStore, JobResultSto...
3.26
flink_CatalogSourceTable_createAnonymous_rdh
/** * Create a {@link CatalogSourceTable} from an anonymous {@link ContextResolvedTable}. This is * required to manually create a preparing table skipping the calcite catalog resolution. */ public static CatalogSourceTable createAnonymous(FlinkRelBuilder relBuilder, ContextResolvedTable contextResolvedTable, boolean...
3.26
flink_SinkTestSuiteBase_compareSinkMetrics_rdh
/** * Compare the metrics. */ private boolean compareSinkMetrics(MetricQuerier metricQuerier, TestEnvironment testEnv, DataStreamSinkExternalContext<T> context, JobID jobId, String sinkName, String metricsName, long expectedSize) throws Exception { double sumNumRecordsOut = metricQuerier.getAggregatedMetricsBy...
3.26
flink_SinkTestSuiteBase_generateTestData_rdh
// ----------------------------- Helper Functions --------------------------------- /** * Generate a set of test records. * * @param testingSinkSettings * sink settings * @param externalContext * External context * @return Collection of generated test records */ protected List<T> generateTestData(TestingSin...
3.26
flink_SinkTestSuiteBase_testBasicSink_rdh
// ----------------------------- Basic test cases --------------------------------- /** * Test DataStream connector sink. * * <p>The following tests will create a sink in the external system, generate a collection of * test data and write them to this sink by the Flink Job. * * <p>In order to pass these tests, th...
3.26
flink_SinkTestSuiteBase_getSinkMetricFilter_rdh
/** * Return the filter used to filter the sink metric. * * <ul> * <li>Sink v1: return null. * <li>Sink v2: return the "Writer" prefix in the `SinkTransformationTranslator`. * </ul> */ private String getSinkMetricFilter(DataStreamSinkExternalContext<T> context) { if (context instanceof DataStreamSinkV1Exte...
3.26
flink_SinkTestSuiteBase_testScaleUp_rdh
/** * Test connector sink restart from a completed savepoint with a higher parallelism. * * <p>This test will create a sink in the external system, generate a collection of test data * and write a half part of them to this sink by the Flink Job with parallelism 2 at first. Then * stop the job, restart the same job...
3.26
flink_SinkTestSuiteBase_testMetrics_rdh
/** * Test connector sink metrics. * * <p>This test will create a sink in the external system, generate test data and write them to * the sink via a Flink job. Then read and compare the metrics. * * <p>Now test: numRecordsOut */ @TestTemplate @DisplayName("Test sink metrics") ...
3.26
flink_SinkTestSuiteBase_pollAndAppendResultData_rdh
/** * Poll records from the sink. * * @param result * Append records to which list * @param reader * The sink reader * @param expected * The expected list which help to stop polling * @param retryTimes * The retry times * @param semantic * The semantic * @return Collection of records in the Sink ...
3.26
flink_SinkTestSuiteBase_checkResultWithSemantic_rdh
/** * Compare the test data with actual data in given semantic. * * @param reader * the data reader for the sink * @param testData * the test data * @param semantic * the supported semantic, see {@link CheckpointingMode} */ protected void checkResultWithSemantic(ExternalSystemDataReader<T> reader, List<T...
3.26
flink_SinkTestSuiteBase_testScaleDown_rdh
/** * Test connector sink restart from a completed savepoint with a lower parallelism. * * <p>This test will create a sink in the external system, generate a collection of test data * and write a half part of them to this sink by the Flink Job with parallelism 4 at first. Then * stop the job, restart the same job ...
3.26
flink_SinkTestSuiteBase_checkGetEnoughRecordsWithSemantic_rdh
/** * Check whether the polling should stop. * * @param expected * The expected list which help to stop polling * @param result * The records that have been read * @param semantic * The semantic * @return Whether the polling should stop */ private boolean checkGetEnoughRecordsWithSemantic(List<T> expect...
3.26
flink_ThriftObjectConversions_toTRowSet_rdh
/** * Similar to {@link SerDeUtils#toThriftPayload(Object, ObjectInspector, int)} that converts the * returned Rows to JSON string. The only difference is the current implementation also keep the * type for primitive type. */ public static TRowSet toTRowSet(TProtocolVersion version, ResolvedSchema schema, List<RowD...
3.26
flink_ThriftObjectConversions_toFetchOrientation_rdh
// -------------------------------------------------------------------------------------------- // Statement related conversions // -------------------------------------------------------------------------------------------- public static FetchOrientation toFetchOrientation(TFetchOrientation fetchOrientation) { sw...
3.26
flink_ThriftObjectConversions_hasTypeQualifiers_rdh
/** * Only the type that has length, precision or scale has {@link TTypeQualifiers}. */ private static boolean hasTypeQualifiers(LogicalType type) { switch (type.getTypeRoot()) { case DECIMAL : case CHAR : case VARCHAR : return true; default : return false...
3.26
flink_ThriftObjectConversions_toTOperationHandle_rdh
// -------------------------------------------------------------------------------------------- // Flink SessionHandle && OperationHandle from/to Hive OperationHandle // -------------------------------------------------------------------------------------------- /** * Convert {@link SessionHandle} and {@link Operation...
3.26
flink_ThriftObjectConversions_toFlinkTableKinds_rdh
// -------------------------------------------------------------------------------------------- // Catalog API related conversions // -------------------------------------------------------------------------------------------- /** * Counterpart of the {@code org.apache.hive.service.cli.operation.TableTypeMapping}. */...
3.26
flink_ThriftObjectConversions_toTSessionHandle_rdh
// -------------------------------------------------------------------------------------------- // Flink SessionHandle from/to Hive SessionHandle // -------------------------------------------------------------------------------------------- public static TSessionHandle toTSessionHandle(SessionHandle sessionHandle) { ...
3.26
flink_ThriftObjectConversions_toTTypeQualifiers_rdh
/** * Create {@link TTypeQualifiers} from {@link LogicalType}. The logic is almost same in the * {@code org.apache.hive.service.cli#toTTypeQualifiers}. */ private static TTypeQualifiers toTTypeQualifiers(LogicalType type) { Map<String, TTypeQualifierValue> qualifiers = new HashMap<>(); switch (type.getTypeR...
3.26
flink_ThriftObjectConversions_toTHandleIdentifier_rdh
// -------------------------------------------------------------------------------------------- private static THandleIdentifier toTHandleIdentifier(UUID publicId, UUID secretId) { byte[] guid = new byte[16]; byte[] secret = new byte[16]; ByteBuffer guidBB = ByteBuffer.wrap(guid); ByteBuffer secretB...
3.26
flink_StreamTaskCancellationContext_alwaysRunning_rdh
/** * Factory for a context that always returns {@code false} when {@link #isCancelled()} is * called. * * @return context */static StreamTaskCancellationContext alwaysRunning() { return () -> false; }
3.26
flink_UpsertTestFileUtil_getNumberOfRecords_rdh
/** * Returns the total number of records written using the {@link UpsertTestSinkWriter} to the * given File. * * @param file * The File to read from * @return the number of records * @throws IOException */ public static int getNumberOfRecords(File file) throws IOException { checkNotNull(file); FileIn...
3.26
flink_UpsertTestFileUtil_writeRecords_rdh
/** * Writes a Map of records serialized by the {@link UpsertTestSinkWriter} to the given * BufferedOutputStream. * * @param bos * the BufferedOutputStream to write to * @param records * the Map of records created by the UpsertTestSinkWriter * @throws IOException */ public static void writeRecords(Buffered...
3.26
flink_UpsertTestFileUtil_readRecords_rdh
/** * Reads records that were written using the {@link UpsertTestSinkWriter} from the given * InputStream. * * @param bis * The BufferedInputStream to read from * @return Map containing the read ImmutableByteArrayWrapper key-value pairs * @throws IOException */ private static Map<ImmutableByteArrayWrapper, Im...
3.26
flink_ComponentClosingUtils_tryShutdownExecutorElegantly_rdh
/** * A util method that tries to shut down an {@link ExecutorService} elegantly within the given * timeout. If the executor has not been shut down before it hits timeout or the thread is * interrupted when waiting for the termination, a forceful shutdown will be attempted on the * executor. * * @param executor ...
3.26
flink_ComponentClosingUtils_shutdownExecutorForcefully_rdh
/** * Shutdown the given executor forcefully within the given timeout. * * @param executor * the executor to shut down. * @param timeout * the timeout duration. * @param interruptable * when set to true, the method can be interrupted. Each interruption to * the thread results in another {@code Executor...
3.26
flink_ComponentClosingUtils_m0_rdh
// ========= Method visible for testing ======== @VisibleForTesting static void m0(Clock clock) { ComponentClosingUtils.clock = clock;}
3.26
flink_AllocatedSlot_getTaskManagerId_rdh
/** * Gets the ID of the TaskManager on which this slot was allocated. * * <p>This is equivalent to {@link #getTaskManagerLocation()}.{@link #getTaskManagerId()}. * * @return This slot's TaskManager's ID. */ public ResourceID getTaskManagerId() { return getTaskManagerLocation().getResourceID(); }
3.26
flink_AllocatedSlot_isUsed_rdh
/** * Returns true if this slot is being used (e.g. a logical slot is allocated from this slot). * * @return true if a logical slot is allocated from this slot, otherwise false */ public boolean isUsed() { return payloadReference.get() != null; }
3.26
flink_AllocatedSlot_getSlotId_rdh
// ------------------------------------------------------------------------ /** * Gets the Slot's unique ID defined by its TaskManager. */ public SlotID getSlotId() { return new SlotID(getTaskManagerId(), physicalSlotNumber); }
3.26
flink_AllocatedSlot_hashCode_rdh
// ------------------------------------------------------------------------ /** * This always returns a reference hash code. */ @Override public final int hashCode() { return super.hashCode(); }
3.26
flink_AllocatedSlot_releasePayload_rdh
/** * Triggers the release of the assigned payload. If the payload could be released, then it is * removed from the slot. * * @param cause * of the release operation */ public void releasePayload(Throwable cause) { final Payload payload = payloadReference.get(); if (payload != null) { payload.release(cause);pay...
3.26
flink_GateNotificationHelper_notifyPriority_rdh
/** * Must be called under lock to ensure integrity of priorityAvailabilityHelper. */public void notifyPriority() { toNotifyPriority = inputGate.priorityAvailabilityHelper.getUnavailableToResetAvailable(); }
3.26
flink_AsynchronousBlockWriterWithCallback_writeBlock_rdh
/** * Issues a asynchronous write request to the writer. * * @param segment * The segment to be written. * @throws IOException * Thrown, when the writer encounters an I/O error. Due to the asynchronous * nature of the writer, the exception thrown here may have been caused by an earlier write * request. ...
3.26
flink_TSetClientInfoReq_findByName_rdh
/** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); }
3.26
flink_TSetClientInfoReq_isSetConfiguration_rdh
/** * Returns true if field configuration is set (has been assigned a value) and false otherwise */ public boolean isSetConfiguration() { return this.configuration != null; }
3.26
flink_TSetClientInfoReq_isSetSessionHandle_rdh
/** * Returns true if field sessionHandle is set (has been assigned a value) and false otherwise */ public boolean isSetSessionHandle() { return this.f0 != null; }
3.26
flink_TSetClientInfoReq_findByThriftIdOrThrow_rdh
/** * Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException(("Field " + fieldId) + " doesn't exist!...
3.26
flink_TSetClientInfoReq_isSet_rdh
/** * Returns true if field corresponding to fieldID is set (has been assigned a value) and false * otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SESSION_HANDLE...
3.26
flink_TSetClientInfoReq_findByThriftId_rdh
/** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch (fieldId) { case 1 : // SESSION_HANDLE return SESSION_HANDLE; case 2 : // CONFIGURATION return CONFIGURATION...
3.26
flink_OneInputTransformationTranslator_translateForBatchInternal_rdh
/** * A {@link TransformationTranslator} for the {@link OneInputTransformation}. * * @param <IN> * The type of the elements in the input {@code Transformation} of the transformation to * translate. * @param <OUT> * The type of the elements that result from the provided {@code OneInputTransformation}. */ @...
3.26
flink_CatalogDatabaseImpl_m0_rdh
/** * Get a map of properties associated with the database. */ public Map<String, String> m0() { return properties; }
3.26
flink_CatalogDatabaseImpl_getDetailedDescription_rdh
/** * Get a detailed description of the database. * * @return an optional long description of the database */ public Optional<String> getDetailedDescription() { return Optional.ofNullable(comment); }
3.26
flink_CatalogDatabaseImpl_copy_rdh
/** * Get a deep copy of the CatalogDatabase instance. * * @return a copy of CatalogDatabase instance */ public CatalogDatabase copy() { return copy(m0()); }
3.26
flink_CatalogDatabaseImpl_getDescription_rdh
/** * Get a brief description of the database. * * @return an optional short description of the database */ public Optional<String> getDescription() { return Optional.ofNullable(comment); }
3.26
flink_BulkIterationBase_getNextPartialSolution_rdh
/** * * @return The operator representing the next partial solution. */ public Operator<T> getNextPartialSolution() { return this.iterationResult; }
3.26
flink_BulkIterationBase_getBroadcastInputs_rdh
/** * The BulkIteration meta operator cannot have broadcast inputs. * * @return An empty map. */ public Map<String, Operator<?>> getBroadcastInputs() { return Collections.emptyMap(); }
3.26
flink_BulkIterationBase_setTerminationCriterion_rdh
/** * * @param criterion */ public <X> void setTerminationCriterion(Operator<X> criterion) {TypeInformation<X> type = criterion.getOperatorInfo().getOutputType(); FlatMapOperatorBase<X, X, TerminationCriterionMapper<X>> mapper = new FlatMapOperatorBase<X, X, TerminationCriterionMapper<X>>(new TerminationCriterionMa...
3.26
flink_BulkIterationBase_setBroadcastVariable_rdh
/** * The BulkIteration 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 BulkIteration meta operator canno...
3.26
flink_BulkIterationBase_setBroadcastVariables_rdh
/** * The BulkIteration 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 BulkIteration meta operator cannot have broadcast in...
3.26
flink_BulkIterationBase_getPartialSolution_rdh
// -------------------------------------------------------------------------------------------- /** * * @return The operator representing the partial solution. */ public Operator<T> getPartialSolution() { return this.inputPlaceHolder; }
3.26
flink_BulkIterationBase_getTerminationCriterion_rdh
/** * * @return The operator representing the termination criterion. */ public Operator<?> getTerminationCriterion() { return this.terminationCriterion; }
3.26
flink_BulkIterationBase_validate_rdh
/** * * @throws InvalidProgramException */ public void validate() throws InvalidProgramException { if (this.input == null) { throw new RuntimeException("Operator for initial partial solution is not set."); } if (this.iterationResult == null) { throw new InvalidProgramException("Operator producing the next ve...
3.26
flink_BulkIterationBase_setNextPartialSolution_rdh
/** * * @param result */ public void setNextPartialSolution(Operator<T> result) { if (result == null) { throw new NullPointerException("Operator producing the next partial solution must not be null."); } this.iterationResult = result; }
3.26
flink_BulkIterationBase_setMaximumNumberOfIterations_rdh
/** * * @param num */ public void setMaximumNumberOfIterations(int num) { if (num < 1) { throw new IllegalArgumentException("The number of iterations must be at least one."); } this.numberOfIterations = num; }
3.26
flink_RocksDBMemoryConfiguration_validate_rdh
// ------------------------------------------------------------------------ /** * Validates if the configured options are valid with respect to one another. */ public void validate() { // As FLINK-15512 introduce a new mechanism to calculate the cache capacity, // the relationship of write_buffer_manager_capa...
3.26
flink_RocksDBMemoryConfiguration_setWriteBufferRatio_rdh
/** * Sets the fraction of the total memory to be used for write buffers. This only has an effect * is either {@link #setUseManagedMemory(boolean)} or {@link #setFixedMemoryPerSlot(MemorySize)} * are set. * * <p>See {@link RocksDBOptions#WRITE_BUFFER_RATIO} for details. */ public void setWriteBufferRatio(double w...
3.26
flink_RocksDBMemoryConfiguration_setUseManagedMemory_rdh
// ------------------------------------------------------------------------ /** * Configures RocksDB to use the managed memory of a slot. See {@link RocksDBOptions#USE_MANAGED_MEMORY} for details. */ public void setUseManagedMemory(boolean useManagedMemory) { this.useManagedMemory = useManagedMemory; }
3.26
flink_RocksDBMemoryConfiguration_getWriteBufferRatio_rdh
/** * Gets the fraction of the total memory to be used for write buffers. This only has an effect * is either {@link #setUseManagedMemory(boolean)} or {@link #setFixedMemoryPerSlot(MemorySize)} * are set. * * <p>See {@link RocksDBOptions#WRITE_BUFFER_RATIO} for details. */ public ...
3.26
flink_RocksDBMemoryConfiguration_fromOtherAndConfiguration_rdh
// ------------------------------------------------------------------------ /** * Derives a RocksDBMemoryConfiguration from another object and a configuration. The values set * on the other object take precedence, and the values from the configuration are used if no * values are set on the other config object. */ p...
3.26
flink_RocksDBMemoryConfiguration_getHighPriorityPoolRatio_rdh
/** * Gets the fraction of the total memory to be used for high priority blocks like indexes, * dictionaries, etc. This only has an effect is either {@link #setUseManagedMemory(boolean)} or * {@link #setFixedMemoryPerSlot(MemorySize)} are set. * * <p>See {@link RocksDBOptions#HIGH_PRIORITY_POOL_RATIO} for details....
3.26
flink_RocksDBMemoryConfiguration_setHighPriorityPoolRatio_rdh
/** * Sets the fraction of the total memory to be used for high priority blocks like indexes, * dictionaries, etc. This only has an effect is either {@link #setUseManagedMemory(boolean)} or * {@link #setFixedMemoryPerSlot(MemorySize)} are set. * * <p>See {@link RocksDBOptions#HIGH_PRIORITY_POOL_RATIO} for details....
3.26
flink_RocksDBMemoryConfiguration_m0_rdh
/** * Gets whether the state backend is configured to use a fixed amount of memory shared between * all RocksDB instances (in all tasks and operators) of a slot. See {@link RocksDBOptions#FIX_PER_SLOT_MEMORY_SIZE} for details. */ public boolean m0() { return fixedMemoryPerSlot != null; }
3.26
flink_RocksDBMemoryConfiguration_setFixedMemoryPerSlot_rdh
/** * Configures RocksDB to use a fixed amount of memory shared between all instances (operators) * in a slot. See {@link #setFixedMemoryPerSlot(MemorySize)} for details. */ public void setFixedMemoryPerSlot(String totalMemoryPerSlotStr) { setFixedMemoryPerSlot(MemorySize.parse(totalMemoryPerSlotStr));}
3.26
flink_RocksDBMemoryConfiguration_isUsingManagedMemory_rdh
/** * Gets whether the state backend is configured to use the managed memory of a slot for RocksDB. * See {@link RocksDBOptions#USE_MANAGED_MEMORY} for details. */ public boolean isUsingManagedMemory() { return useManagedMemory != null ? useManagedMemory : RocksDBOptions.USE_MANAGED_MEMORY.defaultValue(); }
3.26
flink_GenericCsvInputFormat_getNumberOfFieldsTotal_rdh
// -------------------------------------------------------------------------------------------- public int getNumberOfFieldsTotal() { return this.fieldIncluded.length; }
3.26
flink_GenericCsvInputFormat_initializeSplit_rdh
// -------------------------------------------------------------------------------------------- // Runtime methods // -------------------------------------------------------------------------------------------- @Override protected void initializeSplit(FileInputSplit split, Long offset) throws IOException { super.initi...
3.26
flink_FlinkHintStrategies_createHintStrategyTable_rdh
/** * Customize the {@link HintStrategyTable} which contains hint strategies supported by Flink. */ public static HintStrategyTable createHintStrategyTable() { return // TODO semi/anti join with CORRELATE is not supported // internal join hint used for alias // currently, only correlate&join h...
3.26
flink_TableSink_m0_rdh
/** * Returns the data type consumed by this {@link TableSink}. * * @return The data type expected by this {@link TableSink}. */ default DataType m0() { final TypeInformation<T> legacyType = getOutputType(); if (legacyType == null) { throw new TableException("Table sink does not implement a consumed...
3.26
flink_TableSink_getFieldNames_rdh
/** * * @deprecated Use the field names of {@link #getTableSchema()} instead. */ @Deprecated default String[] getFieldNames() { return null; }
3.26
flink_TableSink_getFieldTypes_rdh
/** * * @deprecated Use the field types of {@link #getTableSchema()} instead. */ @Deprecated default TypeInformation<?>[] getFieldTypes() { return null; } /** * Returns a copy of this {@link TableSink} configured with the field names and types of the * table to emit. * * @param fieldNames * The field nam...
3.26
flink_InputGateMetrics_refreshAndGetMin_rdh
/** * Iterates over all input channels and collects the minimum number of queued buffers in a * channel in a best-effort way. * * @return minimum number of queued buffers per channel (<tt>0</tt> if no channels exist) */ int refreshAndGetMin() { int min = Integer.MAX_VALUE; Collection<InputChannel> v4 = in...
3.26
flink_InputGateMetrics_refreshAndGetMax_rdh
/** * Iterates over all input channels and collects the maximum number of queued buffers in a * channel in a best-effort way. * * @return maximum number of queued buffers per channel */ int refreshAndGetMax() { int max = 0; for (InputChannel v9 : inputGate.getInputChannels().values()) { if (v9 instan...
3.26
flink_InputGateMetrics_refreshAndGetTotal_rdh
// ------------------------------------------------------------------------ // these methods are package private to make access from the nested classes faster /** * Iterates over all input channels and collects the total number of queued buffers in a * best-effort way. * * @return total ...
3.26
flink_InputGateMetrics_refreshAndGetAvg_rdh
/** * Iterates over all input channels and collects the average number of queued buffers in a * channel in a best-effort way. * * @return average number of queued buffers per channel */ float refreshAndGetAvg() { long total = 0; int count = 0; for (InputChannel channel : inputGate.getInputChannels().values()) { ...
3.26
flink_InputGateMetrics_getTotalQueueLenGauge_rdh
// ------------------------------------------------------------------------ // Gauges to access the stats // ------------------------------------------------------------------------ private Gauge<Long> getTotalQueueLenGauge() {return new Gauge<Long>() { @Override public Long getValue() { return refreshA...
3.26
flink_InputGateMetrics_registerQueueLengthMetrics_rdh
// ------------------------------------------------------------------------ // Static access // ------------------------------------------------------------------------ public static void registerQueueLengthMetrics(MetricGroup parent, SingleInputGate[] gates) { for (int i = 0; i < gates.length; i++) { InputGateMetr...
3.26
flink_FileInputFormat_createInputSplits_rdh
/** * Computes the input splits for the file. By default, one file block is one split. If more * splits are requested than blocks are available, then a split may be a fraction of a block and * splits may cross block boundaries. * ...
3.26
flink_FileInputFormat_acceptFile_rdh
/** * A simple hook to filter files and directories from the input. The method may be overridden. * Hadoop's FileInputFormat has a similar mechanism and applies the same filters by default. * * @param fileStatus * The file status to check. * @return true, if the given file or directory is accepted */ public bo...
3.26
flink_FileInputFormat_getSplitStart_rdh
// -------------------------------------------------------------------------------------------- // Getting information about the split that is currently open // -------------------------------------------------------------------------------------------- /** * Gets the start of the current split. * * @return The star...
3.26
flink_FileInputFormat_abortWait_rdh
/** * Double checked procedure setting the abort flag and closing the stream. */ private void abortWait() { this.aborted = true; final FSDataInputStream inStream = this.fdis; this.fdis = null; if (inStream != null) { try { inStream.close(); } catch (Throwable t) { ...
3.26
flink_FileInputFormat_configure_rdh
// -------------------------------------------------------------------------------------------- // Pre-flight: Configuration, Splits, Sampling // -------------------------------------------------------------------------------------------- /** * Configures the file input format by reading the file path from the configu...
3.26
flink_FileInputFormat_setFilePaths_rdh
/** * Sets multiple paths of files to be read. * * @param filePaths * The paths of the files to read. */ public void setFilePaths(Path... filePaths) { if ((!supportsMultiPaths()) && (filePaths.length > 1)) { throw new UnsupportedOperationException("Multiple paths are not supported by this FileInputFo...
3.26
flink_FileInputFormat_setFilePath_rdh
/** * Sets a single path of a file to be read. * * @param filePath * The path of the file to read. */ public void setFilePath(Path filePath) { if (filePath == null) { throw new IllegalArgumentException("File path must not be null."); } setFilePaths(filePath); }
3.26
flink_FileInputFormat_initDefaultsFromConfiguration_rdh
/** * Initialize defaults for input format. Needs to be a static method because it is configured * for local cluster execution. * * @param configuration * The configuration to load defaults from */ private static void initDefaultsFromConfiguration(Configuration configuration) { final long to = configuration...
3.26
flink_FileInputFormat_getSplitLength_rdh
/** * Gets the length or remaining length of the current split. * * @return The length or remaining length of the current split. */ public long getSplitLength() { return f0; }
3.26
flink_FileInputFormat_getAverageRecordWidth_rdh
/** * Gets the estimated average number of bytes per record. * * @return The average number of bytes per record. * @see org.apache.flink.api.common.io.statistics.BaseStatistics#getAverageRecordWidth() */ @Override public float getAverageRecordWidth() { return this.avgBytesPerRecord; }
3.26
flink_FileInputFormat_addFilesInDir_rdh
/** * Enumerate all files in the directory and recursive if enumerateNestedFiles is true. * * @return the total length of accepted files. */ private long addFilesInDir(Path path, List<FileStatus> files, boolean logExcludedFiles) throws IOException { final FileSystem fs = path.getFileSystem(); long length = ...
3.26