name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
framework_UIConnector_getHead
/** * Internal helper to get the <head> tag of the page * * @since 7.3 * @return the head element */ private HeadElement getHead() { return HeadElement.as(Document.get() .getElementsByTagName(HeadElement.TAG).getItem(0)); }
3.68
hbase_SnapshotInfo_getSize
/** Returns the file size */ public long getSize() { return this.size; }
3.68
flink_StreamElement_asLatencyMarker
/** * Casts this element into a LatencyMarker. * * @return This element as a LatencyMarker. * @throws java.lang.ClassCastException Thrown, if this element is actually not a LatencyMarker. */ public final LatencyMarker asLatencyMarker() { return (LatencyMarker) this; }
3.68
querydsl_StringExpression_endsWithIgnoreCase
/** * Create a {@code this.endsWithIgnoreCase(str)} expression * * <p>Returns true if this ends with str, compares case insensitively</p> * * @param str string * @return this.endsWithIgnoreCase(str) */ public BooleanExpression endsWithIgnoreCase(String str) { return endsWithIgnoreCase(ConstantImpl.create(str...
3.68
hbase_SnapshotReferenceUtil_getHFileNames
/** * Returns the store file names in the snapshot. * @param conf The current {@link Configuration} instance. * @param fs {@link FileSystem} * @param snapshotDir {@link Path} to the Snapshot directory * @param snapshotDesc the {@link SnapshotDescription} of the snapshot to inspect * @throws IOE...
3.68
dubbo_DubboBootstrap_configCenter
// {@link ConfigCenterConfig} correlative methods public DubboBootstrap configCenter(Consumer<ConfigCenterBuilder> consumerBuilder) { return configCenter(null, consumerBuilder); }
3.68
hadoop_OBSWriteOperationHelper_initiateMultiPartUpload
/** * Start the multipart upload process. * * @param destKey object key * @return the upload result containing the ID * @throws IOException IO problem */ String initiateMultiPartUpload(final String destKey) throws IOException { LOG.debug("Initiating Multipart upload"); final InitiateMultipartUploadRequest ini...
3.68
hmily_CuratorZookeeperClient_addListener
/** * Add listener. * * @param context the context * @param passiveHandler the passive handler * @param config the config * @throws Exception the exception */ public void addListener(final Supplier<ConfigLoader.Context> context, final ConfigLoader.PassiveHandler<ZkPassiveConfig> passiveHandler, fi...
3.68
rocketmq-connect_FieldsMetadata_extract
/** * extract metadata info * * @param tableName * @param pkMode * @param configuredPkFields * @param fieldsWhitelist * @param schema * @param headers * @return */ public static FieldsMetadata extract( final String tableName, final JdbcSinkConfig.PrimaryKeyMode pkMode, final List<Strin...
3.68
morf_SqlDialect_getSqlforBlobLength
/** * Converts the function get LENGTH of Blob data or field into SQL. * Use LENGTH instead of OCTET_LENGTH as they are synonymous in MySQl and PostGreSQL. In H2 LENGTH returns the correct * number of bytes, whereas OCTET_LENGTH returns 2 times the byte length. * @param function the function to convert. * @return ...
3.68
flink_DefaultCheckpointPlanCalculator_checkAllTasksInitiated
/** * Checks if all tasks are attached with the current Execution already. This method should be * called from JobMaster main thread executor. * * @throws CheckpointException if some tasks do not have attached Execution. */ private void checkAllTasksInitiated() throws CheckpointException { for (ExecutionVertex...
3.68
hbase_NamespacesInstanceResource_deleteNoBody
/** * Build a response for DELETE delete namespace. * @param message value not used. * @param headers value not used. * @return response code. */ @DELETE public Response deleteNoBody(final byte[] message, final @Context UriInfo uriInfo, final @Context HttpHeaders headers) { if (LOG.isTraceEnabled()) { LOG....
3.68
hbase_TimeRange_until
/** * Represents the time interval [0, maxStamp) * @param maxStamp the minimum timestamp value, exclusive */ public static TimeRange until(long maxStamp) { check(INITIAL_MIN_TIMESTAMP, maxStamp); return new TimeRange(INITIAL_MIN_TIMESTAMP, maxStamp); }
3.68
hadoop_TimelineEntity_addRelatedEntities
/** * Add a map of related entities to the existing related entity map * * @param relatedEntities * a map of related entities */ public void addRelatedEntities(Map<String, Set<String>> relatedEntities) { for (Entry<String, Set<String>> relatedEntity : relatedEntities.entrySet()) { Set<String> thisR...
3.68
flink_SlotPool_requestNewAllocatedSlot
/** * Request the allocation of a new slot from the resource manager. This method will not return a * slot from the already available slots from the pool, but instead will add a new slot to that * pool that is immediately allocated and returned. * * @param slotRequestId identifying the requested slot * @param res...
3.68
querydsl_NumberExpression_add
/** * Create a {@code this + right} expression * * <p>Get the sum of this and right</p> * * @param right rhs of expression * @return this + right */ public <N extends Number & Comparable<N>> NumberExpression<T> add(N right) { return Expressions.numberOperation(getType(), Ops.ADD, mixin, ConstantImpl.create(r...
3.68
flink_JobGraph_findVertexByID
/** * Searches for a vertex with a matching ID and returns it. * * @param id the ID of the vertex to search for * @return the vertex with the matching ID or <code>null</code> if no vertex with such ID could * be found */ public JobVertex findVertexByID(JobVertexID id) { return this.taskVertices.get(id); }
3.68
dubbo_ReferenceConfig_checkMeshConfig
/** * check if mesh config is correct * * @param referenceParameters referenceParameters * @return mesh config is correct */ private boolean checkMeshConfig(Map<String, String> referenceParameters) { if (!"true".equals(referenceParameters.getOrDefault(MESH_ENABLE, "false"))) { // In mesh mode, unloadCl...
3.68
flink_RestClient_forUrl
/** * Creates a new RestClient for the provided root URL. If the protocol of the URL is "https", * then SSL is automatically enabled for the REST client. */ public static RestClient forUrl(Configuration configuration, Executor executor, URL rootUrl) throws ConfigurationException { Preconditions.checkNotN...
3.68
dubbo_ScopeModelAware_setApplicationModel
/** * Override this method if you just need application model * @param applicationModel */ default void setApplicationModel(ApplicationModel applicationModel) {}
3.68
AreaShop_AreaShop_isReady
/** * Indicates if the plugin is ready to be used. * @return true if the plugin is ready, false otherwise */ public boolean isReady() { return ready; }
3.68
pulsar_DebeziumSource_topicNamespace
// namespace for output topics, default value is "tenant/namespace" public static String topicNamespace(SourceContext sourceContext) { String tenant = sourceContext.getTenant(); String namespace = sourceContext.getNamespace(); return (StringUtils.isEmpty(tenant) ? TopicName.PUBLIC_TENANT : tenant) + "/" ...
3.68
hbase_ReplicationPeerConfigUtil_parseTableCFsFromConfig
/** * Convert tableCFs string into Map. */ public static Map<TableName, List<String>> parseTableCFsFromConfig(String tableCFsConfig) { ReplicationProtos.TableCF[] tableCFs = convert(tableCFsConfig); return convert2Map(tableCFs); }
3.68
flink_InternalTimerServiceImpl_startTimerService
/** * Starts the local {@link InternalTimerServiceImpl} by: * * <ol> * <li>Setting the {@code keySerialized} and {@code namespaceSerializer} for the timers it * will contain. * <li>Setting the {@code triggerTarget} which contains the action to be performed when a * timer fires. * <li>Re-regist...
3.68
hadoop_Check_notNull
/** * Verifies a variable is not NULL. * * @param obj the variable to check. * @param name the name to use in the exception message. * * @return the variable. * * @throws IllegalArgumentException if the variable is NULL. */ public static <T> T notNull(T obj, String name) { if (obj == null) { throw new Il...
3.68
hbase_Server_getAsyncConnection
/** * Returns a reference to the servers' async connection. * <p/> * Important note: this method returns a reference to Connection which is managed by Server * itself, so callers must NOT attempt to close connection obtained. */ default AsyncConnection getAsyncConnection() { return getAsyncClusterConnection(); }
3.68
hbase_RecoverLeaseFSUtils_recoverLease
/** * Try to recover the lease. * @return True if dfs#recoverLease came by true. */ private static boolean recoverLease(final DistributedFileSystem dfs, final int nbAttempt, final Path p, final long startWaiting) throws FileNotFoundException { boolean recovered = false; try { recovered = dfs.recoverLease(p...
3.68
framework_VTabsheet_isClipped
/** * Checks whether the given tab is clipped out of view (hidden behind the * scroller element or overflowing further). Does not check whether hiding * the scroller element would bring this tab fully into view. * * @return {@code true} if the given tab is clipped, {@code false} otherwise */ private boolean isCli...
3.68
framework_AbstractRemoteDataSource_canFetchData
/** * Checks if it is possible to currently fetch data from the remote data * source. * * @return <code>true</code> if it is ok to try to fetch data, * <code>false</code> if it is known that fetching data will fail * and should not be tried right now. * @since 7.7.2 */ protected boolean canFetch...
3.68
rocketmq-connect_DelegatingClassLoader_pluginClassLoader
/** * Retrieve the PluginClassLoader associated with a plugin class * * @param name * @return */ public PluginClassLoader pluginClassLoader(String name) { if (StringUtils.isEmpty(name) || StringUtils.isBlank(name)) { return null; } if (!PluginUtils.shouldLoadInIsolation(name)) { return ...
3.68
morf_InsertStatementBuilder_useParallelDml
/** * Request that this statement is executed with a parallel execution plan for data manipulation language (DML). This request will have no effect unless the database implementation supports it and the feature is enabled. * * <p>For statement that will affect a high percentage or rows in the table, a parallel execu...
3.68
flink_InputTypeStrategies_explicitSequence
/** * Strategy for a named function signature of explicitly defined types like {@code f(s STRING, i * INT)}. Implicit casts will be inserted if possible. * * <p>This is equivalent to using {@link #sequence(String[], ArgumentTypeStrategy[])} and {@link * #explicit(DataType)}. */ public static InputTypeStrategy exp...
3.68
graphhopper_VectorTile_hasDoubleValue
/** * <code>optional double double_value = 3;</code> */ public boolean hasDoubleValue() { return ((bitField0_ & 0x00000004) == 0x00000004); }
3.68
hibernate-validator_ConstrainedExecutable_isConstrained
/** * Whether the represented executable is constrained or not. This is the case if * it has at least one constrained parameter, at least one parameter marked * for cascaded validation, at least one cross-parameter constraint, at * least one return value constraint or if the return value is marked for * cascaded v...
3.68
hadoop_IOStatisticsStoreImpl_setAtomicLong
/** * Set an atomic long to a value. * @param aLong atomic long; may be null * @param value value to set to */ private void setAtomicLong(final AtomicLong aLong, final long value) { if (aLong != null) { aLong.set(value); } }
3.68
flink_FlinkContainersSettings_taskManagerHostnamePrefix
/** * Sets the {@code taskManagerHostnamePrefix} and returns a reference to this Builder * enabling method chaining. * * @param taskManagerHostnamePrefix The {@code taskManagerHostnamePrefix} to set. * @return A reference to this Builder. */ public Builder taskManagerHostnamePrefix(String taskManagerHostnamePrefi...
3.68
streampipes_SimpleBlockFusionProcessor_getInstance
/** * Returns the singleton instance for BlockFusionProcessor. */ public static SimpleBlockFusionProcessor getInstance() { return INSTANCE; }
3.68
querydsl_DateExpression_year
/** * Create a year expression * * @return year */ public NumberExpression<Integer> year() { if (year == null) { year = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.YEAR, mixin); } return year; }
3.68
hudi_HoodieAdbJdbcClient_updateTableDefinition
/** * TODO align with {@link org.apache.hudi.sync.common.HoodieMetaSyncOperations#updateTableSchema} */ public void updateTableDefinition(String tableName, SchemaDifference schemaDiff) { LOG.info("Adding columns for table:{}", tableName); schemaDiff.getAddColumnTypes().forEach((columnName, columnType) -> ex...
3.68
dubbo_DubboProtocol_createInvocation
/** * FIXME channel.getUrl() always binds to a fixed service, and this service is random. * we can choose to use a common service to carry onConnect event if there's no easy way to get the specific * service this connection is binding to. * @param channel * @param url * @param methodKey * @return */ private Inv...
3.68
flink_ExecutionConfig_getLatencyTrackingInterval
/** * Returns the latency tracking interval. * * @return The latency tracking interval in milliseconds */ @PublicEvolving public long getLatencyTrackingInterval() { return configuration.get(MetricOptions.LATENCY_INTERVAL); }
3.68
flink_MaxwellJsonFormatFactory_validateDecodingFormatOptions
/** Validator for maxwell decoding format. */ private static void validateDecodingFormatOptions(ReadableConfig tableOptions) { JsonFormatOptionsUtil.validateDecodingFormatOptions(tableOptions); }
3.68
flink_JavaFieldPredicates_isAssignableTo
/** * Match the {@link Class} of the {@link JavaField}'s assignability. * * @param clazz the Class type to check for assignability * @return a {@link DescribedPredicate} that returns {@code true}, if the respective {@link * JavaField} is assignable to the supplied {@code clazz}. */ public static DescribedPred...
3.68
graphhopper_RamerDouglasPeucker_setMaxDistance
/** * maximum distance of discrepancy (from the normal way) in meter */ public RamerDouglasPeucker setMaxDistance(double dist) { this.normedMaxDist = calc.calcNormalizedDist(dist); this.maxDistance = dist; return this; }
3.68
flink_HadoopFileStatus_fromHadoopStatus
/** * Creates a new {@code HadoopFileStatus} from Hadoop's {@link org.apache.hadoop.fs.FileStatus}. * If Hadoop's file status is <i>located</i>, i.e., it contains block information, then this * method returns an implementation of Flink's {@link * org.apache.flink.core.fs.LocatedFileStatus}. */ public static Hadoop...
3.68
hbase_CellComparatorImpl_compareQualifiers
/** * Compare the qualifiers part of the left and right cells. * @return 0 if both cells are equal, 1 if left cell is bigger than right, -1 otherwise */ @Override public final int compareQualifiers(Cell left, Cell right) { if ((left instanceof ByteBufferKeyValue) && (right instanceof ByteBufferKeyValue)) { ret...
3.68
flink_CoGroupOperator_equalTo
/** * Continues a CoGroup transformation and defines a {@link KeySelector} function for the * second co-grouped {@link DataSet}. * * <p>The KeySelector function is called for each element of the second DataSet and * extracts a single key value on which the DataSet is grouped. * * @param keyExtractor The KeySelec...
3.68
querydsl_QueryBase_set
/** * Set the given parameter to the given value * * @param <P> * @param param param * @param value binding * @return the current object */ public <P> Q set(ParamExpression<P> param, P value) { return queryMixin.set(param, value); }
3.68
framework_DesignContext_getComponentById
/** * Returns a component having the specified global id. If no component is * found, returns null. * * @param globalId * The global id of the component * @return a component whose global id equals globalId */ public Component getComponentById(String globalId) { return idToComponent.get(globalId);...
3.68
hadoop_JobTokenSecretManager_createSecretKey
/** * Convert the byte[] to a secret key * @param key the byte[] to create the secret key from * @return the secret key */ public static SecretKey createSecretKey(byte[] key) { return SecretManager.createSecretKey(key); }
3.68
flink_StreamExecutionEnvironment_getRestartStrategy
/** * Returns the specified restart strategy configuration. * * @return The restart strategy configuration to be used */ @PublicEvolving public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() { return config.getRestartStrategy(); }
3.68
hadoop_AbstractS3ACommitter_maybeSaveSummary
/** * Save a summary to the report dir if the config option * is set. * The report will be updated with the current active stage, * and if {@code thrown} is non-null, it will be added to the * diagnostics (and the job tagged as a failure). * Static for testability. * @param activeStage active stage * @param con...
3.68
pulsar_ObjectMapperFactory_clearCaches
/** * Clears the caches tied to the ObjectMapper instances and replaces the singleton ObjectMapper instance. * * This can be used in tests to ensure that classloaders and class references don't leak across tests. */ public static void clearCaches() { clearTypeFactoryCache(getMapper().getObjectMapper()); cle...
3.68
dubbo_URLParam_parse
/** * Parse URLParam * Init URLParam by constructor is not allowed * * @param params params map added into URLParam * @param rawParam original rawParam string, directly add to rawParam field, * will not affect real key-pairs store in URLParam. * Please make sure it can correspon...
3.68
flink_FlinkRelMetadataQuery_flinkDistribution
/** * Returns the {@link FlinkRelDistribution} statistic. * * @param rel the relational expression * @return description of how the rows in the relational expression are physically distributed */ public FlinkRelDistribution flinkDistribution(RelNode rel) { for (; ; ) { try { return distribu...
3.68
hadoop_ListResultEntrySchema_withLastModified
/** * Set the lastModified value. * * @param lastModified the lastModified value to set * @return the ListEntrySchema object itself. */ public ListResultEntrySchema withLastModified(String lastModified) { this.lastModified = lastModified; return this; }
3.68
flink_DefaultCheckpointPlanCalculator_calculateWithAllTasksRunning
/** * Computes the checkpoint plan when all tasks are running. It would simply marks all the source * tasks as need to trigger and all the tasks as need to wait and commit. * * @return The plan of this checkpoint. */ private CheckpointPlan calculateWithAllTasksRunning() { List<Execution> executionsToTrigger = ...
3.68
flink_EdgeManagerBuildUtil_connectVertexToResult
/** * Calculate the connections between {@link ExecutionJobVertex} and {@link IntermediateResult} * * based on the {@link DistributionPattern}. * * @param vertex the downstream consumer {@link ExecutionJobVertex} * @param intermediateResult the upstream consumed {@link IntermediateResult} */ static void connectVe...
3.68
hbase_MobStoreScanner_next
/** * Firstly reads the cells from the HBase. If the cell are a reference cell (which has the * reference tag), the scanner need seek this cell from the mob file, and use the cell found from * the mob file as the result. */ @Override public boolean next(List<Cell> outResult, ScannerContext ctx) throws IOException {...
3.68
rocketmq-connect_Deserializer_close
/** * Close this deserializer. * <p> * This method must be idempotent as it may be called multiple times. */ @Override default void close() { // intentionally left blank }
3.68
hbase_HRegionServer_getRegion
/** * Protected Utility method for safely obtaining an HRegion handle. * @param regionName Name of online {@link HRegion} to return * @return {@link HRegion} for <code>regionName</code> */ protected HRegion getRegion(final byte[] regionName) throws NotServingRegionException { String encodedRegionName = RegionInfo...
3.68
morf_AbstractSqlDialectTest_testSelectOrderByScript
/** * Tests a select with an "order by" clause. */ @Test public void testSelectOrderByScript() { SelectStatement stmt = new SelectStatement(new FieldReference(STRING_FIELD)) .from(new TableReference(ALTERNATE_TABLE)) .orderBy(new FieldReference(STRING_FIELD)); String expectedSql = "SELECT stringField FROM " ...
3.68
hbase_MasterRegistry_parseMasterAddrs
/** * Parses the list of master addresses from the provided configuration. Supported format is comma * separated host[:port] values. If no port number if specified, default master port is assumed. * @param conf Configuration to parse from. */ public static Set<ServerName> parseMasterAddrs(Configuration conf) throws...
3.68
dubbo_ServiceDiscoveryRegistry_createServiceDiscovery
/** * Create the {@link ServiceDiscovery} from the registry {@link URL} * * @param registryURL the {@link URL} to connect the registry * @return non-null */ protected ServiceDiscovery createServiceDiscovery(URL registryURL) { return getServiceDiscovery(registryURL .addParameter(INTERFACE_KEY, Servi...
3.68
framework_Page_addDependency
/** * Add a dependency that should be added to the current page. * <p> * These dependencies are always added before the dependencies included by * using the annotations {@link HtmlImport}, {@link JavaScript} and * {@link StyleSheet} during the same request. * <p> * Please note that these dependencies are always ...
3.68
flink_ByteBufUtils_accumulate
/** * Accumulates data from <tt>source</tt> to <tt>target</tt>. If no data has been accumulated yet * and <tt>source</tt> has enough data, <tt>source</tt> will be returned directly. Otherwise, * data will be copied into <tt>target</tt>. If the size of data copied after this operation has * reached <tt>targetAccumul...
3.68
framework_LegacyWindow_getBrowserWindowWidth
/** * Gets the last known width of the browser window in which this UI resides. * * @return the browser window width in pixels * * @deprecated As of 7.0, use the similarly named api in Page instead */ @Deprecated public int getBrowserWindowWidth() { return getPage().getBrowserWindowWidth(); }
3.68
pulsar_MultiTopicsConsumerImpl_handleSubscribeOneTopicError
// handling failure during subscribe new topic, unsubscribe success created partitions private void handleSubscribeOneTopicError(String topicName, Throwable error, CompletableFuture<Void> subscribeFuture) { log.warn("[{}] Failed to ...
3.68
hadoop_Utils_size
/** * Get the size of the serialized Version object. * * @return serialized size of the version object. */ public static int size() { return (Short.SIZE + Short.SIZE) / Byte.SIZE; }
3.68
hbase_FlushNonSloppyStoresFirstPolicy_selectStoresToFlush
/** Returns the stores need to be flushed. */ @Override public Collection<HStore> selectStoresToFlush() { Collection<HStore> specificStoresToFlush = new HashSet<>(); for (HStore store : regularStores) { if (shouldFlush(store) || region.shouldFlushStore(store)) { specificStoresToFlush.add(store); } }...
3.68
hadoop_FederationStateStoreFacade_getApplicationsHomeSubCluster
/** * Get the {@code ApplicationHomeSubCluster} list representing the mapping of * all submitted applications to it's home sub-cluster. * * @return the mapping of all submitted application to it's home sub-cluster * @throws YarnException if the request is invalid/fails */ public List<ApplicationHomeSubCluster> ge...
3.68
hbase_Mutation_setCellVisibility
/** * Sets the visibility expression associated with cells in this Mutation. */ public Mutation setCellVisibility(CellVisibility expression) { this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY, toCellVisibility(expression).toByteArray()); return this; }
3.68
hadoop_TwoColumnLayout_setTableStyles
/** * Sets up a table to be a consistent style. * @param html the HTML to use to render. * @param tableId the ID of the table to set styles on. * @param innerStyles any other styles to add to the table. */ protected void setTableStyles(Page.HTML<__> html, String tableId, String... inn...
3.68
rocketmq-connect_JdbcSourceTask_start
/** * start jdbc task */ @Override public void start(KeyValue props) { // init config config = new JdbcSourceTaskConfig(props); this.dialect = DatabaseDialectLoader.getDatabaseDialect(config); cachedConnectionProvider = connectionProvider(config.getAttempts(), config.getBackoffMs()); log.info("Usi...
3.68
framework_VDebugWindow_getFontSize
/** * Gets the font size currently in use. * * @return */ private int getFontSize() { return fontSize; }
3.68
framework_LegacyApplication_setMainWindow
/** * Sets the main window of this application. Setting window as a main window * of this application also adds the window to this application. * * @param mainWindow * the UI to set as the default window */ public void setMainWindow(LegacyWindow mainWindow) { if (this.mainWindow != null) { ...
3.68
framework_AbstractComponentConnector_isSignificantMove
// mostly copy-pasted code from VScrollTable // TODO refactor main logic to a common class private boolean isSignificantMove(TouchMoveEvent event) { if (longTouchTimer == null) { // no touch start return false; } // Calculate the distance between touch start and the current // touch ...
3.68
hbase_RegionCoprocessorHost_postCheckAndMutate
/** * @param checkAndMutate the CheckAndMutate object * @param result the result returned by the checkAndMutate * @return true or false to return to client if default processing should be bypassed, or null * otherwise * @throws IOException if an error occurred on the coprocessor */ public CheckAnd...
3.68
framework_CssLayout_readDesign
/* * (non-Javadoc) * * @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element, * com.vaadin.ui.declarative.DesignContext) */ @Override public void readDesign(Element design, DesignContext designContext) { // process default attributes super.readDesign(design, designContext); // handle...
3.68
flink_TableDescriptor_comment
/** Define the comment for this table. */ public Builder comment(@Nullable String comment) { this.comment = comment; return this; }
3.68
flink_MurmurHashUtil_hashUnsafeBytesByWords
/** * Hash unsafe bytes, length must be aligned to 4 bytes. * * @param base base unsafe object * @param offset offset for unsafe object * @param lengthInBytes length in bytes * @return hash code */ public static int hashUnsafeBytesByWords(Object base, long offset, int lengthInBytes) { return hashUnsafeBytesB...
3.68
hbase_LruAdaptiveBlockCache_isEnteringRun
/** * Used for the test. */ boolean isEnteringRun() { return this.enteringRun; }
3.68
framework_DefaultConnectionStateHandler_getDialogText
/** * Gets the text to show in the reconnect dialog. * * @param reconnectAttempt * The number of the current reconnection attempt * @return The text to show in the reconnect dialog */ protected String getDialogText(int reconnectAttempt) { return getConfiguration().dialogText.replace("{0}", ...
3.68
hadoop_BlockBlobAppendStream_generateNewerVersionBlockId
/** * Helper method that generates an newer (4.2.0) version blockId. * @return String representing the block ID generated. */ private String generateNewerVersionBlockId(String prefix, long id) { String blockIdSuffix = String.format("%06d", id); byte[] blockIdInBytes = (prefix + blockIdSuffix).getByte...
3.68
hbase_ScannerContext_getSizeScope
/** Returns {@link LimitScope} indicating scope in which the size limit is enforced */ LimitScope getSizeScope() { return this.sizeScope; }
3.68
hbase_MetricsREST_incrementFailedDeleteRequests
/** * @param inc How much to add to failedDeleteCount. */ public void incrementFailedDeleteRequests(final int inc) { source.incrementFailedDeleteRequests(inc); }
3.68
morf_AbstractSqlDialectTest_testAlterBooleanColumn
/** * Test altering a boolean column. */ @Test public void testAlterBooleanColumn() { testAlterTableColumn(TEST_TABLE, AlterationType.ALTER, getColumn(TEST_TABLE, BOOLEAN_FIELD), column(BOOLEAN_FIELD, DataType.BOOLEAN), expectedAlterTableAlterBooleanColumnStatement()); }
3.68
hudi_HoodieJavaRDD_getJavaRDD
/** * @param hoodieData {@link HoodieJavaRDD <T>} instance containing the {@link JavaRDD} of objects. * @param <T> type of object. * @return the a {@link JavaRDD} of objects in type T. */ public static <T> JavaRDD<T> getJavaRDD(HoodieData<T> hoodieData) { return ((HoodieJavaRDD<T>) hoodieData).rddData; }
3.68
hbase_NewVersionBehaviorTracker_isDeleted
/** * This method is not idempotent, we will save some info to judge VERSION_MASKED. * @param cell - current cell to check if deleted by a previously seen delete * @return We don't distinguish DeleteColumn and DeleteFamily. We only return code for column. */ @Override public DeleteResult isDeleted(Cell cell) { lo...
3.68
hbase_LockServiceClient_namespaceLock
/** * LocCreate a new EntityLock object to acquire exclusive lock on a namespace. Clients can not * acquire shared locks on namespace. */ public EntityLock namespaceLock(String namespace, String description, Abortable abort) { LockRequest lockRequest = buildLockRequest(LockType.EXCLUSIVE, namespace, null, null, ...
3.68
hbase_ReplicationSourceWALReader_updateReplicationMarkerEdit
/* * Create @ReplicationMarkerDescriptor with region_server_name, wal_name and offset and set to * cell's value. */ private void updateReplicationMarkerEdit(Entry entry, long offset) { WALEdit edit = entry.getEdit(); // Return early if it is not ReplicationMarker edit. if (!WALEdit.isReplicationMarkerEdit(edit...
3.68
open-banking-gateway_ContextUtil_getAndUpdateContext
/** * Get and update context of current execution in single operation with retry support for optimistic exceptions. */ public <T> void getAndUpdateContext(DelegateExecution execution, Consumer<T> contextUpdater) { @SuppressWarnings("unchecked") T ctx = (T) execution.getVariable(GlobalConst.CONTEXT); conte...
3.68
flink_RocksDBKeyedStateBackend_snapshot
/** * Triggers an asynchronous snapshot of the keyed state backend from RocksDB. This snapshot can * be canceled and is also stopped when the backend is closed through {@link #dispose()}. For * each backend, this method must always be called by the same thread. * * @param checkpointId The Id of the checkpoint. * ...
3.68
hbase_Scan_getRowOffsetPerColumnFamily
/** * Method for retrieving the scan's offset per row per column family (#kvs to be skipped) * @return row offset */ public int getRowOffsetPerColumnFamily() { return this.storeOffset; }
3.68
hbase_MovingAverage_stop
/** * Mark end time of an execution, and return its interval. * @param startTime start time of an execution * @return elapsed time */ protected long stop(long startTime) { return System.nanoTime() - startTime; }
3.68
hbase_AbstractMemStore_maybeCloneWithAllocator
/** * If the segment has a memory allocator the cell is being cloned to this space, and returned; * Otherwise the given cell is returned When a cell's size is too big (bigger than maxAlloc), it * is not allocated on MSLAB. Since the process of flattening to CellChunkMap assumes that all * cells are allocated on MSL...
3.68
hbase_RSGroupInfo_removeTable
/** * Remove a table * @deprecated Since 3.0.0, will be removed in 4.0.0. The rsgroup information will be stored in * the configuration of a table so this will be removed. */ @Deprecated public boolean removeTable(TableName table) { return tables.remove(table); }
3.68
flink_DataSet_output
/** * Emits a DataSet using an {@link OutputFormat}. This method adds a data sink to the program. * Programs may have multiple data sinks. A DataSet may also have multiple consumers (data sinks * or transformations) at the same time. * * @param outputFormat The OutputFormat to process the DataSet. * @return The D...
3.68
dubbo_StringUtils_parseInteger
/** * parse str to Integer(if str is not number or n < 0, then return 0) * * @param str a number str * @return positive integer or zero */ public static int parseInteger(String str) { return isNumber(str) ? Integer.parseInt(str) : 0; }
3.68
hmily_StringUtils_isBlank
/** * Is blank boolean. * * @param cs the cs * @return the boolean */ public static boolean isBlank(final CharSequence cs) { int strLen; if (cs == null || (strLen = cs.length()) == 0) { return true; } for (int i = 0; i < strLen; i++) { if (!Character.isWhitespace(cs.charAt(i))) { ...
3.68