name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hadoop_NamenodeStatusReport_getNumStaleDatanodes
/** * Get the number of stale nodes. * * @return The number of stale nodes. */ public int getNumStaleDatanodes() { return this.staleDatanodes; }
3.68
flink_StreamConfig_setManagedMemoryFractionOperatorOfUseCase
/** Fraction of managed memory reserved for the given use case that this operator should use. */ public void setManagedMemoryFractionOperatorOfUseCase( ManagedMemoryUseCase managedMemoryUseCase, double fraction) { final ConfigOption<Double> configOption = getManagedMemoryFractionConfigOption(man...
3.68
hbase_MasterProcedureManager_execProcedureWithRet
/** * Execute a distributed procedure on cluster with return data. * @param desc Procedure description * @return data returned from the procedure execution, null if no data */ public byte[] execProcedureWithRet(ProcedureDescription desc) throws IOException { return null; }
3.68
hadoop_IOStatisticsBinding_trackDurationConsumer
/** * Given an IOException raising Consumer, * return a new one which wraps the inner and tracks * the duration of the operation, including whether * it passes/fails. * @param factory factory of duration trackers * @param statistic statistic key * @param input input callable. * @param <B> return type. * @retur...
3.68
flink_TwoInputTransformation_getOperatorFactory
/** Returns the {@code StreamOperatorFactory} of this Transformation. */ public StreamOperatorFactory<OUT> getOperatorFactory() { return operatorFactory; }
3.68
hudi_AvroSchemaCompatibility_lookupWriterField
/** * Identifies the writer field that corresponds to the specified reader field. * * <p> * Matching includes reader name aliases. * </p> * * @param writerSchema Schema of the record where to look for the writer field. * @param readerField Reader field to identify the corresponding writer field * ...
3.68
hudi_CompactionUtils_getAllPendingLogCompactionOperations
/** * Get all partition + file Ids with pending Log Compaction operations and their target log compaction instant time. */ public static Map<HoodieFileGroupId, Pair<String, HoodieCompactionOperation>> getAllPendingLogCompactionOperations( HoodieTableMetaClient metaClient) { List<Pair<HoodieInstant, HoodieCompac...
3.68
rocketmq-connect_RocketMQScheduledReporter_reportTimers
/** * report timers * * @param timers */ private void reportTimers(SortedMap<MetricName, Timer> timers) { timers.forEach((name, timer) -> { send(name, timer.getMeanRate()); }); }
3.68
hadoop_SampleQuantiles_getCount
/** * Returns the number of items that the estimator has processed * * @return count total number of items processed */ synchronized public long getCount() { return count; }
3.68
hbase_FailedServers_isFailedServer
/** * Check if the server should be considered as bad. Clean the old entries of the list. * @return true if the server is in the failed servers list */ public synchronized boolean isFailedServer(final Address address) { if (failedServers.isEmpty()) { return false; } final long now = EnvironmentEdgeManager....
3.68
flink_TypeStrategies_varyingString
/** * A type strategy that ensures that the result type is either {@link LogicalTypeRoot#VARCHAR} * or {@link LogicalTypeRoot#VARBINARY} from their corresponding non-varying roots. */ public static TypeStrategy varyingString(TypeStrategy initialStrategy) { return new VaryingStringTypeStrategy(initialStrategy); }
3.68
framework_VAbstractCalendarPanel_selectFocused
/** * Updates year, month, day from focusedDate to value */ @SuppressWarnings("deprecation") private void selectFocused() { if (focusedDate != null && isDateInsideRange(focusedDate, getResolution())) { if (value == null) { // No previously selected value (set to null on server side...
3.68
hadoop_FileMetadata_getKey
/** * Returns the Azure storage key for the file. Used internally by the framework. * * @return The key for the file. */ public String getKey() { return key; }
3.68
pulsar_AuthorizationService_allowTenantOperationAsync
/** * Grant authorization-action permission on a tenant to the given client. * * @param tenantName tenant name * @param operation tenant operation * @param role role name * @param authData * additional authdata in json for targeted authorization provider * @return IllegalArgumentException when tenant...
3.68
hbase_MetricsAssignmentManager_getCloseProcMetrics
/** Returns Set of common metrics for CloseRegionProcedure */ public ProcedureMetrics getCloseProcMetrics() { return closeProcMetrics; }
3.68
morf_AbstractSelectStatementBuilder_getWhereCriterion
/** * Gets the where criteria. * * @return the where criteria */ Criterion getWhereCriterion() { return whereCriterion; }
3.68
flink_DataSetUtils_zipWithIndex
/** * Method that assigns a unique {@link Long} value to all elements in the input data set. The * generated values are consecutive. * * @param input the input data set * @return a data set of tuple 2 consisting of consecutive ids and initial values. */ public static <T> DataSet<Tuple2<Long, T>> zipWithIndex(Data...
3.68
flink_VertexThreadInfoTrackerBuilder_setCoordinator
/** * Sets {@code cleanUpInterval}. * * @param coordinator Coordinator for thread info stats request. * @return Builder. */ public VertexThreadInfoTrackerBuilder setCoordinator(ThreadInfoRequestCoordinator coordinator) { this.coordinator = coordinator; return this; }
3.68
pulsar_DispatchRateLimiter_getDispatchRateOnMsg
/** * Get configured msg dispatch-throttling rate. Returns -1 if not configured * * @return */ public long getDispatchRateOnMsg() { return dispatchRateLimiterOnMessage != null ? dispatchRateLimiterOnMessage.getRate() : -1; }
3.68
hadoop_ExcessRedundancyMap_size
/** * @return the number of redundancies in this map. */ long size() { return size.get(); }
3.68
flink_TimestampData_fromLocalDateTime
/** * Creates an instance of {@link TimestampData} from an instance of {@link LocalDateTime}. * * @param dateTime an instance of {@link LocalDateTime} */ public static TimestampData fromLocalDateTime(LocalDateTime dateTime) { long epochDay = dateTime.toLocalDate().toEpochDay(); long nanoOfDay = dateTime.toL...
3.68
flink_FactoryUtil_validateFactoryOptions
/** * Validates the required options and optional options. * * <p>Note: It does not check for left-over options. */ public static void validateFactoryOptions( Set<ConfigOption<?>> requiredOptions, Set<ConfigOption<?>> optionalOptions, ReadableConfig options) { // currently Flink's option...
3.68
hbase_HBaseTestingUtility_expireSession
/** * Expire a ZooKeeper session as recommended in ZooKeeper documentation * http://hbase.apache.org/book.html#trouble.zookeeper There are issues when doing this: [1] * http://www.mail-archive.com/dev@zookeeper.apache.org/msg01942.html [2] * https://issues.apache.org/jira/browse/ZOOKEEPER-1105 * @param nodeZK ...
3.68
hibernate-validator_ISBNValidator_checkChecksumISBN13
/** * Check the digits for ISBN 13 using algorithm from * <a href="https://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-13_check_digit_calculation">Wikipedia</a>. */ private static boolean checkChecksumISBN13(String isbn) { int sum = 0; for ( int i = 0; i < isbn.length(); i++ ) { sum += ( isbn.c...
3.68
flink_OptimizerNode_haveAllOutputConnectionInterestingProperties
/** * Checks, if all outgoing connections have their interesting properties set from their target * nodes. * * @return True, if on all outgoing connections, the interesting properties are set. False * otherwise. */ public boolean haveAllOutputConnectionInterestingProperties() { for (DagConnection conn : g...
3.68
framework_Table_setColumnOrder
/* * Arranges visible columns according to given columnOrder. Silently ignores * colimnId:s that are not visible columns, and keeps the internal order of * visible columns left out of the ordering (trailing). Silently does * nothing if columnReordering is not allowed. */ private void setColumnOrder(Object[] column...
3.68
pulsar_ElasticSearchSink_extractIdAndDocument
/** * Extract ES _id and _source using the Schema if available. * * @param record * @return A pair for _id and _source */ public Pair<String, String> extractIdAndDocument(Record<GenericObject> record) throws JsonProcessingException { if (elasticSearchConfig.isSchemaEnable()) { Object key = null; ...
3.68
flink_MetricStore_retainJobs
/** * Remove inactive jobs.. * * @param activeJobs to retain. */ synchronized void retainJobs(List<String> activeJobs) { jobs.keySet().retainAll(activeJobs); representativeAttempts.keySet().retainAll(activeJobs); }
3.68
hudi_BootstrapExecutor_execute
/** * Executes Bootstrap. */ public void execute() throws IOException { initializeTable(); try (SparkRDDWriteClient bootstrapClient = new SparkRDDWriteClient(new HoodieSparkEngineContext(jssc), bootstrapConfig)) { HashMap<String, String> checkpointCommitMetadata = new HashMap<>(); checkpointCommitMetadata...
3.68
framework_VSlider_updateStyleNames
/** * Updates the style names for this widget and the child elements. * * @param styleName * the new style name * @param isPrimaryStyleName * {@code true} if the new style name is primary, {@code false} * otherwise */ protected void updateStyleNames(String styleName, boo...
3.68
hmily_OriginTrackedPropertiesLoader_read
/** * Read boolean. * * @param wrappedLine the wrapped line * @return the boolean * @throws IOException the io exception */ public boolean read(final boolean wrappedLine) throws IOException { this.escaped = false; this.character = this.reader.read(); this.columnNumber++; if (this.columnNumber == 0...
3.68
framework_ComplexRenderer_onBrowserEvent
/** * Called whenever a registered event is triggered in the column the * renderer renders. * <p> * The events that triggers this needs to be returned by the * {@link #getConsumedEvents()} method. * <p> * Returns boolean telling if the event has been completely handled and * should not cause any other actions. ...
3.68
hadoop_FindOptions_setMinDepth
/** * Sets the minimum depth for applying expressions. * * @param minDepth minimum depth */ public void setMinDepth(int minDepth) { this.minDepth = minDepth; }
3.68
hbase_NamespaceAuditor_checkQuotaToUpdateRegion
/** * Check and update region count quota for an existing table. * @param tName - table name for which region count to be updated. * @param regions - Number of regions that will be added. * @throws IOException Signals that an I/O exception has occurred. */ public void checkQuotaToUpdateRegion(TableName tName, in...
3.68
morf_AbstractSqlDialectTest_shouldGenerateCorrectSqlForMathOperations9
/** * Test for proper SQL mathematics operation generation from DSL expressions. * <p> * Bracket should be generated for subexpression "b/c". Even without explicit * {@link org.alfasoftware.morf.sql.SqlUtils#bracket(MathsField)} call. * </p> */ @Test public void shouldGenerateCorrectSqlForMathOperations9() { Al...
3.68
framework_Slot_attachListeners
/** * Attaches resize listeners to the widget, caption and spacing elements */ private void attachListeners() { if (getWidget() != null && layout.getLayoutManager() != null) { LayoutManager lm = layout.getLayoutManager(); if (getCaptionElement() != null && captionResizeListener != null) { ...
3.68
hadoop_RawErasureDecoder_release
/** * Should be called when release this coder. Good chance to release encoding * or decoding buffers */ public void release() { // Nothing to do here. }
3.68
hadoop_PerGpuTemperature_getCurrentGpuTemp
/** * Get current celsius GPU temperature * @return temperature */ @XmlJavaTypeAdapter(PerGpuDeviceInformation.StrToFloatBeforeSpaceAdapter.class) @XmlElement(name = "gpu_temp") public Float getCurrentGpuTemp() { return currentGpuTemp; }
3.68
pulsar_Authentication_authenticationStage
/** * An authentication Stage. * when authentication complete, passed-in authFuture will contains authentication related http request headers. */ default void authenticationStage(String requestUrl, AuthenticationDataProvider authData, Map<String, Stri...
3.68
flink_MutableHashTable_ensureNumBuffersReturned
/** * This method makes sure that at least a certain number of memory segments is in the list of * free segments. Free memory can be in the list of free segments, or in the return-queue where * segments used to write behind are put. The number of segments that are in that return-queue, * but are actually reclaimabl...
3.68
flink_KubernetesUtils_getResourceRequirements
/** * Get resource requirements from memory and cpu. * * @param resourceRequirements resource requirements in pod template * @param mem Memory in mb. * @param memoryLimitFactor limit factor for the memory, used to set the limit resources. * @param cpu cpu. * @param cpuLimitFactor limit factor for the cpu, used t...
3.68
hbase_TimeRange_compare
/** * Compare the timestamp to timerange. * @return -1 if timestamp is less than timerange, 0 if timestamp is within timerange, 1 if * timestamp is greater than timerange */ public int compare(long timestamp) { assert timestamp >= 0; if (this.allTime) { return 0; } if (timestamp < minStamp) { ...
3.68
shardingsphere-elasticjob_TimeService_getCurrentMillis
/** * Get current millis. * * @return current millis */ public long getCurrentMillis() { return System.currentTimeMillis(); }
3.68
framework_ValidationException_getValidationErrors
/** * Gets both field and bean level validation errors. * * @return a list of all validation errors */ public List<ValidationResult> getValidationErrors() { List<ValidationResult> errors = getFieldValidationErrors().stream() .map(s -> s.getResult().get()).collect(Collectors.toList()); errors.add...
3.68
flink_MapValue_equals
/* * (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (this.getClass() != obj.getClass()) { return false; } final MapValue<?...
3.68
hadoop_DefaultAuditLogger_setCallerContextEnabled
/** * Enable or disable CallerContext. * * @param value true, enable CallerContext, otherwise false to disable it. */ void setCallerContextEnabled(final boolean value) { isCallerContextEnabled = value; }
3.68
hbase_UserProvider_shouldLoginFromKeytab
/** * In secure environment, if a user specified his keytab and principal, a hbase client will try to * login with them. Otherwise, hbase client will try to obtain ticket(through kinit) from system. */ public boolean shouldLoginFromKeytab() { return User.shouldLoginFromKeytab(this.getConf()); }
3.68
hadoop_AMRMClientAsyncImpl_getAvailableResources
/** * Get the currently available resources in the cluster. * A valid value is available after a call to allocate has been made * @return Currently available resources */ public Resource getAvailableResources() { return client.getAvailableResources(); }
3.68
hadoop_OBSCommonUtils_innerMkdirs
/** * Make the given path and all non-existent parents into directories. * * @param owner the owner OBSFileSystem instance * @param path path to create * @return true if a directory was created * @throws FileAlreadyExistsException there is a file at the path specified * @throws IOException other ...
3.68
flink_Pattern_followedBy
/** * Appends a new group pattern to the existing one. The new pattern enforces non-strict temporal * contiguity. This means that a matching event of this pattern and the preceding matching event * might be interleaved with other events which are ignored. * * @param group the pattern to append * @return A new pat...
3.68
hadoop_GetContainersResponsePBImpl_initLocalContainerList
// Once this is called. containerList will never be null - until a getProto // is called. private void initLocalContainerList() { if (this.containerList != null) { return; } GetContainersResponseProtoOrBuilder p = viaProto ? proto : builder; List<ContainerReportProto> list = p.getContainersList(); contain...
3.68
framework_DragAndDropWrapper_getAbsoluteLeft
/** * @return the absolute position of wrapper on the page */ public Integer getAbsoluteLeft() { return (Integer) getData("absoluteLeft"); }
3.68
hbase_StoreFileInfo_getFileStatus
/** Returns The {@link FileStatus} of the file */ public FileStatus getFileStatus() throws IOException { return getReferencedFileStatus(fs); }
3.68
hadoop_ResourceSkyline_getJobFinishTime
/** * Get the job's finish time. * * @return job's finish time. */ public final long getJobFinishTime() { return jobFinishTime; }
3.68
flink_BufferCompressor_compress
/** * Compresses the given {@link Buffer} into the intermediate buffer and returns the compressed * data size. */ private int compress(Buffer buffer) { checkArgument(buffer != null, "The input buffer must not be null."); checkArgument(buffer.isBuffer(), "Event can not be compressed."); checkArgument(!buf...
3.68
zxing_OneDimensionalCodeWriter_appendPattern
/** * @param target encode black/white pattern into this array * @param pos position to start encoding at in {@code target} * @param pattern lengths of black/white runs to encode * @param startColor starting color - false for white, true for black * @return the number of elements added to target. */ protected sta...
3.68
flink_TemplateUtils_extractLocalFunctionTemplates
/** Retrieve local templates from function method. */ static Set<FunctionTemplate> extractLocalFunctionTemplates( DataTypeFactory typeFactory, Method method) { return asFunctionTemplates( typeFactory, collectAnnotationsOfMethod(FunctionHint.class, method)); }
3.68
framework_CustomLayout_setTemplateContents
/** * Set the contents of the template used to draw the custom layout. * * Note: setTemplateContents can be applied only before CustomLayout * instance has been attached. * * @param templateContents */ public void setTemplateContents(String templateContents) { getState().templateContents = templateContents; ...
3.68
framework_Highlight_showOnly
/** * Highlight the {@link Widget} for the given connector if it is a * {@link ComponentConnector}. Hide any other highlight. * <p> * Pass the returned {@link Element} to {@link #hide(Element)} to remove * this particular highlight. * </p> * * @since 7.1 * * @param connector * the server connector...
3.68
hadoop_StagingCommitter_getConfictModeOption
/** * Get the conflict mode option string. * @param context context with the config * @param fsConf filesystem config * @param defVal default value. * @return the trimmed configuration option, upper case. */ public static String getConfictModeOption(JobContext context, Configuration fsConf, String defVal) { ...
3.68
flink_HiveParserDDLSemanticAnalyzer_getPartitionSpecs
// Get the partition specs from the tree private List<Map<String, String>> getPartitionSpecs(CommonTree ast) { List<Map<String, String>> partSpecs = new ArrayList<>(); // get partition metadata if partition specified for (int childIndex = 0; childIndex < ast.getChildCount(); childIndex++) { HivePars...
3.68
hadoop_PathFinder_prependPathComponent
/** * Appends the specified component to the path list */ public void prependPathComponent(String str) { pathenv = str + pathSep + pathenv; }
3.68
framework_VComboBox_hasNextPage
/** * Does the Select have more pages? * * @return true if a next page exists, else false if the current page is the * last page */ public boolean hasNextPage() { return pageLength > 0 && getTotalSuggestionsIncludingNullSelectionItem() > (currentPage + 1) * pageLength; }
3.68
flink_StateBackendLoader_stateBackendFromApplicationOrConfigOrDefaultUseManagedMemory
/** * Checks whether state backend uses managed memory, without having to deserialize or load the * state backend. * * @param config Cluster configuration. * @param stateBackendFromApplicationUsesManagedMemory Whether the application-defined backend * uses Flink's managed memory. Empty if application has not ...
3.68
hadoop_AzureNativeFileSystemStore_isOkContainerState
// Determines whether we have to pull the container information again // or we can work based off what we already have. private boolean isOkContainerState(ContainerAccessType accessType) { switch (currentKnownContainerState) { case Unknown: // When using SAS, we can't discover container attributes // so jus...
3.68
hadoop_OBSBlockOutputStream_hasActiveBlock
/** * Predicate to query whether or not there is an active block. * * @return true if there is an active block. */ private synchronized boolean hasActiveBlock() { return activeBlock != null; }
3.68
framework_ConnectorTracker_markAllConnectorsClean
/** * Mark all connectors in this uI as clean. */ public void markAllConnectorsClean() { dirtyConnectors.clear(); if (fineLogging) { getLogger().fine("All connectors are now clean"); } }
3.68
hbase_Cipher_getProvider
/** * Return the provider for this Cipher */ public CipherProvider getProvider() { return provider; }
3.68
dubbo_MergerFactory_getMerger
/** * Find the merger according to the returnType class, the merger will * merge an array of returnType into one * * @param returnType the merger will return this type * @return the merger which merges an array of returnType into one, return null if not exist * @throws IllegalArgumentException if returnType is nu...
3.68
pulsar_DeviationShedder_findBundlesForUnloading
/** * Recommend that all of the returned bundles be unloaded based on observing excessive standard deviations according * to some metric. * * @param loadData * The load data to used to make the unloading decision. * @param conf * The service configuration. * @return A map from all selected...
3.68
dubbo_ReferenceConfig_meshModeHandleUrl
/** * if enable mesh mode, handle url. * * @param referenceParameters referenceParameters */ private void meshModeHandleUrl(Map<String, String> referenceParameters) { if (!checkMeshConfig(referenceParameters)) { return; } if (StringUtils.isNotEmpty(url)) { // user specified URL, could be...
3.68
hadoop_INodeSymlink_asSymlink
/** @return this object. */ @Override public INodeSymlink asSymlink() { return this; }
3.68
framework_VTree_getSubPartElement
/* * (non-Javadoc) * * @see com.vaadin.client.ui.SubPartAware#getSubPartElement(java * .lang.String) */ @Override public com.google.gwt.user.client.Element getSubPartElement( String subPart) { if ("fe".equals(subPart)) { if (BrowserInfo.get().isOpera() && focusedNode != null) { retu...
3.68
framework_PropertysetItem_getItemProperty
/** * Gets the Property corresponding to the given Property ID stored in the * Item. If the Item does not contain the Property, <code>null</code> is * returned. * * @param id * the identifier of the Property to get. * @return the Property with the given ID or <code>null</code> */ @Override public Pro...
3.68
hibernate-validator_LoadClass_loadClassInValidatorNameSpace
// HV-363 - library internal classes are loaded via Class.forName first private Class<?> loadClassInValidatorNameSpace() { final ClassLoader loader = HibernateValidator.class.getClassLoader(); Exception exception; try { return Class.forName( className, true, HibernateValidator.class.getClassLoader() ); } catch (...
3.68
hbase_MasterObserver_postAbortProcedure
/** * Called after a abortProcedure request has been processed. * @param ctx the environment to interact with the framework and master */ default void postAbortProcedure(ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException { }
3.68
pulsar_MessageDeduplication_isDuplicate
/** * Assess whether the message was already stored in the topic. * * @return true if the message should be published or false if it was recognized as a duplicate */ public MessageDupStatus isDuplicate(PublishContext publishContext, ByteBuf headersAndPayload) { if (!isEnabled() || publishContext.isMarkerMessage...
3.68
hadoop_BaseService_getServer
/** * Returns the server owning the service. * * @return the server owning the service. */ protected Server getServer() { return server; }
3.68
hudi_HoodieCreateHandle_doWrite
/** * Perform the actual writing of the given record into the backing file. */ @Override protected void doWrite(HoodieRecord record, Schema schema, TypedProperties props) { Option<Map<String, String>> recordMetadata = record.getMetadata(); try { if (!HoodieOperation.isDelete(record.getOperation()) && !record....
3.68
hbase_HttpServerUtil_constrainHttpMethods
/** * Add constraints to a Jetty Context to disallow undesirable Http methods. * @param ctxHandler The context to modify * @param allowOptionsMethod if true then OPTIONS method will not be set in constraint mapping */ public static void constrainHttpMethods(ServletContextHandler ctxHandler, boolean allowO...
3.68
hibernate-validator_SizeValidatorForArraysOfLong_isValid
/** * Checks the number of entries in an array. * * @param array The array to validate. * @param constraintValidatorContext context in which the constraint is evaluated. * * @return Returns {@code true} if the array is {@code null} or the number of entries in * {@code array} is between the specified {@co...
3.68
framework_VAbstractOrderedLayout_setMargin
/** * Set the margin of the layout. * * @param marginInfo * The margin information */ public void setMargin(MarginInfo marginInfo) { if (marginInfo != null) { setStyleName("v-margin-top", marginInfo.hasTop()); setStyleName("v-margin-right", marginInfo.hasRight()); setStyleNam...
3.68
flink_JobClient_stopWithSavepoint
/** * Stops the associated job on Flink cluster. * * <p>Stopping works only for streaming programs. Be aware, that the job might continue to run * for a while after sending the stop command, because after sources stopped to emit data all * operators need to finish processing. * * @param advanceToEndOfEventTime f...
3.68
hadoop_DynamicIOStatistics_addMinimumFunction
/** * add a mapping of a key to a minimum function. * @param key the key * @param eval the evaluator */ void addMinimumFunction(String key, Function<String, Long> eval) { minimums.addFunction(key, eval); }
3.68
hibernate-validator_AnnotationApiHelper_determineUnwrapMode
/** * Checks the annotation's payload for unwrapping option ({@code jakarta.validation.valueextraction.Unwrapping.Unwrap}, * {@code jakarta.validation.valueextraction.Unwrapping.Skip}) of constraint. * * @param annotationMirror constraint annotation mirror under check * @return unwrapping option, if one is present...
3.68
framework_AbstractListing_readItem
/** * Reads an Item from a design and inserts it into the data source. * <p> * Doesn't care about selection/value (if any). * * @param child * a child element representing the item * @param context * the DesignContext instance used in parsing * @return the item id of the new item * * @t...
3.68
druid_DruidAbstractDataSource_getConnectTimeout
/** * @since 1.2.12 */ public int getConnectTimeout() { return connectTimeout; }
3.68
hbase_Procedure_setTimeoutFailure
/** * Called by the ProcedureExecutor when the timeout set by setTimeout() is expired. * <p/> * Another usage for this method is to implement retrying. A procedure can set the state to * {@code WAITING_TIMEOUT} by calling {@code setState} method, and throw a * {@link ProcedureSuspendedException} to halt the execut...
3.68
hudi_HoodieMetaSyncOperations_dropPartitions
/** * Drop partitions from the table in metastore. */ default void dropPartitions(String tableName, List<String> partitionsToDrop) { }
3.68
shardingsphere-elasticjob_QueryParameterMap_get
/** * Get values by parameter name. * * @param parameterName parameter name * @return values */ public List<String> get(final String parameterName) { return queryMap.get(parameterName); }
3.68
hbase_SimplePositionedMutableByteRange_setOffset
/** * Update the beginning of this range. {@code offset + length} may not be greater than * {@code bytes.length}. Resets {@code position} to 0. the new start of this range. * @return this. */ @Override public PositionedByteRange setOffset(int offset) { this.position = 0; super.setOffset(offset); return this; ...
3.68
flink_CachingAsyncLookupFunction_updateLatestLoadTime
// --------------------------------- Helper functions ---------------------------- private synchronized void updateLatestLoadTime(long loadTime) { if (latestLoadTime == UNINITIALIZED) { cacheMetricGroup.latestLoadTimeGauge(() -> latestLoadTime); } latestLoadTime = loadTime; }
3.68
flink_TestUtils_readCsvResultFiles
/** Read the all files with the specified path. */ public static List<String> readCsvResultFiles(Path path) throws IOException { File filePath = path.toFile(); // list all the non-hidden files File[] csvFiles = filePath.listFiles((dir, name) -> !name.startsWith(".")); List<String> result = new ArrayList...
3.68
framework_DesignContext_createElement
/** * Creates an html tree node corresponding to the given element. Also * initializes its attributes by calling writeDesign. As a result of the * writeDesign() call, this method creates the entire subtree rooted at the * returned Node. * * @param childComponent * The component with state that is writ...
3.68
hbase_RootProcedureState_unsetRollback
/** * Called by the ProcedureExecutor to mark rollback execution */ protected synchronized void unsetRollback() { assert state == State.ROLLINGBACK; state = State.FAILED; }
3.68
flink_DefaultPackagedProgramRetriever_create
/** * Creates a {@code PackageProgramRetrieverImpl} with the given parameters. * * @param userLibDir The user library directory that is used for generating the user classpath * if specified. The system classpath is used if not specified. * @param jarFile The jar archive expected to contain the job class includ...
3.68
hbase_CacheConfig_shouldCacheBlockOnRead
/** * Should we cache a block of a particular category? We always cache important blocks such as * index blocks, as long as the block cache is available. */ public boolean shouldCacheBlockOnRead(BlockCategory category) { return cacheDataOnRead || category == BlockCategory.INDEX || category == BlockCategory.BLOOM ...
3.68
framework_ComboBoxElement_getPopupSuggestions
/** * Gets the text representation of all suggestions on the current page. * * @return List of suggestion texts */ public List<String> getPopupSuggestions() { List<String> suggestionsTexts = new ArrayList<>(); List<WebElement> suggestions = getPopupSuggestionElements(); for (WebElement suggestion : sugg...
3.68
hbase_RegionMover_ack
/** * Set ack/noAck mode. * <p> * In ack mode regions are acknowledged before and after moving and the move is retried * hbase.move.retries.max times, if unsuccessful we quit with exit code 1.No Ack mode is a best * effort mode,each region movement is tried once.This can be used during graceful shutdown as * even...
3.68
dubbo_ConfigUtils_checkFileNameExist
/** * check if the fileName can be found in filesystem * * @param fileName * @return */ private static boolean checkFileNameExist(String fileName) { File file = new File(fileName); return file.exists(); }
3.68