name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hbase_TableDescriptorBuilder_toCoprocessorDescriptor | /**
* This method is mostly intended for internal use. However, it it also relied on by hbase-shell
* for backwards compatibility.
*/
private static Optional<CoprocessorDescriptor> toCoprocessorDescriptor(String spec) {
Matcher matcher = CP_HTD_ATTR_VALUE_PATTERN.matcher(spec);
if (matcher.matches()) {
// ja... | 3.68 |
framework_VAbstractCalendarPanel_focusNextYear | /**
* Selects the next year
*/
@SuppressWarnings("deprecation")
private void focusNextYear(int years) {
if (focusedDate == null) {
return;
}
Date nextYearDate = (Date) focusedDate.clone();
nextYearDate.setYear(nextYearDate.getYear() + years);
// Do not focus if not inside range
if (!i... | 3.68 |
hadoop_IOStatisticsStoreImpl_aggregate | /**
* Aggregate those statistics which the store is tracking;
* ignore the rest.
*
* @param source statistics; may be null
* @return true if a statistics reference was supplied/aggregated.
*/
@Override
public synchronized boolean aggregate(
@Nullable final IOStatistics source) {
if (source == null) {
r... | 3.68 |
AreaShop_WorldGuardHandler7_beta_2_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 |
querydsl_GeometryExpression_distanceSphere | // TODO maybe move out
public NumberExpression<Double> distanceSphere(Expression<? extends Geometry> geometry) {
return Expressions.numberOperation(Double.class, SpatialOps.DISTANCE_SPHERE, mixin, geometry);
} | 3.68 |
hudi_StreamWriteFunction_getBucketID | /**
* Returns the bucket ID with the given value {@code value}.
*/
private String getBucketID(HoodieRecord<?> record) {
final String fileId = record.getCurrentLocation().getFileId();
return StreamerUtil.generateBucketKey(record.getPartitionPath(), fileId);
} | 3.68 |
streampipes_StatementHandler_extendPreparedStatement | /**
* @param event
* @param s1
* @param s2
* @param index
* @param preProperty
* @param prefix
* @return
*/
public int extendPreparedStatement(DbDescription dbDescription,
final Map<String, Object> event,
StringBuilder s1,
... | 3.68 |
hbase_ColumnSchemaModel___setCompression | /**
* @param value the desired value of the COMPRESSION attribute
*/
public void __setCompression(String value) {
attrs.put(COMPRESSION, value);
} | 3.68 |
hbase_KeyValue_getTagsLength | /** Return the total length of the tag bytes */
@Override
public int getTagsLength() {
int tagsLen = this.length - (getKeyLength() + getValueLength() + KEYVALUE_INFRASTRUCTURE_SIZE);
if (tagsLen > 0) {
// There are some Tag bytes in the byte[]. So reduce 2 bytes which is added to denote the tags
// length
... | 3.68 |
hbase_SimpleRegionNormalizer_isLargeEnoughForMerge | /**
* Return {@code true} when {@code regionInfo} has a size that is sufficient to be considered for
* a merge operation, {@code false} otherwise.
* </p>
* Callers beware: for safe concurrency, be sure to pass in the local instance of
* {@link NormalizerConfiguration}, don't use {@code this}'s instance.
*/
privat... | 3.68 |
hbase_Scan_getMaxVersions | /** Returns the max number of versions to fetch */
public int getMaxVersions() {
return this.maxVersions;
} | 3.68 |
flink_FactoryUtil_createModuleFactoryHelper | /**
* Creates a utility that helps validating options for a {@link ModuleFactory}.
*
* <p>Note: This utility checks for left-over options in the final step.
*/
public static ModuleFactoryHelper createModuleFactoryHelper(
ModuleFactory factory, ModuleFactory.Context context) {
return new ModuleFactoryHel... | 3.68 |
hbase_SimplePositionedMutableByteRange_putVLong | // Copied from com.google.protobuf.CodedOutputStream v2.5.0 writeRawVarint64
@Override
public int putVLong(int index, long val) {
int rPos = 0;
while (true) {
if ((val & ~0x7F) == 0) {
bytes[offset + index + rPos] = (byte) val;
break;
} else {
bytes[offset + index + rPos] = (byte) ((val & ... | 3.68 |
framework_Query_getOffset | /**
* Gets the first index of items to fetch. The offset is only used when
* fetching items, but not when counting the number of available items.
*
* @return offset for data request
*/
public int getOffset() {
return offset;
} | 3.68 |
hadoop_CacheDirectiveStats_setFilesNeeded | /**
* Sets the files needed by this directive.
* @param filesNeeded The number of files needed
* @return This builder, for call chaining.
*/
public Builder setFilesNeeded(long filesNeeded) {
this.filesNeeded = filesNeeded;
return this;
} | 3.68 |
querydsl_JTSGeometryExpression_eq | /* (non-Javadoc)
* @see com.querydsl.core.types.dsl.SimpleExpression#eq(com.querydsl.core.types.Expression)
*/
@Override
public BooleanExpression eq(Expression<? super T> right) {
return Expressions.booleanOperation(SpatialOps.EQUALS, mixin, right);
} | 3.68 |
framework_DragSourceExtension_initListeners | /**
* Initializes dragstart and -end event listeners for this drag source to
* capture the active drag source for the UI.
*/
private void initListeners() {
// Set current extension as active drag source in the UI
dragStartListenerHandle = addDragStartListener(
event -> getUI().setActiveDragSource... | 3.68 |
hadoop_BalanceProcedure_nextProcedure | /**
* Get the next procedure.
*/
public String nextProcedure() {
return nextProcedure;
} | 3.68 |
flink_CopyOnWriteSkipListStateMap_releaseAllResource | /** Release all resource used by the map. */
private void releaseAllResource() {
long node = levelIndexHeader.getNextNode(0);
while (node != NIL_NODE) {
long nextNode = helpGetNextNode(node, 0);
long valuePointer = SkipListUtils.helpGetValuePointer(node, spaceAllocator);
spaceAllocator.f... | 3.68 |
hbase_StoreFileWriter_trackTimestamps | /**
* Record the earlest Put timestamp. If the timeRangeTracker is not set, update TimeRangeTracker
* to include the timestamp of this key
*/
public void trackTimestamps(final Cell cell) {
if (KeyValue.Type.Put.getCode() == cell.getTypeByte()) {
earliestPutTs = Math.min(earliestPutTs, cell.getTimestamp());
}... | 3.68 |
flink_DefaultCompletedCheckpointStoreUtils_getMaximumNumberOfRetainedCheckpoints | /**
* Extracts maximum number of retained checkpoints configuration from the passed {@link
* Configuration}. The default value is used as a fallback if the passed value is a value larger
* than {@code 0}.
*
* @param config The configuration that is accessed.
* @param logger The {@link Logger} used for exposing th... | 3.68 |
hbase_ScannerContext_setFields | /**
* Set all fields together.
*/
void setFields(int batch, long dataSize, long heapSize, long blockSize) {
setBatch(batch);
setDataSize(dataSize);
setHeapSize(heapSize);
setBlockSize(blockSize);
} | 3.68 |
hmily_EventData_setValue | /**
* Sets value.
*
* @param value the value
*/
public void setValue(final Object value) {
this.value = value;
} | 3.68 |
flink_CompositeBuffer_getFullBufferData | /**
* Returns the full buffer data in one piece of {@link MemorySegment}. If there is multiple
* partial buffers, the partial data will be copied to the given target {@link MemorySegment}.
*/
public Buffer getFullBufferData(MemorySegment segment) {
checkState(!partialBuffers.isEmpty());
checkState(currentLen... | 3.68 |
flink_CheckpointStorageLoader_fromConfig | /**
* Loads the checkpoint storage from the configuration, from the parameter
* 'state.checkpoint-storage', as defined in {@link CheckpointingOptions#CHECKPOINT_STORAGE}.
*
* <p>The implementation can be specified either via their shortcut name, or via the class name
* of a {@link CheckpointStorageFactory}. If a C... | 3.68 |
hadoop_UriUtils_maskUrlQueryParameters | /**
* Generic function to mask a set of query parameters partially/fully and
* return the resultant query string
* @param keyValueList List of NameValuePair instances for query keys/values
* @param queryParamsForFullMask values for these params will appear as "XXXX"
* @param queryParamsForPartialMask values will b... | 3.68 |
framework_Heartbeat_getConnection | /**
* @return the application connection
*/
@Deprecated
protected ApplicationConnection getConnection() {
return connection;
} | 3.68 |
hmily_HmilyLockManager_releaseLocks | /**
* Release locks.
*
* @param hmilyLocks hmily locks
*/
public void releaseLocks(final Collection<HmilyLock> hmilyLocks) {
HmilyRepositoryStorage.releaseHmilyLocks(hmilyLocks);
hmilyLocks.forEach(lock -> HmilyLockCacheManager.getInstance().removeByKey(lock.getLockId()));
log.debug("TAC-release-lock ::... | 3.68 |
dubbo_ModuleConfigManager_getDefaultProvider | /**
* Only allows one default ProviderConfig
*/
public Optional<ProviderConfig> getDefaultProvider() {
List<ProviderConfig> providerConfigs = getDefaultConfigs(getConfigsMap(getTagName(ProviderConfig.class)));
if (CollectionUtils.isNotEmpty(providerConfigs)) {
return Optional.of(providerConfigs.get(0)... | 3.68 |
flink_TimestampData_toLocalDateTime | /** Converts this {@link TimestampData} object to a {@link LocalDateTime}. */
public LocalDateTime toLocalDateTime() {
int date = (int) (millisecond / MILLIS_PER_DAY);
int time = (int) (millisecond % MILLIS_PER_DAY);
if (time < 0) {
--date;
time += MILLIS_PER_DAY;
}
long nanoOfDay = ... | 3.68 |
pulsar_SchemaHash_of | // Shouldn't call this method frequently, otherwise will bring performance regression
public static SchemaHash of(byte[] schemaBytes, SchemaType schemaType) {
return new SchemaHash(hashFunction.hashBytes(schemaBytes == null ? new byte[0] : schemaBytes), schemaType);
} | 3.68 |
flink_AbstractPagedInputView_getCurrentSegment | /**
* Gets the memory segment that will be used to read the next bytes from. If the segment is
* exactly exhausted, meaning that the last byte read was the last byte available in the
* segment, then this segment will not serve the next bytes. The segment to serve the next bytes
* will be obtained through the {@link... | 3.68 |
hadoop_VolumeFailureSummary_getEstimatedCapacityLostTotal | /**
* Returns estimate of capacity lost. This is said to be an estimate, because
* in some cases it's impossible to know the capacity of the volume, such as if
* we never had a chance to query its capacity before the failure occurred.
*
* @return estimate of capacity lost in bytes
*/
public long getEstimatedCapa... | 3.68 |
framework_ScrollbarBundle_forceScrollbar | /**
* Force the scrollbar to be visible with CSS. In practice, this means to
* set either <code>overflow-x</code> or <code>overflow-y</code> to "
* <code>scroll</code>" in the scrollbar's direction.
* <p>
* This method is an IE8 workaround, since it doesn't always show scrollbars
* with <code>overflow: auto</code... | 3.68 |
hbase_ReplicationSourceLogQueue_getQueueSize | /**
* Get the queue size for the given walGroupId.
* @param walGroupId walGroupId
*/
public int getQueueSize(String walGroupId) {
Queue<Path> queue = queues.get(walGroupId);
if (queue == null) {
return 0;
}
return queue.size();
} | 3.68 |
rocketmq-connect_ProcessingContext_currentContext | /**
* A helper method to set both the stage and the class.
*
* @param stage the stage
* @param klass the class which will execute the operation in this stage.
*/
public void currentContext(ErrorReporter.Stage stage, Class<?> klass) {
stage(stage);
executingClass(klass);
} | 3.68 |
hudi_ClusteringUtils_getAllPendingClusteringPlans | /**
* Get all pending clustering plans along with their instants.
*/
public static Stream<Pair<HoodieInstant, HoodieClusteringPlan>> getAllPendingClusteringPlans(
HoodieTableMetaClient metaClient) {
List<HoodieInstant> pendingReplaceInstants =
metaClient.getActiveTimeline().filterPendingReplaceTimeline().... | 3.68 |
hbase_ScheduledChore_getInitialDelay | /** Returns initial delay before executing chore in getTimeUnit() units */
public long getInitialDelay() {
return initialDelay;
} | 3.68 |
hbase_ColumnSchemaModel___setBlocksize | /**
* @param value the desired value of the BLOCKSIZE attribute
*/
public void __setBlocksize(int value) {
attrs.put(BLOCKSIZE, Integer.toString(value));
} | 3.68 |
hbase_ZKProcedureMemberRpcs_sendMemberAborted | /**
* This should be called by the member and should write a serialized root cause exception as to
* the abort znode.
*/
@Override
public void sendMemberAborted(Subprocedure sub, ForeignException ee) {
if (sub == null) {
LOG.error("Failed due to null subprocedure", ee);
return;
}
String procName = sub.... | 3.68 |
framework_VCustomLayout_remove | /** Removes given widget from the layout. */
@Override
public boolean remove(Widget w) {
final String location = getLocation(w);
if (location != null) {
locationToWidget.remove(location);
}
final VCaptionWrapper cw = childWidgetToCaptionWrapper.get(w);
if (cw != null) {
childWidgetTo... | 3.68 |
morf_ChangePrimaryKeyColumns_applyChange | /**
* Applies the change
* @param schema The target schema
* @param from the old primary key
* @param to the new primary key
* @return The resulting schema
*/
protected Schema applyChange(Schema schema, List<String> from, List<String> to) {
// Construct a list of column names converted to all upper case - this... | 3.68 |
flink_Execution_releaseAssignedResource | /**
* Releases the assigned resource and completes the release future once the assigned resource
* has been successfully released.
*
* @param cause for the resource release, null if none
*/
private void releaseAssignedResource(@Nullable Throwable cause) {
assertRunningInJobMasterMainThread();
final Logic... | 3.68 |
hbase_HRegionWALFileSystem_archiveRecoveredEdits | /**
* Closes and archives the specified store files from the specified family.
* @param familyName Family that contains the store filesMeta
* @param storeFiles set of store files to remove
* @throws IOException if the archiving fails
*/
public void archiveRecoveredEdits(String familyName, Collection<HStoreFile> st... | 3.68 |
hadoop_HdfsLocatedFileStatus_getLocalNameInBytes | /**
* Get the Java UTF8 representation of the local name.
* @return the local name in java UTF8
*/
@Override
public byte[] getLocalNameInBytes() {
return uPath;
} | 3.68 |
hadoop_ManifestPrinter_println | /**
* Print a line to the output stream.
* @param format format string
* @param args arguments.
*/
private void println(String format, Object... args) {
out.format(format, args);
out.println();
} | 3.68 |
rocketmq-connect_JsonSchemaUtils_validate | /**
* validate object
*
* @param schema
* @param value
* @throws JsonProcessingException
* @throws ValidationException
*/
public static void validate(Schema schema, Object value) throws JsonProcessingException, ValidationException {
Object primitiveValue = NONE_MARKER;
if (isPrimitive(value)) {
p... | 3.68 |
querydsl_AbstractMongodbQuery_setReadPreference | /**
* Sets the read preference for this query
*
* @param readPreference read preference
*/
public void setReadPreference(ReadPreference readPreference) {
this.readPreference = readPreference;
} | 3.68 |
hadoop_AllocateRequest_askList | /**
* Set the <code>askList</code> of the request.
* @see AllocateRequest#setAskList(List)
* @param askList <code>askList</code> of the request
* @return {@link AllocateRequestBuilder}
*/
@Public
@Stable
public AllocateRequestBuilder askList(List<ResourceRequest> askList) {
allocateRequest.setAskList(askList);
... | 3.68 |
flink_DefaultDelegationTokenManager_obtainDelegationTokens | /**
* Obtains new tokens in a one-time fashion and leaves it up to the caller to distribute them.
*/
@Override
public void obtainDelegationTokens(DelegationTokenContainer container) throws Exception {
LOG.info("Obtaining delegation tokens");
obtainDelegationTokensAndGetNextRenewal(container);
LOG.info("De... | 3.68 |
hadoop_IOStatisticsSnapshot_writeObject | /**
* Serialize by converting each map to a TreeMap, and saving that
* to the stream.
* @param s ObjectOutputStream.
* @throws IOException raised on errors performing I/O.
*/
private synchronized void writeObject(ObjectOutputStream s)
throws IOException {
// Write out the core
s.defaultWriteObject();
s.w... | 3.68 |
pulsar_MultiTopicsConsumerImpl_onTopicsExtended | // Check partitions changes of passed in topics, and subscribe new added partitions.
@Override
public CompletableFuture<Void> onTopicsExtended(Collection<String> topicsExtended) {
CompletableFuture<Void> future = new CompletableFuture<>();
if (topicsExtended.isEmpty()) {
future.complete(null);
r... | 3.68 |
framework_Escalator_scrollToRowAndSpacer | /**
* Scrolls vertically to a row and the spacer below it.
* <p>
* If a spacer is not open at that index, this method behaves like
* {@link #scrollToRow(int, ScrollDestination, int)}
*
* @since 7.5.0
* @param rowIndex
* the index of the logical row to scroll to. -1 takes the
* topmost spa... | 3.68 |
hudi_ClusteringUtils_getEarliestInstantToRetainForClustering | /**
* Returns the earliest instant to retain.
* Make sure the clustering instant won't be archived before cleaned, and the earliest inflight clustering instant has a previous commit.
*
* @param activeTimeline The active timeline
* @param metaClient The meta client
* @return the earliest instant to retain for ... | 3.68 |
flink_CollectionUtil_partition | /** Partition a collection into approximately n buckets. */
public static <T> Collection<List<T>> partition(Collection<T> elements, int numBuckets) {
Map<Integer, List<T>> buckets = newHashMapWithExpectedSize(numBuckets);
int initialCapacity = elements.size() / numBuckets;
int index = 0;
for (T elemen... | 3.68 |
framework_Navigator_getStateParameterMap | /**
* Returns the current navigation state reported by this Navigator's
* {@link NavigationStateManager} as Map<String, String> where each key
* represents a parameter in the state. The state parameter separator
* character needs to be specified with the separator.
*
* @param separator
* the string (t... | 3.68 |
hadoop_MawoConfiguration_getJobBuilderClass | /**
* Get job builder class.
* @return value of mawo.job-builder.class
*/
public String getJobBuilderClass() {
return configsMap.get(JOB_BUILDER_CLASS);
} | 3.68 |
flink_DataStreamSink_setResources | /**
* Sets the resources for this sink, the minimum and preferred resources are the same by
* default.
*
* @param resources The resources for this sink.
* @return The sink with set minimum and preferred resources.
*/
private DataStreamSink<T> setResources(ResourceSpec resources) {
transformation.setResources(... | 3.68 |
hadoop_RMActiveServiceContext_incrTokenSequenceNo | /**
* Increment token sequence no.
*
*/
public void incrTokenSequenceNo() {
this.tokenSequenceNo.incrementAndGet();
} | 3.68 |
framework_FlyweightCell_setElement | /**
* Sets the DOM element for this FlyweightCell, either a <code>TD</code> or
* a <code>TH</code>. It is the caller's responsibility to actually insert
* the given element to the document when needed.
*
* @param element
* the element corresponding to this cell, cannot be null
*/
public void setElemen... | 3.68 |
shardingsphere-elasticjob_JobScheduleController_pauseJob | /**
* Pause job.
*/
public synchronized void pauseJob() {
try {
if (!scheduler.isShutdown()) {
scheduler.pauseAll();
}
} catch (final SchedulerException ex) {
throw new JobSystemException(ex);
}
} | 3.68 |
flink_CheckpointRequestDecider_chooseRequestToExecute | /**
* Choose the next {@link CheckpointTriggerRequest request} to execute based on the provided
* candidate and the current state. Acquires a lock and may update the state.
*
* @return request that should be executed
*/
private Optional<CheckpointTriggerRequest> chooseRequestToExecute(
boolean isTriggering... | 3.68 |
hbase_CryptoAES_unwrap | /**
* Decrypts input data. The input composes of (msg, padding if needed, mac) and sequence num. The
* result is msg.
* @param data the input byte array
* @param offset the offset in input where the input starts
* @param len the input length
* @return the new decrypted byte array.
* @throws SaslException if... | 3.68 |
querydsl_NumberExpression_intValue | /**
* Create a {@code this.intValue()} expression
*
* <p>Get the int expression of this numeric expression</p>
*
* @return this.intValue()
* @see java.lang.Number#intValue()
*/
public NumberExpression<Integer> intValue() {
return castToNum(Integer.class);
} | 3.68 |
Activiti_RootPropertyResolver_isProperty | /**
* Test property
*
* @param property
* property name
* @return <code>true</code> if the given property is associated with a value
*/
public boolean isProperty(String property) {
return map.containsKey(property);
} | 3.68 |
pulsar_SimpleLoadManagerImpl_findBrokerForPlacement | /**
* Assign owner for specified ServiceUnit from the given candidates, following the the principles: 1) Optimum
* distribution: fill up one broker till its load reaches optimum level (defined by underload threshold) before pull
* another idle broker in; 2) Even distribution: once all brokers' load are above optimum... | 3.68 |
flink_DuplicatingFileSystem_of | /** A factory method for creating a simple pair of source/destination. */
static CopyRequest of(Path source, Path destination) {
return new CopyRequest() {
@Override
public Path getSource() {
return source;
}
@Override
public Path getDestination() {
r... | 3.68 |
pulsar_PulsarAvroRowDecoder_decodeRow | /**
* decode ByteBuf by {@link org.apache.pulsar.client.api.schema.GenericSchema}.
* @param byteBuf
* @return
*/
@Override
public Optional<Map<DecoderColumnHandle, FieldValueProvider>> decodeRow(ByteBuf byteBuf) {
GenericRecord avroRecord;
try {
GenericAvroRecord record = (GenericAvroRecord) generic... | 3.68 |
hbase_LruBlockCache_assertCounterSanity | /**
* Sanity-checking for parity between actual block cache content and metrics. Intended only for
* use with TRACE level logging and -ea JVM.
*/
private static void assertCounterSanity(long mapSize, long counterVal) {
if (counterVal < 0) {
LOG.trace("counterVal overflow. Assertions unreliable. counterVal=" + ... | 3.68 |
querydsl_GroupBy_avg | /**
* Create a new aggregating avg expression with a user-provided MathContext
*
* @param expression expression for which the accumulated average value will be used in the group by projection
* @param mathContext mathContext for average calculation
* @return wrapper expression
*/
public static <E extends Number> ... | 3.68 |
querydsl_MapExpressionBase_size | /**
* Create a {@code this.size()} expression
*
* @return this.size()
*/
public final NumberExpression<Integer> size() {
if (size == null) {
size = Expressions.numberOperation(Integer.class, Ops.MAP_SIZE, mixin);
}
return size;
} | 3.68 |
flink_CheckpointConfig_setAlignedCheckpointTimeout | /**
* Only relevant if {@link ExecutionCheckpointingOptions.ENABLE_UNALIGNED} is enabled.
*
* <p>If {@link ExecutionCheckpointingOptions#ALIGNED_CHECKPOINT_TIMEOUT} has value equal to
* <code>0</code>, checkpoints will
*
* <p>always start unaligned.
*
* <p>If {@link ExecutionCheckpointingOptions#ALIGNED_CHECKPO... | 3.68 |
dubbo_AdaptiveClassCodeGenerator_getUrlTypeIndex | /**
* get index of parameter with type URL
*/
private int getUrlTypeIndex(Method method) {
int urlTypeIndex = -1;
Class<?>[] pts = method.getParameterTypes();
for (int i = 0; i < pts.length; ++i) {
if (pts[i].equals(URL.class)) {
urlTypeIndex = i;
break;
}
}
... | 3.68 |
morf_SqlServerDialect_getSqlForLastDayOfMonth | /**
* @see org.alfasoftware.morf.jdbc.SqlDialect#getSqlForLastDayOfMonth
*/
@Override
protected String getSqlForLastDayOfMonth(AliasedField date) {
return "DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0," + getSqlFrom(date) + ")+1,0))";
} | 3.68 |
hbase_RegionServerRpcQuotaManager_getQuota | /**
* Returns the quota for an operation.
* @param ugi the user that is executing the operation
* @param table the table where the operation will be executed
* @return the OperationQuota
*/
public OperationQuota getQuota(final UserGroupInformation ugi, final TableName table) {
if (isQuotaEnabled() && !table.is... | 3.68 |
pulsar_ConsumerImpl_clearReceiverQueue | /**
* Clear the internal receiver queue and returns the message id of what was the 1st message in the queue that was
* not seen by the application.
*/
private MessageIdAdv clearReceiverQueue() {
List<Message<?>> currentMessageQueue = new ArrayList<>(incomingMessages.size());
incomingMessages.drainTo(currentM... | 3.68 |
morf_JdbcUrlElements_withSchemaName | /**
* Sets the schema name. Defaults to null (no schema specified).
*
* @param schemaName The schema name
* @return this
*/
public Builder withSchemaName(String schemaName) {
this.schemaName = schemaName;
return this;
} | 3.68 |
flink_StreamOperatorStateContext_isRestored | /**
* Returns true if the states provided by this context are restored from a checkpoint/savepoint.
*/
default boolean isRestored() {
return getRestoredCheckpointId().isPresent();
} | 3.68 |
morf_FieldLiteral_deepCopyInternal | /**
* @see org.alfasoftware.morf.sql.element.AliasedField#deepCopyInternal(DeepCopyTransformation)
*/
@Override
protected FieldLiteral deepCopyInternal(final DeepCopyTransformation transformer) {
return new FieldLiteral(this.getAlias(), this.value, this.dataType);
} | 3.68 |
hadoop_RoleModel_newSid | /**
* Statement ID factory.
* @return a statement ID unique for this JVM's life.
*/
public static String newSid() {
SID_COUNTER.incrementAndGet();
return SID_COUNTER.toString();
} | 3.68 |
incubator-hugegraph-toolchain_SplicingIdGenerator_splicing | /**
* Concat multiple parts into a single id with ID_SPLITOR
*
* @param parts the string id values to be spliced
* @return spliced id object
*/
public static Id splicing(String... parts) {
String escaped = IdUtil.escape(ID_SPLITOR, ESCAPE, parts);
return IdGenerator.of(escaped);
} | 3.68 |
hadoop_StreamCapabilitiesPolicy_unbuffer | /**
* Implement the policy for {@link CanUnbuffer#unbuffer()}.
*
* @param in the input stream
*/
public static void unbuffer(InputStream in) {
try {
if (in instanceof StreamCapabilities
&& ((StreamCapabilities) in).hasCapability(
StreamCapabilities.UNBUFFER)) {
((CanUnbuffer) in).unbuffe... | 3.68 |
framework_Calendar_getEventProvider | /**
* @return the {@link CalendarEventProvider} currently used
*/
public CalendarEventProvider getEventProvider() {
return calendarEventProvider;
} | 3.68 |
Activiti_CollectionUtil_map | /**
* Helper method to easily create a map with keys of type String and values of type Object. Null values are allowed.
*
* @param objects varargs containing the key1, value1, key2, value2, etc. Note: although an Object, we will cast the key to String internally
* @throws ActivitiIllegalArgumentException when objec... | 3.68 |
hbase_EntryBuffers_getChunkToWrite | /** Returns RegionEntryBuffer a buffer of edits to be written. */
synchronized RegionEntryBuffer getChunkToWrite() {
long biggestSize = 0;
byte[] biggestBufferKey = null;
for (Map.Entry<byte[], RegionEntryBuffer> entry : buffers.entrySet()) {
long size = entry.getValue().heapSize();
if (size > biggestSiz... | 3.68 |
framework_VCalendar_removeMonthEvent | /**
* Remove a month event from the view.
*
* @param target
* The event to remove
*
* @param repaintImmediately
* Should we repaint after the event was removed?
*/
public void removeMonthEvent(CalendarEvent target,
boolean repaintImmediately) {
if (target != null && target.getS... | 3.68 |
dubbo_GlobalResourcesRepository_registerGlobalDisposable | /**
* Register a global reused disposable. The disposable will be executed when all dubbo FrameworkModels are destroyed.
* Note: the global disposable should be registered in static code, it's reusable and will not be removed when dubbo shutdown.
*
* @param disposable
*/
public static void registerGlobalDisposable... | 3.68 |
hbase_MasterObserver_postRenameRSGroup | /**
* Called after rename rsgroup.
* @param ctx the environment to interact with the framework and master
* @param oldName old rsgroup name
* @param newName new rsgroup name
*/
default void postRenameRSGroup(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final String oldName, final String newName) ... | 3.68 |
hbase_ProcedureStoreTracker_getAllActiveProcIds | /**
* Will be used when there are too many proc wal files. We will rewrite the states of the active
* procedures in the oldest proc wal file so that we can delete it.
* @return all the active procedure ids in this tracker.
*/
public long[] getAllActiveProcIds() {
return map.values().stream().map(BitSetNode::getAc... | 3.68 |
hadoop_MutableGaugeInt_decr | /**
* decrement by delta
* @param delta of the decrement
*/
public void decr(int delta) {
value.addAndGet(-delta);
setChanged();
} | 3.68 |
MagicPlugin_Targeting_getNextBlock | /**
* Move "steps" forward along line of vision and returns the block there
*
* @return The block at the new location
*/
@Nullable
protected Block getNextBlock()
{
previousPreviousBlock = previousBlock;
previousBlock = currentBlock;
if (blockIterator == null || !blockIterator.hasNext()) {
curren... | 3.68 |
flink_HsMemoryDataManager_append | /**
* Append record to {@link HsMemoryDataManager}, It will be managed by {@link
* HsSubpartitionMemoryDataManager} witch it belongs to.
*
* @param record to be managed by this class.
* @param targetChannel target subpartition of this record.
* @param dataType the type of this record. In other words, is it data o... | 3.68 |
rocketmq-connect_PluginUtils_simpleName | /**
* Return the simple class name of a plugin as {@code String}.
*
* @param plugin the plugin descriptor.
* @return the plugin's simple class name.
*/
public static String simpleName(PluginWrapper<?> plugin) {
return plugin.pluginClass().getSimpleName();
} | 3.68 |
graphhopper_VectorTile_getUintValue | /**
* <code>optional uint64 uint_value = 5;</code>
*/
public long getUintValue() {
return uintValue_;
} | 3.68 |
flink_BinaryStringDataUtil_trimLeft | /**
* Walk each character of current string from left end, remove the character if it is in trim
* string. Stops at the first character which is not in trim string. Return the new substring.
*
* @param trimStr the trim string
* @return A subString which removes all of the character from the left side that is in tr... | 3.68 |
framework_Criterion_setValue | /**
* Sets the value of the payload to be compared.
*
* @param value
* value of the payload to be compared
*/
public void setValue(String value) {
this.value = value;
} | 3.68 |
flink_HiveParserASTNodeOrigin_getObjectName | /** @return the name of the object from which an HiveParserASTNode originated, e.g. "v". */
public String getObjectName() {
return objectName;
} | 3.68 |
flink_Catalog_alterTable | /**
* Modifies an existing table or view. Note that the new and old {@link CatalogBaseTable} must
* be of the same kind. For example, this doesn't allow altering a regular table to partitioned
* table, or altering a view to a table, and vice versa.
*
* <p>The framework will make sure to call this method with fully... | 3.68 |
framework_Table_getCellStyleGenerator | /**
* Get the current cell style generator.
*
*/
public CellStyleGenerator getCellStyleGenerator() {
return cellStyleGenerator;
} | 3.68 |
hbase_SimpleRpcServer_getReader | // The method that will return the next reader to work with
// Simplistic implementation of round robin for now
Reader getReader() {
currentReader = (currentReader + 1) % readers.length;
return readers[currentReader];
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.