name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hadoop_FederationUtil_getCompileInfo
/** * Fetch the build/compile information for this jar. * * @return String Compilation info. */ public static String getCompileInfo() { return VersionInfo.getDate() + " by " + VersionInfo.getUser() + " from " + VersionInfo.getBranch(); }
3.68
hbase_ClientIdGenerator_getPid
/** Returns PID of the current process, if it can be extracted from JVM name, or null. */ public static Long getPid() { String name = ManagementFactory.getRuntimeMXBean().getName(); List<String> nameParts = Splitter.on('@').splitToList(name); if (nameParts.size() == 2) { // 12345@somewhere try { return ...
3.68
flink_HiveParserUtils_getFunctionInfo
// Get FunctionInfo and always look for it in metastore when FunctionRegistry returns null. public static FunctionInfo getFunctionInfo(String funcName) throws SemanticException { FunctionInfo res = FunctionRegistry.getFunctionInfo(funcName); if (res == null) { SessionState sessionState = SessionState.ge...
3.68
flink_AbstractPagedInputView_clear
/** * Clears the internal state of the view. After this call, all read attempts will fail, until * the {@link #advance()} or {@link #seekInput(MemorySegment, int, int)} method have been * invoked. */ protected void clear() { this.currentSegment = null; this.positionInSegment = this.headerLength; this.li...
3.68
framework_VRichTextArea_setValue
/** * Sets the value of the text area. * * @param value * The text value, as HTML */ public void setValue(String value) { if (rta.isAttached()) { rta.setHTML(value); } else { html.setHTML(value); } }
3.68
flink_SlotProfile_getTaskResourceProfile
/** Returns the desired resource profile for the task slot. */ public ResourceProfile getTaskResourceProfile() { return taskResourceProfile; }
3.68
flink_RecordProcessorUtils_getRecordProcessor1
/** * Get record processor for the first input of {@link TwoInputStreamOperator}, which will omit * call of {@link StreamOperator#setKeyContextElement1} if it doesn't have key context. * * @param operator the {@link TwoInputStreamOperator} * @return the record processor */ public static <T> ThrowingConsumer<Strea...
3.68
pulsar_SaslAuthenticationDataProvider_authenticate
// create token that evaluated by client, and will send to server. @Override public AuthData authenticate(AuthData commandData) throws AuthenticationException { // init if (Arrays.equals(commandData.getBytes(), AuthData.INIT_AUTH_DATA_BYTES)) { if (pulsarSaslClient.hasInitialResponse()) { re...
3.68
Activiti_DelegateHelper_getExtensionElements
/** * Returns for the activityId of the passed {@link DelegateExecution} the * {@link Map} of {@link ExtensionElement} instances. These represent the * extension elements defined in the BPMN 2.0 XML as part of that particular * activity. * <p> * If the execution is currently being used for executing an * {@link ...
3.68
framework_VAbstractCalendarPanel_isReadonly
/** * Checks whether the widget is not editable (read-only). * * @return {@code true} if the widget is read-only */ protected boolean isReadonly() { return parent.isReadonly(); }
3.68
flink_AbstractStreamingJoinOperator_getRecords
/** * Gets the iterable of records. This is usually be called when the {@link * AssociatedRecords} is from inner side. */ public Iterable<RowData> getRecords() { return new RecordsIterable(records); }
3.68
hbase_MasterObserver_postCompletedSnapshotAction
/** * Called after the snapshot operation has been completed. * @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 postCompletedSnapsh...
3.68
hadoop_EntityIdentifier_getType
/** * Get the entity type. * @return The entity type. */ public String getType() { return type; }
3.68
hadoop_RegexMountPoint_replaceRegexCaptureGroupInPath
/** * Use capture group named regexGroupNameOrIndexStr in mather to replace * parsedDestPath. * E.g. link: ^/user/(?<username>\\w+) => s3://$user.apache.com/_${user} * srcMatcher is from /user/hadoop. * Then the params will be like following. * parsedDestPath: s3://$user.apache.com/_${user}, * regexGroupNameOrIn...
3.68
framework_LegacyWindow_setContent
/** * Set the content of the window. For a {@link LegacyWindow}, the content * must be a {@link ComponentContainer}. * * @param content */ @Override public void setContent(Component content) { if (!(content instanceof ComponentContainer)) { throw new IllegalArgumentException( "The conte...
3.68
flink_FunctionUtils_uncheckedConsumer
/** * Converts a {@link ThrowingConsumer} into a {@link Consumer} which throws checked exceptions * as unchecked. * * @param throwingConsumer to convert into a {@link Consumer} * @param <A> input type * @return {@link Consumer} which throws all checked exceptions as unchecked */ public static <A> Consumer<A> unc...
3.68
flink_Router_maxLength
/** Helper for toString. */ private static int maxLength(List<String> coll) { int max = 0; for (String e : coll) { int length = e.length(); if (length > max) { max = length; } } return max; }
3.68
hbase_SnapshotInfo_getCorruptedStoreFilesCount
/** Returns the number of corrupted store files */ public int getCorruptedStoreFilesCount() { return hfilesCorrupted.get(); }
3.68
hbase_HbckReport_getCheckingEndTimestamp
/** * Used for web ui to show when the HBCK checking report generated. */ public Instant getCheckingEndTimestamp() { return checkingEndTimestamp; }
3.68
hadoop_Server_getTempDir
/** * Returns the server temp dir. * * @return the server temp dir. */ public String getTempDir() { return tempDir; }
3.68
flink_CompressWriterFactory_withHadoopCompression
/** * Compresses the data using the provided Hadoop {@link CompressionCodec} and {@link * Configuration}. * * @param codecName Simple/complete name or alias of the CompressionCodec * @param hadoopConfig Hadoop Configuration * @return the instance of CompressionWriterFactory * @throws IOException */ public Compr...
3.68
flink_DeclarativeSlotManager_checkResourceRequirementsWithDelay
/** * Depending on the implementation of {@link ResourceAllocationStrategy}, checking resource * requirements and potentially making a re-allocation can be heavy. In order to cover more * changes with each check, thus reduce the frequency of unnecessary re-allocations, the checks * are performed with a slight delay...
3.68
framework_ScrollbarBundle_addScrollHandler
/** * Adds a scroll handler to the scrollbar bundle. * * @param handler * the handler to add * @return the registration object for the handler registration */ public HandlerRegistration addScrollHandler(final ScrollHandler handler) { return getHandlerManager().addHandler(ScrollEvent.TYPE, handler);...
3.68
pulsar_BrokerInterceptorUtils_load
/** * Load the broker interceptors according to the interceptor definition. * * @param metadata the broker interceptors definition. */ BrokerInterceptorWithClassLoader load(BrokerInterceptorMetadata metadata, String narExtractionDirectory) throws IOException { final File narFile = metadata.getArchivePat...
3.68
hadoop_QuotaUsage_getQuota
/** * Return the directory quota. * * @return quota. */ public long getQuota() { return quota; }
3.68
framework_DesignAttributeHandler_clearElement
/** * Clears the children and attributes of the given element. * * @param design * the element to be cleared */ public static void clearElement(Element design) { Attributes attr = design.attributes(); for (Attribute a : attr.asList()) { attr.remove(a.getKey()); } List<Node> child...
3.68
flink_SpillingThread_go
/** Entry point of the thread. */ @Override public void go() throws IOException, InterruptedException { // ------------------- In-Memory Cache ------------------------ final Queue<CircularElement<E>> cache = new ArrayDeque<>(); boolean cacheOnly = readCache(cache); // check whether the thread was canc...
3.68
flink_LogicalTypeChecks_hasLegacyTypes
/** * Checks whether a (possibly nested) logical type contains {@link LegacyTypeInformationType} or * {@link TypeInformationRawType}. */ public static boolean hasLegacyTypes(LogicalType logicalType) { return hasNested(logicalType, t -> t instanceof LegacyTypeInformationType); }
3.68
hbase_RegionMetrics_getNameAsString
/** Returns the region name as a string */ default String getNameAsString() { return Bytes.toStringBinary(getRegionName()); }
3.68
hadoop_EntityIdentifier_getId
/** * Get the entity Id. * @return The entity Id. */ public String getId() { return id; }
3.68
Activiti_ObjectValueExpression_setValue
/** * Throw an exception. */ @Override public void setValue(ELContext context, Object value) { throw new ELException( LocalMessages.get( "error.value.set.rvalue", "<object value expression>" ) ); }
3.68
hudi_BaseHoodieWriteClient_savepoint
/** * Savepoint a specific commit instant time. Latest version of data files as of the passed in instantTime * will be referenced in the savepoint and will never be cleaned. The savepointed commit will never be rolledback or archived. * <p> * This gives an option to rollback the state to the savepoint anytime. Save...
3.68
flink_TopNBuffer_getSortKeyComparator
/** * Gets sort key comparator used by buffer. * * @return sort key comparator used by buffer */ public Comparator<RowData> getSortKeyComparator() { return sortKeyComparator; }
3.68
hbase_ByteArrayOutputStream_getBuffer
/** Returns the underlying array where the data gets accumulated */ public byte[] getBuffer() { return this.buf; }
3.68
graphhopper_CarAverageSpeedParser_applyBadSurfaceSpeed
/** * @param way needed to retrieve tags * @param speed speed guessed e.g. from the road type or other tags * @return The assumed speed */ protected double applyBadSurfaceSpeed(ReaderWay way, double speed) { // limit speed if bad surface if (badSurfaceSpeed > 0 && isValidSpeed(speed) && speed > badSurface...
3.68
hbase_HBaseServerBase_installShutdownHook
/** * In order to register ShutdownHook, this method is called when HMaster and HRegionServer are * started. For details, please refer to HBASE-26951 */ protected final void installShutdownHook() { ShutdownHook.install(conf, dataFs, this, Thread.currentThread()); isShutdownHookInstalled = true; }
3.68
hadoop_DatanodeLocalInfo_getConfigVersion
/** get config version */ public String getConfigVersion() { return this.configVersion; }
3.68
graphhopper_VectorTile_hasFloatValue
/** * <code>optional float float_value = 2;</code> */ public boolean hasFloatValue() { return ((bitField0_ & 0x00000002) == 0x00000002); }
3.68
flink_Tuple2_of
/** * Creates a new tuple and assigns the given values to the tuple's fields. This is more * convenient than using the constructor, because the compiler can infer the generic type * arguments implicitly. For example: {@code Tuple3.of(n, x, s)} instead of {@code new * Tuple3<Integer, Double, String>(n, x, s)} */ pu...
3.68
flink_ThroughputCalculator_calculateThroughput
/** @return Calculated throughput based on the collected data for the last period. */ public long calculateThroughput() { if (measurementStartTime != NOT_TRACKED) { long absoluteTimeMillis = clock.absoluteTimeMillis(); currentMeasurementTime += absoluteTimeMillis - measurementStartTime; meas...
3.68
framework_FieldGroup_getField
/** * Returns the field that is bound to the given property id. * * @param propertyId * The property id to use to lookup the field * @return The field that is bound to the property id or null if no field is * bound to that property id */ public Field<?> getField(Object propertyId) { return...
3.68
hbase_MasterSnapshotVerifier_verifyTableInfo
/** * Check that the table descriptor for the snapshot is a valid table descriptor * @param manifest snapshot manifest to inspect */ private void verifyTableInfo(final SnapshotManifest manifest) throws IOException { TableDescriptor htd = manifest.getTableDescriptor(); if (htd == null) { throw new CorruptedSn...
3.68
morf_JdbcUrlElements_build
/** * @return The {@link JdbcUrlElements}. */ public JdbcUrlElements build() { return new JdbcUrlElements(databaseTypeIdentifier, host, port, instanceName, databaseName, schemaName); }
3.68
flink_HiveParserQBParseInfo_getInsertOverwriteTables
// See also {@link #isInsertIntoTable(String)} public Map<String, HiveParserASTNode> getInsertOverwriteTables() { return insertOverwriteTables; }
3.68
hbase_HbckTableInfo_handleHoleInRegionChain
/** * There is a hole in the hdfs regions that violates the table integrity rules. Create a new * empty region that patches the hole. */ @Override public void handleHoleInRegionChain(byte[] holeStartKey, byte[] holeStopKey) throws IOException { errors.reportError(HbckErrorReporter.ERROR_CODE.HOLE_IN_REGION_CHAIN...
3.68
framework_VerticalScrollbarVisibilityChangeHandler_dispatch
/* * (non-Javadoc) * * @see * com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event. * shared .EventHandler) */ @Override protected void dispatch( VerticalScrollbarVisibilityChangeHandler handler) { handler.onVisibilityChange(this); }
3.68
framework_Footer_join
/** * Merges column cells in the row. Original cells are hidden, and new * merged cell is shown instead. The cell has a width of all merged * cells together, inherits styles of the first merged cell but has * empty caption. * * @param cellsToMerge * the cells which should be merged. The cells should n...
3.68
hadoop_Chain_interruptAllThreads
// interrupt all threads private synchronized void interruptAllThreads() { for (Thread th : threads) { th.interrupt(); } for (ChainBlockingQueue<?> queue : blockingQueues) { queue.interrupt(); } }
3.68
hbase_HttpServer_addEndpoint
/** * Add an endpoint that the HTTP server should listen to. the endpoint of that the HTTP server * should listen to. The scheme specifies the protocol (i.e. HTTP / HTTPS), the host specifies * the binding address, and the port specifies the listening port. Unspecified or zero port * means that the server can liste...
3.68
hbase_PermissionStorage_getUserNamespacePermissions
/** * Returns the currently granted permissions for a given namespace as the specified user plus * associated permissions. */ public static List<UserPermission> getUserNamespacePermissions(Configuration conf, String namespace, String user, boolean hasFilterUser) throws IOException { return getUserPermissions(con...
3.68
hadoop_HttpReferrerAuditHeader_withEvaluated
/** * Add an evaluated attribute to the current map. * Replaces any with the existing key. * Set evaluated methods. * @param key key * @param value new value * @return the builder */ public Builder withEvaluated(String key, Supplier<String> value) { evaluated.put(key, value); return this; }
3.68
hbase_HMaster_login
/** * For compatibility, if failed with regionserver credentials, try the master one */ @Override protected void login(UserProvider user, String host) throws IOException { try { user.login(SecurityConstants.REGIONSERVER_KRB_KEYTAB_FILE, SecurityConstants.REGIONSERVER_KRB_PRINCIPAL, host); } catch (IOExc...
3.68
framework_AbstractMedia_getAltText
/** * @return The text/html that is displayed when a browser doesn't support * HTML5. */ public String getAltText() { return getState(false).altText; }
3.68
hbase_RequestConverter_buildDeleteNamespaceRequest
/** * Creates a protocol buffer DeleteNamespaceRequest * @return a DeleteNamespaceRequest */ public static DeleteNamespaceRequest buildDeleteNamespaceRequest(final String name) { DeleteNamespaceRequest.Builder builder = DeleteNamespaceRequest.newBuilder(); builder.setNamespaceName(name); return builder.build()...
3.68
framework_VMenuBar_showChildMenu
/** * Shows the child menu of an item. The caller must ensure that the item has * a submenu. * * @param item */ public void showChildMenu(CustomMenuItem item) { int left = 0; int top = 0; if (subMenu) { left = item.getParentMenu().getAbsoluteLeft() + item.getParentMenu().getOff...
3.68
framework_Upload_fireStarted
/** * Emit upload received event. * * @param filename * @param mimeType */ protected void fireStarted(String filename, String mimeType) { fireEvent(new Upload.StartedEvent(this, filename, mimeType, contentLength)); }
3.68
flink_PythonOperatorChainingOptimizer_buildOutputMap
/** * Construct the key-value pairs where the value is the output transformations of the key * transformation. */ private static Map<Transformation<?>, Set<Transformation<?>>> buildOutputMap( List<Transformation<?>> transformations) { final Map<Transformation<?>, Set<Transformation<?>>> outputMap = new H...
3.68
hbase_WALPlayer_createSubmittableJob
/** * Sets up the actual job. * @param args The command line parameters. * @return The newly created job. * @throws IOException When setting up the job fails. */ public Job createSubmittableJob(String[] args) throws IOException { Configuration conf = getConf(); setupTime(conf, WALInputFormat.START_TIME_KEY); ...
3.68
framework_LayoutManager_reportOuterWidth
/** * Registers the outer width (including margins, borders and paddings) of a * component. This can be used as an optimization by ManagedLayouts; by * informing the LayoutManager about what size a component will have, the * layout propagation can continue directly without first measuring the * potentially resized...
3.68
hadoop_LocalityMulticastAMRMProxyPolicy_getLocalityBasedWeighting
/** * Compute the weight to assign to a subcluster based on how many local * requests a subcluster is target of. */ private float getLocalityBasedWeighting(long reqId, SubClusterId targetId, AllocationBookkeeper allocationBookkeeper) { float totWeight = allocationBookkeeper.getTotNumLocalizedContainers(reqId);...
3.68
morf_NamedParameterPreparedStatement_clearBatch
/** * @see PreparedStatement#clearBatch() * @exception SQLException if a database access error occurs, * this method is called on a closed <code>Statement</code> or the * driver does not support batch updates */ public void clearBatch() throws SQLException { statement.clearBatch(); }
3.68
druid_MySqlStatementParser_parseBlock
/** * parse loop statement with label */ public SQLBlockStatement parseBlock(String label) { SQLBlockStatement block = new SQLBlockStatement(); block.setLabelName(label); accept(Token.BEGIN); this.parseStatementList(block.getStatementList(), -1, block); accept(Token.END); acceptIdentifier(labe...
3.68
framework_LayoutDependencyTree_markHeightAsChanged
/** * Marks the component's height as changed. Iterates through all components * whose vertical size depends on this component's size. If the dependent is * a managed layout triggers need for vertical layouting, otherwise triggers * need for vertical measuring for any dependent components of that * component in tu...
3.68
hadoop_ServerWebApp_getDir
/** * Convenience method that looks for Java System property defining a * diretory and if not present defaults to the specified directory. * * @param name server name, used as prefix of the Java System property. * @param dirType dir type, use as postfix of the Java System property. * @param defaultDir the default...
3.68
druid_SQLUtils_sort
/** * 重新排序建表语句,解决建表语句的依赖关系 * * @param sql * @param dbType */ public static String sort(String sql, DbType dbType) { List stmtList = SQLUtils.parseStatements(sql, DbType.oracle); SQLCreateTableStatement.sort(stmtList); return SQLUtils.toSQLString(stmtList, dbType); }
3.68
hudi_InternalBloomFilter_add
/** * Adds a key to <i>this</i> filter. * * @param key The key to add. */ @Override public void add(Key key) { if (key == null) { throw new NullPointerException("key cannot be null"); } int[] h = hash.hash(key); hash.clear(); for (int i = 0; i < nbHash; i++) { bits.set(h[i]); } }
3.68
flink_SplitAssignmentTracker_onCheckpointComplete
/** * when a checkpoint has been successfully made, this method is invoked to clean up the * assignment history before this successful checkpoint. * * @param checkpointId the id of the successful checkpoint. */ public void onCheckpointComplete(long checkpointId) { assignmentsByCheckpointId.entrySet().removeIf(...
3.68
hbase_StorageClusterVersionModel_toString
/* * (non-Javadoc) * @see java.lang.Object#toString() */ @Override public String toString() { return version; }
3.68
querydsl_BeanMap_firePropertyChange
/** * Called during a successful {@link #put(Object,Object)} operation. * Default implementation does nothing. Override to be notified of * property changes in the bean caused by this map. * * @param key the name of the property that changed * @param oldValue the old value for that property * @param newVal...
3.68
flink_DateTimeUtils_ymd
/** Appends year-month-day to a buffer; assumes they are valid. */ private static StringBuilder ymd(StringBuilder b, int year, int month, int day) { int4(b, year); b.append('-'); int2(b, month); b.append('-'); int2(b, day); return b; }
3.68
hbase_HFileBlockIndex_ensureSingleLevel
/** * @throws IOException if we happened to write a multi-level index. */ public void ensureSingleLevel() throws IOException { if (numLevels > 1) { throw new IOException( "Wrote a " + numLevels + "-level index with " + rootChunk.getNumEntries() + " root-level entries, but " + "this is expected to ...
3.68
flink_WindowMapState_values
/** * Returns all the values in the state. * * @return An iterable view of all the values in the state. * @throws Exception Thrown if the system cannot access the state. */ public Iterable<UV> values(W window) throws Exception { windowState.setCurrentNamespace(window); return windowState.values(); }
3.68
morf_SqlDialect_indexDropStatements
/** * Generate the SQL to drop an index from a table. * * @param table The table to drop the index from. * @param indexToBeRemoved The index to be dropped. * @return The SQL to drop the specified index. */ public Collection<String> indexDropStatements(@SuppressWarnings("unused") Table table, Index indexToBeRemove...
3.68
pulsar_MultiRolesTokenAuthorizationProvider_canConsumeAsync
/** * Check if the specified role has permission to receive messages from the specified fully qualified topic * name. * * @param topicName the fully qualified topic name associated with the topic. * @param role the app id used to receive messages from the topic. * @param subscription the subscription n...
3.68
framework_VLayoutSlot_positionVertically
/** * Position the slot vertically and set the height and the bottom margin. * * @param currentLocation * the top position for this slot * @param allocatedSpace * how much vertical space is available for this slot * @param marginBottom * the bottom margin this slot should have (...
3.68
dubbo_LoggerFactory_getCurrentAdapter
/** * Get the current adapter name * * @return current adapter name */ public static String getCurrentAdapter() { Map<Class<? extends LoggerAdapter>, String> candidates = new HashMap<>(); candidates.put(Log4jLoggerAdapter.class, "log4j"); candidates.put(Slf4jLoggerAdapter.class, "slf4j"); candidates...
3.68
hadoop_RouterFedBalance_setTrashOpt
/** * Specify the trash behaviour of the source path. * @param value the trash option. */ public Builder setTrashOpt(TrashOption value) { this.trashOpt = value; return this; }
3.68
hbase_BinaryPrefixComparator_toByteArray
/** Returns The comparator serialized using pb */ @Override public byte[] toByteArray() { ComparatorProtos.BinaryPrefixComparator.Builder builder = ComparatorProtos.BinaryPrefixComparator.newBuilder(); builder.setComparable(ProtobufUtil.toByteArrayComparable(this.value)); return builder.build().toByteArray();...
3.68
flink_ExtractionUtils_toClass
/** Converts a {@link Type} to {@link Class} if possible, {@code null} otherwise. */ static @Nullable Class<?> toClass(Type type) { if (type instanceof Class) { return (Class<?>) type; } else if (type instanceof ParameterizedType) { // this is always a class return (Class<?>) ((Parameter...
3.68
framework_StringToDateConverter_getFormat
/** * Returns the format used by * {@link #convertToPresentation(Date, Class,Locale)} and * {@link #convertToModel(String, Class, Locale)}. * * @param locale * The locale to use * @return A DateFormat instance */ protected DateFormat getFormat(Locale locale) { if (locale == null) { locale...
3.68
streampipes_InfluxClientProvider_getInfluxDBClient
/** * Create a new InfluxDB client from provided settings * * @param settings Connection settings * @return InfluxDB */ public static InfluxDB getInfluxDBClient(InfluxConnectionSettings settings) { if (settings.getAuthMode() == InfluxAuthMode.TOKEN) { var okHttpClientBuilder = InfluxClientUtils.getHttpClient...
3.68
hadoop_Quota_getValidQuotaLocations
/** * Get valid quota remote locations used in {@link #getQuotaUsage(String)}. * Differentiate the method {@link #getQuotaRemoteLocations(String)}, this * method will do some additional filtering. * @param path Federation path. * @return List of valid quota remote locations. * @throws IOException */ private List...
3.68
hbase_RegionCoprocessorHost_postScannerClose
/** * @exception IOException Exception */ public void postScannerClose(final InternalScanner s) throws IOException { execOperation(coprocEnvironments.isEmpty() ? null : new RegionObserverOperationWithoutResult() { @Override public void call(RegionObserver observer) throws IOException { observer.postSc...
3.68
morf_OracleMetaDataProvider_isEmptyDatabase
/** * Reading all the table metadata is slow on Oracle, so we can optimise the empty * database check by just seeing if there are any tables. * * @see org.alfasoftware.morf.jdbc.DatabaseMetaDataProvider#isEmptyDatabase() */ @Override public boolean isEmptyDatabase() { return keyMap().isEmpty(); }
3.68
hadoop_Chain_nextKeyValue
/** * Advance to the next key, value pair, returning null if at end. * * @return the key object that was read into, or null if no more */ public boolean nextKeyValue() throws IOException, InterruptedException { if (inputQueue != null) { return readFromQueue(); } else if (inputContext.nextKeyValue()) { ...
3.68
druid_IPAddress_parseIPAddress
/** * Convert a decimal-dotted notation representation of an IP address into an 32 bits interger value. * * @param ipAddressStr Decimal-dotted notation (xxx.xxx.xxx.xxx) of the IP address. * @return Return the 32 bits integer representation of the IP address. * @throws InvalidIPAddressException Throws this excepti...
3.68
dubbo_CuratorFrameworkParams_getParameterValue
/** * Get the parameter value from the specified {@link URL} * * @param url the Dubbo registry {@link URL} * @param <T> the type of value * @return the parameter value if present, or return <code>null</code> */ public <T> T getParameterValue(URL url) { String param = url.getParameter(name); Object value =...
3.68
framework_SharedUtil_equals
/** * Checks if a and b are equals using {@link #equals(Object)}. Handles null * values as well. Does not ensure that objects are of the same type. * Assumes that the first object's equals method handle equals properly. * * @param o1 * The first value to compare * @param o2 * The second va...
3.68
hadoop_MetricsCache_getMetric
/** * Lookup a metric value * @param key name of the metric * @return the metric value */ public Number getMetric(String key) { AbstractMetric metric = metrics.get(key); return metric != null ? metric.value() : null; }
3.68
hmily_HmilyUndoContextCacheManager_set
/** * Set undo context. * * @param undoContext hmily undo context */ public void set(final HmilyUndoContext undoContext) { CURRENT_LOCAL.get().add(undoContext); }
3.68
morf_SelectStatementBuilder_withCustomHint
/** * Supplies a specified custom hint to the database for a query. * * @param customHint representation of a custom hint * @return this, for method chaining. * @deprecated See {@link org.alfasoftware.morf.sql.CustomHint} */ @Deprecated public org.alfasoftware.morf.sql.SelectStatementBuilder withCustomHint(Custom...
3.68
hadoop_LocalTempDir_tempFile
/** * Create a temp file. * @param conf configuration to use when creating the allocator * @param prefix filename prefix * @param size file size, or -1 if not known * @return the temp file. The file has been created. * @throws IOException IO failure */ public static File tempFile(Configuration conf, String prefi...
3.68
hbase_QuotaCache_getQuotaUserName
/** * Applies a request attribute user override if available, otherwise returns the UGI's short * username * @param ugi The request's UserGroupInformation */ private String getQuotaUserName(final UserGroupInformation ugi) { if (userOverrideRequestAttributeKey == null) { return ugi.getShortUserName(); } O...
3.68
flink_GlobalProperties_reset
/** This method resets the properties to a state where no properties are given. */ public void reset() { this.partitioning = PartitioningProperty.RANDOM_PARTITIONED; this.ordering = null; this.partitioningFields = null; }
3.68
hadoop_AuditingIntegration_exitStage
/** * Remove stage from common audit context. */ public static void exitStage() { currentAuditContext().remove(CONTEXT_ATTR_STAGE); }
3.68
morf_SchemaChangeSequence_renameIndex
/** * @see org.alfasoftware.morf.upgrade.SchemaEditor#renameIndex(java.lang.String, java.lang.String, java.lang.String) */ @Override public void renameIndex(String tableName, String fromIndexName, String toIndexName) { RenameIndex removeIndex = new RenameIndex(tableName, fromIndexName, toIndexName); visitor.visit...
3.68
flink_CompletedOperationCache_accessOperationResultOrError
/** * Returns the {@link OperationResult} of the asynchronous operation. If the operation is * finished, marks the result as accessed. */ public OperationResult<R> accessOperationResultOrError() { if (operationResult.isFinished()) { markAccessed(); } return operationResult; }
3.68
flink_Tuple19_toString
/** * Creates a string representation of the tuple in the form (f0, f1, f2, f3, f4, f5, f6, f7, f8, * f9, f10, f11, f12, f13, f14, f15, f16, f17, f18), where the individual fields are the value * returned by calling {@link Object#toString} on that field. * * @return The string representation of the tuple. */ @Ove...
3.68
hbase_Encryption_hash256
/** * Return the SHA-256 digest of the concatenation of the supplied arguments. */ public static byte[] hash256(byte[]... args) { return hashWithAlg("SHA-256", args); }
3.68
hbase_LruCachedBlockQueue_pollLast
/** Returns The last element in this queue, or {@code null} if the queue is empty. */ public LruCachedBlock pollLast() { return queue.pollLast(); }
3.68