name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_CliResultView_increaseRefreshInterval_rdh
// -------------------------------------------------------------------------------------------- protected void increaseRefreshInterval() { refreshInterval = Math.min(REFRESH_INTERVALS.size() - 1, refreshInterval + 1); // reset view resetAllParts(); synchronized(refreshThread) { refreshThread.not...
3.26
flink_Tuple10_copy_rdh
/** * Shallow tuple copy. * * @return A new Tuple with the same fields as this. */ @Override @SuppressWarnings("unchecked") public Tuple10<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> copy() { return new Tuple10<>(this.f0, this.f1, this.f2, this.f3, this.f4, this.f5, this.f6, this.f7, this.f8, this.f9); } /** * Crea...
3.26
flink_Tuple10_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_Tuple10_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 Tuple10)) { return false; ...
3.26
flink_Tuple10_toString_rdh
/** * Creates a string representation of the tuple in the form (f0, f1, f2, f3, f4, f5, f6, f7, f8, * f9), where the individual fields are the value returned by calling {@link Object#toString} on * that field. * * @return The string representation of the tuple. */ @Override public String toString() { return (...
3.26
flink_ParquetSchemaConverter_is32BitDecimal_rdh
// From DecimalDataUtils public static boolean is32BitDecimal(int precision) { return precision <= 9; }
3.26
flink_ClientUtils_reportHeartbeatPeriodically_rdh
/** * The client reports the heartbeat to the dispatcher for aliveness. * * @param jobClient * The job client. * @param interval * The heartbeat interval. * @param timeout * The heartbeat timeout. * @return The ScheduledExecutorService which reports heartbeat periodically. */ public static ScheduledExec...
3.26
flink_ClientUtils_waitUntilJobInitializationFinished_rdh
/** * This method blocks until the job status is not INITIALIZING anymore. * * @param jobStatusSupplier * supplier returning the job status. * @param jobResultSupplier * supplier returning the job result. This will only be called if the * job reaches the FAILED state. * @throws JobInitializationException ...
3.26
flink_FieldList_addField_rdh
// -------------------------------------------------------------------------------------------- @Override public FieldList addField(Integer fieldID) { if (fieldID == null) { throw new IllegalArgumentException("Field ID must not be null."); } if (size() == 0) { return new FieldList(fieldID);...
3.26
flink_FieldList_getDescriptionPrefix_rdh
// -------------------------------------------------------------------------------------------- @Override protected String getDescriptionPrefix() { return "["; }
3.26
flink_FieldList_isValidSubset_rdh
// -------------------------------------------------------------------------------------------- @Override public boolean isValidSubset(FieldSet set) { if (set instanceof FieldList) { return isValidSubset(((FieldList) (set))); } else { return false; } }
3.26
flink_EncodingFormat_listWritableMetadata_rdh
/** * Returns the map of metadata keys and their corresponding data types that can be consumed by * this format for writing. By default, this method returns an empty map. * * <p>Metadata columns add additional columns to the table's schema. An encoding format is * responsible to accept requested metadata columns a...
3.26
flink_HiveParserCalcitePlanner_genJoinLogicalPlan_rdh
// Generate Join Logical Plan Relnode by walking through the join AST. private RelNode genJoinLogicalPlan(HiveParserASTNode joinParseTree, Map<String, RelNode> aliasToRel) throws SemanticException { RelNode leftRel = null; RelNode rightRel = null; JoinType hiveJoinType; if (joinParseTree.getToken().getType() == HiveAST...
3.26
flink_HiveParserCalcitePlanner_convertNullLiteral_rdh
// flink doesn't support type NULL, so we need to convert such literals private RexNode convertNullLiteral(RexNode rexNode) { if (rexNode instanceof RexLiteral) { RexLiteral literal = ((RexLiteral) (rexNode)); if (literal.isNull() && (literal.getTypeName() == SqlTypeName.NULL)) { retur...
3.26
flink_HiveParserCalcitePlanner_genLogicalPlan_rdh
// Given an AST, generate and return the RelNode plan. Returns null if nothing needs to be done. public RelNode genLogicalPlan(HiveParserASTNode ast) throws SemanticException { LOG.info("Starting generating logical plan"); HiveParserPreCboCtx cboCtx = new HiveParserPreCboCtx(); // change the location of pos...
3.26
flink_HiveParserCalcitePlanner_genGBLogicalPlan_rdh
// Generate GB plan. private RelNode genGBLogicalPlan(HiveParserQB qb, RelNode srcRel) throws SemanticException { RelNode v152 = null; HiveParserQBParseInfo qbp = qb.getParseInfo(); // 1. Gather GB Expressions (AST) (GB + Aggregations) // NOTE: Multi Insert is not supported String detsClauseName = q...
3.26
flink_HiveParserCalcitePlanner_genDistSortBy_rdh
// Generate plan for sort by, cluster by and distribute by. This is basically same as generating // order by plan. // Should refactor to combine them. private Pair<RelNode, RelNode> genDistSortBy(HiveParserQB qb, RelNode srcRel, boolean outermostOB) throws SemanticException { RelNode res = null; RelNode origin...
3.26
flink_HiveParserCalcitePlanner_genSelectLogicalPlan_rdh
// NOTE: there can only be one select clause since we don't handle multi destination insert. private RelNode genSelectLogicalPlan(HiveParserQB qb, RelNode srcRel, RelNode starSrcRel, Map<String, Integer> outerNameToPos, HiveParserRowResolver outerRR) throws SemanticException { // 0. Generate a Select Node for Wind...
3.26
flink_StateMachineExample_main_rdh
/** * Main entry point for the program. * * @param args * The command line arguments. */ public static void main(String[] args) throws Exception { // ---- print some usage help ---- System.out.println("Usage with built-in data generator: StateMachineExample [--error-rate <probability-of-invalid-transitio...
3.26
flink_StateMachineExample_rpsFromSleep_rdh
// Used for backwards compatibility to convert legacy 'sleep' parameter to records per second. private static double rpsFromSleep(int sleep, int parallelism) { return (1000.0 / sleep) * parallelism; }
3.26
flink_SocketStreamIterator_getPort_rdh
// ------------------------------------------------------------------------ // properties // ------------------------------------------------------------------------ /** * Returns the port on which the iterator is getting the data. (Used internally.) * * @return The port */ public int getPort() { return f0.get...
3.26
flink_SocketStreamIterator_hasNext_rdh
// ------------------------------------------------------------------------ // iterator semantics // ------------------------------------------------------------------------ /** * Returns true if the DataStream has more elements. (Note: blocks if there will be more * elements, but they are not available yet.) * * @...
3.26
flink_SocketStreamIterator_next_rdh
/** * Returns the next element of the DataStream. (Blocks if it is not available yet.) * * @return The element * @throws NoSuchElementException * if the stream has already ended */ @Override public T next() { if (hasNext()) { T current = next; next = null; return current; } else...
3.26
flink_ClosureCleaner_clean_rdh
/** * Tries to clean the closure of the given object, if the object is a non-static inner class. * * @param func * The object whose closure should be cleaned. * @param level * the clean up level. * @param checkSerializable * Flag to indicate whether serializability should be checked after the * closure...
3.26
flink_HardwareDescription_extractFromSystem_rdh
// -------------------------------------------------------------------------------------------- // Factory // -------------------------------------------------------------------------------------------- public static HardwareDescription extractFromSystem(long managedMemory) { final int numberOfCPUCores = Hardwar...
3.26
flink_HardwareDescription_getSizeOfPhysicalMemory_rdh
/** * Returns the size of physical memory in bytes available on the compute node. * * @return the size of physical memory in bytes available on the compute node */ public long getSizeOfPhysicalMemory() { return this.sizeOfPhysicalMemory; }
3.26
flink_HardwareDescription_getSizeOfManagedMemory_rdh
/** * Returns the size of the memory managed by the system for caching, hashing, sorting, ... * * @return The size of the memory managed by the system. */ public long getSizeOfManagedMemory() { return this.sizeOfManagedMemory; }
3.26
flink_HardwareDescription_equals_rdh
// -------------------------------------------------------------------------------------------- // Utils // -------------------------------------------------------------------------------------------- @Override public boolean equals(Object o) { if (this == o) { return true; ...
3.26
flink_HardwareDescription_getNumberOfCPUCores_rdh
/** * Returns the number of CPU cores available to the JVM on the compute node. * * @return the number of CPU cores available to the JVM on the compute node */ public int getNumberOfCPUCores() { return this.numberOfCPUCores; }
3.26
flink_AbstractRocksDBState_clear_rdh
// ------------------------------------------------------------------------ @Override public void clear() { try { backend.db.delete(columnFamily, writeOptions, serializeCurrentKeyWithGroupAndNamespace()); } catch (RocksDBException e) { throw new FlinkRuntimeException("Error while removing ent...
3.26
flink_LastValueWithRetractAggFunction_getArgumentDataTypes_rdh
// -------------------------------------------------------------------------------------------- // Planning // -------------------------------------------------------------------------------------------- @Override public List<DataType> getArgumentDataTypes() { return Collections.singletonList(valueDataType); }
3.26
flink_ReducingStateDescriptor_m0_rdh
/** * Returns the reduce function to be used for the reducing state. */ public ReduceFunction<T> m0() {return reduceFunction; }
3.26
flink_NoFetchingInput_require_rdh
/** * Require makes sure that at least required number of bytes are kept in the buffer. If not, * then it will load exactly the difference between required and currently available number of * bytes. Thus, it will only load the data which is required and never prefetch data. * * @param required * the number of b...
3.26
flink_PekkoRpcActor_start_rdh
// Internal state machine // --------------------------------------------------------------------------- default State start(PekkoRpcActor<?> pekkoRpcActor, ClassLoader flinkClassLoader) { throw new RpcInvalidStateException(invalidStateTransitionMessage(StartedState.f0)); }
3.26
flink_PekkoRpcActor_lookupRpcMethod_rdh
/** * Look up the rpc method on the given {@link RpcEndpoint} instance. * * @param methodName * Name of the method * @param parameterTypes * Parameter types of the method * @return Method of the rpc endpoint * @throws NoSuchMethodException * Thrown if the method with the given name and parameter types *...
3.26
flink_PekkoRpcActor_stop_rdh
/** * Stop the actor immediately. */ private void stop(RpcEndpointTerminationResult rpcEndpointTerminationResult) { if (rpcEndpointStopped.compareAndSet(false, true)) { ...
3.26
flink_PekkoRpcActor_envelopeSelfMessage_rdh
/** * Hook to envelope self messages. * * @param message * to envelope * @return enveloped message */ protected Object envelopeSelfMessage(Object message) { return message; }
3.26
flink_PekkoRpcActor_handleCallAsync_rdh
/** * Handle asynchronous {@link Callable}. This method simply executes the given {@link Callable} * in the context of the actor thread. * * @param callAsync * Call async message */ private void handleCallAsync(CallAsync callAsync) { try { Object result = runWithContextClassLoader(() -> callAsync.ge...
3.26
flink_PekkoRpcActor_handleRunAsync_rdh
/** * Handle asynchronous {@link Runnable}. This method simply executes the given {@link Runnable} * in the context of the actor thread. * * @param runAsync * Run async message */ private void handleRunAsync(RunAsync runAsync) { final long timeToRun = runAsync.getTimeNanos(); final long delayNanos; ...
3.26
flink_PekkoRpcActor_sendErrorIfSender_rdh
/** * Send throwable to sender if the sender is specified. * * @param throwable * to send to the sender */ protected void sendErrorIfSender(Throwable throwable) { if (!getSender().equals(ActorRef.noSender())) { getSender().tell(new Status.Failure(throwable), getSelf()); } }
3.26
flink_PekkoRpcActor_handleRpcInvocation_rdh
/** * Handle rpc invocations by looking up the rpc method on the rpc endpoint and calling this * method with the provided method arguments. If the method has a return value, it is returned * to the sender of the call. * * @param rpcInvocation ...
3.26
flink_MathUtils_roundUpToPowerOfTwo_rdh
/** * Round the given number to the next power of two. * * @param x * number to round * @return x rounded up to the next power of two */ public static int roundUpToPowerOfTwo(int x) { x = x - 1; x |= x >> 1; x |= x >> 2; x |= x >> 4;x |= x >> 8; x |= x >> 16; return x + 1; }
3.26
flink_MathUtils_isPowerOf2_rdh
/** * Checks whether the given value is a power of two. * * @param value * The value to check. * @return True, if the value is a power of two, false otherwise. */ public static boolean isPowerOf2(long value) { return (value & (value - 1)) == 0; }
3.26
flink_MathUtils_log2floor_rdh
/** * Computes the logarithm of the given value to the base of 2, rounded down. It corresponds to * the position of the highest non-zero bit. The position is counted, starting with 0 from the * least significant bit to the most significant bit. For example, <code>log2floor(16) = 4 * </code>, and <code>log2floor(10)...
3.26
flink_MathUtils_log2strict_rdh
/** * Computes the logarithm of the given value to the base of 2. This method throws an error, if * the given argument is not a power of 2. * * @param value * The value to compute the logarithm for. * @return The logarithm to the base of 2. * @throws ArithmeticException * Thrown, if the given value is zero....
3.26
flink_MathUtils_longToIntWithBitMixing_rdh
/** * Pseudo-randomly maps a long (64-bit) to an integer (32-bit) using some bit-mixing for better * distribution. * * @param in * the long (64-bit)input. * @return the bit-mixed int (32-bit) output */ public static int longToIntWithBitMixing(long in) { in = (in ^ (in >>> 30)) * 0xbf58476d1ce4e5b9L; ...
3.26
flink_MathUtils_murmurHash_rdh
/** * This function hashes an integer value. * * <p>It is crucial to use different hash functions to partition data across machines and the * internal partitioning of data structures. This hash function is intended for partitioning * across machines. * * @param code * The integer to be hashed. * @return The ...
3.26
flink_MathUtils_flipSignBit_rdh
/** * Flips the sign bit (most-significant-bit) of the input. * * @param in * the input value. * @return the input with a flipped sign bit (most-significant-bit). */ public static long flipSignBit(long in) { return in ^ Long.MIN_VALUE; }
3.26
flink_MathUtils_checkedDownCast_rdh
/** * Casts the given value to a 32 bit integer, if it can be safely done. If the cast would change * the numeric value, this method raises an exception. * * <p>This method is a protection in places where one expects to be able to safely case, but * where unexpected situations could make the cast unsafe and would ...
3.26
flink_MathUtils_jenkinsHash_rdh
/** * This function hashes an integer value. It is adapted from Bob Jenkins' website <a * href="http://www.burtleburtle.net/bob/hash/integer.html">http://www.burtleburtle.net/bob/hash/integer.html</a>. * The hash function has the <i>full avalanche</i> property, meaning that every bit of the value * to be hashed aff...
3.26
flink_MathUtils_divideRoundUp_rdh
/** * Divide and rounding up to integer. E.g., divideRoundUp(3, 2) returns 2, divideRoundUp(0, 3) * returns 0. Note that this method does not support negative values. * * @param dividend * value to be divided by the divisor * @param divisor * value by which the dividend is to be divided * @return the quotie...
3.26
flink_MathUtils_bitMix_rdh
/** * Bit-mixing for pseudo-randomization of integers (e.g., to guard against bad hash functions). * Implementation is from Murmur's 32 bit finalizer. * * @param in * the input value * @return the bit-mixed output value */ public static int bitMix(int in) { in ^= in >>> 16; in *= 0x85ebca6b; in ^= ...
3.26
flink_CollectSink_open_rdh
/** * Initialize the connection with the Socket in the server. * * @param openContext * the context. */@Override public void open(OpenContext openContext) throws Exception { try { client = new Socket(hostIp, port); outputStream = client.getOutputStream(); streamWriter = new DataOutputViewStreamWrapp...
3.26
flink_CollectSink_close_rdh
/** * Closes the connection with the Socket server. */ @Override public void close() throws Exception { try { if (outputStream != null) { outputStream.flush(); outputStream.close(); } // first regular attempt to cleanly close. Failing that will escalate ...
3.26
flink_HadoopFileSystem_getKindForScheme_rdh
/** * Gets the kind of the file system from its scheme. * * <p>Implementation note: Initially, especially within the Flink 1.3.x line (in order to not * break backwards compatibility), we must only label file systems as 'inconsistent' or as 'not * proper filesystems' if we are sure about it. Otherwise, we cause re...
3.26
flink_HadoopFileSystem_getWorkingDirectory_rdh
// ------------------------------------------------------------------------ // file system methods // ------------------------------------------------------------------------ @Override public Path getWorkingDirectory() { return new Path(this.fs.getWorkingDirectory().toUri()); }
3.26
flink_HadoopFileSystem_getHadoopFileSystem_rdh
/** * Gets the underlying Hadoop FileSystem. * * @return The underlying Hadoop FileSystem. */ public FileSystem getHadoopFileSystem() { return this.fs; }
3.26
flink_HadoopFileSystem_toHadoopPath_rdh
// ------------------------------------------------------------------------ // Utilities // ------------------------------------------------------------------------ public static Path toHadoopPath(Path path) { return new Path(path.toUri()); }
3.26
flink_TwoInputOperator_getInput2Type_rdh
/** * Gets the type information of the data type of the second input data set. This method returns * equivalent information as {@code getInput2().getType()}. * * @return The second input data type. */ public TypeInformation<IN2> getInput2Type() { return this.input2.getType(); }
3.26
flink_TwoInputOperator_getInput1_rdh
/** * Gets the data set that this operation uses as its first input. * * @return The data set that this operation uses as its first input. */ public DataSet<IN1> getInput1() { return this.input1; }
3.26
flink_DataStreamStateTTLTestProgram_setBackendWithCustomTTLTimeProvider_rdh
/** * Sets the state backend to a new {@link StubStateBackend} which has a {@link MonotonicTTLTimeProvider}. * * @param env * The {@link StreamExecutionEnvironment} of the job. */ private static void setBackendWithCustomTTLTimeProvider(StreamExecutionEnvironment env) { final MonotonicTTLTimeProvider ttlTimeP...
3.26
flink_OperatorCoordinatorCheckpoints_acknowledgeAllCoordinators_rdh
// ------------------------------------------------------------------------ private static void acknowledgeAllCoordinators(PendingCheckpoint checkpoint, Collection<CoordinatorSnapshot> snapshots) throws CheckpointException { for (final CoordinatorSnapshot snapshot : snapshots) {final PendingCheckpoint.TaskAcknowle...
3.26
flink_StatsSummary_getAverage_rdh
/** * Calculates the average over all seen values. * * @return Average over all seen values. */ public long getAverage() { if (count == 0) { return 0; } else { return sum / count; } }
3.26
flink_StatsSummary_m0_rdh
/** * Returns a snapshot of the current state. * * @return A snapshot of the current state. */ public StatsSummarySnapshot m0() { return new StatsSummarySnapshot(min, max, sum, count, histogram == null ? null : histogram.getStatistics()); }
3.26
flink_StatsSummary_add_rdh
/** * Adds the value to the stats if it is >= 0. * * @param value * Value to add for min/max/avg stats.. */ void add(long value) { if (value >= 0) { if (count > 0) { min = Math.min(min, value); max = Math.max(max, value); } else { min = value;...
3.26
flink_StatsSummary_getMinimum_rdh
/** * Returns the minimum seen value. * * @return The current minimum value. */ public long getMinimum() { return min; }
3.26
flink_StatsSummary_getCount_rdh
/** * Returns the count of all seen values. * * @return Count of all values. */ public long getCount() { return count; }
3.26
flink_OperationUtils_indent_rdh
/** * Increases indentation for description of string of child {@link Operation}. The input can * already contain indentation. This will increase all the indentations by one level. * * @param item * result of {@link Operation#asSummaryString()} * @return string with increased indent...
3.26
flink_OperationUtils_formatWithChildren_rdh
/** * Formats a Tree of {@link Operation} in a unified way. It prints all the parameters and adds * all children formatted and properly indented in the following lines. * * <p>The format is * * <pre>{@code <operationName>: [(key1: [value1], key2: [v1, v2])] * <child1> * <child2> * <child3>}</p...
3.26
flink_CheckpointedPosition_getOffset_rdh
/** * Gets the offset that the reader will seek to when restored from this checkpoint. */ public long getOffset() { return offset;}
3.26
flink_CheckpointedPosition_getRecordsAfterOffset_rdh
/** * Gets the records to skip after the offset. */ public long getRecordsAfterOffset() { return recordsAfterOffset; }
3.26
flink_CheckpointedPosition_equals_rdh
// ------------------------------------------------------------------------ @Override public boolean equals(Object o) { if (this == o) { return true; } if ((o == null) || (getClass() != o.getClass())) { return false; } final CheckpointedPosition that = ((CheckpointedPosition) (o)); ...
3.26
flink_LongValue_toString_rdh
/* (non-Javadoc) @see java.lang.Object#toString() */ @Override public String toString() { return String.valueOf(this.value); }
3.26
flink_LongValue_setValue_rdh
/** * Sets the value of the encapsulated long to the specified value. * * @param value * The new value of the encapsulated long. */ public void setValue(final long value) { this.value = value; }
3.26
flink_LongValue_read_rdh
// -------------------------------------------------------------------------------------------- @Override public void read(final DataInputView in) throws IOException { this.value = in.readLong(); }
3.26
flink_LongValue_compareTo_rdh
// -------------------------------------------------------------------------------------------- @Override public int compareTo(LongValue o) {final long other = o.value; return this.value < other ? -1 : this.value > other ? 1 : 0; }
3.26
flink_LongValue_getBinaryLength_rdh
// -------------------------------------------------------------------------------------------- @Override public int getBinaryLength() { return 8; }
3.26
flink_LongValue_getMaxNormalizedKeyLen_rdh
// -------------------------------------------------------------------------------------------- @Override public int getMaxNormalizedKeyLen() { return 8; }
3.26
flink_LongValue_equals_rdh
/* (non-Javadoc) @see java.lang.Object#equals(java.lang.Object) */ @Overridepublic boolean equals(final Object obj) { if (obj instanceof LongValue) { return ((LongValue) (obj)).value == this.value; } return false; }
3.26
flink_SkipListUtils_helpSetPrevNode_rdh
/** * Set the previous node of the given node at the given level. The level must be positive. * * @param node * the node. * @param prevNode * the previous node to set. * @param level * the level to find the next node. * @param spaceAllocator * the space allocator. */ static void helpSetPrevNode(long ...
3.26
flink_SkipListUtils_putValueData_rdh
/** * Puts the value data into value space. * * @param memorySegment * memory segment for value space. * @param offset * offset of value space in memory segment. * @param value * value data. */ public static void putValueData(MemorySegment memorySegment, int offset, byte[] value) { MemorySegment valueSe...
3.26
flink_SkipListUtils_buildLevelIndex_rdh
/** * Build the level index for the given node. * * @param node * the node. * @param level * level of the node. * @param keySegment * memory segment of the key in the node. * @param keyOffset * offset of the key in memory segment. * @param levelIndexHeader * the head level index. * @param spaceAl...
3.26
flink_SkipListUtils_helpGetNodeLatestVersion_rdh
/** * Return of the newest version of value for the node. * * @param node * the node. * @param spaceAllocator * the space allocator. */ static int helpGetNodeLatestVersion(long node, Allocator spaceAllocator) { Chunk chunk = spaceAllocator.getChunkById(SpaceUtils.getChunkIdByAddress(node)); int offsetInChu...
3.26
flink_SkipListUtils_getValuePointer_rdh
/** * Returns the value pointer. * * @param memorySegment * memory segment for key space. * @param offset * offset of key space in the memory segment. */ public static long getValuePointer(MemorySegment memorySegment, int offset) {return memorySegment.getLong(offset + VALUE_POINTER_OFFSET); }
3.26
flink_SkipListUtils_helpGetNextNode_rdh
/** * Return the next of the given node at the given level. * * @param node * the node to find the next node for. * @param level * the level to find the next node. * @param levelIndexHeader * the header of the level index. * @param spaceAllocator * the space allocator. * @return the pointer to the ne...
3.26
flink_SkipListUtils_getKeyLen_rdh
/** * Returns the length of the key. * * @param memorySegment * memory segment for key space. * @param offset * offset of key space in the memory segment. */ public static int getKeyLen(MemorySegment memorySegment, int offset) { return memorySegment.getInt(offset + KEY_LEN_OFFSET); }
3.26
flink_SkipListUtils_helpGetValuePointer_rdh
/** * Returns the value pointer of the node. * * @param node * the node. * @param spaceAllocator * the space allocator. */ static long helpGetValuePointer(long node, Allocator spaceAllocator) { Chunk chunk = spaceAllocator.getChunkById(SpaceUtils.getChunkIdByAddress(node));int offsetInChunk = SpaceUtils.ge...
3.26
flink_SkipListUtils_helpSetPrevAndNextNode_rdh
/** * Set the previous node and the next node of the given node at the given level. The level must * be positive. * * @param node * the node. * @param prevNode * the previous node to set. * @param nextNode * the next node to set. * @param level * the level to find the next node. * @param spaceAlloca...
3.26
flink_SkipListUtils_putNextIndexNode_rdh
/** * Puts next key pointer on the given index level to key space. * * @param memorySegment * memory segment for key space. * @param offset * offset of key space in the memory segment. * @param level * level of index. * @param nextKeyPointer * next key pointer on the given level. */ public static voi...
3.26
flink_SkipListUtils_removeLevelIndex_rdh
/** * Remove the level index for the node from the skip list. * * @param node * the node. * @param spaceAllocator * the space allocator. * @param levelIndexHeader * the head level index. */ static void removeLevelIndex(long node, Allocator spaceAllocator, LevelIndexHeader levelIndexHeader) { Chunk chunk...
3.26
flink_SkipListUtils_getPrevIndexNode_rdh
/** * Returns previous key pointer on the given index level. * * @param memorySegment * memory segment for key space. * @param offset * offset of key space in the memory segment. * @param totalLevel * the level of the node. * @param level * on which level to get the previous key pointer of the node. ...
3.26
flink_SkipListUtils_getKeyPointer_rdh
/** * Return the pointer to key space. * * @param memorySegment * memory segment for value space. * @param offset * offset of value space in memory segment. */ public static long getKeyPointer(MemorySegment memorySegment, int offset) { return memorySegment.getLong(offset + KEY_POINTER_OFFSET); }
3.26
flink_SkipListUtils_getLevel_rdh
/** * Returns the level of the node. * * @param memorySegment * memory segment for key space. * @param offset * offset of key space in the memory segment. */ public static int getLevel(MemorySegment memorySegment, int offset) { return memorySegment.getInt(offset + KEY_META_OFFSET) & BYTE_MASK; }
3.26
flink_SkipListUtils_getValueLen_rdh
/** * Return the length of value data. * * @param memorySegment * memory segment for value space. * @param offset * offset of value space in memory segment. */ public static int getValueLen(MemorySegment memorySegment, int offset) { return memorySegment.getInt(offset + VALUE_LEN_OFFSET); }
3.26
flink_SkipListUtils_putPrevIndexNode_rdh
/** * Puts previous key pointer on the given index level to key space. * * @param memorySegment * memory segment for key space. * @param offset * offset of key space in the memory segment. * @param totalLevel * top level of the key. * @param level * level of index. * @param prevKeyPointer * previo...
3.26
flink_SkipListUtils_getNextIndexNode_rdh
/** * Returns next key pointer on the given index level. * * @param memorySegment * memory segment for key space. * @param offset * offset of key space in the memory segment. * @param level * level of index. */ public static long getNextIndexNode(MemorySegment memorySegment, int offset, int level) { retu...
3.26
flink_SkipListUtils_getValueVersion_rdh
/** * Returns the version of value. * * @param memorySegment * memory segment for value space. * @param offset * offset of value space in memory segment. */ public static int getValueVersion(MemorySegment memorySegment, int offset) { return memorySegment.getInt(offset + VALUE_VERSION_OFFSET); }
3.26
flink_SkipListUtils_putNextKeyPointer_rdh
/** * Puts the next key pointer on level 0 to key space. * * @param memorySegment * memory segment for key space. * @param offset * offset of key space in the memory segment. * @param nextKeyPointer * next key pointer on level 0. */ public static void putNextKeyPointer(MemorySegment memorySegment, int of...
3.26
flink_SkipListUtils_getNextValuePointer_rdh
/** * Return the pointer to next value space. * * @param memorySegment * memory segment for value space. * @param offset * offset of value space in memory segment. */ public static long getNextValuePointer(MemorySegment memorySegment, int offset) { return memorySegment.getLong(offset + NEXT_VALUE_POINTER_OFF...
3.26
flink_SkipListUtils_helpGetValueVersion_rdh
/** * Returns the version of the value. * * @param valuePointer * the pointer to the value. * @param spaceAllocator * the space allocator. */ static int helpGetValueVersion(long valuePointer, Allocator spaceAllocator) { Chunk chunk = spaceAllocator.getChunkById(SpaceUtils.getChunkIdByAddress(valuePointer));...
3.26