name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_MultiRowRangeFilter_parseFrom
/** * Parse a serialized representation of {@link MultiRowRangeFilter} * @param pbBytes A pb serialized instance * @return An instance of {@link MultiRowRangeFilter} * @throws DeserializationException if an error occurred * @see #toByteArray */ public static MultiRowRangeFilter parseFrom(final byte[] pbBytes) t...
3.68
hbase_HFileBlock_getNextBlockOnDiskSize
/** * @return the on-disk size of the next block (including the header size and any checksums if * present) read by peeking into the next block's header; use as a hint when doing a read * of the next block when scanning or running over a file. */ int getNextBlockOnDiskSize() { return nextBlockOnDi...
3.68
graphhopper_Measurement_writeSummary
/** * Writes a selection of measurement results to a single line in * a file. Each run of the measurement class will append a new line. */ private void writeSummary(String summaryLocation, String propLocation) { logger.info("writing summary to " + summaryLocation); // choose properties that should be in summ...
3.68
hudi_MarkerUtils_writeMarkerTypeToFile
/** * Writes the marker type to the file `MARKERS.type`. * * @param markerType marker type. * @param fileSystem file system to use. * @param markerDir marker directory. */ public static void writeMarkerTypeToFile(MarkerType markerType, FileSystem fileSystem, String markerDir) { Path markerTypeFilePath = new Pa...
3.68
framework_InMemoryDataProvider_filteringBy
/** * Wraps this data provider to create a new data provider that is filtered * by comparing an item property value to the filter value provided in the * query. * <p> * The predicate receives the property value as the first parameter and the * query filter value as the second parameter, and should return * <code...
3.68
flink_FlinkPipelineTranslationUtil_getJobGraph
/** Transmogrifies the given {@link Pipeline} to a {@link JobGraph}. */ public static JobGraph getJobGraph( ClassLoader userClassloader, Pipeline pipeline, Configuration optimizerConfiguration, int defaultParallelism) { FlinkPipelineTranslator pipelineTranslator = getPip...
3.68
hadoop_PlacementConstraint_minCardinality
/** * When placement type is cardinality, the minimum number of containers of the * depending component that a host should have, where containers of this * component can be allocated on. **/ public PlacementConstraint minCardinality(Long minCardinality) { this.minCardinality = minCardinality; return this; }
3.68
hudi_HoodieRepairTool_listFilesFromBasePath
/** * Lists all Hoodie files from the table base path. * * @param context {@link HoodieEngineContext} instance. * @param basePathStr Table base path. * @param expectedLevel Expected level in the directory hierarchy to include the file status. * @param parallelism Parallelism for the file listing. * @re...
3.68
hadoop_MoveStep_getSizeString
/** * Returns human readable move sizes. * * @param size - bytes being moved. * @return String */ @Override public String getSizeString(long size) { return StringUtils.TraditionalBinaryPrefix.long2String(size, "", 1); }
3.68
open-banking-gateway_Xs2aConsentInfo_isEmbeddedPreAuthNeeded
/** * Is the Oauth2 pre-step or authorization required */ public boolean isEmbeddedPreAuthNeeded(Xs2aContext ctx) { return ctx.isEmbeddedPreAuthNeeded(); }
3.68
hudi_CompactionUtil_setAvroSchema
/** * Sets up the avro schema string into the HoodieWriteConfig {@code HoodieWriteConfig} * through reading from the hoodie table metadata. * * @param writeConfig The HoodieWriteConfig */ public static void setAvroSchema(HoodieWriteConfig writeConfig, HoodieTableMetaClient metaClient) throws Exception { TableSch...
3.68
shardingsphere-elasticjob_JobTracingEventBus_post
/** * Post event. * * @param event job event */ public void post(final JobEvent event) { if (isRegistered && !EXECUTOR_SERVICE.isShutdown()) { eventBus.post(event); } }
3.68
flink_OrcShim_defaultShim
/** Default with orc dependent, we should use v2.3.0. */ static OrcShim<VectorizedRowBatch> defaultShim() { return new OrcShimV230(); }
3.68
framework_GridDropTarget_setDropThreshold
/** * Sets the threshold between drop locations from the top and the bottom of * a row in pixels. * <p> * Dropping an element * <ul> * <li>within {@code threshold} pixels from the top of a row results in a * drop event with {@link com.vaadin.shared.ui.grid.DropLocation#ABOVE * DropLocation.ABOVE}</li> * <li>wi...
3.68
flink_ChangelogTruncateHelper_materialized
/** * Handle changelog materialization, potentially {@link #truncate() truncating} the changelog. * * @param upTo exclusive */ public void materialized(SequenceNumber upTo) { materializedUpTo = upTo; truncate(); }
3.68
flink_RemoteStorageScanner_scanMaxSegmentId
/** * Scan the max segment id of segment files for the specific partition and subpartition. The max * segment id can be obtained from a file named by max segment id. * * @param partitionId the partition id. * @param subpartitionId the subpartition id. */ private void scanMaxSegmentId( TieredStoragePartiti...
3.68
hbase_ServerNonceManager_reportOperationFromWal
/** * Reports the operation from WAL during replay. * @param group Nonce group. * @param nonce Nonce. * @param writeTime Entry write time, used to ignore entries that are too old. */ public void reportOperationFromWal(long group, long nonce, long writeTime) { if (nonce == HConstants.NO_NONCE) return; /...
3.68
pulsar_BrokerMonitor_initMessageRow
// Helper method to initialize rows which hold message data. private static void initMessageRow(final Object[] row, final double messageRateIn, final double messageRateOut, final double messageThroughputIn, final double messageThroughputOut) { initRow(row, messageRateIn, messageRateOut, messageRateIn + mess...
3.68
hudi_LSMTimelineWriter_getOrCreateWriterConfig
/** * Get or create a writer config for parquet writer. */ private HoodieWriteConfig getOrCreateWriterConfig() { if (this.writeConfig == null) { this.writeConfig = HoodieWriteConfig.newBuilder() .withProperties(this.config.getProps()) .withPopulateMetaFields(false).build(); } return this.wri...
3.68
graphhopper_ArrayUtil_iota
/** * Creates an IntArrayList filled with the integers 0,1,2,3,...,size-1 */ public static IntArrayList iota(int size) { return range(0, size); }
3.68
hadoop_ClusterMetrics_getTaskTrackerCount
/** * Get the number of active trackers in the cluster. * * @return active tracker count. */ public int getTaskTrackerCount() { return numTrackers; }
3.68
pulsar_WebSocketWebResource_validateSuperUserAccess
/** * Checks whether the user has Pulsar Super-User access to the system. * * @throws RestException * if not authorized */ protected void validateSuperUserAccess() { if (service().getConfig().isAuthenticationEnabled()) { String appId = clientAppId(); if (log.isDebugEnabled()) { ...
3.68
hadoop_CachingGetSpaceUsed_getUsed
/** * @return an estimate of space used in the directory path. */ @Override public long getUsed() throws IOException { return Math.max(used.get(), 0); }
3.68
flink_CompactingHashTable_getMaxPartition
/** @return number of memory segments in the largest partition */ private int getMaxPartition() { int maxPartition = 0; for (InMemoryPartition<T> p1 : this.partitions) { if (p1.getBlockCount() > maxPartition) { maxPartition = p1.getBlockCount(); } } return maxPartition; }
3.68
hbase_ProcedureEvent_wakeInternal
/** * Only to be used by ProcedureScheduler implementations. Reason: To wake up multiple events, * locking sequence is schedLock --> synchronized (event) To wake up an event, both schedLock() * and synchronized(event) are required. The order is schedLock() --> synchronized(event) because * when waking up multiple e...
3.68
hadoop_MountResponse_writeMountList
/** * Response for RPC call {@link MountInterface.MNTPROC#DUMP}. * @param xdr XDR message object * @param xid transaction id * @param mounts mount entries * @return response XDR */ public static XDR writeMountList(XDR xdr, int xid, List<MountEntry> mounts) { RpcAcceptedReply.getAcceptInstance(xid, new VerifierN...
3.68
pulsar_EventLoopUtil_getClientSocketChannelClass
/** * Return a SocketChannel class suitable for the given EventLoopGroup implementation. * * @param eventLoopGroup * @return */ public static Class<? extends SocketChannel> getClientSocketChannelClass(EventLoopGroup eventLoopGroup) { if (eventLoopGroup instanceof IOUringEventLoopGroup) { return IOUring...
3.68
hbase_AggregateImplementation_getAvg
/** * Gives a Pair with first object as Sum and second object as row count, computed for a given * combination of column qualifier and column family in the given row range as defined in the Scan * object. In its current implementation, it takes one column family and one column qualifier (if * provided). In case of ...
3.68
framework_AbstractDateField_getParseErrorMessage
/** * Return the error message that is shown if the user inputted value can't * be parsed into a Date object. If * {@link #handleUnparsableDateString(String)} is overridden and it throws a * custom exception, the message returned by * {@link Exception#getLocalizedMessage()} will be used instead of the value * ret...
3.68
flink_AsyncFunction_timeout
/** * {@link AsyncFunction#asyncInvoke} timeout occurred. By default, the result future is * exceptionally completed with a timeout exception. * * @param input element coming from an upstream task * @param resultFuture to be completed with the result data */ default void timeout(IN input, ResultFuture<OUT> result...
3.68
hbase_ZKWatcher_getMetaReplicaNodes
/** * Get the znodes corresponding to the meta replicas from ZK * @return list of znodes * @throws KeeperException if a ZooKeeper operation fails */ public List<String> getMetaReplicaNodes() throws KeeperException { List<String> childrenOfBaseNode = ZKUtil.listChildrenNoWatch(this, znodePaths.baseZNode); return...
3.68
morf_AbstractSqlDialectTest_testRandom
/** * Tests the random function */ @Test public void testRandom() { String result = testDialect.convertStatementToSQL(select(random()).from(tableRef("NEW1"))); assertEquals("Random script should match expected", "SELECT " + expectedRandomFunction() + " FROM " + tableName("NEW1"), result); }
3.68
flink_SelectByMaxFunction_reduce
/** * Reduce implementation, returns bigger tuple or value1 if both tuples are equal. Comparison * highly depends on the order and amount of fields chosen as indices. All given fields (at * construction time) are checked in the same order as defined (at construction time). If both * tuples are equal in one index, t...
3.68
graphhopper_WaySegmentParser_setWayFilter
/** * @param wayFilter return true for OSM ways that should be considered and false otherwise */ public Builder setWayFilter(Predicate<ReaderWay> wayFilter) { waySegmentParser.wayFilter = wayFilter; return this; }
3.68
dubbo_ReferenceBeanManager_initReferenceBean
/** * NOTE: This method should only call after all dubbo config beans and all property resolvers is loaded. * * @param referenceBean * @throws Exception */ public synchronized void initReferenceBean(ReferenceBean referenceBean) throws Exception { if (referenceBean.getReferenceConfig() != null) { retur...
3.68
hudi_BaseHoodieTableServiceClient_isPreCommitRequired
/** * Some writers use SparkAllowUpdateStrategy and treat replacecommit plan as revocable plan. * In those cases, their ConflictResolutionStrategy implementation should run conflict resolution * even for clustering operations. * * @return boolean */ protected boolean isPreCommitRequired() { return this.config.g...
3.68
flink_ExecutionEnvironment_readFileOfPrimitives
/** * Creates a {@link DataSet} that represents the primitive type produced by reading the given * file in delimited way. This method is similar to {@link #readCsvFile(String)} with single * field, but it produces a DataSet not through {@link org.apache.flink.api.java.tuple.Tuple1}. * * @param filePath The path of...
3.68
hadoop_ActiveAuditManagerS3A_switchToActiveSpan
/** * Switch to a given span. If it is null, use the * unbounded span. * @param span to switch to; may be null * @return the span switched to */ private WrappingAuditSpan switchToActiveSpan(WrappingAuditSpan span) { if (span != null && span.isValidSpan()) { activeSpanMap.setForCurrentThread(span); } else {...
3.68
framework_DefaultEditorEventHandler_findNextEditableColumnIndex
/** * Finds index of the first editable column, starting at the specified * index. * * @param grid * the current grid, not null. * @param startingWith * start with this column. Index into the * {@link Grid#getVisibleColumns()}. * @return the index of the nearest visible column;...
3.68
hbase_HStoreFile_getPreadScanner
/** * Get a scanner which uses pread. * <p> * Must be called after initReader. */ public StoreFileScanner getPreadScanner(boolean cacheBlocks, long readPt, long scannerOrder, boolean canOptimizeForNonNullColumn) { return getReader().getStoreFileScanner(cacheBlocks, true, false, readPt, scannerOrder, canOpti...
3.68
hadoop_Sets_newConcurrentHashSet
/** * Creates a thread-safe set backed by a hash map. The set is backed by a * {@link ConcurrentHashMap} instance, and thus carries the same concurrency * guarantees. * * <p>Unlike {@code HashSet}, this class does NOT allow {@code null} to be * used as an element. The set is serializable. * * @param <E> Generic...
3.68
framework_Form_getErrorMessage
/** * The error message of a Form is the error of the first field with a * non-empty error. * * Empty error messages of the contained fields are skipped, because an * empty error indicator would be confusing to the user, especially if there * are errors that have something to display. This is also the reason why ...
3.68
dubbo_FileCacheStoreFactory_getFile
/** * Get a file object for the given name * * @param name the file name * @return a file object */ private static FileCacheStore getFile(String name, boolean enableFileCache) { if (!enableFileCache) { return FileCacheStore.Empty.getInstance(name); } try { FileCacheStore.Builder builde...
3.68
morf_DataSetHomology_convertToUppercase
/** * Converts each string from the source collection to uppercase in a new collection. * * @param source the source collection * @return a new collection containing only uppercase strings */ private Set<String> convertToUppercase(final Collection<String> source) { return source.stream().map(String::toUpperCase)...
3.68
zxing_WhiteRectangleDetector_containsBlackPoint
/** * Determines whether a segment contains a black point * * @param a min value of the scanned coordinate * @param b max value of the scanned coordinate * @param fixed value of fixed coordinate * @param horizontal set to true if scan must be horizontal, false if vertical * @return true if...
3.68
morf_ChangelogBuilder_withOutputTo
/** * Set the {@link PrintWriter} target for this changelog. Default is the * console. * * @param outputStream The {@link PrintWriter} to output to. * @return This builder for chaining */ public ChangelogBuilder withOutputTo(PrintWriter outputStream) { this.outputStream = outputStream; return this; }
3.68
hibernate-validator_ValueExtractorResolver_getMaximallySpecificValueExtractorForAllContainerElements
/** * Used to determine if the passed runtime type is a container and if so return a corresponding maximally specific * value extractor. * <p> * Obviously, it only works if there's only one value extractor corresponding to the runtime type as we don't * precise any type parameter. * <p> * There is a special case...
3.68
hbase_AsyncTable_existsAll
/** * A simple version for batch exists. It will fail if there are any failures and you will get the * whole result boolean list at once if the operation is succeeded. * @param gets the Gets * @return A {@link CompletableFuture} that wrapper the result boolean list. */ default CompletableFuture<List<Boolean>> exis...
3.68
hbase_KeyValueUtil_ensureKeyValue
/*************** misc **********************************/ /** * @return <code>cell</code> if it is an object of class {@link KeyValue} else we will return a * new {@link KeyValue} instance made from <code>cell</code> Note: Even if the cell is an * object of any of the subclass of {@link KeyValue}, we...
3.68
zxing_Detector_getFirstDifferent
/** * Gets the coordinate of the first point with a different color in the given direction */ private Point getFirstDifferent(Point init, boolean color, int dx, int dy) { int x = init.getX() + dx; int y = init.getY() + dy; while (isValid(x, y) && image.get(x, y) == color) { x += dx; y += dy; } x -...
3.68
hadoop_AMRMClientAsyncImpl_addContainerRequest
/** * Request containers for resources before calling <code>allocate</code> * @param req Resource request */ public void addContainerRequest(T req) { client.addContainerRequest(req); }
3.68
morf_NamedParameterPreparedStatement_parse
/** * Parses a SQL query with named parameters. The parameter-index mappings are extracted * and stored in a map, and the parsed query with parameter placeholders is returned. * * @param query The SQL query to parse, which may contain named parameters. * @return The parsed SQL query with named parameters replaced ...
3.68
morf_SchemaHomology_checkColumn
/** * @param tableName The table which contains the columns. Can be null, in which case the errors don't contain the table name. * @param column1 First column to compare. * @param column2 Second column to compare. */ private void checkColumn(String tableName, Column column1, Column column2) { matches("Column name...
3.68
flink_Configuration_setInteger
/** * Adds the given value to the configuration object. The main key of the config option will be * used to map the value. * * @param key the option specifying the key to be added * @param value the value of the key/value pair to be added */ @PublicEvolving public void setInteger(ConfigOption<Integer> key, int va...
3.68
hbase_BaseLoadBalancer_randomAssignment
/** * Used to assign a single region to a random server. */ private ServerName randomAssignment(BalancerClusterState cluster, RegionInfo regionInfo, List<ServerName> servers) { int numServers = servers.size(); // servers is not null, numServers > 1 ServerName sn = null; final int maxIterations = numServers * ...
3.68
flink_VertexThreadInfoTrackerBuilder_setDelayBetweenSamples
/** * Sets {@code delayBetweenSamples}. * * @param delayBetweenSamples Delay between individual samples per task. * @return Builder. */ public VertexThreadInfoTrackerBuilder setDelayBetweenSamples(Duration delayBetweenSamples) { this.delayBetweenSamples = delayBetweenSamples; return this; }
3.68
pulsar_OpenIDProviderMetadataCache_getOpenIDProviderMetadataForKubernetesApiServer
/** * Retrieve the OpenID Provider Metadata for the Kubernetes API server. This method is used instead of * {@link #getOpenIDProviderMetadataForIssuer(String)} because different validations are done. The Kubernetes * API server does not technically implement the complete OIDC spec for discovery, but it does implemen...
3.68
framework_VFilterSelect_getMainWidth
/** * Get the width of the select in pixels where the text area and icon has * been included. * * @return The width in pixels */ private int getMainWidth() { return getOffsetWidth(); }
3.68
hbase_RowMutations_of
/** * Create a {@link RowMutations} with the specified mutations. * @param mutations the mutations to send * @throws IOException if any row in mutations is different to another */ public static RowMutations of(List<? extends Mutation> mutations) throws IOException { if (CollectionUtils.isEmpty(mutations)) { t...
3.68
hbase_HRegion_disableInterrupts
/** * If a handler thread is eligible for interrupt, make it ineligible. Should be paired with * {{@link #enableInterrupts()}. */ void disableInterrupts() { regionLockHolders.computeIfPresent(Thread.currentThread(), (t, b) -> false); }
3.68
flink_DefaultExecutionGraphFactory_tryRestoreExecutionGraphFromSavepoint
/** * Tries to restore the given {@link ExecutionGraph} from the provided {@link * SavepointRestoreSettings}, iff checkpointing is enabled. * * @param executionGraphToRestore {@link ExecutionGraph} which is supposed to be restored * @param savepointRestoreSettings {@link SavepointRestoreSettings} containing inform...
3.68
flink_FutureUtils_completeDelayed
/** * Asynchronously completes the future after a certain delay. * * @param future The future to complete. * @param success The element to complete the future with. * @param delay The delay after which the future should be completed. */ public static <T> void completeDelayed(CompletableFuture<T> future, T success...
3.68
hudi_HoodieLogFileReader_getFSDataInputStream
/** * Fetch the right {@link FSDataInputStream} to be used by wrapping with required input streams. * @param fs instance of {@link FileSystem} in use. * @param bufferSize buffer size to be used. * @return the right {@link FSDataInputStream} as required. */ private static FSDataInputStream getFSDataInputStream(File...
3.68
morf_DataValueLookupBuilderImpl_getAndConvertByIndex
/** * Fetches the value at the specified index, converting it to the target * type using the associated {@link ValueConverter} to the target type. * * @param <STORED> The type actually stored in the internal array. * @param <RETURNED> The type being returned by the API call. * @param i The index. * @param mapper...
3.68
flink_CoGroupedStreams_trigger
/** Sets the {@code Trigger} that should be used to trigger window emission. */ @PublicEvolving public WithWindow<T1, T2, KEY, W> trigger( Trigger<? super TaggedUnion<T1, T2>, ? super W> newTrigger) { return new WithWindow<>( input1, input2, keySelector1, keyS...
3.68
hbase_ZKWatcher_getMetaReplicaNodesAndWatchChildren
/** * Same as {@link #getMetaReplicaNodes()} except that this also registers a watcher on base znode * for subsequent CREATE/DELETE operations on child nodes. */ public List<String> getMetaReplicaNodesAndWatchChildren() throws KeeperException { List<String> childrenOfBaseNode = ZKUtil.listChildrenAndWatchForNe...
3.68
flink_HiveParserCalcitePlanner_convertNullLiteral
// flink doesn't support type NULL, so we need to convert such literals private RexNode convertNullLiteral(RexNode rexNode) { if (rexNode instanceof RexLiteral) { RexLiteral literal = (RexLiteral) rexNode; if (literal.isNull() && literal.getTypeName() == SqlTypeName.NULL) { return cluste...
3.68
hmily_CommonAssembler_assembleHmilyColumnSegment
/** * Assemble hmily column segment. * * @param column column * @return hmily column segment */ public static HmilyColumnSegment assembleHmilyColumnSegment(final ColumnSegment column) { HmilyIdentifierValue hmilyIdentifierValue = new HmilyIdentifierValue(column.getIdentifier().getValue()); HmilyColumnSegme...
3.68
dubbo_ReferenceConfig_getServices
/** * Get a string presenting the service names that the Dubbo interface subscribed. * If it is a multiple-values, the content will be a comma-delimited String. * * @return non-null * @see RegistryConstants#SUBSCRIBED_SERVICE_NAMES_KEY * @since 2.7.8 */ @Deprecated @Parameter(key = SUBSCRIBED_SERVICE_NAMES_KEY) ...
3.68
hbase_CellFlatMap_find
/** * Binary search for a given key in between given boundaries of the array. Positive returned * numbers mean the index. Negative returned numbers means the key not found. The absolute value * of the output is the possible insert index for the searched key In twos-complement, (-1 * * insertion point)-1 is the bitw...
3.68
framework_ComponentDetail_getTooltipInfo
/** * Returns a TooltipInfo associated with Component. If element is given, * returns an additional TooltipInfo. * * @param key * @return the tooltipInfo */ public TooltipInfo getTooltipInfo(Object key) { if (key == null) { return tooltipInfo; } else { if (additionalTooltips != null) { ...
3.68
framework_DragSourceExtensionConnector_fixDragImageTransformForSafari
/** * Fixes missing drag image on Safari when there is * {@code transform: translate(x,y)} CSS used on the parent DOM for the * dragged element. Safari apparently doesn't take those into account, and * creates the drag image of the element's location without all the * transforms. * <p> * This is required for e.g...
3.68
hudi_HoodieBackedTableMetadataWriter_update
/** * Update from {@code HoodieRollbackMetadata}. * * @param rollbackMetadata {@code HoodieRollbackMetadata} * @param instantTime Timestamp at which the rollback was performed */ @Override public void update(HoodieRollbackMetadata rollbackMetadata, String instantTime) { if (initialized && metadata != null) ...
3.68
flink_SSLUtils_createSSLServerSocketFactory
/** * Creates a factory for SSL Server Sockets from the given configuration. SSL Server Sockets are * always part of internal communication. */ public static ServerSocketFactory createSSLServerSocketFactory(Configuration config) throws Exception { SSLContext sslContext = createInternalSSLContext(config, ...
3.68
hbase_ColumnRangeFilter_isMinColumnInclusive
/** Returns if min column range is inclusive. */ public boolean isMinColumnInclusive() { return minColumnInclusive; }
3.68
dubbo_RpcServiceContext_getParameterTypes
/** * get parameter types. * * @serial */ @Override public Class<?>[] getParameterTypes() { return parameterTypes; }
3.68
hudi_HoodieGauge_setValue
/** * Set the metric to a new value. */ public void setValue(T value) { this.value = value; }
3.68
hbase_FileArchiverNotifierImpl_getSnapshotSizeFromResult
/** * Extracts the size component from a serialized {@link SpaceQuotaSnapshot} protobuf. * @param r A Result containing one cell with a SpaceQuotaSnapshot protobuf * @return The size in bytes of the snapshot. */ long getSnapshotSizeFromResult(Result r) throws InvalidProtocolBufferException { // Per javadoc, Resul...
3.68
flink_Tuple2_setFields
/** * Sets new values to all fields of the tuple. * * @param f0 The value for field 0 * @param f1 The value for field 1 */ public void setFields(T0 f0, T1 f1) { this.f0 = f0; this.f1 = f1; }
3.68
cron-utils_FieldConstraintsBuilder_addLSupport
/** * Adds L support. * * @return same FieldConstraintsBuilder instance */ public FieldConstraintsBuilder addLSupport() { specialChars.add(SpecialChar.L); return this; }
3.68
hadoop_AzureBlobFileSystem_statIncrement
/** * Increment of an Abfs statistic. * * @param statistic AbfsStatistic that needs increment. */ private void statIncrement(AbfsStatistic statistic) { incrementStatistic(statistic); }
3.68
hadoop_EntityRowKey_getRowKeyAsString
/** * Constructs a row key for the entity table as follows: * <p> * {@code userName!clusterId!flowName!flowRunId!AppId! * entityType!entityIdPrefix!entityId}. * </p> * @return String representation of row key. */ public String getRowKeyAsString() { return entityRowKeyConverter.encodeAsString(this); }
3.68
hadoop_ConnectionContext_close
/** * Close a connection. Only idle connections can be closed since * the RPC proxy would be shut down immediately. * * @param force whether the connection should be closed anyway. */ public synchronized void close(boolean force) { if (!force && this.numThreads > 0) { // this is an erroneous case, but we hav...
3.68
hbase_RowModel_addCell
/** * Adds a cell to the list of cells for this row * @param cell the cell */ public void addCell(CellModel cell) { cells.add(cell); }
3.68
pulsar_HierarchicalLedgerUtils_ledgerListToSet
/** * Get all ledger ids in the given zk path. * * @param ledgerNodes * List of ledgers in the given path * example:- {L1652, L1653, L1650} * @param path * The zookeeper path of the ledger ids. The path should start with {@ledgerRootPath} * example (with ledgerRootPath = /led...
3.68
dubbo_UrlUtils_serializationOrDefault
/** * Get the serialization or default serialization * * @param url url * @return {@link String} */ public static String serializationOrDefault(URL url) { //noinspection OptionalGetWithoutIsPresent Optional<String> serializations = allSerializations(url).stream().findFirst(); return serializations.orEl...
3.68
flink_ZooKeeperStateHandleStore_releaseAll
/** * Releases all lock nodes of this ZooKeeperStateHandleStore. * * @throws Exception if the delete operation of a lock file fails */ @Override public void releaseAll() throws Exception { Collection<String> children = getAllHandles(); Exception exception = null; for (String child : children) { ...
3.68
flink_ClassLoadingUtils_runWithContextClassLoader
/** * Runs the given supplier in a {@link TemporaryClassLoaderContext} based on the given * classloader. * * @param supplier supplier to run * @param contextClassLoader class loader that should be set as the context class loader */ public static <T, E extends Throwable> T runWithContextClassLoader( Suppli...
3.68
pulsar_BinaryProtoLookupService_getPartitionedTopicMetadata
/** * calls broker binaryProto-lookup api to get metadata of partitioned-topic. * */ public CompletableFuture<PartitionedTopicMetadata> getPartitionedTopicMetadata(TopicName topicName) { final MutableObject<CompletableFuture> newFutureCreated = new MutableObject<>(); try { return partitionedMetadataI...
3.68
dubbo_ApplicationModel_getApplication
/** * @deprecated Replace to {@link ApplicationModel#getApplicationName()} */ @Deprecated public static String getApplication() { return getName(); }
3.68
framework_DefaultSQLGenerator_generateDeleteQuery
/* * (non-Javadoc) * * @see com.vaadin.addon.sqlcontainer.query.generator.SQLGenerator# * generateDeleteQuery(java.lang.String, * com.vaadin.addon.sqlcontainer.RowItem) */ @Override public StatementHelper generateDeleteQuery(String tableName, List<String> primaryKeyColumns, String versionColumn, R...
3.68
framework_ServerRpcQueue_setConnection
/** * Sets the application connection this instance is connected to. Called * internally by the framework. * * @param connection * the application connection this instance is connected to */ public void setConnection(ApplicationConnection connection) { this.connection = connection; }
3.68
hadoop_VolumeFailureInfo_getFailureDate
/** * Returns date/time of failure * * @return date/time of failure in milliseconds since epoch */ public long getFailureDate() { return this.failureDate; }
3.68
hadoop_OBSObjectBucketUtils_createEmptyObject
// Used to create an empty file that represents an empty directory private static void createEmptyObject(final OBSFileSystem owner, final String objectName) throws ObsException, IOException { for (int retryTime = 1; retryTime < OBSCommonUtils.MAX_RETRY_TIME; retryTime++) { try { innerCreateEmp...
3.68
hudi_InternalSchemaCache_getInternalSchemaAndAvroSchemaForClusteringAndCompaction
/** * Get internalSchema and avroSchema for compaction/cluster operation. * * @param metaClient current hoodie metaClient * @param compactionAndClusteringInstant first instant before current compaction/cluster instant * @return (internalSchemaStrOpt, avroSchemaStrOpt) a pair of InternalSchema/avroSchema */ public...
3.68
rocketmq-connect_ColumnDefinition_classNameForType
/** * Returns the fully-qualified name of the Java class whose instances are manufactured if the * method {@link java.sql.ResultSet#getObject(int)} is called to retrieve a value from the column. * {@link java.sql.ResultSet#getObject(int)} may return a subclass of the class returned by this * method. * * @return t...
3.68
morf_AbstractSqlDialectTest_testSelectGroupForUpdate
/** * Tests that we can't combine GROUP BY with FOR UPDATE */ @Test(expected = IllegalArgumentException.class) public void testSelectGroupForUpdate() { SelectStatement stmt = new SelectStatement().from(new TableReference(TEST_TABLE)).groupBy(field("x")).forUpdate(); testDialect.convertStatementToSQL(stmt); }
3.68
hbase_MemorySizeUtil_getGlobalMemStoreHeapLowerMark
/** * Retrieve configured size for global memstore lower water mark as fraction of global memstore * size. */ public static float getGlobalMemStoreHeapLowerMark(final Configuration conf, boolean honorOldConfig) { String lowMarkPercentStr = conf.get(MEMSTORE_SIZE_LOWER_LIMIT_KEY); if (lowMarkPercentStr != null)...
3.68
flink_Costs_addCosts
/** * Adds the given costs to these costs. If for one of the different cost components (network, * disk), the costs are unknown, the resulting costs will be unknown. * * @param other The costs to add. */ public void addCosts(Costs other) { // ---------- quantifiable costs ---------- if (this.networkCost ==...
3.68
hmily_RepositoryPathUtils_getFullFileName
/** * Gets full file name. * * @param filePath the file path * @param id the id * @return the full file name */ public static String getFullFileName(final String filePath, final String id) { return String.format("%s/%s", filePath, id); }
3.68