name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_BinaryStringData_compareTo_rdh | /**
* Compares two strings lexicographically. Since UTF-8 uses groups of six bits, it is sometimes
* useful to use octal notation which uses 3-bit groups. With a calculator which can convert
* between hexadecimal and octal it can be easier to manually create or interpret UTF-8 compared
* with using binary. So we ju... | 3.26 |
flink_BinaryStringData_compareMultiSegments_rdh | /**
* Find the boundaries of segments, and then compare MemorySegment.
*/
private int compareMultiSegments(BinaryStringData other) {
if ((binarySection.sizeInBytes == 0) || (other.binarySection.sizeInBytes == 0)) {return binarySection.sizeInBytes - other.binarySection.sizeInBytes;
}
int len = Math.min(bi... | 3.26 |
flink_BinaryStringData_fromString_rdh | /**
* Creates a {@link BinaryStringData} instance from the given Java string.
*/
public static BinaryStringData fromString(String str) {
if (str == null) {
return null;
} else {
return
new BinaryStringData(str);
}
} | 3.26 |
flink_BinaryStringData_toUpperCase_rdh | /**
* Converts all of the characters in this {@code BinaryStringData} to upper case.
*
* @return the {@code BinaryStringData}, converted to uppercase.
*/
public BinaryStringData toUpperCase() {
if (javaObject != null) {
return javaToUpperCase();
}
if (binarySection.sizeInBytes == 0) {
re... | 3.26 |
flink_BinaryStringData_fromAddress_rdh | // ------------------------------------------------------------------------------------------
// Construction Utilities
// ------------------------------------------------------------------------------------------
/**
* Creates a {@link BinaryStringData} instance from the given address (base and offset) and
* length.... | 3.26 |
flink_BinaryStringData_contains_rdh | /**
* Returns true if and only if this BinaryStringData contains the specified sequence of bytes
* values.
*
* @param s
* the sequence to search for
* @return true if this BinaryStringData contains {@code s}, false otherwise
*/
public boolean contains(final BinaryStringData s) {
ensureMaterialized();
s... | 3.26 |
flink_HadoopDataInputStream_forceSeek_rdh | /**
* Positions the stream to the given location. In contrast to {@link #seek(long)}, this method
* will always issue a "seek" command to the dfs and may not replace it by {@link #skip(long)}
* for small seeks.
*
* <p>Notice that the underlying DFS implementation can still decide to do skip instead of seek.
*
* ... | 3.26 |
flink_HadoopDataInputStream_skipFully_rdh | /**
* Skips over a given amount of bytes in the stream.
*
* @param bytes
* the number of bytes to skip.
* @throws IOException
*/
public void skipFully(long bytes) throws IOException {
while (bytes > 0) {
bytes -= fsDataInputStream.skip(bytes);
}
} | 3.26 |
flink_HadoopDataInputStream_getHadoopInputStream_rdh | /**
* Gets the wrapped Hadoop input stream.
*
* @return The wrapped Hadoop input stream.
*/
public FSDataInputStream
getHadoopInputStream() {
return fsDataInputStream;
} | 3.26 |
flink_StrategyUtils_findDataType_rdh | /**
* Finds a data type that is close to the given data type in terms of nullability and conversion
* class but of the given logical root.
*/
static Optional<DataType> findDataType(CallContext callContext, boolean throwOnFailure, DataType actualDataType, LogicalTypeRoot expectedRoot, @Nullable
Boolean expectedNullab... | 3.26 |
flink_StrategyUtils_findDataTypeOfRoot_rdh | /**
* Returns a data type for the given data type and expected root.
*
* <p>This method is aligned with {@link LogicalTypeCasts#supportsImplicitCast(LogicalType,
* LogicalType)}.
*
* <p>The "fallback" data type for each root represents the default data type ... | 3.26 |
flink_InstantiationUtil_m0_rdh | /**
* Clones the given writable using the {@link IOReadableWritable serialization}.
*
* @param original
* Object to clone
* @param <T>
* Type of the object to clone
* @return Cloned object
* @throws IOException
* Thrown is the serialization fails.
*/
public static <T extends IOReadableWritable> T m0(T o... | 3.26 |
flink_InstantiationUtil_clone_rdh | /**
* Clones the given serializable object using Java serialization, using the given classloader to
* resolve the cloned classes.
*
* @param obj
* Object to clone
* @param classLoader
* The classloader to resolve the classes during deserialization.
* @param <T>
* Type of the object to clone
* @return Cl... | 3.26 |
flink_InstantiationUtil_isProperClass_rdh | /**
* Checks, whether the class is a proper class, i.e. not abstract or an interface, and not a
* primitive type.
*
* @param clazz
* The class to check.
* @return True, if the class is a proper class, false otherwise.
*/
public static boolean isProperClass(Class<?> clazz) {
int mods = clazz.getModifiers();... | 3.26 |
flink_InstantiationUtil_hasPublicNullaryConstructor_rdh | /**
* Checks, whether the given class has a public nullary constructor.
*
* @param clazz
* The class to check.
* @return True, if the class has a public nullary constructor, false if not.
*/
public static boolean hasPublicNullaryConstructor(Class<?> clazz) {
Constructor<?>[] constructors = clazz.getConstru... | 3.26 |
flink_InstantiationUtil_isNonStaticInnerClass_rdh | /**
* Checks, whether the class is an inner class that is not statically accessible. That is
* especially true for anonymous inner classes.
*
* @param clazz
* The class to check.
* @return True, if the class is a non-statically accessible inner class.
*/
public static boolean isNonStaticInnerClass(Class<?> cla... | 3.26 |
flink_InstantiationUtil_checkForInstantiation_rdh | /**
* Performs a standard check whether the class can be instantiated by {@code Class#newInstance()}.
*
* @param clazz
* The class to check.
* @throws RuntimeException
* Thrown, if the class cannot be instantiated by {@code Class#newInstance()}.
*/
public static void checkForInstantiation(Class<?> clazz) {
f... | 3.26 |
flink_InstantiationUtil_resolveClassByName_rdh | /**
* Loads a class by name from the given input stream and reflectively instantiates it.
*
* <p>This method will use {@link DataInputView#readUTF()} to read the class name, and then
* attempt to load the class from the given ClassLoader.
*
* <p>The resolved class is checked to be equal to or a subtype of the giv... | 3.26 |
flink_InstantiationUtil_instantiate_rdh | /**
* Creates a new instance of the given class.
*
* @param <T>
* The generic type of the class.
* @param clazz
* The class to instantiate.
* @return An instance of the given class.
* @throws RuntimeException
* Thrown, if the class could not be instantiated. The exception
* contains a detailed message... | 3.26 |
flink_InstantiationUtil_isPublic_rdh | /**
* Checks, whether the given class is public.
*
* @param clazz
* The class to check.
* @return True, if the class is public, false if not.
*/
public static boolean isPublic(Class<?> clazz) {
return Modifier.isPublic(clazz.getModifiers());} | 3.26 |
flink_InstantiationUtil_cloneUnchecked_rdh | /**
* Unchecked equivalent of {@link #clone(Serializable)}.
*
* @param obj
* Object to clone
* @param <T>
* Type of the object to clone
* @return The cloned object
*/
public static <T extends Serializable> T cloneUnchecked(T obj) {
try {
return clone(obj, obj.getClass().getClassLoader());
... | 3.26 |
flink_StreamTaskSourceInput_checkpointStarted_rdh | /**
* This method is used with unaligned checkpoints to mark the arrival of a first {@link CheckpointBarrier}. For chained sources, there is no {@link CheckpointBarrier} per se flowing
* through the job graph. We can assume that an imaginary {@link CheckpointBarrier} was produced
* by the source, at any point of tim... | 3.26 |
flink_ResultSubpartition_onConsumedSubpartition_rdh | /**
* Notifies the parent partition about a consumed {@link ResultSubpartitionView}.
*/
protected void onConsumedSubpartition() {
f0.onConsumedSubpartition(getSubPartitionIndex());
} | 3.26 |
flink_AbstractFileIOChannel_getChannelID_rdh | // --------------------------------------------------------------------------------------------
@Overridepublic final ID getChannelID() {
return
this.id;
} | 3.26 |
flink_DeclarativeAggregateFunction_mergeOperand_rdh | /**
* Merge input of {@link #mergeExpressions()}, the input are AGG buffer generated by user
* definition.
*/
public final UnresolvedReferenceExpression mergeOperand(UnresolvedReferenceExpression
aggBuffer) {
String name = String.valueOf(Arrays.asList(aggBufferAttributes()).indexOf(aggBuffer));
validateOpera... | 3.26 |
flink_DeclarativeAggregateFunction_operand_rdh | /**
* Arg of accumulate and retract, the input value (usually obtained from a new arrived data).
*/
public final UnresolvedReferenceExpression operand(int i) {
String name =
String.valueOf(i);
if (m1().contains(name)) {
throw new IllegalStateException(String.format("Agg buffer name(%s) should n... | 3.26 |
flink_DeclarativeAggregateFunction_operands_rdh | /**
* Args of accumulate and retract, the input value (usually obtained from a new arrived data).
*/
public final UnresolvedReferenceExpression[] operands() {
int operandCount = operandCount();
Preconditions.checkState(operandCount >= 0, "inputCount must be greater than or equal to 0.");
UnresolvedReferen... | 3.26 |
flink_DeclarativeAggregateFunction_mergeOperands_rdh | /**
* Merge inputs of {@link #mergeExpressions()}, these inputs are agg buffer generated by user
* definition.
*/
public final UnresolvedReferenceExpression[] mergeOperands() {
UnresolvedReferenceExpression[] aggBuffers = aggBufferAttributes();
UnresolvedReferenceExpression[] ret = new UnresolvedReferenceEx... | 3.26 |
flink_AbstractPythonStreamGroupAggregateOperator_onProcessingTime_rdh | /**
* Invoked when a processing-time timer fires.
*/
@Overridepublic void onProcessingTime(InternalTimer<RowData, VoidNamespace> timer) throws Exception {
if (stateCleaningEnabled) {
RowData v0 = timer.getKey();
long timestamp = timer.getTimestamp();
reuseTimerRowData.setLong(2, timestamp... | 3.26 |
flink_AbstractPythonStreamGroupAggregateOperator_onEventTime_rdh | /**
* Invoked when an event-time timer fires.
*/
@Override
public void onEventTime(InternalTimer<RowData, VoidNamespace> timer) {
} | 3.26 |
flink_ZooKeeperCheckpointStoreUtil_nameToCheckpointID_rdh | /**
* Converts a path to the checkpoint id.
*
* @param path
* in ZooKeeper
* @return Checkpoint id parsed from the path
*/
@Override
public long nameToCheckpointID(String path) {
try {
String numberString;// check if we have a leading slash
if ('/' == path.charAt(0)) {
numberSt... | 3.26 |
flink_ZooKeeperCheckpointStoreUtil_checkpointIDToName_rdh | /**
* Convert a checkpoint id into a ZooKeeper path.
*
* @param checkpointId
* to convert to the path
* @return Path created from the given checkpoint id
*/
@Override
public String
checkpointIDToName(long checkpointId) {
return String.format("/%019d", checkpointId);
} | 3.26 |
flink_SourceReaderTestBase_testRead_rdh | /**
* Simply test the reader reads all the splits fine.
*/
@Test
void testRead() throws Exception {
try (SourceReader<Integer, SplitT> reader = createReader()) {
reader.addSplits(getSplits(numSplits, NUM_RECORDS_PER_SPLIT, Boundedness.BOUNDED));
ValidatingSourceOutput output = new ValidatingSourc... | 3.26 |
flink_DispatcherGateway_stopWithSavepointAndGetLocation_rdh | /**
* Stops the job with a savepoint, returning a future that completes with the savepoint location
* when the savepoint is completed.
*
* @param jobId
* the job id
* @param targetDirectory
* Target directory for the savepoint.
* @param savepointMode
* context of the savepoint operation
* @param timeout... | 3.26 |
flink_DispatcherGateway_triggerSavepointAndGetLocation_rdh | /**
* Triggers a savepoint with the given savepoint directory as a target, returning a future that
* completes with the savepoint location when it is complete.
*
* @param jobId
* the job id
* @param targetDirectory
* Target directory for the savepoint.
* @param formatType
* Binary format of the savepoint... | 3.26 |
flink_FileIOChannel_getPathFile_rdh | /**
* Returns the path to the underlying temporary file as a File.
*/
public File getPathFile() {
return path;
} | 3.26 |
flink_FileIOChannel_getPath_rdh | /**
* Returns the path to the underlying temporary file.
*/
public String getPath() {
return path.getAbsolutePath();
} | 3.26 |
flink_Tuple7_toString_rdh | // -------------------------------------------------------------------------------------------------
// standard utilities
// -------------------------------------------------------------------------------------------------
/**
* Creates a string representation of the tuple in the form (f0, f1, f2, f3, f4, f5, f6), wh... | 3.26 |
flink_Tuple7_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)... | 3.26 |
flink_Tuple7_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_Tuple7_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_IntValue_compareTo_rdh | // --------------------------------------------------------------------------------------------
@Override
public int compareTo(IntValue o) {
final int other = o.value;
return this.value < other ? -1 : this.value > other ? 1 : 0;
} | 3.26 |
flink_IntValue_getValue_rdh | /**
* Returns the value of the encapsulated int.
*
* @return the value of the encapsulated int.
*/
public int getValue() {return this.value;
} | 3.26 |
flink_IntValue_read_rdh | // --------------------------------------------------------------------------------------------
@Override
public void read(DataInputView in) throws IOException {
this.value = in.readInt();
} | 3.26 |
flink_IntValue_getMaxNormalizedKeyLen_rdh | // --------------------------------------------------------------------------------------------
@Override
public int getMaxNormalizedKeyLen() {
return 4;} | 3.26 |
flink_IntValue_getBinaryLength_rdh | // --------------------------------------------------------------------------------------------
@Override
public int getBinaryLength() {
return 4;
} | 3.26 |
flink_IntValue_setValue_rdh | /**
* Sets the encapsulated int to the specified value.
*
* @param value
* the new value of the encapsulated int.
*/
public void setValue(int value) {
this.value = value;
} | 3.26 |
flink_ConnectedComponents_main_rdh | // *************************************************************************
// PROGRAM
// *************************************************************************
public static void main(String... args) throws Exception {
LOGGER.warn(DATASET_DEPRECATION_INFO);
// Checking input parameters
final ParameterT... | 3.26 |
flink_ConnectedComponents_getVertexDataSet_rdh | // *************************************************************************
// UTIL METHODS
// *************************************************************************
private static DataSet<Long> getVertexDataSet(ExecutionEnvironment env, ParameterTool params) {
if (params.has("vertices")) {
return env.readCsvFi... | 3.26 |
flink_DataSinkNode_computeUnclosedBranchStack_rdh | // --------------------------------------------------------------------------------------------
// Branch Handling
// --------------------------------------------------------------------------------------------
@Override
public void computeUnclosedBranchStack() {
if (this.openBranches !=
null) {
return;... | 3.26 |
flink_DataSinkNode_getOutgoingConnections_rdh | /**
* Gets all outgoing connections, which is an empty set for the data sink.
*
* @return An empty list.
*/
@Override
public List<DagConnection> getOutgoingConnections() {
return Collections.emptyList();
} | 3.26 |
flink_DataSinkNode_getAlternativePlans_rdh | // --------------------------------------------------------------------------------------------
// Recursive Optimization
// --------------------------------------------------------------------------------------------
@Override
public List<PlanNode> getAlternativePlans(CostEstimator estimator) {
// check if we have... | 3.26 |
flink_DataSinkNode_getInputConnection_rdh | // --------------------------------------------------------------------------------------
/**
* Gets the input of the sink.
*
* @return The input connection.
*/
public DagConnection getInputConnection() {
return this.input;
} | 3.26 |
flink_DataSinkNode_getOperator_rdh | /**
* Gets the operator for which this optimizer sink node was created.
*
* @return The node's underlying operator.
*/
@Override
public GenericDataSinkBase<?> getOperator() {
return ((GenericDataSinkBase<?>) (super.getOperator()));
} | 3.26 |
flink_DataSinkNode_accept_rdh | // Miscellaneous
// --------------------------------------------------------------------------------------------
@Override
public void accept(Visitor<OptimizerNode> visitor) {
if (visitor.preVisit(this)) {
if (getPredecessorNode() != null) {
getPredecessorNode().accept(visitor);
} else ... | 3.26 |
flink_DataSinkNode_computeOperatorSpecificDefaultEstimates_rdh | /**
* Computes the estimated outputs for the data sink. Since the sink does not modify anything, it
* simply copies the output estimates from its direct predecessor.
*/
@Overrideprotected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics) {
this.estimatedNumRecords = getPredecessorNode().get... | 3.26 |
flink_StreamIterationHead_processInput_rdh | // ------------------------------------------------------------------------
@Override
protected void processInput(MailboxDefaultAction.Controller controller) throws Exception {
StreamRecord<OUT> nextRecord
= (shouldWait) ? dataChannel.poll(iterationWaitTime, TimeUnit.MILLISECONDS) : dataChannel.take();
if ... | 3.26 |
flink_StreamIterationHead_createBrokerIdString_rdh | // ------------------------------------------------------------------------
// Utilities
// ------------------------------------------------------------------------
/**
* Creates the identification string with which head and tail task find the shared blocking
* queue fo... | 3.26 |
flink_Tuple18_toString_rdh | // -------------------------------------------------------------------------------------------------
// standard utilities
// -------------------------------------------------------------------------------------------------
/**
* Creates a string representation of the tuple in the form (f0, f1, f2, f3, f4, f5, f6, f7,... | 3.26 |
flink_Tuple18_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_Tuple18_m0_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_Tuple18_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 Tuple18)) {
return false;
}@SuppressWarnings("... | 3.26 |
flink_CompletedCheckpointStore_getLatestCheckpointId_rdh | /**
* Returns the id of the latest completed checkpoints.
*/
default long getLatestCheckpointId() {
try {List<CompletedCheckpoint> allCheckpoints =
getAllCheckpoints();
if (allCheckpoints.isEmpty()) {
return 0;
}
return allCheckpoints.get(allCheckpoints.size() - 1).getC... | 3.26 |
flink_CompletedCheckpointStore_getLatestCheckpoint_rdh | /**
* Returns the latest {@link CompletedCheckpoint} instance or <code>null</code> if none was
* added.
*/
default CompletedCheckpoint getLatestCheckpoint() throws Exception {
List<CompletedCheckpoint> allCheckpoints = getAllCheckpoints();
if (allCheckpoints.isEmpty()) {
return null;
}
return... | 3.26 |
flink_CatalogColumnStatistics_copy_rdh | /**
* Create a deep copy of "this" instance.
*
* @return a deep copy
*/
public CatalogColumnStatistics copy() {
Map<String, CatalogColumnStatisticsDataBase> copy = CollectionUtil.newHashMapWithExpectedSize(columnStatisticsData.size());
for (Map.Entry<String, CatalogColumnStatisticsDataBase> entry : columnS... | 3.26 |
flink_ResourceCounter_getResourcesWithCount_rdh | /**
* Gets the stored resources and their counts. The counts are guaranteed to be positive (> 0).
*
* @return collection of {@link ResourceProfile} and count pairs
*/
public Collection<Map.Entry<ResourceProfile, Integer>> getResourcesWithCount() {
return resources.entrySet();
}
/**
* Checks whether resourc... | 3.26 |
flink_ResourceCounter_subtract_rdh | /**
* Subtracts decrement from the count of the given resourceProfile and returns the new value.
*
* @param resourceProfile
* resourceProfile from which to subtract decrement
* @param decrement
* decrement is the number by which to decrease resourceProfile
* @return new ResourceCounter containing the new val... | 3.26 |
flink_ResourceCounter_withResources_rdh | /**
* Creates a resource counter with the specified set of resources.
*
* @param resources
* resources with which to initialize the resource counter
* @return ResourceCounter which contains the specified set of resources
*/public static ResourceCounter withResources(Map<ResourceProfile, Integer> resources) {
... | 3.26 |
flink_ResourceCounter_withResource_rdh | /**
* Creates a resource counter with the given resourceProfile and its count.
*
* @param resourceProfile
* resourceProfile for the given count
* @param count
* count of the given resourceProfile
* @return ResourceCounter which contains the specified resourceProfile and its count
*/
public static ResourceCo... | 3.26 |
flink_ResourceCounter_isEmpty_rdh | /**
* Checks whether the resource counter is empty.
*
* @return {@code true} if the counter does not contain any counts; otherwise {@code false}
*/
public boolean isEmpty() {
return resources.isEmpty();
} | 3.26 |
flink_ResourceCounter_getTotalResourceCount_rdh | /**
* Computes the total number of resources in this counter.
*
* @return the total number of resources in this counter
*/public int getTotalResourceCount() {
return resources.isEmpty() ? 0 : resources.values().stream().reduce(0, Integer::sum);} | 3.26 |
flink_ResourceCounter_getTotalResource_rdh | /**
* Computes the total resources in this counter.
*
* @return the total resources in this counter
*/
public ResourceProfile getTotalResource() {
return resources.entrySet().stream().map(entry
-> entry.getKey().multiply(entry.getValue())).reduce(ResourceProfile.ZERO, ResourceProfile::merge);
} | 3.26 |
flink_ResourceCounter_add_rdh | /**
* Adds increment to the count of resourceProfile and returns the new value.
*
* @param resourceProfile
* resourceProfile to which to add increment
* @param increment
* increment is the number by which to increase the resourceProfile
* @return new ResourceCounter containing the result of the addition
*/
... | 3.26 |
flink_ResourceCounter_getResources_rdh | /**
* Gets all stored {@link ResourceProfile ResourceProfiles}.
*
* @return collection of stored {@link ResourceProfile ResourceProfiles}
*/
public Set<ResourceProfile> getResources() {
return resources.keySet(); } | 3.26 |
flink_ResourceCounter_empty_rdh | /**
* Creates an empty resource counter.
*
* @return empty resource counter
*/
public static ResourceCounter empty() {return
new ResourceCounter(Collections.emptyMap());
} | 3.26 |
flink_HashBasedDataBuffer_append_rdh | /**
* Partial data of the target record can be written if this {@link HashBasedDataBuffer} is full.
* The remaining data of the target record will be written to the next data region (a new data
* buffer or this data buffer after reset).
*/
@Override
public boolean append(ByteBuffer source, int targetChannel, Buffe... | 3.26 |
flink_HiveGenericUDAF_createAccumulator_rdh | /**
* This is invoked without calling open(), so we need to call init() for
* getNewAggregationBuffer(). TODO: re-evaluate how this will fit into Flink's new type
* inference and udf system
*/
@Override
public AggregationBuffer createAccumulator() {
try {
if (!initialized)
{
init()... | 3.26 |
flink_SharedReference_applySync_rdh | /**
* Executes the code on the referenced object in a synchronized fashion. Note that this method
* is prone to deadlock if multiple references are accessed in a synchronized fashion in a
* nested call-chain.
*/
default <R> R applySync(Function<T, R> function) {
T object = get();
synchronized(obje... | 3.26 |
flink_SharedReference_consumeSync_rdh | /**
* Executes the code on the referenced object in a synchronized fashion. Note that this method
* is prone to deadlock if multiple references are accessed in a synchronized fashion in a
* nested call-chain.
*/
default void consumeSync(Consumer<T> consumer) {
T object
= get();
synchronized(object) {
... | 3.26 |
flink_KafkaEventsGeneratorJob_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_MemCheckpointStreamFactory_close_rdh | // --------------------------------------------------------------------
@Override
public void close() {
if (closed.compareAndSet(false, true)) {
m0();
}
} | 3.26 |
flink_MemCheckpointStreamFactory_closeAndGetBytes_rdh | /**
* Closes the stream and returns the byte array containing the stream's data.
*
* @return The byte array containing the stream's data.
* @throws IOException
... | 3.26 |
flink_SourceEventWrapper_getSourceEvent_rdh | /**
*
* @return The {@link SourceEvent} in this SourceEventWrapper.
*/
public SourceEvent getSourceEvent() {
return sourceEvent;
} | 3.26 |
flink_Configuration_addAll_rdh | /**
* Adds all entries from the given configuration into this configuration. The keys are prepended
* with the given prefix.
*
* @param other
* The configuration whose entries are added to this configuration.
* @param prefix
* The prefix to prepend.
*/
public void addAll(Configuration other, String prefix)... | 3.26 |
flink_Configuration_setDouble_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 setDouble(ConfigOption<Double> key... | 3.26 |
flink_Configuration_getInteger_rdh | /**
* Returns the value associated with the given config option as an 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 if n... | 3.26 |
flink_Configuration_m0_rdh | /**
* Returns the value associated with the given config option as a boolean. 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 if no... | 3.26 |
flink_Configuration_removeKey_rdh | /**
* Removes given key from the configuration.
*
* @param key
* key of a config option to remove
* @return true is config has been removed, false otherwise
*/
public boolean
removeKey(String key) {
synchronized(this.confData) {
boolean removed = this.confData.remove(key) != null;
removed |= removePref... | 3.26 |
flink_Configuration_getFloat_rdh | /**
* Returns the value associated with the given config option as a float. 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 if no v... | 3.26 |
flink_Configuration_getBoolean_rdh | /**
* Returns the value associated with the given config option as a boolean.
*
* @param configOption
* The configuration option
* @return the (default) value associated with the given config option
*/
@PublicEvolving
public boolean getBoolean(ConfigOption<Boolean> configOption) {
return getOptional(configOptio... | 3.26 |
flink_Configuration_keySet_rdh | // --------------------------------------------------------------------------------------------
/**
* Returns the keys of all key/value pairs stored inside this configuration object.
*
* @return the keys of all key/value pairs stored inside this configuration object
*/
public Set<String> keySet() {
synchronized(thi... | 3.26 |
flink_Configuration_setValueInternal_rdh | // --------------------------------------------------------------------------------------------
<T> void setValueInternal(String key, T value, boolean canBePrefixMap) {
if (key == null) {
throw
new NullPointerException("Key must not be null.");
}
if (value == null) {
throw new NullPointerException("Value ... | 3.26 |
flink_Configuration_setInteger_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 setInteger(ConfigOption<Integer> k... | 3.26 |
flink_Configuration_hashCode_rdh | // --------------------------------------------------------------------------------------------
@Override
public int hashCode() {
int hash = 0;
for (String v35 : this.confData.keySet()) {
hash ^= v35.hashCode();
}
return hash;
} | 3.26 |
flink_Configuration_setBoolean_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 setBoolean(ConfigOption<Boolean>... | 3.26 |
flink_Configuration_setString_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 setString(ConfigOption<String> key... | 3.26 |
flink_Configuration_fromMap_rdh | // --------------------------------------------------------------------------------------------
/**
* Creates a new configuration that is initialized with the options of the given map.
*/
public static Configuration fromMap(Map<String, String> map) {
final Configuration configuration = new Configuration();
... | 3.26 |
flink_Configuration_get_rdh | /**
* Please check the java doc of {@link #getRawValueFromOption(ConfigOption)}. If no keys are
* found in {@link Configuration}, default value of the given option will return. Please make
* sure there will be at least one value available. Otherwise, a NPE will be thrown by Flink
* when the value is used.
*
* <p>... | 3.26 |
flink_Configuration_getString_rdh | /**
* Returns the value associated with the given config option as a string. 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
* @return the (default) ... | 3.26 |
flink_Configuration_getEnum_rdh | /**
* Returns the value associated with the given config option as an enum.
*
* @param enumClass
* The return enum class
* @param configOption
* The configuration option
* @throws IllegalArgumentException
* If the string associated with the given config option cannot
* be parsed as a value of the provi... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.