name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
framework_ConnectorMap_getComponentConnectors | /**
* Gets all registered {@link ComponentConnector} instances.
*
* @return An array of all registered {@link ComponentConnector} instances
*
* @deprecated As of 7.0.1, use {@link #getComponentConnectorsAsJsArray()}
* for better performance.
*/
@Deprecated
public ComponentConnector[] getComponentConn... | 3.68 |
hbase_KeyValue_create | /**
* Create a KeyValue reading <code>length</code> from <code>in</code>
* @param length length of the Key
* @param in Input to read from
* @return Created KeyValue OR if we find a length of zero, we will return null which can be
* useful marking a stream as done.
* @throws IOException if any IO error... | 3.68 |
morf_HumanReadableStatementHelper_generateUpdateStatementString | /**
* Generates a human-readable description of a data update operation.
*
* @param statement the data upgrade statement to describe
* @return a string containing the human-readable description of the operation
*/
private static String generateUpdateStatementString(final UpdateStatement statement) {
final String... | 3.68 |
hadoop_MetricsCache_get | /**
* Get the cached record
* @param name of the record
* @param tags of the record
* @return the cached record or null
*/
public Record get(String name, Collection<MetricsTag> tags) {
RecordCache rc = map.get(name);
if (rc == null) return null;
return rc.get(tags);
} | 3.68 |
hbase_Scan_setBatch | /**
* Set the maximum number of cells to return for each call to next(). Callers should be aware that
* this is not equivalent to calling {@link #setAllowPartialResults(boolean)}. If you don't allow
* partial results, the number of cells in each Result must equal to your batch setting unless it
* is the last Result... | 3.68 |
flink_DeltaIteration_getSolutionSet | /**
* Gets the solution set of the delta iteration. The solution set represents the state that is
* kept across iterations.
*
* @return The solution set of the delta iteration.
*/
public SolutionSetPlaceHolder getSolutionSet() {
return solutionSetPlaceholder;
} | 3.68 |
flink_TaskExecutor_tryLoadLocalAllocationSnapshots | /**
* This method tries to repopulate the {@link JobTable} and {@link TaskSlotTable} from the local
* filesystem in a best-effort manner.
*/
private void tryLoadLocalAllocationSnapshots() {
Collection<SlotAllocationSnapshot> slotAllocationSnapshots =
slotAllocationSnapshotPersistenceService.loadAlloc... | 3.68 |
framework_VDragAndDropWrapper_hookHtml5DragStart | /**
* @since 7.2
*/
protected void hookHtml5DragStart(Element el) {
hookHtml5DragStart(DOM.asOld(el));
} | 3.68 |
hbase_RegionServerObserver_preClearCompactionQueues | /**
* This will be called before clearing compaction queues
* @param ctx the environment to interact with the framework and region server.
*/
default void preClearCompactionQueues(
final ObserverContext<RegionServerCoprocessorEnvironment> ctx) throws IOException {
} | 3.68 |
flink_StateMachineExample_rpsFromSleep | // Used for backwards compatibility to convert legacy 'sleep' parameter to records per second.
private static double rpsFromSleep(int sleep, int parallelism) {
return (1000d / sleep) * parallelism;
} | 3.68 |
dubbo_SingleRouterChain_setInvokers | /**
* Notify router chain of the initial addresses from registry at the first time.
* Notify whenever addresses in registry change.
*/
public void setInvokers(BitList<Invoker<T>> invokers) {
this.invokers = (invokers == null ? BitList.emptyList() : invokers);
routers.forEach(router -> router.notify(this.invo... | 3.68 |
dubbo_ReferenceConfig_getInvoker | /**
* just for test
*
* @return
*/
@Deprecated
@Transient
public Invoker<?> getInvoker() {
return invoker;
} | 3.68 |
zxing_CalendarResultHandler_addCalendarEvent | /**
* Sends an intent to create a new calendar event by prepopulating the Add Event UI. Older
* versions of the system have a bug where the event title will not be filled out.
*
* @param summary A description of the event
* @param start The start time
* @param allDay if true, event is considered to be all day ... | 3.68 |
hudi_InternalSchemaUtils_collectRenameCols | /**
* Try to find all renamed cols between oldSchema and newSchema.
*
* @param oldSchema oldSchema
* @param newSchema newSchema which modified from oldSchema
* @return renameCols Map. (k, v) -> (colNameFromNewSchema, colNameLastPartFromOldSchema)
*/
public static Map<String, String> collectRenameCols(InternalSche... | 3.68 |
flink_RemoteInputChannel_checkpointStarted | /**
* Spills all queued buffers on checkpoint start. If barrier has already been received (and
* reordered), spill only the overtaken buffers.
*/
public void checkpointStarted(CheckpointBarrier barrier) throws CheckpointException {
synchronized (receivedBuffers) {
if (barrier.getId() < lastBarrierId) {
... | 3.68 |
hadoop_SnappyCodec_getDecompressorType | /**
* Get the type of {@link Decompressor} needed by this {@link CompressionCodec}.
*
* @return the type of decompressor needed by this codec.
*/
@Override
public Class<? extends Decompressor> getDecompressorType() {
return SnappyDecompressor.class;
} | 3.68 |
hbase_QuotaSettingsFactory_limitTableSpace | /**
* Creates a {@link QuotaSettings} object to limit the FileSystem space usage for the given table
* to the given size in bytes. When the space usage is exceeded by the table, the provided
* {@link SpaceViolationPolicy} is enacted on the table.
* @param tableName The name of the table on which the quota sho... | 3.68 |
hmily_HmilySQLComputeUtils_executeQuery | /**
* Execute query.
*
* @param connection connection
* @param sql sql
* @param parameters parameters
* @return records
* @throws SQLException SQL exception
*/
public static Collection<Map<String, Object>> executeQuery(final Connection connection, final String sql, final List<Object> parameters) throws SQLExcep... | 3.68 |
hudi_SparkBulkInsertHelper_bulkInsert | /**
* Do bulk insert using WriteHandleFactory from the partitioner (i.e., partitioner.getWriteHandleFactory)
*/
public HoodieData<WriteStatus> bulkInsert(HoodieData<HoodieRecord<T>> inputRecords,
String instantTime,
HoodieTable<T, Hoo... | 3.68 |
querydsl_BeanPath_createComparable | /**
* Create a new Comparable typed path
*
* @param <A>
* @param property property name
* @param type property type
* @return property path
*/
@SuppressWarnings("unchecked")
protected <A extends Comparable> ComparablePath<A> createComparable(String property, Class<? super A> type) {
return add(new Comparable... | 3.68 |
flink_DeltaIterationBase_setSolutionSetUnManaged | /**
* Sets whether to keep the solution set in managed memory (safe against heap exhaustion) or
* unmanaged memory (objects on heap).
*
* @param solutionSetUnManaged True to keep the solution set in unmanaged memory, false to keep
* it in managed memory.
* @see #isSolutionSetUnManaged()
*/
public void setSol... | 3.68 |
pulsar_AbstractHierarchicalLedgerManager_asyncProcessLedgersInSingleNode | /**
* Process ledgers in a single zk node.
*
* <p>
* for each ledger found in this zk node, processor#process(ledgerId) will be triggerred
* to process a specific ledger. after all ledgers has been processed, the finalCb will
* be called with provided context object. The RC passed to finalCb is decided by :
* <u... | 3.68 |
hbase_CompactionConfiguration_getCompactionRatioOffPeak | /** Returns Off peak Ratio used for compaction */
public double getCompactionRatioOffPeak() {
return offPeakCompactionRatio;
} | 3.68 |
hadoop_CacheStats_getCacheCapacity | /**
* Get the maximum amount of bytes we can cache. This is a constant.
*/
public long getCacheCapacity() {
return maxBytes;
} | 3.68 |
pulsar_Record_getTopicName | /**
* If the record originated from a topic, report the topic name.
*/
default Optional<String> getTopicName() {
return Optional.empty();
} | 3.68 |
flink_Configuration_getFloat | /**
* 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 value was m... | 3.68 |
hadoop_AbfsConfiguration_shouldTrackLatency | /**
* Whether {@code AbfsClient} should track and send latency info back to storage servers.
*
* @return a boolean indicating whether latency should be tracked.
*/
public boolean shouldTrackLatency() {
return this.trackLatency;
} | 3.68 |
hadoop_ErasureCodingPolicyState_read | /** Read from in. */
public static ErasureCodingPolicyState read(DataInput in) throws IOException {
return fromValue(in.readByte());
} | 3.68 |
flink_TemplateUtils_findInputOnlyTemplates | /** Hints that only declare an input. */
static Set<FunctionSignatureTemplate> findInputOnlyTemplates(
Set<FunctionTemplate> global,
Set<FunctionTemplate> local,
Function<FunctionTemplate, FunctionResultTemplate> accessor) {
return Stream.concat(global.stream(), local.stream())
.... | 3.68 |
hadoop_AzureBlobFileSystem_removeDefaultAcl | /**
* Removes all default ACL entries from files and directories.
*
* @param path Path to modify
* @throws IOException if an ACL could not be modified
*/
@Override
public void removeDefaultAcl(final Path path) throws IOException {
LOG.debug("AzureBlobFileSystem.removeDefaultAcl path: {}", path);
TracingContext... | 3.68 |
hadoop_QueueCapacityUpdateContext_getUpdateWarnings | /**
* Returns all update warnings occurred in this update phase.
* @return update warnings
*/
public List<QueueUpdateWarning> getUpdateWarnings() {
return warnings;
} | 3.68 |
hbase_CompactSplit_shutdownLongCompactions | /**
* Shutdown the long compaction thread pool. Should only be used in unit test to prevent long
* compaction thread pool from stealing job from short compaction queue
*/
void shutdownLongCompactions() {
this.longCompactions.shutdown();
} | 3.68 |
flink_FlinkRexBuilder_areAssignable | /** Copied from the {@link RexBuilder} to fix the {@link RexBuilder#makeIn}. */
private boolean areAssignable(RexNode arg, List<? extends RexNode> bounds) {
for (RexNode bound : bounds) {
if (!SqlTypeUtil.inSameFamily(arg.getType(), bound.getType())
&& !(arg.getType().isStruct() && bound.get... | 3.68 |
pulsar_LoadManagerShared_getNamespaceNameFromBundleName | // From a full bundle name, extract the namespace name.
public static String getNamespaceNameFromBundleName(String bundleName) {
// the bundle format is property/cluster/namespace/0x00000000_0xFFFFFFFF
int pos = bundleName.lastIndexOf('/');
checkArgument(pos != -1);
return bundleName.substring(0, pos);
... | 3.68 |
querydsl_SQLExpressions_lag | /**
* expr evaluated at the row that is one row before the current row within the partition
*
* @param expr expression
* @return lag(expr)
*/
public static <T> WindowOver<T> lag(Expression<T> expr) {
return new WindowOver<T>(expr.getType(), SQLOps.LAG, expr);
} | 3.68 |
framework_AbstractMedia_setAutoplay | /**
* Sets whether the media is to automatically start playback when enough
* data has been loaded.
*
* @param autoplay
*/
public void setAutoplay(boolean autoplay) {
getState().autoplay = autoplay;
} | 3.68 |
rocketmq-connect_DeadLetterQueueConfig_dlqTopicName | /**
* get dlq topic name
*
* @return
*/
public String dlqTopicName() {
return config.getString(DLQ_TOPIC_NAME_CONFIG, "");
} | 3.68 |
framework_DefaultEditorEventHandler_getDeltaFromKeyDownEvent | /**
* Returns the direction to which the cursor should move.
*
* @param event
* the mouse event, not null.
* @return the direction. May return null if the cursor should not move.
*/
protected CursorMoveDelta getDeltaFromKeyDownEvent(
EditorDomEvent<T> event) {
Event e = event.getDomEvent();... | 3.68 |
graphhopper_TileBasedElevationProvider_setBaseURL | /**
* Specifies the service URL where to download the elevation data. An empty string should set it
* to the default URL. Default is a provider-dependent URL which should work out of the box.
*/
public TileBasedElevationProvider setBaseURL(String baseUrl) {
if (baseUrl == null || baseUrl.isEmpty())
throw... | 3.68 |
hadoop_ResourceRequestSet_addAndOverrideRRSet | /**
* Merge a requestSet into this one.
*
* @param requestSet the requestSet to merge
* @throws YarnException indicates exceptions from yarn servers.
*/
public void addAndOverrideRRSet(ResourceRequestSet requestSet)
throws YarnException {
if (requestSet == null) {
return;
}
for (ResourceRequest rr : ... | 3.68 |
framework_AbstractComponent_isVisible | /*
* (non-Javadoc)
*
* @see com.vaadin.ui.Component#isVisible()
*/
@Override
public boolean isVisible() {
return visible;
} | 3.68 |
dubbo_RpcServiceContext_getRequest | /**
* Get the request object of the underlying RPC protocol, e.g. HttpServletRequest
*
* @return null if the underlying protocol doesn't provide support for getting request or the request is not of the specified type
*/
@Override
@SuppressWarnings("unchecked")
public <T> T getRequest(Class<T> clazz) {
return (r... | 3.68 |
flink_TaskSlotTable_freeSlot | /**
* Try to free the slot. If the slot is empty it will set the state of the task slot to free and
* return its index. If the slot is not empty, then it will set the state of the task slot to
* releasing, fail all tasks and return -1.
*
* @param allocationId identifying the task slot to be freed
* @throws SlotNo... | 3.68 |
hbase_ByteBufferArray_read | /**
* Transfers bytes from this buffers array into the given destination {@link ByteBuff}
* @param offset start position in this big logical array.
* @param dst the destination ByteBuff. Notice that its position will be advanced.
* @return number of bytes read
*/
public int read(long offset, ByteBuff dst) {
r... | 3.68 |
flink_UniqueConstraint_getColumns | /** List of column names for which the primary key was defined. */
public List<String> getColumns() {
return columns;
} | 3.68 |
pulsar_ConsumerConfiguration_setMessageListener | /**
* Sets a {@link MessageListener} for the consumer
* <p>
* When a {@link MessageListener} is set, application will receive messages through it. Calls to
* {@link Consumer#receive()} will not be allowed.
*
* @param messageListener
* the listener object
*/
public ConsumerConfiguration setMessageList... | 3.68 |
framework_LayoutManager_unregisterDependency | /**
* Registers that a ManagedLayout is no longer depending on the size of an
* Element.
*
* @see #registerDependency(ManagedLayout, Element)
*
* @param owner
* the ManagedLayout no longer depends on an element
* @param element
* the Element that that no longer needs to be measured
*/
pu... | 3.68 |
rocketmq-connect_StringConverter_configure | /**
* Configure this class.
*
* @param configs configs in key/value pairs
*/
@Override
public void configure(Map<String, ?> configs) {
serializer.configure(configs);
deserializer.configure(configs);
} | 3.68 |
morf_SqlQueryDataSetProducer_isTableEmpty | /**
* @see org.alfasoftware.morf.dataset.DataSetProducer#isTableEmpty(java.lang.String)
*/
@Override
public boolean isTableEmpty(String tableName) {
return records(tableName).iterator().hasNext();
} | 3.68 |
open-banking-gateway_DatasafeConfigurer_provideBouncyCastle | /**
* Installs BouncyCastle as required by Datasafe.
*/
@PostConstruct
void provideBouncyCastle() {
if (null != Security.getProvider(BouncyCastleProvider.PROVIDER_NAME)) {
return;
}
Security.addProvider(new BouncyCastleProvider());
} | 3.68 |
hbase_ProcedureEvent_wakeIfSuspended | /**
* Wakes up the suspended procedures only if the given {@code proc} is waiting on this event.
* <p/>
* Mainly used by region assignment to reject stale OpenRegionProcedure/CloseRegionProcedure. Use
* with caution as it will cause performance issue if there are lots of procedures waiting on the
* event.
*/
publ... | 3.68 |
AreaShop_AreaShop_onDisable | /**
* Called on shutdown or reload of the server.
*/
@Override
public void onDisable() {
Bukkit.getServer().getScheduler().cancelTasks(this);
// Cleanup managers
for(Manager manager : managers) {
manager.shutdown();
}
managers = null;
fileManager = null;
languageManager = null;
commandManager = null;
sig... | 3.68 |
flink_InPlaceMutableHashTable_appendPointerAndCopyRecord | /**
* Appends a pointer and a record. The record is read from a DataInputView (this will be the
* staging area).
*
* @param pointer The pointer to write (Note: this is NOT the position to write to!)
* @param input The DataInputView to read the record from
* @param recordSize The size of the record
* @return A po... | 3.68 |
flink_VertexInputInfoComputationUtils_computeVertexInputInfoForPointwise | /**
* Compute the {@link JobVertexInputInfo} for a {@link DistributionPattern#POINTWISE} edge. This
* computation algorithm will evenly distribute subpartitions to downstream subtasks according
* to the number of subpartitions. Different downstream subtasks consume roughly the same number
* of subpartitions.
*
* ... | 3.68 |
dubbo_ProtocolConfig_getDispather | /**
* typo, switch to use {@link #getDispatcher()}
*
* @deprecated {@link #getDispatcher()}
*/
@Deprecated
@Parameter(excluded = true, attribute = false)
public String getDispather() {
return getDispatcher();
} | 3.68 |
hibernate-validator_ComposingConstraintTree_validateComposingConstraints | /**
* Validates all composing constraints recursively.
*
* @param validationContext Meta data about top level validation
* @param valueContext Meta data for currently validated value
* @param violatedConstraintValidatorContexts Used to accumulate constraint validator contexts that cause constraint violations
*
*... | 3.68 |
hadoop_ShutdownThreadsHelper_shutdownThread | /**
* @param thread {@link Thread to be shutdown}
* @param timeoutInMilliSeconds time to wait for thread to join after being
* interrupted
* @return <tt>true</tt> if the thread is successfully interrupted,
* <tt>false</tt> otherwise
*/
public static boolean shutdownThread(Thread threa... | 3.68 |
flink_Transformation_setDescription | /** Changes the description of this {@code Transformation}. */
public void setDescription(String description) {
this.description = Preconditions.checkNotNull(description);
} | 3.68 |
flink_ThriftObjectConversions_toFlinkTableKinds | /** Counterpart of the {@code org.apache.hive.service.cli.operation.TableTypeMapping}. */
public static Set<TableKind> toFlinkTableKinds(@Nullable List<String> tableTypes) {
Set<TableKind> tableKinds = new HashSet<>();
if (tableTypes == null || tableTypes.isEmpty()) {
tableKinds.addAll(Arrays.asList(Tab... | 3.68 |
hudi_BoundedInMemoryQueue_seal | /**
* Puts an empty entry to queue to denote termination.
*/
@Override
public void seal() {
// done queueing records notifying queue-reader.
isWriteDone.set(true);
} | 3.68 |
flink_HsSubpartitionConsumer_setMemoryDataView | /**
* Set {@link HsDataView} for this subpartition, this method only called when {@link
* HsSubpartitionFileReader} is creating.
*/
void setMemoryDataView(HsDataView memoryDataView) {
synchronized (lock) {
checkState(
this.memoryDataView == null, "repeatedly set memory data view is not al... | 3.68 |
flink_FlinkContainersSettings_jarPaths | /**
* Sets the {@code jarPaths} and returns a reference to this Builder enabling method
* chaining.
*
* @param jarPaths The {@code jarPaths} to set.
* @return A reference to this Builder.
*/
public Builder jarPaths(Collection<String> jarPaths) {
this.jarPaths = jarPaths;
return this;
} | 3.68 |
hadoop_HdfsLocatedFileStatus_getLocatedBlocks | /**
* Get block locations for this entity, in HDFS format.
* See {@link #makeQualifiedLocated(URI, Path)}.
* See {@link DFSUtilClient#locatedBlocks2Locations(LocatedBlocks)}.
* @return block locations
*/
public LocatedBlocks getLocatedBlocks() {
return hdfsloc;
} | 3.68 |
hbase_BitSetNode_convert | /**
* Convert to
* org.apache.hadoop.hbase.protobuf.generated.ProcedureProtos.ProcedureStoreTracker.TrackerNode
* protobuf.
*/
public ProcedureProtos.ProcedureStoreTracker.TrackerNode convert() {
ProcedureProtos.ProcedureStoreTracker.TrackerNode.Builder builder =
ProcedureProtos.ProcedureStoreTracker.TrackerN... | 3.68 |
flink_HiveTableInputFormat_addSchemaToConf | // Hive readers may rely on the schema info in configuration
private void addSchemaToConf(JobConf jobConf) {
// set columns/types -- including partition cols
List<String> typeStrs =
Arrays.stream(fieldTypes)
.map(t -> HiveTypeUtil.toHiveTypeInfo(t, true).toString())
... | 3.68 |
framework_PushRequestHandler_initAtmosphere | /**
* Initializes Atmosphere for the given ServletConfiguration
*
* @since 7.5.0
* @param vaadinServletConfig
* The servlet configuration for the servlet which should have
* Atmosphere support
*/
static AtmosphereFramework initAtmosphere(
final ServletConfig vaadinServletConfig) {
... | 3.68 |
hbase_JVM_isAarch64 | /**
* Check if the arch is aarch64;
* @return whether this is aarch64 or not.
*/
public static boolean isAarch64() {
return aarch64;
} | 3.68 |
flink_GenericDataSinkBase_accept | /**
* Accepts the visitor and applies it this instance. This method applies the visitor in a
* depth-first traversal. The visitors pre-visit method is called and, if returning
* <tt>true</tt>, the visitor is recursively applied on the single input. After the recursion
* returned, the post-visit method is called.
*... | 3.68 |
hbase_ColumnFamilyDescriptorBuilder_setMaxVersions | /**
* Set the maximum number of versions to retain.
* @param maxVersions maximum number of versions
* @return this (for chained invocation)
*/
public ModifyableColumnFamilyDescriptor setMaxVersions(int maxVersions) {
if (maxVersions <= 0) {
// TODO: Allow maxVersion of 0 to be the way you say "Keep all versio... | 3.68 |
framework_ServerRpcMethodInvocation_doFindInvocationMethod | /**
* Tries to find the method from the class by looping through available
* methods.
*
* @param targetType
* @param methodName
* @param parameterCount
* @return
*/
private Method doFindInvocationMethod(Class<?> targetType,
String methodName, int parameterCount) {
Method[] methods = targetType.getMe... | 3.68 |
framework_ComboBoxElement_selectByTextFromPopup | /**
* Selects, without filtering, the first option in the ComboBox which
* matches the given text.
*
* @param text
* the text of the option to select
*/
private void selectByTextFromPopup(String text) {
// This method assumes there is no need to touch the filter string
// 1. Find first page
... | 3.68 |
hudi_OptionsResolver_getIndexType | /**
* Returns the index type.
*/
public static HoodieIndex.IndexType getIndexType(Configuration conf) {
return HoodieIndex.IndexType.valueOf(conf.getString(FlinkOptions.INDEX_TYPE));
} | 3.68 |
hadoop_StageConfig_withTaskId | /**
* Set builder value.
* @param value new value
* @return this
*/
public StageConfig withTaskId(final String value) {
checkOpen();
taskId = value;
return this;
} | 3.68 |
framework_Profiler_enter | /**
* Enters a named block. There should always be a matching invocation of
* {@link #leave(String)} when leaving the block. Calls to this method will
* be removed by the compiler unless profiling is enabled.
*
* @param name
* the name of the entered block
*/
public static void enter(String name) {
... | 3.68 |
framework_UIConnector_showServerDesign | /**
* Sends a request to the server to print a design to the console for the
* given component.
*
* @since 7.5
* @param connector
* the component connector to output a declarative design for
*/
public void showServerDesign(ServerConnector connector) {
getRpcProxy(DebugWindowServerRpc.class).showSe... | 3.68 |
hbase_SnapshotInfo_getMobStoreFilesSize | /** Returns the total size of the store files in the mob store */
public long getMobStoreFilesSize() {
return hfilesMobSize.get();
} | 3.68 |
druid_FileNodeListener_refresh | /**
* Load the properties file and diff with the stored Properties.
*
* @return A List of the modification
*/
@Override
public List<NodeEvent> refresh() {
Properties originalProperties = PropertiesUtils.loadProperties(file);
List<String> nameList = PropertiesUtils.loadNameList(originalProperties, getPrefix(... | 3.68 |
hudi_OptionsInference_setupClientId | /**
* Utilities that help to auto generate the client id for multi-writer scenarios.
* It basically handles two cases:
*
* <ul>
* <li>find the next client id for the new job;</li>
* <li>clean the existing inactive client heartbeat files.</li>
* </ul>
*
* @see ClientIds
*/
public static void setupClientId(... | 3.68 |
flink_DefaultJobLeaderIdService_isStarted | /**
* Checks whether the service has been started.
*
* @return True if the service has been started; otherwise false
*/
public boolean isStarted() {
return jobLeaderIdActions != null;
} | 3.68 |
hbase_RegionCoprocessorHost_preReplayWALs | /**
* @param info the RegionInfo for this region
* @param edits the file of recovered edits
*/
public void preReplayWALs(final RegionInfo info, final Path edits) throws IOException {
execOperation(
coprocEnvironments.isEmpty() ? null : new RegionObserverOperationWithoutResult(true) {
@Override
pub... | 3.68 |
flink_KeyGroupRangeAssignment_computeDefaultMaxParallelism | /**
* Computes a default maximum parallelism from the operator parallelism. This is used in case
* the user has not explicitly configured a maximum parallelism to still allow a certain degree
* of scale-up.
*
* @param operatorParallelism the operator parallelism as basis for computation.
* @return the computed de... | 3.68 |
morf_H2Dialect_dropPrimaryKeyConstraintStatement | /**
* @param table The table whose primary key should be dropped
* @return The statement
*/
private String dropPrimaryKeyConstraintStatement(Table table) {
return "ALTER TABLE " + schemaNamePrefix() + table.getName() + " DROP PRIMARY KEY";
} | 3.68 |
hbase_HRegionFileSystem_getRegionInfoFileContent | /** Returns Content of the file we write out to the filesystem under a region */
private static byte[] getRegionInfoFileContent(final RegionInfo hri) throws IOException {
return RegionInfo.toDelimitedByteArray(hri);
} | 3.68 |
querydsl_MathExpressions_tanh | /**
* Create a {@code tanh(num)} expression
*
* <p>Returns the hyperbolic tangent of num radians.</p>
*
* @param num numeric expression
* @return tanh(num)
*/
public static <A extends Number & Comparable<?>> NumberExpression<Double> tanh(Expression<A> num) {
return Expressions.numberOperation(Double.class, O... | 3.68 |
hadoop_AbfsRestOperation_execute | /**
* Execute a AbfsRestOperation. Track the Duration of a request if
* abfsCounters isn't null.
* @param tracingContext TracingContext instance to track correlation IDs
*/
public void execute(TracingContext tracingContext)
throws AzureBlobFileSystemException {
// Since this might be a sub-sequential or para... | 3.68 |
flink_RpcSystem_close | /** Hook to cleanup resources, like common thread pools or classloaders. */
@Override
default void close() {} | 3.68 |
hadoop_ProducerConsumer_blockingTake | /**
* Blocking take from ProducerConsumer output queue (catches exceptions and
* retries forever).
*
* @return item returned by processor's processItem().
*/
public WorkReport<R> blockingTake() {
while (true) {
try {
WorkReport<R> report = outputQueue.take();
workCnt.decrementAndGet();
... | 3.68 |
AreaShop_AddedFriendEvent_getFriend | /**
* Get the OfflinePlayer that is getting added as friend.
* @return The friend that is getting added
*/
public OfflinePlayer getFriend() {
return friend;
} | 3.68 |
open-banking-gateway_ConsentAuthorizationEncryptionServiceProvider_forSecretKey | /**
* Create encryption service for a given secret key.
* @param key Secret key to encrypt/decrypt data with.
* @return Symmetric encryption service.
*/
public EncryptionService forSecretKey(SecretKeyWithIv key) {
String keyId = Hashing.sha256().hashBytes(key.getSecretKey().getEncoded()).toString();
return ... | 3.68 |
framework_DefaultFieldFactory_createFieldByPropertyType | /**
* Creates fields based on the property type.
* <p>
* The default field type is {@link TextField}. Other field types generated
* by this method:
* <p>
* <b>Boolean</b>: {@link CheckBox}.<br/>
* <b>Date</b>: {@link DateField}(resolution: day).<br/>
* <b>Item</b>: {@link Form}. <br/>
* <b>default field type</... | 3.68 |
pulsar_ResourceQuota_add | /**
* Add quota.
*
* @param quota
* <code>ResourceQuota</code> to add
*/
public void add(ResourceQuota quota) {
this.msgRateIn += quota.msgRateIn;
this.msgRateOut += quota.msgRateOut;
this.bandwidthIn += quota.bandwidthIn;
this.bandwidthOut += quota.bandwidthOut;
this.memory += quota... | 3.68 |
flink_MailboxProcessor_drain | /**
* Finishes running all mails in the mailbox. If no concurrent write operations occurred, the
* mailbox must be empty after this method.
*/
public void drain() throws Exception {
for (final Mail mail : mailbox.drain()) {
runMail(mail);
}
} | 3.68 |
flink_ContextResolvedTable_generateAnonymousStringIdentifier | /**
* This method tries to return the connector name of the table, trying to provide a bit more
* helpful toString for anonymous tables. It's only to help users to debug, and its return value
* should not be relied on.
*/
private static String generateAnonymousStringIdentifier(
@Nullable String hint, Resolv... | 3.68 |
hudi_BaseHoodieTableServiceClient_completeCompaction | /**
* Commit Compaction and track metrics.
*/
protected void completeCompaction(HoodieCommitMetadata metadata, HoodieTable table, String compactionCommitTime) {
this.context.setJobStatus(this.getClass().getSimpleName(), "Collect compaction write status and commit compaction: " + config.getTableName());
List<Hoodi... | 3.68 |
druid_DruidDataSource_initFromSPIServiceLoader | /**
* load filters from SPI ServiceLoader
*
* @see ServiceLoader
*/
private void initFromSPIServiceLoader() {
if (loadSpifilterSkip) {
return;
}
if (autoFilters == null) {
List<Filter> filters = new ArrayList<Filter>();
ServiceLoader<Filter> autoFilterLoader = ServiceLoader.load... | 3.68 |
flink_Conditions_fulfill | /** Generic condition to check fulfillment of a predicate. */
public static <T extends HasName> ArchCondition<T> fulfill(DescribedPredicate<T> predicate) {
return new ArchCondition<T>(predicate.getDescription()) {
@Override
public void check(T item, ConditionEvents events) {
if (!predica... | 3.68 |
rocketmq-connect_WorkerTask_transitionTo | /**
* change task target state
*
* @param state
*/
public void transitionTo(TargetState state) {
synchronized (this) {
// ignore the state change if we are stopping
if (isStopping()) {
return;
}
// not equal set
if (this.targetState != state) {
thi... | 3.68 |
flink_BytesMap_lookup | /**
* @param key by which looking up the value in the hash map. Only support the key in the
* BinaryRowData form who has only one MemorySegment.
* @return {@link LookupInfo}
*/
public LookupInfo<K, V> lookup(K key) {
final int hashCode1 = key.hashCode();
int newPos = hashCode1 & numBucketsMask;
// w... | 3.68 |
pulsar_SaslRoleTokenSigner_verifyAndExtract | /**
* Verifies a signed string and extracts the original string.
*
* @param signedStr the signed string to verify and extract.
*
* @return the extracted original string.
*
* @throws AuthenticationException thrown if the given string is not a signed string or if the signature is invalid.
*/
public String verifyA... | 3.68 |
hudi_HoodieTable_getBaseFileOnlyView | /**
* Get the base file only view of the file system for this table.
*/
public BaseFileOnlyView getBaseFileOnlyView() {
return getViewManager().getFileSystemView(metaClient);
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.