name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
framework_FlyweightRow_teardown
/** * Tear down the state of the Row. * <p> * This is an internal check method, to prevent retrieving uninitialized * data by calling {@link #getRow()}, {@link #getElement()} or * {@link #getCells()} at an improper time. * <p> * This should only be used with asserts (" * <code>assert flyweightRow.teardown()</co...
3.68
hbase_ByteArrayOutputStream_reset
/** * Resets the <code>pos</code> field of this byte array output stream to zero. The output stream * can be used again. */ public void reset() { this.pos = 0; }
3.68
hadoop_RegistryTypeUtils_webEndpoint
/** * Create a Web UI endpoint from a list of URIs * @param api implemented API * @param uris URIs * @return a new endpoint */ public static Endpoint webEndpoint(String api, URI... uris) { return urlEndpoint(api, ProtocolTypes.PROTOCOL_WEBUI, uris); }
3.68
framework_VTabsheetPanel_fixVisibleTabSize
/** * Updates the size of the visible widget. * * @param width * the width to set (in pixels), or negative if the width should * be dynamic (final width might get overridden by the minimum * width if that is larger) * @param height * the height to set (in pixels), or ...
3.68
flink_BucketWriter_openNewCompactingFile
/** * Used to create a new {@link CompactingFileWriter} of the requesting type. Requesting a writer * of an unsupported type will result in UnsupportedOperationException. By default, only * RECORD_WISE type is supported, for which a {@link InProgressFileWriter} will be created. * * @param type the type of this wri...
3.68
hadoop_OperationCallbacks_abortMultipartUploadsUnderPrefix
/** * Abort multipart uploads under a path; paged. * @param prefix prefix for uploads to abort * @return a count of aborts * @throws IOException trouble; FileNotFoundExceptions are swallowed. */ @Retries.RetryTranslated default long abortMultipartUploadsUnderPrefix(String prefix) throws IOException { return ...
3.68
flink_WindowAggregateQueryOperation_getSize
/** * Size of a {@link WindowType#TUMBLE} or {@link WindowType#SLIDE} window. Empty for {@link * WindowType#SESSION} window. * * @return size of a window */ public Optional<ValueLiteralExpression> getSize() { return Optional.of(size); }
3.68
hibernate-validator_JavaBeanGetter_getAccessible
/** * Returns an accessible copy of the given method. */ @IgnoreForbiddenApisErrors(reason = "SecurityManager is deprecated in JDK17") private static Method getAccessible(Method original) { SecurityManager sm = System.getSecurityManager(); if ( sm != null ) { sm.checkPermission( HibernateValidatorPermission.ACCES...
3.68
hmily_KryoPoolFactory_returnKryo
/** * Return kryo. * * @param kryo the kryo */ public void returnKryo(final Kryo kryo) { if (Objects.nonNull(kryo)) { pool.release(kryo); } }
3.68
framework_VAbstractCalendarPanel_getResolutions
/** * Returns all available resolutions for the widget. * * @return all available resolutions */ protected Stream<R> getResolutions() { return parent.getResolutions(); }
3.68
framework_NullValidator_setErrorMessage
/** * Sets the error message to be displayed on invalid value. * * @param errorMessage * the Error Message to set. */ public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; }
3.68
framework_DesignContext_setShouldWriteDataDelegate
/** * Sets the delegate that determines whether the container data of a * component should be written out. * * @since 7.5.0 * @see #shouldWriteChildren(Component, Component) * @see #getShouldWriteDataDelegate() * @param shouldWriteDataDelegate * the delegate to set, not <code>null</code> * @throws I...
3.68
pulsar_AbstractCASReferenceCounted_setRefCnt
/** * An unsafe operation intended for use by a subclass that sets the reference count of the buffer directly. */ protected final void setRefCnt(int refCnt) { refCntUpdater.set(this, refCnt); }
3.68
rocketmq-connect_AvroDatumWriterFactory_get
/** * Get avro datum factory * * @return */ public static AvroDatumWriterFactory get(boolean useSchemaReflection, boolean avroUseLogicalTypeConverters) { return new AvroDatumWriterFactory(useSchemaReflection, avroUseLogicalTypeConverters); }
3.68
hadoop_FsServerDefaults_write
// ///////////////////////////////////////// // Writable // ///////////////////////////////////////// @Override @InterfaceAudience.Private public void write(DataOutput out) throws IOException { out.writeLong(blockSize); out.writeInt(bytesPerChecksum); out.writeInt(writePacketSize); out.writeShort(replication); ...
3.68
flink_DeweyNumber_fromString
/** * Creates a dewey number from a string representation. The input string must be a dot separated * string of integers. * * @param deweyNumberString Dot separated string of integers * @return Dewey number generated from the given input string */ public static DeweyNumber fromString(final String deweyNumberStrin...
3.68
hbase_AccessControlClient_getUserPermissions
/** * List all the userPermissions matching the given table pattern, column family and column * qualifier. * @param connection Connection * @param tableRegex The regular expression string to match against. It shouldn't be null, * empty or a namespace regular expression. * @param c...
3.68
flink_StringColumnSummary_getMaxLength
/** Longest String length. */ public Integer getMaxLength() { return maxLength; }
3.68
hudi_HoodieStreamerUtils_getPartitionColumns
/** * Get the partition columns as a set of strings. * * @param props TypedProperties * @return Set of partition columns. */ static Set<String> getPartitionColumns(TypedProperties props) { String partitionColumns = SparkKeyGenUtils.getPartitionColumns(props); return Arrays.stream(partitionColumns.split(",")).c...
3.68
hadoop_ClientRegistryBinder_lookupRestAPI
/** * Look up an external REST API endpoint * @param record service record * @param api URI of api * @param external flag to indicate this is an external record * @return the first endpoint of the implementation, or null if there * is no entry for the API, implementation or it's the wrong type. */ public static ...
3.68
zxing_ITFReader_decodeEnd
/** * Identify where the end of the middle / payload section ends. * * @param row row of black/white values to search * @return Array, containing index of start of 'end block' and end of 'end * block' */ private int[] decodeEnd(BitArray row) throws NotFoundException { // For convenience, reverse the ro...
3.68
flink_ContaineredTaskManagerParameters_create
/** * Computes the parameters to be used to start a TaskManager Java process. * * @param config The Flink configuration. * @param taskExecutorProcessSpec The resource specifics of the task executor. * @return The parameters to start the TaskManager processes with. */ public static ContaineredTaskManagerParameters...
3.68
hadoop_GlobExpander_leftmostOuterCurlyContainingSlash
/** * Finds the index of the leftmost opening curly bracket containing a * slash character ("/") in <code>filePattern</code>. * @param filePattern * @return the index of the leftmost opening curly bracket containing a * slash character ("/"), or -1 if there is no such bracket * @throws IOException */ private st...
3.68
hadoop_FlowActivityRowKeyPrefix_getRowKeyPrefix
/* * (non-Javadoc) * * @see * org.apache.hadoop.yarn.server.timelineservice.storage.application. * RowKeyPrefix#getRowKeyPrefix() */ public byte[] getRowKeyPrefix() { return super.getRowKey(); }
3.68
dubbo_NetUtils_findNetworkInterface
/** * Get the suitable {@link NetworkInterface} * * @return If no {@link NetworkInterface} is available , return <code>null</code> * @since 2.7.6 */ public static NetworkInterface findNetworkInterface() { List<NetworkInterface> validNetworkInterfaces = emptyList(); try { validNetworkInterfaces = g...
3.68
hbase_TextSortReducer_setup
/** * Handles initializing this class with objects specific to it (i.e., the parser). Common * initialization that might be leveraged by a subsclass is done in <code>doSetup</code>. Hence a * subclass may choose to override this method and call <code>doSetup</code> as well before * handling it's own custom params. ...
3.68
hbase_CheckAndMutate_hasFilter
/** Returns whether this has a filter or not */ public boolean hasFilter() { return filter != null; }
3.68
framework_Embedded_setParameter
/** * Sets an object parameter. Parameters are optional information, and they * are passed to the instantiated object. Parameters are are stored as name * value pairs. This overrides the previous value assigned to this * parameter. * * @param name * the name of the parameter. * @param value * ...
3.68
flink_Schema_primaryKeyNamed
/** * Declares a primary key constraint for a set of given columns. Primary key uniquely * identify a row in a table. Neither of columns in a primary can be nullable. The primary * key is informational only. It will not be enforced. It can be used for optimizations. It * is the data owner's responsibility to ensure...
3.68
hudi_HoodieTableMetaClient_getBasePath
/** * @return Base path * @deprecated please use {@link #getBasePathV2()} */ @Deprecated public String getBasePath() { return basePath.get().toString(); // this invocation is cached }
3.68
flink_BridgingSqlFunction_of
/** Creates an instance of a scalar or table built-in function during translation. */ public static BridgingSqlFunction of( RelOptCluster cluster, BuiltInFunctionDefinition functionDefinition) { return of( cluster, ContextResolvedFunction.permanent( FunctionIdenti...
3.68
framework_DefaultConnectionStateHandler_isReconnecting
/** * Checks if we are currently trying to reconnect * * @return true if we have noted a problem and are trying to re-establish * server connection, false otherwise */ private boolean isReconnecting() { return reconnectionCause != null; }
3.68
morf_AbstractSqlDialectTest_expectedSqlForMathOperations15
/** * @return expected SQL for math operation 15 */ protected String expectedSqlForMathOperations15() { return "a + (b + c) / 2"; }
3.68
hadoop_CommonAuditContext_init
/** * Initialize. */ private void init() { // thread 1 is dynamic put(PARAM_THREAD1, CommonAuditContext::currentThreadID); }
3.68
zxing_GenericGFPoly_getDegree
/** * @return degree of this polynomial */ int getDegree() { return coefficients.length - 1; }
3.68
hadoop_AwsV1BindingSupport_createAWSV1CredentialProvider
/** * Create an AWS credential provider from its class by using reflection. The * class must implement one of the following means of construction, which are * attempted in order: * * <ol> * <li>a public constructor accepting java.net.URI and * org.apache.hadoop.conf.Configuration</li> * <li>a public constr...
3.68
framework_VScrollTable_updateRowsInBody
/** For internal use only. May be removed or replaced in the future. */ public void updateRowsInBody(UIDL partialRowUpdates) { if (partialRowUpdates == null) { return; } int firstRowIx = partialRowUpdates.getIntAttribute("firsturowix"); int count = partialRowUpdates.getIntAttribute("numurows"); ...
3.68
hudi_AbstractTableFileSystemView_resetFileGroupsReplaced
/** * Get replaced instant for each file group by looking at all commit instants. */ private void resetFileGroupsReplaced(HoodieTimeline timeline) { HoodieTimer hoodieTimer = HoodieTimer.start(); // for each REPLACE instant, get map of (partitionPath -> deleteFileGroup) HoodieTimeline replacedTimeline = timelin...
3.68
zxing_BitArray_flip
/** * Flips bit i. * * @param i bit to set */ public void flip(int i) { bits[i / 32] ^= 1 << (i & 0x1F); }
3.68
framework_VaadinSession_getPushId
/** * Gets the push connection identifier for this session. Used when * establishing a push connection with the client. * * @return the push connection identifier string * * @since 8.0.6 */ public String getPushId() { assert hasLock(); return pushId; }
3.68
hibernate-validator_StringHelper_decapitalize
/** * Returns the given string, with its first letter changed to lower-case unless the string starts with more than * one upper-case letter, in which case the string will be returned unaltered. * <p> * Provided to avoid a dependency on the {@link java.beans.Introspector} API which is not available on the Android *...
3.68
dubbo_BitList_getOriginList
// Provided by BitList only public List<E> getOriginList() { return originList; }
3.68
framework_Criterion_resolve
/** * Compares this criterion's value to the given payload's value and returns * whether the result matches the criterion's operator. The comparison is * done with the payload whose key and value type match the criterion's key * and value type. * * @param payloadCollection * collection of payloads to ...
3.68
framework_SelectionEvent_getAdded
/** * A {@link Collection} of all the itemIds that became selected. * <p> * <em>Note:</em> this excludes all itemIds that might have been previously * selected. * * @return a Collection of the itemIds that became selected */ public Set<Object> getAdded() { return setDifference(newSelection, oldSelection); }
3.68
flink_ListView_clear
/** Removes all of the elements from this list view. */ @Override public void clear() { list.clear(); }
3.68
flink_PerJobMiniClusterFactory_submitJob
/** Starts a {@link MiniCluster} and submits a job. */ public CompletableFuture<JobClient> submitJob( JobGraph jobGraph, ClassLoader userCodeClassloader) throws Exception { MiniClusterConfiguration miniClusterConfig = getMiniClusterConfig(jobGraph.getMaximumParallelism()); MiniCluster miniCl...
3.68
hbase_HDFSBlocksDistribution_getBlockLocalityIndex
/** * Get the block locality index for a given host * @param host the host name * @return the locality index of the given host */ public float getBlockLocalityIndex(String host) { if (uniqueBlocksTotalWeight == 0) { return 0.0f; } else { return (float) getBlocksLocalityWeightInternal(host, HostAndWeight...
3.68
flink_Executors_directExecutor
/** * Return a direct executor. The direct executor directly executes the runnable in the calling * thread. * * @return Direct executor */ public static Executor directExecutor() { return DirectExecutor.INSTANCE; }
3.68
framework_BindingValidationStatus_getValidationResults
/** * Gets all the validation results related to this binding validation * status. * * @return list of validation results * * @since 8.2 */ public List<ValidationResult> getValidationResults() { return Collections.unmodifiableList(results); }
3.68
hbase_BackupManager_getOngoingBackupId
/** * Check if any ongoing backup. Currently, we only reply on checking status in backup system * table. We need to consider to handle the case of orphan records in the future. Otherwise, all * the coming request will fail. * @return the ongoing backup id if on going backup exists, otherwise null * @throws IOExcep...
3.68
hadoop_NodeName_anonymize
//TODO There is no caching for saving memory. private static String anonymize(String data, WordList wordList) { if (data == null) { return null; } if (!wordList.contains(data)) { wordList.add(data); } return wordList.getName() + wordList.indexOf(data); }
3.68
flink_MemorySegment_putIntLittleEndian
/** * Writes the given int value (32bit, 4 bytes) to the given position in little endian byte * order. This method's speed depends on the system's native byte order, and it is possibly * slower than {@link #putInt(int, int)}. For most cases (such as transient storage in memory or * serialization for I/O and network...
3.68
flink_GenericDataSourceBase_getFormatWrapper
/** * Gets the class describing the input format. * * @return The class describing the input format. */ public UserCodeWrapper<? extends T> getFormatWrapper() { return this.formatWrapper; }
3.68
flink_HiveParserASTNodeOrigin_getObjectDefinition
/** * @return the definition of the object from which an HiveParserASTNode originated, e.g. <code> * select x+1 as y from t</code>. */ public String getObjectDefinition() { return objectDefinition; }
3.68
hadoop_HttpReferrerAuditHeader_withAttributes
/** * Add all attributes to the current map. * @param value new value * @return the builder */ public Builder withAttributes(final Map<String, String> value) { attributes.putAll(value); return this; }
3.68
framework_AbstractConnector_createState
/** * Creates a state object with default values for this connector. The * created state object must be compatible with the return type of * {@link #getState()}. The default implementation creates a state object * using GWT.create() using the defined return type of {@link #getState()}. * * @return A new state obj...
3.68
hadoop_StringInterner_strongIntern
/** * Interns and returns a reference to the representative instance * for any of a collection of string instances that are equal to each other. * Retains strong reference to the instance, * thus preventing it from being garbage-collected. * * @param sample string instance to be interned * @return strong ref...
3.68
framework_AbstractComponent_setHeight
/* * (non-Javadoc) * * @see com.vaadin.server.Sizeable#setHeight(java.lang.String) */ @Override public void setHeight(String height) { SizeWithUnit size = SizeWithUnit.parseStringSize(height); if (size != null) { setHeight(size.getSize(), size.getUnit()); } else { setHeight(-1, Unit.PIXE...
3.68
hbase_MasterObserver_postSetNamespaceQuota
/** * Called after the quota for the namespace is stored. * @param ctx the environment to interact with the framework and master * @param namespace the name of the namespace * @param quotas the resulting quota for the namespace */ default void postSetNamespaceQuota(final ObserverContext<MasterCoprocessorE...
3.68
flink_FlinkContainersSettings_enableZookeeperHA
/** * Enables Zookeeper HA. NOTE: this option uses default HA configuration. If you want to use * non-default configuration, you should provide all settings, including the HA_MODE * directly via the {@code basedOn()} method instead. * * @return A reference to this Builder. */ public Builder enableZookeeperHA() { ...
3.68
framework_ApplicationConfiguration_getFrontendUrl
/** * Gets the URL of the that the {@literal frontend://} protocol should * resolve to. * * @return the URL of the frontend protocol * @since 8.1 */ public String getFrontendUrl() { return frontendUrl; }
3.68
flink_TableEnvironment_executePlan
/** * Shorthand for {@code tEnv.loadPlan(planReference).execute()}. * * @see #loadPlan(PlanReference) * @see CompiledPlan#execute() */ @Experimental default TableResult executePlan(PlanReference planReference) throws TableException { return loadPlan(planReference).execute(); }
3.68
morf_JdbcUrlElements_forDatabaseType
/** * Builder pattern constructor. * * @param databaseType The database type identifier (see {@link DatabaseType#identifier()}). * @return The builder. */ public static Builder forDatabaseType(String databaseType) { return new Builder(databaseType); }
3.68
flink_DatadogHttpReporter_getTagsFromMetricGroup
/** Get tags from MetricGroup#getAllVariables(), excluding 'host'. */ private List<String> getTagsFromMetricGroup(MetricGroup metricGroup) { List<String> tags = new ArrayList<>(); for (Map.Entry<String, String> entry : metricGroup.getAllVariables().entrySet()) { if (!entry.getKey().equals(HOST_VARIABLE...
3.68
framework_VaadinService_readFromHttpSession
/** * Performs the actual read of the VaadinSession from the underlying HTTP * session after sanity checks have been performed. * <p> * Called by {@link #loadSession(WrappedSession)}. * * @param wrappedSession * the underlying HTTP session * @since 7.6 * @return the VaadinSession or null if no sessi...
3.68
hbase_SimpleRpcServer_join
/** * Wait for the server to be stopped. Does not wait for all subthreads to finish. * @see #stop() */ @Override public synchronized void join() throws InterruptedException { while (running) { wait(); } }
3.68
pulsar_ResourceGroupService_aggregateResourceGroupLocalUsages
// Periodically aggregate the usage from all topics known to the BrokerService. // Visibility for unit testing. protected void aggregateResourceGroupLocalUsages() { final Summary.Timer aggrUsageTimer = rgUsageAggregationLatency.startTimer(); BrokerService bs = this.pulsar.getBrokerService(); Map<String, Top...
3.68
querydsl_StringExpression_like
/** * Create a {@code this like str} expression * * @param str string * @return this like str */ public BooleanExpression like(Expression<String> str, char escape) { return Expressions.booleanOperation(Ops.LIKE_ESCAPE, mixin, str, ConstantImpl.create(escape)); }
3.68
framework_Color_getBlue
/** * Returns the blue value of the color. * */ public int getBlue() { return blue; }
3.68
hbase_DynamicClassLoader_initTempDir
// FindBugs: Making synchronized to avoid IS2_INCONSISTENT_SYNC complaints about // remoteDirFs and jarModifiedTime being part synchronized protected. private synchronized void initTempDir(final Configuration conf) { jarModifiedTime = new HashMap<>(); String localDirPath = conf.get(LOCAL_DIR_KEY, DEFAULT_LOCAL_DIR)...
3.68
hbase_Delete_addColumn
/** * Delete the specified version of the specified column. * @param family family name * @param qualifier column qualifier * @param timestamp version timestamp * @return this for invocation chaining */ public Delete addColumn(byte[] family, byte[] qualifier, long timestamp) { if (timestamp < 0) { throw ...
3.68
zxing_CameraManager_buildLuminanceSource
/** * A factory method to build the appropriate LuminanceSource object based on the format * of the preview buffers, as described by Camera.Parameters. * * @param data A preview frame. * @param width The width of the image. * @param height The height of the image. * @return A PlanarYUVLuminanceSource instance. ...
3.68
framework_HierarchicalQuery_getParentOptional
/** * Get an Optional of the hierarchical parent object. * * @see #getParent() * @return the result of {@link #getParent()} wrapped by an Optional */ public Optional<T> getParentOptional() { return Optional.ofNullable(parent); }
3.68
querydsl_MySQLQueryFactory_insertIgnore
/** * Create a INSERT IGNORE INTO clause * * @param entity table to insert to * @return insert clause */ public SQLInsertClause insertIgnore(RelationalPath<?> entity) { SQLInsertClause insert = insert(entity); insert.addFlag(Position.START_OVERRIDE, "insert ignore into "); return insert; }
3.68
hadoop_AbfsClientThrottlingIntercept_updateMetrics
/** * Updates the metrics for successful and failed read and write operations. * @param operationType Only applicable for read and write operations. * @param abfsHttpOperation Used for status code and data transferred. */ @Override public void updateMetrics(AbfsRestOperationType operationType, AbfsHttpOperation...
3.68
hbase_ServerCrashProcedure_zkCoordinatedSplitLogs
/** * Split logs using 'classic' zk-based coordination. Superceded by procedure-based WAL splitting. * @see #createSplittingWalProcedures(MasterProcedureEnv, boolean) */ private void zkCoordinatedSplitLogs(final MasterProcedureEnv env) throws IOException { LOG.debug("Splitting WALs {}", this); MasterWalManager m...
3.68
rocketmq-connect_AbstractStateManagementService_readConnectorStatus
/** * read connector status * * @param key * @param value */ protected void readConnectorStatus(String key, byte[] value) { String connector = parseConnectorStatusKey(key); if (connector.isEmpty()) { log.warn("Discarding record with invalid connector status key {}", key); return; } ...
3.68
framework_SelectorPredicate_setValue
/** * @param value * the value to set */ public void setValue(String value) { this.value = value; }
3.68
hadoop_VolumeFailureInfo_getFailedStorageLocation
/** * Returns the storage location that has failed. * * @return storage location that has failed */ public StorageLocation getFailedStorageLocation() { return this.failedStorageLocation; }
3.68
hadoop_TaskPool_foreach
/** * Create a task builder for the remote iterator. * @param items item source. * @param <I> type of result. * @return builder. */ public static <I> Builder<I> foreach(RemoteIterator<I> items) { return new Builder<>(items); }
3.68
dubbo_LockUtils_getSingletonMutex
/** * Get the mutex to lock the singleton in the specified {@link ApplicationContext} */ public static synchronized Object getSingletonMutex(ApplicationContext applicationContext) { DefaultSingletonBeanRegistry autowireCapableBeanFactory = (DefaultSingletonBeanRegistry) applicationContext.getAutowireC...
3.68
framework_VAbstractCalendarPanel_getPreviousKey
/** * The key that selects the previous week in the calendar. By default this * is the up arrow key but by overriding this method it can be changed to * whatever you like. * * @return the previous week key */ protected int getPreviousKey() { return KeyCodes.KEY_UP; }
3.68
flink_PipelinedApproximateSubpartition_createReadView
/** * To simply the view releasing threading model, {@link * PipelinedApproximateSubpartition#releaseView()} is called only before creating a new view. * * <p>There is still one corner case when a downstream task fails continuously in a short period * of time then multiple netty worker threads can createReadView a...
3.68
hbase_TableIntegrityErrorHandlerImpl_handleRegionStartKeyNotEmpty
/** * {@inheritDoc} */ @Override public void handleRegionStartKeyNotEmpty(HbckRegionInfo hi) throws IOException { }
3.68
flink_BinaryHashPartition_insertIntoBuildBuffer
/** * Inserts the given object into the current buffer. This method returns a pointer that can be * used to address the written record in this partition, if it is in-memory. The returned * pointers have no expressiveness in the case where the partition is spilled. * * @param record The object to be written to the ...
3.68
hadoop_ServiceLauncher_serviceCreationFailure
/** * Generate an exception announcing a failure to create the service. * @param exception inner exception. * @return a new exception, with the exit code * {@link LauncherExitCodes#EXIT_SERVICE_CREATION_FAILURE} */ protected ServiceLaunchException serviceCreationFailure(Exception exception) { return new ServiceL...
3.68
hbase_SnapshotManifest_create
/** * Return a SnapshotManifest instance, used for writing a snapshot. There are two usage pattern: - * The Master will create a manifest, add the descriptor, offline regions and consolidate the * snapshot by writing all the pending stuff on-disk. manifest = SnapshotManifest.create(...) * manifest.addRegion(tableDi...
3.68
hbase_RecoverLeaseFSUtils_getLogMessageDetail
/** Returns Detail to append to any log message around lease recovering. */ private static String getLogMessageDetail(final int nbAttempt, final Path p, final long startWaiting) { return "attempt=" + nbAttempt + " on file=" + p + " after " + (EnvironmentEdgeManager.currentTime() - startWaiting) + "ms"; }
3.68
shardingsphere-elasticjob_JobConfiguration_jobErrorHandlerType
/** * Set job error handler type. * * @param jobErrorHandlerType job error handler type * @return job configuration builder */ public Builder jobErrorHandlerType(final String jobErrorHandlerType) { this.jobErrorHandlerType = jobErrorHandlerType; return this; }
3.68
hadoop_SyncableDataOutputStream_getOutStream
/** * Get a reference to the wrapped output stream. * * @return the underlying output stream */ @InterfaceAudience.LimitedPrivate({"HDFS"}) public OutputStream getOutStream() { return out; }
3.68
hbase_Procedure_toStringClassDetails
/** * Extend the toString() information with the procedure details e.g. className and parameters * @param builder the string builder to use to append the proc specific information */ protected void toStringClassDetails(StringBuilder builder) { builder.append(getClass().getName()); }
3.68
hbase_MiniZooKeeperCluster_getClientPortList
/** * Get the list of client ports. * @return clientPortList the client port list */ @InterfaceAudience.Private public List<Integer> getClientPortList() { return clientPortList; }
3.68
flink_TableChange_add
/** * A table change to add a watermark. * * <p>It is equal to the following statement: * * <pre> * ALTER TABLE &lt;table_name&gt; ADD WATERMARK FOR &lt;row_time&gt; AS &lt;row_time_expression&gt; * </pre> * * @param watermarkSpec the added watermark definition. * @return a TableChange represents the modif...
3.68
flink_FlinkPreparingTableBase_getRowType
/** Returns the type of rows returned by this table. */ public RelDataType getRowType() { return rowType; }
3.68
pulsar_MessageCryptoBc_removeKeyCipher
/* * Remove a key <p> Remove the key identified by the keyName from the list of keys.<p> * * @param keyName Unique name to identify the key * * @return true if succeeded, false otherwise */ @Override public boolean removeKeyCipher(String keyName) { if (keyName == null) { return false; } encry...
3.68
framework_GridRowDragger_handleDrop
/** * This method is triggered when there has been a drop on the target grid. * <p> * <em>This method is protected only for testing reasons, you should not * override this</em> but instead use * {@link #setSourceDataProviderUpdater(SourceDataProviderUpdater)}, * {@link #setTargetDataProviderUpdater(TargetDataProv...
3.68
hbase_SnapshotFileCache_triggerCacheRefreshForTesting
/** * Trigger a cache refresh, even if its before the next cache refresh. Does not affect pending * cache refreshes. * <p/> * Blocks until the cache is refreshed. * <p/> * Exposed for TESTING. */ public synchronized void triggerCacheRefreshForTesting() { try { refreshCache(); } catch (IOException e) { ...
3.68
flink_FlinkRelBuilder_aggregate
/** Build non-window aggregate for either aggregate or table aggregate. */ @Override public RelBuilder aggregate( RelBuilder.GroupKey groupKey, Iterable<RelBuilder.AggCall> aggCalls) { // build a relNode, the build() may also return a project RelNode relNode = super.aggregate(groupKey, aggCalls).build()...
3.68
hbase_ZKSecretWatcher_getKeysParentZNode
/** * get token keys parent node * @return token keys parent node */ String getKeysParentZNode() { return keysParentZNode; }
3.68
pulsar_SimpleLoadManagerImpl_isBrokerAvailableForRebalancing
// todo: changeme: this can be optimized, we don't have to iterate through everytime private boolean isBrokerAvailableForRebalancing(String bundleName, long maxLoadLevel) { NamespaceName namespaceName = NamespaceName.get(LoadManagerShared.getNamespaceNameFromBundleName(bundleName)); Map<Long, Set<ResourceUnit>>...
3.68