name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hudi_Option_toJavaOptional
/** * Convert to java Optional. */ public Optional<T> toJavaOptional() { return Optional.ofNullable(val); }
3.68
hadoop_InterruptEscalator_isSignalAlreadyReceived
/** * Flag set if a signal has been received. * @return true if there has been one interrupt already. */ public boolean isSignalAlreadyReceived() { return signalAlreadyReceived.get(); }
3.68
hbase_ProcedureCoordinator_startProcedure
/** * Kick off the named procedure Currently only one procedure with the same type and name is * allowed to run at a time. * @param procName name of the procedure to start * @param procArgs arguments for the procedure * @param expectedMembers expected members to start * @return handle to the running...
3.68
morf_TableReference_field
/** * @param fieldName the name of the field * @return reference to a field on this table. */ public FieldReference field(String fieldName) { return FieldReference.field(this, fieldName).build(); }
3.68
flink_FileSystemSafetyNet_closeSafetyNetAndGuardedResourcesForThread
/** * Closes the safety net for a thread. This closes all remaining unclosed streams that were * opened by safety-net-guarded file systems. After this method was called, no streams can be * opened any more from any FileSystem instance that was obtained while the thread was guarded * by the safety net. * * <p>This...
3.68
zilla_HttpServerFactory_encodeLiteral
// TODO dynamic table, Huffman, never indexed private void encodeLiteral( HpackLiteralHeaderFieldFW.Builder builder, HpackContext hpackContext, DirectBuffer nameBuffer, DirectBuffer valueBuffer) { builder.type(WITHOUT_INDEXING); final int nameIndex = hpackContext.index(nameBuffer); if (nameI...
3.68
hbase_HBaseTestingUtility_expireRegionServerSession
/** * Expire a region server's session * @param index which RS */ public void expireRegionServerSession(int index) throws Exception { HRegionServer rs = getMiniHBaseCluster().getRegionServer(index); expireSession(rs.getZooKeeper(), false); decrementMinRegionServerCount(); }
3.68
morf_SelectStatement_getSetOperators
/** * @return the list of set operators to be applied on this select statement. */ public List<SetOperator> getSetOperators() { return setOperators; }
3.68
framework_SimpleTree_addDoubleClickHandler
/** * {@inheritDoc} Events are not fired when double clicking child widgets. */ @Override public HandlerRegistration addDoubleClickHandler( DoubleClickHandler handler) { if (textDoubleClickHandlerManager == null) { textDoubleClickHandlerManager = new HandlerManager(this); addDomHandler(eve...
3.68
flink_HiveParserBaseSemanticAnalyzer_convert
/* This method returns the flip big-endian representation of value */ public static ImmutableBitSet convert(int value, int length) { BitSet bits = new BitSet(); for (int index = length - 1; index >= 0; index--) { if (value % 2 != 0) { bits.set(index); } value = value >>> 1; ...
3.68
pulsar_SaslRoleToken_isExpired
/** * Returns if the token has expired. * * @return if the token has expired. */ public boolean isExpired() { return getExpires() != -1 && System.currentTimeMillis() > getExpires(); }
3.68
morf_ConcatenatedField_getConcatenationFields
/** * Get the fields to be concatenated * * @return the fields to be concatenated */ public List<AliasedField> getConcatenationFields() { return fields; }
3.68
hadoop_RegistryPathUtils_encodeYarnID
/** * Perform whatever transforms are needed to get a YARN ID into * a DNS-compatible name * @param yarnId ID as string of YARN application, instance or container * @return a string suitable for use in registry paths. */ public static String encodeYarnID(String yarnId) { return yarnId.replace("container", "ctr")...
3.68
flink_CheckpointProperties_forSavepoint
/** * Creates the checkpoint properties for a (manually triggered) savepoint. * * <p>Savepoints are not queued due to time trigger limits. They have to be garbage collected * manually. * * @return Checkpoint properties for a (manually triggered) savepoint. */ public static CheckpointProperties forSavepoint( ...
3.68
hudi_BufferedRandomAccessFile_fillBuffer
/** * read ahead file contents to buffer. * @return number of bytes filled * @throws IOException */ private int fillBuffer() throws IOException { int cnt = 0; int bytesToRead = this.capacity; // blocking read, until buffer is filled or EOF reached while (bytesToRead > 0) { int n = super.read(this.dataBu...
3.68
hadoop_MkdirOperation_execute
/** * * Make the given path and all non-existent parents into * directories. * @return true if a directory was created or already existed * @throws FileAlreadyExistsException there is a file at the path specified * @throws IOException other IO problems */ @Override @Retries.RetryTranslated public Boolean execute...
3.68
hadoop_BlockMovementAttemptFinished_getStatus
/** * @return block movement status code. */ public BlockMovementStatus getStatus() { return status; }
3.68
hbase_BoundedRecoveredHFilesOutputSink_writeRemainingEntryBuffers
/** * Write out the remaining RegionEntryBuffers and close the writers. * @return true when there is no error. */ private boolean writeRemainingEntryBuffers() throws IOException { for (EntryBuffers.RegionEntryBuffer buffer : entryBuffers.buffers.values()) { closeCompletionService.submit(() -> { append(bu...
3.68
hbase_RecoverableZooKeeper_connect
/** * Creates a new connection to ZooKeeper, pulling settings and ensemble config from the specified * configuration object using methods from {@link ZKConfig}. Sets the connection status monitoring * watcher to the specified watcher. * @param conf configuration to pull ensemble and other settings from * @pa...
3.68
hbase_User_getToken
/** * Returns the Token of the specified kind associated with this user, or null if the Token is not * present. * @param kind the kind of token * @param service service on which the token is supposed to be used * @return the token of the specified kind. */ public Token<?> getToken(String kind, String service) ...
3.68
flink_DataSet_reduceGroup
/** * Applies a GroupReduce transformation on a non-grouped {@link DataSet}. * * <p>The transformation calls a {@link * org.apache.flink.api.common.functions.RichGroupReduceFunction} once with the full DataSet. * The GroupReduceFunction can iterate over all elements of the DataSet and emit any number of * output ...
3.68
flink_TaskSlot_markInactive
/** * Mark the slot as inactive/allocated. A slot can only be marked as inactive/allocated if it's * in state allocated or active. * * @return True if the new state of the slot is allocated; otherwise false */ public boolean markInactive() { if (TaskSlotState.ACTIVE == state || TaskSlotState.ALLOCATED == state...
3.68
hadoop_StoreContext_getBucketLocation
/** * Get the location of the bucket. * @return the bucket location. * @throws IOException failure. */ public String getBucketLocation() throws IOException { return contextAccessors.getBucketLocation(); }
3.68
streampipes_OpcUaTypes_getType
/** * Maps OPC UA data types to internal StreamPipes data types * * @param o data type id as UInteger * @return StreamPipes internal data type */ public static Datatypes getType(UInteger o) { if (UInteger.valueOf(4).equals(o) | UInteger.valueOf(5).equals(o) | UInteger.valueOf(6).equals(o) | UIn...
3.68
hbase_TableDescriptorBuilder_getDurability
/** * Returns the durability setting for the table. * @return durability setting for the table. */ @Override public Durability getDurability() { return getOrDefault(DURABILITY_KEY, Durability::valueOf, DEFAULT_DURABLITY); }
3.68
hbase_FilterBase_getNextCellHint
/** * Filters that are not sure which key must be next seeked to, can inherit this implementation * that, by default, returns a null Cell. {@inheritDoc} */ @Override public Cell getNextCellHint(Cell currentCell) throws IOException { return null; }
3.68
graphhopper_MaxAxleLoad_create
/** * Currently enables to store 0.5 to max=0.5*2⁷ tons and infinity. If a value is between the maximum and infinity * it is assumed to use the maximum value. To save bits it might make more sense to store only a few values like * it was done with the MappedDecimalEncodedValue still handling (or rounding) of unknown...
3.68
hadoop_BoundedResourcePool_numCreated
/** * Number of items created so far. Mostly for testing purposes. * @return the count. */ public int numCreated() { synchronized (createdItems) { return createdItems.size(); } }
3.68
hbase_HRegionFileSystem_commitDaughterRegion
/** * Commit a daughter region, moving it from the split temporary directory to the proper location * in the filesystem. * @param regionInfo daughter {@link org.apache.hadoop.hbase.client.RegionInfo} */ public Path commitDaughterRegion(final RegionInfo regionInfo, List<Path> allRegionFiles, MasterProcedureEnv env...
3.68
hadoop_JsonSerialization_fromInstance
/** * clone by converting to JSON and back again. * This is much less efficient than any Java clone process. * @param instance instance to duplicate * @return a new instance * @throws IOException IO problems. */ public T fromInstance(T instance) throws IOException { return fromJson(toJson(instance)); }
3.68
flink_TestcontainersSettings_logger
/** * Sets the {@code baseImage} and returns a reference to this Builder enabling method * chaining. * * @param logger The {@code logger} to set. * @return A reference to this Builder. */ public Builder logger(Logger logger) { this.logger = logger; return this; }
3.68
framework_ApplicationConnection_start
/** * Starts this application. Don't call this method directly - it's called by * {@link ApplicationConfiguration#startNextApplication()}, which should be * called once this application has started (first response received) or * failed to start. This ensures that the applications are started in order, * to avoid s...
3.68
framework_HierarchicalDataCommunicator_doCollapse
/** * Collapses the given item and removes its sub-hierarchy. Calling this * method will have no effect if the row is already collapsed. The index is * provided by the client-side or calculated from a full data request. * {@code syncAndRefresh} indicates whether the changes should be * synchronised to the client a...
3.68
pulsar_OwnedBundle_isActive
/** * Access method to the namespace state to check whether the namespace is active or not. * * @return boolean value indicate that the namespace is active or not. */ public boolean isActive() { return IS_ACTIVE_UPDATER.get(this) == TRUE; }
3.68
dubbo_RpcServiceContext_getInvoker
/** * @deprecated Replace to getUrl() */ @Override @Deprecated public Invoker<?> getInvoker() { return invoker; }
3.68
flink_MemorySegmentFactory_allocateOffHeapUnsafeMemory
/** * Allocates an off-heap unsafe memory and creates a new memory segment to represent that * memory. * * <p>Creation of this segment schedules its memory freeing operation when its java wrapping * object is about to be garbage collected, similar to {@link * java.nio.DirectByteBuffer#DirectByteBuffer(int)}. The ...
3.68
hbase_KeyValue_compareWithoutRow
/** * Compare columnFamily, qualifier, timestamp, and key type (everything except the row). This * method is used both in the normal comparator and the "same-prefix" comparator. Note that we * are assuming that row portions of both KVs have already been parsed and found identical, and * we don't validate that assum...
3.68
hadoop_SchedulingResponse_getSchedulingRequest
/** * Get Scheduling Request. * @return Scheduling Request. */ public SchedulingRequest getSchedulingRequest() { return this.schedulingRequest; }
3.68
morf_AbstractSqlDialectTest_testAverage
/** * Tests an average statement */ @Test public void testAverage() { final TableReference tableOne = tableRef("TableOne"); SelectStatement testStatement = select(average(field("name")), averageDistinct(field("name"))).from(tableOne); assertEquals("SELECT AVG(name), AVG(DISTINCT name) FROM " + tableName("Table...
3.68
druid_PropertiesUtils_loadProperties
/** * Load properties from the given file into Properties. */ public static Properties loadProperties(String file) { Properties properties = new Properties(); if (file == null) { return properties; } InputStream is = null; try { LOG.debug("Trying to load " + file + " from FileSyst...
3.68
hadoop_HSAuditLogger_add
/** * Appends the key-val pair to the passed builder in the following format * <pair-delim>key=value */ static void add(Keys key, String value, StringBuilder b) { b.append(AuditConstants.PAIR_SEPARATOR).append(key.name()) .append(AuditConstants.KEY_VAL_SEPARATOR).append(value); }
3.68
hadoop_AbfsInputStreamStatisticsImpl_remoteBytesRead
/** * Total bytes read remotely after nothing was read from readAhead buffer. * * @param bytes the bytes to be incremented. */ @Override public void remoteBytesRead(long bytes) { ioStatisticsStore.incrementCounter(StreamStatisticNames.REMOTE_BYTES_READ, bytes); }
3.68
hmily_HmilyLockRetryHandler_sleep
/** * Sleep. * @param e the e * @throws LockWaitTimeoutException the lock wait timeout exception */ public void sleep(final Exception e) { if (--lockRetryTimes < 0) { log.error("Global lock wait timeout"); throw new LockWaitTimeoutException("Global lock wait timeout", e); } try { ...
3.68
hbase_ProcedureStoreTracker_setDeletedIfModified
/** * Set the given bit for the procId to delete if it was modified before. * <p/> * This method is used to test whether a procedure wal file can be safely deleted, as if all the * procedures in the given procedure wal file has been modified in the new procedure wal files, * then we can delete it. */ public void ...
3.68
flink_Schema_column
/** * Declares a physical column that is appended to this schema. * * <p>See {@link #column(String, AbstractDataType)} for a detailed explanation. * * <p>This method uses a type string that can be easily persisted in a durable catalog. * * @param columnName column name * @param serializableTypeString data type ...
3.68
hadoop_MutableGaugeFloat_toString
/** * @return the value of the metric */ public String toString() { return value.toString(); }
3.68
hbase_WALSplitUtil_getCompletedRecoveredEditsFilePath
/** * Get the completed recovered edits file path, renaming it to be by last edit in the file from * its first edit. Then we could use the name to skip recovered edits when doing * HRegion#replayRecoveredEditsIfAny(Map, CancelableProgressable, MonitoredTask). * @return dstPath take file's last edit log seq num as t...
3.68
hbase_ProcedureExecutor_setFailureResultForNonce
/** * If the failure failed before submitting it, we may want to give back the same error to the * requests with the same nonceKey. * @param nonceKey A unique identifier for this operation from the client or process * @param procName name of the procedure, used to inform the user * @param procOwner name of the o...
3.68
pulsar_FunctionMetaDataManager_getFunctionMetaData
/** * Get the function metadata for a function. * @param tenant the tenant the function belongs to * @param namespace the namespace the function belongs to * @param functionName the function name * @return FunctionMetaData that contains the function metadata */ public synchronized FunctionMetaData getFunctionMeta...
3.68
framework_AbsoluteLayout_setBottom
/** * Sets the 'bottom' attribute; distance from the bottom of the * component to the bottom edge of the layout. * * @param bottomValue * The value of the 'bottom' attribute * @param bottomUnits * The unit of the 'bottom' attribute. See UNIT_SYMBOLS for a * description of the av...
3.68
framework_SharedUtil_dashSeparatedToCamelCase
/** * Converts a dash ("-") separated string into camelCase. * <p> * Examples: * <p> * {@literal foo} becomes {@literal foo} {@literal foo-bar} becomes * {@literal fooBar} {@literal foo--bar} becomes {@literal fooBar} * * @since 7.5 * @param dashSeparated * The dash separated string to convert * @...
3.68
shardingsphere-elasticjob_JobFacade_registerJobBegin
/** * Register job begin. * * @param shardingContexts sharding contexts */ public void registerJobBegin(final ShardingContexts shardingContexts) { executionService.registerJobBegin(shardingContexts); }
3.68
streampipes_BoilerpipeHTMLParser_toTextDocument
/** * Returns a {@link TextDocument} containing the extracted {@link TextBlock} s. NOTE: Only call * this after {@link #parse(org.xml.sax.InputSource)}. * * @return The {@link TextDocument} */ public TextDocument toTextDocument() { return contentHandler.toTextDocument(); }
3.68
flink_ScriptProcessBuilder_addJobConfToEnvironment
/** * addJobConfToEnvironment is mostly shamelessly copied from hadoop streaming. Added additional * check on environment variable length */ void addJobConfToEnvironment(Configuration conf, Map<String, String> env) { for (Map.Entry<String, String> en : conf) { String name = en.getKey(); if (!blac...
3.68
hudi_SerializationUtils_serialize
/** * <p> * Serializes an {@code Object} to a byte array for storage/serialization. * </p> * * @param obj the object to serialize to bytes * @return a byte[] with the converted Serializable * @throws IOException if the serialization fails */ public static byte[] serialize(final Object obj) throws IOException { ...
3.68
hadoop_Event_getReplication
/** * Replication is zero if the CreateEvent iNodeType is directory or symlink. */ public int getReplication() { return replication; }
3.68
pulsar_ClientConfiguration_getListenerThreads
/** * @return the number of threads to use for message listeners */ public int getListenerThreads() { return confData.getNumListenerThreads(); }
3.68
flink_TableFactoryUtil_findAndCreateTableSink
/** * Creates a {@link TableSink} from a {@link CatalogTable}. * * <p>It considers {@link Catalog#getFactory()} if provided. */ @SuppressWarnings("unchecked") public static <T> TableSink<T> findAndCreateTableSink( @Nullable Catalog catalog, ObjectIdentifier objectIdentifier, CatalogTable cat...
3.68
hbase_CellUtil_getCellKeyAsString
/** * Return the Key portion of the passed <code>cell</code> as a String. * @param cell the cell to convert * @param rowConverter used to convert the row of the cell to a string * @return The Key portion of the passed <code>cell</code> as a String. */ public static String getCellKeyAsString(Cell cell, Func...
3.68
hadoop_AbfsOutputStream_hasActiveBlockDataToUpload
/** * Is there an active block and is there any data in it to upload? * * @return true if there is some data to upload in an active block else false. */ private boolean hasActiveBlockDataToUpload() { return hasActiveBlock() && getActiveBlock().hasData(); }
3.68
hadoop_IncrementalBlockReportManager_put
/** Put the block to this IBR. */ void put(ReceivedDeletedBlockInfo rdbi) { blocks.put(rdbi.getBlock(), rdbi); increaseBlocksCounter(rdbi); }
3.68
morf_UpdateStatementBuilder_getHints
/** * @return all hints in the order they were declared. */ public List<Hint> getHints() { return hints; }
3.68
flink_FileInputFormat_setFilePaths
/** * Sets multiple paths of files to be read. * * @param filePaths The paths of the files to read. */ public void setFilePaths(Path... filePaths) { if (!supportsMultiPaths() && filePaths.length > 1) { throw new UnsupportedOperationException( "Multiple paths are not supported by this Fil...
3.68
flink_WindowedStream_reduce
/** * Applies the given window function to each window. The window function is called for each * evaluation of the window for each key individually. The output of the window function is * interpreted as a regular non-windowed stream. * * <p>Arriving data is incrementally aggregated using the given reducer. * * @...
3.68
hbase_ScanQueryMatcher_currentRow
/** Returns a cell represent the current row */ public Cell currentRow() { return currentRow; }
3.68
hbase_MergeTableRegionsProcedure_checkRegionsToMerge
/** * @throws MergeRegionException If unable to merge regions for whatever reasons. */ private static void checkRegionsToMerge(MasterProcedureEnv env, final RegionInfo[] regions, final boolean force) throws MergeRegionException { long count = Arrays.stream(regions).distinct().count(); if (regions.length != coun...
3.68
flink_FunctionDefinition_getRequirements
/** Returns the set of requirements this definition demands. */ default Set<FunctionRequirement> getRequirements() { return Collections.emptySet(); }
3.68
hadoop_AllocateResponse_amCommand
/** * Set the <code>amCommand</code> of the response. * @see AllocateResponse#setAMCommand(AMCommand) * @param amCommand <code>amCommand</code> of the response * @return {@link AllocateResponseBuilder} */ @Private @Unstable public AllocateResponseBuilder amCommand(AMCommand amCommand) { allocateResponse.setAMCom...
3.68
hadoop_WeakReferenceThreadMap_currentThreadId
/** * Get the current thread ID. * @return thread ID. */ public long currentThreadId() { return Thread.currentThread().getId(); }
3.68
flink_Tuple15_copy
/** * Shallow tuple copy. * * @return A new Tuple with the same fields as this. */ @Override @SuppressWarnings("unchecked") public Tuple15<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> copy() { return new Tuple15<>( this.f0, this.f1, this.f2, this.f3, this.f4, this.f5, this.f6, th...
3.68
flink_DeclarativeAggregateFunction_mergeOperand
/** * Merge input of {@link #mergeExpressions()}, the input are AGG buffer generated by user * definition. */ public final UnresolvedReferenceExpression mergeOperand( UnresolvedReferenceExpression aggBuffer) { String name = String.valueOf(Arrays.asList(aggBufferAttributes()).indexOf(aggBuffer)); vali...
3.68
hudi_InstantStateHandler_refresh
/** * Refresh the checkpoint messages cached. Will be called when coordinator start/commit/abort instant. * * @return Whether refreshing is successful. */ public boolean refresh(String instantStatePath) { try { cachedInstantStates.put(instantStatePath, scanInstantState(new Path(instantStatePath))); reques...
3.68
hbase_HRegionFileSystem_checkRegionInfoOnFilesystem
/** * Write out an info file under the stored region directory. Useful recovering mangled regions. If * the regionInfo already exists on-disk, then we fast exit. */ void checkRegionInfoOnFilesystem() throws IOException { // Compose the content of the file so we can compare to length in filesystem. If not same, /...
3.68
hbase_AbstractFSWAL_getWALArchivePath
/* * only public so WALSplitter can use. * @return archived location of a WAL file with the given path p */ public static Path getWALArchivePath(Path archiveDir, Path p) { return new Path(archiveDir, p.getName()); }
3.68
framework_VVideo_setPoster
/** * Sets the poster URL. * * @param poster * the poster image URL */ public void setPoster(String poster) { video.setPoster(poster); }
3.68
graphhopper_VectorTile_getLayersOrBuilder
/** * <code>repeated .vector_tile.Tile.Layer layers = 3;</code> */ public vector_tile.VectorTile.Tile.LayerOrBuilder getLayersOrBuilder( int index) { if (layersBuilder_ == null) { return layers_.get(index); } else { return layersBuilder_.getMessageOrBuilder(index); } }
3.68
hadoop_TextOutputFormat_writeObject
/** * Write the object to the byte stream, handling Text as a special * case. * @param o the object to print * @throws IOException if the write throws, we pass it on */ private void writeObject(Object o) throws IOException { if (o instanceof Text) { Text to = (Text) o; out.write(to.getBytes(), 0, to.getL...
3.68
hadoop_HsController_countersPage
/* * (non-Javadoc) * @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#countersPage() */ @Override public Class<? extends View> countersPage() { return HsCountersPage.class; }
3.68
framework_VAbstractSplitPanel_setStylenames
/** For internal use only. May be removed or replaced in the future. */ public void setStylenames() { final String splitterClass = CLASSNAME + (orientation == Orientation.HORIZONTAL ? "-hsplitter" : "-vsplitter"); final String firstContainerClass = CLASSNAME + "-first-container";...
3.68
hudi_MarkerHandler_doesMarkerDirExist
/** * @param markerDir marker directory path * @return {@code true} if the marker directory exists; {@code false} otherwise. */ public boolean doesMarkerDirExist(String markerDir) { MarkerDirState markerDirState = getMarkerDirState(markerDir); return markerDirState.exists(); }
3.68
hadoop_Validate_checkValuesEqual
/** * Validates that the given two values are equal. * @param value1 the first value to check. * @param value1Name the name of the first argument. * @param value2 the second value to check. * @param value2Name the name of the second argument. */ public static void checkValuesEqual( long value1, String val...
3.68
hbase_TableRegionModel_setId
/** * @param id the region's encoded id */ public void setId(long id) { this.id = id; }
3.68
dubbo_URLParam_addParametersIfAbsent
/** * Add absent parameters to a new URLParam. * * @param parameters parameters in key-value pairs * @return A new URL */ public URLParam addParametersIfAbsent(Map<String, String> parameters) { if (CollectionUtils.isEmptyMap(parameters)) { return this; } return doAddParameters(parameters, true...
3.68
framework_Slot_setCaptionResizeListener
/** * Sets the caption resize listener for this slot. * * @param captionResizeListener * the listener to set, or {@code null} to remove a previously * set listener */ public void setCaptionResizeListener( ElementResizeListener captionResizeListener) { detachListeners(); this....
3.68
dubbo_ServiceDiscoveryRegistry_getServiceDiscovery
/** * Get the instance {@link ServiceDiscovery} from the registry {@link URL} using * {@link ServiceDiscoveryFactory} SPI * * @param registryURL the {@link URL} to connect the registry * @return */ private ServiceDiscovery getServiceDiscovery(URL registryURL) { ServiceDiscoveryFactory factory = getExtension(r...
3.68
morf_AbstractSqlDialectTest_testSqlDateConversion
/** * Tests SQL date conversion to string via databaseSafeStringtoRecordValue * * @throws SQLException If a SQL exception is thrown. */ @Test public void testSqlDateConversion() throws SQLException { ResultSet rs = mock(ResultSet.class); LocalDate localDate1 = new LocalDate(2010, 1, 1); LocalDate localDate2 ...
3.68
druid_ZookeeperNodeRegister_destroy
/** * @see #deregister() */ public void destroy() { deregister(); }
3.68
hbase_BucketCache_freeSpace
/** * Free the space if the used size reaches acceptableSize() or one size block couldn't be * allocated. When freeing the space, we use the LRU algorithm and ensure there must be some * blocks evicted * @param why Why we are being called */ void freeSpace(final String why) { // Ensure only one freeSpace progres...
3.68
hadoop_LocalityMulticastAMRMProxyPolicy_getActiveAndEnabledSC
/** * Return the set of sub-clusters that are both active and allowed by our * policy (weight > 0). * * @return a set of active and enabled {@link SubClusterId}s */ private Set<SubClusterId> getActiveAndEnabledSC() { return activeAndEnabledSC; }
3.68
flink_FlinkHints_getTableName
/** Returns the qualified name of a table scan, otherwise returns empty. */ public static Optional<String> getTableName(RelOptTable table) { if (table == null) { return Optional.empty(); } String tableName; if (table instanceof FlinkPreparingTableBase) { tableName = StringUtils.join(((F...
3.68
dubbo_AbstractAnnotationBeanPostProcessor_needsRefreshInjectionMetadata
// Use custom check method to compatible with Spring 4.x private boolean needsRefreshInjectionMetadata(AnnotatedInjectionMetadata metadata, Class<?> clazz) { return (metadata == null || metadata.needsRefresh(clazz)); }
3.68
hbase_MasterObserver_preSnapshot
/** * Called before a new snapshot is taken. Called as part of snapshot RPC call. * @param ctx the environment to interact with the framework and master * @param snapshot the SnapshotDescriptor for the snapshot * @param tableDescriptor the TableDescriptor of the table to snapshot */ default void...
3.68
flink_Hardware_getSizeOfPhysicalMemoryForFreeBSD
/** * Returns the size of the physical memory in bytes on FreeBSD. * * @return the size of the physical memory in bytes or {@code -1}, if the size could not be * determined */ private static long getSizeOfPhysicalMemoryForFreeBSD() { BufferedReader bi = null; try { Process proc = Runtime.getRun...
3.68
framework_GridElement_getRows
/** * Gets all the data rows in the grid. * <p> * Returns an iterable which will lazily scroll rows into views and lazy * load data as needed. * * @return an iterable of all the data rows in the grid. */ public Iterable<GridRowElement> getRows() { return () -> new Iterator<GridElement.GridRowElement>() { ...
3.68
graphhopper_IntsRef_compareTo
/** * Signed int order comparison */ @Override public int compareTo(IntsRef other) { if (this == other) return 0; final int[] aInts = this.ints; int aUpto = this.offset; final int[] bInts = other.ints; int bUpto = other.offset; final int aStop = aUpto + Math.min(this.length, other.length); ...
3.68
flink_DataType_getFields
/** * Returns an ordered list of fields starting from the provided {@link DataType}. * * <p>Note: This method returns an empty list for every {@link DataType} that is not a composite * type. */ public static List<DataTypes.Field> getFields(DataType dataType) { final List<String> names = getFieldNames(dataType)...
3.68
hbase_RSGroupInfo_containsServer
/** Returns true if a server with hostPort is found */ public boolean containsServer(Address hostPort) { return servers.contains(hostPort); }
3.68
hudi_HoodieIndexUtils_getLatestBaseFilesForAllPartitions
/** * Fetches Pair of partition path and {@link HoodieBaseFile}s for interested partitions. * * @param partitions list of partitions of interest * @param context instance of {@link HoodieEngineContext} to use * @param hoodieTable instance of {@link HoodieTable} of interest * @return the list of Pairs of part...
3.68
cron-utils_CronParserField_isOptional
/** * Returns optional tag. * * @return optional tag */ public final boolean isOptional() { return optional; }
3.68
hbase_EventHandler_getEventType
/** * Return the event type * @return The event type. */ public EventType getEventType() { return this.eventType; }
3.68