name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_RpcThrottlingException_stringFromMillis
// Visible for TestRpcThrottlingException protected static String stringFromMillis(long millis) { StringBuilder buf = new StringBuilder(); long hours = millis / (60 * 60 * 1000); long rem = (millis % (60 * 60 * 1000)); long minutes = rem / (60 * 1000); rem = rem % (60 * 1000); long seconds = rem / 1000; l...
3.68
framework_VaadinService_createVaadinSession
/** * Creates a new Vaadin session for this service and request. * * @param request * The request for which to create a VaadinSession * @return A new VaadinSession * @throws ServiceException * */ protected VaadinSession createVaadinSession(VaadinRequest request) throws ServiceException { ...
3.68
framework_CssLayout_addComponentAsFirst
/** * Adds a component into this container. The component is added to the left * or on top of the other components. * * @param c * the component to be added. */ public void addComponentAsFirst(Component c) { // If c is already in this, we must remove it before proceeding // see ticket #7668 ...
3.68
hudi_AvroSchemaUtils_containsFieldInSchema
/** * Returns true in case when schema contains the field w/ provided name */ public static boolean containsFieldInSchema(Schema schema, String fieldName) { try { Schema.Field field = schema.getField(fieldName); return field != null; } catch (Exception e) { return false; } }
3.68
flink_InPlaceMutableHashTable_overwritePointerAt
/** * Overwrites the long value at the specified position. * * @param pointer Points to the position to overwrite. * @param value The value to write. * @throws IOException */ public void overwritePointerAt(long pointer, long value) throws IOException { setWritePosition(pointer); outView.writeLong(value); ...
3.68
flink_ProjectOperator_projectTuple17
/** * Projects a {@link Tuple} {@link DataSet} to the previously selected fields. * * @return The projected DataSet. * @see Tuple * @see DataSet */ public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> ProjectOperator< T, Tuple17...
3.68
hbase_Threads_printThreadInfo
/** * Print all of the thread's information and stack traces. Wrapper around Hadoop's method. * @param stream the stream to * @param title a string title for the stack trace */ public static void printThreadInfo(PrintStream stream, String title) { ReflectionUtils.printThreadInfo(stream, title); }
3.68
hbase_OrderedInt8_encodeByte
/** * Write instance {@code val} into buffer {@code dst}. * @param dst the {@link PositionedByteRange} to write to * @param val the value to write to {@code dst} * @return the number of bytes written */ public int encodeByte(PositionedByteRange dst, byte val) { return OrderedBytes.encodeInt8(dst, val, order); }
3.68
flink_FileChannelManagerImpl_close
/** Remove all the temp directories. */ @Override public void close() throws Exception { // Marks shutdown and exits if it has already shutdown. if (!isShutdown.compareAndSet(false, true)) { return; } IOUtils.closeAll( Arrays.stream(paths) .filter(File::exists) ...
3.68
framework_VFlash_createFlashEmbed
/** * Creates the embed String. * * @return the embed String */ protected String createFlashEmbed() { /* * To ensure cross-browser compatibility we are using the twice-cooked * method to embed flash i.e. we add a OBJECT tag for IE ActiveX and * inside it a EMBED for all other browsers. */ ...
3.68
MagicPlugin_MageData_getLocation
/** * Data can be saved asynchronously, and Locations' Worlds can be invalidated if the server unloads a world. * So do not call this method during saving. */ @Nullable public Location getLocation() { return location == null ? null : location.asLocation(); }
3.68
hbase_VersionModel_toString
/* * (non-Javadoc) * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("rest "); sb.append(restVersion); sb.append(" [JVM: "); sb.append(jvmVersion); sb.append("] [OS: "); sb.append(osVersion); sb.append("] [Server: "); sb.app...
3.68
framework_CustomLayout_setTemplateName
/** * Set the name of the template used to draw custom layout. * * With GWT-adapter, the template with name 'templatename' is loaded from * VAADIN/themes/themename/layouts/templatename.html. If the theme has not * been set (with Application.setTheme()), themename is 'default'. * * @param templateName */ public ...
3.68
flink_SingleOutputStreamOperator_setParallelism
/** * Sets the parallelism for this operator. * * @param parallelism The parallelism for this operator. * @return The operator with set parallelism. */ public SingleOutputStreamOperator<T> setParallelism(int parallelism) { OperatorValidationUtils.validateParallelism(parallelism, canBeParallel()); transform...
3.68
framework_VScrollTable_isWorkPending
/* * Return true if component need to perform some work and false otherwise. */ @Override public boolean isWorkPending() { return lazyAdjustColumnWidths.isRunning(); }
3.68
flink_JoinOperator_projectTuple2
/** * Projects a pair of joined elements to a {@link Tuple} with the previously selected * fields. Requires the classes of the fields of the resulting tuples. * * @return The projected data set. * @see Tuple * @see DataSet */ public <T0, T1> ProjectJoin<I1, I2, Tuple2<T0, T1>> projectTuple2() { TypeInformati...
3.68
flink_PageSizeUtil_getSystemPageSizeOrDefault
/** * Tries to get the system page size. If the page size cannot be determined, this returns the * {@link #DEFAULT_PAGE_SIZE}. */ public static int getSystemPageSizeOrDefault() { final int pageSize = getSystemPageSize(); return pageSize == PAGE_SIZE_UNKNOWN ? DEFAULT_PAGE_SIZE : pageSize; }
3.68
hadoop_Anonymizer_createJsonGenerator
// Creates a JSON generator private JsonGenerator createJsonGenerator(Configuration conf, Path path) throws IOException { FileSystem outFS = path.getFileSystem(conf); CompressionCodec codec = new CompressionCodecFactory(conf).getCodec(path); OutputStream output; Compressor compressor = null; if (codec !=...
3.68
hbase_ClassSize_getSizeCoefficients
/** * The estimate of the size of a class instance depends on whether the JVM uses 32 or 64 bit * addresses, that is it depends on the size of an object reference. It is a linear function of * the size of a reference, e.g. 24 + 5*r where r is the size of a reference (usually 4 or 8 * bytes). This method returns the...
3.68
hbase_ColumnSchemaModel___setInMemory
/** * @param value the desired value of the IN_MEMORY attribute */ public void __setInMemory(boolean value) { attrs.put(IN_MEMORY, Boolean.toString(value)); }
3.68
flink_RexLiteralUtil_toFlinkInternalValue
/** * Convert a value from Calcite's {@link Comparable} data structures to Flink internal data * structures and also tries to be a bit flexible by accepting usual Java types such as String * and boxed numerics. * * <p>In case of symbol types, this function will return provided value, checking that it's an * {@lin...
3.68
flink_TaskConfig_setImplicitConvergenceCriterion
/** * Sets the default convergence criterion of a {@link DeltaIteration} * * @param aggregatorName * @param convCriterion */ public void setImplicitConvergenceCriterion( String aggregatorName, ConvergenceCriterion<?> convCriterion) { try { InstantiationUtil.writeObjectToConfig( ...
3.68
hudi_MarkerDirState_parseMarkerFileIndex
/** * Parses the marker file index from the marker file path. * <p> * E.g., if the marker file path is /tmp/table/.hoodie/.temp/000/MARKERS3, the index returned is 3. * * @param markerFilePathStr full path of marker file * @return the marker file index */ private int parseMarkerFileIndex(String markerFilePathStr...
3.68
hbase_HMobStore_validateMobFile
/** * Validates a mob file by opening and closing it. * @param path the path to the mob file */ private void validateMobFile(Path path) throws IOException { HStoreFile storeFile = null; try { storeFile = new HStoreFile(getFileSystem(), path, conf, getCacheConfig(), BloomType.NONE, isPrimaryReplicaStore...
3.68
flink_StopWithSavepoint_cancel
/** * Cancel the job and fail the savepoint operation future. * * <p>We don't wait for the {@link #internalSavepointFuture} here so that users can still cancel * a job if the savepoint takes too long (or gets stuck). * * <p>Since we don't actually cancel the savepoint (for which there is no API to do so), there ...
3.68
hudi_StreamSync_writeToSinkAndDoMetaSync
/** * Perform Hoodie Write. Run Cleaner, schedule compaction and syncs to hive if needed. * * @param instantTime instant time to use for ingest. * @param inputBatch input batch that contains the records, checkpoint, and schema provider * @param metrics Metrics * @param overallTimerCon...
3.68
hbase_MasterObserver_preSetSplitOrMergeEnabled
/** * Called prior to setting split / merge switch Supports Coprocessor 'bypass'. * @param ctx the coprocessor instance's environment * @param newValue the new value submitted in the call * @param switchType type of switch */ default void preSetSplitOrMergeEnabled(final ObserverContext<MasterCoprocessorEn...
3.68
framework_StringDecorator_quote
/** * Surround a string with quote characters. * * @param str * the string to quote * @return the quoted string */ public String quote(Object str) { return quoteStart + str + quoteEnd; }
3.68
hadoop_DefaultStringifier_loadArray
/** * Restores the array of objects from the configuration. * * @param <K> the class of the item * @param conf the configuration to use * @param keyName the name of the key to use * @param itemClass the class of the item * @return restored object * @throws IOException : forwards Exceptions from the underlying ...
3.68
hadoop_AMRMProxyTokenSecretManager_createIdentifier
/** * Creates an empty TokenId to be used for de-serializing an * {@link AMRMTokenIdentifier} by the RPC layer. */ @Override public AMRMTokenIdentifier createIdentifier() { return new AMRMTokenIdentifier(); }
3.68
hbase_User_isLoginFromKeytab
/** Returns true if user credentials are obtained from keytab. */ public boolean isLoginFromKeytab() { return ugi.isFromKeytab(); }
3.68
hbase_RegionCoprocessorHost_preCheckAndMutateAfterRowLock
/** * Supports Coprocessor 'bypass'. * @param checkAndMutate the CheckAndMutate object * @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 CheckAndMutateResult preCheckAndMutateAft...
3.68
framework_StatementHelper_handleUnrecognizedTypeNullValue
/** * Handle unrecognized null values. Override this to handle null values for * platform specific data types that are not handled by the default * implementation of the {@link StatementHelper}. * * @param i * @param pstmt * @param dataTypes2 * * @return true if handled, false otherwise * * @see {@link http:...
3.68
hadoop_FileIoProvider_fullyDelete
/** * Delete the given directory using {@link FileUtil#fullyDelete(File)}. * * @param volume target volume. null if unavailable. * @param dir directory to be deleted. * @return true on success false on failure. */ public boolean fullyDelete(@Nullable FsVolumeSpi volume, File dir) { final long begin = profilin...
3.68
hadoop_DataNodeFaultInjector_blockUtilSendFullBlockReport
/** * Used as a hook to inject intercept when re-register. */ public void blockUtilSendFullBlockReport() {}
3.68
framework_FilesystemContainer_containsId
/* * Tests if the filesystem contains the specified Item. Don't add a JavaDoc * comment here, we use the default documentation from implemented * interface. */ @Override public boolean containsId(Object itemId) { if (!(itemId instanceof File)) { return false; } boolean val = false; // Try ...
3.68
framework_FileParameters_setMime
/** * Sets the mime type. * * @param mime * Mime type of the file. */ public void setMime(String mime) { this.mime = mime; }
3.68
hadoop_YarnRegistryViewForProviders_getComponent
/** * Get a component. * @param componentName component name * @return the service record * @throws IOException */ public ServiceRecord getComponent(String componentName) throws IOException { String path = RegistryUtils.componentPath( user, serviceClass, instanceName, componentName); LOG.info("Resolving ...
3.68
incubator-hugegraph-toolchain_LicenseService_getActualDataSize
/** * Keep 2 method for future use now */ private static long getActualDataSize(HugeClient client, String graph) { Map<String, Object> metrics = client.metrics().backend(graph); Object dataSize = metrics.get(METRICS_DATA_SIZE); if (dataSize == null) { return 0L; } Ex.check(dataSize instanc...
3.68
flink_JobEdge_setPreProcessingOperationName
/** * Sets the name of the pre-processing operation for this input. * * @param preProcessingOperationName The name of the pre-processing operation. */ public void setPreProcessingOperationName(String preProcessingOperationName) { this.preProcessingOperationName = preProcessingOperationName; }
3.68
flink_FutureUtils_getWithoutException
/** * Gets the result of a completable future without any exception thrown. * * @param future the completable future specified. * @param <T> the type of result * @return the result of completable future, or null if it's unfinished or finished * exceptionally */ @Nullable public static <T> T getWithoutExcepti...
3.68
hudi_BaseHoodieClient_createNewInstantTime
/** * Returns next instant time in the correct format. * * @param shouldLock Whether to lock the context to get the instant time. */ public String createNewInstantTime(boolean shouldLock) { return HoodieActiveTimeline.createNewInstantTime(shouldLock, timeGenerator); }
3.68
hbase_CellBlockBuilder_createCellScanner
/** * Create a cell scanner. * @param codec to use for cellblock * @param cellBlock to encode * @return CellScanner to work against the content of <code>cellBlock</code> * @throws IOException if encoding fails */ public CellScanner createCellScanner(final Codec codec, final CompressionCodec compressor, fina...
3.68
hadoop_CloseableReferenceCount_reference
/** * Increment the reference count. * * @throws ClosedChannelException If the status is closed. */ public void reference() throws ClosedChannelException { int curBits = status.incrementAndGet(); if ((curBits & STATUS_CLOSED_MASK) != 0) { status.decrementAndGet(); throw new ClosedChannelException()...
3.68
hmily_TableMetaDataLoader_load
/** * Load table meta data. * * @param connectionAdapter connection adapter * @param tableNamePattern table name pattern * @param databaseType database type * @return table meta data * @throws SQLException SQL exception */ public static Optional<TableMetaData> load(final MetaDataConnectionAdapter connectionAdap...
3.68
hadoop_FileSetUtils_convertFileSetToFiles
/** * Converts a Maven FileSet to a list of File objects. * * @param source FileSet to convert * @return List containing every element of the FileSet as a File * @throws IOException if an I/O error occurs while trying to find the files */ @SuppressWarnings("unchecked") public static List<File> convertFileSetToFi...
3.68
hbase_RegionCoprocessorHost_postReplayWALs
/** * @param info the RegionInfo for this region * @param edits the file of recovered edits * @throws IOException Exception */ public void postReplayWALs(final RegionInfo info, final Path edits) throws IOException { execOperation(coprocEnvironments.isEmpty() ? null : new RegionObserverOperationWithoutResult() { ...
3.68
flink_DateTimeUtils_hms
/** Appends hour:minute:second to a buffer; assumes they are valid. */ private static StringBuilder hms(StringBuilder b, int h, int m, int s) { int2(b, h); b.append(':'); int2(b, m); b.append(':'); int2(b, s); return b; }
3.68
hadoop_FilePosition_setData
/** * Associates a buffer with this file. * * @param bufferData the buffer associated with this file. * @param startOffset Start offset of the buffer relative to the start of a file. * @param readOffset Offset where reading starts relative to the start of a file. * * @throws IllegalArgumentException if bufferDat...
3.68
hadoop_Lz4Codec_createCompressor
/** * Create a new {@link Compressor} for use by this {@link CompressionCodec}. * * @return a new compressor for use by this codec */ @Override public Compressor createCompressor() { int bufferSize = conf.getInt( CommonConfigurationKeys.IO_COMPRESSION_CODEC_LZ4_BUFFERSIZE_KEY, CommonConfigurationKeys....
3.68
dubbo_MeshRuleRouter_randomSelectDestination
/** * Find out target invokers from RouteDestination */ protected String randomSelectDestination( MeshRuleCache<T> meshRuleCache, String appName, List<DubboRouteDestination> routeDestination, BitList<Invoker<T>> availableInvokers) throws RpcException { // randomly select on...
3.68
pulsar_Reflections_classExistsInJar
/** * Check if a class is in a jar. * * @param jar location of the jar * @param fqcn fully qualified class name to search for in jar * @return true if class can be loaded from jar and false if otherwise */ public static boolean classExistsInJar(java.io.File jar, String fqcn) { java.net.URLClassLoader loader =...
3.68
framework_VColorPickerArea_addClickHandler
/** * Adds a click handler to the widget and sinks the click event. * * @param handler * @return HandlerRegistration used to remove the handler */ @Override public HandlerRegistration addClickHandler(ClickHandler handler) { return addDomHandler(handler, ClickEvent.getType()); }
3.68
dubbo_LFUCache_withdrawNode
/** * This method takes specified node and reattaches it neighbors nodes * links to each other, so specified node will no longer tied with them. * Returns united node, returns null if argument is null. * * @param node note to retrieve * @param <K> key * @param <V> value * @return retrieved node */ static <K,...
3.68
hudi_ParquetUtils_filterParquetRowKeys
/** * Read the rowKey list matching the given filter, from the given parquet file. If the filter is empty, then this will * return all the rowkeys. * * @param filePath The parquet file path. * @param configuration configuration to build fs object * @param filter record keys filter * @param readSchema...
3.68
hadoop_OBSBlockOutputStream_putObjectIfNeedAppend
/** * If flush has take place, need to append file, else to put object. * * @throws IOException any problem in append or put object */ private synchronized void putObjectIfNeedAppend() throws IOException { if (appendAble.get() && fs.exists( OBSCommonUtils.keyToQualifiedPath(fs, key))) { appendFsFile(); ...
3.68
morf_DataValueLookupMetadata_setChildren
/** * Updates the children during internment. * * @param children The new map of child arrangements. */ void setChildren(ImmutableMap<CaseInsensitiveString, DataValueLookupMetadata> children) { this.children = children; }
3.68
framework_LayoutDependencyTree_getMeasureTargetsJsArray
/** * Returns a JsArrayString array of connectorIds for components that are * waiting for either horizontal or vertical measuring. * * @return JsArrayString of connectorIds */ public JsArrayString getMeasureTargetsJsArray() { FastStringSet allMeasuredTargets = FastStringSet.create(); allMeasuredTargets.add...
3.68
flink_PrioritizedDeque_containsPriorityElement
/** * Returns whether the given element is a known priority element. Test is performed by identity. */ public boolean containsPriorityElement(T element) { if (numPriorityElements == 0) { return false; } final Iterator<T> iterator = deque.iterator(); for (int i = 0; i < numPriorityElements && i...
3.68
framework_AbstractSelect_setItemCaptionMode
/** * Sets the item caption mode. * * See {@link ItemCaptionMode} for a description of the modes. * <p> * {@link ItemCaptionMode#EXPLICIT_DEFAULTS_ID} is the default mode. * </p> * * @param mode * the One of the modes listed above. */ public void setItemCaptionMode(ItemCaptionMode mode) { if (m...
3.68
flink_MetricConfig_getLong
/** * Searches for the property with the specified key in this property list. If the key is not * found in this property list, the default property list, and its defaults, recursively, are * then checked. The method returns the default value argument if the property is not found. * * @param key the hashtable key. ...
3.68
hudi_HoodieRealtimeInputFormatUtils_cleanProjectionColumnIds
/** * Hive will append read columns' ids to old columns' ids during getRecordReader. In some cases, e.g. SELECT COUNT(*), * the read columns' id is an empty string and Hive will combine it with Hoodie required projection ids and becomes * e.g. ",2,0,3" and will cause an error. Actually this method is a temporary sol...
3.68
hadoop_AbstractTask_getEnvironment
/** * Get environment for a Task. * @return environment of a Task */ @Override public final Map<String, String> getEnvironment() { return environment; }
3.68
hbase_MultiByteBuff_putInt
/** * Writes an int to this MBB at its current position. Also advances the position by size of int * @param val Int value to write * @return this object */ @Override public MultiByteBuff putInt(int val) { checkRefCount(); if (this.curItem.remaining() >= Bytes.SIZEOF_INT) { this.curItem.putInt(val); retu...
3.68
hbase_RecoverableZooKeeper_exists
/** * exists is an idempotent operation. Retry before throwing exception * @return A Stat instance */ public Stat exists(String path, boolean watch) throws KeeperException, InterruptedException { return exists(path, null, watch); }
3.68
hadoop_BytesWritable_compare
/** * Compare the buffers in serialized form. */ @Override public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { return compareBytes(b1, s1 + LENGTH_BYTES, l1 - LENGTH_BYTES, b2, s2 + LENGTH_BYTES, l2 - LENGTH_BYTES); }
3.68
hbase_ServerRpcController_failedOnException
/** * Returns whether or not a server exception was generated in the prior RPC invocation. */ public boolean failedOnException() { return serviceException != null; }
3.68
morf_DatabaseMetaDataProvider_views
/** * @see org.alfasoftware.morf.metadata.Schema#views() */ @Override public Collection<View> views() { return viewNames.get().values().stream().map(RealName::getRealName).map(this::getView).collect(Collectors.toList()); }
3.68
flink_LogicalTypeMerging_findSumAggType
/** Finds the result type of a decimal sum aggregation. */ public static LogicalType findSumAggType(LogicalType argType) { // adopted from // https://docs.microsoft.com/en-us/sql/t-sql/functions/sum-transact-sql final LogicalType resultType; if (argType.is(DECIMAL)) { // a hack to make legacy ty...
3.68
hbase_ReplicationSourceWALReader_sizeOfStoreFilesIncludeBulkLoad
/** * Calculate the total size of all the store files * @param edit edit to count row keys from * @return the total size of the store files */ private int sizeOfStoreFilesIncludeBulkLoad(WALEdit edit) { List<Cell> cells = edit.getCells(); int totalStoreFilesSize = 0; int totalCells = edit.size(); for (int ...
3.68
flink_CatalogDatabaseImpl_copy
/** * Get a deep copy of the CatalogDatabase instance. * * @return a copy of CatalogDatabase instance */ public CatalogDatabase copy() { return copy(getProperties()); }
3.68
flink_StreamExecutionEnvironment_createInput
/** * Generic method to create an input data stream with {@link * org.apache.flink.api.common.io.InputFormat}. * * <p>The data stream is typed to the given TypeInformation. This method is intended for input * formats where the return type cannot be determined by reflection analysis, and that do not * implement th...
3.68
flink_ModifyKindSet_union
/** Returns the union of a number of ModifyKindSets. */ public static ModifyKindSet union(ModifyKindSet... modifyKindSets) { Builder builder = newBuilder(); for (ModifyKindSet set : modifyKindSets) { for (ModifyKind kind : set.getContainedKinds()) { builder.addContainedKind(kind); } ...
3.68
framework_VaadinService_requestStart
/** * Called before the framework starts handling a request. * * @param request * The request * @param response * The response */ public void requestStart(VaadinRequest request, VaadinResponse response) { if (!initialized) { throw new IllegalStateException( "Can ...
3.68
flink_AbstractFsCheckpointStorageAccess_resolveCheckpointPointer
/** * Takes the given string (representing a pointer to a checkpoint) and resolves it to a file * status for the checkpoint's metadata file. * * @param checkpointPointer The pointer to resolve. * @return A state handle to checkpoint/savepoint's metadata. * @throws IOException Thrown, if the pointer cannot be reso...
3.68
hadoop_ColumnRWHelper_readResults
/** * @param <K> identifies the type of column name(indicated by type of key * converter). * @param result from which to read columns * @param columnPrefixBytes optional prefix to limit columns. If null all * columns are returned. * @param keyConverter used to convert column bytes to the appropriate ke...
3.68
flink_CatalogManager_setCurrentDatabase
/** * Sets the current database name that will be used when resolving a table path. The database * has to exist in the current catalog. * * @param databaseName database name to set as current database name * @throws CatalogException thrown if the database doesn't exist in the current catalog * @see CatalogManager...
3.68
framework_LayoutManager_getInnerHeight
/** * Gets the inner height (excluding margins, paddings and borders) of the * given element, provided that it has been measured. These elements are * guaranteed to be measured: * <ul> * <li>ManagedLayouts and their child Connectors * <li>Elements for which there is at least one ElementResizeListener * <li>Eleme...
3.68
hbase_ZKWatcher_isSuperUserId
/* * Validate whether ACL ID is superuser. */ public static boolean isSuperUserId(String[] superUsers, Id id) { for (String user : superUsers) { // TODO: Validate super group members also when ZK supports setting node ACL for groups. if (!AuthUtil.isGroupPrincipal(user) && new Id("sasl", user).equals(id)) {...
3.68
flink_StateMapSnapshot_isOwner
/** Returns true iff the given state map is the owner of this snapshot object. */ public boolean isOwner(T stateMap) { return owningStateMap == stateMap; }
3.68
flink_AsynchronousFileIOChannel_close
/** * Closes the channel and waits until all pending asynchronous requests are processed. The * underlying <code>FileChannel</code> is closed even if an exception interrupts the closing. * * <p><strong>Important:</strong> the {@link #isClosed()} method returns <code>true</code> * immediately after this method has ...
3.68
flink_ExecutionConfigAccessor_fromConfiguration
/** Creates an {@link ExecutionConfigAccessor} based on the provided {@link Configuration}. */ public static ExecutionConfigAccessor fromConfiguration(final Configuration configuration) { return new ExecutionConfigAccessor(checkNotNull(configuration)); }
3.68
hudi_BaseHoodieWriteClient_startCommitWithTime
/** * Completes a new commit time for a write operation (insert/update/delete) with specified action. */ private void startCommitWithTime(String instantTime, String actionType, HoodieTableMetaClient metaClient) { CleanerUtils.rollbackFailedWrites(config.getFailedWritesCleanPolicy(), HoodieTimeline.COMMIT_ACTI...
3.68
rocketmq-connect_MemoryConfigManagementServiceImpl_getConnectorConfigs
/** * get all connector configs enabled * * @return */ @Override public Map<String, ConnectKeyValue> getConnectorConfigs() { return connectorKeyValueStore.getKVMap(); }
3.68
hbase_JenkinsHash_main
/** * Compute the hash of the specified file * @param args name of file to compute hash of. * @throws IOException e */ public static void main(String[] args) throws IOException { if (args.length != 1) { System.err.println("Usage: JenkinsHash filename"); System.exit(-1); } FileInputStream in = new File...
3.68
hadoop_AbfsInputStream_getStreamStatistics
/** * Getter for AbfsInputStreamStatistics. * * @return an instance of AbfsInputStreamStatistics. */ @VisibleForTesting public AbfsInputStreamStatistics getStreamStatistics() { return streamStatistics; }
3.68
pulsar_ManagedLedgerImpl_getLastPositionAndCounter
/** * Get the last position written in the managed ledger, alongside with the associated counter. */ Pair<PositionImpl, Long> getLastPositionAndCounter() { PositionImpl pos; long count; do { pos = lastConfirmedEntry; count = ENTRIES_ADDED_COUNTER_UPDATER.get(this); // Ensure no e...
3.68
flink_BinaryStringDataUtil_toLong
/** * Parses this BinaryStringData to Long. * * <p>Note that, in this method we accumulate the result in negative format, and convert it to * positive format at the end, if this string is not started with '-'. This is because min value * is bigger than max value in digits, e.g. Long.MAX_VALUE is '92233720368547758...
3.68
framework_WindowWaiAriaRoles_getTicketNumber
/* * (non-Javadoc) * * @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber() */ @Override protected Integer getTicketNumber() { return 14289; }
3.68
hbase_AbstractMemStore_getNextRow
/* * @param key Find row that follows this one. If null, return first. * @param set Set to look in for a row beyond <code>row</code>. * @return Next row or null if none found. If one found, will be a new KeyValue -- can be * destroyed by subsequent calls to this method. */ protected Cell getNextRow(final Cell key,...
3.68
flink_WrappingRuntimeException_wrapIfNecessary
/** * Ensures that any throwable can be thrown as a checked exception by potentially wrapping it. * * @return a runtime exception wrapping the throwable if checked or by returning the throwable * if it's a runtime exception. */ public static RuntimeException wrapIfNecessary(Throwable throwable) { if (throw...
3.68
hbase_PrivateCellUtil_writeCellToBuffer
/** * Writes a cell to the buffer at the given offset * @param cell the cell to be written * @param buf the buffer to which the cell has to be wrriten * @param offset the offset at which the cell should be written */ public static void writeCellToBuffer(Cell cell, ByteBuffer buf, int offset) { if (cell inst...
3.68
morf_SelectFirstStatement_asField
/** * @see org.alfasoftware.morf.sql.AbstractSelectStatement#asField() */ @Override public AliasedField asField() { return new FieldFromSelectFirst(this); }
3.68
hbase_ByteBufferUtils_writeVLong
/** * Similar to {@link WritableUtils#writeVLong(java.io.DataOutput, long)}, but writes to a * {@link ByteBuffer}. */ public static void writeVLong(ByteBuffer out, long i) { if (i >= -112 && i <= 127) { out.put((byte) i); return; } int len = -112; if (i < 0) { i ^= -1L; // take one's complement ...
3.68
streampipes_Options_from
/** * Creates a new list of options by using the provided string values. * * @param optionLabel An arbitrary number of option labels. * @return */ public static List<Option> from(String... optionLabel) { return Arrays.stream(optionLabel).map(Option::new).collect(Collectors.toList()); }
3.68
hbase_TableState_isEnabling
/** Returns True if table is {@link State#ENABLING}. */ public boolean isEnabling() { return isInStates(State.ENABLING); }
3.68
pulsar_AuthorizationService_canProduceAsync
/** * Check if the specified role has permission to send messages to the specified fully qualified topic name. * * @param topicName * the fully qualified topic name associated with the topic. * @param role * the app id used to send messages to the topic. */ public CompletableFuture<Boolean>...
3.68
framework_MouseEventDetailsBuilder_buildMouseEventDetails
/** * Construct a {@link MouseEventDetails} object from the given event. * * @param evt * The event to use as a source for the details * @param relativeToElement * The element whose position * {@link MouseEventDetails#getRelativeX()} and * {@link MouseEventDetails#get...
3.68
pulsar_TopicList_minus
// get topics, which are contained in list1, and not in list2 public static Set<String> minus(Collection<String> list1, Collection<String> list2) { HashSet<String> s1 = new HashSet<>(list1); s1.removeAll(list2); return s1; }
3.68
rocketmq-connect_AbstractStateManagementService_connectors
/** * Get all cached connectors. * * @return the set of connector names */ @Override public Set<String> connectors() { return new HashSet<>(connAndTaskStatus.getConnectors().keySet()); }
3.68