name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_QueryOperationConverter_getAggCall | /** Get the {@link AggCall} correspond to the aggregate or table aggregate expression. */
private AggCall getAggCall(Expression aggregateExpression) {
if (isFunctionOfKind(aggregateExpression, TABLE_AGGREGATE)) {
return aggregateExpression.accept(tableAggregateVisitor);
} else {
return aggregate... | 3.68 |
framework_MultiSelectionRenderer_getClientTop | /** Get the "top" of an element in relation to "client" coordinates. */
private int getClientTop(final Element e) {
return e.getAbsoluteTop();
} | 3.68 |
flink_TypeSerializerSnapshotSerializationUtil_writeSerializerSnapshot | /**
* Writes a {@link TypeSerializerSnapshot} to the provided data output view.
*
* <p>It is written with a format that can be later read again using {@link
* #readSerializerSnapshot(DataInputView, ClassLoader)}.
*
* @param out the data output view
* @param serializerSnapshot the serializer configuration snapsho... | 3.68 |
framework_VAbstractCalendarPanel_adjustDateToFitInsideRange | /**
* Adjusts a date to fit inside the range, only if outside
*
* @param date
*/
private Date adjustDateToFitInsideRange(Date date) {
if (!isAcceptedByRangeStart(date, resolution)) {
date = parseRangeString(rangeStart);
} else if (!isAcceptedByRangeEnd(date, resolution)) {
date = parseRangeS... | 3.68 |
flink_TableConfig_getOptional | /**
* {@inheritDoc}
*
* <p>This method gives read-only access to the full configuration. However,
* application-specific configuration has precedence. Configuration of outer layers is used for
* defaults and fallbacks. See the docs of {@link TableConfig} for more information.
*
* @param option metadata of the op... | 3.68 |
morf_InsertStatement_deepCopy | /**
* @see org.alfasoftware.morf.util.DeepCopyableWithTransformation#deepCopy(org.alfasoftware.morf.util.DeepCopyTransformation)
*/
@Override
public InsertStatementBuilder deepCopy(DeepCopyTransformation transformer) {
return new InsertStatementBuilder(this, transformer);
} | 3.68 |
flink_CustomHeadersDecorator_addCustomHeader | /**
* Adds a custom header to the message. Initializes the custom headers collection if it hasn't
* been initialized yet.
*
* @param httpHeader The header to add.
*/
public void addCustomHeader(HttpHeader httpHeader) {
if (customHeaders == null) {
customHeaders = new ArrayList<>();
}
customHead... | 3.68 |
framework_ContainerOrderedWrapper_getItem | /*
* Gets the specified Item from the container. Don't add a JavaDoc comment
* here, we use the default documentation from implemented interface.
*/
@Override
public Item getItem(Object itemId) {
return container.getItem(itemId);
} | 3.68 |
flink_PojoSerializerSnapshot_newPojoHasNewOrRemovedFields | /**
* Checks whether the new {@link PojoSerializer} has new or removed fields compared to the
* previous one.
*/
private static boolean newPojoHasNewOrRemovedFields(
LinkedOptionalMap<Field, TypeSerializerSnapshot<?>> fieldSerializerSnapshots,
PojoSerializer<?> newPojoSerializer) {
int numRemoved... | 3.68 |
dubbo_DynamicConfiguration_close | /**
* Close the configuration
*
* @throws Exception
* @since 2.7.5
*/
@Override
default void close() throws Exception {
throw new UnsupportedOperationException();
} | 3.68 |
hadoop_FileIoProvider_flush | /**
* See {@link Flushable#flush()}.
*
* @param volume target volume. null if unavailable.
* @throws IOException
*/
public void flush(
@Nullable FsVolumeSpi volume, Flushable f) throws IOException {
final long begin = profilingEventHook.beforeFileIo(volume, FLUSH, 0);
try {
faultInjectorEventHook.befo... | 3.68 |
hbase_Result_getColumnLatestCell | /**
* The Cell for the most recent timestamp for a given column.
* @param family family name
* @param foffset family offset
* @param flength family length
* @param qualifier column qualifier
* @param qoffset qualifier offset
* @param qlength qualifier length
* @return the Cell for the column, or null... | 3.68 |
framework_Upload_getUploadSize | /**
* Returns size of file currently being uploaded. Value sane only during
* upload.
*
* @return size in bytes
*/
public long getUploadSize() {
return contentLength;
} | 3.68 |
flink_RocksDBStateBackend_setWriteBatchSize | /**
* Sets the max batch size will be used in {@link RocksDBWriteBatchWrapper}, no positive value
* will disable memory size controller, just use item count controller.
*
* @param writeBatchSize The size will used to be used in {@link RocksDBWriteBatchWrapper}.
*/
public void setWriteBatchSize(long writeBatchSize)... | 3.68 |
hbase_RegionServerFlushTableProcedureManager_buildSubprocedure | /**
* If in a running state, creates the specified subprocedure to flush table regions. Because this
* gets the local list of regions to flush and not the set the master had, there is a possibility
* of a race where regions may be missed.
* @return Subprocedure to submit to the ProcedureMember.
*/
public Subproced... | 3.68 |
flink_WebMonitorUtils_find | /**
* Finds the Flink log directory using log.file Java property that is set during startup.
*/
public static LogFileLocation find(Configuration config) {
final String logEnv = "log.file";
String logFilePath = System.getProperty(logEnv);
if (logFilePath == null) {
LOG.warn("Log file environment v... | 3.68 |
open-banking-gateway_EncryptionKeySerde_readKey | /**
* Read public-private key pair from InputStream
* @param is InputStream to read key from
* @return Read key pair
*/
@SneakyThrows
public PubAndPrivKey readKey(InputStream is) {
PubAndPrivKeyContainer container = mapper.readValue(is, PubAndPrivKeyContainer.class);
if (!PKCS_8.equals(container.getPrivForm... | 3.68 |
morf_AliasedField_toString | /**
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return StringUtils.isEmpty(alias) ? "" : " AS " + alias;
} | 3.68 |
framework_VCalendarPanel_getNextKey | /**
* The key that selects the next week in the calendar. By default this is
* the down arrow key but by overriding this method it can be changed to
* whatever you like.
*
* @return
*/
protected int getNextKey() {
return KeyCodes.KEY_DOWN;
} | 3.68 |
querydsl_QueryResults_getResults | /**
* Get the results in List form
*
* An empty list is returned for no results.
*
* @return results
*/
public List<T> getResults() {
return results;
} | 3.68 |
flink_ResourceManagerId_generate | /** Generates a new random ResourceManagerId. */
public static ResourceManagerId generate() {
return new ResourceManagerId();
} | 3.68 |
flink_ProcessorArchitecture_getProcessorArchitecture | /** Gets the ProcessorArchitecture of the system running this process. */
public static ProcessorArchitecture getProcessorArchitecture() {
return CURRENT;
} | 3.68 |
hadoop_MappingRuleResult_updateNormalizedQueue | /**
* External interface for setting the normalized version of the queue. This
* class cannot normalize on it's own, but provides a way to store the
* normalized name of the target queue.
* @param normalizedQueueName The normalized name of the queue
*/
public void updateNormalizedQueue(String normalizedQueueName) ... | 3.68 |
framework_AbstractSelect_getItemCaptionPropertyId | /**
* Gets the item caption property.
*
* @return the Id of the property used as item caption source.
*/
public Object getItemCaptionPropertyId() {
return itemCaptionPropertyId;
} | 3.68 |
framework_VAbstractCalendarPanel_setDate | /**
* Sets the data of the Panel.
*
* @param currentDate
* The date to set
*/
public void setDate(Date currentDate) {
doSetDate(currentDate, false, () -> {
});
} | 3.68 |
framework_TabSheet_setSelected | /**
* Sets the selected tab in the TabSheet. Ensures that the selected tab is
* repainted if needed.
*
* @param component
* The new selection or null for no selection
*/
private void setSelected(Component component) {
Tab tab = tabs.get(selected);
selected = component;
// Repaint of the se... | 3.68 |
hadoop_OBSObjectBucketUtils_newObjectMetadata | /**
* Create a new object metadata instance. Any standard metadata headers are
* added here, for example: encryption.
*
* @param length length of data to set in header.
* @return a new metadata instance
*/
static ObjectMetadata newObjectMetadata(final long length) {
final ObjectMetadata om = new ObjectMetadata(... | 3.68 |
open-banking-gateway_FintechSecureStorage_validatePassword | /**
* Validates FinTechs' Datasafe/KeyStore password
* @param fintech Target FinTech to check password for
* @param password Password to validate
*/
public void validatePassword(Fintech fintech, Supplier<char[]> password) {
if (fintech.getFintechOnlyPrvKeys().isEmpty()) {
throw new IllegalStateException... | 3.68 |
flink_MetricConfig_getDouble | /**
* Searches for the property with the specified key in this property list. If the key is not
* found in this property list, the default property list, and its defaults, recursively, are
* then checked. The method returns the default value argument if the property is not found.
*
* @param key the hashtable key.
... | 3.68 |
flink_GlobalConfiguration_loadConfiguration | /**
* Loads the configuration files from the specified directory. If the dynamic properties
* configuration is not null, then it is added to the loaded configuration.
*
* @param configDir directory to load the configuration from
* @param dynamicProperties configuration file containing the dynamic properties. Null ... | 3.68 |
flink_DeltaIteration_setResources | /**
* Sets the resources for the iteration, and the minimum and preferred resources are the same by
* default. The lower and upper resource limits will be considered in dynamic resource resize
* feature for future plan.
*
* @param resources The resources for the iteration.
* @return The iteration with set minimum... | 3.68 |
framework_DragSourceExtension_onDragEnd | /**
* Method invoked when a <code>dragend</code> has been sent from client
* side. Fires the {@link DragEndEvent}.
*
* @param dropEffect
* the drop effect on the dragend
*/
protected void onDragEnd(DropEffect dropEffect) {
DragEndEvent<T> event = new DragEndEvent<>(getParent(), dropEffect);
fir... | 3.68 |
flink_TypeInferenceUtil_runTypeInference | /**
* Runs the entire type inference process.
*
* @param typeInference type inference of the current call
* @param callContext call context of the current call
* @param surroundingInfo information about the outer wrapping call of a current function call
* for performing input type inference
*/
public static ... | 3.68 |
flink_PlanNode_setRelativeMemoryPerSubtask | /**
* Sets the memory dedicated to each task for this node.
*
* @param relativeMemoryPerSubtask The relative memory per sub-task
*/
public void setRelativeMemoryPerSubtask(double relativeMemoryPerSubtask) {
this.relativeMemoryPerSubTask = relativeMemoryPerSubtask;
} | 3.68 |
hbase_MonitoredTaskImpl_expireNow | /**
* Force the completion timestamp backwards so that it expires now.
*/
@Override
public void expireNow() {
stateTime -= 180 * 1000;
} | 3.68 |
hbase_CatalogReplicaLoadBalanceSimpleSelector_getRandomReplicaId | /**
* Select an random replica id (including the primary replica id). In case there is no replica
* region configured, return the primary replica id.
* @return Replica id
*/
private int getRandomReplicaId() {
int cachedNumOfReplicas = this.numOfReplicas;
if (cachedNumOfReplicas == CatalogReplicaLoadBalanceSelec... | 3.68 |
morf_TableReference_getSchemaName | /**
* Get the schema which contains this table.
*
* @return the schema name
*/
public String getSchemaName() {
return schemaName;
} | 3.68 |
querydsl_GeneratedAnnotationResolver_resolveDefault | /**
* Resolve the java {@code @Generated} annotation (can be of type {@code javax.annotation.Generated}
* or {@code javax.annotation.processing.Generated} depending on the java version.
*
* @return the Generated annotation class from java. Never {@code null}.
*/
public static Class<? extends Annotation> resolveDef... | 3.68 |
hbase_WALKeyImpl_getWriteTime | /** Returns the write time */
@Override
public long getWriteTime() {
return this.writeTime;
} | 3.68 |
framework_Overlay_setOwner | /**
* Set owner (Widget that made this Overlay, not the layout parent) of
* Overlay.
*
* @param owner
* Owner (creator) of Overlay
*/
public void setOwner(Widget owner) {
this.owner = owner;
} | 3.68 |
hadoop_HsController_tasks | /*
* (non-Javadoc)
* @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#tasks()
*/
@Override
public void tasks() {
super.tasks();
} | 3.68 |
hadoop_AbfsInputStream_markSupported | /**
* gets whether mark and reset are supported by {@code ADLFileInputStream}. Always returns false.
*
* @return always {@code false}
*/
@Override
public boolean markSupported() {
return false;
} | 3.68 |
hadoop_AzureBlobFileSystem_removeAcl | /**
* Removes all but the base ACL entries of files and directories. The entries
* for user, group, and others are retained for compatibility with permission
* bits.
*
* @param path Path to modify
* @throws IOException if an ACL could not be removed
*/
@Override
public void removeAcl(final Path path) throws IOE... | 3.68 |
flink_DecimalDataUtils_signum | /**
* Returns the signum function of this decimal. (The return value is -1 if this decimal is
* negative; 0 if this decimal is zero; and 1 if this decimal is positive.)
*
* @return the signum function of this decimal.
*/
public static int signum(DecimalData decimal) {
if (decimal.isCompact()) {
return ... | 3.68 |
hbase_OrderedBytes_decodeNumericValue | /**
* Decode a {@link BigDecimal} from {@code src}. Assumes {@code src} encodes a value in Numeric
* encoding and is within the valid range of {@link BigDecimal} values. {@link BigDecimal} does
* not support {@code NaN} or {@code Infinte} values.
* @see #decodeNumericAsDouble(PositionedByteRange)
*/
private static... | 3.68 |
hudi_ValidateNode_execute | /**
* Method to start the validate operation. Exceptions will be thrown if its parent nodes exist and WAIT_FOR_PARENTS
* was set to true or default, but the parent nodes have not completed yet.
*
* @param executionContext Context to execute this node
* @param curItrCount current iteration count.
*/
@Override
publ... | 3.68 |
rocketmq-connect_WrapperStatusListener_onPause | /**
* Invoked after the task has been paused.
*
* @param id The id of the task
*/
@Override
public void onPause(ConnectorTaskId id) {
managementService.put(new TaskStatus(id, TaskStatus.State.PAUSED, workerId, generation()));
} | 3.68 |
hbase_Threads_shutdown | /**
* Shutdown passed thread using isAlive and join.
* @param joinwait Pass 0 if we're to wait forever.
* @param t Thread to shutdown
*/
public static void shutdown(final Thread t, final long joinwait) {
if (t == null) return;
while (t.isAlive()) {
try {
t.join(joinwait);
} catch (Interrupt... | 3.68 |
open-banking-gateway_PsuSecureStorage_getOrCreateKeyFromPrivateForAspsp | /**
* Gets or generates key from for PSU to ASPSP consent protection
* @param password Key protection password
* @param session Authorization session for current user
* @param storePublicKeyIfNeeded If public key needs to be stored
* @return Public and Private key pair to protect PSU and ASPSP consent grant
*/
@S... | 3.68 |
hibernate-validator_SizeValidatorForArraysOfChar_isValid | /**
* Checks the number of entries in an array.
*
* @param array The array to validate.
* @param constraintValidatorContext context in which the constraint is evaluated.
*
* @return Returns {@code true} if the array is {@code null} or the number of entries in
* {@code array} is between the specified {@co... | 3.68 |
flink_PurgingTrigger_of | /**
* Creates a new purging trigger from the given {@code Trigger}.
*
* @param nestedTrigger The trigger that is wrapped by this purging trigger
*/
public static <T, W extends Window> PurgingTrigger<T, W> of(Trigger<T, W> nestedTrigger) {
return new PurgingTrigger<>(nestedTrigger);
} | 3.68 |
framework_Button_addClickListener | /**
* Adds the button click listener.
*
* @see Registration
*
* @param listener
* the Listener to be added.
* @return a registration object for removing the listener
* @since 8.0
*/
public Registration addClickListener(ClickListener listener) {
return addListener(ClickEvent.class, listener,
... | 3.68 |
flink_EmbeddedRocksDBStateBackend_setRocksDBMemoryFactory | /** Set RocksDBMemoryFactory. */
public void setRocksDBMemoryFactory(RocksDBMemoryFactory rocksDBMemoryFactory) {
this.rocksDBMemoryFactory = checkNotNull(rocksDBMemoryFactory);
} | 3.68 |
flink_RocksDBMemoryConfiguration_getWriteBufferRatio | /**
* Gets the fraction of the total memory to be used for write buffers. This only has an effect
* is either {@link #setUseManagedMemory(boolean)} or {@link #setFixedMemoryPerSlot(MemorySize)}
* are set.
*
* <p>See {@link RocksDBOptions#WRITE_BUFFER_RATIO} for details.
*/
public double getWriteBufferRatio() {
... | 3.68 |
AreaShop_WorldGuardHandler5_buildDomain | /**
* Build a DefaultDomain from a RegionAccessSet.
* @param regionAccessSet RegionAccessSet to read
* @return DefaultDomain containing the entities from the RegionAccessSet
*/
private DefaultDomain buildDomain(RegionAccessSet regionAccessSet) {
DefaultDomain owners = new DefaultDomain();
for(String playerName :... | 3.68 |
morf_ResultSetIterator_close | /**
* @see java.lang.AutoCloseable#close()
*/
@Override
public final void close() throws SQLException {
this.resultSet.close();
this.statement.close();
} | 3.68 |
hbase_Constraints_setConfiguration | /**
* Update the configuration for the {@link Constraint}; does not change the order in which the
* constraint is run.
* @param builder {@link TableDescriptorBuilder} to update
* @param clazz {@link Constraint} to update
* @param configuration to update the {@link Constraint} with.
* @throws IOExcep... | 3.68 |
hbase_HRegionServer_preRegistrationInitialization | /**
* All initialization needed before we go register with Master.<br>
* Do bare minimum. Do bulk of initializations AFTER we've connected to the Master.<br>
* In here we just put up the RpcServer, setup Connection, and ZooKeeper.
*/
private void preRegistrationInitialization() {
final Span span = TraceUtil.creat... | 3.68 |
hbase_ImmutableMemStoreLAB_getNewExternalChunk | /*
* Returning a new chunk, without replacing current chunk, meaning MSLABImpl does not make the
* returned chunk as CurChunk. The space on this chunk will be allocated externally. The interface
* is only for external callers.
*/
@Override
public Chunk getNewExternalChunk(int size) {
MemStoreLAB mslab = this.msla... | 3.68 |
hbase_ByteBufferKeyValue_equals | /**
* Needed doing 'contains' on List. Only compares the key portion, not the value.
*/
@Override
public boolean equals(Object other) {
if (!(other instanceof Cell)) {
return false;
}
return CellUtil.equals(this, (Cell) other);
} | 3.68 |
framework_CheckBoxGroup_getItemDescriptionGenerator | /**
* Gets the item description generator.
*
* @return the item description generator
*
* @since 8.2
*/
public DescriptionGenerator<T> getItemDescriptionGenerator() {
return descriptionGenerator;
} | 3.68 |
flink_CatalogDatabaseImpl_getProperties | /** Get a map of properties associated with the database. */
public Map<String, String> getProperties() {
return properties;
} | 3.68 |
flink_CopyOnWriteStateMap_compositeHash | /** Helper function that creates and scrambles a composite hash for key and namespace. */
private static int compositeHash(Object key, Object namespace) {
// create composite key through XOR, then apply some bit-mixing for better distribution of
// skewed keys.
return MathUtils.bitMix(key.hashCode() ^ names... | 3.68 |
zxing_QRCode_isValidMaskPattern | // Check if "mask_pattern" is valid.
public static boolean isValidMaskPattern(int maskPattern) {
return maskPattern >= 0 && maskPattern < NUM_MASK_PATTERNS;
} | 3.68 |
flink_CatalogManager_dropDatabase | /**
* Drop a database.
*
* @param catalogName Name of the catalog for database.
* @param databaseName Name of the database to be dropped.
* @param ignoreIfNotExists Flag to specify behavior when the database does not exist: if set to
* false, throw an exception, if set to true, do nothing.
* @param cascade F... | 3.68 |
querydsl_EnumExpression_coalesce | /**
* Create a {@code coalesce(this, args...)} expression
*
* @param args additional arguments
* @return coalesce
*/
@Override
@SuppressWarnings({"unchecked"})
public EnumExpression<T> coalesce(T... args) {
Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin);
for (T arg : args) {
coalesce.add(... | 3.68 |
hbase_MetricsREST_incrementSucessfulScanRequests | /**
* @param inc How much to add to sucessfulScanCount.
*/
public synchronized void incrementSucessfulScanRequests(final int inc) {
source.incrementSucessfulScanRequests(inc);
} | 3.68 |
pulsar_ProducerConfiguration_setInitialSequenceId | /**
* Set the baseline for the sequence ids for messages published by the producer.
* <p>
* First message will be using (initialSequenceId + 1) as its sequence id and subsequent messages will be assigned
* incremental sequence ids, if not otherwise specified.
*
* @param initialSequenceId
* @return
*/
public Pro... | 3.68 |
pulsar_AuthorizationProvider_allowTenantOperation | /**
* @deprecated - will be removed after 2.12. Use async variant.
*/
@Deprecated
default Boolean allowTenantOperation(String tenantName, String role, TenantOperation operation,
AuthenticationDataSource authData) {
try {
return allowTenantOperationAsync(tenantName, rol... | 3.68 |
hmily_KryoPoolFactory_get | /**
* Get kryo.
*
* @return the kryo
*/
public Kryo get() {
return pool.borrow();
} | 3.68 |
flink_ArrowSerializer_finishCurrentBatch | /**
* Forces to finish the processing of the current batch of elements. It will serialize the batch
* of elements into one arrow batch.
*/
public void finishCurrentBatch() throws Exception {
arrowWriter.finish();
arrowStreamWriter.writeBatch();
arrowWriter.reset();
} | 3.68 |
hbase_HRegionFileSystem_createSplitsDir | /**
* Creates region split daughter directories under the table dir. If the daughter regions already
* exist, for example, in the case of a recovery from a previous failed split procedure, this
* method deletes the given region dir recursively, then recreates it again.
*/
public void createSplitsDir(RegionInfo daug... | 3.68 |
pulsar_NamespaceBundleFactory_getNamespaceFromPoliciesPath | /*
* @param path - path for the namespace policies ex. /admin/policies/prop/cluster/namespace
*
* @returns namespace with path, ex. prop/cluster/namespace
*/
public static String getNamespaceFromPoliciesPath(String path) {
if (path.isEmpty()) {
return path;
}
// String before / is considered emp... | 3.68 |
hbase_AuthManager_authorizeUserTable | /**
* Check if user has given action privilige in table:family:qualifier scope.
* @param user user name
* @param table table name
* @param family family name
* @param qualifier qualifier name
* @param action one of action in [Read, Write, Create, Exec, Admin]
* @return true if user has, false othe... | 3.68 |
hbase_ChaosAgent_createZKConnection | /***
* Creates Connection with ZooKeeper.
* @throws IOException if something goes wrong
*/
private void createZKConnection(Watcher watcher) throws IOException {
if (watcher == null) {
zk = new ZooKeeper(quorum, ChaosConstants.SESSION_TIMEOUT_ZK, this);
} else {
zk = new ZooKeeper(quorum, ChaosConstants.S... | 3.68 |
graphhopper_OSMFileHeader_create | /**
* Constructor for XML Parser
*/
public static OSMFileHeader create(long id, XMLStreamReader parser) throws XMLStreamException {
OSMFileHeader header = new OSMFileHeader();
parser.nextTag();
return header;
} | 3.68 |
pulsar_InternalConfigurationData_getLedgersRootPath | /** @deprecated */
@Deprecated
public String getLedgersRootPath() {
return ledgersRootPath;
} | 3.68 |
hbase_TableInfoModel_setRegions | /**
* @param regions the regions to set
*/
public void setRegions(List<TableRegionModel> regions) {
this.regions = regions;
} | 3.68 |
framework_Header_isDefault | /**
* Returns whether this row is the default header row.
*
* @return {@code true} if this row is the default row, {@code false}
* otherwise.
*/
protected boolean isDefault() {
return getRowState().defaultHeader;
} | 3.68 |
hbase_VisibilityUtils_getScanLabelGenerators | /**
* @param conf The configuration to use
* @return Stack of ScanLabelGenerator instances. ScanLabelGenerator classes can be specified in
* Configuration as comma separated list using key
* "hbase.regionserver.scan.visibility.label.generator.class" when any of the specified
* ScanLabelGene... | 3.68 |
hadoop_Validate_checkLessOrEqual | /**
* Validates that the first value is less than or equal to the second value.
* @param value1 the first value to check.
* @param value1Name the name of the first argument.
* @param value2 the second value to check.
* @param value2Name the name of the second argument.
*/
public static void checkLessOrEqual(
... | 3.68 |
flink_AbstractKeyedStateBackend_getNumberOfKeyGroups | /** @see KeyedStateBackend */
public int getNumberOfKeyGroups() {
return numberOfKeyGroups;
} | 3.68 |
graphhopper_State_getIncomingVirtualEdge | /**
* Returns the virtual edge that should be used by incoming paths.
*
* @throws IllegalStateException if this State is not directed.
*/
public EdgeIteratorState getIncomingVirtualEdge() {
if (!isDirected) {
throw new IllegalStateException(
"This method may only be called for directed G... | 3.68 |
hadoop_DataNodeFaultInjector_logDelaySendingAckToUpstream | /**
* Used as a hook to intercept the latency of sending ack.
*/
public void logDelaySendingAckToUpstream(
final String upstreamAddr,
final long delayMs)
throws IOException {
} | 3.68 |
hbase_ConfigurationManager_containsObserver | /** Returns true if contains the observer, for unit test only */
public boolean containsObserver(ConfigurationObserver observer) {
synchronized (configurationObservers) {
return configurationObservers.contains(observer);
}
} | 3.68 |
hbase_StoreUtils_getDeterministicRandomSeed | /**
* Creates a deterministic hash code for store file collection.
*/
public static OptionalInt getDeterministicRandomSeed(Collection<HStoreFile> files) {
return files.stream().mapToInt(f -> f.getPath().getName().hashCode()).findFirst();
} | 3.68 |
hbase_Bytes_putInt | /**
* Put an int value out to the specified byte array position.
* @param bytes the byte array
* @param offset position in the array
* @param val int to write out
* @return incremented offset
* @throws IllegalArgumentException if the byte array given doesn't have enough room at the offset
* ... | 3.68 |
querydsl_MetaDataExporter_export | /**
* Export the tables based on the given database metadata
*
* @param md database metadata
* @throws SQLException
*/
public void export(DatabaseMetaData md) throws SQLException {
if (beanPackageName == null) {
beanPackageName = module.getPackageName();
}
if (beansTargetFolder == null) {
... | 3.68 |
pulsar_Topics_removeBacklogQuota | /**
* @deprecated Use {@link TopicPolicies#removeBacklogQuota(String)} instead.
*/
@Deprecated
default void removeBacklogQuota(String topic)
throws PulsarAdminException {
removeBacklogQuota(topic, BacklogQuota.BacklogQuotaType.destination_storage);
} | 3.68 |
morf_AbstractSqlDialectTest_testLeast | /**
* Test the LEAST functionality behaves as expected
*/
@Test
public void testLeast() {
SelectStatement testStatement = select(least(new NullFieldLiteral(), field("bob"))).from(tableRef("MyTable"));
assertEquals(expectedLeast().toLowerCase(), testDialect.convertStatementToSQL(testStatement).toLowerCase());
} | 3.68 |
graphhopper_Path_getFromNode | /**
* @return the first node of this Path.
*/
private int getFromNode() {
if (fromNode < 0)
throw new IllegalStateException("fromNode < 0 should not happen");
return fromNode;
} | 3.68 |
morf_SqlUtils_isEmpty | /**
* Shortcut to "empty or null", where empty means spaces only.
*
* <p>Note that only <i>spaces</i> are considered empty. Tabs and newlines are not considered empty.
* This will therefore give somewhat different results to {@link StringUtils#isBlank(CharSequence)}.</p>
*
* @param expression the expression to ev... | 3.68 |
flink_CopyOnWriteSkipListStateMap_helpGetNextNode | /** Return the next of the given node at the given level. */
long helpGetNextNode(long node, int level) {
return SkipListUtils.helpGetNextNode(
node, level, this.levelIndexHeader, this.spaceAllocator);
} | 3.68 |
framework_VTextArea_getTextAreaElement | /**
* Gets the base TextAreaElement of this widget.
*
* @return the base element
*/
public TextAreaElement getTextAreaElement() {
return super.getElement().cast();
} | 3.68 |
hudi_BaseHoodieTableServiceClient_inlineClustering | /**
* Executes a clustering plan on a table, serially before or after an insert/upsert action.
* Schedules and executes clustering inline.
*/
protected Option<String> inlineClustering(Option<Map<String, String>> extraMetadata) {
Option<String> clusteringInstantOpt = inlineScheduleClustering(extraMetadata);
clust... | 3.68 |
framework_VScrollTable_fireColumnResizeEvent | /**
* Fires a column resize event which sends the resize information to the
* server.
*
* @param columnId
* The columnId of the column which was resized
* @param originalWidth
* The width in pixels of the column before the resize event
* @param newWidth
* The width in pixels of... | 3.68 |
flink_Tuple7_setFields | /**
* 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 value for field 6
*/
public void setFi... | 3.68 |
hadoop_JsonSerDeser_toJson | /**
* Convert an object to a JSON string
* @param instance instance to convert
* @return a JSON string description
* @throws JsonProcessingException parse problems
*/
public String toJson(T instance) throws JsonProcessingException {
mapper.configure(SerializationFeature.INDENT_OUTPUT, true);
return mapper.writ... | 3.68 |
flink_DeployParser_parseDeployOutput | /**
* Parses the output of a Maven build where {@code deploy:deploy} was used, and returns a set of
* deployed modules.
*/
public static Set<String> parseDeployOutput(File buildResult) throws IOException {
try (Stream<String> linesStream = Files.lines(buildResult.toPath())) {
return parseDeployOutput(lin... | 3.68 |
flink_BinarySegmentUtils_getInt | /**
* get int from segments.
*
* @param segments target segments.
* @param offset value offset.
*/
public static int getInt(MemorySegment[] segments, int offset) {
if (inFirstSegment(segments, offset, 4)) {
return segments[0].getInt(offset);
} else {
return getIntMultiSegments(segments, off... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.