name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
querydsl_Expressions_dslPath
/** * Create a new Path expression * * @param type type of expression * @param metadata path metadata * @param <T> type of expression * @return path expression */ public static <T> DslPath<T> dslPath(Class<? extends T> type, PathMetadata metadata) { return new DslPath<T>(type, metadata); }
3.68
hadoop_BlockGrouper_anyRecoverable
/** * Given a BlockGroup, tell if any of the missing blocks can be recovered, * to be called by ECManager * @param blockGroup a blockGroup that may contain erased blocks but not sure * recoverable or not * @return true if any erased block recoverable, false otherwise */ public boolean anyRecover...
3.68
hadoop_LoggingAuditor_deactivate
/** * Log at TRACE. */ @Override public void deactivate() { LOG.trace("[{}] {} Deactivate {}", currentThreadID(), getSpanId(), getDescription()); }
3.68
hadoop_SimpleExponentialSmoothing_isDataStagnated
/** * checks if the task is hanging up. * @param timeStamp current time of the scan. * @return true if we have number of samples {@literal >} kMinimumReads and the * record timestamp has expired. */ public boolean isDataStagnated(final long timeStamp) { ForecastRecord rec = forecastRefEntry.get(); if (rec != n...
3.68
hudi_HoodieTimeline_isInClosedOpenRange
/** * Return true if specified timestamp is in range [startTs, endTs). */ static boolean isInClosedOpenRange(String timestamp, String startTs, String endTs) { return HoodieTimeline.compareTimestamps(timestamp, GREATER_THAN_OR_EQUALS, startTs) && HoodieTimeline.compareTimestamps(timestamp, LESSER_THAN, endTs);...
3.68
pulsar_FunctionRuntimeManager_removeAssignments
/** * Removes a collection of assignments. * * @param assignments assignments to remove */ public synchronized void removeAssignments(Collection<Assignment> assignments) { for (Assignment assignment : assignments) { this.deleteAssignment(assignment); } }
3.68
morf_AliasedField_assetImmutableDslDisabled
/** * TODO remove when we remove the old mutable behaviour. */ public static void assetImmutableDslDisabled() { if (immutableDslEnabled()) { throw new UnsupportedOperationException("Cannot modify a statement when immutability is configured."); } }
3.68
hadoop_ManifestCommitterSupport_createManifestOutcome
/** * Create success/outcome data. * @param stageConfig configuration. * @param stage * @return a _SUCCESS object with some diagnostics. */ public static ManifestSuccessData createManifestOutcome( StageConfig stageConfig, String stage) { final ManifestSuccessData outcome = new ManifestSuccessData(); outcom...
3.68
flink_MemorySegment_getFloatBigEndian
/** * Reads a single-precision floating point value (32bit, 4 bytes) from the given position, in * big endian byte order. This method's speed depends on the system's native byte order, and it * is possibly slower than {@link #getFloat(int)}. For most cases (such as transient storage in * memory or serialization for...
3.68
zilla_HpackContext_staticIndex10
// Index in static table for the given name of length 10 private static int staticIndex10(DirectBuffer name) { switch (name.getByte(9)) { case 'e': if (STATIC_TABLE[55].name.equals(name)) // set-cookie { return 55; } break; case 't': if (STAT...
3.68
dubbo_DubboComponentScanRegistrar_registerServiceAnnotationPostProcessor
/** * Registers {@link ServiceAnnotationPostProcessor} * * @param packagesToScan packages to scan without resolving placeholders * @param registry {@link BeanDefinitionRegistry} * @since 2.5.8 */ private void registerServiceAnnotationPostProcessor(Set<String> packagesToScan, BeanDefinitionRegistry registry)...
3.68
hbase_MasterSnapshotVerifier_verifyRegionInfo
/** * Verify that the regionInfo is valid * @param region the region to check * @param manifest snapshot manifest to inspect */ private void verifyRegionInfo(final RegionInfo region, final SnapshotRegionManifest manifest) throws IOException { RegionInfo manifestRegionInfo = ProtobufUtil.toRegionInfo(manifest....
3.68
hbase_HFileBlock_readAtOffset
/** * Does a positional read or a seek and read into the given byte buffer. We need take care that * we will call the {@link ByteBuff#release()} for every exit to deallocate the ByteBuffers, * otherwise the memory leak may happen. * @param dest destination buffer * @param size size of rea...
3.68
hadoop_OBSBlockOutputStream_close
/** * Close the stream. * * <p>This will not return until the upload is complete or the attempt to * perform the upload has failed. Exceptions raised in this method are * indicative that the write has failed and data is at risk of being lost. * * @throws IOException on any failure. */ @Override public synchroni...
3.68
hadoop_HdfsLocatedFileStatus_getErasureCodingPolicy
/** * Get the erasure coding policy if it's set. * @return the erasure coding policy */ @Override public ErasureCodingPolicy getErasureCodingPolicy() { return ecPolicy; }
3.68
flink_KeyGroupsStateHandle_getOffsetForKeyGroup
/** * @param keyGroupId the id of a key-group. the id must be contained in the range of this * handle. * @return offset to the position of data for the provided key-group in the stream referenced by * this state handle */ public long getOffsetForKeyGroup(int keyGroupId) { return groupRangeOffsets.getKe...
3.68
hbase_TableDescriptorBuilder_removeColumnFamily
/** * Removes the ColumnFamilyDescriptor with name specified by the parameter column from the table * descriptor * @param column Name of the column family to be removed. * @return Column descriptor for the passed family name or the family on passed in column. */ public ColumnFamilyDescriptor removeColumnFamily(fin...
3.68
framework_AbstractEmbedded_getSource
/** * Get the object source resource. * * @return the source */ public Resource getSource() { return getResource(AbstractEmbeddedState.SOURCE_RESOURCE); }
3.68
flink_JsonRowSerializationSchema_build
/** * Finalizes the configuration and checks validity. * * @return Configured {@link JsonRowSerializationSchema} */ public JsonRowSerializationSchema build() { checkArgument(typeInfo != null, "typeInfo should be set."); return new JsonRowSerializationSchema(typeInfo); }
3.68
morf_SchemaModificationAdapter_open
/** * @see org.alfasoftware.morf.dataset.DataSetAdapter#open() */ @Override public void open() { super.open(); schemaResource = databaseDataSetConsumer.connectionResources.openSchemaResource(databaseDataSetConsumer.getDataSource()); try { connection = databaseDataSetConsumer.getDataSource().getConnection();...
3.68
dubbo_ClassUtils_forName
/** * Replacement for <code>Class.forName()</code> that also returns Class * instances for primitives (like "int") and array class names (like * "String[]"). * * @param name the name of the Class * @param classLoader the class loader to use (may be <code>null</code>, * which indicates t...
3.68
hibernate-validator_AbstractMethodOverrideCheck_isJavaLangObjectOrNull
/** * Determine if the provided {@link TypeElement} represents a {@link java.lang.Object} or is {@code null}. * * @param typeElement the element to check * @return {@code true} if the provided element is {@link java.lang.Object} or is {@code null}, {@code false} otherwise */ private boolean isJavaLangObjectOrNull(...
3.68
framework_ContainerOrderedWrapper_removeItem
/** * Removes an Item specified by the itemId from the underlying container and * from the ordering. * * @param itemId * the ID of the Item to be removed. * @return <code>true</code> if the operation succeeded, <code>false</code> * if not * @throws UnsupportedOperationException * ...
3.68
flink_MailboxProcessor_runMailboxStep
/** * Execute a single (as small as possible) step of the mailbox. * * @return true if something was processed. */ @VisibleForTesting public boolean runMailboxStep() throws Exception { suspended = !mailboxLoopRunning; if (processMail(mailbox, true)) { return true; } if (isDefaultActionAvail...
3.68
hadoop_Preconditions_getDefaultNullMSG
/* @VisibleForTesting */ static String getDefaultNullMSG() { return VALIDATE_IS_NOT_NULL_EX_MESSAGE; }
3.68
hbase_StateMachineProcedure_setNextState
/** * Set the next state for the procedure. * @param stateId the ordinal() of the state enum (or state id) */ private void setNextState(final int stateId) { if (states == null || states.length == stateCount) { int newCapacity = stateCount + 8; if (states != null) { states = Arrays.copyOf(states, newC...
3.68
MagicPlugin_EntityExtraData_isSplittable
// Here for slime-like mobs public boolean isSplittable() { return true; }
3.68
framework_VTabsheet_updateTabScroller
/** * Layouts the tab-scroller elements, and applies styles. */ private void updateTabScroller() { if (!isDynamicWidth()) { tabs.getStyle().setWidth(100, Unit.PCT); } // Make sure scrollerIndex is valid boolean changed = false; if (scrollerIndex < 0 || scrollerIndex > tb.getTabCount()) { ...
3.68
hudi_HoodieTimeline_getLogCompactionRequestedInstant
// Returns Log compaction requested instant static HoodieInstant getLogCompactionRequestedInstant(final String timestamp) { return new HoodieInstant(State.REQUESTED, LOG_COMPACTION_ACTION, timestamp); }
3.68
pulsar_AbstractSinkRecord_cumulativeAck
/** * Some sink sometimes wants to control the ack type. */ public void cumulativeAck() { if (sourceRecord instanceof PulsarRecord) { PulsarRecord pulsarRecord = (PulsarRecord) sourceRecord; pulsarRecord.cumulativeAck(); } else { throw new RuntimeException("SourceRecord class type must...
3.68
hbase_MasterObserver_postRequestLock
/** * Called after new LockProcedure is queued. * @param ctx the environment to interact with the framework and master */ default void postRequestLock(ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace, TableName tableName, RegionInfo[] regionInfos, String description) throws IOException { }
3.68
AreaShop_RentingRegionEvent_isExtending
/** * Check if the player is extending the region or renting it for the first time. * @return true if the player tries to extend the region, false if he tries to rent it the first time */ public boolean isExtending() { return extending; }
3.68
flink_CatalogCalciteSchema_getSubSchema
/** * Look up a sub-schema (database) by the given sub-schema name. * * @param schemaName name of sub-schema to look up * @return the sub-schema with a given database name, or null */ @Override public Schema getSubSchema(String schemaName) { if (catalogManager.schemaExists(catalogName, schemaName)) { i...
3.68
flink_AbstractBlobCache_getFileInternal
/** * Returns local copy of the file for the BLOB with the given key. * * <p>The method will first attempt to serve the BLOB from its local cache. If the BLOB is not * in the cache, the method will try to download it from this cache's BLOB server via a * distributed BLOB store (if available) or direct end-to-end d...
3.68
hadoop_RpcProgramPortmap_getport
/** * Given a program number "prog", version number "vers", and transport * protocol number "prot", this procedure returns the port number on which the * program is awaiting call requests. A port value of zeros means the program * has not been registered. The "port" field of the argument is ignored. */ private XDR...
3.68
framework_ApplicationConnection_showError
/** * Shows an error notification. * * @param details * Optional details. * @param message * An ErrorMessage describing the error. */ protected void showError(String details, ErrorMessage message) { VNotification.showError(this, message.getCaption(), message.getMessage(), de...
3.68
hudi_HoodieMetaSyncOperations_updateSerdeProperties
/** * Update the SerDe properties in metastore. * * @return true if properties updated. */ default boolean updateSerdeProperties(String tableName, Map<String, String> serdeProperties, boolean useRealtimeFormat) { return false; }
3.68
hbase_FileLink_handleAccessLocationException
/** * Handle exceptions which are thrown when access locations of file link * @param fileLink the file link * @param newException the exception caught by access the current location * @param previousException the previous exception caught by access the other locations * @return return AccessControlEx...
3.68
framework_BrowserInfo_requiresTouchScrollDelegate
/** * Checks if the browser is capable of handling scrolling natively or if a * touch scroll helper is needed for scrolling. * * @return true if browser needs a touch scroll helper, false if the browser * can handle scrolling natively */ public boolean requiresTouchScrollDelegate() { if (!isTouchDevic...
3.68
rocketmq-connect_AvroDatumWriterFactory_getDatumWriter
/** * get datum writer * * @param value * @param schema * @return */ private DatumWriter<?> getDatumWriter(Object value, Schema schema) { if (value instanceof SpecificRecord) { return new SpecificDatumWriter<>(schema); } else if (useSchemaReflection) { return new ReflectDatumWriter<>(schem...
3.68
hbase_MobUtils_removeMobFiles
/** * Archives the mob files. * @param conf The current configuration. * @param fs The current file system. * @param tableName The table name. * @param tableDir The table directory. * @param family The name of the column family. * @param storeFiles The files to be deleted. */ public static ...
3.68
framework_WindowWaiAriaRoles_setup
/* * (non-Javadoc) * * @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server. * VaadinRequest) */ @Override protected void setup(VaadinRequest request) { Button closeButton = new Button("Close windows"); closeButton.addClickListener(event -> { while (!windows.isEmpty()) { ...
3.68
morf_InsertStatementBuilder_getSelectStatement
/** * Gets the select statement which will generate the data for the insert. * * @return the select statement to use, or null if none is specified. */ SelectStatement getSelectStatement() { return selectStatement; }
3.68
hbase_MetricsConnection_getRpcCounters
/** rpcCounters metric */ public ConcurrentMap<String, Counter> getRpcCounters() { return rpcCounters; }
3.68
hbase_SyncTable_findNextKeyHashPair
/** * Attempt to read the next source key/hash pair. If there are no more, set nextSourceKey to * null */ private void findNextKeyHashPair() throws IOException { boolean hasNext = sourceHashReader.next(); if (hasNext) { nextSourceKey = sourceHashReader.getCurrentKey(); } else { // no more keys - last h...
3.68
pulsar_FieldParser_stringToBoolean
/** * Converts String to Boolean. * * @param value * The String to be converted. * @return The converted Boolean value. */ public static Boolean stringToBoolean(String value) { return Boolean.valueOf(value); }
3.68
flink_TypeInference_typedArguments
/** @see #typedArguments(List) */ public Builder typedArguments(DataType... argumentTypes) { return typedArguments(Arrays.asList(argumentTypes)); }
3.68
dubbo_DefaultApplicationDeployer_useRegistryAsConfigCenterIfNecessary
/** * For compatibility purpose, use registry as the default config center when * there's no config center specified explicitly and * useAsConfigCenter of registryConfig is null or true */ private void useRegistryAsConfigCenterIfNecessary() { // we use the loading status of DynamicConfiguration to decide whethe...
3.68
flink_RemoteInputChannel_getInflightBuffersUnsafe
/** * Returns a list of buffers, checking the first n non-priority buffers, and skipping all * events. */ private List<Buffer> getInflightBuffersUnsafe(long checkpointId) { assert Thread.holdsLock(receivedBuffers); checkState(checkpointId == lastBarrierId || lastBarrierId == NONE); final List<Buffer> i...
3.68
hbase_MetricsConnection_incrConnectionCount
/** Increment the connection count of the metrics within a scope */ private void incrConnectionCount() { connectionCount.inc(); }
3.68
flink_BlobServer_putInputStream
/** * Uploads the data from the given input stream for the given job to the BLOB server. * * @param jobId the ID of the job the BLOB belongs to * @param inputStream the input stream to read the data from * @param blobType whether to make the data permanent or transient * @return the computed BLOB key identifying ...
3.68
hadoop_RLESparseResourceAllocation_getEarliestStartTime
/** * Get the timestamp of the earliest resource allocation. * * @return the timestamp of the first resource allocation */ public long getEarliestStartTime() { readLock.lock(); try { if (cumulativeCapacity.isEmpty()) { return -1; } else { return cumulativeCapacity.firstKey(); } } final...
3.68
hudi_ExecutorFactory_isBufferingRecords
/** * Checks whether configured {@link HoodieExecutor} buffer records (for ex, by holding them * in the queue) */ public static boolean isBufferingRecords(HoodieWriteConfig config) { ExecutorType executorType = config.getExecutorType(); switch (executorType) { case BOUNDED_IN_MEMORY: case DISRUPTOR: ...
3.68
dubbo_RestProtocol_getContextPath
/** * getPath() will return: [contextpath + "/" +] path * 1. contextpath is empty if user does not set through ProtocolConfig or ProviderConfig * 2. path will never be empty, its default value is the interface name. * * @return return path only if user has explicitly gave then a value. */ private String getContex...
3.68
hadoop_KMSAuditLogger_setEndTime
/** * Set the time this audit event is finished. */ void setEndTime(long endTime) { this.endTime = endTime; }
3.68
framework_Tree_removeActionHandler
/** * Removes an action handler. * * @see com.vaadin.event.Action.Container#removeActionHandler(Action.Handler) */ @Override public void removeActionHandler(Action.Handler actionHandler) { if (actionHandlers != null && actionHandlers.contains(actionHandler)) { actionHandlers.remove(actionHandler); ...
3.68
flink_InPlaceMutableHashTable_getCapacity
/** * Gets the total capacity of this hash table, in bytes. * * @return The hash table's total capacity. */ public long getCapacity() { return numAllMemorySegments * (long) segmentSize; }
3.68
flink_DataSinkTask_getLogString
/** * Utility function that composes a string for logging purposes. The string includes the given * message and the index of the task in its task group together with the number of tasks in the * task group. * * @param message The main message for the log. * @return The string ready for logging. */ private String...
3.68
framework_LegacyCommunicationManager_getConnector
/** * @deprecated As of 7.1. In 7.2 and later, use * {@link ConnectorTracker#getConnector(String) * uI.getConnectorTracker().getConnector(connectorId)} instead. * See ticket #11411. */ @Deprecated public ClientConnector getConnector(UI uI, String connectorId) { return uI.get...
3.68
hbase_HRegionServer_closeRegionIgnoreErrors
/** * Try to close the region, logs a warning on failure but continues. * @param region Region to close */ private void closeRegionIgnoreErrors(RegionInfo region, final boolean abort) { try { if (!closeRegion(region.getEncodedName(), abort, null)) { LOG .warn("Failed to close " + region.getRegion...
3.68
hbase_LeaseManager_resetExpirationTime
/** * Resets the expiration time of the lease. */ public void resetExpirationTime() { this.expirationTime = EnvironmentEdgeManager.currentTime() + this.leaseTimeoutPeriod; }
3.68
flink_FineGrainedSlotManager_freeSlot
/** * Free the given slot from the given allocation. If the slot is still allocated by the given * allocation id, then the slot will be freed. * * @param slotId identifying the slot to free, will be ignored * @param allocationId with which the slot is presumably allocated */ @Override public void freeSlot(SlotID ...
3.68
framework_AbstractBeanContainer_addNestedContainerProperty
/** * Adds a nested container property for the container, e.g. * "manager.address.street". * * All intermediate getters must exist and should return non-null values * when the property value is accessed. If an intermediate getter returns * null, a null value will be returned. * * @see NestedMethodProperty * *...
3.68
hbase_LogRollRegionServerProcedureManager_stop
/** * Close <tt>this</tt> and all running backup procedure tasks * @param force forcefully stop all running tasks * @throws IOException exception */ @Override public void stop(boolean force) throws IOException { if (!started) { return; } String mode = force ? "abruptly" : "gracefully"; LOG.info("Stoppin...
3.68
hbase_CatalogJanitor_scan
/** * Run janitorial scan of catalog <code>hbase:meta</code> table looking for garbage to collect. * @return How many items gc'd whether for merge or split. Returns -1 if previous scan is in * progress. */ public int scan() throws IOException { int gcs = 0; try { if (!alreadyRunning.compareAndSet(fa...
3.68
hbase_ProcedureStoreTracker_lookupClosestNode
/** * lookup the node containing the specified procId. * @param node cached node to check before doing a lookup * @param procId the procId to lookup * @return the node that may contains the procId or null */ private BitSetNode lookupClosestNode(final BitSetNode node, final long procId) { if (node != null && no...
3.68
hadoop_ResourceBundles_getCounterGroupName
/** * Get the counter group display name * @param group the group name to lookup * @param defaultValue of the group * @return the group display name */ public static String getCounterGroupName(String group, String defaultValue) { return getValue(group, "CounterGroupName", "", defaultValue); }
3.68
pulsar_NamespaceIsolationPolicies_getPolicyByName
/** * Access method to get the namespace isolation policy by the policy name. * * @param policyName * @return */ public NamespaceIsolationPolicy getPolicyByName(String policyName) { if (policies.get(policyName) == null) { return null; } return new NamespaceIsolationPolicyImpl(policies.get(polic...
3.68
hadoop_TaskId_toString
/** * Print method for TaskId. * @return : Full TaskId which is TaskId_prefix + jobId + _ + TaskId */ public final String toString() { return TASK_ID_PREFIX + jobId.getID() + "_" + taskId; }
3.68
hadoop_OperationDuration_toString
/** * Return the duration as {@link #humanTime(long)}. * @return a printable duration. */ @Override public String toString() { return getDurationString(); }
3.68
flink_LastDatedValueFunction_accumulate
/** * Generic runtime function that will be called with different kind of instances for {@code * input} depending on actual call in the query. */ public void accumulate(Accumulator<T> acc, T input, LocalDate date) { if (input != null && (acc.date == null || date.isAfter(acc.date))) { acc.value = input; ...
3.68
hbase_MetaTableAccessor_getTargetServerName
/** * Returns the {@link ServerName} from catalog table {@link Result} where the region is * transitioning on. It should be the same as * {@link CatalogFamilyFormat#getServerName(Result,int)} if the server is at OPEN state. * @param r Result to pull the transitioning server name from * @return A ServerName instanc...
3.68
flink_HyperLogLogPlusPlus_updateByHashcode
/** Update the HLL++ buffer. */ public void updateByHashcode(HllBuffer buffer, long hash) { // Determine the index of the register we are going to use. int idx = (int) (hash >>> idxShift); // Determine the number of leading zeros in the remaining bits 'w'. long pw = Long.numberOfLeadingZeros((hash << p...
3.68
hadoop_TimelineEntityType_isChild
/** * Whether the input type can be a child of this entity. * * @param type entity type. * @return true, if this entity type is child of passed entity type, false * otherwise. */ public boolean isChild(TimelineEntityType type) { switch (this) { case YARN_CLUSTER: return YARN_FLOW_RUN == type || YARN_A...
3.68
framework_VDebugWindow_resetTimer
/** * Resets the timer. * * @return Milliseconds elapsed since the timer was last reset. */ static int resetTimer() { int sinceLast = lastReset.elapsedMillis(); lastReset = null; return sinceLast; }
3.68
hbase_ReplicationSourceManager_getStats
/** * Get a string representation of all the sources' metrics */ public String getStats() { StringBuilder stats = new StringBuilder(); // Print stats that apply across all Replication Sources stats.append("Global stats: "); stats.append("WAL Edits Buffer Used=").append(getTotalBufferUsed()).append("B, Limit="...
3.68
hbase_HRegion_waitForFlushesAndCompactions
/** Wait for all current flushes and compactions of the region to complete */ // TODO HBASE-18906. Check the usage (if any) in Phoenix and expose this or give alternate way for // Phoenix needs. public void waitForFlushesAndCompactions() { synchronized (writestate) { if (this.writestate.readOnly) { // we sh...
3.68
open-banking-gateway_ResultBody_getBody
/** * Body of the results - i.e. account list. */ @JsonIgnore default Object getBody() { return null; }
3.68
hadoop_BlockReconstructionWork_setNotEnoughRack
/** * Mark that the reconstruction work is to replicate internal block to a new * rack. */ void setNotEnoughRack() { notEnoughRack = true; }
3.68
flink_HiveInspectors_toInspectors
/** Get an array of ObjectInspector from the give array of args and their types. */ public static ObjectInspector[] toInspectors( HiveShim hiveShim, Object[] args, DataType[] argTypes) { assert args.length == argTypes.length; ObjectInspector[] argumentInspectors = new ObjectInspector[argTypes.length]; ...
3.68
hadoop_BlockBlobAppendStream_maybeThrowFirstError
/** * Throw the first error caught if it has not been raised already * @throws IOException if one is caught and needs to be thrown. */ private void maybeThrowFirstError() throws IOException { if (firstError.get() != null) { firstErrorThrown = true; throw firstError.get(); } }
3.68
hbase_ParseFilter_getFilterArguments
/** * Returns the arguments of the filter from the filter string * <p> * @param filterStringAsByteArray filter string given by the user * @return an ArrayList containing the arguments of the filter in the filter string */ public static ArrayList<byte[]> getFilterArguments(byte[] filterStringAsByteArray) { int ar...
3.68
framework_AbsoluteLayout_replaceComponent
/** * Replaces one component with another one. The new component inherits the * old components position. */ @Override public void replaceComponent(Component oldComponent, Component newComponent) { ComponentPosition position = getPosition(oldComponent); removeComponent(oldComponent); addComponent(...
3.68
hbase_Result_size
/** Returns the size of the underlying Cell [] */ public int size() { return this.cells == null ? 0 : this.cells.length; }
3.68
hbase_BufferedMutatorOverAsyncBufferedMutator_getHostnameAndPort
// not always work, so may return an empty string private String getHostnameAndPort(Throwable error) { Matcher matcher = ADDR_MSG_MATCHER.matcher(error.getMessage()); if (matcher.matches()) { return matcher.group(1); } else { return ""; } }
3.68
framework_Button_getCustomAttributes
/* * (non-Javadoc) * * @see com.vaadin.ui.AbstractComponent#getCustomAttributes() */ @Override protected Collection<String> getCustomAttributes() { Collection<String> result = super.getCustomAttributes(); result.add(DESIGN_ATTR_PLAIN_TEXT); result.add("caption"); result.add("icon-alt"); result.a...
3.68
flink_ResultPartitionType_isBounded
/** * Whether this partition uses a limited number of (network) buffers or not. * * @return <tt>true</tt> if the number of buffers should be bound to some limit */ public boolean isBounded() { return isBounded; }
3.68
framework_Window_getAssistiveDescription
/** * Gets the components that are used as assistive description. Text * contained in these components will be read by assistive devices when the * window is opened. * * @return array of previously set components */ public Component[] getAssistiveDescription() { Connector[] contentDescription = getState(false...
3.68
hadoop_OBSFileSystem_getDefaultBlockSize
/** * Imitate HDFS to return the number of bytes that large input files should be * optimally split into to minimize I/O time. The given path will be used to * locate the actual filesystem. The full path does not have to exist. * * @param f path of file * @return the default block size for the path's filesystem ...
3.68
pulsar_MultiTopicsConsumerImpl_topicNamesValid
// Check topics are valid. // - each topic is valid, // - topic names are unique. private static boolean topicNamesValid(Collection<String> topics) { checkState(topics != null && topics.size() >= 1, "topics should contain more than 1 topic"); Optional<String> result = topics.stream() .filte...
3.68
hbase_RegionPlacementMaintainer_transform
/** * Copy a given matrix into a new matrix, transforming each row index and each column index * according to the randomization scheme that was created at construction time. * @param matrix the cost matrix to transform * @return a new matrix with row and column indices transformed */ public float[][] transform(flo...
3.68
framework_AbstractDateFieldElement_setISOValue
/** * Sets the value of the date field as a ISO8601 compatible string * (yyyy-MM-dd or yyyy-MM-dd'T'HH:mm:ss depending on whether the element * supports time). * * @param isoDateValue * the date in ISO-8601 format * @since 8.1.0 */ protected void setISOValue(String isoDateValue) { getCommandExecu...
3.68
hbase_LocalHBaseCluster_getMaster
/** Returns the HMaster thread */ public HMaster getMaster(int serverNumber) { return masterThreads.get(serverNumber).getMaster(); }
3.68
framework_AbstractComponentConnector_registerTouchHandlers
/** * The new default behavior is for long taps to fire a contextclick event if * there's a contextclick listener attached to the component. * * If you do not want this in your component, override this with a blank * method to get rid of said behavior. * * Some Vaadin Components already handle the long tap as a ...
3.68
framework_DefaultEditorEventHandler_handleOpenEvent
/** * Opens the editor on the appropriate row if the received event is an open * event. The default implementation uses * {@link #isOpenEvent(EditorDomEvent) isOpenEvent}. * * @param event * the received event * @return true if this method handled the event and nothing else should be * done, ...
3.68
hadoop_ReencryptionHandler_submitCurrentBatch
/** * Submit the current batch to the thread pool. * * @param zoneId * Id of the EZ INode * @throws IOException * @throws InterruptedException */ @Override protected void submitCurrentBatch(final Long zoneId) throws IOException, InterruptedException { if (currentBatch.isEmpty()) { return; } ...
3.68
hudi_BootstrapIndex_useIndex
/** * Returns true if valid metadata bootstrap is present. * @return */ public final boolean useIndex() { if (isPresent()) { boolean validInstantTime = metaClient.getActiveTimeline().getCommitsTimeline().filterCompletedInstants().lastInstant() .map(i -> HoodieTimeline.compareTimestamps(i.getTimestamp()...
3.68
hbase_SteppingSplitPolicy_getSizeToCheck
/** * @return flushSize * 2 if there's exactly one region of the table in question found on this * regionserver. Otherwise max file size. This allows a table to spread quickly across * servers, while avoiding creating too many regions. */ @Override protected long getSizeToCheck(final int tableRegion...
3.68
hadoop_SuccessData_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("exception", thrown.toString()); diag...
3.68
framework_Table_setColumnFooter
/** * Sets the column footer caption. The column footer caption is the text * displayed beneath the column if footers have been set visible. * * @param propertyId * The properyId of the column * * @param footer * The caption of the footer */ public void setColumnFooter(Object propertyId, ...
3.68