name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_HttpServer_hasAdministratorAccess
/** * Does the user sending the HttpServletRequest has the administrator ACLs? If it isn't the case, * response will be modified to send an error to the user. * @param servletContext the {@link ServletContext} to use * @param request the {@link HttpServletRequest} to check * @param response used to se...
3.68
shardingsphere-elasticjob_ConfigurationService_checkMaxTimeDiffSecondsTolerable
/** * Check max time different seconds tolerable between job server and registry center. * * @throws JobExecutionEnvironmentException throe JobExecutionEnvironmentException if exceed max time different seconds */ public void checkMaxTimeDiffSecondsTolerable() throws JobExecutionEnvironmentException { int maxTi...
3.68
framework_RegexpValidator_getMatcher
/** * Returns a new or reused matcher for the pattern. * * @param value * the string to find matches in * @return a matcher for the string */ private Matcher getMatcher(String value) { if (matcher == null) { matcher = pattern.matcher(value); } else { matcher.reset(value); } ...
3.68
framework_Panel_getScrollTop
/* * (non-Javadoc) * * @see com.vaadin.server.Scrollable#setScrollable(boolean) */ @Override public int getScrollTop() { return getState(false).scrollTop; }
3.68
hudi_HoodieBackedTableMetadataWriter_validateTimelineBeforeSchedulingCompaction
/** * Validates the timeline for both main and metadata tables to ensure compaction on MDT can be scheduled. */ protected boolean validateTimelineBeforeSchedulingCompaction(Option<String> inFlightInstantTimestamp, String latestDeltaCommitTimeInMetadataTable) { // we need to find if there are any inflights in data t...
3.68
open-banking-gateway_EncryptionKeySerde_fromString
/** * Convert string to symmetric key with initialization vector. * @param fromString String to buld key from * @return Deserialized key */ @SneakyThrows public SecretKeyWithIv fromString(String fromString) { SecretKeyWithIvContainer container = mapper.readValue(fromString, SecretKeyWithIvContainer.class); ...
3.68
hudi_UtilHelpers_parseSchema
/** * Parse Schema from file. * * @param fs File System * @param schemaFile Schema File */ public static String parseSchema(FileSystem fs, String schemaFile) throws Exception { // Read schema file. Path p = new Path(schemaFile); if (!fs.exists(p)) { throw new Exception(String.format("Could not find - %s ...
3.68
pulsar_ProducerConfiguration_getMessageRoutingMode
/** * Get the message routing mode for the partitioned producer. * * @return message routing mode, default is round-robin routing. * @see MessageRoutingMode#RoundRobinPartition */ public MessageRoutingMode getMessageRoutingMode() { return MessageRoutingMode.valueOf(conf.getMessageRoutingMode().toString()); }
3.68
flink_AsyncDataStream_orderedWaitWithRetry
/** * Adds an AsyncWaitOperator with an AsyncRetryStrategy to support retry of AsyncFunction. The * order to process input records is guaranteed to be the same as * input ones. * * @param in Input {@link DataStream} * @param func {@link AsyncFunction} * @param timeout from first invoke to final completion of asyn...
3.68
flink_CheckpointRequestDecider_chooseQueuedRequestToExecute
/** * Choose one of the queued requests to execute, if any. * * @return request that should be executed */ Optional<CheckpointTriggerRequest> chooseQueuedRequestToExecute( boolean isTriggering, long lastCompletionMs) { Optional<CheckpointTriggerRequest> request = chooseRequestToExecute(isTri...
3.68
flink_TableSink_getOutputType
/** * @deprecated This method will be removed in future versions as it uses the old type system. It * is recommended to use {@link #getConsumedDataType()} instead which uses the new type * system based on {@link DataTypes}. Please make sure to use either the old or the new type * system consistently to ...
3.68
hadoop_TypedBytesOutput_writeVector
/** * Writes a vector as a typed bytes sequence. * * @param vector the vector to be written * @throws IOException */ public void writeVector(ArrayList vector) throws IOException { writeVectorHeader(vector.size()); for (Object obj : vector) { write(obj); } }
3.68
framework_WrappedPortletSession_getAttribute
/** * Returns the object bound with the specified name in this session, or * <code>null</code> if no object is bound under the name in the given * scope. * * @param name * a string specifying the name of the object * @param scope * session scope of this attribute * * @return the object w...
3.68
framework_NestedMethodProperty_setInstance
/** * Sets the instance used by this property. * <p> * The new instance must be of the same type as the old instance * <p> * To be consistent with {@link #setValue(Object)}, this method will fire a * value change event even if the value stays the same * * @param instance * the instance to use * @si...
3.68
hbase_AccessController_hasFamilyQualifierPermission
/** * Returns <code>true</code> if the current user is allowed the given action over at least one of * the column qualifiers in the given column families. */ private boolean hasFamilyQualifierPermission(User user, Action perm, RegionCoprocessorEnvironment env, Map<byte[], ? extends Collection<byte[]>> familyMap) ...
3.68
flink_TableChange_getConstraintName
/** Returns the constraint name. */ public String getConstraintName() { return constraintName; }
3.68
hbase_RegionCoprocessorHost_preMemStoreCompaction
/** * Invoked before in memory compaction. */ public void preMemStoreCompaction(HStore store) throws IOException { execOperation(coprocEnvironments.isEmpty() ? null : new RegionObserverOperationWithoutResult() { @Override public void call(RegionObserver observer) throws IOException { observer.preMemSt...
3.68
pulsar_NonPersistentSubscriptionStatsImpl_add
// if the stats are added for the 1st time, we will need to make a copy of these stats and add it to the current // stats public NonPersistentSubscriptionStatsImpl add(NonPersistentSubscriptionStatsImpl stats) { Objects.requireNonNull(stats); super.add(stats); this.msgDropRate += stats.msgDropRate; retu...
3.68
hadoop_XException_format
/** * Creates a message using a error message template and arguments. * <p> * The template must be in JDK <code>MessageFormat</code> syntax * (using {#} positional parameters). * * @param error error code, to get the template from. * @param args arguments to use for creating the message. * * @return the resolv...
3.68
dubbo_RpcStatus_beginCount
/** * @param url */ public static boolean beginCount(URL url, String methodName, int max) { max = (max <= 0) ? Integer.MAX_VALUE : max; RpcStatus appStatus = getStatus(url); RpcStatus methodStatus = getStatus(url, methodName); if (methodStatus.active.get() == Integer.MAX_VALUE) { return false;...
3.68
flink_DateTimeUtils_parseTimestampMillis
/** * Parse date time string to timestamp based on the given time zone and format. Returns null if * parsing failed. * * @param dateStr the date time string * @param format date time string format * @param tz the time zone */ private static long parseTimestampMillis(String dateStr, String format, TimeZone tz) ...
3.68
hbase_ColumnRangeFilter_getMinColumn
/** Returns the min column range for the filter */ public byte[] getMinColumn() { return this.minColumn; }
3.68
flink_FailureHandlingResultSnapshot_getFailureLabels
/** * Returns the labels future associated with the failure. * * @return the CompletableFuture map of String labels */ public CompletableFuture<Map<String, String>> getFailureLabels() { return failureLabels; }
3.68
hbase_MobUtils_isMobRegionInfo
/** * Gets whether the current RegionInfo is a mob one. * @param regionInfo The current RegionInfo. * @return If true, the current RegionInfo is a mob one. */ public static boolean isMobRegionInfo(RegionInfo regionInfo) { return regionInfo == null ? false : getMobRegionInfo(regionInfo.getTable()).getEncod...
3.68
framework_JsonCodec_jsonEquals
/** * Compares two json values for deep equality. * * This is a helper for overcoming the fact that * {@link JsonValue#equals(Object)} only does an identity check and * {@link JsonValue#jsEquals(JsonValue)} is defined to use JavaScript * semantics where arrays and objects are equals only based on identity. * * ...
3.68
hbase_HFileArchiver_archiveRegions
/** * Archive the specified regions in parallel. * @param conf the configuration to use * @param fs {@link FileSystem} from which to remove the region * @param rootDir {@link Path} to the root directory where hbase files are stored (for * building the archive path) *...
3.68
flink_HiveParserASTNode_getChildren
/* * (non-Javadoc) * * @see org.apache.hadoop.hive.ql.lib.Node#getChildren() */ @Override public ArrayList<Node> getChildren() { if (super.getChildCount() == 0) { return null; } ArrayList<Node> retVec = new ArrayList<>(); for (int i = 0; i < super.getChildCount(); ++i) { retVec.add(...
3.68
hadoop_TypedBytesInput_readType
/** * Reads a type byte and returns the corresponding {@link Type}. * @return the obtained Type or null when the end of the file is reached * @throws IOException */ public Type readType() throws IOException { int code = -1; try { code = in.readUnsignedByte(); } catch (EOFException eof) { return null; ...
3.68
flink_ResourceCounter_getTotalResourceCount
/** * Computes the total number of resources in this counter. * * @return the total number of resources in this counter */ public int getTotalResourceCount() { return resources.isEmpty() ? 0 : resources.values().stream().reduce(0, Integer::sum); }
3.68
hbase_RotateFile_read
/** * Reads the content of the rotate file by selecting the winner file based on the timestamp of the * data inside the files. It reads the content of both files and selects the one with the latest * timestamp as the winner. If a file is incomplete or does not exist, it logs the error and moves * on to the next fil...
3.68
morf_DataValueLookupBuilderImpl_hasSameMetadata
/** * Validation method, for testing only. * * @param other The other. * @return true if equivalent metadata. */ @VisibleForTesting boolean hasSameMetadata(DataValueLookupBuilderImpl other) { return other.metadata.equals(this.metadata); }
3.68
hadoop_UnmanagedApplicationManager_shutDownConnections
/** * Shutdown this UAM client, without killing the UAM in the YarnRM side. */ public void shutDownConnections() { this.heartbeatHandler.shutdown(); this.rmProxyRelayer.shutdown(); }
3.68
hbase_LockManager_requestRegionsLock
/** * @throws IllegalArgumentException if all regions are not from same table. */ public long requestRegionsLock(final RegionInfo[] regionInfos, final String description, final NonceKey nonceKey) throws IllegalArgumentException, IOException { master.getMasterCoprocessorHost().preRequestLock(null, null, regionInfo...
3.68
framework_TableSortingIndicator_getTicketNumber
/* * (non-Javadoc) * * @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber() */ @Override protected Integer getTicketNumber() { return 8978; }
3.68
morf_ViewChangesDeploymentHelper_create
/** * Creates a {@link ViewChangesDeploymentHelper} implementation for the given connection details. * @param connectionResources connection resources for the data source. * @return ViewChangesDeploymentHelper. */ public ViewChangesDeploymentHelper create(ConnectionResources connectionResources) { return new View...
3.68
druid_MySqlStatementParser_parseLoop
/** * parse loop statement with label */ public SQLLoopStatement parseLoop(String label) { SQLLoopStatement loopStmt = new SQLLoopStatement(); loopStmt.setLabelName(label); accept(Token.LOOP); this.parseStatementList(loopStmt.getStatements(), -1, loopStmt); accept(Token.END); accept(Token.LOOP...
3.68
flink_ObjectIdentifier_ofAnonymous
/** * This method allows to create an {@link ObjectIdentifier} without catalog and database name, * in order to propagate anonymous objects with unique identifiers throughout the stack. * * <p>This method for no reason should be exposed to users, as this should be used only when * creating anonymous tables with un...
3.68
hadoop_SafeMode_setSafeMode
/** * Enter, leave, or get safe mode. * * @param action One of {@link SafeModeAction} LEAVE, ENTER, GET, FORCE_EXIT. * @throws IOException if set safe mode fails to proceed. * @return true if the action is successfully accepted, otherwise false means rejected. */ default boolean setSafeMode(SafeModeAction action)...
3.68
hbase_QuotaFilter_getUserFilter
/** Returns the User filter regex */ public String getUserFilter() { return userRegex; }
3.68
morf_FilteredDataSetProducerAdapter_getSchema
/** * Produce a {@link Schema} that represents the filtered view. * @see org.alfasoftware.morf.dataset.DataSetProducer#getSchema() */ @Override public Schema getSchema() { return new SchemaAdapter(delegate.getSchema()) { @Override public Table getTable(String name) { if (includeTable(name)) { ...
3.68
flink_MultiShotLatch_await
/** Waits until {@link #trigger()} is called. */ public void await() throws InterruptedException { synchronized (lock) { while (!triggered) { lock.wait(); } triggered = false; } }
3.68
flink_Tuple24_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, f19, f20, f21, f22, f23), where the * individual fields are the value returned by calling {@link Object#toString} on that field. * * @return The string representati...
3.68
graphhopper_Service_removeDays
/** * @param service_id the service_id to assign to the newly created copy. * @param daysToRemove the days of the week on which to deactivate service in the copy. * @return a copy of this Service with any service on the specified days of the week deactivated. */ public Service removeDays(String service_id, EnumSet<...
3.68
framework_FieldGroup_bindMemberFields
/** * Binds member fields found in the given object. * <p> * This method processes all (Java) member fields whose type extends * {@link Field} and that can be mapped to a property id. Property id * mapping is done based on the field name or on a @{@link PropertyId} * annotation on the field. All non-null fields f...
3.68
pulsar_ResourceGroupService_getRgLocalUsageMessageCount
// Visibility for testing. protected static double getRgLocalUsageMessageCount (String rgName, String monClassName) { return rgLocalUsageMessages.labels(rgName, monClassName).get(); }
3.68
hbase_TableRecordReaderImpl_setStartRow
/** * @param startRow the first row in the split */ public void setStartRow(final byte[] startRow) { this.startRow = startRow; }
3.68
hadoop_FSTreeTraverser_traverseDirInt
/** * Iterates the parent directory, and add direct children files to current * batch. If batch size meets configured threshold, current batch will be * submitted for the processing. * <p> * Locks could be released and reacquired when a batch submission is * finished. * * @param startId * Id of the st...
3.68
framework_AbstractSplitPanel_getOldSplitPositionUnit
/** * Returns the position unit of the split before this change event * occurred. * * @since 8.1 * * @return the split position unit previously set to the source of this * event */ public Unit getOldSplitPositionUnit() { return oldUnit; }
3.68
hmily_HashedWheelTimer_start
/** * 启动任务. */ public void start() { switch (WORKER_STATE_UPDATER.get(this)) { //更改线程状态;如果当前的状态是初始,则改成启动中; case WORKER_STATE_INIT: if (WORKER_STATE_UPDATER.compareAndSet(this, WORKER_STATE_INIT, WORKER_STATE_STARTED)) { //启动线程; workerThread.start(); ...
3.68
framework_RadioButtonGroup_getItemDescriptionGenerator
/** * Gets the item description generator. * * @return the item description generator * * @since 8.2 */ public DescriptionGenerator<T> getItemDescriptionGenerator() { return descriptionGenerator; }
3.68
hadoop_Time_formatTime
/** * Convert time in millisecond to human readable format. * * @param millis millisecond. * @return a human readable string for the input time */ public static String formatTime(long millis) { return DATE_FORMAT.get().format(millis); }
3.68
hbase_HRegionFileSystem_createStoreDir
/** * Create the store directory for the specified family name * @param familyName Column Family Name * @return {@link Path} to the directory of the specified family * @throws IOException if the directory creation fails. */ Path createStoreDir(final String familyName) throws IOException { Path storeDir = getStor...
3.68
hbase_BucketAllocator_wastedBytes
/** * If {@link #bucketCapacity} is not perfectly divisible by this {@link #itemSize()}, the * remainder will be unusable by in buckets of this size. A high value here may be optimized by * trying to choose bucket sizes which can better divide {@link #bucketCapacity}. */ public long wastedBytes() { return wastedB...
3.68
hadoop_AuxServiceRecord_version
/** * Version of the service. */ public AuxServiceRecord version(String v) { this.version = v; return this; }
3.68
flink_FsCheckpointStreamFactory_flush
/** Flush buffers to file if their size is above {@link #localStateThreshold}. */ @Override public void flush() throws IOException { if (outStream != null || pos > localStateThreshold) { flushToFile(); } }
3.68
hibernate-validator_ConstraintCheckFactory_getConstraintChecks
/** * Returns those checks that have to be performed to validate the given * annotation at the given element. In case no checks have to be performed * (e.g. because the given annotation is no constraint annotation) an empty * {@link ConstraintChecks} instance will be returned. It's therefore always * safe to opera...
3.68
querydsl_NumberExpression_nullif
/** * Create a {@code nullif(this, other)} expression * * @param other * @return nullif(this, other) */ @Override public NumberExpression<T> nullif(T other) { return nullif(ConstantImpl.create(other)); }
3.68
hbase_MetricsConnection_incrementServerOverloadedBackoffTime
/** Update the overloaded backoff time **/ public void incrementServerOverloadedBackoffTime(long time, TimeUnit timeUnit) { overloadedBackoffTimer.update(time, timeUnit); }
3.68
dubbo_Bytes_float2bytes
/** * to byte array. * * @param v value. * @param b byte array. * @param off array offset. */ public static void float2bytes(float v, byte[] b, int off) { int i = Float.floatToIntBits(v); b[off + 3] = (byte) i; b[off + 2] = (byte) (i >>> 8); b[off + 1] = (byte) (i >>> 16); b[off + 0] = (by...
3.68
querydsl_Expressions_comparableOperation
/** * Create a new Operation expression * * @param type type of expression * @param operator operator * @param args operation arguments * @return operation expression */ public static <T extends Comparable<?>> ComparableOperation<T> comparableOperation(Class<? extends T> type, Operator operator, Expressi...
3.68
dubbo_NopDynamicConfiguration_publishConfig
/** * @since 2.7.5 */ @Override public boolean publishConfig(String key, String group, String content) { return true; }
3.68
hadoop_SQLSecretManagerRetriableHandler_execute
/** * Executes a SQL command and raises retryable errors as * {@link SQLSecretManagerRetriableException}s so they are recognized by the * {@link RetryProxy}. * @param command SQL command to execute * @throws SQLException When SQL connection errors occur */ @Override public <T> T execute(SQLCommand<T> command) thr...
3.68
pulsar_ConcurrentLongPairSet_items
/** * @return a new list of keys with max provided numberOfItems (makes a copy) */ public Set<LongPair> items(int numberOfItems) { return items(numberOfItems, (item1, item2) -> new LongPair(item1, item2)); }
3.68
hadoop_Validate_checkNotNull
/** * Validates that the given reference argument is not null. * @param obj the argument reference to validate. * @param argName the name of the argument being validated. */ public static void checkNotNull(Object obj, String argName) { checkArgument(obj != null, "'%s' must not be null.", argName); }
3.68
hbase_ReplicationSourceManager_claimQueue
/** * Claim a replication queue. * <p/> * We add a flag to indicate whether we are called by ReplicationSyncUp. For normal claiming queue * operation, we are the last step of a SCP, so we can assume that all the WAL files are under * oldWALs directory. But for ReplicationSyncUp, we may want to claim the replicatio...
3.68
hbase_HBaseTestingUtility_isReadShortCircuitOn
/** * Get the HBase setting for dfs.client.read.shortcircuit from the conf or a system property. This * allows to specify this parameter on the command line. If not set, default is true. */ public boolean isReadShortCircuitOn() { final String propName = "hbase.tests.use.shortcircuit.reads"; String readOnProp = S...
3.68
framework_SystemMessageException_getCause
/** * @see java.lang.Throwable#getCause() */ @Override public Throwable getCause() { return cause; }
3.68
zxing_MultiFinderPatternFinder_selectMultipleBestPatterns
/** * @return the 3 best {@link FinderPattern}s from our list of candidates. The "best" are * those that have been detected at least 2 times, and whose module * size differs from the average among those patterns the least * @throws NotFoundException if 3 such finder patterns do not exist */ private...
3.68
morf_SqlDialect_getSqlForCoalesce
/** * Converts the coalesce function into SQL. * * @param function the function details * @return a string representation of the SQL */ protected String getSqlForCoalesce(Function function) { StringBuilder expression = new StringBuilder(); expression.append(getCoalesceFunctionName()).append('('); boolean fir...
3.68
hbase_ZKConfig_standardizeZKQuorumServerString
/** * Standardize the ZK quorum string: make it a "server:clientport" list, separated by ',' * @param quorumStringInput a string contains a list of servers for ZK quorum * @param clientPort the default client port * @return the string for a list of "server:port" separated by "," */ public static String stan...
3.68
hbase_TableRegionModel_getEndKey
/** Returns the end key */ @XmlAttribute public byte[] getEndKey() { return endKey; }
3.68
Activiti_DelegateHelper_createExpressionForField
/** * Creates an {@link Expression} for the {@link FieldExtension}. */ public static Expression createExpressionForField(FieldExtension fieldExtension) { if (StringUtils.isNotEmpty(fieldExtension.getExpression())) { ExpressionManager expressionManager = Context.getProcessEngineConfiguration().getExpressio...
3.68
flink_ProjectOperator_projectTuple7
/** * 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> ProjectOperator<T, Tuple7<T0, T1, T2, T3, T4, T5, T6>> projectTuple7() { TypeInformation<?>[] fTypes = extractFieldTyp...
3.68
hbase_FavoredStochasticBalancer_getRandomGenerator
/** Returns any candidate generator in random */ @Override protected CandidateGenerator getRandomGenerator() { return candidateGenerators.get(ThreadLocalRandom.current().nextInt(candidateGenerators.size())); }
3.68
hbase_BucketAllocator_allocate
/** * Allocate a block in this bucket, return the offset representing the position in physical * space * @return the offset in the IOEngine */ public long allocate() { assert freeCount > 0; // Else should not have been called assert sizeIndex != -1; ++usedCount; long offset = baseOffset + (freeList[--freeCo...
3.68
hadoop_IteratorSelector_getPartition
/** * The partition for this iterator selector. * @return partition */ public String getPartition() { return this.partition; }
3.68
querydsl_Expressions_dateOperation
/** * Create a new Operation expression * * @param type type of expression * @param operator operator * @param args operation arguments * @return operation expression */ public static <T extends Comparable<?>> DateOperation<T> dateOperation(Class<? extends T> type, Operator operator, Expression<?>... arg...
3.68
framework_DateFieldElement_getDate
/** * Gets the value as a LocalDate object. * * @return the current value as a date object, or null if a date is not set * or if the text field contains an invalid date */ public LocalDate getDate() { String value = getISOValue(); if (value == null) { return null; } return LocalDate...
3.68
flink_WritableSavepoint_removeOperator
/** * Drop an existing operator from the savepoint. * * @param uid The uid of the operator. * @return A modified savepoint. */ @SuppressWarnings("unchecked") public F removeOperator(String uid) { metadata.removeOperator(uid); return (F) this; }
3.68
flink_SingleInputOperator_clearInputs
/** Removes all inputs. */ public void clearInputs() { this.input = null; }
3.68
hudi_CLIUtils_getTimelineInRange
/** * Gets a {@link HoodieDefaultTimeline} instance containing the instants in the specified range. * * @param startTs Start instant time. * @param endTs End instant time. * @param includeArchivedTimeline Whether to include intants from the archived timeline. * @return a {@link H...
3.68
querydsl_Expressions_enumOperation
/** * Create a new Enum operation expression * * @param type type of expression * @param operator operator * @param args operation arguments * @param <T> type of expression * @return operation expression */ public static <T extends Enum<T>> EnumOperation<T> enumOperation(Class<? extends T> type, Operator operat...
3.68
framework_Tree_setHtmlContentAllowed
/** * Sets whether html is allowed in the item captions. If set to * <code>true</code>, the captions are passed to the browser as html and the * developer is responsible for ensuring no harmful html is used. If set to * <code>false</code>, the content is passed to the browser as plain text. * The default setting i...
3.68
flink_HardwareDescription_getNumberOfCPUCores
/** * Returns the number of CPU cores available to the JVM on the compute node. * * @return the number of CPU cores available to the JVM on the compute node */ public int getNumberOfCPUCores() { return this.numberOfCPUCores; }
3.68
graphhopper_VectorTile_setGeometry
/** * <pre> * Contains a stream of commands and parameters (vertices). * A detailed description on geometry encoding is located in * section 4.3 of the specification. * </pre> * * <code>repeated uint32 geometry = 4 [packed = true];</code> */ public Builder setGeometry( int index, int value) { ensureGeome...
3.68
rocketmq-connect_WorkerSinkTask_errorRecordReporter
/** * error record reporter * * @return */ public WorkerErrorRecordReporter errorRecordReporter() { return errorRecordReporter; }
3.68
hadoop_AbstractS3AStatisticsSource_setIOStatistics
/** * Setter. * this must be called in the subclass constructor with * whatever * @param statistics statistics to set */ protected void setIOStatistics(final IOStatisticsStore statistics) { this.ioStatistics = statistics; }
3.68
zxing_BitMatrix_getTopLeftOnBit
/** * This is useful in detecting a corner of a 'pure' barcode. * * @return {@code x,y} coordinate of top-left-most 1 bit, or null if it is all white */ public int[] getTopLeftOnBit() { int bitsOffset = 0; while (bitsOffset < bits.length && bits[bitsOffset] == 0) { bitsOffset++; } if (bitsOffset == bits...
3.68
flink_SkipListUtils_findPredecessor
/** * Find the predecessor node for the given key at the given level. The key is in the memory * segment positioning at the given offset. * * @param keySegment memory segment which contains the key. * @param keyOffset offset of the key in the memory segment. * @param level the level. * @param levelIndexHeader th...
3.68
dubbo_ProtobufTypeBuilder_validateMapType
/** * 1. Unsupported Map with key type is not String <br/> * Bytes is a primitive type in Proto, transform to ByteString.class in java<br/> * * @param fieldName * @param typeName * @return */ private void validateMapType(String fieldName, String typeName) { Matcher matcher = MAP_PATTERN.matcher(typeName); ...
3.68
hadoop_Duration_start
/** * Start * @return self */ public Duration start() { start = now(); return this; }
3.68
hbase_BloomFilterChunk_writeBloom
/** * Writes just the bloom filter to the output array * @param out OutputStream to place bloom * @throws IOException Error writing bloom array */ public void writeBloom(final DataOutput out) throws IOException { if (!this.bloom.hasArray()) { throw new IOException("Only writes ByteBuffer with underlying array...
3.68
framework_VTabsheet_getLeftGap
/** * Returns the gap between the leftmost visible tab and the tab container * edge. By default there should be no gap at all, unless the tabs have been * right-aligned by styling (e.g. Valo style {@code right-aligned-tabs} or * {@code centered-tabs}). * * @return the left gap (in pixels), or zero if no gap */ p...
3.68
druid_ListDG_DFS
/* * 深度优先搜索遍历图 */ public void DFS() { boolean[] visited = new boolean[mVexs.size()]; // 顶点访问标记 // 初始化所有顶点都没有被访问 for (int i = 0; i < mVexs.size(); i++) { visited[i] = false; } for (int i = 0; i < mVexs.size(); i++) { if (!visited[i]) { DFS(i, visited); } ...
3.68
hadoop_ActiveAuditManagerS3A_afterUnmarshalling
/** * Forward to the inner span. * {@inheritDoc} */ @Override public void afterUnmarshalling(Context.AfterUnmarshalling context, ExecutionAttributes executionAttributes) { span.afterUnmarshalling(context, executionAttributes); }
3.68
flink_TimeWindow_modInverse
/** Compute the inverse of (odd) x mod 2^32. */ private int modInverse(int x) { // Cube gives inverse mod 2^4, as x^4 == 1 (mod 2^4) for all odd x. int inverse = x * x * x; // Newton iteration doubles correct bits at each step. inverse *= 2 - x * inverse; inverse *= 2 - x * inverse; inverse *= 2...
3.68
hbase_CleanerChore_sortByConsumedSpace
/** * Sort the given list in (descending) order of the space each element takes * @param dirs the list to sort, element in it should be directory (not file) */ private void sortByConsumedSpace(List<FileStatus> dirs) { if (dirs == null || dirs.size() < 2) { // no need to sort for empty or single directory r...
3.68
flink_InPlaceMutableHashTable_emit
/** Emits all elements currently held by the table to the collector. */ public void emit() throws IOException { T record = buildSideSerializer.createInstance(); EntryIterator iter = getEntryIterator(); while ((record = iter.next(record)) != null && !closed) { outputCollector.collect(record); ...
3.68
flink_Path_initialize
/** * Initializes a path object given the scheme, authority and path string. * * @param scheme the scheme string. * @param authority the authority string. * @param path the path string. */ private void initialize(String scheme, String authority, String path) { try { this.uri = new URI(scheme, authorit...
3.68
hbase_SnapshotDescriptionUtils_getSnapshotRootDir
/** * Get the snapshot root directory. All the snapshots are kept under this directory, i.e. * ${hbase.rootdir}/.snapshot * @param rootDir hbase root directory * @return the base directory in which all snapshots are kept */ public static Path getSnapshotRootDir(final Path rootDir) { return new Path(rootDir, HCon...
3.68