name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hudi_StreamerUtil_haveSuccessfulCommits | /**
* Returns whether there are successful commits on the timeline.
*
* @param metaClient The meta client
* @return true if there is any successful commit
*/
public static boolean haveSuccessfulCommits(HoodieTableMetaClient metaClient) {
return !metaClient.getCommitsTimeline().filterCompletedInstants().empty();
... | 3.68 |
flink_Expander_create | /** Creates an Expander. * */
public static Expander create(FlinkPlannerImpl planner) {
return new Expander(planner);
} | 3.68 |
hbase_RegionMetrics_getRequestCount | /**
* Returns the number of write requests and read requests and coprocessor service requests made to
* region
*/
default long getRequestCount() {
return getReadRequestCount() + getWriteRequestCount() + getCpRequestCount();
} | 3.68 |
framework_AbstractComponent_focus | /**
* Sets the focus for this component if the component is {@link Focusable}.
*/
protected void focus() {
if (this instanceof Focusable) {
final VaadinSession session = getSession();
if (session != null) {
getUI().setFocusedComponent((Focusable) this);
delayedFocus = false... | 3.68 |
hbase_MobUtils_isMobRegionName | /**
* Gets whether the current region name follows the pattern of a mob region name.
* @param tableName The current table name.
* @param regionName The current region name.
* @return True if the current region name follows the pattern of a mob region name.
*/
public static boolean isMobRegionName(TableName tableN... | 3.68 |
framework_ConnectorTracker_readObject | /* Special serialization to JsonObjects which are not serializable */
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
in.defaultReadObject();
// Read String versions of JsonObjects and parse into JsonObjects as
// JsonObject is not serializable
diffSta... | 3.68 |
flink_TaskLocalStateStoreImpl_pruneCheckpoints | /** Pruning the useless checkpoints, it should be called only when holding the {@link #lock}. */
protected void pruneCheckpoints(LongPredicate pruningChecker, boolean breakOnceCheckerFalse) {
final List<Tuple2<Long, TaskStateSnapshot>> toRemove = new ArrayList<>();
synchronized (lock) {
Iterator<Map.En... | 3.68 |
hudi_HoodieInMemoryHashIndex_canIndexLogFiles | /**
* Mapping is available in HBase already.
*/
@Override
public boolean canIndexLogFiles() {
return true;
} | 3.68 |
flink_SingleInputOperator_setInputs | /**
* Sets the input to the union of the given operators.
*
* @param inputs The operator(s) that form the input.
* @deprecated This method will be removed in future versions. Use the {@link Union} operator
* instead.
*/
@Deprecated
@SuppressWarnings("unchecked")
public void setInputs(List<Operator<IN>> inputs... | 3.68 |
hadoop_LocalCacheDirectoryManager_incrementFileCountForPath | /**
* Increment the file count for a relative directory within the cache
*
* @param relPath the relative path
*/
public synchronized void incrementFileCountForPath(String relPath) {
relPath = relPath == null ? "" : relPath.trim();
Directory subDir = knownDirectories.get(relPath);
if (subDir == null) {
in... | 3.68 |
flink_WindowedStream_max | /**
* Applies an aggregation that gives the maximum value of the pojo data stream at the given
* field expression for every window. A field expression is either the name of a public field or
* a getter method with parentheses of the {@link DataStream DataStreams} underlying type. A dot
* can be used to drill down i... | 3.68 |
streampipes_DataStreamBuilder_properties | /**
* Assigns a list of new event properties to the stream's schema.
*
* @param properties The event properties that should be added.
* @return this
*/
public DataStreamBuilder properties(List<EventProperty> properties) {
this.eventProperties.addAll(properties);
return me();
} | 3.68 |
hadoop_FSStarvedApps_addStarvedApp | /**
* Add a starved application if it is not already added.
* @param app application to add
*/
void addStarvedApp(FSAppAttempt app) {
if (!app.equals(appBeingProcessed) && !appsToProcess.contains(app)) {
appsToProcess.add(app);
}
} | 3.68 |
morf_SqlScriptExecutorProvider_afterExecute | /**
* @see org.alfasoftware.morf.jdbc.SqlScriptExecutor.SqlScriptVisitor#afterExecute(java.lang.String,
* long)
*/
@Override
public void afterExecute(String sql, long numberOfRowsUpdated) {
// Defaults to no-op
} | 3.68 |
framework_ScrollbarBundle_getScrollbarThickness | /**
* Gets the scrollbar's thickness.
* <p>
* This value will differ from the value in the DOM, if the thickness was
* set to 0 with {@link #setScrollbarThickness(double)}, as the scrollbar is
* then treated as "invisible."
*
* @return the scrollbar's thickness in pixels
*/
public final double getScrollbarThick... | 3.68 |
hbase_ZKUtil_toZooKeeperOp | /**
* Convert from ZKUtilOp to ZKOp
*/
private static Op toZooKeeperOp(ZKWatcher zkw, ZKUtilOp op) throws UnsupportedOperationException {
if (op == null) {
return null;
}
if (op instanceof CreateAndFailSilent) {
CreateAndFailSilent cafs = (CreateAndFailSilent) op;
return Op.create(cafs.getPath(), c... | 3.68 |
flink_CatalogManager_getCatalogOrError | /**
* Gets a catalog by name.
*
* @param catalogName name of the catalog to retrieve
* @return the requested catalog
* @throws CatalogNotExistException if the catalog does not exist
*/
public Catalog getCatalogOrError(String catalogName) throws CatalogNotExistException {
return getCatalog(catalogName).orElseT... | 3.68 |
hadoop_FederationBlock_initSubClusterPage | /**
* Initialize the Federation page of the sub-cluster.
*
* @param tbody HTML tbody.
* @param lists subCluster page data list.
*/
private void initSubClusterPage(TBODY<TABLE<Hamlet>> tbody, List<Map<String, String>> lists) {
// Sort the SubClusters
List<SubClusterInfo> subClusters = getSubClusterInfoList();
... | 3.68 |
morf_SqlScriptExecutor_get | /**
* @return the value
*/
T get() {
return value;
} | 3.68 |
morf_SchemaBean_tables | /**
* {@inheritDoc}
*
* @see org.alfasoftware.morf.metadata.Schema#tables()
*/
@Override
public Collection<Table> tables() {
return tables.values();
} | 3.68 |
dubbo_Environment_updateAppConfigMap | /**
* Merge target map properties into app configuration
*
* @param map
*/
public void updateAppConfigMap(Map<String, String> map) {
this.appConfiguration.addProperties(map);
} | 3.68 |
morf_SelectStatement_getHaving | /**
* Gets the grouping filter
*
* @return the having fields
*/
public Criterion getHaving() {
return having;
} | 3.68 |
hudi_AvroInternalSchemaConverter_buildAvroSchemaFromInternalSchema | /**
* Converts hudi internal Schema into an Avro Schema.
*
* @param schema a hudi internal Schema.
* @param recordName the record name
* @return a Avro schema match hudi internal schema.
*/
public static Schema buildAvroSchemaFromInternalSchema(InternalSchema schema, String recordName) {
Map<Type, Schema> cache... | 3.68 |
framework_ErrorLevel_intValue | /**
* Integer representation of error severity for comparison.
*
* @return integer for error severity
*/
public int intValue() {
return ordinal();
} | 3.68 |
framework_AbstractRenderer_getParentGrid | /**
* Gets the {@link Grid} this renderer is attached to. Used internally for
* indicating the source grid of possible events emitted by this renderer,
* such as {@link RendererClickEvent}s.
*
* @return the grid this renderer is attached to or {@code null} if
* unattached
*/
@SuppressWarnings("unchecked"... | 3.68 |
hmily_SofaHmilyOrderApplication_main | /**
* main.
*
* @param args args.
*/
public static void main(final String[] args) {
SpringApplication springApplication = new SpringApplication(SofaHmilyOrderApplication.class);
springApplication.run(args);
} | 3.68 |
pulsar_SimpleLoadManagerImpl_isLoadReportGenerationIntervalPassed | /**
* Check if last generated load-report time passed the minimum time for load-report update.
*
* @return true: if last load-report generation passed the minimum interval and load-report can be generated false:
* if load-report generation has not passed minimum interval to update load-report again
*/
priv... | 3.68 |
hudi_StreamSync_startCommit | /**
* Try to start a new commit.
* <p>
* Exception will be thrown if it failed in 2 tries.
*
* @return Instant time of the commit
*/
private String startCommit(String instantTime, boolean retryEnabled) {
final int maxRetries = 2;
int retryNum = 1;
RuntimeException lastException = null;
while (retryNum <= ... | 3.68 |
flink_MailboxExecutor_submit | /**
* Submits the given command for execution in the future in the mailbox thread and returns a
* Future representing that command. The Future's {@code get} method will return {@code null}
* upon <em>successful</em> completion.
*
* <p>An optional description can (and should) be added to ease debugging and error-re... | 3.68 |
querydsl_SQLTemplates_serialize | /**
* template method for SELECT serialization
*
* @param metadata
* @param forCountRow
* @param context
*/
public void serialize(QueryMetadata metadata, boolean forCountRow, SQLSerializer context) {
context.serializeForQuery(metadata, forCountRow);
if (!metadata.getFlags().isEmpty()) {
context.s... | 3.68 |
graphhopper_GraphHopper_getProfile | /**
* Returns the profile for the given profile name, or null if it does not exist
*/
public Profile getProfile(String profileName) {
return profilesByName.get(profileName);
} | 3.68 |
hadoop_RenameOperation_recursiveDirectoryRename | /**
* Execute a full recursive rename.
* There is a special handling of directly markers here -only leaf markers
* are copied. This reduces incompatibility "regions" across versions.
* @throws IOException failure
*/
protected void recursiveDirectoryRename() throws IOException {
final StoreContext storeContext = ... | 3.68 |
shardingsphere-elasticjob_JobConfiguration_setProperty | /**
* Set property.
*
* @param key property key
* @param value property value
* @return job configuration builder
*/
public Builder setProperty(final String key, final String value) {
props.setProperty(key, value);
return this;
} | 3.68 |
streampipes_StreamRequirementsBuilder_any | /**
* Creates a new stream requirement without any further property requirements.
*
* @return {@link CollectedStreamRequirements}
*/
public static CollectedStreamRequirements any() {
return StreamRequirementsBuilder.create().build();
} | 3.68 |
flink_BufferCompressor_compressToOriginalBuffer | /**
* The difference between this method and {@link #compressToIntermediateBuffer(Buffer)} is that
* this method will copy the compressed data back to the input {@link Buffer} starting from
* offset 0.
*
* <p>The caller must guarantee that the input {@link Buffer} is writable.
*/
public Buffer compressToOriginalB... | 3.68 |
querydsl_ExpressionUtils_createRootVariable | /**
* Create a new root variable based on the given path
*
* @param path base path
* @return variable name
*/
public static String createRootVariable(Path<?> path) {
return path.accept(ToStringVisitor.DEFAULT, TEMPLATES);
} | 3.68 |
flink_AvailabilityProvider_getUnavailableToResetAvailable | /**
* Returns the previously not completed future and resets the constant completed {@link
* #AVAILABLE} as the current state.
*/
public CompletableFuture<?> getUnavailableToResetAvailable() {
CompletableFuture<?> toNotify = availableFuture;
availableFuture = AVAILABLE;
return toNotify;
} | 3.68 |
flink_DynamicSinkUtils_pushMetadataProjection | /**
* Creates a projection that reorders physical and metadata columns according to the consumed
* data type of the sink. It casts metadata columns into the expected data type.
*
* @see SupportsWritingMetadata
*/
private static void pushMetadataProjection(
FlinkRelBuilder relBuilder,
FlinkTypeFacto... | 3.68 |
hadoop_LoadedManifestData_deleteEntrySequenceFile | /**
* Delete the entry sequence file.
* @return whether or not the delete was successful.
*/
public boolean deleteEntrySequenceFile() {
return getEntrySequenceFile().delete();
} | 3.68 |
streampipes_PipelineManager_getPipelinesContainingElements | /**
* Checks for the pipelines that contain the processing element
*
* @param elementId the id of the processing Element
* @return all pipelines containing the element
*/
public static List<Pipeline> getPipelinesContainingElements(String elementId) {
return PipelineManager.getAllPipelines().stream()
.filte... | 3.68 |
flink_FutureUtils_orTimeout | /**
* Times the given future out after the timeout.
*
* @param future to time out
* @param timeout after which the given future is timed out
* @param timeUnit time unit of the timeout
* @param timeoutFailExecutor executor that will complete the future exceptionally after the
* timeout is reached
* @param ti... | 3.68 |
hadoop_UnitsConversionUtil_compare | /**
* Compare a value in a given unit with a value in another unit. The return
* value is equivalent to the value returned by compareTo.
*
* @param unitA first unit
* @param valueA first value
* @param unitB second unit
* @param valueB second value
* @return +1, 0 or -1 depending on whether the relationship i... | 3.68 |
framework_VComboBox_getMainWidth | /**
* Get the width of the select in pixels where the text area and icon has
* been included.
*
* @return The width in pixels
*/
private int getMainWidth() {
return getOffsetWidth();
} | 3.68 |
hbase_FileKeyStoreLoaderBuilderProvider_getBuilderForKeyStoreFileType | /**
* Returns a {@link FileKeyStoreLoader.Builder} that can build a loader which loads keys and certs
* from files of the given {@link KeyStoreFileType}.
* @param type the file type to load keys/certs from.
* @return a new Builder.
*/
static FileKeyStoreLoader.Builder<? extends FileKeyStoreLoader>
getBuilderForK... | 3.68 |
pulsar_ProxyExtensions_extension | /**
* Return the handler for the provided <tt>extension</tt>.
*
* @param extension the extension to use
* @return the extension to handle the provided extension
*/
public ProxyExtension extension(String extension) {
ProxyExtensionWithClassLoader h = extensions.get(extension);
if (null == h) {
retur... | 3.68 |
graphhopper_Frequency_compareTo | /** must have a comparator since they go in a navigable set that is serialized */
@Override
public int compareTo(Frequency o) {
return this.start_time - o.start_time;
} | 3.68 |
pulsar_SystemTopicBasedTopicPoliciesService_readMorePoliciesAsync | /**
* This is an async method for the background reader to continue syncing new messages.
*
* Note: You should not do any blocking call here. because it will affect
* #{@link SystemTopicBasedTopicPoliciesService#getTopicPoliciesAsync(TopicName)} method to block loading topic.
*/
private void readMorePoliciesAsync(... | 3.68 |
morf_ChangePrimaryKeyColumns_getTableName | /**
* @return the table name
*/
public String getTableName() {
return tableName;
} | 3.68 |
framework_Slot_setSpacing | /**
* Set the spacing for the slot. The spacing determines if there should be
* empty space around the slot when the slot.
*
* @param spacing
* Should spacing be enabled
*/
public void setSpacing(boolean spacing) {
if (spacing && spacer == null) {
spacer = DOM.createDiv();
spacer.ad... | 3.68 |
framework_AbstractProperty_getProperty | /**
* Gets the Property whose value has changed.
*
* @return source Property of the event.
*/
@Override
public Property getProperty() {
return (Property) getSource();
} | 3.68 |
hadoop_ManifestSuccessData_getMetrics | /**
* @return any metrics.
*/
public Map<String, Long> getMetrics() {
return metrics;
} | 3.68 |
open-banking-gateway_ServiceAccountsOper_createOrActivateOrDeactivateServiceAccounts | // Unfortunately @PostConstruct can't have Transactional annotation
@PostConstruct
public void createOrActivateOrDeactivateServiceAccounts() {
txOper.execute(callback -> {
users.deactivateAllServiceAccounts();
if (null == serviceAccounts.getAccounts()) {
return null;
}
f... | 3.68 |
hbase_WALEdit_isReplay | /**
* @return True when current WALEdit is created by log replay. Replication skips WALEdits from
* replay.
*/
public boolean isReplay() {
return this.replay;
} | 3.68 |
dubbo_NetUtils_matchIpExpression | /**
* Check if address matches with specified pattern, currently only supports ipv4, use {@link this#matchIpExpression(String, String, int)} for ipv6 addresses.
*
* @param pattern cird pattern
* @param address 'ip:port'
* @return true if address matches with the pattern
*/
public static boolean matchIpExpression(... | 3.68 |
querydsl_ComparableExpression_notBetween | /**
* Create a {@code this not between from and to} expression
*
* <p>Is equivalent to {@code this < from || this > to}</p>
*
* @param from inclusive start of range
* @param to inclusive end of range
* @return this not between from and to
*/
public BooleanExpression notBetween(Expression<T> from, Expression<T> ... | 3.68 |
graphhopper_EdgeChangeBuilder_addRemovedEdges | /**
* Adds the ids of the removed edges at the real tower nodes. We need to do this such that we cannot 'skip'
* virtual nodes by just using the original edges and also to prevent u-turns at the real nodes adjacent to the
* virtual ones.
*/
private void addRemovedEdges(int towerNode) {
if (isVirtualNode(towerNo... | 3.68 |
flink_GenericArrayData_toObjectArray | /**
* Converts this {@link GenericArrayData} into an array of Java {@link Object}.
*
* <p>The method will convert a primitive array into an object array. But it will not convert
* internal data structures into external data structures (e.g. {@link StringData} to {@link
* String}).
*/
public Object[] toObjectArray... | 3.68 |
hadoop_OBSBlockOutputStream_mockPutPartError | /**
* Set mock error.
*
* @param isException mock error
*/
@VisibleForTesting
public void mockPutPartError(final boolean isException) {
this.mockUploadPartError = isException;
} | 3.68 |
framework_Table_setColumnAlignments | /**
* Sets the column alignments.
*
* <p>
* The amount of items in the array must match the amount of properties
* identified by {@link #getVisibleColumns()}. The possible values for the
* alignments include:
* <ul>
* <li>{@link Align#LEFT}: Left alignment</li>
* <li>{@link Align#CENTER}: Centered</li>
* <li>... | 3.68 |
AreaShop_SignsFeature_needsPeriodicUpdate | /**
* Check if any of the signs need periodic updating.
* @return true if one or more of the signs need periodic updating, otherwise false
*/
public boolean needsPeriodicUpdate() {
boolean result = false;
for(RegionSign sign : signs.values()) {
result |= sign.needsPeriodicUpdate();
}
return result;
} | 3.68 |
flink_DemultiplexingRecordDeserializer_getNextRecord | /** Summarizes the status and watermarks of all virtual channels. */
@Override
public DeserializationResult getNextRecord(DeserializationDelegate<StreamElement> delegate)
throws IOException {
DeserializationResult result;
do {
result = currentVirtualChannel.getNextRecord(delegate);
if (... | 3.68 |
morf_HumanReadableStatementProducer_renameIndex | /**
* @see org.alfasoftware.morf.upgrade.SchemaEditor#renameIndex(java.lang.String, java.lang.String, java.lang.String)
*/
@Override
public void renameIndex(String tableName, String fromIndexName, String toIndexName) {
consumer.schemaChange(HumanReadableStatementHelper.generateRenameIndexString(tableName, fromIndex... | 3.68 |
flink_StateBackendLoader_fromApplicationOrConfigOrDefault | /**
* This is the state backend loader that loads a {@link DelegatingStateBackend} wrapping the
* state backend loaded from {@link
* StateBackendLoader#loadFromApplicationOrConfigOrDefaultInternal} when delegation is enabled.
* If delegation is not enabled, the underlying wrapped state backend is returned instead.
... | 3.68 |
hadoop_LocatedFileStatus_getBlockLocations | /**
* Get the file's block locations
*
* In HDFS, the returned BlockLocation will have different formats for
* replicated and erasure coded file.
* Please refer to
* {@link FileSystem#getFileBlockLocations(FileStatus, long, long)}
* for more details.
*
* @return the file's block locations
*/
public BlockLocat... | 3.68 |
querydsl_Expressions_asTime | /**
* Create a new TimeExpression
*
* @param value the time
* @return new TimeExpression
*/
public static <T extends Comparable<?>> TimeExpression<T> asTime(T value) {
return asTime(constant(value));
} | 3.68 |
hbase_ProcedureExecutor_removeChore | /**
* Remove a chore procedure from the executor
* @param chore the chore to remove
* @return whether the chore is removed, or it will be removed later
*/
public boolean removeChore(@Nullable ProcedureInMemoryChore<TEnvironment> chore) {
if (chore == null) {
return true;
}
chore.setState(ProcedureState.SU... | 3.68 |
dubbo_DubboBootstrap_provider | // {@link ProviderConfig} correlative methods
public Module provider(Consumer<ProviderBuilder> builderConsumer) {
return provider(null, builderConsumer);
} | 3.68 |
hudi_HoodieAvroUtils_getNestedFieldVal | /**
* Obtain value of the provided field, denoted by dot notation. e.g: a.b.c
*/
public static Object getNestedFieldVal(GenericRecord record, String fieldName, boolean returnNullIfNotFound, boolean consistentLogicalTimestampEnabled) {
String[] parts = fieldName.split("\\.");
GenericRecord valueNode = record;
f... | 3.68 |
hbase_CoprocessorWhitelistMasterObserver_verifyCoprocessors | /**
* Perform the validation checks for a coprocessor to determine if the path is white listed or
* not.
* @throws IOException if path is not included in whitelist or a failure occurs in processing
* @param ctx as passed in from the coprocessor
* @param htd as passed in from the coprocessor
*/
private static void... | 3.68 |
flink_OverWindowPartitionedOrderedPreceding_following | /**
* Set the following offset (based on time or row-count intervals) for over window.
*
* @param following following offset that relative to the current row.
* @return an over window with defined following
*/
public OverWindowPartitionedOrderedPreceding following(Expression following) {
optionalFollowing = Op... | 3.68 |
flink_Pattern_next | /**
* Appends a new group pattern to the existing one. The new pattern enforces strict temporal
* contiguity. This means that the whole pattern sequence matches only if an event which matches
* this pattern directly follows the preceding matching event. Thus, there cannot be any events
* in between two matching eve... | 3.68 |
framework_Calendar_setFirstDayOfWeek | /**
* Allow setting first day of week independent of Locale. Set to null if you
* want first day of week being defined by the locale
*
* @since 7.6
* @param dayOfWeek
* any of java.util.Calendar.SUNDAY..java.util.Calendar.SATURDAY
* or null to revert to default first day of week by locale
... | 3.68 |
flink_InstantiationUtil_createCopyWritable | /**
* Clones the given writable using the {@link IOReadableWritable serialization}.
*
* @param original Object to clone
* @param <T> Type of the object to clone
* @return Cloned object
* @throws IOException Thrown is the serialization fails.
*/
public static <T extends IOReadableWritable> T createCopyWritable(T ... | 3.68 |
framework_UIDL_getIntArrayVariable | /**
* Gets the value of the named variable.
*
* @param name
* the name of the variable
* @return the value of the variable
*/
public int[] getIntArrayVariable(String name) {
return var().getIntArray(name);
} | 3.68 |
hbase_ZKUtil_submitBatchedMultiOrSequential | /**
* Chunks the provided {@code ops} when their approximate size exceeds the the configured limit.
* Take caution that this can ONLY be used for operations where atomicity is not important, e.g.
* deletions. It must not be used when atomicity of the operations is critical.
* @param zkw refe... | 3.68 |
hudi_HoodieGauge_getValue | /**
* Returns the metric's current value.
*
* @return the metric's current value
*/
@Override
public T getValue() {
return value;
} | 3.68 |
hudi_WriteStatus_markFailure | /**
* Used by native write handles like HoodieRowCreateHandle and HoodieRowDataCreateHandle.
*
* @see WriteStatus#markFailure(HoodieRecord, Throwable, Option)
*/
@PublicAPIMethod(maturity = ApiMaturityLevel.EVOLVING)
public void markFailure(String recordKey, String partitionPath, Throwable t) {
if (failedRecords.... | 3.68 |
flink_EventTimeTriggers_withLateFirings | /**
* Creates a new {@code Trigger} like the this, except that it fires repeatedly whenever the
* given {@code Trigger} fires after the watermark has passed the end of the window.
*/
public Trigger<W> withLateFirings(Trigger<W> lateFirings) {
checkNotNull(lateFirings);
if (lateFirings instanceof ElementTrigg... | 3.68 |
hbase_MultiRowRangeFilter_get | /**
* Gets the RowRange at the given offset.
*/
@SuppressWarnings({ "unchecked", "TypeParameterUnusedInFormals" })
public <T extends BasicRowRange> T get(int i) {
return (T) ranges.get(i);
} | 3.68 |
graphhopper_ResponsePath_getDescend | /**
* This method returns the total elevation change (going downwards) in meter.
* <p>
*
* @return decline in meter
*/
public double getDescend() {
return descend;
} | 3.68 |
hbase_QuotaObserverChore_getTablesByNamespace | /**
* Returns a view of all tables that reside in a namespace with a namespace quota, grouped by
* the namespace itself.
*/
public Multimap<String, TableName> getTablesByNamespace() {
Multimap<String, TableName> tablesByNS = HashMultimap.create();
for (TableName tn : tablesWithNamespaceQuotas) {
tablesByNS.p... | 3.68 |
pulsar_WaterMarkEventGenerator_computeWaterMarkTs | /**
* Computes the min ts across all input topics.
*/
private long computeWaterMarkTs() {
long ts = 0;
// only if some data has arrived on each input topic
if (topicToTs.size() >= inputTopics.size()) {
ts = Long.MAX_VALUE;
for (Map.Entry<String, Long> entry : topicToTs.entrySet()) {
... | 3.68 |
hbase_Table_close | /**
* Releases any resources held or pending changes in internal buffers.
* @throws IOException if a remote or network exception occurs.
*/
@Override
default void close() throws IOException {
throw new NotImplementedException("Add an implementation!");
} | 3.68 |
hadoop_RouterObserverReadProxyProvider_autoMsyncIfNecessary | /**
* This will call {@link ClientProtocol#msync()} on the active NameNode
* (via the {@link #innerProxy}) to update the state of this client, only
* if at least {@link #autoMsyncPeriodMs} ms has elapsed since the last time
* an msync was performed.
*
* @see #autoMsyncPeriodMs
*/
private void autoMsyncIfNecessar... | 3.68 |
framework_AbstractSelect_setItemCaption | /**
* Override the caption of an item. Setting caption explicitly overrides id,
* item and index captions.
*
* @param itemId
* the id of the item to be recaptioned.
* @param caption
* the New caption.
*/
public void setItemCaption(Object itemId, String caption) {
if (itemId != null) {
... | 3.68 |
querydsl_OrderSpecifier_getTarget | /**
* Get the target expression of this OrderSpecifier
*
* @return target expression
*/
public Expression<T> getTarget() {
return target;
} | 3.68 |
hudi_OptionsResolver_isDeltaTimeCompaction | /**
* Returns whether the compaction strategy is based on elapsed delta time.
*/
public static boolean isDeltaTimeCompaction(Configuration conf) {
final String strategy = conf.getString(FlinkOptions.COMPACTION_TRIGGER_STRATEGY).toLowerCase(Locale.ROOT);
return FlinkOptions.TIME_ELAPSED.equals(strategy) || FlinkOp... | 3.68 |
hbase_ByteBufferUtils_intFitsIn | /**
* Check how many bytes is required to store value.
* @param value Value which size will be tested.
* @return How many bytes are required to store value.
*/
public static int intFitsIn(final int value) {
if (value < 0) {
return 4;
}
if (value < (1 << (2 * 8))) {
if (value < (1 << (1 * 8))) {
... | 3.68 |
flink_ChangelogMode_newBuilder | /** Builder for configuring and creating instances of {@link ChangelogMode}. */
public static Builder newBuilder() {
return new Builder();
} | 3.68 |
framework_GridConnector_getDetailsListener | /**
* Gets the listener used by this connector for tracking when row detail
* visibility changes.
*
* @since 7.5.0
* @return the used details listener
*/
public DetailsListener getDetailsListener() {
return detailsListener;
} | 3.68 |
hbase_HBaseTestingUtility_shutdownMiniMapReduceCluster | /**
* Stops the previously started <code>MiniMRCluster</code>.
*/
public void shutdownMiniMapReduceCluster() {
if (mrCluster != null) {
LOG.info("Stopping mini mapreduce cluster...");
mrCluster.shutdown();
mrCluster = null;
LOG.info("Mini mapreduce cluster stopped");
}
// Restore configuration t... | 3.68 |
framework_SQLUtil_escapeSQL | /**
* Escapes different special characters in strings that are passed to SQL.
* Replaces the following:
*
* <list>
* <li>' is replaced with ''</li>
* <li>\x00 is removed</li>
* <li>\ is replaced with \\</li>
* <li>" is replaced with \"</li>
* <li>\x1a is removed</li> </list>
*
* Also note! The escaping done ... | 3.68 |
pulsar_ResourceUsage_compareTo | /**
* this may be wrong since we are comparing available and not the usage.
*
* @param o
* @return
*/
public int compareTo(ResourceUsage o) {
double required = o.limit - o.usage;
double available = limit - usage;
return Double.compare(available, required);
} | 3.68 |
MagicPlugin_PreLoadEvent_registerBlockBlockManager | /**
* Register a BlockBreakManager, for controlling whether or not players can break blocks with magic.
*
* @param manager The manager to add.
*/
public void registerBlockBlockManager(BlockBreakManager manager) {
blockBreakManagers.add(manager);
} | 3.68 |
hbase_RegionStates_removeServer | /**
* Called by SCP at end of successful processing.
*/
public void removeServer(final ServerName serverName) {
serverMap.remove(serverName);
} | 3.68 |
streampipes_UserStorage_checkUser | /**
* @param username
* @return True if user exists exactly once, false otherwise
*/
@Override
public boolean checkUser(String username) {
List<Principal> users = findByKey(viewName, username.toLowerCase(), Principal.class);
return users.size() == 1;
} | 3.68 |
AreaShop_SignsFeature_getSignByLocation | /**
* Get a sign by a location.
* @param location The location to get the sign for
* @return The RegionSign that is at the location, or null if none
*/
public static RegionSign getSignByLocation(Location location) {
return allSigns.get(locationToString(location));
} | 3.68 |
framework_HierarchicalContainer_setChildrenAllowed | /**
* <p>
* Sets the given Item's capability to have children. If the Item identified
* with the itemId already has children and the areChildrenAllowed is false
* this method fails and <code>false</code> is returned; the children must
* be first explicitly removed with
* {@link #setParent(Object itemId, Object ne... | 3.68 |
flink_CallExpression_temporary | /**
* Creates a {@link CallExpression} to a temporary function (potentially shadowing a {@link
* Catalog} function or providing a system function).
*/
public static CallExpression temporary(
FunctionIdentifier functionIdentifier,
FunctionDefinition functionDefinition,
List<ResolvedExpression>... | 3.68 |
hudi_AbstractTableFileSystemView_getCompletionTime | /**
* Returns the completion time for instant.
*/
public Option<String> getCompletionTime(String instantTime) {
return this.completionTimeQueryView.getCompletionTime(instantTime, instantTime);
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.