name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
framework_DropTargetExtensionConnector_onDrop | /**
* Event handler for the {@code drop} event.
* <p>
* Override this method in case custom handling for the drop event is
* required. If the drop is allowed, the event should prevent default.
*
* @param event
* browser event to be handled
*/
protected void onDrop(Event event) {
NativeEvent nativ... | 3.68 |
flink_HiveTableSource_toHiveTablePartition | /** Convert partition to HiveTablePartition. */
public HiveTablePartition toHiveTablePartition(Partition partition) {
return HivePartitionUtils.toHiveTablePartition(partitionKeys, tableProps, partition);
} | 3.68 |
framework_BeanUtil_getPropertyDescriptor | /**
* Returns the property descriptor for the property of the given name and
* declaring class. The property name may refer to a nested property, e.g.
* "property.subProperty" or "property.subProperty1.subProperty2". The
* property must have a public read method (or a chain of read methods in
* case of a nested pr... | 3.68 |
hadoop_HAState_setState | /**
* Move from the existing state to a new state
* @param context HA context
* @param s new state
* @throws ServiceFailedException on failure to transition to new state.
*/
public void setState(HAContext context, HAState s) throws ServiceFailedException {
if (this == s) { // Already in the new state
return;... | 3.68 |
framework_VDragAndDropManager_startDrag | /**
* This method is used to start Vaadin client side drag and drop operation.
* Operation may be started by virtually any Widget.
* <p>
* Cancels possible existing drag. TODO figure out if this is always a bug
* if one is active. Maybe a good and cheap lifesaver thought.
* <p>
* If possible, method automaticall... | 3.68 |
hbase_RegionSplitCalculator_findBigRanges | /**
* Find specified number of top ranges in a big overlap group. It could return less if there are
* not that many top ranges. Once these top ranges are excluded, the big overlap group will be
* broken into ranges with no overlapping, or smaller overlapped groups, and most likely some
* holes.
* @param bigOverlap... | 3.68 |
framework_UnsupportedBrowserHandler_writeBrowserTooOldPage | /**
* Writes a page encouraging the user to upgrade to a more current browser.
*
* @param request
* @param response
* @throws IOException
*/
protected void writeBrowserTooOldPage(VaadinRequest request,
VaadinResponse response) throws IOException {
try (Writer page = response.getWriter()) {
Web... | 3.68 |
hadoop_AllocationFileQueueParser_loadQueue | /**
* Loads a queue from a queue element in the configuration file.
*/
private void loadQueue(String parentName, Element element,
QueueProperties.Builder builder) throws AllocationConfigurationException {
String queueName =
FairSchedulerUtilities.trimQueueName(element.getAttribute("name"));
if (queueNa... | 3.68 |
graphhopper_VectorTile_addFeatures | /**
* <pre>
* The actual features in this tile.
* </pre>
*
* <code>repeated .vector_tile.Tile.Feature features = 2;</code>
*/
public Builder addFeatures(
int index, vector_tile.VectorTile.Tile.Feature.Builder builderForValue) {
if (featuresBuilder_ == null) {
ensureFeaturesIsMutable();
features_.add... | 3.68 |
hbase_TableSplit_getScan | /**
* Returns a Scan object from the stored string representation.
* @return Returns a Scan object based on the stored scanner.
* @throws IOException throws IOException if deserialization fails
*/
public Scan getScan() throws IOException {
return TableMapReduceUtil.convertStringToScan(this.scan);
} | 3.68 |
hudi_HoodieTableConfig_getLogFileFormat | /**
* Get the log Storage Format.
*
* @return HoodieFileFormat for the log Storage format
*/
public HoodieFileFormat getLogFileFormat() {
return HoodieFileFormat.valueOf(getStringOrDefault(LOG_FILE_FORMAT));
} | 3.68 |
graphhopper_WaySegmentParser_setSplitNodeFilter | /**
* @param splitNodeFilter return true if the given OSM node should be duplicated to create an artificial edge
*/
public Builder setSplitNodeFilter(Predicate<ReaderNode> splitNodeFilter) {
waySegmentParser.splitNodeFilter = splitNodeFilter;
return this;
} | 3.68 |
dubbo_AbstractServiceDiscovery_update | /**
* Update assumes that DefaultServiceInstance and its attributes will never get updated once created.
* Checking hasExportedServices() before registration guarantees that at least one service is ready for creating the
* instance.
*/
@Override
public synchronized void update() throws RuntimeException {
if (is... | 3.68 |
framework_VAbstractTextualDate_hasChildFocus | /**
* Returns whether any of the child components has focus.
*
* @return {@code true} if any of the child component has focus,
* {@code false} otherwise
* @since 8.3
*/
protected boolean hasChildFocus() {
return false;
} | 3.68 |
hbase_Procedure_setNonceKey | /**
* Called by the ProcedureExecutor to set the value to the newly created procedure.
*/
protected void setNonceKey(NonceKey nonceKey) {
this.nonceKey = nonceKey;
} | 3.68 |
dubbo_RpcStatus_getSucceededMaxElapsed | /**
* get succeeded max elapsed.
*
* @return succeeded max elapsed.
*/
public long getSucceededMaxElapsed() {
return succeededMaxElapsed.get();
} | 3.68 |
framework_GridDragSourceConnector_getSelectedRowsInRange | /**
* Get all selected rows from a subset of rows defined by {@code range}.
*
* @param range
* Range of indexes.
* @return List of data of all selected rows in the given range.
*/
private List<JsonObject> getSelectedRowsInRange(Range range) {
List<JsonObject> selectedRows = new ArrayList<>();
... | 3.68 |
graphhopper_VectorTile_hasVersion | /**
* <pre>
* Any compliant implementation must first read the version
* number encoded in this message and choose the correct
* implementation for this version number before proceeding to
* decode other parts of this message.
* </pre>
*
* <code>required uint32 version = 15 [default = 1];</code>
*/
public bool... | 3.68 |
hbase_MultiRowMutationEndpoint_start | /**
* Stores a reference to the coprocessor environment provided by the
* {@link org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost} from the region where this
* coprocessor is loaded. Since this is a coprocessor endpoint, it always expects to be loaded on
* a table region, so always expects this to be an i... | 3.68 |
hbase_LogRollBackupSubprocedurePool_close | /**
* Attempt to cleanly shutdown any running tasks - allows currently running tasks to cleanly
* finish
*/
@Override
public void close() {
executor.shutdown();
} | 3.68 |
AreaShop_FileManager_checkRegionAdd | /**
* Check if a player can add a certain region as rent or buy region.
* @param sender The player/console that wants to add a region
* @param region The WorldGuard region to add
* @param world The world the ProtectedRegion is located in
* @param type The type the region should have in AreaShop
* @return The re... | 3.68 |
dubbo_AbstractConfig_checkDefault | /**
* Check and set default value for some fields.
* <p>
* This method will be called at the end of {@link #refresh()}, as a post-initializer.
* </p>
* <p>NOTE: </p>
* <p>
* To distinguish between user-set property values and default property values,
* do not initialize default value at field declare statement.... | 3.68 |
zxing_PDF417_determineDimensions | /**
* Determine optimal nr of columns and rows for the specified number of
* codewords.
*
* @param sourceCodeWords number of code words
* @param errorCorrectionCodeWords number of error correction code words
* @return dimension object containing cols as width and rows as height
*/
private int[] determineDimensio... | 3.68 |
hadoop_FlowRunRowKey_parseRowKey | /**
* Given the raw row key as bytes, returns the row key as an object.
* @param rowKey Byte representation of row key.
* @return A <cite>FlowRunRowKey</cite> object.
*/
public static FlowRunRowKey parseRowKey(byte[] rowKey) {
return new FlowRunRowKeyConverter().decode(rowKey);
} | 3.68 |
hadoop_ConnectionPool_getConnectionPoolId | /**
* Get the connection pool identifier.
*
* @return Connection pool identifier.
*/
protected ConnectionPoolId getConnectionPoolId() {
return this.connectionPoolId;
} | 3.68 |
framework_Escalator_getScrollPos | /**
* ScrollDestination case-specific handling logic.
*/
private static double getScrollPos(final ScrollDestination destination,
final double targetStartPx, final double targetEndPx,
final double viewportStartPx, final double viewportEndPx,
final double padding) {
final double viewportLen... | 3.68 |
flink_CopyOnWriteStateMap_isRehashing | /** Returns true, if an incremental rehash is in progress. */
@VisibleForTesting
boolean isRehashing() {
// if we rehash, the secondary table is not empty
return EMPTY_TABLE != incrementalRehashTable;
} | 3.68 |
hbase_MiniHBaseCluster_waitForActiveAndReadyMaster | /**
* Blocks until there is an active master and that master has completed initialization.
* @return true if an active master becomes available. false if there are no masters left.
*/
@Override
public boolean waitForActiveAndReadyMaster(long timeout) throws IOException {
List<JVMClusterUtil.MasterThread> mts;
lo... | 3.68 |
framework_DesignContext_twoWayMap | /**
* Creates a two-way mapping between key and value, i.e. adds key -> value
* to keyToValue and value -> key to valueToKey. If key was mapped to a
* value v different from the given value, the mapping from v to key is
* removed. Similarly, if value was mapped to some key k different from key,
* the mapping from ... | 3.68 |
flink_AvroParquetRecordFormat_createReader | /**
* Creates a new reader to read avro {@link GenericRecord} from Parquet input stream.
*
* <p>Several wrapper classes haven be created to Flink abstraction become compatible with the
* parquet abstraction. Please refer to the inner classes {@link AvroParquetRecordReader},
* {@link ParquetInputFile}, {@code FSDat... | 3.68 |
streampipes_DataStreamBuilder_protocol | /**
* Assigns a new {@link org.apache.streampipes.model.grounding.TransportProtocol} to the stream definition.
*
* @param protocol The transport protocol of the stream at runtime (e.g., Kafka or MQTT).
* Use {@link org.apache.streampipes.sdk.helpers.Protocols} to use some pre-defined protocols
* ... | 3.68 |
hudi_HoodieCompactor_validateRunningMode | // make sure that cfg.runningMode couldn't be null
private static void validateRunningMode(Config cfg) {
// --mode has a higher priority than --schedule
// If we remove --schedule option in the future we need to change runningMode default value to EXECUTE
if (StringUtils.isNullOrEmpty(cfg.runningMode)) {
cfg.... | 3.68 |
hbase_HFileBlock_getBufferWithoutHeader | /**
* Returns a buffer that does not include the header and checksum.
* @return the buffer with header skipped and checksum omitted.
*/
public ByteBuff getBufferWithoutHeader() {
ByteBuff dup = getBufferReadOnly();
return dup.position(headerSize()).slice();
} | 3.68 |
flink_NetUtils_ipAddressAndPortToUrlString | /**
* Encodes an IP address and port to be included in URL. in particular, this method makes sure
* that IPv6 addresses have the proper formatting to be included in URLs.
*
* @param address The address to be included in the URL.
* @param port The port for the URL address.
* @return The proper URL string encoded I... | 3.68 |
hbase_RegionCoprocessorHost_preClose | /**
* Invoked before a region is closed
* @param abortRequested true if the server is aborting
*/
public void preClose(final boolean abortRequested) throws IOException {
execOperation(new RegionObserverOperationWithoutResult() {
@Override
public void call(RegionObserver observer) throws IOException {
... | 3.68 |
morf_TableOutputter_record | /**
* @param row to add the record at
* @param worksheet to add the record to
* @param table that the record comes from
* @param record Record to serialise. This method is part of the old Cryo API.
*/
private void record(final int row, final WritableSheet worksheet, final Table table, Record record) {
int column... | 3.68 |
hbase_MobUtils_isReadEmptyValueOnMobCellMiss | /**
* Indicates whether return null value when the mob file is missing or corrupt. The information is
* set in the attribute "empty.value.on.mobcell.miss" of scan.
* @param scan The current scan.
* @return True if the readEmptyValueOnMobCellMiss is enabled.
*/
public static boolean isReadEmptyValueOnMobCellMiss(Sc... | 3.68 |
hadoop_FilterFileSystem_getUsed | /** Return the total size of all files from a specified path.*/
@Override
public long getUsed(Path path) throws IOException {
return fs.getUsed(path);
} | 3.68 |
hadoop_AzureBlobFileSystem_makeQualified | /**
* Qualify a path to one which uses this FileSystem and, if relative,
* made absolute.
* @param path to qualify.
* @return this path if it contains a scheme and authority and is absolute, or
* a new path that includes a path and authority and is fully qualified
* @see Path#makeQualified(URI, Path)
* @throws I... | 3.68 |
hadoop_ContainerReapContext_getUser | /**
* Get the user set for the context.
*
* @return the user set in the context.
*/
public String getUser() {
return user;
} | 3.68 |
framework_ValueChangeHandler_setValueChangeMode | /**
* Sets the value change mode to use.
*
* @see ValueChangeMode
*
* @param valueChangeMode
* the value change mode to use
*/
public void setValueChangeMode(ValueChangeMode valueChangeMode) {
this.valueChangeMode = valueChangeMode;
} | 3.68 |
querydsl_AbstractOracleQuery_startWith | /**
* START WITH specifies the root row(s) of the hierarchy.
*
* @param cond condition
* @return the current object
*/
public <A> C startWith(Predicate cond) {
return addFlag(Position.BEFORE_ORDER, START_WITH, cond);
} | 3.68 |
hadoop_TimelineDomain_getCreatedTime | /**
* Get the created time of the domain
*
* @return the created time of the domain
*/
@XmlElement(name = "createdtime")
public Long getCreatedTime() {
return createdTime;
} | 3.68 |
graphhopper_Path_forEveryEdge | /**
* Iterates over all edges in this path sorted from start to end and calls the visitor callback
* for every edge.
* <p>
*
* @param visitor callback to handle every edge. The edge is decoupled from the iterator and can
* be stored.
*/
public void forEveryEdge(EdgeVisitor visitor) {
int tmpNo... | 3.68 |
hadoop_FutureIO_unwrapInnerException | /**
* From the inner cause of an execution exception, extract the inner cause
* to an IOException, raising RuntimeExceptions and Errors immediately.
* <ol>
* <li> If it is an IOE: Return.</li>
* <li> If it is a {@link UncheckedIOException}: return the cause</li>
* <li> Completion/Execution Exceptions: extra... | 3.68 |
framework_TreeTable_getPreOrder | /**
* Preorder of ids currently visible
*
* @return
*/
private List<Object> getPreOrder() {
if (preOrder == null) {
preOrder = new ArrayList<Object>();
Collection<?> rootItemIds = getContainerDataSource()
.rootItemIds();
for (Object id : rootItemIds) {
preOrde... | 3.68 |
flink_TaskExecutorManager_allocateWorker | /**
* Tries to allocate a worker that can provide a slot with the given resource profile.
*
* @param requestedSlotResourceProfile desired slot profile
* @return an upper bound resource requirement that can be fulfilled by the new worker, if one
* was allocated
*/
public Optional<ResourceRequirement> allocateW... | 3.68 |
hadoop_FSDataOutputStreamBuilder_replication | /**
* Set replication factor.
*
* @param replica replica.
* @return Generics Type B.
*/
public B replication(short replica) {
replication = replica;
return getThisBuilder();
} | 3.68 |
flink_RemoteStorageScanner_watchSegment | /**
* Watch the segment for a specific subpartition in the {@link RemoteStorageScanner}.
*
* <p>If a segment with a larger or equal id already exists, the current segment won't be
* watched.
*
* <p>If a segment with a smaller segment id is still being watched, the current segment will
* replace it because the sm... | 3.68 |
hbase_BucketCache_bucketSizesAboveThresholdCount | /**
* Return the count of bucketSizeinfos still need free space
*/
private int bucketSizesAboveThresholdCount(float minFactor) {
BucketAllocator.IndexStatistics[] stats = bucketAllocator.getIndexStatistics();
int fullCount = 0;
for (int i = 0; i < stats.length; i++) {
long freeGoal = (long) Math.floor(stats... | 3.68 |
flink_SharedBufferAccessor_materializeMatch | /**
* Extracts the real event from the sharedBuffer with pre-extracted eventId.
*
* @param match the matched event's eventId.
* @return the event associated with the eventId.
*/
public Map<String, List<V>> materializeMatch(Map<String, List<EventId>> match) {
Map<String, List<V>> materializedMatch =
... | 3.68 |
hibernate-validator_UUIDValidator_extractVariant | /**
* Get the 3 bit UUID variant from the current value
*
* @param variant The old variant (in case the variant has already been extracted)
* @param index The index of the current value to find the variant to extract
* @param value The numeric value at the character position
*/
private static int extractVariant(i... | 3.68 |
flink_ExceptionUtils_tryRethrowIOException | /**
* Tries to throw the given {@code Throwable} in scenarios where the signatures allows only
* IOExceptions (and RuntimeException and Error). Throws this exception directly, if it is an
* IOException, a RuntimeException, or an Error. Otherwise does nothing.
*
* @param t The Throwable to be thrown.
*/
public sta... | 3.68 |
morf_DatabaseSchemaManager_dropViewIfExists | /**
* Removes the specified view from the database, if it exists. Otherwise
* do nothing. To allow for JDBC implem,entations that do not support
* conditional dropping of views, this will trap and ignore
*
* @param view the view to drop
*/
private Collection<String> dropViewIfExists(View view) {
if (log.isDe... | 3.68 |
framework_GenericFontIcon_getCodepoint | /*
* (non-Javadoc)
*
* @see com.vaadin.server.FontIcon#getCodepoint()
*/
@Override
public int getCodepoint() {
return codePoint;
} | 3.68 |
hudi_MetadataMessage_isOverwriteOfExistingFile | /**
* Whether message represents an overwrite of an existing file.
* Ref: https://cloud.google.com/storage/docs/pubsub-notifications#replacing_objects
*/
private boolean isOverwriteOfExistingFile() {
return !isNullOrEmpty(getOverwroteGeneration());
} | 3.68 |
hudi_SparkHoodieIndexFactory_isGlobalIndex | /**
* Whether index is global or not.
* @param config HoodieWriteConfig to use.
* @return {@code true} if index is a global one. else {@code false}.
*/
public static boolean isGlobalIndex(HoodieWriteConfig config) {
switch (config.getIndexType()) {
case HBASE:
return true;
case INMEMORY:
retur... | 3.68 |
hudi_HoodieIndexUtils_mergeIncomingWithExistingRecord | /**
* Merge the incoming record with the matching existing record loaded via {@link HoodieMergedReadHandle}. The existing record is the latest version in the table.
*/
private static <R> Option<HoodieRecord<R>> mergeIncomingWithExistingRecord(
HoodieRecord<R> incoming,
HoodieRecord<R> existing,
Schema wri... | 3.68 |
framework_Label_stripTags | /**
* Strips the tags from the XML.
*
* @param xml
* the String containing a XML snippet.
* @return the original XML without tags.
*/
private String stripTags(String xml) {
final StringBuilder res = new StringBuilder();
int processed = 0;
final int xmlLen = xml.length();
while (proces... | 3.68 |
morf_UpdateStatement_useParallelDml | /**
* Request that this statement is executed with a parallel execution plan for data manipulation language (DML). This request will have no effect unless the database implementation supports it and the feature is enabled.
*
* <p>For statement that will affect a high percentage or rows in the table, a parallel execu... | 3.68 |
flink_DeltaIteration_registerAggregator | /**
* Registers an {@link Aggregator} for the iteration. Aggregators can be used to maintain simple
* statistics during the iteration, such as number of elements processed. The aggregators
* compute global aggregates: After each iteration step, the values are globally aggregated to
* produce one aggregate that repr... | 3.68 |
morf_Deployment_getPath | /**
* Return an "upgrade" path corresponding to a full database deployment, matching
* the given schema.
*
* <p>This method adds all upgrade steps after creating the tables/views.</p>
*
* @param targetSchema Schema that is to be deployed.
* @param upgradeSteps All available upgrade steps.
* @return A path which... | 3.68 |
morf_AbstractSqlDialectTest_testFormatSqlStatement | /**
* Tests the {@link SqlDialect#formatSqlStatement(String)} performs
* correctly.
*/
@Test
public void testFormatSqlStatement() {
expectedSqlStatementFormat();
} | 3.68 |
hbase_SplitTableRegionProcedure_prepareSplitRegion | /**
* Prepare to Split region.
* @param env MasterProcedureEnv
*/
public boolean prepareSplitRegion(final MasterProcedureEnv env) throws IOException {
// Fail if we are taking snapshot for the given table
if (
env.getMasterServices().getSnapshotManager().isTakingSnapshot(getParentRegion().getTable())
) {
... | 3.68 |
hbase_ZKUtil_setWatchIfNodeExists | /**
* Watch the specified znode, but only if exists. Useful when watching for deletions. Uses
* .getData() (and handles NoNodeException) instead of .exists() to accomplish this, as .getData()
* will only set a watch if the znode exists.
* @param zkw zk reference
* @param znode path of node to watch
* @return tr... | 3.68 |
shardingsphere-elasticjob_PropertiesPreconditions_checkRequired | /**
* Check property value is required.
*
* @param props properties to be checked
* @param key property key to be checked
*/
public static void checkRequired(final Properties props, final String key) {
Preconditions.checkArgument(props.containsKey(key), "The property `%s` is required.", key);
} | 3.68 |
flink_SortPartitionOperator_useKeySelector | /** Returns whether using key selector or not. */
public boolean useKeySelector() {
return useKeySelector;
} | 3.68 |
morf_DataSetHomology_subtractTable | /**
* Subtract the common tables from the tables provided
*/
private Set<String> subtractTable(Set<String> tables, Set<String> commonTables) {
return Sets.difference(tables, commonTables);
} | 3.68 |
morf_SqlDialect_checkSelectStatementHasNoHints | /**
* Throws {@link IllegalArgumentException} if the select statement has hints.
*
* @param statement The select statement.
* @param errorMessage The message for the exception.
*/
protected void checkSelectStatementHasNoHints(SelectStatement statement, String errorMessage) {
if (!statement.getHints().isEmpty()) ... | 3.68 |
hbase_MasterObserver_preDeleteTableAction | /**
* Called before {@link org.apache.hadoop.hbase.master.HMaster} deletes a table. Called as part of
* delete table procedure and it is async to the delete RPC call.
* @param ctx the environment to interact with the framework and master
* @param tableName the name of the table
*/
default void preDeleteTable... | 3.68 |
hadoop_ExcessRedundancyMap_remove | /**
* Remove the redundancy corresponding to the given datanode and the given
* block.
*
* @return true if the block is removed.
*/
synchronized boolean remove(DatanodeDescriptor dn, BlockInfo blk) {
final LightWeightHashSet<BlockInfo> set = map.get(dn.getDatanodeUuid());
if (set == null) {
return false;
... | 3.68 |
flink_TypeInformationSerializationSchema_isEndOfStream | /**
* This schema never considers an element to signal end-of-stream, so this method returns always
* false.
*
* @param nextElement The element to test for the end-of-stream signal.
* @return Returns false.
*/
@Override
public boolean isEndOfStream(T nextElement) {
return false;
} | 3.68 |
hadoop_ReconfigurableBase_run | // See {@link ReconfigurationServlet#applyChanges}
public void run() {
LOG.info("Starting reconfiguration task.");
final Configuration oldConf = parent.getConf();
final Configuration newConf = parent.getNewConf();
final Collection<PropertyChange> changes =
parent.getChangedProperties(newConf, oldConf);
... | 3.68 |
MagicPlugin_BlockSpell_goLeft | /**
* A helper function to go change a given direction to the direction "to the right".
*
* <p>There's probably some better matrix-y, math-y way to do this.
* It'd be nice if this was in BlockFace.
*
* @param direction The current direction
* @return The direction to the left
*/
public static BlockFace goLeft(B... | 3.68 |
dubbo_ReferenceAnnotationBeanPostProcessor_getInjectedMethodReferenceBeanMap | /**
* Get {@link ReferenceBean} {@link Map} in injected method.
*
* @return non-null {@link Map}
* @since 2.5.11
*/
public Map<InjectionMetadata.InjectedElement, ReferenceBean<?>> getInjectedMethodReferenceBeanMap() {
Map<InjectionMetadata.InjectedElement, ReferenceBean<?>> map = new HashMap<>();
for (Map.... | 3.68 |
flink_KvStateInfo_getKeySerializer | /** @return The serializer for the key the state is associated to. */
public TypeSerializer<K> getKeySerializer() {
return keySerializer;
} | 3.68 |
flink_NoFetchingInput_require | /**
* Require makes sure that at least required number of bytes are kept in the buffer. If not,
* then it will load exactly the difference between required and currently available number of
* bytes. Thus, it will only load the data which is required and never prefetch data.
*
* @param required the number of bytes ... | 3.68 |
flink_TableFactoryService_normalizeContext | /** Prepares the properties of a context to be used for match operations. */
private static Map<String, String> normalizeContext(TableFactory factory) {
Map<String, String> requiredContext = factory.requiredContext();
if (requiredContext == null) {
throw new TableException(
String.format... | 3.68 |
open-banking-gateway_TppTokenConfig_loadPublicKey | /**
* See {@code de.adorsys.opba.tppauthapi.TokenSignVerifyTest#generateNewTppKeyPair()} for details of how to
* generate the encoded key.
*/
@SneakyThrows
private RSAPublicKey loadPublicKey(TppTokenProperties tppTokenProperties) {
byte[] publicKeyBytes = Base64.getDecoder().decode(tppTokenProperties.getPublicKe... | 3.68 |
framework_VScrollTable_getNavigationUpKey | /**
* Get the key that moves the selection head upwards. By default it is the
* up arrow key but by overriding this you can change the key to whatever
* you want.
*
* @return The keycode of the key
*/
protected int getNavigationUpKey() {
return KeyCodes.KEY_UP;
} | 3.68 |
flink_LeaderRetrievalUtils_retrieveLeaderInformation | /**
* Retrieves the leader pekko url and the current leader session ID. The values are stored in a
* {@link LeaderInformation} instance.
*
* @param leaderRetrievalService Leader retrieval service to retrieve the leader connection
* information
* @param timeout Timeout when to give up looking for the leader
*... | 3.68 |
framework_Table_accept | /*
* (non-Javadoc)
*
* @see
* com.vaadin.event.dd.acceptcriteria.AcceptCriterion#accepts(com.vaadin
* .event.dd.DragAndDropEvent)
*/
@Override
@SuppressWarnings("unchecked")
public boolean accept(DragAndDropEvent dragEvent) {
AbstractSelectTargetDetails dropTargetData = (AbstractSelectTargetDetails) dragEvent... | 3.68 |
pulsar_MessageIdAdv_getBatchIndex | /**
* Get the batch index.
*
* @return -1 if the message is not in a batch
*/
default int getBatchIndex() {
return -1;
} | 3.68 |
hadoop_RetryReasonCategory_checkExceptionMessage | /**
* Checks if a required search-string is in the exception's message.
*/
Boolean checkExceptionMessage(final Exception exceptionCaptured,
final String search) {
if (search == null) {
return false;
}
if (exceptionCaptured != null
&& exceptionCaptured.getMessage() != null
&& exceptionCapture... | 3.68 |
hbase_Procedure_isFinished | /**
* @return true if the procedure is finished. The Procedure may be completed successfully or
* rolledback.
*/
public synchronized boolean isFinished() {
return isSuccess() || state == ProcedureState.ROLLEDBACK;
} | 3.68 |
flink_TimeWindow_cover | /** Returns the minimal window covers both this window and the given window. */
public TimeWindow cover(TimeWindow other) {
return new TimeWindow(Math.min(start, other.start), Math.max(end, other.end));
} | 3.68 |
flink_BinaryHashPartition_finalizeProbePhase | /**
* @param keepUnprobedSpilledPartitions If true then partitions that were spilled but received
* no further probe requests will be retained; used for build-side outer joins.
*/
void finalizeProbePhase(
LazyMemorySegmentPool pool,
List<BinaryHashPartition> spilledPartitions,
boolean kee... | 3.68 |
pulsar_ResourceUnitRanking_getAllocatedLoadPercentageBandwidthIn | /**
* Percentage of inbound bandwidth allocated to bundle's quota.
*/
public double getAllocatedLoadPercentageBandwidthIn() {
return this.allocatedLoadPercentageBandwidthIn;
} | 3.68 |
framework_Escalator_getScrollTop | /**
* Returns the vertical scroll offset. Note that this is not necessarily the
* same as the {@code scrollTop} attribute in the DOM.
*
* @return the logical vertical scroll offset
*/
public double getScrollTop() {
return verticalScrollbar.getScrollPos();
} | 3.68 |
pulsar_NettyFutureUtil_toCompletableFuture | /**
* Converts a Netty {@link Future} to {@link CompletableFuture}.
*
* @param future Netty future
* @param <V> value type
* @return converted future instance
*/
public static <V> CompletableFuture<V> toCompletableFuture(Future<V> future) {
Objects.requireNonNull(future, "future cannot be null");
Comp... | 3.68 |
hadoop_AssumedRoleCredentialProvider_operationRetried | /**
* Callback from {@link Invoker} when an operation is retried.
* @param text text of the operation
* @param ex exception
* @param retries number of retries
* @param idempotent is the method idempotent
*/
public void operationRetried(
String text,
Exception ex,
int retries,
boolean idempotent) {... | 3.68 |
hbase_MetricsConnection_incrHedgedReadOps | /** Increment the number of hedged read that have occurred. */
public void incrHedgedReadOps() {
hedgedReadOps.inc();
} | 3.68 |
flink_FieldParser_nextStringLength | /**
* Returns the length of a string. Throws an exception if the column is empty.
*
* @return the length of the string
*/
protected static final int nextStringLength(
byte[] bytes, int startPos, int length, char delimiter) {
if (length <= 0) {
throw new IllegalArgumentException("Invalid input: E... | 3.68 |
hbase_HBaseTestingUtility_compact | /**
* Compact all of a table's reagion in the mini hbase cluster
*/
public void compact(TableName tableName, boolean major) throws IOException {
getMiniHBaseCluster().compact(tableName, major);
} | 3.68 |
hudi_HoodieCompactionAdminTool_run | /**
* Executes one of compaction admin operations.
*/
public void run(JavaSparkContext jsc) throws Exception {
HoodieTableMetaClient metaClient = HoodieTableMetaClient.builder().setConf(jsc.hadoopConfiguration()).setBasePath(cfg.basePath).build();
try (CompactionAdminClient admin = new CompactionAdminClient(new H... | 3.68 |
framework_AbstractTextField_addFocusListener | /**
* Adds a {@link FocusListener} to this component, which gets fired when
* this component receives keyboard focus.
*
* @param listener
* the focus listener
* @return a registration for the listener
*
* @see Registration
*/
@Override
public Registration addFocusListener(FocusListener listener) {
... | 3.68 |
framework_Tree_fireCollapseEvent | /**
* Emits collapse event.
*
* @param itemId
* the item id.
*/
protected void fireCollapseEvent(Object itemId) {
fireEvent(new CollapseEvent(this, itemId));
} | 3.68 |
framework_Form_addField | /**
* Registers the field with the form and adds the field to the form layout.
*
* <p>
* The property id must not be already used in the form.
* </p>
*
* <p>
* This field is added to the layout using the
* {@link #attachField(Object, Field)} method.
* </p>
*
* @param propertyId
* the Property id... | 3.68 |
framework_VScrollTable_getNavigationSelectKey | /**
* Get the key that selects an item in the table. By default it is the space
* bar key but by overriding this you can change the key to whatever you
* want.
*
* @return
*/
protected int getNavigationSelectKey() {
return CHARCODE_SPACE;
} | 3.68 |
framework_LegacyWindow_getBrowserWindowHeight | /**
* Gets the last known height of the browser window in which this UI
* resides.
*
* @return the browser window height in pixels
* @deprecated As of 7.0, use the similarly named api in Page instead
*/
@Deprecated
public int getBrowserWindowHeight() {
return getPage().getBrowserWindowHeight();
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.