name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hadoop_Find_parseExpression
/** * Parse a list of arguments to to extract the {@link Expression} elements. * The input Deque will be modified to remove the used elements. * * @param args arguments to be parsed * @return list of {@link Expression} elements applicable to this command * @throws IOException if list can not be parsed */ privat...
3.68
hudi_HiveQueryDDLExecutor_getTableSchema
//TODO Duplicating it here from HMSDLExecutor as HiveQueryQL has no way of doing it on its own currently. Need to refactor it @Override public Map<String, String> getTableSchema(String tableName) { try { // HiveMetastoreClient returns partition keys separate from Columns, hence get both and merge to // get th...
3.68
hudi_ColumnStatsIndices_getColStatsTargetPos
// the column schema: // |- file_name: string // |- min_val: row // |- max_val: row // |- null_cnt: long // |- val_cnt: long // |- column_name: string private static int[] getColStatsTargetPos() { RowType colStatsRowType = (RowType) COL_STATS_DATA_TYPE.getLogicalType(); return Stream.of( HoodieMetadataPay...
3.68
flink_ConfigOptions_durationType
/** Defines that the value of the option should be of {@link Duration} type. */ public TypedConfigOptionBuilder<Duration> durationType() { return new TypedConfigOptionBuilder<>(key, Duration.class); }
3.68
hudi_HoodieFileGroup_getLatestFileSliceBeforeOrOn
/** * Obtain the latest file slice, upto a instantTime i.e <= maxInstantTime. */ public Option<FileSlice> getLatestFileSliceBeforeOrOn(String maxInstantTime) { return Option.fromJavaOptional(getAllFileSlices().filter(slice -> compareTimestamps(slice.getBaseInstantTime(), LESSER_THAN_OR_EQUALS, maxInstantTime)).find...
3.68
framework_GridRowDragger_getTargetDataProviderUpdater
/** * Returns the target grid data provider updater. * * @return target grid drop handler */ public TargetDataProviderUpdater<T> getTargetDataProviderUpdater() { return targetDataProviderUpdater; }
3.68
AreaShop_BuyRegion_getFormattedResellPrice
/** * Get the formatted string of the resellprice (includes prefix and suffix). * @return The formatted string of the resellprice */ public String getFormattedResellPrice() { return Utils.formatCurrency(getResellPrice()); }
3.68
hbase_SpaceViolationPolicyEnforcementFactory_createWithoutViolation
/** * Creates the "default" {@link SpaceViolationPolicyEnforcement} for a table that isn't in * violation. This is used to have uniform policy checking for tables in and not quotas. This * policy will still verify that new bulk loads do not exceed the configured quota limit. * @param rss RegionServerServices ...
3.68
morf_H2Dialect_getSqlForAddDays
/** * @see org.alfasoftware.morf.jdbc.SqlDialect#getSqlForAddDays(org.alfasoftware.morf.sql.element.Function) */ @Override protected String getSqlForAddDays(Function function) { return String.format( "DATEADD('DAY', %s, %s)", getSqlFrom(function.getArguments().get(1)), getSqlFrom(function.getArguments()...
3.68
framework_AbstractOrderedLayout_getDefaultComponentAlignment
/* * (non-Javadoc) * * @see com.vaadin.ui.Layout.AlignmentHandler#getDefaultComponentAlignment() */ @Override public Alignment getDefaultComponentAlignment() { return defaultComponentAlignment; }
3.68
hbase_OrderedBytes_skipVaruint64
/** * Skip {@code src} over the encoded varuint64. * @param src source buffer * @param cmp if true, parse the compliment of the value. * @return the number of bytes skipped. */ static int skipVaruint64(PositionedByteRange src, boolean cmp) { final int len = lengthVaruint64(src, cmp); src.setPosition(src.getPos...
3.68
flink_DelimitedInputFormat_reachedEnd
/** * Checks whether the current split is at its end. * * @return True, if the split is at its end, false otherwise. */ @Override public boolean reachedEnd() { return this.end; }
3.68
rocketmq-connect_Worker_checkAndReconfigureConnectors
/** * check and reconfigure connectors * * @param assigns */ private void checkAndReconfigureConnectors(Map<String, ConnectKeyValue> assigns) { if (assigns == null || assigns.isEmpty()) { return; } for (String connectName : assigns.keySet()) { if (!connectors.containsKey(connectName)) { ...
3.68
zxing_ReedSolomonDecoder_decode
/** * <p>Decodes given set of received codewords, which include both data and error-correction * codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, * in the input.</p> * * @param received data and error-correction codewords * @param twoS number of error-correction codewords...
3.68
flink_CheckpointStatsTracker_reportFailedCheckpoint
/** * Callback when a checkpoint fails. * * @param failed The failed checkpoint stats. */ void reportFailedCheckpoint(FailedCheckpointStats failed) { statsReadWriteLock.lock(); try { counts.incrementFailedCheckpoints(); history.replacePendingCheckpointById(failed); dirty = true; ...
3.68
hbase_ServerManager_getMinToStart
/** * Calculate min necessary to start. This is not an absolute. It is just a friction that will * cause us hang around a bit longer waiting on RegionServers to check-in. */ private int getMinToStart() { if (master.isInMaintenanceMode()) { // If in maintenance mode, then in process region server hosting meta w...
3.68
hadoop_ShadedProtobufHelper_tokenFromProto
/** * Create a hadoop token from a protobuf token. * @param tokenProto token * @return a new token */ public static Token<? extends TokenIdentifier> tokenFromProto( TokenProto tokenProto) { Token<? extends TokenIdentifier> token = new Token<>( tokenProto.getIdentifier().toByteArray(), tokenProto.g...
3.68
framework_TreeTable_getHierarchyColumnId
/** * @return the identifier of column into which the hierarchy will be * visualized or null if the column is not explicitly defined. */ public Object getHierarchyColumnId() { return hierarchyColumnId; }
3.68
pulsar_Message_getReaderSchema
/** * Get the schema associated to the message. * Please note that this schema is usually equal to the Schema you passed * during the construction of the Consumer or the Reader. * But if you are consuming the topic using the GenericObject interface * this method will return the schema associated with the message. ...
3.68
hbase_StoreFlusher_createScanner
/** * Creates the scanner for flushing snapshot. Also calls coprocessors. * @return The scanner; null if coprocessor is canceling the flush. */ protected final InternalScanner createScanner(List<KeyValueScanner> snapshotScanners, FlushLifeCycleTracker tracker) throws IOException { ScanInfo scanInfo; if (store....
3.68
hadoop_MapReduceJobPropertiesParser_accept
// Accepts a key if there is a corresponding key in the current mapreduce // configuration private boolean accept(String key) { return getLatestKeyName(key) != null; }
3.68
hadoop_DiskBalancerWorkStatus_setDestPath
/** * Sets the destination path. * * @param destPath - Path */ public void setDestPath(String destPath) { this.destPath = destPath; }
3.68
framework_Upload_interruptUpload
/** * Interrupts the upload currently being received. The interruption will be * done by the receiving thread so this method will return immediately and * the actual interrupt will happen a bit later. */ public void interruptUpload() { if (isUploading) { interrupted = true; } }
3.68
hadoop_AbfsRestOperation_createHttpOperation
/** * Creates new object of {@link AbfsHttpOperation} with the url, method, and * requestHeaders fields of the AbfsRestOperation object. */ @VisibleForTesting AbfsHttpOperation createHttpOperation() throws IOException { return new AbfsHttpOperation(url, method, requestHeaders); }
3.68
framework_CalendarComponentEvents_getNewStart
/** * Returns the updated start date/time of the event. * * @return The new date for the event */ public Date getNewStart() { return startTime; }
3.68
framework_FileDownloader_setOverrideContentType
/** * Sets whether the content type of served resources should be overridden to * <code>application/octet-stream</code> to reduce the risk of a browser * plugin choosing to display the resource instead of downloading it. This * is by default set to <code>true</code>. * <p> * Please note that this only affects Con...
3.68
flink_InternalTimerServiceImpl_snapshotTimersForKeyGroup
/** * Snapshots the timers (both processing and event time ones) for a given {@code keyGroupIdx}. * * @param keyGroupIdx the id of the key-group to be put in the snapshot. * @return a snapshot containing the timers for the given key-group, and the serializers for * them */ public InternalTimersSnapshot<K, N> ...
3.68
morf_SqlDialect_matchConditionSqlForMergeFields
/** * Creates matching conditions SQL for a list of fields used in the ON section * of a Merge Statement. For example: * "table1.fieldA = table2.fieldA AND table1.fieldB = table2.fieldB". * * @param statement the merge statement. * @param selectAlias the alias of the select statement of a merge statement. * @par...
3.68
hudi_CompactionUtil_inferChangelogMode
/** * Infers the changelog mode based on the data file schema(including metadata fields). * * <p>We can improve the code if the changelog mode is set up as table config. * * @param conf The configuration * @param metaClient The meta client */ public static void inferChangelogMode(Configuration conf, HoodieTableM...
3.68
hadoop_Base64_decode
/** * Decodes a given Base64 string into its corresponding byte array. * * @param data * the Base64 string, as a <code>String</code> object, to decode * * @return the corresponding decoded byte array * @throws IllegalArgumentException * If the string is not a valid base64 encoded string ...
3.68
querydsl_AbstractHibernateQuery_setFlushMode
/** * Override the current session flush mode, just for this query. * @return the current object */ @SuppressWarnings("unchecked") public Q setFlushMode(FlushMode flushMode) { this.flushMode = flushMode; return (Q) this; }
3.68
hbase_SortedCompactionPolicy_removeExcessFiles
/** * @param candidates pre-filtrate */ protected void removeExcessFiles(ArrayList<HStoreFile> candidates, boolean isUserCompaction, boolean isMajorCompaction) { int excess = candidates.size() - comConf.getMaxFilesToCompact(); if (excess > 0) { if (isMajorCompaction && isUserCompaction) { LOG.debug("W...
3.68
hadoop_OBSPosixBucketUtils_fsGetObjectKeyDepth
/** * Get the depth of an absolute path, that is the number of '/' in the path. * * @param key object key * @return depth */ static int fsGetObjectKeyDepth(final String key) { int depth = 0; for (int idx = key.indexOf('/'); idx >= 0; idx = key.indexOf('/', idx + 1)) { depth++; } return key.endsWi...
3.68
morf_RemoveTable_reverse
/** * {@inheritDoc} * * @see org.alfasoftware.morf.upgrade.SchemaChange#reverse(org.alfasoftware.morf.metadata.Schema) */ @Override public Schema reverse(Schema schema) { if(schema.tableExists(tableToBeRemoved.getName().toUpperCase())){ throw new IllegalArgumentException("Cannot perform reversal for [" + tabl...
3.68
hbase_ColumnRangeFilter_getMaxColumnInclusive
/** Returns true if max column is inclusive, false otherwise */ public boolean getMaxColumnInclusive() { return this.maxColumnInclusive; }
3.68
hbase_MetricRegistryInfo_isExistingSource
/** * Returns whether or not this MetricRegistry is for an existing BaseSource * @return true if this MetricRegistry is for an existing BaseSource. */ public boolean isExistingSource() { return existingSource; }
3.68
hbase_RegionCoprocessorHost_postPut
/** * @param put The Put object * @param edit The WALEdit object. * @exception IOException Exception */ public void postPut(final Put put, final WALEdit edit) throws IOException { if (coprocEnvironments.isEmpty()) { return; } execOperation(new RegionObserverOperationWithoutResult() { @Override pu...
3.68
morf_HumanReadableStatementProducer_removeIndex
/** @see org.alfasoftware.morf.upgrade.SchemaEditor#removeIndex(java.lang.String, org.alfasoftware.morf.metadata.Index) **/ @Override public void removeIndex(String tableName, Index index) { consumer.schemaChange(HumanReadableStatementHelper.generateRemoveIndexString(tableName, index)); }
3.68
framework_VaadinPortletSession_setSharedRenderParameter
/** * Sets a shared portlet parameter. * * Internally, an action may be created and opened, as shared parameters * cannot be set directly from all types of requests. * * Setting shared render parameters from background threads is not * supported. * * The parameters and values need to be kept in the context unt...
3.68
flink_RouteResult_queryParam
/** * Extracts the first matching param in {@code queryParams}. * * @return {@code null} if there's no match */ public String queryParam(String name) { List<String> values = queryParams.get(name); return (values == null) ? null : values.get(0); }
3.68
flink_ClusterEntrypointUtils_configureUncaughtExceptionHandler
/** * Sets the uncaught exception handler for current thread based on configuration. * * @param config the configuration to read. */ public static void configureUncaughtExceptionHandler(Configuration config) { Thread.setDefaultUncaughtExceptionHandler( new ClusterUncaughtExceptionHandler( ...
3.68
hbase_TinyLfuBlockCache_recordEviction
/** * Records an eviction. The number of eviction operations and evicted blocks are identical, as an * eviction is triggered immediately when the capacity has been exceeded. An eviction is performed * asynchronously. See the library's documentation for details on write buffers, batching, and * maintenance behavior....
3.68
flink_FlinkAggregateJoinTransposeRule_keyColumns
/** * Computes the closure of a set of columns according to a given list of constraints. Each 'x = * y' constraint causes bit y to be set if bit x is set, and vice versa. */ private static ImmutableBitSet keyColumns( ImmutableBitSet aggregateColumns, com.google.common.collect.ImmutableList<RexNode> p...
3.68
hadoop_AbstractS3ACommitter_getDestS3AFS
/** * Get the destination as an S3A Filesystem; casting it. * @return the dest S3A FS. * @throws IOException if the FS cannot be instantiated. */ public S3AFileSystem getDestS3AFS() throws IOException { return (S3AFileSystem) getDestFS(); }
3.68
shardingsphere-elasticjob_YamlEngine_unmarshal
/** * Unmarshal YAML. * * @param yamlContent YAML content * @param classType class type * @param <T> type of class * @return object from YAML */ public static <T> T unmarshal(final String yamlContent, final Class<T> classType) { LoaderOptions loaderOptions = new LoaderOptions(); loaderOptions.setTagInspe...
3.68
framework_Window_removeAllCloseShortcuts
/** * Removes all close shortcuts. This includes the default ESCAPE shortcut. * It is up to the user to add back any and all keyboard close shortcuts * they may require. For more fine-grained control over shortcuts, use * {@link #removeCloseShortcut(int, int...)}. * * @since 7.6 */ public void removeAllCloseShor...
3.68
flink_KeyGroupStatePartitionStreamProvider_getKeyGroupId
/** Returns the key group that corresponds to the data in the provided stream. */ public int getKeyGroupId() { return keyGroupId; }
3.68
framework_VTabsheet_isFirstVisibleTabClient
/** * Returns whether the given tab index matches the first visible tab on * the client. * * @param index * the index to check * @return {@code true} if the given index matches the first visible tab * that hasn't been scrolled out of view, {@code false} * otherwise */ private boolean...
3.68
hbase_MobUtils_getTableNameTag
/** * Gets the table name tag. * @param cell The current cell. * @return The table name tag. */ private static Optional<Tag> getTableNameTag(Cell cell) { Optional<Tag> tag = Optional.empty(); if (cell.getTagsLength() > 0) { tag = PrivateCellUtil.getTag(cell, TagType.MOB_TABLE_NAME_TAG_TYPE); } return ta...
3.68
framework_VFormLayout_onClick
/* * (non-Javadoc) * * @see * com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt * .event.dom.client.ClickEvent) */ @Override public void onClick(ClickEvent event) { Caption caption = (Caption) event.getSource(); if (caption.getOwner() != null) { if (caption.getOwner() instanceof ...
3.68
framework_BasicBackwardHandler_backward
/* * (non-Javadoc) * * @see * com.vaadin.addon.calendar.ui.CalendarComponentEvents.BackwardHandler# * backward * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.BackwardEvent) */ @Override public void backward(BackwardEvent event) { Date start = event.getComponent().getStartDate(); Date end = event...
3.68
pulsar_AuthenticationDataProvider_getTlsKeyStoreParams
/** * Used for TLS authentication with keystore type. * * @return a KeyStoreParams for the client certificate chain, or null if the data are not available */ default KeyStoreParams getTlsKeyStoreParams() { return null; }
3.68
flink_FutureUtils_handleException
/** * Checks that the given {@link CompletableFuture} is not completed exceptionally with the * specified class. If the future is completed exceptionally with the specific class, then try * to recover using a given exception handler. If the exception does not match the specified * class, just pass it through to lat...
3.68
framework_VFilterSelect_createSuggestionPopup
/** * This method will create the SuggestionPopup used by the VFilterSelect * instance. It is invoked during the Constructor and should only be * overridden if a custom SuggestionPopup shall be used. The overriding * method cannot use any instance variables. * * @since 7.1.5 * @return SuggestionPopup instance us...
3.68
hbase_HbckTableInfo_sidelineBigOverlaps
/** * Sideline some regions in a big overlap group so that it will have fewer regions, and it is * easier to merge them later on. * @param bigOverlap the overlapped group with regions more than maxMerge */ void sidelineBigOverlaps(Collection<HbckRegionInfo> bigOverlap) throws IOException { int overlapsToSideline ...
3.68
flink_LongCounter_add
/** Consider using {@link #add(long)} instead for primitive long values */ @Override public void add(Long value) { this.localValue += value; }
3.68
hbase_QuotaFilter_setUserFilter
/** * Set the user filter regex * @param regex the user filter * @return the quota filter object */ public QuotaFilter setUserFilter(final String regex) { this.userRegex = regex; hasFilters |= StringUtils.isNotEmpty(regex); return this; }
3.68
dubbo_SimpleReferenceCache_destroyAll
/** * clear and destroy all {@link ReferenceConfigBase} in the cache. */ @Override public void destroyAll() { if (CollectionUtils.isEmptyMap(referenceKeyMap)) { return; } referenceKeyMap.forEach((_k, referencesOfKey) -> { for (ReferenceConfigBase<?> rc : referencesOfKey) { des...
3.68
flink_ExternalResourceOptions_keyWithResourceNameAndSuffix
/** Generate the config option key with resource_name and suffix. */ private static String keyWithResourceNameAndSuffix(String resourceName, String suffix) { return String.format( "%s.%s.%s", EXTERNAL_RESOURCE_PREFIX, Preconditions.checkNotNull(resourceName), Precondi...
3.68
hbase_LossyCounting_sweep
/** * sweep low frequency data */ public void sweep() { for (Map.Entry<T, Integer> entry : data.entrySet()) { if (entry.getValue() < currentTerm) { T metric = entry.getKey(); data.remove(metric); if (listener != null) { listener.sweep(metric); } } } }
3.68
morf_InlineTableUpgrader_visit
/** * @see org.alfasoftware.morf.upgrade.SchemaChangeVisitor#visit(org.alfasoftware.morf.upgrade.AnalyseTable) */ @Override public void visit(AnalyseTable analyseTable) { currentSchema = analyseTable.apply(currentSchema); writeStatements(sqlDialect.getSqlForAnalyseTable(currentSchema.getTable(analyseTable.getTabl...
3.68
flink_TimeWindowUtil_getNextTriggerWatermark
/** Method to get the next watermark to trigger window. */ public static long getNextTriggerWatermark( long currentWatermark, long interval, ZoneId shiftTimezone, boolean useDayLightSaving) { if (currentWatermark == Long.MAX_VALUE) { return currentWatermark; } long triggerWatermark; // ...
3.68
hudi_BaseHoodieWriteClient_index
/** * Runs INDEX action to build out the metadata partitions as planned for the given instant time. * * @param indexInstantTime - instant time for the requested INDEX action * @return {@link Option<HoodieIndexCommitMetadata>} after successful indexing. */ public Option<HoodieIndexCommitMetadata> index(String index...
3.68
pulsar_MessageIdAdv_getFirstChunkMessageId
/** * Get the message ID of the first chunk if the current message ID represents the position of a chunked message. * * @implNote A chunked message is distributed across different BookKeeper entries. The message ID of a chunked * message is composed of two message IDs that represent positions of the first and the l...
3.68
hbase_GsonUtil_createGson
/** * Create a builder which is used to create a Gson instance. * <p/> * Will set some common configs for the builder. */ public static GsonBuilder createGson() { return new GsonBuilder().setLongSerializationPolicy(LongSerializationPolicy.STRING) .registerTypeAdapter(LongAdder.class, new TypeAdapter<LongAdder...
3.68
hbase_HRegion_rowIsInRange
/** * Determines if the specified row is within the row range specified by the specified RegionInfo * @param info RegionInfo that specifies the row range * @param row row to be checked * @return true if the row is within the range specified by the RegionInfo */ public static boolean rowIsInRange(RegionInfo info, ...
3.68
hadoop_CachingBlockManager_numAvailable
/** * Number of ByteBuffers available to be acquired. * * @return the number of available buffers. */ public int numAvailable() { return bufferPool.numAvailable(); }
3.68
flink_HiveParserASTNodeOrigin_getObjectType
/** @return the type of the object from which an HiveParserASTNode originated, e.g. "view". */ public String getObjectType() { return objectType; }
3.68
hbase_ServerRegionReplicaUtil_isMetaRegionReplicaReplicationEnabled
/** Returns True if hbase:meta Region Read Replica is enabled. */ public static boolean isMetaRegionReplicaReplicationEnabled(Configuration conf, TableName tn) { return TableName.isMetaTableName(tn) && conf.getBoolean( REGION_REPLICA_REPLICATION_CATALOG_CONF_KEY, DEFAULT_REGION_REPLICA_REPLICATION_CATALOG); }
3.68
framework_AbstractComponent_setSizeUndefined
/* * (non-Javadoc) * * @see com.vaadin.server.Sizeable#setSizeUndefined() */ @Override public void setSizeUndefined() { setWidthUndefined(); setHeightUndefined(); }
3.68
flink_ColumnStats_copy
/** * Create a deep copy of "this" instance. * * @return a deep copy */ public ColumnStats copy() { if (maxValue != null || minValue != null) { return new ColumnStats( this.ndv, this.nullCount, this.avgLen, this.maxLen, this...
3.68
hadoop_SystemErasureCodingPolicies_getByID
/** * Get a policy by policy ID. * @return ecPolicy, or null if not found */ public static ErasureCodingPolicy getByID(byte id) { return SYSTEM_POLICIES_BY_ID.get(id); }
3.68
hbase_HFileCorruptionChecker_getQuarantinedMobFiles
/** Returns the set of successfully quarantined paths after checkTables is called. */ public Collection<Path> getQuarantinedMobFiles() { return new HashSet<>(quarantinedMobFiles); }
3.68
hbase_TableDescriptorBuilder_hashCode
/** Returns hash code */ @Override public int hashCode() { int result = this.name.hashCode(); if (this.families.size() > 0) { for (ColumnFamilyDescriptor e : this.families.values()) { result ^= e.hashCode(); } } result ^= values.hashCode(); return result; }
3.68
framework_MultiSelectionModelImpl_asMultiSelect
/** * Gets a wrapper for using this grid as a multiselect in a binder. * * @return a multiselect wrapper for grid */ @Override public MultiSelect<T> asMultiSelect() { return new MultiSelect<T>() { @Override public void setValue(Set<T> value) { Objects.requireNonNull(value); ...
3.68
flink_NetUtils_getIPv6UrlRepresentation
/** * Creates a compressed URL style representation of an Inet6Address. * * <p>This method copies and adopts code from Google's Guava library. We re-implement this here * in order to reduce dependency on Guava. The Guava library has frequently caused dependency * conflicts in the past. */ private static String ge...
3.68
hadoop_CallableSupplier_waitForCompletion
/** * Wait for a single of future to complete, extracting IOEs afterwards. * @param future future to wait for. * @param <T> type * @return the result * @throws IOException if one of the called futures raised an IOE. * @throws RuntimeException if one of the futures raised one. */ public static <T> T waitForComple...
3.68
hbase_OrderedBytes_encodeFloat32
/** * Encode a 32-bit floating point value using the fixed-length encoding. Encoding format is * described at length in {@link #encodeFloat64(PositionedByteRange, double, Order)}. * @return the number of bytes written. * @see #decodeFloat32(PositionedByteRange) * @see #encodeFloat64(PositionedByteRange, double, Or...
3.68
hbase_ReplicationSourceWALReader_readWALEntries
// We need to get the WALEntryBatch from the caller so we can add entries in there // This is required in case there is any exception in while reading entries // we do not want to loss the existing entries in the batch protected void readWALEntries(WALEntryStream entryStream, WALEntryBatch batch) throws InterruptedEx...
3.68
framework_Range_withOnly
/** * Creates a range object representing a single integer. * * @param integer * the number to represent as a range * @return the range represented by <code>integer</code> */ public static Range withOnly(final int integer) { return new Range(integer, integer + 1); }
3.68
hbase_WALUtil_writeFlushMarker
/** * Write a flush marker indicating a start / abort or a complete of a region flush * <p/> * This write is for internal use only. Not for external client consumption. */ public static WALKeyImpl writeFlushMarker(WAL wal, NavigableMap<byte[], Integer> replicationScope, RegionInfo hri, final FlushDescriptor f, bo...
3.68
open-banking-gateway_HbciConsentInfo_isPasswordPresentInConsent
/** * Check that password present in consent (needed for getting payment status without new interactive authorization). */ public boolean isPasswordPresentInConsent(HbciContext ctx) { HbciConsent hbciDialogConsent = ctx.getHbciDialogConsent(); if (hbciDialogConsent == null) { return false; } ...
3.68
hadoop_MultipleInputs_getMapperTypeMap
/** * Retrieves a map of {@link Path}s to the {@link Mapper} class that * should be used for them. * * @param conf The confuration of the job * @see #addInputPath(JobConf, Path, Class, Class) * @return A map of paths to mappers for the job */ @SuppressWarnings("unchecked") static Map<Path, Class<? extends Mappe...
3.68
hmily_DbTypeUtils_buildByDriverClassName
/** * check db type. * @param driverClassName driverClassName * @return mysql sqlserver oracle postgresql. */ public static String buildByDriverClassName(final String driverClassName) { String dbType = null; if (driverClassName.contains(CommonConstant.DB_MYSQL)) { dbType = CommonConstant.DB_MYSQL; ...
3.68
hadoop_ExitUtil_haltCalled
/** * @return true if halt has been called. */ public static boolean haltCalled() { // Either we set this member or we actually called Runtime#halt return FIRST_HALT_EXCEPTION.get() != null; }
3.68
zxing_PDF417ResultMetadata_getTimestamp
/** * unix epock timestamp, elapsed seconds since 1970-01-01 * * @return elapsed seconds, -1 if not set */ public long getTimestamp() { return timestamp; }
3.68
hmily_GsonUtils_getInstance
/** * Gets instance. * * @return the instance */ public static GsonUtils getInstance() { return INSTANCE; }
3.68
dubbo_ReactorServerCalls_manyToMany
/** * Implements a stream -> stream call as Flux -> Flux * * @param responseObserver response StreamObserver * @param func service implementation * @return request StreamObserver */ public static <T, R> StreamObserver<T> manyToMany( StreamObserver<R> responseObserver, Function<Flux<T>, Flux<R>> func) { ...
3.68
morf_MergeStatementBuilder_input
/** * For updating existing records, references the new field value being merged, i.e. the value provided by the select. * To reference the existing value being replaced, use {@link #existing(String)}. * * @param name Name of the referenced field. * @return Reference to the new field value being merged. */ public...
3.68
flink_SSLUtils_createSSLClientSocketFactory
/** * Creates a factory for SSL Client Sockets from the given configuration. SSL Client Sockets are * always part of internal communication. */ public static SocketFactory createSSLClientSocketFactory(Configuration config) throws Exception { SSLContext sslContext = createInternalSSLContext(config, true);...
3.68
hbase_RESTServer_run
/** * Runs the REST server. */ public synchronized void run() throws Exception { Pair<FilterHolder, Class<? extends ServletContainer>> pair = loginServerPrincipal(userProvider, conf); FilterHolder authFilter = pair.getFirst(); Class<? extends ServletContainer> containerClass = pair.getSecond(); RESTServle...
3.68
graphhopper_StringEncodedValue_roundUp
/** * @param value the value to be rounded * @return the value rounded to the highest integer with the same number of leading zeros */ private static int roundUp(int value) { return -1 >>> Integer.numberOfLeadingZeros(value); }
3.68
flink_DataStream_rescale
/** * Sets the partitioning of the {@link DataStream} so that the output elements are distributed * evenly to a subset of instances of the next operation in a round-robin fashion. * * <p>The subset of downstream operations to which the upstream operation sends elements depends * on the degree of parallelism of bot...
3.68
hadoop_ManifestSuccessData_recordJobFailure
/** * Note a failure by setting success flag to false, * then add the exception to the diagnostics. * @param thrown throwable */ public void recordJobFailure(Throwable thrown) { setSuccess(false); String stacktrace = ExceptionUtils.getStackTrace(thrown); diagnostics.put(DiagnosticKeys.EXCEPTION, thrown.toStri...
3.68
hudi_RunLengthDecoder_readDictionaryIdData
/** * It is used to decode dictionary IDs. */ private void readDictionaryIdData(int total, WritableIntVector c, int rowId) { int left = total; while (left > 0) { if (this.currentCount == 0) { this.readNextGroup(); } int n = Math.min(left, this.currentCount); switch (mode) { case RLE: ...
3.68
hadoop_StoreContext_incrementStatistic
/** * Increment a statistic by a specific value. * This increments both the instrumentation and storage statistics. * @param statistic The operation to increment * @param count the count to increment */ public void incrementStatistic(Statistic statistic, long count) { instrumentation.incrementCounter(statistic, ...
3.68
hbase_PrivateCellUtil_overlappingKeys
/** * Returns true if the first range start1...end1 overlaps with the second range start2...end2, * assuming the byte arrays represent row keys */ public static boolean overlappingKeys(final byte[] start1, final byte[] end1, final byte[] start2, final byte[] end2) { return (end2.length == 0 || start1.length == 0...
3.68
querydsl_GuavaGroupBy_multimap
/** * Create a new aggregating map expression using a backing LinkedHashMap * * @param key key for the map entries * @param value value for the map entries * @return wrapper expression */ public static <K, V, T, U> AbstractGroupExpression<Pair<K, V>, Multimap<T, U>> multimap(GroupExpression<K, T> key, ...
3.68
hbase_MemStoreFlusher_registerFlushRequestListener
/** * Register a MemstoreFlushListener */ @Override public void registerFlushRequestListener(final FlushRequestListener listener) { this.flushRequestListeners.add(listener); }
3.68
flink_DataStream_writeUsingOutputFormat
/** * Writes the dataStream into an output, described by an OutputFormat. * * <p>The output is not participating in Flink's checkpointing! * * <p>For writing to a file system periodically, the use of the {@link * org.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink} is recommended. * * @pa...
3.68