name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_Configuration_removeConfig_rdh | /**
* Removes given config option from the configuration.
*
* @param configOption
* config option to remove
* @param <T>
* Type of the config option
* @return true is config has been removed, false otherwise
*/
public <T> boolean removeConfig(ConfigOption<T> configOption) {
synchronized(this.confData) {
... | 3.26 |
flink_Configuration_setFloat_rdh | /**
* Adds the given value to the configuration object. The main key of the config option will be
* used to map the value.
*
* @param key
* the option specifying the key to be added
* @param value
* the value of the key/value pair to be added
*/
@PublicEvolving
public void setFloat(ConfigOption<Float> key, ... | 3.26 |
flink_Configuration_getRawValueFromOption_rdh | /**
* This method will do the following steps to get the value of a config option:
*
* <p>1. get the value from {@link Configuration}. <br>
* 2. if key is not found, try to get the value with fallback keys from {@link Configuration}
* <br>
* 3. if no fallback keys are found, return {@link Optional#empty()}. <br>
... | 3.26 |
flink_Configuration_addAllToProperties_rdh | /**
* Adds all entries in this {@code Configuration} to the given {@link Properties}.
*/ public void addAllToProperties(Properties props) {
synchronized(this.confData) {
for (Map.Entry<String, Object> entry : this.confData.entrySet()) {
props.put(entry.getKey(), entry.getValue());
}
}
} | 3.26 |
flink_Configuration_setClass_rdh | /**
* Adds the given key/value pair to the configuration object. The class can be retrieved by
* invoking {@link #getClass(String, Class, ClassLoader)} if it is in the scope of the class
* loader on the caller.
*
* @param key
* The key of the pair to be added
* @param klazz
* The value of the pair to be add... | 3.26 |
flink_Configuration_getLong_rdh | /**
* Returns the value associated with the given config option as a long integer. If no value is
* mapped under any key of the option, it returns the specified default instead of the option's
* default value.
*
* @param configOption
* The configuration option
* @param overrideDefault
* The value to return ... | 3.26 |
flink_Configuration_getValue_rdh | /**
* Returns the value associated with the given config option as a string.
*
* @param configOption
* The configuration option
* @return the (default) value associated with the given config option
*/
@PublicEvolving
public String getValue(ConfigOption<?> configOption) {
return Optional.ofNullable(getRawValueFr... | 3.26 |
flink_Configuration_toMap_rdh | // --------------------------------------------------------------------------------------------
@Override
public Map<String, String> toMap() {
synchronized(this.confData) {
Map<String, String> ret = CollectionUtil.newHashMapWithExpectedSize(this.confData.size());
for (Map.Entry<String, Object> entry : confDat... | 3.26 |
flink_Configuration_setLong_rdh | /**
* Adds the given value to the configuration object. The main key of the config option will be
* used to map the value.
*
* @param key
* the option specifying the key to be added
* @param value
* the value of the key/value pair to be added
*/
@PublicEvolving
public void setLong(ConfigOption<Long> key, lo... | 3.26 |
flink_Configuration_containsKey_rdh | /**
* Checks whether there is an entry with the specified key.
*
* @param key
* key of entry
* @return true if the key is stored, false otherwise
*/
public boolean containsKey(String key) {
synchronized(this.confData) {
return this.confData.containsKey(key);
}
} | 3.26 |
flink_Configuration_setBytes_rdh | /**
* Adds the given byte array to the configuration object. If key is <code>null</code> then
* nothing is added.
*
* @param key
* The key under which the bytes are added.
* @param bytes
* The bytes to be added.
*/
public void setBytes(String key, byte[] bytes) {
setValueInternal(key, bytes);
} | 3.26 |
flink_Configuration_getDouble_rdh | /**
* Returns the value associated with the given config option as a {@code double}.
*
* @param configOption
* The configuration option
* @return the (default) value associated with the given config option
*/
@PublicEvolving
public double getDouble(ConfigOption<Double> configOption) {
return getOptional(configO... | 3.26 |
flink_Configuration_read_rdh | // --------------------------------------------------------------------------------------------
// Serialization
// --------------------------------------------------------------------------------------------
@Override
public void read(DataInputView in) throws IOException {
synchronized(this.confData) {
final int v23 =... | 3.26 |
flink_PojoComparator_accessField_rdh | /**
* This method is handling the IllegalAccess exceptions of Field.get()
*/
public final Object accessField(Field field, Object object) {
try {
object = field.get(object);
} catch (NullPointerException npex) {throw new NullKeyFieldException((("Unable to access field " + field) + " on object ")... | 3.26 |
flink_OrcShimV200_computeProjectionMask_rdh | /**
* Computes the ORC projection mask of the fields to include from the selected
* fields.rowOrcInputFormat.nextRecord(null).
*
* @return The ORC projection mask.
*/
public static boolean[] computeProjectionMask(TypeDescription schema, int[] selectedFields) {
// mask with all fields of the schema
boolean... | 3.26 |
flink_MetricGroup_addGroup_rdh | // Groups
// ------------------------------------------------------------------------
/**
* Creates a new MetricGroup and adds it to this groups sub-groups.
*
* @param name
* name of the group
* @return the created group
*/
default MetricGroup addGroup(int name) {
return addGroup(String.valueOf(name));
} | 3.26 |
flink_MetricGroup_gauge_rdh | /**
* Registers a new {@link org.apache.flink.metrics.Gauge} with Flink.
*
* @param name
* name of the gauge
* @param gauge
* gauge to register
* @param <T>
* return type of the gauge
* @return the given gauge
*/
default <T, G extends Gauge<T>> G gauge(int name, G gauge) {
return gauge(String.valueO... | 3.26 |
flink_MetricGroup_histogram_rdh | /**
* Registers a new {@link Histogram} with Flink.
*
* @param name
* name of the histogram
* @param histogram
* histogram to register
* @param <H>
* histogram type
* @return the registered histogram
*/
default <H extends Histogram> H histogram(int name, H histogram) {
return histogram(String.valueO... | 3.26 |
flink_MetricGroup_meter_rdh | /**
* Registers a new {@link Meter} with Flink.
*
* @param name
* name of the meter
* @param meter
* meter to register
* @param <M>
* meter type
* @return the registered meter
*/
default <M extends Meter> M meter(int name, M meter) {
return met... | 3.26 |
flink_MetricGroup_counter_rdh | /**
* Registers a {@link org.apache.flink.metrics.Counter} with Flink.
*
* @param name
* name of the counter
* @param counter
* counter to register
* @param <C>
* counter type
* @return the given counter
*/
default <C extends Counter> C counter(int name, C counter) {
return counter(String.valueOf(na... | 3.26 |
flink_FlinkUserCodeClassLoader_loadClassWithoutExceptionHandling_rdh | /**
* Same as {@link #loadClass(String, boolean)} but without exception handling.
*
* <p>Extending concrete class loaders should implement this instead of {@link #loadClass(String, boolean)}.
*/
protected Class<?> loadClassWithoutExceptionHandling(String name, boolean resolve) throws ClassNotFoundException {return ... | 3.26 |
flink_EmbeddedHaServices_getDispatcherLeaderService_rdh | // ------------------------------------------------------------------------
// internal
// ------------------------------------------------------------------------
EmbeddedLeaderService getDispatcherLeaderService() {
return dispatcherLeaderService;
} | 3.26 |
flink_EmbeddedHaServices_getResourceManagerLeaderRetriever_rdh | // ------------------------------------------------------------------------
// services
// ------------------------------------------------------------------------
@Override
public LeaderRetrievalService getResourceManagerLeaderRetriever() {
return resourceManagerLeaderService.createLeaderRetrievalService();
} | 3.26 |
flink_GeneratedClass_compile_rdh | /**
* Compiles the generated code, the compiled class will be cached in the {@link GeneratedClass}.
*/
public Class<T> compile(ClassLoader classLoader) {
if (compiledClass == null) {
// cache the compiled class
try {
// fir... | 3.26 |
flink_GeneratedClass_newInstance_rdh | /**
* Create a new instance of this generated class.
*/
public T newInstance(ClassLoader classLoader) {
try {
return // Because Constructor.newInstance(Object... initargs), we need to load
// references into a new Object[], otherwise it cannot be compiled.
compile(classLoader).getConstruct... | 3.26 |
flink_DefaultCheckpointPlan_checkNoPartlyOperatorsFinishedVertexUsedUnionListState_rdh | /**
* If a job vertex using {@code UnionListState} has all the tasks in RUNNING state, but part of
* the tasks have reported that the operators are finished, the checkpoint would be aborted.
* This is to force the fast tasks wait for the slow tasks so that their final checkpoints would
* be the same one, otherwise ... | 3.26 |
flink_DefaultCheckpointPlan_checkNoPartlyFinishedVertexUsedUnionListState_rdh | /**
* If a job vertex using {@code UnionListState} has part of tasks FINISHED where others are
* still in RUNNING state, the checkpoint would be aborted since it might cause incomplete
* {@code UnionListState}.
*/
private void checkNoPartlyFinishedVertexUsedUnionListState(Map<JobVertexID, ExecutionJobVertex> partly... | 3.26 |
flink_ActorSystemBootstrapTools_startRemoteActorSystem_rdh | /**
* Starts a remote Actor System at given address and specific port.
*
* @param configuration
* The Flink configuration.
* @param actorSystemName
* Name of the started {@link ActorSystem}
* @param externalAddress
* The external address to access the ActorSystem.
* @param externalPort
* The external ... | 3.26 |
flink_ActorSystemBootstrapTools_startLocalActorSystem_rdh | /**
* Starts a local Actor System.
*
* @param configuration
* The Flink configuration.
* @param actorSystemName
* Name of the started ActorSystem.
* @param logger
* The logger to output log information.
* @param actorSystemExecutorConfiguration
* Configuration for the ActorSystem's underlying
* exe... | 3.26 |
flink_ActorSystemBootstrapTools_startActorSystem_rdh | /**
* Starts an Actor System with given Pekko config.
*
* @param config
* Config of the started ActorSystem.
* @param actorSystemName
* Name of the started ActorSystem.
* @param logger
* The logger to output log information.
* @return The ActorSystem which has been started.
*/
private static ActorSyste... | 3.26 |
flink_DefaultCompletedCheckpointStoreUtils_getMaximumNumberOfRetainedCheckpoints_rdh | /**
* Extracts maximum number of retained checkpoints configuration from the passed {@link Configuration}. The default value is used as a fallback if the passed value is a value larger
* than {@code 0}.
*
* @param config
* The configuration that is accessed.
* @param logger
* The {@link Logger} used for expo... | 3.26 |
flink_DefaultCompletedCheckpointStoreUtils_retrieveCompletedCheckpoints_rdh | /**
* Fetch all {@link CompletedCheckpoint completed checkpoints} from an {@link StateHandleStore
* external store}. This method is intended for retrieving an initial state of {@link DefaultCompletedCheckpointStore}.
*
* @param checkpointStateHandleStore
* Completed checkpoints in external store.
* @param compl... | 3.26 |
flink_TaskManagerMetricGroup_putVariables_rdh | // ------------------------------------------------------------------------
// Component Metric Group Specifics
// ------------------------------------------------------------------------
@Override
protected void putVariables(Map<String, String> variables) {
variables.put(ScopeFormat.SCOPE_HOST, hostname);
variables.p... | 3.26 |
flink_TaskManagerMetricGroup_m0_rdh | // ------------------------------------------------------------------------
// job groups
// ------------------------------------------------------------------------
public TaskManagerJobMetricGroup m0(JobID jobId, String jobName) {
Preconditions.checkNotNull(jobId);
String resolvedJobName = ((jobName == null) || jobNa... | 3.26 |
flink_KeyedStateCheckpointOutputStream_getKeyGroupList_rdh | /**
* Returns a list of all key-groups which can be written to this stream.
*/
public KeyGroupsList getKeyGroupList() {
return keyGroupRangeOffsets.getKeyGroupRange();
} | 3.26 |
flink_KeyedStateCheckpointOutputStream_getCurrentKeyGroup_rdh | /**
* Returns the key group that is currently being written. The key group was started but not yet
* finished, i.e. data can still be added. If no key group was started, this returns {@link #NO_CURRENT_KEY_GROUP}.
*/
public int getCurrentKeyGroup() {
return currentKeyGroup;
} | 3.26 |
flink_KeyedStateCheckpointOutputStream_isKeyGroupAlreadyStarted_rdh | /**
* Returns true, if the key group with the given id was already started. The key group might not
* yet be finished, if it's id is equal to the return value of {@link #getCurrentKeyGroup()}.
*/
public boolean isKeyGroupAlreadyStarted(int keyGroupId) {
return NO_OFFSET_SET != keyGroupRangeOffsets.getKeyGroupOffset(... | 3.26 |
flink_KeyedStateCheckpointOutputStream_startNewKeyGroup_rdh | /**
* User code can call this method to signal that it begins to write a new key group with the
* given key group id. This id must be within the {@link KeyGroupsList} provided by the stream.
* Each key-group can only be started once and is considered final/immutable as soon as this
* method is called again.
*/
pub... | 3.26 |
flink_KeyedStateCheckpointOutputStream_isKeyGroupAlreadyFinished_rdh | /**
* Returns true if the key group is already completely written and immutable. It was started and
* since then another key group has been started.
*/
public boolean isKeyGroupAlreadyFinished(int keyGroupId) {
return isKeyGroupAlreadyStarted(keyGroupId) && (keyGroupId != getCurrentKeyGroup());
} | 3.26 |
flink_NonBufferResponseDecoder_ensureBufferCapacity_rdh | /**
* Ensures the message header accumulation buffer has enough capacity for the current message.
*/
private void ensureBufferCapacity() {
if (messageBuffer.capacity() < messageLength) {
messageBuffer.capacity(messageLength);
}
} | 3.26 |
flink_FsCheckpointStorageAccess_m0_rdh | // ------------------------------------------------------------------------
// CheckpointStorage implementation
// ------------------------------------------------------------------------
@Override
public boolean m0() {
return true;
} | 3.26 |
flink_FsCheckpointStorageAccess_getCheckpointsDirectory_rdh | // ------------------------------------------------------------------------
@VisibleForTesting
Path getCheckpointsDirectory() {
return checkpointsDirectory;
} | 3.26 |
flink_HashJoinOperator_fallbackSMJProcessPartition_rdh | /**
* If here also exists partitions which spilled to disk more than three time when hash join end,
* means that the key in these partitions is very skewed, so fallback to sort merge join
* algorithm to process it.
*/
private void fallbackSMJProcessPartition() throws Exception {
if (!table.getPartitionsPendingForSM... | 3.26 |
flink_ExecutionTimeBasedSlowTaskDetector_findSlowTasks_rdh | /**
* Given that the parallelism is N and the ratio is R, define T as the median of the first N*R
* finished tasks' execution time. The baseline will be T*M, where M is the multiplier. Note
* that the execution time will be weighted with its input bytes when calculating the median. A
* task will be identified as sl... | 3.26 |
flink_ExecutionTimeBasedSlowTaskDetector_scheduleTask_rdh | /**
* Schedule periodical slow task detection.
*/
private void scheduleTask(final ExecutionGraph executionGraph, final SlowTaskDetectorListener listener, final ComponentMainThreadExecutor mainThreadExecutor) {
this.scheduledDetectionFuture = mainThreadExecutor.schedule(() -> {
try {
listener.... | 3.26 |
flink_CsvFormatFactory_m1_rdh | // ------------------------------------------------------------------------
// Utilities
// ------------------------------------------------------------------------
private static void m1(ReadableConfig formatOptions, CsvRowDataDeserializationSchema.Builder schemaBuilder) {
formatOptions.getOptional(FIELD_DELIMITER... | 3.26 |
flink_MutableRecordAndPosition_setNext_rdh | /**
* Sets the next record of a sequence. This increments the {@code recordSkipCount} by one.
*/
public void setNext(E record) {
this.record = record;
this.recordSkipCount++;
} | 3.26 |
flink_MutableRecordAndPosition_setPosition_rdh | /**
* Sets the position without setting a record.
*/
public void setPosition(long offset, long recordSkipCount) {
this.offset = offset;
this.recordSkipCount = recordSkipCount;
} | 3.26 |
flink_MutableRecordAndPosition_set_rdh | /**
* Updates the record and position in this object.
*/
public void set(E record, long offset, long recordSkipCount) {
this.record = record;
this.offset = offset;this.recordSkipCount = recordSkipCount;
} | 3.26 |
flink_MemorySegmentFactory_wrapOffHeapMemory_rdh | /**
* Creates a memory segment that wraps the off-heap memory backing the given ByteBuffer. Note
* that the ByteBuffer needs to be a <i>direct ByteBuffer</i>.
*
* <p>This method is intended to be used for components which pool memory and create memory
* segments around long-lived memory regions.
*
* @param memor... | 3.26 |
flink_MemorySegmentFactory_wrap_rdh | /**
* Creates a new memory segment that targets the given heap memory region.
*
* <p>This method should be used to turn short lived byte arrays into memory segments.
*
* @param buffer
* The heap memory region.
* @return A new memory segment that targets the given heap memory region.
*/
public static MemorySeg... | 3.26 |
flink_MemorySegmentFactory_allocateUnpooledSegment_rdh | /**
* Allocates some unpooled memory and creates a new memory segment that represents that memory.
*
* <p>This method is similar to {@link #allocateUnpooledSegment(int)}, but additionally sets the
* owner of the memory segment.
*
* @param size
* The size of the memory segment to allocate.
* @param owner
* ... | 3.26 |
flink_MemorySegmentFactory_allocateOffHeapUnsafeMemory_rdh | /**
* Allocates an off-heap unsafe memory and creates a new memory segment to represent that
* memory.
*
* <p>Creation of this segment schedules its memory freeing operation when its java wrapping
* object is about to be garbage collected, similar to {@link java.nio.DirectByteBuffer#DirectByteBuffer(int)}. The dif... | 3.26 |
flink_MemorySegmentFactory_allocateUnpooledOffHeapMemory_rdh | /**
* Allocates some unpooled off-heap memory and creates a new memory segment that represents that
* memory.
*
* @param size
* The size of the off-heap memory segment to allocate.
* @param owner
* The owner to associate with the off-heap memory segment.
* @return A new memory segment, backed by unpooled of... | 3.26 |
flink_ExpressionBuilder_aggDecimalPlus_rdh | /**
* Used only for implementing SUM/AVG aggregations (with and without retractions) on a Decimal
* type to avoid overriding decimal precision/scale calculation for sum/avg with the rules
* applied for the normal plus.
*/
@Internal
public static UnresolvedCallExpression aggDecimalPlus(Expression input1, Expression ... | 3.26 |
flink_ExpressionBuilder_aggDecimalMinus_rdh | /**
* Used only for implementing SUM/AVG aggregations (with and without retractions) on a Decimal
* type to avoid overriding decimal precision/scale calculation for sum/avg with the rules
* applied for the normal minus.
*/
@Internal
public static UnresolvedCallExpression aggDecimalMinus(Expression input1, Expressi... | 3.26 |
flink_YarnApplicationFileUploader_registerMultipleLocalResources_rdh | /**
* Recursively uploads (and registers) any (user and system) files in <tt>shipFiles</tt> except
* for files matching "<tt>flink-dist*.jar</tt>" which should be uploaded separately. If it is
* already a remote file, the uploading will be skipped.
*
* @param shipFiles
* local or re... | 3.26 |
flink_YarnApplicationFileUploader_registerSingleLocalResource_rdh | /**
* Register a single local/remote resource and adds it to <tt>localResources</tt>.
*
* @param key
* the key to add the resource under
* @param resourcePath
* path of the resource to be registered
* @param relativeDstPath
* the relative path at the target location (this will be prefixed by the
* appl... | 3.26 |
flink_YarnApplicationFileUploader_registerProvidedLocalResources_rdh | /**
* Register all the files in the provided lib directories as Yarn local resources with PUBLIC
* visibility, which means that they will be cached in the nodes and reused by different
* applications.
*
* @return list of class paths with the file name
*/
List<String> registerProvidedLocalResources() {
checkNo... | 3.26 |
flink_RegisterApplicationMasterResponseReflector_getContainersFromPreviousAttemptsUnsafe_rdh | /**
* Same as {@link #getContainersFromPreviousAttempts(RegisterApplicationMasterResponse)} but
* allows to pass objects that are not of type {@link RegisterApplicationMasterResponse}.
*/
@VisibleForTesting
List<Container> getContainersFromPreviousAttemptsUnsafe(final Object response) {
if (getContainersFromPr... | 3.26 |
flink_RegisterApplicationMasterResponseReflector_getContainersFromPreviousAttempts_rdh | /**
* Checks if a YARN application still has registered containers. If the application master
* registered at the ResourceManager for the first time, this list will be empty. If the
* application master registered a repeated time (after a failure and recovery), this list will
* contain the containers that were prev... | 3.26 |
flink_BinarySegmentUtils_readTimestampData_rdh | /**
* Gets an instance of {@link TimestampData} from underlying {@link MemorySegment}.
*
* @param segments
* the underlying MemorySegments
* @param baseOffset
* the base offset of current instance of {@code TimestampData}
* @param offsetAndNanos
* the offset of milli-seconds part and nanoseconds
* @retur... | 3.26 |
flink_BinarySegmentUtils_setByte_rdh | /**
* set byte from segments.
*
* @param segments
* target segments.
* @param offset
* value offset.
*/
public static void setByte(MemorySegment[] segments, int offset, byte value) {
if (inFirstSegment(segments, offset, 1)) {
segments[0].put(offset, value);
} else {
setByteMultiSegments(segments, offset, va... | 3.26 |
flink_BinarySegmentUtils_find_rdh | /**
* Find equal segments2 in segments1.
*
* @param segments1
* segs to find.
* @param segments2
* sub segs.
* @return Return the found offset, return -1 if not find.
*/
public static int find(MemorySegment[] segments1, int offset1, int numBytes1, MemorySegment[] segments2, int offset2, int numBytes2) {
i... | 3.26 |
flink_BinarySegmentUtils_getBytes_rdh | /**
* Maybe not copied, if want copy, please use copyTo.
*/
public static byte[] getBytes(MemorySegment[] segments, int baseOffset, int sizeInBytes) {
// avoid copy if `base` is `byte[]`
if (segments.length == 1) {
byte[] heapMemory = segments[0].getHeapMemory();
if (((baseOffset == 0) && (he... | 3.26 |
flink_BinarySegmentUtils_setInt_rdh | /**
* set int from segments.
*
* @param segments
* target segments.
* @param offset
* value offset.
*/
public static void setInt(MemorySegment[] segments, int offset, int value) {
if (inFirstSegment(segments, offset, 4)) {
segments[0].putInt(offset, value);
} else
{
setIntMultiSegments(segments, offset, valu... | 3.26 |
flink_BinarySegmentUtils_readArrayData_rdh | /**
* Gets an instance of {@link ArrayData} from underlying {@link MemorySegment}.
*/
public static ArrayData readArrayData(MemorySegment[] segments, int baseOffset, long offsetAndSize) {
final int size = ((int) (offsetAndSize));
int offset = ((int) (offsetAndSize >> 32));
BinaryArrayData array = new BinaryArrayData... | 3.26 |
flink_BinarySegmentUtils_copyFromBytes_rdh | /**
* Copy target segments from source byte[].
*
* @param segments
* target segments.
* @param offset
* target segments offset.
* @param bytes
* source byte[].
* @param bytesOffset
* source byte[] offset.
... | 3.26 |
flink_BinarySegmentUtils_allocateReuseBytes_rdh | /**
* Allocate bytes that is only for temporary usage, it should not be stored in somewhere else.
* Use a {@link ThreadLocal} to reuse bytes to avoid overhead of byte[] new and gc.
*
* <p>If there are methods that can only accept a byte[], instead of a MemorySegment[]
* parameter, we can allocate a reuse bytes and... | 3.26 |
flink_BinarySegmentUtils_getDouble_rdh | /**
* get double from segments.
*
* @param segments
* target segments.
* @param offset
* value offset.
*/
public static double getDouble(MemorySegment[] segments, int offset) {
if (inFirstSegment(segments, offset, 8)) {
return segments[0].getDouble(offset);
} else {
return getDoubleMultiSegments(segments, ... | 3.26 |
flink_BinarySegmentUtils_getFloat_rdh | /**
* get float from segments.
*
* @param segments
* target segments.
* @param offset
* value offset.
*/
public static float getFloat(MemorySegment[] segments, int offset) {if (inFirstSegment(segments, offset, 4)) {
return segments[0].getFloat(offset);
} else {
return getFloatMultiSegments(segments... | 3.26 |
flink_BinarySegmentUtils_byteIndex_rdh | /**
* Given a bit index, return the byte index containing it.
*
* @param bitIndex
* the bit index.
* @return the byte index.
*/
private static int byteIndex(int bitIndex) {
return bitIndex >>> ADDRESS_BITS_PER_WORD;
} | 3.26 |
flink_BinarySegmentUtils_readDecimalData_rdh | /**
* Gets an instance of {@link DecimalData} from underlying {@link MemorySegment}.
*/
public static DecimalData readDecimalData(MemorySegment[] segments,
int baseOffset, long offsetAndSize, int precision, int scale) {
final int size = ((int) (offsetAndSize));
int subOffset = ((int) (offsetAndSize >> 32));
byte[] by... | 3.26 |
flink_BinarySegmentUtils_bitGet_rdh | /**
* read bit from segments.
*
* @param segments
* target segments.
* @param baseOffset
* bits base offset.
* @param index
* bit index from base offset.
*/public static boolean bitGet(MemorySegment[] segments, int baseOffset, int index) {
int offset = baseOffset + byteIndex(index);
byte current ... | 3.26 |
flink_BinarySegmentUtils_getByte_rdh | /**
* get byte from segments.
*
* @param segments
* target segments.
* @param offset
* value offset.
*/
public static byte getByte(MemorySegment[]
segments, int offset) {
if (inFirstSegment(segments, offset, 1)) {
return segments[0].get(offset);
} else {
return getByteMultiSegments(segments, offset... | 3.26 |
flink_BinarySegmentUtils_getShort_rdh | /**
* get short from segments.
*
* @param segments
* target segments.
* @param offset
* value offset.
*/
public static short getShort(MemorySegment[] segments, int offset) {
if (inFirstSegment(segments, offset, 2)) {
return segments[0].getShort(offset);
} else {
return getShortMultiS... | 3.26 |
flink_BinarySegmentUtils_bitSet_rdh | /**
* set bit from segments.
*
* @param segments
* target segments.
* @param baseOffset
* bits base offset.
* @param index
* bit index from base offset.
*/
public static void bitSet(MemorySegment[] segments, int baseOffset, int index) {
if
(segments.length == 1) {
int offset = baseOffset ... | 3.26 |
flink_BinarySegmentUtils_setLong_rdh | /**
* set long from segments.
*
* @param segments
* target segments.
* @param offset
* value offset.
*/
public static void setLong(MemorySegment[] segments, int offset, long value) {
if (inFirstSegment(segments, offset, 8)) {
segments[0].putLong(offset, value);
} else {
setLongMultiSegments(segments,... | 3.26 |
flink_BinarySegmentUtils_getInt_rdh | /**
* get int from segments.
*
* @param segments
* target segments.
* @param offset
* value offset.
*/public static int getInt(MemorySegment[] segments, int offset) {
if (inFirstSegment(segments, offset, 4)) {
return segments[0].getInt(offset);
} else {
return getIntMultiSegments(segments, offset);
}
} | 3.26 |
flink_BinarySegmentUtils_readRawValueData_rdh | /**
* Gets an instance of {@link RawValueData} from underlying {@link MemorySegment}.
*/
public static <T> RawValueData<T> readRawValueData(MemorySegment[] segments, int baseOffset, long offsetAndSize) {
final int size = ((int) (offsetAndSize));
int offset = ((int) (offsetAndSize >> 32));return new
BinaryRawValueDat... | 3.26 |
flink_BinarySegmentUtils_bitUnSet_rdh | /**
* unset bit from segments.
*
* @param segments
* target segments.
* @param baseOffset
* bits base offset.
* @param index
* bit index from base offset.
*/
public static void bitUnSet(MemorySegment[] segments, int baseOffset, int index) {
if (segments.length ==
1) {
MemorySegment segme... | 3.26 |
flink_BinarySegmentUtils_copyToUnsafe_rdh | /**
* Copy segments to target unsafe pointer.
*
* @param segments
* Source segments.
* @param offset
* The position where the bytes are started to be read from these memory segments.
* @param target
* The unsafe memory to copy the bytes to.
* @param pointer
* The position in the target unsafe memory t... | 3.26 |
flink_BinarySegmentUtils_getBoolean_rdh | /**
* get boolean from segments.
*
* @param segments
* target segments.
* @param offset
* value offset.
*/
public static boolean getBoolean(MemorySegment[] segments, int offset) {
if (inFirstSegment(segments, offset, 1)) {
return segments[0].getBoolean(offset);
}
else {
return g... | 3.26 |
flink_BinarySegmentUtils_setDouble_rdh | /**
* set double from segments.
*
* @param segments
* target segments.
* @param offset
* value offset.
*/public static void setDouble(MemorySegment[] segments, int offset, double value) {
if (inFirstSegment(segments, offset, 8)) {segments[0].putDouble(offset, value);
} else {
setDoubleMultiSegments(segments,... | 3.26 |
flink_BinarySegmentUtils_readStringData_rdh | /**
* Get binary string, if len less than 8, will be include in variablePartOffsetAndLen.
*
* <p>Note: Need to consider the ByteOrder.
*
* @param baseOffset
* base offset of composite binary format.
* @param fieldOffset
* absolute start offset of 'variablePartOffsetAndLen'.
* @param variablePartOffsetAndLe... | 3.26 |
flink_BinarySegmentUtils_hash_rdh | /**
* hash segments to int.
*
* @param segments
* Source segments.
* @param offset
* Source segments offset.
* @param numBytes
* the number bytes to hash.
*/
public static int hash(MemorySegment[] segments, int offset, int numBytes) {
if (inFirstSegment(segments, offset, numBytes)) {
return MurmurHas... | 3.26 |
flink_BinarySegmentUtils_readMapData_rdh | /**
* Gets an instance of {@link MapData} from underlying {@link MemorySegment}.
*/
public static MapData readMapData(MemorySegment[] segments, int baseOffset, long offsetAndSize) {
final int size = ((int) (offsetAndSize));
int offset = ((int) (offsetAndSize >> 32));
BinaryMapData map = new BinaryMapData();
map.poin... | 3.26 |
flink_BinarySegmentUtils_setBoolean_rdh | /**
* set boolean from segments.
*
* @param segments
* target segments.
* @param offset
* value offset.
*/
public static void setBoolean(MemorySegment[]
segments, int offset, boolean value) {
if (inFirstSegment(segments, offset, 1)) {
segments[0].putBoolean(offset, value);
} else {
se... | 3.26 |
flink_BinarySegmentUtils_getLong_rdh | /**
* get long from segments.
*
* @param segments
* target segments.
* @param offset
* value offset.
*/
public static long getLong(MemorySegment[] segments, int offset) {
if (inFirstSegment(segments, offset, 8)) {
return segments[0].getLong(offset);
} else {
return getLongMultiSegments(segments, offset);
} } | 3.26 |
flink_BinarySegmentUtils_readBinary_rdh | /**
* Get binary, if len less than 8, will be include in variablePartOffsetAndLen.
*
* <p>Note: Need to consider the ByteOrder.
*
* @param baseOffset
* base offset of composite binary format.
* @param fieldOffset
* absolute start offset of 'variablePartOffsetAndLen'.
* @param variablePartOffsetAndLen
* ... | 3.26 |
flink_BinarySegmentUtils_setShort_rdh | /**
* set short from segments.
*
* @param segments
* target segments.
* @param offset
* value offset.
*/
public static void setShort(MemorySegment[] segments, int offset, short value)
{
if (inFirstSegment(segments, offset, 2)) {
segments[0].putShort(offset, value);
} else {
setShortM... | 3.26 |
flink_BinarySegmentUtils_readRowData_rdh | /**
* Gets an instance of {@link RowData} from underlying {@link MemorySegment}.
*/
public static RowData readRowData(MemorySegment[] segments, int numFields, int baseOffset, long offsetAndSize) {
final int size = ((int) (offsetAndSize));
int offset = ((int) (offsetAndSize >> 32));
NestedRowData row = new NestedRo... | 3.26 |
flink_BinarySegmentUtils_inFirstSegment_rdh | /**
* Is it just in first MemorySegment, we use quick way to do something.
*/
private static boolean inFirstSegment(MemorySegment[] segments, int offset, int numBytes) {
return (numBytes + offset) <= segments[0].size();
} | 3.26 |
flink_BinarySegmentUtils_copyToBytes_rdh | /**
* Copy segments to target byte[].
*
* @param segments
* Source segments.
* @param offset
* Source segments offset.
* @param bytes
* target byte[].
* @param bytesOffset
* target byte[] offset.
* @param numBytes
* the number bytes to copy.
*/
public static byte[]
copyToBytes(MemorySegment[] seg... | 3.26 |
flink_BinarySegmentUtils_equals_rdh | /**
* Equals two memory segments regions.
*
* @param segments1
* Segments 1
* @param offset1
* Offset of segments1 to start equaling
* @param segments2
* Segments 2
* @param offset2
* Offset of segments2 to start equaling
* @param len
* Length of the equaled memory region
* @return true if equal,... | 3.26 |
flink_FunctionDefinitionFactory_createFunctionDefinition_rdh | /**
* Creates a {@link FunctionDefinition} from given {@link CatalogFunction} with the given {@link Context} containing the class loader of the current session, which is useful when it's needed
* to load class from class name.
*
* <p>The default implementation will call {@link #createFunctionDefinition(String,
* C... | 3.26 |
flink_PekkoUtils_createActorSystem_rdh | /**
* Creates an actor system with the given pekko config.
*
* @param actorSystemName
* name of the actor system
* @param config
* configuration for the actor system
* @return created actor system
*/
public static ActorSystem createActorSystem(String actorSystemName, Config config) {
// Initialize slf4j... | 3.26 |
flink_PekkoUtils_getBasicConfig_rdh | /**
* Gets the basic Pekko config which is shared by remote and local actor systems.
*
* @param configuration
* instance which contains the user specified values for the configuration
* @return Flink's basic Pekko config
*/
private static Config getBasicConfig(Configuration configuration) {
final int throug... | 3.26 |
flink_PekkoUtils_getAddressFromRpcURL_rdh | /**
* Extracts the {@link Address} from the given pekko URL.
*
* @param rpcURL
* to extract the {@link Address} from
* @throws MalformedURLException
* if the {@link Address} could not be parsed from the given pekko
* URL
* @return Extracted {@link Address} from the given rpc URL
*/
// hidden checked exce... | 3.26 |
flink_PekkoUtils_getInetSocketAddressFromRpcURL_rdh | /**
* Extracts the hostname and the port of the remote actor system from the given Pekko URL. The
* result is an {@link InetSocketAddress} instance containing the extracted hostname and port.
* If the Pekko URL does not contain the hostname and port information, e.g. a local Pekko URL
* is provided, then an {@link ... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.