name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_StringValueComparator_supportsSerializationWithKeyNormalization_rdh
// -------------------------------------------------------------------------------------------- // unsupported normalization // -------------------------------------------------------------------------------------------- @Override public boolean supportsSerializationWithKeyNormalization() { return false;}
3.26
flink_TimestampedInputSplit_resetSplitState_rdh
/** * Sets the state of the split to {@code null}. */ default void resetSplitState() { this.setSplitState(null); }
3.26
flink_NettyMessage_allocateBuffer_rdh
/** * Allocates a new buffer and adds some header information for the frame decoder. * * <p>If the <tt>contentLength</tt> is unknown, you must write the actual length after adding * the contents as an integer to position <tt>0</tt>! * * @param allocator * byte buffer allocator to use * @param id * {@link N...
3.26
flink_NettyMessage_writeToChannel_rdh
// ------------------------------------------------------------------------ void writeToChannel(ChannelOutboundInvoker out, ChannelPromise promise, ByteBufAllocator allocator, Consumer<ByteBuf> consumer, byte id, int length) throws IOException { ByteBuf byteBuf = null; try { byteBuf = allocateBuffer(allocator, id,...
3.26
flink_NettyMessage_write_rdh
// -------------------------------------------------------------------- // Serialization // -------------------------------------------------------------------- @Override void write(ChannelOutboundInvoker out, ChannelPromise promise, ByteBufAllocator allocator) throws IOException {ByteBuf headerBuf = null; try { ...
3.26
flink_SlotPool_requestNewAllocatedBatchSlot_rdh
/** * Requests the allocation of a new batch slot from the resource manager. Unlike the normal * slot, a batch slot will only time out if the slot pool does not contain a suitable slot. * Moreover, it won't react to failure signals from the resource manager. * * @param slotRequestId * identifying the requested ...
3.26
flink_SlotPool_requestNewAllocatedSlot_rdh
/** * Request the allocation of a new slot from the resource manager. This method will not return a * slot from the already available slots from the pool, but instead will add a new slot to that * pool that is immediately allocated and returned. * * @param slotRequestId * identifying the requested slot * @para...
3.26
flink_Tuple20_of_rdh
/** * Creates a new tuple and assigns the given values to the tuple's fields. This is more * convenient than using the constructor, because the compiler can infer the generic type * arguments implicitly. For example: {@code Tuple3.of(n, x, s)} instead of {@code new * Tuple3<Integer, Double, String>(n, x, s)} */ pu...
3.26
flink_Tuple20_equals_rdh
/** * Deep equality for tuples by calling equals() on the tuple members. * * @param o * the object checked for equality * @return true if this is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Tuple20)) { return false; } @SuppressWarnings(...
3.26
flink_Tuple20_setFields_rdh
/** * Sets new values to all fields of the tuple. * * @param f0 * The value for field 0 * @param f1 * The value for field 1 * @param f2 * The value for field 2 * @param f3 * The value for field 3 * @param f4 * The value for field 4 * @param f5 * The value for field 5 * @param f6 * The valu...
3.26
flink_Tuple20_copy_rdh
/** * Shallow tuple copy. * * @return A new Tuple with the same fields as this. */ @Override @SuppressWarnings("unchecked") public Tuple20<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19> copy() { return new Tuple20<>(this.f0, this.f1, this.f2, this.f3, this.f4, this.f5, th...
3.26
flink_Tuple20_toString_rdh
// ------------------------------------------------------------------------------------------------- // standard utilities // ------------------------------------------------------------------------------------------------- /** * Creates a string representation of the tuple in the form (f0, f1, f2, f3, f4, f5, f6, f7,...
3.26
flink_ParquetAvroWriters_forSpecificRecord_rdh
/** * Creates a ParquetWriterFactory for an Avro specific type. The Parquet writers will use the * schema of that specific type to build and write the columnar data. * * @param type * The class of the type to write. */ public static <T extends SpecificRecordBase> ParquetWriterFactory<T> forSpecificRecord(Class<...
3.26
flink_ParquetAvroWriters_forReflectRecord_rdh
/** * Creates a ParquetWriterFactory for the given type. The Parquet writers will use Avro to * reflectively create a schema for the type and use that schema to write the columnar data. * * @param type * The class of the type to write. */ public static <T> ParquetWriterFactory<T> forReflectRecord(Class<T> type)...
3.26
flink_ParquetAvroWriters_forGenericRecord_rdh
/** * Creates a ParquetWriterFactory that accepts and writes Avro generic types. The Parquet * writers will use the given schema to build and write the columnar data. * * @param schema * The schema of the generic type. */ public static ParquetWriterFactory<GenericRecord> forGenericRecord(Schema schema) { r...
3.26
flink_RuntimeOpenApiSpecGenerator_main_rdh
/** * Generates the Runtime REST API OpenAPI spec. * * @param args * args[0] contains the directory into which the generated files are placed * @throws IOException * if any file operation failed */ public static void main(String[] args) throws IOException, ConfigurationException { String outputDirector...
3.26
flink_LimitedConnectionsFileSystem_getNumberOfOpenInputStreams_rdh
/** * Gets the number of currently open input streams. */ public int getNumberOfOpenInputStreams() { return f0; }
3.26
flink_LimitedConnectionsFileSystem_getTotalNumberOfOpenStreams_rdh
/** * Gets the total number of open streams (input plus output). */ public int getTotalNumberOfOpenStreams() { lock.lock(); try { return numReservedOutputStreams + f0; } finally { lock.unlock(); } }
3.26
flink_LimitedConnectionsFileSystem_getKind_rdh
// ------------------------------------------------------------------------ // other delegating file system methods // ------------------------------------------------------------------------ @Override public FileSystemKind getKind() {return originalFs.getKind(); }
3.26
flink_LimitedConnectionsFileSystem_createStream_rdh
// ------------------------------------------------------------------------ private <T extends StreamWithTimeout> T createStream(final SupplierWithException<T, IOException> streamOpener, final HashSet<T> openStreams, final boolean output) throws IOException { final int outputLimit = (output && (...
3.26
flink_LimitedConnectionsFileSystem_getStreamInactivityTimeout_rdh
/** * Gets the milliseconds that a stream may spend not writing any bytes before it is closed as * inactive. */ public long getStreamInactivityTimeout() { return streamInactivityTimeoutNanos / 1000000; }
3.26
flink_LimitedConnectionsFileSystem_getLastCheckTimestampNanos_rdh
/** * Gets the timestamp when the last inactivity evaluation was made. */ public long getLastCheckTimestampNanos() { return lastCheckTimestampNanos; }
3.26
flink_LimitedConnectionsFileSystem_getStreamOpenTimeout_rdh
/** * Gets the number of milliseconds that a opening a stream may wait for availability in the * connection pool. */ public long getStreamOpenTimeout() { return streamOpenTimeoutNanos / 1000000; }
3.26
flink_LimitedConnectionsFileSystem_getMaxNumOpenStreamsTotal_rdh
/** * Gets the maximum number of concurrently open streams (input + output). */ public int getMaxNumOpenStreamsTotal() { return maxNumOpenStreamsTotal; }
3.26
flink_LimitedConnectionsFileSystem_fromConfig_rdh
// -------------------------------------------------------------------- /** * Parses and returns the settings for connection limiting, for the file system with the * given file system scheme. * * @param config * The configuration to check. * @param fsScheme * The file system scheme. * @return The parsed con...
3.26
flink_LimitedConnectionsFileSystem_read_rdh
// --- FSDataOutputStream API implementation @Override public int read() throws IOException { try { return originalStream.read(); } catch (IOException e) { handleIOException(e); return 0;// silence the compiler } }
3.26
flink_LimitedConnectionsFileSystem_getMaxNumOpenOutputStreams_rdh
// ------------------------------------------------------------------------ /** * Gets the maximum number of concurrently open output streams. */ public int getMaxNumOpenOutputStreams() { return maxNumOpenOutputStreams;}
3.26
flink_LimitedConnectionsFileSystem_write_rdh
// --- FSDataOutputStream API implementation @Override public void write(int b) throws IOException { try {originalStream.write(b); } catch (IOException e) { handleIOException(e); } }
3.26
flink_LimitedConnectionsFileSystem_create_rdh
// input & output stream opening methods // ------------------------------------------------------------------------ @Override public FSDataOutputStream create(Path f, WriteMode overwriteMode) throws IOException { return createOutputStream(() -> originalFs.create(f, overwriteMode)); }
3.26
flink_LimitedConnectionsFileSystem_getNumberOfOpenOutputStreams_rdh
/** * Gets the number of currently open output streams. */ public int getNumberOfOpenOutputStreams() {lock.lock(); try { return numReservedOutputStreams; } finally { lock.unlock(); } }
3.26
flink_LimitedConnectionsFileSystem_checkNewBytesAndMark_rdh
/** * Checks whether there were new bytes since the last time this method was invoked. This * also sets the given timestamp, to be read via {@link #getLastCheckTimestampNanos()}. * * @return True, if there were new bytes, false if not. */ public boolean checkNewBytesAndMark(long timestamp) throws IOException { // ...
3.26
flink_LimitedConnectionsFileSystem_unregisterInputStream_rdh
/** * Atomically removes the given input stream from the set of currently open input streams, and * signals that new stream can now be opened. */ void unregisterInputStream(InStream stream) { lock.lock();try { // only decrement if we actually remove the stream if (openInputStreams.remove(stream)) { f0--; available.s...
3.26
flink_LimitedConnectionsFileSystem_getMaxNumOpenInputStreams_rdh
/** * Gets the maximum number of concurrently open input streams. */ public int getMaxNumOpenInputStreams() { return maxNumOpenInputStreams; }
3.26
flink_OrcSplitReader_reachedEnd_rdh
/** * Method used to check if the end of the input is reached. * * @return True if the end is reached, otherwise false. * @throws IOException * Thrown, if an I/O error occurred. */ public boolean reachedEnd() throws IOException { return !ensureBatch(); }
3.26
flink_OrcSplitReader_seekToRow_rdh
/** * Seek to a particular row number. */ public void seekToRow(long rowCount) throws IOException { orcRowsReader.seekToRow(rowCount); }
3.26
flink_OrcSplitReader_ensureBatch_rdh
/** * Checks if there is at least one row left in the batch to return. If no more row are * available, it reads another batch of rows. * * @return Returns true if there is one more row to return, false otherwise. * @throws IOException * throw if an exception happens while reading a batch. */ private boolean en...
3.26
flink_BeamOperatorStateStore_getListState_rdh
/** * Currently list state and union-list state is not supported. */ @Override public ListState<byte[]> getListState(BeamFnApi.StateRequest request) throws Exception { throw new RuntimeException("Operator list state is still not supported"); }
3.26
flink_BeamOperatorStateStore_getMapState_rdh
/** * Returns a {@link BroadcastState} wrapped in {@link MapState} interface. */ @Override public MapState<ByteArrayWrapper, byte[]> getMapState(BeamFnApi.StateRequest request) throws Exception { if (!request.getStateKey().hasMultimapKeysSideInput()) { throw new RuntimeException("Unsupported broadcast st...
3.26
flink_MinWithRetractAggFunction_getArgumentDataTypes_rdh
// -------------------------------------------------------------------------------------------- // Planning // -------------------------------------------------------------------------------------------- @Override public List<DataType> getArgumentDataTypes() { return Collections.singletonList(f1); }
3.26
flink_ExternalizedSnapshotLocation_validatePath_rdh
/** * Checks the validity of the path's scheme and path. * * @param path * The path to check. * @return The URI as a Path. * @throws IllegalArgumentException * Thrown, if the URI misses scheme or path. */ private static Path validatePath(Path path) { if (path == null) { return null; } Op...
3.26
flink_AbstractStreamOperatorFactory_getMailboxExecutor_rdh
/** * Provides the mailbox executor iff this factory implements {@link YieldingOperatorFactory}. */ protected MailboxExecutor getMailboxExecutor() { return checkNotNull(mailboxExecutor, "Factory does not implement %s", YieldingOperatorFactory.class); }
3.26
flink_Slide_over_rdh
/** * Creates a sliding window. Sliding windows have a fixed size and slide by a specified slide * interval. If the slide interval is smaller than the window size, sliding windows are * overlapping. Thus, an element can be assigned to multiple windows. * * <p>For example, a sliding window of size 15 minutes with 5...
3.26
flink_YearMonthIntervalPeriodConverter_create_rdh
// Factory method // -------------------------------------------------------------------------------------------- public static YearMonthIntervalPeriodConverter create(DataType dataType) { return create(((YearMonthIntervalType) (dataType.getLogicalType()))); }
3.26
flink_RocksDBStateBackend_setNumberOfTransferingThreads_rdh
/** * * @deprecated Typo in method name. Use {@link #setNumberOfTransferThreads(int)} instead. */ @Deprecated public void setNumberOfTransferingThreads(int numberOfTransferingThreads) { setNumberOfTransferThreads(numberOfTransferingThreads); }
3.26
flink_RocksDBStateBackend_ensureRocksDBIsLoaded_rdh
// ------------------------------------------------------------------------ // static library loading utilities // ------------------------------------------------------------------------ @VisibleForTesting static void ensureRocksDBIsLoaded(String tempDirector...
3.26
flink_RocksDBStateBackend_createOptionsAndResourceContainer_rdh
// ------------------------------------------------------------------------ // utilities // ------------------------------------------------------------------------ @VisibleForTesting RocksDBResourceContainer createOptionsAndResourceContainer() { return rocksDBStateBackend.createOptionsAndResourceContainer(null); }
3.26
flink_RocksDBStateBackend_getWriteBatchSize_rdh
/** * Gets the max batch size will be used in {@link RocksDBWriteBatchWrapper}. */ public long getWriteBatchSize() { return rocksDBStateBackend.getWriteBatchSize(); }
3.26
flink_RocksDBStateBackend_resolveCheckpoint_rdh
// Checkpoint initialization and persistent storage // ------------------------------------------------------------------------ @Override public CompletedCheckpointStorageLocation resolveCheckpoint(String pointer) throws IOException { return ((CheckpointStorage) (checkpointStreamBackend)).resolveCheckpoint(pointer)...
3.26
flink_RocksDBStateBackend_getDbStoragePaths_rdh
/** * Gets the configured local DB storage paths, or null, if none were configured. * * <p>Under these directories on the TaskManager, RocksDB stores its SST files and metadata * files. These directories do not need to be persistent, they can be ephermeral, meaning that * they are lost on a machine failure, becaus...
3.26
flink_RocksDBStateBackend_setRocksDBOptions_rdh
/** * Sets {@link org.rocksdb.Options} for the RocksDB instances. Because the options are not * serializable and hold native code references, they must be specified through a factory. * * <p>The options created by the factory here are applied on top of the pre-defined options * profile selected via {@link #setPred...
3.26
flink_RocksDBStateBackend_getCheckpointBackend_rdh
// ------------------------------------------------------------------------ // State backend methods // ------------------------------------------------------------------------ /** * Gets the state backend that this RocksDB state backend uses to persist its bytes to. * * <p>This RocksDB state backend only implements...
3.26
flink_RocksDBStateBackend_getNumberOfTransferThreads_rdh
/** * Gets the number of threads used to transfer files while snapshotting/restoring. */public int getNumberOfTransferThreads() { return rocksDBStateBackend.getNumberOfTransferThreads(); }
3.26
flink_RocksDBStateBackend_isIncrementalCheckpointsEnabled_rdh
/** * Gets whether incremental checkpoints are enabled for this state backend. */ public boolean isIncrementalCheckpointsEnabled() { return rocksDBStateBackend.isIncrementalCheckpointsEnabled(); }
3.26
flink_RocksDBStateBackend_createKeyedStateBackend_rdh
// ------------------------------------------------------------------------ // State holding data structures // ------------------------------------------------------------------------ @Override public <K> AbstractKeyedStateBackend<K> createKeyedStateBackend(Environment env, JobID jobID, String op...
3.26
flink_RocksDBStateBackend_setDbStoragePath_rdh
// ------------------------------------------------------------------------ // Parameters // ------------------------------------------------------------------------ /** * Sets the path where the RocksDB local database files should be stored on the local file * system. Setting this path overrides the default behavior...
3.26
flink_RocksDBStateBackend_setWriteBatchSize_rdh
/** * Sets the max batch size will be used in {@link RocksDBWriteBatchWrapper}, no positive value * will disable memory size controller, just use item count controller. * * @param writeBatchSize * The size will used to be used in {@link RocksDBWriteBatchWrapper}. */ public void setWriteBatchSize(long writeBat...
3.26
flink_RocksDBStateBackend_setNumberOfTransferThreads_rdh
/** * Sets the number of threads used to transfer files while snapshotting/restoring. * * @param numberOfTransferThreads * The number of threads used to transfer files while * snapshotting/restoring. */ public void setNumberOfTransferThreads(int numberOfTransferThreads) { rocksDBStateBackend.setNumberOf...
3.26
flink_RocksDBStateBackend_setDbStoragePaths_rdh
/** * Sets the directories in which the local RocksDB database puts its files (like SST and * metadata files). These directories do not need to be persistent, they can be ephemeral, * meaning that they are lost on a machine failure, because state in RocksDB is persisted in * checkpoints. * * <p>If nothing is conf...
3.26
flink_RocksDBStateBackend_getRocksDBOptions_rdh
/** * Gets {@link org.rocksdb.Options} for the RocksDB instances. * * <p>The options created by the factory here are applied on top of the pre-defined options * profile selected via {@link #setPredefinedOptions(PredefinedOptions)}. If the pre-defined * options profile is the default ({@link PredefinedOptions#DEFAU...
3.26
flink_RocksDBStateBackend_configure_rdh
// ------------------------------------------------------------------------ // Reconfiguration // ------------------------------------------------------------------------ /** * Creates a copy of this state backend that uses the values defined in the configuration for * fields where that were not yet specified in this...
3.26
flink_RocksDBStateBackend_setPredefinedOptions_rdh
// ------------------------------------------------------------------------ // Parametrize with RocksDB Options // ------------------------------------------------------------------------ /** * Sets the predefined options for RocksDB. * * <p>If user-configured options within {@link RocksDBConfigurableOptions} is set...
3.26
flink_RocksDBStateBackend_getNumberOfTransferingThreads_rdh
/** * * @deprecated Typo in method name. Use {@link #getNumberOfTransferThreads} instead. */@Deprecated public int getNumberOfTransferingThreads() { return getNumberOfTransferThreads(); }
3.26
flink_RocksDBStateBackend_setPriorityQueueStateType_rdh
/** * Sets the type of the priority queue state. It will fallback to the default value, if it is * not explicitly set. */ public void setPriorityQueueStateType(PriorityQueueStateType priorityQueueStateType) { rocksDBStateBackend.setPriorityQueueStateType(LegacyEnumBridge.convert(priorityQueueStateType)); }
3.26
flink_S3TestCredentials_credentialsAvailable_rdh
// ------------------------------------------------------------------------ /** * Checks whether S3 test credentials are available in the environment variables of this JVM. */private static boolean credentialsAvailable() {return (isNotEmpty(S3_TEST_BUCKET) && isNotEmpty(S3_TEST_ACCESS_KEY)) && isNotEmpty(S3_TEST_...
3.26
flink_S3TestCredentials_assumeCredentialsAvailable_rdh
/** * Checks whether credentials are available in the environment variables of this JVM. If not, * throws an {@link AssumptionViolatedException} which causes JUnit tests to be skipped. */ public static void assumeCredentialsAvailable() { Assume.assumeTrue("No S3 credentials available in this test's environment",...
3.26
flink_S3TestCredentials_getTestBucketUri_rdh
/** * Gets the URI for the path under which all tests should put their data. * * <p>This method throws an exception if the bucket was not configured. Tests should use {@link #assumeCredentialsAvailable()} to skip tests when credentials are not available. */ public static String getTestBucketUri() { return getTestBu...
3.26
flink_S3TestCredentials_getS3SecretKey_rdh
/** * Gets the S3 Secret Key. * * <p>This method throws an exception if the key is not available. Tests should use {@link #assumeCredentialsAvailable()} to skip tests when credentials are not available. */ public static String getS3SecretKey() { if (S3_TEST_SECRET_KEY != null) { return S3_TEST_SECRET_KE...
3.26
flink_S3TestCredentials_getTestBucketUriWithScheme_rdh
/** * Gets the URI for the path under which all tests should put their data. * * <p>This method throws an exception if the bucket was not configured. Tests should use {@link #assumeCredentialsAvailable()} to skip tests when credentials are not available. */ public static String getTestBucketUriWithScheme(String sc...
3.26
flink_NestedRowData_setNullAt_rdh
/** * See {@link BinaryRowData#setNullAt(int)}. */ @Override public void setNullAt(int i) { assertIndexIsValid(i); BinarySegmentUtils.bitSet(segments, offset, i + 8); BinarySegmentUtils.setLong(segments, getFieldOffset(i), 0); }
3.26
flink_HadoopDelegationTokenConverter_serialize_rdh
/** * Serializes delegation tokens. */ public static byte[] serialize(Credentials credentials) throws IOException { try (DataOutputBuffer dob = new DataOutputBuffer()) { credentials.writeTokenStorageToStream(dob); return dob.getData(); } }
3.26
flink_HadoopDelegationTokenConverter_deserialize_rdh
/** * Deserializes delegation tokens. */ public static Credentials deserialize(byte[] credentialsBytes) throws IOException { try (DataInputStream dis = new DataInputStream(new ByteArrayInputStream(credentialsBytes))) { Credentials credentials = new Credentials(); credentials.readTokenStorageStream...
3.26
flink_TypeTransformations_timeToSqlTypes_rdh
/** * Returns a type transformation that transforms data type to a new data type whose conversion * class is {@link java.sql.Timestamp}/{@link java.sql.Time}/{@link java.sql.Date} if the * original data type is TIMESTAMP/TIME/DATE. */ public static TypeTransformation timeToSqlTypes() { Map<LogicalTypeRoot, Cla...
3.26
flink_TypeTransformations_toNullable_rdh
/** * Returns a type transformation that transforms data type to nullable data type but keeps other * information unchanged. */ public static TypeTransformation toNullable() { return DataType::nullable; }
3.26
flink_TypeTransformations_legacyToNonLegacy_rdh
/** * Returns a type transformation that transforms LEGACY(...) type to a non-legacy type. */ public static TypeTransformation legacyToNonLegacy() { return LegacyToNonLegacyTransformation.INSTANCE; }
3.26
flink_WindowWordCount_main_rdh
// ************************************************************************* // PROGRAM // ************************************************************************* public static void main(String[] args) throws Exception { final CLI params = CLI.fromArgs(args); // Create the execution environment. This is the ma...
3.26
flink_ClassLogicalTypeConverter_getDefaultExternalClassForType_rdh
/** * Get internal(sql engine execution data formats) and default external class for {@link LogicalType}. */public class ClassLogicalTypeConverter { @Deprecated public static Class getDefaultExternalClassForType(LogicalType type) { return TypeConversions.fromLogicalToDataType(type).getConversionClass(...
3.26
flink_DefaultDispatcherRunner_grantLeadership_rdh
// --------------------------------------------------------------- // Leader election // --------------------------------------------------------------- @Overridepublic void grantLeadership(UUID leaderSessionID) { runActionIfRunning(() -> { LOG.info("{} was granted leadership with leader id {}. Creating new...
3.26
flink_MutableIOMetrics_addIOMetrics_rdh
/** * Adds the IO metrics for the given attempt to this object. If the {@link AccessExecution} is * in a terminal state the contained {@link IOMetrics} object is added. Otherwise the given * {@link MetricFetcher} is used to retrieve the required metrics. * * @param attempt * Attempt ...
3.26
flink_SourceFunctionProvider_of_rdh
/** * Helper method for creating a Source provider with a provided source parallelism. */ static SourceFunctionProvider of(SourceFunction<RowData> sourceFunction, boolean isBounded, @Nullable Integer sourceParallelism) { return new SourceFunctionProvider() { @Override publi...
3.26
flink_ReusingBlockResettableIterator_hasNext_rdh
// ------------------------------------------------------------------------ @Override public boolean hasNext() { try { if (this.nextElement == null) { if (this.readPhase) { // read phase, get next element from buffer T tmp = getNextRecord(this.reuseElement)...
3.26
flink_SecurityUtils_install_rdh
/** * Installs a process-wide security configuration. * * <p>Applies the configuration using the available security modules (i.e. Hadoop, JAAS). */ public static void install(SecurityConfiguration config) throws Exception {// Install the security modules first before installing the security context installModul...
3.26
flink_CsvRowSchemaConverter_convertType_rdh
/** * Convert {@link LogicalType} to {@link CsvSchema.ColumnType} based on Jackson's categories. */ private static ColumnType convertType(String fieldName, LogicalType type) { if (STRING_TYPE_ROOTS.contains(type.getTypeRoot())) { return ColumnType.STRING; } else if (NUMBER_TYPE_ROOTS.contains(type.g...
3.26
flink_CsvRowSchemaConverter_convert_rdh
/** * Convert {@link RowTypeInfo} to {@link CsvSchema}. */ public static CsvSchema convert(RowTypeInfo rowType) { final Builder builder = new CsvSchema.Builder(); final String[] fields = rowType.getFieldNames(); final TypeInformation<?>[] types = rowType.getFieldTypes(); for (int i = 0; i < rowType....
3.26
flink_HadoopOutputCollector_collect_rdh
/** * Use the wrapped Flink collector to collect a key-value pair for Flink. * * @param key * the key to collect * @param val * the value to collect * @throws IOException * unexpected of key or value in key-value pair. */ @Override public void collect(final KEY key, final VALUE val) throws IOException { ...
3.26
flink_HadoopOutputCollector_setFlinkCollector_rdh
/** * Set the wrapped Flink collector. * * @param flinkCollector * The wrapped Flink OutputCollector. */ public void setFlinkCollector(Collector<Tuple2<KEY, VALUE>> flinkCollector) { this.flinkCollector = flinkCollector; }
3.26
flink_VertexInputInfoStore_put_rdh
/** * Put a {@link JobVertexInputInfo}. * * @param jobVertexId * the job vertex id * @param resultId * the intermediate result id * @param info * the {@link JobVertexInputInfo} to put */ public void put(JobVertexID jobVertexId, IntermediateDataSetID resultId, J...
3.26
flink_LogicalTypeJsonSerializer_serializeTime_rdh
// -------------------------------------------------------------------------------------------- // Helper methods for some complex types // -------------------------------------------------------------------------------------------- private void serializeTime(LogicalType timeType, JsonGenerator jsonGenerator) throws IO...
3.26
flink_SupportsFilterPushDown_of_rdh
/** * Constructs a filter push-down result. * * <p>See the documentation of {@link SupportsFilterPushDown} for more information. * * @param acceptedFilters * filters that are consumed by the source but may be applied on a * best effort basis * @param remainingFilters * filters that a subsequent filter op...
3.26
flink_CsvCommons_validateFormatOptions_rdh
// ------------------------------------------------------------------------ // Validation // ------------------------------------------------------------------------ static void validateFormatOptions(ReadableConfig tableOptions) { final boolean hasQuoteCharacter = tableOptions.getOptional(QU...
3.26
flink_CsvCommons_validateCharacterVal_rdh
/** * Validates the option {@code option} value must be a Character. * * @param tableOptions * the table options * @param option * the config option * @param unescape * whether to unescape the option value */ private static void validateCharacterVal(ReadableConfig tableOptions, ConfigOption<String> optio...
3.26
flink_Types_EITHER_rdh
/** * Returns type information for Flink's {@link org.apache.flink.types.Either} type. Null values * are not supported. * * <p>Either type can be used for a value of two possible types. * * <p>Example use: <code>Types.EITHER(Types.VOID, Types.INT)</code> * * @param leftType * type information of left side / ...
3.26
flink_Types_PRIMITIVE_ARRAY_rdh
/** * Returns type information for Java arrays of primitive type (such as <code>byte[]</code>). The * array must not be null. * * @param elementType * element type of the array (e.g. Types.BOOLEAN, Types.INT, Types.DOUBLE) */ public static TypeInformation<?> PRIMITIVE_ARRAY(TypeI...
3.26
flink_Types_TUPLE_rdh
/** * Returns type information for typed subclasses of Flink's {@link org.apache.flink.api.java.tuple.Tuple}. Typed subclassed are classes that extend {@link org.apache.flink.api.java.tuple.Tuple0} till {@link org.apache.flink.api.java.tuple.Tuple25} * to provide types for all fields and might add additional getters ...
3.26
flink_Types_POJO_rdh
/** * Returns type information for a POJO (Plain Old Java Object) and allows to specify all fields * manually. * * <p>A type is considered a FLink POJO type, if it fulfills the conditions below. * * <ul> * <li>It is a public class, and standalone (not a non-static inner class) * <li>It has a public no-argum...
3.26
flink_Types_ROW_NAMED_rdh
/** * Returns type information for {@link org.apache.flink.types.Row} with fields of the given * types and with given names. A row must not be null. * * <p>A row is a fixed-length, null-aware composite type for storing multiple values in a * deterministic field order. Every field can be null independent of the fie...
3.26
flink_Types_OBJECT_ARRAY_rdh
/** * Returns type information for Java arrays of object types (such as <code>String[]</code>, * <code>Integer[]</code>). The array itself must not be null. Null values for elements are * supported. * * @param elementType * element type of the array */@SuppressWarnings("unchecked") public static <E> TypeInform...
3.26
flink_Types_VALUE_rdh
/** * Returns type information for Flink value types (classes that implement {@link org.apache.flink.types.Value}). Built-in value types do not support null values (except for * {@link org.apache.flink.types.StringValue}). * * <p>Value types describe their serialization and deserialization manually. Instead of goin...
3.26
flink_Types_MAP_rdh
/** * Returns type information for a Java {@link java.util.Map}. A map must not be null. Null * values in keys are not supported. An entry's value can be null. * * <p>By default, maps are untyped and treated as a generic type in Flink; therefore, it is * useful to pass type information whenever a map is used. * ...
3.26
flink_Types_GENERIC_rdh
/** * Returns generic type information for any Java object. The serialization logic will use the * general purpose serializer Kryo. * * <p>Generic types are black-boxes for Flink, but allow any object and null values in fields. * * <p>By default, serialization of this type is not very efficient. Please read the ...
3.26
flink_Types_ROW_rdh
// CHECKSTYLE.OFF: MethodName /** * Returns type information for {@link org.apache.flink.types.Row} with fields of the given * types. A row itself must not be null. * * <p>A row is a fixed-length, null-aware composite type for storing multiple values in a * deterministic field order. Every field can be null regard...
3.26