name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_BroadcastVariableKey_hashCode_rdh
// --------------------------------------------------------------------------------------------- @Override public int hashCode() { return ((31 * superstep) + (47 * name.hashCode())) + (83 * vertexId.hashCode()); }
3.26
flink_BroadcastVariableKey_getVertexId_rdh
// --------------------------------------------------------------------------------------------- public JobVertexID getVertexId() { return vertexId; }
3.26
flink_AbstractPythonScalarFunctionOperator_createUserDefinedFunctionsProto_rdh
/** * Gets the proto representation of the Python user-defined functions to be executed. */ @Overridepublic UserDefinedFunctions createUserDefinedFunctionsProto() { return ProtoUtils.createUserDefinedFunctionsProto(getRuntimeContext(), scalarFunctions, config.get(PYTHON_METRIC_ENABLED), config.get(PYTHON_PROFIL...
3.26
flink_PlannerContext_getBuiltinSqlOperatorTable_rdh
/** * Returns builtin the operator table and external the operator for this environment. */ private SqlOperatorTable getBuiltinSqlOperatorTable() { return SqlOperatorTables.chain(new FunctionCatalogOperatorTable(context.getFunctionCatalog(), context.getCatalogManager().getDataTypeFactory(), typeFactory, context...
3.26
flink_PlannerContext_getSqlParserConfig_rdh
/** * Returns the SQL parser config for this environment including a custom Calcite configuration. */ private Config getSqlParserConfig() {return // we use Java lex because back ticks are easier than double quotes in // programming and cases are preserved JavaScalaConversionUtil.<SqlParser.Config>toJava(get...
3.26
flink_PlannerContext_getSqlToRelConverterConfig_rdh
/** * Returns the {@link SqlToRelConverter} config. * * <p>`expand` is set as false, and each sub-query becomes a * [[org.apache.calcite.rex.RexSubQuery]]. */ private Config getSqlToRelConverterConfig() { return JavaScalaConversionUtil.<SqlToRelConverter.Config>toJava(getCalciteConfig().getSqlToRelConverterCo...
3.26
flink_PlannerContext_getSqlOperatorTable_rdh
/** * Returns the operator table for this environment including a custom Calcite configuration. */ private SqlOperatorTable getSqlOperatorTable(CalciteConfig calciteConfig) { return JavaScalaConversionUtil.<SqlOperatorTable>toJava(calciteConfig.getSqlOperatorTable()).map(operatorTable -> { if (calciteCo...
3.26
flink_MergeIterator_next_rdh
/** * Gets the next smallest element, with respect to the definition of order implied by the {@link TypeSerializer} provided to this iterator. * * @return The next element if the iterator has another element, null otherwise. * @see org.apache.flink.util.MutableObjectIterator#next() */ @...
3.26
flink_StatsDReporter_reportCounter_rdh
// ------------------------------------------------------------------------ private void reportCounter(final String name, final Counter counter) { send(name, counter.getCount()); }
3.26
flink_RexLiteralUtil_toFlinkInternalValue_rdh
/** * Convert a value from Calcite's {@link Comparable} data structures to Flink internal data * structures and also tries to be a bit flexible by accepting usual Java types such as String * and boxed numerics. * * <p>In case of symbol types, this function will return provided value, checki...
3.26
flink_IOManager_close_rdh
/** * Removes all temporary files. */ @Override public void close() throws Exception { fileChannelManager.close(); }
3.26
flink_IOManager_getSpillingDirectoriesPaths_rdh
/** * Gets the directories that the I/O manager spills to, as path strings. * * @return The directories that the I/O manager spills to, as path strings. */ public String[] getSpillingDirectoriesPaths() { File[] paths = fileChannelManager.getPaths(); String[] strings = new String[paths.length]; for (in...
3.26
flink_IOManager_createBlockChannelWriter_rdh
// ------------------------------------------------------------------------ // Reader / Writer instantiations // ------------------------------------------------------------------------ /** * Creates a block channel writer that writes to the given channel. The writer adds the written * segment to its return-queue aft...
3.26
flink_IOManager_createChannel_rdh
// ------------------------------------------------------------------------ // Channel Instantiations // ------------------------------------------------------------------------ /** * Creates a new {@link ID} in one of the temp directories. Multiple invocatio...
3.26
flink_IOManager_deleteChannel_rdh
/** * Deletes the file underlying the given channel. If the channel is still open, this call may * fail. * * @param channel * The channel to be deleted. */ public static void deleteChannel(ID channel) { if (channel != null) { if (channel.getPathFile().exists() && (!c...
3.26
flink_IOManager_createChannelEnumerator_rdh
/** * Creates a new {@link Enumerator}, spreading the channels in a round-robin fashion across the * temporary file directories. * * @return An enumerator for channels. */ public Enumerator createChannelEnumerator() { return fileChannelManager.createChannelEnumerator(); }
3.26
flink_IOManager_createBlockChannelReader_rdh
/** * Creates a block channel reader that reads blocks from the given channel. The reader pushed * full memory segments (with the read data) to its "return queue", to allow for asynchronous * read implementations. * * @param channelID * The descriptor for the channel to write to. * @return A block channel read...
3.26
flink_ProducerMergedPartitionFileWriter_calculateSizeAndFlushBuffers_rdh
/** * Compute buffer's file offset and create buffers to be flushed. * * @param toWrite * all buffers to write to create {@link ProducerMergedPartitionFileIndex.FlushedBuffer}s * @param buffers * receive the created {@link ProducerMergedPartitionFileIndex.FlushedBuffer} */ private void calculateSizeAndFlushB...
3.26
flink_ProducerMergedPartitionFileWriter_flushBuffers_rdh
/** * Write all buffers to the disk. */ private void flushBuffers(List<Tuple2<Buffer, Integer>> bufferAndIndexes, long expectedBytes) throws IOException { if (bufferAndIndexes.isEmpty()) { return; } ByteBuffer[] bufferWithHeaders = generateBufferWithHeaders(bufferAndIndexes); BufferReaderWrit...
3.26
flink_ProducerMergedPartitionFileWriter_flush_rdh
// ------------------------------------------------------------------------ // Internal Methods // ------------------------------------------------------------------------ /** * Called in single-threaded ioExecutor. Order is guaranteed. */private void flush(List<SubpartitionBufferContext> ...
3.26
flink_PageSizeUtil_getSystemPageSize_rdh
/** * Tries to get the system page size. If the page size cannot be determined, this returns -1. * * <p>This internally relies on the presence of "unsafe" and the resolution via some Netty * utilities. */ public static int getSystemPageSize() { try {return PageSizeUtilInternal.getSystemPageSize(); } catch...
3.26
flink_PageSizeUtil_getSystemPageSizeOrDefault_rdh
/** * Tries to get the system page size. If the page size cannot be determined, this returns the * {@link #DEFAULT_PAGE_SIZE}. */ public static int getSystemPageSizeOrDefault() { final int pageSize = getSystemPageSize(); return pageSize == PAGE_SIZE_UNKNOWN ? DEFAULT_PAGE_SIZE : pageSize; }
3.26
flink_PageSizeUtil_getSystemPageSizeOrConservativeMultiple_rdh
/** * Tries to get the system page size. If the page size cannot be determined, this returns the * {@link #CONSERVATIVE_PAGE_SIZE_MULTIPLE}. */ public static int getSystemPageSizeOrConservativeMultiple() { final int pageSize = getSystemPageSize(); return pageSize == PAGE_SIZE_UNKNOWN ? CONSERVATI...
3.26
flink_PojoFieldUtils_writeField_rdh
/** * Writes a field to the given {@link DataOutputView}. * * <p>This write method avoids Java serialization, by writing only the classname of the field's * declaring class and the field name. The written field can be read using {@link #readField(DataInputView, ClassLoader)}. * * @param out * the output view t...
3.26
flink_PojoFieldUtils_readField_rdh
/** * Reads a field from the given {@link DataInputView}. * * <p>This read methods avoids Java serialization, by reading the classname of the field's * declaring class and dynamically loading it. The field is also read by field name and obtained * via reflection. * * @param in * the input view to read from. ...
3.26
flink_PojoFieldUtils_getField_rdh
/** * Finds a field by name from its declaring class. This also searches for the field in super * classes. * * @param fieldName * the name of the field to find. * @param declaringClass * the declaring class of the field. * @return the field. */ @Nullable static Field getField(String fieldName, Class<?> dec...
3.26
flink_AbstractStreamingJoinOperator_of_rdh
/** * Creates an {@link AssociatedRecords} which represents the records associated to the input * row. */ public static AssociatedRecords of(RowData input, boolean inputIsLeft, JoinRecordStateView otherSideStateView, JoinCondition condition) throws Exception { List<OuterRecord> associations...
3.26
flink_AbstractStreamingJoinOperator_getRecords_rdh
/** * Gets the iterable of records. This is usually be called when the {@link AssociatedRecords} is from inner side. */ public Iterable<RowData> getRecords() { return new RecordsIterable(records); }
3.26
flink_SideOutputDataStream_cache_rdh
/** * Caches the intermediate result of the transformation. Only support bounded streams and * currently only block mode is supported. The cache is generated lazily at the first time the * intermediate result is computed. The cache will be clear when {@link CachedDataStream#invalidate()} called or the {@link StreamE...
3.26
flink_AbstractStreamOperator_m2_rdh
// ------------------------------------------------------------------------ // Watermark handling // ------------------------------------------------------------------------ /** * Returns a {@link InternalTimerService} that can be used to query current processing time and * event time and to set timers. An operator c...
3.26
flink_AbstractStreamOperator_initializeState_rdh
/** * Stream operators with state which can be restored need to override this hook method. * * @param context * context that allows to register different states. */ @Override public void initializeState(StateInitializationContext context) throws Exception { }
3.26
flink_AbstractStreamOperator_isUsingCustomRawKeyedState_rdh
/** * Indicates whether or not implementations of this class is writing to the raw keyed state * streams on snapshots, using {@link #snapshotState(StateSnapshotContext)}. If yes, subclasses * should override this method to return {@code true}. * * <p>Subclasses need to explicitly indicate the use of raw keyed stat...
3.26
flink_AbstractStreamOperator_snapshotState_rdh
/** * Stream operators with state, which want to participate in a snapshot need to override this * hook method. * * @param context * context that provides information and means required for taking a snapshot */@Override public void snapshotState(StateSnapshotContext context) throws Exception { }
3.26
flink_AbstractStreamOperator_getPartitionedState_rdh
/** * Creates a partitioned state handle, using the state backend configured for this task. * * @throws IllegalStateException * Thrown, if the key/value state was already initialized. * @throws Exception * Thrown, if the state backend cannot create the key/value state. */ protected <S extends State, N> S get...
3.26
flink_AbstractStreamOperator_getExecutionConfig_rdh
// ------------------------------------------------------------------------ // Properties and Services // ------------------------------------------------------------------------ /** * Gets the execution config defined on the execution environment of the job to which this * operator belongs. * * @return The job's e...
3.26
flink_AbstractStreamOperator_m1_rdh
// ------------------------------------------------------------------------ // Metrics // ------------------------------------------------------------------------ // ------- One input stream public void m1(LatencyMarker latencyMarker) throws Exception { reportOrForwardLatencyMarker(latencyMarker); }
3.26
flink_AbstractStreamOperator_getRuntimeContext_rdh
/** * Returns a context that allows the operator to query information about the execution and also * to interact with systems such as broadcast variables and managed state. This also allows to * register timers. */@VisibleForTesting public StreamingRuntimeContext getRuntimeContext() { return runtimeContext; }
3.26
flink_AbstractStreamOperator_setup_rdh
// ------------------------------------------------------------------------ // Life Cycle // ------------------------------------------------------------------------ @Override public void setup(StreamTask<?, ?> containingTask, StreamConfig config, Output<StreamRecord<OUT>> output) { final Environment environment =...
3.26
flink_AbstractStreamOperator_open_rdh
/** * This method is called immediately before any elements are processed, it should contain the * operator's initialization logic, e.g. state initialization. * * <p>The default implementation does nothing. * * @throws Exception * An exception in this method causes the operator to fail. */ @Override public vo...
3.26
flink_Tuple14_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_Tuple14_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_Tuple14_copy_rdh
/** * Shallow tuple copy. * * @return A new Tuple with the same fields as this. */ @Override @SuppressWarnings("unchecked") public Tuple14<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> copy() { return new Tuple14<>(this.f0, this.f1, this.f2, this.f3, this.f4, this.f5, this.f6, this.f7, this.f...
3.26
flink_Tuple14_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 Tuple14)) { return false; } @SuppressWarnings("ra...
3.26
flink_HiveParserDefaultGraphWalker_dispatchAndReturn_rdh
// Returns dispatch result public <T> T dispatchAndReturn(Node nd, Stack<Node> ndStack) throws SemanticException { Object[] nodeOutputs = null; if (nd.getChildren() != null) { nodeOutputs = new Object[nd.getChildren().size()]; int i = 0; for (Node child : nd.getChildren()) { ...
3.26
flink_HiveParserDefaultGraphWalker_startWalking_rdh
// starting point for walking. public void startWalking(Collection<Node> startNodes, HashMap<Node, Object> nodeOutput) throws SemanticException { toWalk.addAll(startNodes); while (toWalk.size() > 0) { Node nd = toWalk.remove(0); walk(nd); // Some walkers extending DefaultGraphWalke...
3.26
flink_HiveParserDefaultGraphWalker_walk_rdh
// walk the current operator and its descendants. protected void walk(Node nd) throws SemanticException { // Push the node in the stack opStack.push(nd); // While there are still nodes to dispatch... while (!opStack.empty()) { Node node = opStack.peek(); if ((node.getChildren() == null) ...
3.26
flink_HiveParserDefaultGraphWalker_dispatch_rdh
// Dispatch the current operator. public void dispatch(Node nd, Stack<Node> ndStack) throws SemanticException { dispatchAndReturn(nd, ndStack); }
3.26
flink_TaskTracker_add_rdh
/** * * @return true, if this checkpoint id need be committed. */ public boolean add(long checkpointId, int task) { Set<Integer> tasks = notifiedTasks.computeIfAbsent(checkpointId, k -> new HashSet<>()); tasks.add(task); if (tasks.size() == numberOfTasks) { notifiedTasks.headMap(checkpointId, t...
3.26
flink_EndOfData_write_rdh
// ------------------------------------------------------------------------ // // These methods are inherited form the generic serialization of AbstractEvent // but would require the CheckpointBarrier to be mutable. Since all serialization // for events goes through the EventSerializer class, which has special seriali...
3.26
flink_EndOfData_equals_rdh
// ------------------------------------------------------------------------ @Override public boolean equals(Object o) { if (this == o) { return true;} if ((o == null) || (getClass() != o.getClass())) { return false; } EndOfData endOfData = ((EndOfData) (o)); return mode == endOfD...
3.26
flink_StreamSQLExample_main_rdh
// ************************************************************************* // PROGRAM // ************************************************************************* public static void main(String[] args) throws Exception { // set up the Java DataStream API final StreamExecutionEnvironment env = StreamExecutionE...
3.26
flink_PythonDriver_constructPythonCommands_rdh
/** * Constructs the Python commands which will be executed in python process. * * @param pythonDriverOptions * parsed Python command options */ static List<String> constructPythonCommands(final PythonDriverOptions pythonDriverOptions) { final List<String> commands = new ArrayList<>(); // disable output buffer...
3.26
flink_FlinkSqlOperatorTable_instance_rdh
/** * Returns the Flink operator table, creating it if necessary. */ public static synchronized FlinkSqlOperatorTable instance(boolean isBatchMode) { FlinkSqlOperatorTable instance = cachedInstances.get(isBatchMode); if (instance == null) { // Creates and initializes the standard operator table. ...
3.26
flink_SqlGatewayServiceImpl_getSession_rdh
// -------------------------------------------------------------------------------------------- @VisibleForTesting public Session getSession(SessionHandle sessionHandle) { return sessionManager.getSession(sessionHandle); }
3.26
flink_DeclarativeSlotPoolService_onReleaseTaskManager_rdh
/** * This method is called when a TaskManager is released. It can be overridden by subclasses. * * @param previouslyFulfilledRequirement * previouslyFulfilledRequirement by the released * TaskManager */ protected void onReleaseTaskManager(ResourceCounter previouslyFulfilledRequirement) { }
3.26
flink_DeclarativeSlotPoolService_onClose_rdh
/** * This method is called when the slot pool service is closed. It can be overridden by * subclasses. */ protected void onClose() { }
3.26
flink_DeclarativeSlotPoolService_onFailAllocation_rdh
/** * This method is called when an allocation fails. It can be overridden by subclasses. * * @param previouslyFulfilledRequirements * previouslyFulfilledRequirements by the failed * allocation */ protected void onFailAllocation(ResourceCounter previouslyFulfilledRequirements) { }
3.26
flink_DataStreamSinkProvider_getParallelism_rdh
/** * {@inheritDoc } * * <p>Note: If a custom parallelism is returned and {@link #consumeDataStream(ProviderContext, * DataStream)} applies multiple transformations, make sure to set the same custom parallelism * to each operator to not mess up the changelog. */ @Override default Optional<Integer> getParallelism(...
3.26
flink_DataStreamSinkProvider_m0_rdh
/** * Consumes the given Java {@link DataStream} and returns the sink transformation {@link DataStreamSink}. * * <p>Note: If the {@link CompiledPlan} feature should be supported, this method MUST set a * unique identifier for each transformation/operator in the data stream. This enables stateful * Flink version up...
3.26
flink_AbstractCsvInputFormat_findNextLineStartOffset_rdh
/** * Find next legal line separator to return next offset (first byte offset of next line). * * <p>NOTE: Because of the particularity of UTF-8 encoding, we can determine the number of bytes * of this character only by comparing the first byte, so we do not need to traverse M*N in * comparison. */ private long fi...
3.26
flink_HiveWriterFactory_createRecordWriter_rdh
/** * Create a {@link RecordWriter} from path. */ public RecordWriter createRecordWriter(Path path) { try { checkInitialize(); JobConf conf = new JobConf(confWrapper.conf()); if (isCompressed) {String codecStr = conf.get(COMPRESSINTERMEDIATECODEC.varname); if (!StringUtils.i...
3.26
flink_ListAggWsWithRetractAggFunction_getArgumentDataTypes_rdh
// -------------------------------------------------------------------------------------------- // Planning // -------------------------------------------------------------------------------------------- @Override public List<DataType> getArgumentDataTypes() { return Arrays.asList(DataTypes.STRING().bridgedTo(Strin...
3.26
flink_DefaultGroupCache_onCacheRemoval_rdh
/** * Removal listener that remove the cache key of this group . * * @param removalNotification * of removed element. */ private void onCacheRemoval(RemovalNotification<CacheKey<G, K>, V> removalNotification) { CacheKey<G, K> cacheKey = removalNotification.getKey(); V value = removalNotification.getValue...
3.26
flink_MetricDumpSerialization_deserialize_rdh
/** * De-serializes metrics from the given byte array and returns them as a list of {@link MetricDump}. * * @param data * serialized metrics * @return A list containing the deserialized metrics. */public List<MetricDump> deseria...
3.26
flink_NormalizedKeySorter_compare_rdh
// ------------------------------------------------------------------------- // Indexed Sorting // ------------------------------------------------------------------------- @Override public int compare(int i, int j) { final int v6 = i / this.indexEntriesPerSegment; final int segmentOffsetI = (i % this.indexEntriesPerSe...
3.26
flink_NormalizedKeySorter_writeToOutput_rdh
/** * Writes a subset of the records in this buffer in their logical order to the given output. * * @param output * The output view to write the records to. * @param start * The logical start position of the subset. * @param num * The number of elements to write. * @throws IOException * Thrown, if an ...
3.26
flink_NormalizedKeySorter_isEmpty_rdh
/** * Checks whether the buffer is empty. * * @return True, if no record is contained, false otherwise. */ @Override public boolean isEmpty() { return this.numRecords == 0; }
3.26
flink_NormalizedKeySorter_write_rdh
/** * Writes a given record to this sort buffer. The written record will be appended and take the * last logical position. * * @param record * The record to be written. * @return True, if the record was successfully written, false, if the sort buffer was full. * @throws IOException * Thrown, if an error occ...
3.26
flink_NormalizedKeySorter_getRecord_rdh
// ------------------------------------------------------------------------- // Retrieving and Writing // ------------------------------------------------------------------------- @Override public T getRecord(int logicalPosition) throws IOException { return getRecordFromBuffer(readPointer(logicalPosition)); }
3.26
flink_NormalizedKeySorter_getIterator_rdh
// ------------------------------------------------------------------------- /** * Gets an iterator over all records in this buffer in their logical order. * * @return An iterator returning the records in their logical order. */ @Override public final MutableObjectIterator<T> getIterator() { return new MutableO...
3.26
flink_NormalizedKeySorter_readPointer_rdh
// ------------------------------------------------------------------------ // Access Utilities // ------------------------------------------------------------------------ private long readPointer(int logicalPosition) { if ((logicalPosition < 0) || (logicalPosition >= this.numRecords)) { throw new IndexOutOfBoundsE...
3.26
flink_NormalizedKeySorter_reset_rdh
// ------------------------------------------------------------------------- // Memory Segment // ------------------------------------------------------------------------- /** * Resets the sort buffer back to the state where it is empty. All contained data is discarded. */ @Override public void reset() { // reset all...
3.26
flink_SqlCreateTableConverter_convertCreateTableAS_rdh
/** * Convert the {@link SqlCreateTableAs} node. */ Operation convertCreateTableAS(FlinkPlannerImpl flinkPlanner, SqlCreateTableAs sqlCreateTableAs) { UnresolvedIdentifier unresolvedIdentifier = UnresolvedIdentifier.of(sqlCreateTableAs.fullTableName()); ObjectIdentifier identifier = catalogManager.qualifyIde...
3.26
flink_SqlCreateTableConverter_convertCreateTable_rdh
/** * Convert the {@link SqlCreateTable} node. */ Operation convertCreateTable(SqlCreateTable sqlCreateTable) { CatalogTable catalogTable = createCatalogTable(sqlCreateTable); UnresolvedIdentifier unresolvedIdentifier = UnresolvedIdentifier.of(sqlCreateTable.fullTableName()); ObjectIdentifier identi...
3.26
flink_InternalTimeServiceManagerImpl_snapshotToRawKeyedState_rdh
// //////////////// Fault Tolerance Methods /////////////////// @Override public void snapshotToRawKeyedState(KeyedStateCheckpointOutputStream out, String operatorName) throws Exception { try { KeyGroupsList allKeyGroups = out.getKeyGroupList(); for (int keyGroupIdx : allKeyGroups) { ...
3.26
flink_InternalTimeServiceManagerImpl_numProcessingTimeTimers_rdh
// ////////////////// Methods used ONLY IN TESTS //////////////////// @VisibleForTestingpublic int numProcessingTimeTimers() { int count = 0; for (InternalTimerServiceImpl<?, ?> timerService : timerServices.values()) { count += timerService.numProcessingTimeTimers(); } return count;}
3.26
flink_InternalTimeServiceManagerImpl_create_rdh
/** * A factory method for creating the {@link InternalTimeServiceManagerImpl}. * * <p><b>IMPORTANT:</b> Keep in sync with {@link InternalTimeServiceManager.Provider}. */ public static <K> InternalTimeServiceManagerImpl<K> create(CheckpointableKeyedStateBackend<K> keyedStateBackend, ClassLoader userClassloader, Key...
3.26
flink_RowDataVectorizer_convert_rdh
/** * Converting ArrayData to RowData for calling {@link RowDataVectorizer#setColumn(int, * ColumnVector, LogicalType, RowData, int)} recursively with array. * * @param arrayData * input ArrayData. * @param arrayFieldType * LogicalType of input ArrayData. * @return RowData. */ private static RowData conver...
3.26
flink_RemoteRpcInvocation_writeObject_rdh
// ------------------------------------------------------------------- // Serialization methods // ------------------------------------------------------------------- private void writeObject(ObjectOutputStream oos) throws IOException {// Translate it to byte array so that we can deserialize classes which cannot be f...
3.26
flink_TestStreamEnvironment_unsetAsContext_rdh
/** * Resets the streaming context environment to null. */ public static void unsetAsContext() { resetContextEnvironment(); }
3.26
flink_TestStreamEnvironment_randomizeConfiguration_rdh
/** * This is the place for randomization the configuration that relates to DataStream API such as * ExecutionConf, CheckpointConf, StreamExecutionEnvironment. List of the configurations can be * found here {@link StreamExecutionEnvironment#configure(ReadableConfig, ClassLoader)}. All * other configuration should b...
3.26
flink_TestStreamEnvironment_setAsContext_rdh
/** * Sets the streaming context environment to a TestStreamEnvironment that runs its programs on * the given cluster with the given default parallelism. * * @param miniCluster * The MiniCluster to execute jobs on. * @param parallelism * The default parallelism for the test programs. */ public static void s...
3.26
flink_MissingTypeInfo_isBasicType_rdh
// -------------------------------------------------------------------------------------------- @Override public boolean isBasicType() { throw new UnsupportedOperationException("The missing type information cannot be used as a type information."); }
3.26
flink_MissingTypeInfo_getFunctionName_rdh
// -------------------------------------------------------------------------------------------- public String getFunctionName() { return functionName; }
3.26
flink_InputGate_getPriorityEventAvailableFuture_rdh
/** * Notifies when a priority event has been enqueued. If this future is queried from task thread, * it is guaranteed that a priority event is available and retrieved through {@link #getNext()}. */ public CompletableFuture<?> getPriorityEventAvailableFuture() { return f0.getAvailableFuture(); }
3.26
flink_InputGate_getChannelInfos_rdh
/** * Returns the channel infos of this gate. */ public List<InputChannelInfo> getChannelInfos() { return IntStream.range(0, getNumberOfInputChannels()).mapToObj(index -> getChannel(index).getChannelInfo()).collect(Collectors.toList()); }
3.26
flink_CoGroupOperator_sortSecondGroup_rdh
/** * Sorts Pojo or {@link org.apache.flink.api.java.tuple.Tuple} elements within a * group in the second input on the specified field in the specified {@link Order}. * * <p>Groups can be sorted by multiple fields by chaining {@link #sortSecondGroup(String, Order)} calls. * * @param fieldExpression * The expre...
3.26
flink_CoGroupOperator_with_rdh
/** * Finalizes a CoGroup transformation by applying a {@link org.apache.flink.api.common.functions.RichCoGroupFunction} to groups of elements * with identical keys. * * <p>Each CoGroupFunction call returns an arbitr...
3.26
flink_CoGroupOperator_sortFirstGroup_rdh
/** * Sorts Pojo or {@link org.apache.flink.api.java.tuple.Tuple} elements within a * group in the first input on the specified field in the specified {@link Order}. * * <p>Groups can be sorted by multiple fields by chaining {@link #sortFirstGroup(String, Order)} calls. * * @param fieldExpression * The express...
3.26
flink_CoGroupOperator_createCoGroupOperator_rdh
/** * Intermediate step of a CoGroup transformation. * * <p>To continue the CoGroup transformation, provide a {@link org.apache.flink.api.common.functions.RichCoGroupFunction} by calling {@link org.apache.flink.api.java.operators.CoGroupOperator.CoGroupOperatorSets.CoGroupOperatorSetsPredicate.CoGroupOperatorWithout...
3.26
flink_CoGroupOperator_withPartitioner_rdh
/** * Sets a custom partitioner for the CoGroup operation. The partitioner will be * called on the join keys to determine the partition a key should be assigned to. * The partitioner is evaluated on both inputs in the same way. * * <p>NOTE: A custom partitioner can only be used with single-field CoGroup keys, * n...
3.26
flink_CoGroupOperator_getPartitioner_rdh
/** * Gets the custom partitioner used by this join, or {@code null}, if none is set. * * @return The custom partitioner used by this join; */ public Partitioner<?> getPartitioner() {return customPartitioner; }
3.26
flink_NullableSerializer_wrapIfNullIsNotSupported_rdh
/** * This method tries to serialize {@code null} value with the {@code originalSerializer} and * wraps it in case of {@link NullPointerException}, otherwise it returns the {@code originalSerializer}. * * @param originalSerializer * serializer to wrap and add {@code null} support * @param padNullValueIfFixedLen...
3.26
flink_NullableSerializer_checkIfNullSupported_rdh
/** * This method checks if {@code serializer} supports {@code null} value. * * @param serializer * serializer to check */ public static <T> boolean checkIfNullSupported(@Nonnull TypeSerializer<T> serializer) { int length = (serializer.getLength() > 0) ? serializer.getLength() : 1; DataOutputSerializer d...
3.26
flink_NullableSerializer_wrap_rdh
/** * This method wraps the {@code originalSerializer} with the {@code NullableSerializer} if not * already wrapped. * * @param originalSerializer * serializer to wrap and add {@code null} support * @param padNullValueIfFixedLen * pad null value to preserve the fixed length of original * serializer * @re...
3.26
flink_BlobServerConnection_put_rdh
/** * Handles an incoming PUT request from a BLOB client. * * @param inputStream * The input stream to read incoming data from * @param outputStream * The output stream to send data back to the client * @param buf * An auxiliary buffer for data serialization/deserialization * @throws IOException * thr...
3.26
flink_BlobServerConnection_close_rdh
/** * Closes the connection socket and lets the thread exit. */ public void close() { closeSilently(f0, LOG); interrupt(); }
3.26
flink_BlobServerConnection_get_rdh
// -------------------------------------------------------------------------------------------- // Actions // -------------------------------------------------------------------------------------------- /** * Handles an incoming GET request from a BLOB client. * * <p>Transient BLOB files are deleted after a successf...
3.26
flink_BlobServerConnection_run_rdh
// -------------------------------------------------------------------------------------------- // Connection / Thread methods // -------------------------------------------------------------------------------------------- /** * Main connection work method. Accepts requests until the other side closes the connection. ...
3.26
flink_BlobServerConnection_readFileFully_rdh
/** * Reads a full file from <tt>inputStream</tt> into <tt>incomingFile</tt> returning its * checksum. * * @param inputStream * stream to read from * @param incomingFile * file to write to * @param buf * An auxiliary buffer for data serialization/deserialization * @return the received file's content has...
3.26