name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hadoop_BaseResource_getUri
/** * Resource location for a service, e.g. * /app/v1/services/helloworld * **/ public String getUri() { return uri; }
3.68
framework_OracleGenerator_generateSelectQuery
/* * (non-Javadoc) * * @see com.vaadin.addon.sqlcontainer.query.generator.DefaultSQLGenerator# * generateSelectQuery(java.lang.String, java.util.List, * com.vaadin.addon.sqlcontainer.query.FilteringMode, java.util.List, int, * int, java.lang.String) */ @Override public StatementHelper generateSelectQuery(String ...
3.68
flink_DataSet_map
/** * Applies a Map transformation on this DataSet. * * <p>The transformation calls a {@link org.apache.flink.api.common.functions.MapFunction} for * each element of the DataSet. Each MapFunction call returns exactly one element. * * @param mapper The MapFunction that is called for each element of the DataSet. *...
3.68
morf_SqlServerDialect_decorateTemporaryTableName
/** * {@inheritDoc} * * @see org.alfasoftware.morf.jdbc.SqlDialect#decorateTemporaryTableName(java.lang.String) */ @Override public String decorateTemporaryTableName(String undecoratedName) { return "#" + undecoratedName; }
3.68
querydsl_CollectionUtils_unmodifiableList
/** * Return an unmodifiable copy of a list, or the same list if its already an unmodifiable type. * * @param list the list * @param <T> element type * @return unmodifiable copy of a list, or the same list if its already an unmodifiable type */ public static <T> List<T> unmodifiableList(List<T> list) { if (is...
3.68
hbase_AbstractProcedureScheduler_wakeEvents
/** * Wake up all of the given events. Note that we first take scheduler lock and then wakeInternal() * synchronizes on the event. Access should remain package-private. Use ProcedureEvent class to * wake/suspend events. * @param events the list of events to wake */ public void wakeEvents(ProcedureEvent[] events) {...
3.68
hbase_MetricsRegionServer_incrementNumRegionSizeReportsSent
/** * @see MetricsRegionServerQuotaSource#incrementNumRegionSizeReportsSent(long) */ public void incrementNumRegionSizeReportsSent(long numReportsSent) { quotaSource.incrementNumRegionSizeReportsSent(numReportsSent); }
3.68
hadoop_ResourceUsage_getAMLimit
/* * AM-Resource Limit */ public Resource getAMLimit() { return getAMLimit(NL); }
3.68
hadoop_DataNodeVolumeMetrics_getSyncIoSampleCount
// Based on syncIoRate public long getSyncIoSampleCount() { return syncIoRate.lastStat().numSamples(); }
3.68
hadoop_CommonAuditContext_put
/** * Put a context entry dynamically evaluated on demand. * Important: as these supplier methods are long-lived, * the supplier function <i>MUST NOT</i> be part of/refer to * any object instance of significant memory size. * Applications SHOULD remove references when they are * no longer needed. * When logged a...
3.68
zxing_Decoder_decode
/** * <p>Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.</p> * * @param bits booleans representing white/black QR Code modules * @param hints decoding hints that should be used to influence decoding * @return text and bytes encoded within the QR Code * @throws ...
3.68
AreaShop_GeneralRegion_updateLastActiveTime
/** * Set the last active time of the player to the current time. */ public void updateLastActiveTime() { if(getOwner() != null) { setSetting("general.lastActive", Calendar.getInstance().getTimeInMillis()); } }
3.68
framework_BootstrapHandler_getWidgetsetName
/** * @return returns the name of the widgetset to use * @deprecated use {@link #getWidgetsetInfo()} instead */ @Deprecated public String getWidgetsetName() { return getWidgetsetInfo().getWidgetsetName(); }
3.68
flink_EmbeddedRocksDBStateBackend_setNumberOfTransferThreads
/** * Sets the number of threads used to transfer files while snapshotting/restoring. * * @param numberOfTransferThreads The number of threads used to transfer files while * snapshotting/restoring. */ public void setNumberOfTransferThreads(int numberOfTransferThreads) { Preconditions.checkArgument( ...
3.68
flink_CatalogManager_listViews
/** * Returns an array of names of all views(both temporary and permanent) registered in the * namespace of the given catalog and database. * * @return names of registered views */ public Set<String> listViews(String catalogName, String databaseName) { Catalog catalog = getCatalogOrThrowException(catalogName);...
3.68
flink_CheckpointsCleaner_cleanSubsumedCheckpoints
/** * Clean checkpoint that is not in the given {@param stillInUse}. * * @param upTo lowest CheckpointID which is still valid. * @param stillInUse the state of those checkpoints are still referenced. * @param postCleanAction post action after cleaning. * @param executor is used to perform the cleanup logic. */ p...
3.68
hbase_RegionCoprocessorHost_postScannerOpen
/** * @param scan the Scan specification * @param s the scanner * @return the scanner instance to use * @exception IOException Exception */ public RegionScanner postScannerOpen(final Scan scan, RegionScanner s) throws IOException { if (this.coprocEnvironments.isEmpty()) { return s; } return execOperat...
3.68
framework_Panel_getTabIndex
/** * {@inheritDoc} */ @Override public int getTabIndex() { return getState(false).tabIndex; }
3.68
hadoop_StorageUnit_divide
/** * Using BigDecimal to avoid issues with overflow and underflow. * * @param value - value * @param divisor - divisor. * @return -- returns a double that represents this value */ private static double divide(double value, double divisor) { BigDecimal val = new BigDecimal(value); BigDecimal bDivisor = new Bi...
3.68
hibernate-validator_ConstraintViolationAssert_pathsAreEqual
/** * Checks that two property paths are equal. * * @param p1 The first property path. * @param p2 The second property path. * * @return {@code true} if the given paths are equal, {@code false} otherwise. */ public static boolean pathsAreEqual(Path p1, Path p2) { Iterator<Path.Node> p1Iterator = p1.iterator(); ...
3.68
morf_RecordComparator_compare
/** * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) */ @SuppressWarnings({ "rawtypes", "unchecked" }) @Override public int compare(Record o1, Record o2) { for (Column column : columnSortOrder) { Comparable value1 = RecordHelper.convertToComparableType(column, o1); Comparable value2...
3.68
flink_RestClusterClientConfiguration_getRetryDelay
/** @see RestOptions#RETRY_DELAY */ public long getRetryDelay() { return retryDelay; }
3.68
hbase_AsyncRegionLocationCache_findForBeforeRow
/** * Finds the RegionLocations for the region with the greatest startKey strictly less than the * given row * @param row row to find locations */ public RegionLocations findForBeforeRow(byte[] row, int replicaId) { boolean isEmptyStopRow = isEmptyStopRow(row); Map.Entry<byte[], RegionLocations> entry = isE...
3.68
morf_Version2to4TransformingReader_characterReferenceToTransform
/** * Tests whether a given index in the buffer is a full null character reference. * Reads forward if required, but resets the position. */ private ReferenceInfo characterReferenceToTransform(char[] cbuf, int ampersandIndex, int remaining) throws IOException { char[] bufferToTest; int indexToTest; // the max...
3.68
hadoop_ContainerContext_getResource
/** * Get {@link Resource} the resource capability allocated to the container * being initialized or stopped. * * @return the resource capability. */ public Resource getResource() { return resource; }
3.68
hbase_RowPrefixFixedLengthBloomContext_getRowPrefixCell
/** * @param cell the cell * @return the new cell created by row prefix */ private Cell getRowPrefixCell(Cell cell) { byte[] row = CellUtil.copyRow(cell); return ExtendedCellBuilderFactory.create(CellBuilderType.DEEP_COPY) .setRow(row, 0, Math.min(prefixLength, row.length)).setType(Cell.Type.Put).build(); }
3.68
hbase_MasterProcedureScheduler_waitMetaExclusiveLock
// ============================================================================ // Meta Locking Helpers // ============================================================================ /** * Try to acquire the exclusive lock on meta. * @see #wakeMetaExclusiveLock(Procedure) * @param procedure the procedure trying to ...
3.68
AreaShop_RentRegion_getPrice
/** * Get the price of the region. * @return The price of the region */ public double getPrice() { return Math.max(0, Utils.evaluateToDouble(getStringSetting("rent.price"), this)); }
3.68
pulsar_ProducerConfiguration_getSendTimeoutMs
/** * @return the message send timeout in ms */ public long getSendTimeoutMs() { return conf.getSendTimeoutMs(); }
3.68
flink_BuiltInFunctionDefinition_runtimeDeferred
/** * Specifies that this {@link BuiltInFunctionDefinition} will be mapped to a Calcite * function. */ public Builder runtimeDeferred() { // This method is just a marker method for clarity. It is equivalent to calling // neither {@link #runtimeProvided} nor {@link #runtimeClass}. return this; }
3.68
framework_BasicEvent_getStart
/* * (non-Javadoc) * * @see com.vaadin.addon.calendar.event.CalendarEvent#getStart() */ @Override public Date getStart() { return start; }
3.68
rocketmq-connect_StringConverter_toConnectData
/** * Convert a native object to a Rocketmq Connect data object. */ @Override public SchemaAndValue toConnectData(String topic, byte[] value) { try { return new SchemaAndValue(SchemaBuilder.string().build(), deserializer.deserialize(topic, value)); } catch (Exception e) { throw new ConnectExce...
3.68
morf_UnionSetOperator_getSelectStatement
/** * {@inheritDoc} * * @see org.alfasoftware.morf.sql.SetOperator#getSelectStatement() */ @Override public SelectStatement getSelectStatement() { return selectStatement; }
3.68
framework_StreamResource_setCacheTime
/** * Sets the length of cache expiration time. * * <p> * This gives the adapter the possibility cache streams sent to the client. * The caching may be made in adapter or at the client if the client * supports caching. Zero or negative value disables the caching of this * stream. * </p> * * @param cacheTime ...
3.68
hbase_BlockCacheKey_getHfileName
// can't avoid this unfortunately /** Returns The hfileName portion of this cache key */ public String getHfileName() { return hfileName; }
3.68
hadoop_AbfsOutputStreamStatisticsImpl_bytesToUpload
/** * Records the need to upload bytes and increments the total bytes that * needs to be uploaded. * * @param bytes total bytes to upload. Negative bytes are ignored. */ @Override public void bytesToUpload(long bytes) { bytesUpload.addAndGet(bytes); }
3.68
flink_PushFilterIntoSourceScanRuleBase_canPushdownFilter
/** * Determines wether we can pushdown the filter into the source. we can not push filter twice, * make sure FilterPushDownSpec has not been assigned as a capability. * * @param tableSourceTable Table scan to attempt to push into * @return Whether we can push or not */ protected boolean canPushdownFilter(TableSo...
3.68
dubbo_ProtobufTypeBuilder_generateMapFieldName
/** * get map property name from setting method.<br/> * ex: putAllXXX();<br/> * * @param methodName * @return */ private String generateMapFieldName(String methodName) { return toCamelCase(methodName.substring(6)); }
3.68
hudi_SparkRDDReadClient_filterExists
/** * Filter out HoodieRecords that already exists in the output folder. This is useful in deduplication. * * @param hoodieRecords Input RDD of Hoodie records. * @return A subset of hoodieRecords RDD, with existing records filtered out. */ public JavaRDD<HoodieRecord<T>> filterExists(JavaRDD<HoodieRecord<T>> hoodi...
3.68
hadoop_AbfsRestOperation_executeHttpOperation
/** * Executes a single HTTP operation to complete the REST operation. If it * fails, there may be a retry. The retryCount is incremented with each * attempt. */ private boolean executeHttpOperation(final int retryCount, TracingContext tracingContext) throws AzureBlobFileSystemException { AbfsHttpOperation ht...
3.68
flink_MetricConfig_getInteger
/** * Searches for the property with the specified key in this property list. If the key is not * found in this property list, the default property list, and its defaults, recursively, are * then checked. The method returns the default value argument if the property is not found. * * @param key the hashtable key. ...
3.68
pulsar_ProducerConfiguration_setBatchingMaxMessages
/** * Set the maximum number of messages permitted in a batch. <i>default: 1000</i> If set to a value greater than 1, * messages will be queued until this threshold is reached or batch interval has elapsed * * @see ProducerConfiguration#setBatchingMaxPublishDelay(long, TimeUnit) All messages in batch will be publis...
3.68
flink_DeltaIterationBase_getNextWorkset
/** * Gets the contract that has been set as the next workset. * * @return The contract that has been set as the next workset. */ public Operator<WT> getNextWorkset() { return this.nextWorkset; }
3.68
hbase_Table_delete
/** * Batch Deletes the specified cells/rows from the table. * <p> * If a specified row does not exist, {@link Delete} will report as though sucessful delete; no * exception will be thrown. If there are any failures even after retries, a * {@link RetriesExhaustedWithDetailsException} will be thrown. * RetriesExha...
3.68
hbase_HFileBlock_createBuilder
/** * Creates a new HFileBlockBuilder from the existing block and a new ByteBuff. The builder will be * loaded with all of the original fields from blk, except now using the newBuff and setting * isSharedMem based on the source of the passed in newBuff. An existing HFileBlock may have been * an {@link ExclusiveMemH...
3.68
pulsar_Transactions_getTransactionBufferStats
/** * Get transaction buffer stats. * * @param topic the topic of getting transaction buffer stats * @return the stats of transaction buffer in topic. */ default TransactionBufferStats getTransactionBufferStats(String topic) throws PulsarAdminException { return getTransactionBufferStats(topic, false, false); }
3.68
morf_ResultSetComparer_compare
/** * Given 2 data sets, return the number of mismatches between them, and * callback with the details of any mismatches as they are found. See * {@link ResultSetMismatch} for definition of a mismatch. * * @param keyColumns The indexes of the key columns common to both data sets. * If this is empty, the ...
3.68
druid_FilterAdapter_callableStatement_registerOutParameter
// /////////////// @Override public void callableStatement_registerOutParameter(FilterChain chain, CallableStatementProxy statement, int parameterIndex, int sqlType) throws SQLException { chain.callableStatement_registerOutParameter(statement, parameterIndex, sqlTy...
3.68
hbase_MutableSegment_first
/** * Returns the first cell in the segment * @return the first cell in the segment */ Cell first() { return this.getCellSet().first(); }
3.68
querydsl_BeanMap_convertType
/** * Converts the given value to the given type. First, reflection is * is used to find a public constructor declared by the given class * that takes one argument, which must be the precise type of the * given value. If such a constructor is found, a new object is * created by passing the given value to that co...
3.68
hibernate-validator_TraversableResolvers_getDefault
/** * Initializes and returns the default {@link TraversableResolver} depending on the environment. * <p> * If JPA 2 is present in the classpath, a {@link JPATraversableResolver} instance is returned. * <p> * Otherwise, it returns an instance of the default {@link TraverseAllTraversableResolver}. */ public static...
3.68
hbase_Constraints_remove
/** * Remove the constraint (and associated information) for the table descriptor. * @param builder {@link TableDescriptorBuilder} to modify * @param clazz {@link Constraint} class to remove */ public static TableDescriptorBuilder remove(TableDescriptorBuilder builder, Class<? extends Constraint> clazz) { Str...
3.68
hadoop_HadoopLogsAnalyzer_initializeHadoopLogsAnalyzer
/** * @param args * string arguments. See {@code usage()} * @throws FileNotFoundException * @throws IOException */ private int initializeHadoopLogsAnalyzer(String[] args) throws FileNotFoundException, IOException { Path jobTraceFilename = null; Path topologyFilename = null; if (args.length == 0 ...
3.68
flink_Tuple25_toString
/** * Creates a string representation of the tuple in the form (f0, f1, f2, f3, f4, f5, f6, f7, f8, * f9, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24), where the * individual fields are the value returned by calling {@link Object#toString} on that field. * * @return The string represe...
3.68
hudi_HoodieBackedTableMetadataWriter_performTableServices
/** * Optimize the metadata table by running compaction, clean and archive as required. * <p> * Don't perform optimization if there are inflight operations on the dataset. This is for two reasons: * - The compaction will contain the correct data as all failed operations have been rolled back. * - Clean/compaction ...
3.68
hadoop_StartupProgress_setSize
/** * Sets the optional size in bytes associated with the specified phase. For * example, this can be used while loading fsimage to indicate the size of the * fsimage file. * * @param phase Phase to set * @param size long to set */ public void setSize(Phase phase, long size) { if (!isComplete()) { phases...
3.68
hbase_Bytes_secureRandom
/** * Fill given array with random bytes at the specified position using a strong random number * generator. * @param b array which needs to be filled with random bytes * @param offset staring offset in array * @param length number of bytes to fill */ public static void secureRandom(byte[] b, int offset, int...
3.68
hadoop_SaslInputStream_available
/** * Returns the number of bytes that can be read from this input stream without * blocking. The <code>available</code> method of <code>InputStream</code> * returns <code>0</code>. This method <B>should</B> be overridden by * subclasses. * * @return the number of bytes that can be read from this input stream wi...
3.68
shardingsphere-elasticjob_ServerService_isAvailableServer
/** * Judge is available server or not. * * @param ip job server IP address * @return is available server or not */ public boolean isAvailableServer(final String ip) { return isEnableServer(ip) && hasOnlineInstances(ip); }
3.68
hadoop_BlockPoolTokenSecretManager_addKeys
/** * See {@link BlockTokenSecretManager#addKeys(ExportedBlockKeys)}. */ public void addKeys(String bpid, ExportedBlockKeys exportedKeys) throws IOException { get(bpid).addKeys(exportedKeys); }
3.68
hudi_InternalSchemaBuilder_index2Parents
/** * Build a mapping which maintain the relation between child field id and it's parent field id. * if a child field y(which id is 9) belong to a nest field x(which id is 6), then (9 -> 6) will be added to the result map. * if a field has no parent field, nothings will be added. * * @param record hoodie record ty...
3.68
pulsar_TripleLongPriorityQueue_clear
/** * Clear all items. */ public void clear() { this.tuplesCount = 0; shrinkCapacity(); }
3.68
hadoop_ProtoTranslatorFactory_getTranslator
/** * Get a {@link ProtoTranslator} based on the given input message * types. If the type is not supported, a IllegalArgumentException * will be thrown. When adding more transformers to this factory class, * note each transformer works exactly for one message to another * (and vice versa). For each type of the mes...
3.68
hadoop_CombinedHostsFileWriter_writeFile
/** * Serialize a set of DatanodeAdminProperties to a json file. * @param hostsFile the json file name. * @param allDNs the set of DatanodeAdminProperties * @throws IOException */ public static void writeFile(final String hostsFile, final Set<DatanodeAdminProperties> allDNs) throws IOException { final Object...
3.68
hbase_StorageClusterStatusModel_setAverageLoad
/** * @param averageLoad the average load of region servers in the cluster */ public void setAverageLoad(double averageLoad) { this.averageLoad = averageLoad; }
3.68
framework_VAbstractCalendarPanel_focusNextDay
/** * Moves the focus forward the given number of days. */ @SuppressWarnings("deprecation") private void focusNextDay(int days) { if (focusedDate == null) { return; } Date focusCopy = ((Date) focusedDate.clone()); focusCopy.setDate(focusedDate.getDate() + days); if (!isDateInsideRange(foc...
3.68
flink_DeclarativeSlotManager_reportSlotStatus
/** * Reports the current slot allocations for a task manager identified by the given instance id. * * @param instanceId identifying the task manager for which to report the slot status * @param slotReport containing the status for all of its slots * @return true if the slot status has been updated successfully, o...
3.68
hudi_LocalRegistry_getAllCounts
/** * Get all Counter type metrics. */ @Override public Map<String, Long> getAllCounts(boolean prefixWithRegistryName) { HashMap<String, Long> countersMap = new HashMap<>(); counters.forEach((k, v) -> { String key = prefixWithRegistryName ? name + "." + k : k; countersMap.put(key, v.getValue()); }); r...
3.68
hbase_AdaptiveLifoCoDelCallQueue_take
/** * Behaves as {@link LinkedBlockingQueue#take()}, except it will silently skip all calls which it * thinks should be dropped. * @return the head of this queue * @throws InterruptedException if interrupted while waiting */ @Override public CallRunner take() throws InterruptedException { CallRunner cr; while ...
3.68
hbase_TableDescriptorBuilder_toByteArray
/** Returns the bytes in pb format */ private byte[] toByteArray() { return ProtobufUtil.prependPBMagic(ProtobufUtil.toTableSchema(this).toByteArray()); }
3.68
hadoop_FederationStateStoreUtils_setPassword
/** * Sets a specific password for <code>HikariDataSource</code> SQL connections. * * @param dataSource the <code>HikariDataSource</code> connections * @param password the value to set */ public static void setPassword(HikariDataSource dataSource, String password) { if (password != null) { dataSource.setPass...
3.68
flink_SegmentsUtil_getByte
/** * get byte from segments. * * @param segments target segments. * @param offset value offset. */ public static byte getByte(MemorySegment[] segments, int offset) { if (inFirstSegment(segments, offset, 1)) { return segments[0].get(offset); } else { return getByteMultiSegments(segments, of...
3.68
dubbo_XdsRouter_getXdsRouteRuleMap
/** * for ut only */ @Deprecated ConcurrentHashMap<String, List<XdsRouteRule>> getXdsRouteRuleMap() { return xdsRouteRuleMap; }
3.68
streampipes_SwingingDoorTrendingFilter_reset
/** * if current point to the last stored point's time distance >= compressionMaxTimeInterval, will store current * point and reset upperDoor and lowerDoor * * @param time current time * @param value current value * @param event current event */ private void reset(long time, double value, Event event) { lastS...
3.68
framework_SortEvent_isUserOriginated
/** * Returns whether this event originated from actions done by the user. * * @return true if sort event originated from user interaction */ public boolean isUserOriginated() { return userOriginated; }
3.68
framework_DefaultDeploymentConfiguration_checkResourceCacheTime
/** * Log a warning if resource cache time is set but is not an integer. */ private void checkResourceCacheTime() { try { resourceCacheTime = Integer.parseInt(getApplicationOrSystemProperty( Constants.SERVLET_PARAMETER_RESOURCE_CACHE_TIME, Integer.toString(DEFAULT_RESOURCE_...
3.68
hbase_JSONBean_open
/** * Notice that, closing the return {@link Writer} will not close the {@code writer} passed in, you * still need to close the {@code writer} by yourself. * <p/> * This is because that, we can only finish the json after you call {@link Writer#close()}. So if * we just close the {@code writer}, you can write nothi...
3.68
framework_LayoutManager_delayOverflowFix
/* * Delay the overflow fix if the involved connectors might still change */ private boolean delayOverflowFix(ComponentConnector componentConnector) { if (!currentDependencyTree.noMoreChangesExpected(componentConnector)) { return true; } ServerConnector parent = componentConnector.getParent(); ...
3.68
framework_AbstractBeanContainer_setBeanIdResolver
/** * Sets the resolver that finds the item id for a bean, or null not to use * automatic resolving. * * Methods that add a bean without specifying an id must not be called if no * resolver has been set. * * Note that methods taking an explicit id can be used whether a resolver * has been defined or not. * * ...
3.68
hadoop_JobTokenSecretManager_retrievePassword
/** * Look up the token password/secret for the given job token identifier. * @param identifier the job token identifier to look up * @return token password/secret as byte[] * @throws InvalidToken */ @Override public byte[] retrievePassword(JobTokenIdentifier identifier) throws InvalidToken { return retrieve...
3.68
flink_Tuple4_toString
/** * Creates a string representation of the tuple in the form (f0, f1, f2, f3), where the * individual fields are the value returned by calling {@link Object#toString} on that field. * * @return The string representation of the tuple. */ @Override public String toString() { return "(" + StringUtil...
3.68
morf_XmlPullProcessor_readNextTagInsideParent
/** * Reads the next tag name from the XML parser so long as it lies within the parent tag name. * If the close tag event for the parent is read this method will return null. Otherwise it * returns the name of the tag read. * * @param parentTagName The enclosing tag that forms the limit for the read operation. * ...
3.68
hadoop_OBSFileSystem_getBoundedListThreadPool
/** * Return bounded thread pool for list. * * @return bounded thread pool for list */ ThreadPoolExecutor getBoundedListThreadPool() { return boundedListThreadPool; }
3.68
framework_Table_isSelectable
/** * Returns whether table is selectable. * * <p> * The table is not selectable until it's explicitly set as selectable or at * least one {@link ValueChangeListener} is added. * </p> * * @return whether table is selectable. */ public boolean isSelectable() { if (selectable == null) { return hasLis...
3.68
hadoop_AzureBlobFileSystemStore_hashCode
/** * Returns a hash code value for the object, which is defined as * the hash code of the path name. * * @return a hash code value for the path name and version */ @Override public int hashCode() { int hash = getPath().hashCode(); hash = 89 * hash + (this.version != null ? this.version.hashCode() : 0); ret...
3.68
hbase_ExecutorService_getExecutorLazily
/** * Initialize the executor lazily, Note if an executor need to be initialized lazily, then all * paths should use this method to get the executor, should not start executor by using * {@link ExecutorService#startExecutorService(ExecutorConfig)} */ public ThreadPoolExecutor getExecutorLazily(ExecutorConfig config...
3.68
hudi_HoodieRecord_setNewLocation
/** * Sets the new currentLocation of the record, after being written. This again should happen exactly-once. */ public void setNewLocation(HoodieRecordLocation location) { checkState(); assert newLocation == null; this.newLocation = location; }
3.68
hbase_StaticUserWebFilter_getUsernameFromConf
/** * Retrieve the static username from the configuration. */ static String getUsernameFromConf(Configuration conf) { String oldStyleUgi = conf.get(DEPRECATED_UGI_KEY); if (oldStyleUgi != null) { // We can't use the normal configuration deprecation mechanism here // since we need to split out the username...
3.68
flink_MailboxProcessor_getMailboxMetricsControl
/** * Gets {@link MailboxMetricsController} for control and access to mailbox metrics. * * @return {@link MailboxMetricsController}. */ @VisibleForTesting public MailboxMetricsController getMailboxMetricsControl() { return this.mailboxMetricsControl; }
3.68
morf_SchemaUtils_view
/** * Create a view. * * @param viewName The name of the view. * @param selectStatement The underlying {@link SelectStatement}. This can be null e.g. if loading from database metadata or in testing. * @param dependencies names of any views that this view depends on (and therefore need to be deployed first). * @re...
3.68
hadoop_TaskRuntimeEstimator_hasStagnatedProgress
/** * * Returns true if the estimator has no updates records for a threshold time * window. This helps to identify task attempts that are stalled at the * beginning of execution. * * @param id the {@link TaskAttemptId} of the attempt we are asking about * @param timeStamp the time of the report we compare with ...
3.68
hbase_ZKUtil_deleteNode
/** * Delete the specified node with the specified version. Sets no watches. Throws all exceptions. */ public static boolean deleteNode(ZKWatcher zkw, String node, int version) throws KeeperException { try { zkw.getRecoverableZooKeeper().delete(node, version); return true; } catch (KeeperException.BadVers...
3.68
hadoop_DynamicIOStatistics_addMaximumFunction
/** * add a mapping of a key to a maximum function. * @param key the key * @param eval the evaluator */ void addMaximumFunction(String key, Function<String, Long> eval) { maximums.addFunction(key, eval); }
3.68
flink_ListView_newListViewDataType
/** Utility method for creating a {@link DataType} of {@link ListView} explicitly. */ public static DataType newListViewDataType(DataType elementDataType) { return DataTypes.STRUCTURED( ListView.class, DataTypes.FIELD("list", DataTypes.ARRAY(elementDataType).bridgedTo(List.class))); }
3.68
framework_LayoutManager_setThoroughSizeChck
/** * Set whether the measuring should use a thorough size check that evaluates * the presence of the element and uses calculated size, or default to a * slightly faster check that can result in incorrect size information if * the check is triggered while a transform animation is ongoing. This can * happen e.g. wh...
3.68
dubbo_AdaptiveClassCodeGenerator_generateMethodContent
/** * generate method content */ private String generateMethodContent(Method method) { Adaptive adaptiveAnnotation = method.getAnnotation(Adaptive.class); StringBuilder code = new StringBuilder(512); if (adaptiveAnnotation == null) { return generateUnsupported(method); } else { int url...
3.68
morf_FieldReference_asc
/** * sets ascending order on this field * @return this */ public Builder asc() { this.direction = Direction.ASCENDING; return this; }
3.68
flink_AccumulatorHelper_compareAccumulatorTypes
/** Compare both classes and throw {@link UnsupportedOperationException} if they differ. */ @SuppressWarnings("rawtypes") public static void compareAccumulatorTypes( Object name, Class<? extends Accumulator> first, Class<? extends Accumulator> second) throws UnsupportedOperationException { if (first...
3.68
framework_SelectorPath_getNameWithCount
/** * Get variable name with counter for given component name. * * @param name * Component name * @return name followed by count */ protected String getNameWithCount(String name) { if (!counter.containsKey(name)) { counter.put(name, 0); } counter.put(name, counter.get(name) + 1); ...
3.68
hibernate-validator_ConstraintAnnotationVisitor_visitTypeAsAnnotationType
/** * <p> * Checks whether the given annotations are correctly specified at the given * annotation type declaration. The following checks are performed: * </p> * <ul> * <li> * The only annotation types allowed to be annotated with other constraint * annotations are composed constraint annotation type declaratio...
3.68