name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_HeterogeneousRegionCountCostFunction_findLimitForRS
/** * Find the limit for a ServerName. If not found then return the default value * @param serverName the server we are looking for * @return the limit */ int findLimitForRS(final ServerName serverName) { boolean matched = false; int limit = -1; for (final Map.Entry<Pattern, Integer> entry : this.limitPerRule...
3.68
hmily_PropertyName_append
/** * Append property name. * * @param elementValue the element value * @return the property name */ public PropertyName append(final String elementValue) { if (elementValue == null) { return this; } process(elementValue, (e, indexed) -> { if (StringUtils.isBlank(e.get()) && LOGGER.isDe...
3.68
hibernate-validator_ReflectionHelper_typeOf
/** * @param member The {@code Member} instance for which to retrieve the type. * * @return Returns the {@code Type} of the given {@code Field} or {@code Method}. * * @throws IllegalArgumentException in case {@code member} is not a {@code Field} or {@code Method}. */ public static Type typeOf(Member member) { Ty...
3.68
flink_BinaryHashPartition_spillPartition
/** * Spills this partition to disk and sets it up such that it continues spilling records that are * added to it. The spilling process must free at least one buffer, either in the partition's * record buffers, or in the memory segments for overflow buckets. The partition immediately * takes back one buffer to use ...
3.68
flink_StreamTableSourceFactory_createStreamTableSource
/** * Creates and configures a {@link StreamTableSource} using the given properties. * * @param properties normalized properties describing a stream table source. * @return the configured stream table source. * @deprecated {@link Context} contains more information, and already contains table schema too. * Ple...
3.68
hudi_FlinkConcatAndReplaceHandle_write
/** * Write old record as is w/o merging with incoming record. */ @Override public void write(HoodieRecord oldRecord) { Schema oldSchema = config.populateMetaFields() ? writeSchemaWithMetaFields : writeSchema; String key = oldRecord.getRecordKey(oldSchema, keyGeneratorOpt); try { fileWriter.write(key, oldRe...
3.68
flink_AbstractStreamOperatorV2_snapshotState
/** * Stream operators with state, which want to participate in a snapshot need to override this * hook method. * * @param context context that provides information and means required for taking a snapshot */ @Override public void snapshotState(StateSnapshotContext context) throws Exception {}
3.68
hbase_ReplicationPeerConfigUtil_getPeerClusterConfiguration
/** * Returns the configuration needed to talk to the remote slave cluster. * @param conf the base configuration * @param peer the description of replication peer * @return the configuration for the peer cluster, null if it was unable to get the configuration * @throws IOException when create peer cluster configur...
3.68
morf_SqlDialect_appendOrderBy
/** * appends order by clause to the result * * @param result order by clause will be appended here * @param stmt statement with order by clause * @param <T> The type of AbstractSelectStatement */ protected <T extends AbstractSelectStatement<T>> void appendOrderBy(StringBuilder result, AbstractSelectStatement<T> ...
3.68
hudi_HoodieLogBlock_inflate
/** * When lazyReading of blocks is turned on, inflate the content of a log block from disk. */ protected void inflate() throws HoodieIOException { checkState(!content.isPresent(), "Block has already been inflated"); checkState(inputStream != null, "Block should have input-stream provided"); try { content ...
3.68
framework_FieldGroup_isValid
/** * Checks the validity of the bound fields. * <p> * Call the {@link Field#validate()} for the fields to get the individual * error messages. * * @return true if all bound fields are valid, false otherwise. */ public boolean isValid() { try { for (Field<?> field : getFields()) { field.v...
3.68
hadoop_RollingWindow_safeReset
/** * Safely reset the bucket state considering concurrent updates (inc) and * resets. * * @param time the current time */ void safeReset(long time) { // At any point in time, only one thread is allowed to reset the // bucket synchronized (this) { if (isStaleNow(time)) { // reset the value before s...
3.68
hbase_Bytes_binaryIncrementNeg
/* increment/deincrement for negative value */ private static byte[] binaryIncrementNeg(byte[] value, long amount) { long amo = amount; int sign = 1; if (amount < 0) { amo = -amount; sign = -1; } for (int i = 0; i < value.length; i++) { int cur = ((int) amo % 256) * sign; amo = (amo >> 8); ...
3.68
morf_Function_monthsBetween
/** * The number of whole months between two dates. The logic used is equivalent to * {@link Months#monthsBetween(org.joda.time.ReadableInstant, org.joda.time.ReadableInstant)}. * * <p>As an example, assuming two dates are in the same year and the {@code fromDate} is from two months prior to * the {@code toDate} ...
3.68
flink_StreamingSemiAntiJoinOperator_processElement1
/** * Process an input element and output incremental joined records, retraction messages will be * sent in some scenarios. * * <p>Following is the pseudo code to describe the core logic of this method. * * <pre> * if there is no matched rows on the other side * if anti join, send input record * if there are...
3.68
morf_Criterion_drive
/** * @see org.alfasoftware.morf.util.ObjectTreeTraverser.Driver#drive(ObjectTreeTraverser) */ @Override public void drive(ObjectTreeTraverser traverser) { traverser .dispatch(field) .dispatch(value) .dispatch(selectStatement) .dispatch(criteria); }
3.68
hadoop_ZStandardDecompressor_needsDictionary
// dictionary is not supported. @Override public boolean needsDictionary() { return false; }
3.68
framework_CustomizedSystemMessages_setAuthenticationErrorURL
/** * Sets the URL to go to when there is a authentication error. * * @param authenticationErrorURL * the URL to go to, or null to reload current */ public void setAuthenticationErrorURL(String authenticationErrorURL) { this.authenticationErrorURL = authenticationErrorURL; }
3.68
hadoop_JobTokenSecretManager_createPassword
/** * Create a new password/secret for the given job token identifier. * @param identifier the job token identifier * @return token password/secret */ @Override public byte[] createPassword(JobTokenIdentifier identifier) { byte[] result = createPassword(identifier.getBytes(), masterKey); return result; }
3.68
hadoop_FlowRunRowKey_getRowKeyAsString
/** * Constructs a row key for the flow run table as follows: * {@code clusterId!userId!flowName!Flow Run Id}. * @return String representation of row key */ public String getRowKeyAsString() { return flowRunRowKeyConverter.encodeAsString(this); }
3.68
framework_Label_removeListener
/** * @deprecated As of 7.0, replaced by * {@link #removeValueChangeListener(Property.ValueChangeListener)} */ @Override @Deprecated public void removeListener(Property.ValueChangeListener listener) { removeValueChangeListener(listener); }
3.68
druid_SpringIbatisBeanTypeAutoProxyCreator_getAdvicesAndAdvisorsForBean
/** * Identify as bean to proxy if the bean name is in the configured list of names. */ @SuppressWarnings("rawtypes") protected Object[] getAdvicesAndAdvisorsForBean(Class beanClass, String beanName, TargetSource targetSource) { for (String mappedName : this.beanNames) { if (FactoryBean.class.isAssignable...
3.68
morf_GraphBasedUpgrade_getNumberOfNodes
/** * @return number of upgrade nodes in this graph, without the no-op root */ public int getNumberOfNodes() { return numberOfNodes; }
3.68
flink_AbstractMultipleInputTransformation_getInputTypes
/** Returns the {@code TypeInformation} for the elements from the inputs. */ public List<TypeInformation<?>> getInputTypes() { return inputs.stream().map(Transformation::getOutputType).collect(Collectors.toList()); }
3.68
dubbo_NacosNamingServiceUtils_createNamingService
/** * Create an instance of {@link NamingService} from specified {@link URL connection url} * * @param connectionURL {@link URL connection url} * @return {@link NamingService} * @since 2.7.5 */ public static NacosNamingServiceWrapper createNamingService(URL connectionURL) { boolean check = connectionURL.getPa...
3.68
morf_MySqlDialect_fetchSizeForBulkSelects
/** * MySQL defaults to <a href="http://stackoverflow.com/questions/20496616/fetchsize-in-resultset-set-to-0-by-default">fetching * <em>all</em> records</a> into memory when a JDBC query is executed, which causes OOM * errors when used with large data sets (Cryo and ETLs being prime offenders). Ideally * we would u...
3.68
framework_AbstractContainer_fireItemSetChange
/** * Sends an Item set change event to all registered interested listeners. * * @param event * the item set change event to send, optionally with additional * information */ protected void fireItemSetChange(ItemSetChangeEvent event) { if (getItemSetChangeListeners() != null) { f...
3.68
graphhopper_Service_activeOn
/** * Is this service active on the specified date? */ public boolean activeOn (LocalDate date) { // first check for exceptions CalendarDate exception = calendar_dates.get(date); if (exception != null) return exception.exception_type == 1; else if (calendar == null) return false; ...
3.68
hbase_DisableTableProcedure_preDisable
/** * Action before disabling table. * @param env MasterProcedureEnv * @param state the procedure state */ protected void preDisable(final MasterProcedureEnv env, final DisableTableState state) throws IOException, InterruptedException { runCoprocessorAction(env, state); }
3.68
flink_HiveInspectors_toFlinkObject
/** Converts a Hive object to Flink object with an ObjectInspector. */ public static Object toFlinkObject(ObjectInspector inspector, Object data, HiveShim hiveShim) { if (data == null || inspector instanceof VoidObjectInspector) { return null; } if (inspector instanceof PrimitiveObjectInspector) { ...
3.68
hudi_HoodieTablePreCommitFileSystemView_getLatestBaseFiles
/** * Combine committed base files + new files created/replaced for given partition. */ public final Stream<HoodieBaseFile> getLatestBaseFiles(String partitionStr) { // get fileIds replaced by current inflight commit List<String> replacedFileIdsForPartition = partitionToReplaceFileIds.getOrDefault(partitionStr, C...
3.68
pulsar_SinkContext_getSubscriptionType
/** * Get subscription type used by the source providing data for the sink. * * @return subscription type */ default SubscriptionType getSubscriptionType() { throw new UnsupportedOperationException("Context does not provide SubscriptionType"); }
3.68
framework_VTabsheet_getNearestShownTabIndex
/** * After removing a tab, find a new scroll position. In most cases the * scroll position does not change, but if the tab at the scroll * position was removed, we need to find a nearby tab that is visible. * The search is performed first to the right from the original tab * (less need to scroll), then to the lef...
3.68
framework_LayoutManager_getOuterHeightDouble
/** * Gets the outer height (including margins, paddings and borders) of the * given element, provided that it has been measured. These elements are * guaranteed to be measured: * <ul> * <li>ManagedLayouts and their child Connectors * <li>Elements for which there is at least one ElementResizeListener * <li>Eleme...
3.68
framework_VCalendar_getWeekGrid
/** * Get he week grid component. * * @return */ public WeekGrid getWeekGrid() { return weekGrid; }
3.68
hbase_FileCleanerDelegate_isEmptyDirDeletable
/** * Check if a empty directory with no subdirs or subfiles can be deleted * @param dir Path of the directory * @return True if the directory can be deleted, otherwise false */ default boolean isEmptyDirDeletable(Path dir) { return true; }
3.68
hadoop_ResourceUsage_getCachedUsed
// Cache Used public Resource getCachedUsed() { return _get(NL, ResourceType.CACHED_USED); }
3.68
hadoop_TypedBytesOutput_writeDouble
/** * Writes a double as a typed bytes sequence. * * @param d the double to be written * @throws IOException */ public void writeDouble(double d) throws IOException { out.write(Type.DOUBLE.code); out.writeDouble(d); }
3.68
flink_AbstractPagedOutputView_getSegmentSize
/** * Gets the size of the segments used by this view. * * @return The memory segment size. */ public int getSegmentSize() { return this.segmentSize; }
3.68
flink_DriverUtils_checkNotNull
/** * Ensures that the given object reference is not null. Upon violation, a {@code * NullPointerException} with the given message is thrown. * * @param reference The object reference * @param errorMessage The message for the {@code NullPointerException} that is thrown if the * check fails. * @return The obj...
3.68
hmily_PropertyName_isEmpty
/** * Is empty boolean. * * @return the boolean */ public boolean isEmpty() { return this.getElementSize() == 0; }
3.68
hbase_RowResource_checkAndDelete
/** * Validates the input request parameters, parses columns from CellSetModel, and invokes * checkAndDelete on HTable. * @param model instance of CellSetModel * @return Response 200 OK, 304 Not modified, 400 Bad request */ Response checkAndDelete(final CellSetModel model) { Table table = null; Delete delete =...
3.68
flink_StateMetaInfoSnapshotReadersWriters_getReader
/** * Returns a reader for {@link StateMetaInfoSnapshot} with the requested state type and version * number. * * @param readVersion the format version to read. * @return the requested reader. */ @Nonnull public static StateMetaInfoReader getReader(int readVersion) { checkArgument( readVersion <= ...
3.68
pulsar_ReaderConfiguration_getReceiverQueueSize
/** * @return the configure receiver queue size value */ public int getReceiverQueueSize() { return conf.getReceiverQueueSize(); }
3.68
flink_DefaultLookupCache_cacheMissingKey
/** * Specifies whether to cache empty value into the cache. * * <p>Please note that "empty" means a collection without any rows in it instead of null. * The cache will not accept any null key or value. */ public Builder cacheMissingKey(boolean cacheMissingKey) { this.cacheMissingKey = cacheMissingKey; ret...
3.68
hbase_HQuorumPeer_main
/** * Parse ZooKeeper configuration from HBase XML config and run a QuorumPeer. * @param args String[] of command line arguments. Not used. */ public static void main(String[] args) { Configuration conf = HBaseConfiguration.create(); try { Properties zkProperties = ZKConfig.makeZKProps(conf); writeMyID(z...
3.68
hbase_Compactor_createWriter
/** * Creates a writer for a new file. * @param fd The file details. * @return Writer for a new StoreFile * @throws IOException if creation failed */ protected final StoreFileWriter createWriter(FileDetails fd, boolean shouldDropBehind, boolean major, Consumer<Path> writerCreationTracker) throws IOException { ...
3.68
streampipes_EpProperties_booleanEp
/** * Creates a new primitive property of type boolean and the provided domain property. * * @param runtimeName The field identifier of the event property at runtime. * @param domainProperty The semantics of the list property as a String. The string should correspond to a URI * provided by...
3.68
rocketmq-connect_KafkaConnectAdaptorSource_processSourceRecord
/** * process source record * * @param record * @return */ @Override public ConnectRecord processSourceRecord(SourceRecord record) { record = this.transforms(record); ConnectRecord connectRecord = Converters.fromSourceRecord(record); return connectRecord; }
3.68
dubbo_RpcContextAttachment_getAttachment
/** * also see {@link #getObjectAttachment(String)}. * * @param key * @return attachment */ @Override public String getAttachment(String key) { Object value = attachments.get(key); if (value instanceof String) { return (String) value; } return null; // or JSON.toString(value); }
3.68
hbase_Strings_padFront
/** * Push the input string to the right by appending a character before it, usually a space. * @param input the string to pad * @param padding the character to repeat to the left of the input string * @param length the desired total length including the padding * @return padding characters + input */ public s...
3.68
hadoop_AbstractRESTRequestInterceptor_shutdown
/** * Disposes the {@link RESTRequestInterceptor}. */ @Override public void shutdown() { if (this.nextInterceptor != null) { this.nextInterceptor.shutdown(); } }
3.68
framework_ScrollbarBundle_getHandlerManager
/** * Returns the handler manager for this scrollbar bundle. * * @return the handler manager */ protected HandlerManager getHandlerManager() { if (handlerManager == null) { handlerManager = new HandlerManager(this); } return handlerManager; }
3.68
flink_StreamConfig_serializeAllConfigs
/** * Serialize all object configs synchronously. Only used for operators which need to reconstruct * the StreamConfig internally or test. */ public void serializeAllConfigs() { toBeSerializedConfigObjects.forEach( (key, object) -> { try { InstantiationUtil.writeOb...
3.68
morf_SchemaValidator_validateView
/** * Validates a {@link View} meets the rules. * * @param view The {@link View} to validate. */ private void validateView(View view) { validateName(view.getName()); if (view.knowsSelectStatement()) { validateColumnNames(FluentIterable.from(view.getSelectStatement().getFields()).transform(FIELD_TO_NAME).toL...
3.68
pulsar_LinuxInfoUtils_isCGroupEnabled
/** * Determine whether the OS enable CG Group. */ public static boolean isCGroupEnabled() { try { if (metrics == null) { return Files.exists(Paths.get(CGROUPS_CPU_USAGE_PATH)); } String provider = (String) getMetricsProviderMethod.invoke(metrics); log.info("[LinuxInfo]...
3.68
hadoop_ConverterUtils_toString
/* * This method is deprecated, use {@link ContainerId#toString()} instead. */ @Public @Deprecated public static String toString(ContainerId cId) { return cId == null ? null : cId.toString(); }
3.68
flink_MapStateDescriptor_getKeySerializer
/** * Gets the serializer for the keys in the state. * * @return The serializer for the keys in the state. */ public TypeSerializer<UK> getKeySerializer() { final TypeSerializer<Map<UK, UV>> rawSerializer = getSerializer(); if (!(rawSerializer instanceof MapSerializer)) { throw new IllegalStateExcep...
3.68
hbase_BalancerClusterState_computeRegionServerRegionCacheRatio
/** * Populate the maps containing information about how much a region is cached on a region server. */ private void computeRegionServerRegionCacheRatio() { regionIndexServerIndexRegionCachedRatio = new HashMap<>(); regionServerIndexWithBestRegionCachedRatio = new int[numRegions]; for (int region = 0; region <...
3.68
framework_ColorPickerPopup_checkIfTabsNeeded
/** * Checks if tabs are needed and hides them if not */ private void checkIfTabsNeeded() { tabs.setTabsVisible(tabs.getComponentCount() > 1); }
3.68
dubbo_LoadingStrategy_includedPackagesInCompatibleType
/** * To restrict some class that should not be loaded from `org.alibaba.dubbo`(for compatible purpose) * package type SPI class. * For example, we can restrict the implementation class which package is `org.xxx.xxx` * can be loaded as SPI implementation * * @return packages can be loaded in `org.alibaba.dubbo`'s...
3.68
flink_TableEnvironment_fromValues
/** * Creates a Table from given collection of objects with a given row type. * * <p>The difference between this method and {@link #fromValues(Object...)} is that the schema * can be manually adjusted. It might be helpful for assigning more generic types like e.g. * DECIMAL or naming the columns. * * <p>Examples...
3.68
framework_LogSection_setScrollLock
/** * Activates or deactivates scroll lock * * @param locked */ void setScrollLock(boolean locked) { if (locked && scrollTimer != null) { scrollTimer.cancel(); scrollTimer = null; } else if (!locked && scrollTimer == null) { scrollTimer = new Timer() { @Override ...
3.68
hbase_ScanWildcardColumnTracker_done
/** * We can never know a-priori if we are done, so always return false. */ @Override public boolean done() { return false; }
3.68
framework_VAbstractSplitPanel_getFirstContainer
/** * Gets the first region's container element. * * @since 7.5.1 * @return the container element */ protected Element getFirstContainer() { return firstContainer; }
3.68
framework_GridRowDragger_getSourceDataProviderUpdater
/** * Returns the source grid data provider updater. * <p> * Default is {@code null} and the items are just removed from the source * grid, which only works for {@link ListDataProvider}. * * @return the source grid drop handler */ public SourceDataProviderUpdater<T> getSourceDataProviderUpdater() { return so...
3.68
hbase_Tag_getValueAsString
/** * Converts the value bytes of the given tag into a String value * @param tag The Tag * @return value as String */ public static String getValueAsString(Tag tag) { if (tag.hasArray()) { return Bytes.toString(tag.getValueArray(), tag.getValueOffset(), tag.getValueLength()); } return Bytes.toString(clone...
3.68
hudi_LazyIterableIterator_start
/** * Called once, before any elements are processed. */ protected void start() {}
3.68
flink_HiveParserUtils_getGenericUDAFEvaluator
// Returns the GenericUDAFEvaluator for the aggregation. This is called once for each GroupBy // aggregation. // TODO: Requiring a GenericUDAFEvaluator means we only support hive UDAFs. Need to avoid this // to support flink UDAFs. public static GenericUDAFEvaluator getGenericUDAFEvaluator( String aggName, ...
3.68
MagicPlugin_MapController_forceReloadPlayerPortrait
/** * Force reload of a player headshot. */ @Override public void forceReloadPlayerPortrait(String worldName, String playerName) { String url = CompatibilityLib.getSkinUtils().getOnlineSkinURL(playerName); if (url != null) { forceReload(worldName, url, 8, 8, 8, 8); } }
3.68
hudi_CompactionAdminClient_validateCompactionPlan
/** * Validate all compaction operations in a compaction plan. Verifies the file-slices are consistent with corresponding * compaction operations. * * @param metaClient Hoodie Table Meta Client * @param compactionInstant Compaction Instant */ public List<ValidationOpResult> validateCompactionPlan(HoodieTableMetaC...
3.68
hudi_HoodieMergeHandle_init
/** * Load the new incoming records in a map and return partitionPath. */ protected void init(String fileId, Iterator<HoodieRecord<T>> newRecordsItr) { initializeIncomingRecordsMap(); while (newRecordsItr.hasNext()) { HoodieRecord<T> record = newRecordsItr.next(); // update the new location of the record,...
3.68
framework_CurrentInstance_set
/** * Sets the current instance of the given type. * * @see ThreadLocal * * @param type * the class that should be used when getting the current * instance back * @param instance * the actual instance */ public static <T> CurrentInstance set(Class<T> type, T instance) { Ma...
3.68
framework_NestedMethodProperty_readObject
/* Special serialization to handle method references */ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); initialize(instance.getClass(), propertyName); }
3.68
flink_LocalityAwareSplitAssigner_getNextUnassignedMinLocalCountSplit
/** * Retrieves a LocatableInputSplit with minimum local count. InputSplits which have already * been assigned (i.e., which are not contained in the provided set) are filtered out. The * returned input split is NOT removed from the provided set. * * @param unassignedSplits Set of unassigned input splits. * @retur...
3.68
flink_DecimalData_toBigDecimal
/** Converts this {@link DecimalData} into an instance of {@link BigDecimal}. */ public BigDecimal toBigDecimal() { BigDecimal bd = decimalVal; if (bd == null) { decimalVal = bd = BigDecimal.valueOf(longVal, scale); } return bd; }
3.68
streampipes_StatementHandler_fillPreparedStatement
/** * Fills a prepared statement with the actual values base on {@link StatementHandler#eventParameterMap}. If * {@link StatementHandler#eventParameterMap} is empty or not complete (which should only happen once in the * beginning), it calls * {@link StatementHandler#generatePreparedStatement * (DbDescription, Tab...
3.68
hbase_UnsafeAccess_toInt
/** * Reads a int value at the given Object's offset considering it was written in big-endian format. * @return int value at offset */ public static int toInt(Object ref, long offset) { if (LITTLE_ENDIAN) { return Integer.reverseBytes(HBasePlatformDependent.getInt(ref, offset)); } return HBasePlatformDepen...
3.68
framework_VCheckBoxGroup_focus
/** * Set focus to the first check box. */ @Override public void focus() { // If focus is set on creation, need to wait until options are populated Scheduler.get().scheduleDeferred(() -> { getWidget().focusFirstEnabledChild(); }); }
3.68
hbase_RpcServer_getCurrentCall
/** * Needed for features such as delayed calls. We need to be able to store the current call so that * we can complete it later or ask questions of what is supported by the current ongoing call. * @return An RpcCallContext backed by the currently ongoing call (gotten from a thread local) */ public static Optional<...
3.68
dubbo_UrlUtils_allSerializations
/** * Get the all serializations,ensure insertion order * * @param url url * @return {@link List}<{@link String}> */ @SuppressWarnings("unchecked") public static Collection<String> allSerializations(URL url) { // preferSerialization -> serialization -> default serialization Set<String> serializations = new...
3.68
hbase_HRegion_setClosing
/** * Exposed for some very specific unit tests. */ public void setClosing(boolean closing) { this.closing.set(closing); }
3.68
dubbo_ApplicationModel_getEnvironment
/** * @deprecated Replace to {@link ScopeModel#modelEnvironment()} */ @Deprecated public static Environment getEnvironment() { return defaultModel().modelEnvironment(); }
3.68
hadoop_LightWeightLinkedSet_resetBookmark
/** * Resets the bookmark to the beginning of the list. */ public void resetBookmark() { this.bookmark.next = this.head; }
3.68
flink_DynamicTableFactory_forwardOptions
/** * Returns a set of {@link ConfigOption} that are directly forwarded to the runtime * implementation but don't affect the final execution topology. * * <p>Options declared here can override options of the persisted plan during an enrichment * phase. Since a restored topology is static, an implementer has to ens...
3.68
hadoop_SnappyCompressor_setInputFromSavedData
/** * If a write would exceed the capacity of the direct buffers, it is set * aside to be loaded by this function while the compressed data are * consumed. */ void setInputFromSavedData() { if (0 >= userBufLen) { return; } finished = false; uncompressedDirectBufLen = Math.min(userBufLen, directBufferSi...
3.68
pulsar_InMemoryDelayedDeliveryTracker_checkAndUpdateHighest
/** * Check that new delivery time comes after the current highest, or at * least within a single tick time interval of 1 second. */ private void checkAndUpdateHighest(long deliverAt) { if (deliverAt < (highestDeliveryTimeTracked - tickTimeMillis)) { messagesHaveFixedDelay = false; } highestDeli...
3.68
flink_ResourceGuard_getLeaseCount
/** Returns the current count of open leases. */ public int getLeaseCount() { return leaseCount; }
3.68
hbase_RSGroupInfoManagerImpl_refresh
/** * Read rsgroup info from the source of truth, the hbase:rsgroup table. Update zk cache. Called on * startup of the manager. */ private synchronized void refresh(boolean forceOnline) throws IOException { List<RSGroupInfo> groupList = new ArrayList<>(); // Overwrite anything read from zk, group table is sourc...
3.68
framework_VComboBox_selectItem
/* * Sets the selected item in the popup menu. */ private void selectItem(final MenuItem newSelectedItem) { menu.selectItem(newSelectedItem); // Set the icon. ComboBoxSuggestion suggestion = (ComboBoxSuggestion) newSelectedItem .getCommand(); setSelectedItemIcon(suggestion.getIconUri()); ...
3.68
flink_BinaryStringData_compareMultiSegments
/** Find the boundaries of segments, and then compare MemorySegment. */ private int compareMultiSegments(BinaryStringData other) { if (binarySection.sizeInBytes == 0 || other.binarySection.sizeInBytes == 0) { return binarySection.sizeInBytes - other.binarySection.sizeInBytes; } int len = Math.min(...
3.68
dubbo_RegistrySpecListener_onPost
/** * Perform auto-increment on the monitored key, * Can use a custom listener instead of this generic operation */ public static AbstractMetricsKeyListener onPost(MetricsKey metricsKey, CombMetricsCollector<?> collector) { return AbstractMetricsKeyListener.onEvent( metricsKey, event -> ((RegistryMet...
3.68
hudi_HoodieAvroHFileReader_readRecords
/** * NOTE: THIS SHOULD ONLY BE USED FOR TESTING, RECORDS ARE MATERIALIZED EAGERLY * <p> * Reads all the records with given schema and filtering keys. */ public static List<IndexedRecord> readRecords(HoodieAvroHFileReader reader, List<String> keys, ...
3.68
hbase_ByteBufferUtils_putCompressedInt
/** * Put in buffer integer using 7 bit encoding. For each written byte: 7 bits are used to store * value 1 bit is used to indicate whether there is next bit. * @param value Int to be compressed. * @param out Where to put compressed data * @return Number of bytes written. * @throws IOException on stream error ...
3.68
flink_AbstractBinaryWriter_writeString
/** See {@link BinarySegmentUtils#readStringData(MemorySegment[], int, int, long)}. */ @Override public void writeString(int pos, StringData input) { BinaryStringData string = (BinaryStringData) input; if (string.getSegments() == null) { String javaObject = string.toString(); writeBytes(pos, jav...
3.68
hudi_HoodieTableConfig_isMetadataPartitionAvailable
/** * Checks if metadata table is enabled and the specified partition has been initialized. * * @param partition The partition to check * @returns true if the specific partition has been initialized, else returns false. */ public boolean isMetadataPartitionAvailable(MetadataPartitionType partition) { return getM...
3.68
framework_AbstractDateField_isPreventInvalidInput
/** * Check whether value change is emitted when user input value does not meet * integrated range validator. The default is false. * * @return a Boolean value * * @since 8.13 */ public boolean isPreventInvalidInput() { return preventInvalidInput; }
3.68
hadoop_AMRMProxyService_finishApplicationMaster
/** * This is called by the AMs started on this node to unregister from the RM. * This method does the initial authorization and then forwards the request to * the application instance specific interceptor chain. */ @Override public FinishApplicationMasterResponse finishApplicationMaster( FinishApplicationMaste...
3.68
framework_ComboBox_setScrollToSelectedItem
/** * Sets whether to scroll the selected item visible (directly open the page * on which it is) when opening the combo box popup or not. Only applies to * single select mode. * * This requires finding the index of the item, which can be expensive in * many large lazy loading containers. * * @param scrollToSele...
3.68
hadoop_UserDefinedValueAggregatorDescriptor_createInstance
/** * Create an instance of the given class * @param className the name of the class * @return a dynamically created instance of the given class */ public static Object createInstance(String className) { Object retv = null; try { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); ...
3.68