name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_InternalServiceDecorator_getInternalServiceName_rdh | /**
* Generate name of the internal Service.
*/
public static String getInternalServiceName(String clusterId) { return clusterId;
} | 3.26 |
flink_CliUtils_createFile_rdh | /**
* Create the file as well as the parent directory.
*/
public static boolean createFile(final Path filePath) {
try {
final Path parent = filePath.getParent();
if (parent == null) {
return false;
}
if (Files.notExists(parent)) {
Files.createDirectories(par... | 3.26 |
flink_CliUtils_getSessionTimeZone_rdh | /**
* Get time zone from the given session config.
*/public static ZoneId getSessionTimeZone(ReadableConfig sessionConfig) {
final String zone = sessionConfig.get(TableConfigOptions.LOCAL_TIME_ZONE);
return
TableConfigOptions.LOCAL_TIME_ZONE.defaultValue().equals(zone) ? ZoneId.systemDefault() : ZoneId.of... | 3.26 |
flink_FunctionDefinition_getRequirements_rdh | /**
* Returns the set of requirements this definition demands.
*/
default Set<FunctionRequirement> getRequirements() {
return Collections.emptySet();
} | 3.26 |
flink_StreamOperatorWrapper_finish_rdh | /**
* Finishes the wrapped operator and propagates the finish operation to the next wrapper that
* the {@link #next} points to.
*
* <p>Note that this method must be called in the task thread, because we need to call {@link MailboxExecutor#yield()} to take the mails of closing operator and runnin... | 3.26 |
flink_StreamOperatorWrapper_close_rdh | /**
* Close the operator.
*/
public void close() throws Exception {
closed = true;
wrapped.close();
} | 3.26 |
flink_StreamOperatorWrapper_m0_rdh | /**
* Checks if the wrapped operator has been closed.
*
* <p>Note that this method must be called in the task thread.
*/public boolean m0() {
return closed;
} | 3.26 |
flink_StreamOperatorWrapper_endOperatorInput_rdh | /**
* Ends an input of the operator contained by this wrapper.
*
* @param inputId
* the input ID starts from 1 which indicates the first input.
*/
public void endOperatorInput(int inputId) throws Exception {
if (wrapped instanceof BoundedOneInput) {
((BoundedOneInput) (wrapped)).endInput();
} els... | 3.26 |
flink_MetricStore_isRepresentativeAttempt_rdh | // Returns whether the attempt is the representative one. It's also true if the current
// execution attempt number for the subtask is not present in the currentExecutionAttempts,
// which means there should be only one execution
private boolean isRepresentativeAttempt(String jobID, String vertexID,
int
subtaskIndex, i... | 3.26 |
flink_MetricStore_getJobManager_rdh | /**
*
* @deprecated Use semantically equivalent {@link #getJobManagerMetricStore()}.
*/
@Deprecated
public synchronized ComponentMetricStore getJobManager() {
return ComponentMetricStore.unmodifiable(jobManager);
} | 3.26 |
flink_MetricStore_retainTaskManagers_rdh | /**
* Remove inactive task managers.
*
* @param activeTaskManagers
* to retain.
*/
synchronized void retainTaskManagers(List<String> activeTaskManagers) {
taskManagers.keySet().retainAll(activeTaskManagers);
} | 3.26 |
flink_MetricStore_getJobManagerMetricStore_rdh | // -----------------------------------------------------------------------------------------------------------------
// Accessors for sub MetricStores
// -----------------------------------------------------------------------------------------------------------------
/**
* Returns the {@link ComponentMetricStore} for ... | 3.26 |
flink_MetricStore_addAll_rdh | /**
* Add metric dumps to the store.
*
* @param metricDumps
* to add.
*/
synchronized void addAll(List<MetricDump> metricDumps) {
for (MetricDump metric : metricDumps) {
add(metric);}
} | 3.26 |
flink_MetricStore_retainJobs_rdh | /**
* Remove inactive jobs..
*
* @param activeJobs
* to retain.
*/
synchronized void retainJobs(List<String> activeJobs) {
jobs.keySet().retainAll(activeJobs);
representativeAttempts.keySet().retainAll(activeJobs);} | 3.26 |
flink_SqlLikeChainChecker_checkBegin_rdh | /**
* Matches the beginning of each string to a pattern.
*/
private static boolean checkBegin(BinaryStringData pattern, MemorySegment[] segments, int start, int len) {
int lenSub = pattern.getSizeInBytes();return (len >= lenSub) && SegmentsUtil.equals(pattern.getSegments(), 0, segments, start, lenSub);
} | 3.26 |
flink_SqlLikeChainChecker_checkEnd_rdh | /**
* Matches the ending of each string to its pattern.
*/
private static boolean checkEnd(BinaryStringData pattern, MemorySegment[] segments, int start, int len) {
int lenSub = pattern.getSizeInBytes();
return (len >= lenSub)
&& SegmentsUtil.equals(pattern.getSegments(), 0, segments,
(start + len) -... | 3.26 |
flink_SqlLikeChainChecker_indexMiddle_rdh | /**
* Matches the middle of each string to its pattern.
*
* @return Returns absolute offset of the match.
*/
private static int indexMiddle(BinaryStringData pattern, MemorySegment[] segments, int start, int len) {
return SegmentsUtil.find(segments, start, len, pattern.getSegments(), pattern.getOffset(), pattern... | 3.26 |
flink_PendingCheckpoint_toString_rdh | // ------------------------------------------------------------------------
// Utilities
// ------------------------------------------------------------------------
@Override public String toString()
{
return String.format("Pending Checkpoint %d @ %d - confirmed=%d, pending=%d", checkpointId, checkpointTimestamp, getNu... | 3.26 |
flink_PendingCheckpoint_getJobId_rdh | // --------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------
// Properties
// ------------------------------------------------------------------------
public JobID getJobId() {
return jobId;
} | 3.26 |
flink_PendingCheckpoint_abort_rdh | // ------------------------------------------------------------------------
// Cancellation
// ------------------------------------------------------------------------
/**
* Aborts a checkpoint with reason and cause.
*/
public void abort(CheckpointFailureReason reason, @Nullable
Throwable cause, CheckpointsCleaner ch... | 3.26 |
flink_PendingCheckpoint_canBeSubsumed_rdh | /**
* Checks whether this checkpoint can be subsumed or whether it should always continue,
* regardless of newer checkpoints in progress.
*
* @return True if the checkpoint can be subsumed, false otherwise.
*/
public boolean canBeSubsumed() {
// ... | 3.26 |
flink_PendingCheckpoint_acknowledgeTask_rdh | /**
* Acknowledges the task with the given execution attempt id and the given subtask state.
*
* @param executionAttemptId
* of the acknowledged task
* @param operatorSubtaskStates
* of the acknowledged task
* @param metrics
* Checkpo... | 3.26 |
flink_PendingCheckpoint_discard_rdh | /**
* Discard state. Must be called after {@link #dispose(boolean, CheckpointsCleaner,
* Runnable, Executor) dispose}.
*/
@Override
public void discard() {
synchronized(lock) {
if (discarded) {
Preconditions.checkState(disposed, "Checkpoint should be disposed before being discarded");
return;
} else {
discarded = t... | 3.26 |
flink_PendingCheckpoint_m1_rdh | /**
* Sets the handle for the canceller to this pending checkpoint. This method fails with an
* exception if a handle has already been set.
*
* @return true, if the handle was set, false, if the checkpoint is already disposed;
*/
public boolean m1(ScheduledFuture<?> cancellerHandle) {
synchronized(lock) {if (t... | 3.26 |
flink_PendingCheckpoint_acknowledgeMasterState_rdh | /**
* Acknowledges a master state (state generated on the checkpoint coordinator) to the pending
* checkpoint.
*
* @param identifier
* The identifier of the master state
* @param state
* The state to acknowledge
*/
public void acknowledgeMasterState(String identifier, @Nullable
MasterState state) {
synchron... | 3.26 |
flink_PendingCheckpoint_getCompletionFuture_rdh | // ------------------------------------------------------------------------
// Progress and Completion
// ------------------------------------------------------------------------
/**
* Returns the completion future.
*
* @return A future to the completed checkpoint
*/
public CompletableFuture<CompletedCheckpoint> ge... | 3.26 |
flink_BloomFilter_estimateFalsePositiveProbability_rdh | /**
* Compute the false positive probability based on given input entries and bits size. Note: this
* is just the math expected value, you should not expect the fpp in real case would under the
* return value for certain.
*
* @param inputEntries
* @param bitSize
* @return */
public static double estimateFalseP... | 3.26 |
flink_BloomFilter_toBytes_rdh | /**
* Serializing to bytes, note that only heap memory is currently supported.
*/
public static byte[] toBytes(BloomFilter filter) {
byte[] data = filter.bitSet.toBytes();
int byteSize = data.length;
byte[] bytes = new byte[8 + byteSize];
UNSAFE.putInt(bytes, BYTE_ARRAY_BASE_OFFSET, filter.numHashFu... | 3.26 |
flink_BloomFilter_fromBytes_rdh | /**
* Deserializing bytes array to BloomFilter. Currently, only heap memory is supported.
*/
public static BloomFilter fromBytes(byte[] bytes) {int numHashFunctions = UNSAFE.getInt(bytes, BYTE_ARRAY_BASE_OFFSET);
int byteSize = UNSAFE.getInt(bytes, BYTE_ARRAY_BASE_OFFSET + 4);
byte[] data = new byte[byteSize]... | 3.26 |
flink_BloomFilter_optimalNumOfHashFunctions_rdh | /**
* compute the optimal hash function number with given input entries and bits size, which would
* make the false positive probability lowest.
*
* @param expectEntries
* @param bitSize
* @return hash function number
*/
static int optimalNumOfHashFunctions(long expectEntries, long bitSize) {
return Math.max... | 3.26 |
flink_BloomFilter_mergeSerializedBloomFilters_rdh | /**
* Merge the bf2 bytes to bf1. After merge completes, the contents of bf1 will be changed.
*/
private static byte[] mergeSerializedBloomFilters(byte[] bf1Bytes, int bf1Start, int bf1Length, byte[] bf2Bytes, int bf2Start, int bf2Length) {
if (bf1Length != bf2Length) {
throw new IllegalArgumentException(... | 3.26 |
flink_BloomFilter_m0_rdh | /**
* Compute optimal bits number with given input entries and expected false positive probability.
*
* @param inputEntries
* @param fpp
* @return optimal bits number
*/
public static int m0(long inputEntries, double fpp) {
int numBits = ((int) (((-inputEntries) * Math.log(fpp)) / (Math.log(2) * Math.log(2)))... | 3.26 |
flink_SingleInputPlanNode_getComparator_rdh | /**
* Gets the specified comparator from this PlanNode.
*
* @param id
* The ID of the requested comparator.
* @return The specified comparator.
*/
public TypeComparatorFactory<?> getComparator(int id) {
return comparators[id];
} | 3.26 |
flink_SingleInputPlanNode_getTrueArray_rdh | // --------------------------------------------------------------------------------------------
protected static boolean[] getTrueArray(int length) {
final boolean[] a = new boolean[length];
for
(int i = 0; i < length; i++) {
a[i] = true;
}
return a;
} | 3.26 |
flink_SingleInputPlanNode_getKeys_rdh | /**
* Gets the key field indexes for the specified driver comparator.
*
* @param id
* The id of the driver comparator for which the key field indexes are requested.
* @return The key field indexes of the specified driver comparator.
*/
public FieldList getKeys(int id)
{
return this.driverKeys[id];
} | 3.26 |
flink_SingleInputPlanNode_setDriverKeyInfo_rdh | /**
* Sets the key field information for the specified driver comparator.
*
* @param keys
* The key field indexes for the specified driver comparator.
* @param sortOrder
* The key sort order for the specified driver comparator.
* @param id
* The ID of the driver comparator.
*/public void setDriverKeyInfo... | 3.26 |
flink_SingleInputPlanNode_getPredecessor_rdh | /**
* Gets the predecessor of this node, i.e. the source of the input channel.
*
* @return The predecessor of this node.
*/
public PlanNode getPredecessor() {
return
this.input.getSource();
} | 3.26 |
flink_SingleInputPlanNode_setComparator_rdh | /**
* Sets the specified comparator for this PlanNode.
*
* @param comparator
* The comparator to set.
* @param id
* The ID of the comparator to set.
*/
public void setComparator(TypeComparatorFactory<?> comparator, int id) {this.comparators[id] = comparator;
} | 3.26 |
flink_SingleInputPlanNode_accept_rdh | // --------------------------------------------------------------------------------------------
@Override
public void accept(Visitor<PlanNode> visitor) {
if (visitor.preVisit(this)) {
this.input.getSource().accept(visitor);
for (Channel broadcastInput : getBroadcastInputs()) {
broadcastI... | 3.26 |
flink_SingleInputPlanNode_getSortOrders_rdh | /**
* Gets the sort order for the specified driver comparator.
*
* @param id
* The id of the driver comparator for which the sort order is requested.
* @return The sort order of the specified driver comparator.
*/public boolean[] getSortOrders(int id) {
return driverSortOrders[id];
} | 3.26 |
flink_VertexThreadInfoTrackerBuilder_setCleanUpInterval_rdh | /**
* Sets {@code cleanUpInterval}.
*
* @param cleanUpInterval
* Clean up interval for completed stats.
* @return Builder.
*/
public VertexThreadInfoTrackerBuilder setCleanUpInterval(Duration cleanUpInterval) {
this.cleanUpInterval = cleanUpInterval;
return this;
} | 3.26 |
flink_VertexThreadInfoTrackerBuilder_setJobVertexStatsCache_rdh | /**
* Sets {@code jobVertexStatsCache}. This is currently only used for testing.
*
* @param jobVertexStatsCache
* The Cache instance to use for caching statistics. Will use the
* default defined in {@link VertexThreadInfoTrackerBuilder#defaultCache()} if not set.
* @return Builder.
*/
@VisibleForTesting
Vert... | 3.26 |
flink_VertexThreadInfoTrackerBuilder_newBuilder_rdh | /**
* Create a new {@link VertexThreadInfoTrackerBuilder}.
*
* @return Builder.
*/
public static VertexThreadInfoTrackerBuilder newBuilder(GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever, ScheduledExecutorService executor, Time restTimeout) {
return new VertexThreadInfoTrackerBuilder(... | 3.26 |
flink_VertexThreadInfoTrackerBuilder_build_rdh | /**
* Constructs a new {@link VertexThreadInfoTracker}.
*
* @return a new {@link VertexThreadInfoTracker} instance.
*/
public VertexThreadInfoTracker build() {
if (jobVertexStatsCache == null) {
jobVertexStatsCache = defaultCache();
}
if (executionVertexStatsCache == null) {
executionVe... | 3.26 |
flink_VertexThreadInfoTrackerBuilder_setMaxThreadInfoDepth_rdh | /**
* Sets {@code delayBetweenSamples}.
*
* @param maxThreadInfoDepth
* Limit for the depth of the stack traces included when sampling
* threads.
* @return Builder.
*/
public VertexThreadInfoTrackerBuilder setMaxThreadInfoDepth(int maxThreadInfoDepth) {
this.maxThreadInfoDepth = maxThreadInfoDepth;
r... | 3.26 |
flink_VertexThreadInfoTrackerBuilder_setExecutionVertexStatsCache_rdh | /**
* Sets {@code executionVertexStatsCache}. This is currently only used for testing.
*
* @param executionVertexStatsCache
* The Cache instance to use for caching statistics. Will use
* the default defined in {@link VertexThreadInfoTrackerBuilder#defaultCache()}... | 3.26 |
flink_VertexThreadInfoTrackerBuilder_setStatsRefreshInterval_rdh | /**
* Sets {@code statsRefreshInterval}.
*
* @param statsRefreshInterval
* Time interval after which the available thread info stats are
* deprecated and need to be refreshed.
* @return Builder.
*/
public VertexThreadInfoTrackerBuilder setStatsRefreshInterval(Duration statsRefreshInterval) {
this.statsRe... | 3.26 |
flink_VertexThreadInfoTrackerBuilder_setDelayBetweenSamples_rdh | /**
* Sets {@code delayBetweenSamples}.
*
* @param delayBetweenSamples
* Delay between individual samples per task.
* @return Builder.
*/
public VertexThreadInfoTrackerBuilder setDelayBetweenSamples(Duration delayBetweenSamples) {
this.delayBetweenSamples =
delayBetweenSamples;return this;
} | 3.26 |
flink_VertexThreadInfoTrackerBuilder_setNumSamples_rdh | /**
* Sets {@code numSamples}.
*
* @param numSamples
* Number of thread info samples to collect for each subtask.
* @return Builder.
*/
public VertexThreadInfoTrackerBuilder setNumSamples(int numSamples) {
this.numSamples = numSamples;
return this;
} | 3.26 |
flink_AsyncDataStream_unorderedWaitWithRetry_rdh | /**
* Adds an AsyncWaitOperator with an AsyncRetryStrategy to support retry of AsyncFunction. The
* order of output stream records may be reordered.
*
* @param in
* Input {@link DataStream}
* @param func
* {@link AsyncFunction}
* @param timeout
* from first invoke to final completion of asynchronous oper... | 3.26 |
flink_AsyncDataStream_orderedWaitWithRetry_rdh | /**
* Adds an AsyncWaitOperator with an AsyncRetryStrategy to support retry of AsyncFunction. The
* order to process input records is guaranteed to be the same as * input ones.
*
* @param in
* Input {@link DataStream}
* @param func
* {@link Asyn... | 3.26 |
flink_AsyncDataStream_orderedWait_rdh | /**
* Adds an AsyncWaitOperator. The order to process input records is guaranteed to be the same as
* input ones.
*
* @param in
* Input {@link DataStream}
* @param func
* {@link AsyncFunction}
* @param timeout
* for the asynchronous operation to complete
* @pa... | 3.26 |
flink_AsyncDataStream_m0_rdh | /**
* Adds an AsyncWaitOperator. The order of output stream records may be reordered.
*
* @param in
* Input {@link DataStream}
* @param func
* {@link AsyncFunction}
* @param timeout
* for the asynchronous operation to complete
* @param timeUnit
* of the given timeout
* @param capacity
* The max nu... | 3.26 |
flink_AsyncDataStream_unorderedWait_rdh | /**
* Adds an AsyncWaitOperator. The order of output stream records may be reordered.
*
* @param in
* Input {@link DataStream}
* @param func
* {@link AsyncFunction}
* @param timeout
* for the asynchronous operation to complete
* @param timeUnit
* of the given timeout
* @param <IN>
* Type of input ... | 3.26 |
flink_StreamConfig_setManagedMemoryFractionOperatorOfUseCase_rdh | /**
* Fraction of managed memory reserved for the given use case that this operator should use.
*/
public void setManagedMemoryFractionOperatorOfUseCase(ManagedMemoryUseCase managedMemoryUseCase, double fraction) {
final ConfigOption<Double> configOption = getManagedMemoryFractionConfigOption(managedMemoryUse... | 3.26 |
flink_StreamConfig_setCheckpointingEnabled_rdh | // --------------------- checkpointing -----------------------
public void setCheckpointingEnabled(boolean
enabled) {
config.setBoolean(CHECKPOINTING_ENABLED, enabled); } | 3.26 |
flink_StreamConfig_clearInitialConfigs_rdh | /**
* In general, we don't clear any configuration. However, the {@link #SERIALIZED_UDF} may be
* very large when operator includes some large objects, the SERIALIZED_UDF is used to create a
* StreamOperator and usually only needs to be ... | 3.26 |
flink_StreamConfig_setChainStart_rdh | // ------------------------------------------------------------------------
// Miscellaneous
// ------------------------------------------------------------------------
public void setChainStart() {
... | 3.26 |
flink_StreamConfig_setVertexNonChainedOutputs_rdh | /**
* Sets the job vertex level non-chained outputs. The given output list must have the same order
* with {@link JobVertex#getProducedDataSets()}.
*/
public void setVertexNonChainedOutputs(List<NonChainedOutput> nonChainedOutputs) {
f2.put(VERTEX_NONCHAINED_OUTPUTS, nonChainedOutputs);
} | 3.26 |
flink_StreamConfig_serializeAllConfigs_rdh | /**
* Serialize all object configs synchronously. Only used for operators which need to reconstruct
* the StreamConfig internally or test.
*/
public void serializeAllConfigs() {
f2.forEach((key, object) -> {
try {
InstantiationUtil.writeObjectToConfig(object, this.config, key);
} catc... | 3.26 |
flink_StreamConfig_getManagedMemoryFractionOperatorUseCaseOfSlot_rdh | /**
* Fraction of total managed memory in the slot that this operator should use for the given use
* case.
*/
public double getManagedMemoryFractionOperatorUseCaseOfSlot(ManagedMemoryUseCase managedMemoryUseCase, Configuration taskManagerConfig, ClassLoader cl) {
return ManagedMemoryUtils.convertToFractionOfSlot... | 3.26 |
flink_StreamConfig_setStateBackend_rdh | // ------------------------------------------------------------------------
// State backend
// ------------------------------------------------------------------------
public void setStateBackend(StateBackend backend) {
if (backend != null) {
f2.put(S... | 3.26 |
flink_StreamConfig_triggerSerializationAndReturnFuture_rdh | /**
* Trigger the object config serialization and return the completable future.
*/
public CompletableFuture<StreamConfig> triggerSerializationAndReturnFuture(Executor ioExecutor) {
FutureUtils.combineAll(f3.values()).thenAcceptAsync(chainedConfigs -> {
try {
// Serialize all the objects to co... | 3.26 |
flink_StreamConfig_setOperatorNonChainedOutputs_rdh | /**
* Sets the operator level non-chained outputs.
*/
public void setOperatorNonChainedOutputs(List<NonChainedOutput> nonChainedOutputs) {
f2.put(OP_NONCHAINED_OUTPUTS, nonChainedOutputs);
} | 3.26 |
flink_OperatorSubtaskState_getManagedOperatorState_rdh | // --------------------------------------------------------------------------------------------
public StateObjectCollection<OperatorStateHandle> getManagedOperatorState() {
return managedOperatorState;
} | 3.26 |
flink_OperatorSubtaskState_equals_rdh | // --------------------------------------------------------------------------------------------
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}if ((o == null)
|| (getClass() != o.getClass())) {
return false;
}
OperatorSubtaskState that = ((OperatorSubtaskS... | 3.26 |
flink_SharedStateRegistryKey_forStreamStateHandle_rdh | /**
* Create a unique key based on physical id.
*/
public static SharedStateRegistryKey forStreamStateHandle(StreamStateHandle handle) {
String keyString = handle.getStreamStateHandleID().getKeyString();
// key strings tend to be longer, so we use the MD5 of the key string to save memory
return new Shared... | 3.26 |
flink_SlotSharingGroup_setTaskHeapMemoryMB_rdh | /**
* Set the task heap memory for this SlotSharingGroup in MB.
*/
public Builder setTaskHeapMemoryMB(int taskHeapMemoryMB) {
checkArgument(taskHeapMemoryMB > 0, "The task heap memory should be positive.");
this.taskHeapMemory = MemorySize.ofMebiBytes(taskHeapMemoryMB);
return this;
} | 3.26 |
flink_SlotSharingGroup_setTaskHeapMemory_rdh | /**
* Set the task heap memory for this SlotSharingGroup.
*/
public Builder setTaskHeapMemory(MemorySize taskHeapMemory) {
checkArgument(taskHeapMemory.compareTo(MemorySize.ZERO) > 0, "The task heap memory should be positive.");
this.taskHeapMemory = taskHeapMemory;
return this;} | 3.26 |
flink_SlotSharingGroup_build_rdh | /**
* Build the SlotSharingGroup.
*/
public SlotSharingGroup build() {
if ((cpuCores != null) && (taskHeapMemory != null)) {
taskOffHeapMemory = Optional.ofNullable(taskOffHeapMemory).orElse(MemorySize.ZERO);
managedMemory = Optional.ofNullable(managedMemory).orElse(MemorySize.ZERO);
retu... | 3.26 |
flink_SlotSharingGroup_m0_rdh | /**
* Set the CPU cores for this SlotSharingGroup.
*/
public Builder m0(double cpuCores) {
checkArgument(cpuCores > 0,
"The cpu cores should be positive.");
this.cpuCores = new CPUResource(cpuCores);
return this;
} | 3.26 |
flink_SlotSharingGroup_m1_rdh | /**
* Set the task off-heap memory for this SlotSharingGroup.
*/
public Builder m1(MemorySize taskOffHeapMemory) {
this.taskOffHeapMemory = taskOffHeapMemory;
return this;
} | 3.26 |
flink_SlotSharingGroup_setTaskOffHeapMemoryMB_rdh | /**
* Set the task off-heap memory for this SlotSharingGroup in MB.
*/
public Builder setTaskOffHeapMemoryMB(int taskOffHeapMemoryMB) {
this.taskOffHeapMemory = MemorySize.ofMebiBytes(taskOffHeapMemoryMB);
return this;
} | 3.26 |
flink_BlobServer_globalCleanupAsync_rdh | /**
* Removes all BLOBs from local and HA store belonging to the given {@link JobID}.
*
* @param jobId
* ID of the job this blob belongs to
*/@Override
public CompletableFuture<Void> globalCleanupAsync(JobID jobId, Executor executor) {
checkNotNull(jobId);
return runAsyncWithWriteLock(() -> {
IOE... | 3.26 |
flink_BlobServer_getReadWriteLock_rdh | /**
* Returns the lock used to guard file accesses.
*/
ReadWriteLock getReadWriteLock() {
return readWriteLock;
} | 3.26 |
flink_BlobServer_moveTempFileToStore_rdh | /**
* Moves the temporary <tt>incomingFile</tt> to its permanent location where it is available for
* use.
*
* @param incomingFile
* temporary file created during transfer
* @param jobId
* ID of the job this blob belongs to or <tt>null</tt> if job-unrelated
* @param digest
* BLOB content digest, i.e. has... | 3.26 |
flink_BlobServer_getStorageDir_rdh | // --------------------------------------------------------------------------------------------
// Path Accessors
// --------------------------------------------------------------------------------------------
public File getStorageDir() {
return storageDir.deref();
} | 3.26 |
flink_BlobServer_createTemporaryFilename_rdh | /**
* Returns a temporary file inside the BLOB server's incoming directory.
*
* @return a temporary file inside the BLOB server's incoming directory
* @throws IOException
* if creating the directory fails
*/
File createTemporaryFilename() throws IOException {
return new File(BlobUtils.getIncomingDirectory(s... | 3.26 |
flink_BlobServer_getCurrentActiveConnections_rdh | /**
* Returns all the current active connections in the BlobServer.
*
* @return the list of all the active in current BlobServer
*/
List<BlobServerConnection> getCurrentActiveConnections()
{
synchronized(activeConnections) {
return new ArrayList<>(activeConnections);
}
} | 3.26 |
flink_BlobServer_getBlobExpiryTimes_rdh | /**
* Returns the blob expiry times - for testing purposes only!
*
* @return blob expiry times (internal state!)
*/
@VisibleForTesting
ConcurrentMap<Tuple2<JobID, TransientBlobKey>, Long> getBlobExpiryTimes() {
return blobExpiryTimes;
} | 3.26 |
flink_BlobServer_putBuffer_rdh | /**
* Uploads the data of the given byte array for the given job to the BLOB server.
*
* @param jobId
* the ID of the job the BLOB belongs to
* @param value
* the buffer to upload
* @param blobType
* whether to make the data permanent or transient
* @return the computed BLOB key identifying the BLOB on t... | 3.26 |
flink_BlobServer_getFile_rdh | /**
* Returns the path to a local copy of the file associated with the provided job ID and blob
* key.
*
* <p>We will first attempt to serve the BLOB from the local storage. If the BLOB is not in
* there, we will try to download it from the HA store.
*
* @param jobId
* ID of the job this blob belongs to
* @p... | 3.26 |
flink_BlobServer_getStorageLocation_rdh | /**
* Returns a file handle to the file associated with the given blob key on the blob server.
*
* <p><strong>This is only called from {@link BlobServerConnection} or unit tests.</strong>
*
* @param jobId
* ID of the job this blob belongs to (or <tt>null</tt> if job-unrelated)
* @param key
* identifying the... | 3.26 |
flink_BlobServer_getFileInternalWithReadLock_rdh | /**
* Retrieves the local path of a file associated with a job and a blob key.
*
* <p>The blob server looks the blob key up in its local storage. If the file exists, it is
* returned. If the file does not exist, it is retrieved from the HA blob store (if available)
* or a {@link FileNotFoundException} is thrown.
... | 3.26 |
flink_BlobServer_getPort_rdh | /**
* Returns the port on which the server is listening.
*
* @return port on which the server is listening
*/
@Override public int getPort() {
return this.serverSocket.getLocalPort();
} | 3.26 |
flink_BlobServer_getServerSocket_rdh | /**
* Access to the server socket, for testing.
*/
ServerSocket getServerSocket() {
return this.serverSocket;
} | 3.26 |
flink_BlobServer_putInputStream_rdh | /**
* Uploads the data from the given input stream for the given job to the BLOB server.
*
* @param jobId
* the ID of the job the BLOB belongs to
* @param inputStream
* the input stream to read the data from
* @param blobType
* whether to make the data permanent or transient
* @return the computed BLOB k... | 3.26 |
flink_BlobServer_getFileInternal_rdh | /**
* Helper to retrieve the local path of a file associated with a job and a blob key.
*
* <p>The blob server looks the blob key up in its local storage. If the file exists, it is
* returned. If the file does not exist, it is retrieved from the HA blob store (if available)
* or a {@link FileNotFoundException} is ... | 3.26 |
flink_BlobServer_close_rdh | /**
* Shuts down the BLOB server.
*/
@Override
public void close() throws IOException {
cleanupTimer.cancel();
if (shutdownRequested.compareAndSet(false, true)) {
Exception exception = null;
try {
this.serv... | 3.26 |
flink_CopyOnWriteStateMapSnapshot_getSnapshotVersion_rdh | /**
* Returns the internal version of the {@link CopyOnWriteStateMap} when this snapshot was
* created. This value must be used to tell the {@link CopyOnWriteStateMap} when to release this
* snapshot.
*/
int getSnapshotVersion() {
return snapshotVersion;
} | 3.26 |
flink_CopyOnWriteStateMapSnapshot_moveChainsToBackOfArray_rdh | /**
* Move the chains in snapshotData to the back of the array, and return the index of the
* first chain from the front.
*/
int moveChainsToBackOfArray() {
int index = snapshotData.length - 1;
// find the first null chain from the back
wh... | 3.26 |
flink_VoidNamespace_hashCode_rdh | // ------------------------------------------------------------------------
// Standard Utilities
// ------------------------------------------------------------------------
@Override
public int hashCode() {
return 99;
} | 3.26 |
flink_VoidNamespace_readResolve_rdh | // make sure that we preserve the singleton properly on serialization
private Object readResolve() throws ObjectStreamException {
return
INSTANCE;
} | 3.26 |
flink_VoidNamespace_get_rdh | /**
* Getter for the singleton instance.
*/
public static VoidNamespace get() {
return INSTANCE;
} | 3.26 |
flink_ApiSpecGeneratorUtils_findAdditionalFieldType_rdh | /**
* Find whether the class contains dynamic fields that need to be documented.
*
* @param clazz
* class to check
* @return optional that is non-empty if the class is annotated with {@link FlinkJsonSchema.AdditionalFields}
*/public static Optional<Class<?>> findAdditionalFieldType(Class<?> clazz) {
final F... | 3.26 |
flink_ApiSpecGeneratorUtils_shouldBeDocumented_rdh | /**
* Checks whether the given endpoint should be documented.
*
* @param spec
* endpoint to check
* @return true if the endpoint should be documented
*/
public static boolean shouldBeDocumented(MessageHeaders<? extends RequestBody, ? extends ResponseBody, ? extends MessageParameters> spec) {
return spec.ge... | 3.26 |
flink_CompletedOperationCache_registerOngoingOperation_rdh | /**
* Registers an ongoing operation with the cache.
*
* @param operationResultFuture
* A future containing the operation result.
* @throws IllegalStateException
* if the cache is already shutting down
*/
public void registerOngoingOperation(final K operationKey,
final CompletableFuture<R> operationResultFut... | 3.26 |
flink_CompletedOperationCache_accessOperationResultOrError_rdh | /**
* Returns the {@link OperationResult} of the asynchronous operation. If the operation is
* finished, marks the result as accessed.
*/
public OperationResult<R> accessOperationResultOrError() {if (operationResult.isFinished()) {
markAccessed();
}
return operationResult;
} | 3.26 |
flink_CompletedOperationCache_get_rdh | /**
* Returns an optional containing the {@link OperationResult} for the specified key, or an empty
* optional if no operation is registered under the key.
*/
public Optional<OperationResult<R>> get(final K operationKey) {
ResultAccessTracker<R> resultAccessTracker;if (((resultAccessTracker = registeredOperation... | 3.26 |
flink_StructuredOptionsSplitter_splitEscaped_rdh | /**
* Splits the given string on the given delimiter. It supports quoting parts of the string with
* either single (') or double quotes ("). Quotes can be escaped by doubling the quotes.
*
* <p>Examples:
*
* <ul>
* <li>'A;B';C => [A;B], [C]
* <li>"AB'D";B;C => [AB'D], [B], [C]
* <li>"AB'""D;B";C => [AB'\... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.