name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hbase_WALKey_getExtendedAttribute | /**
* Return a named String value injected into the WALKey during processing, such as by a
* coprocessor
* @param attributeKey The key of a key / value pair
*/
default byte[] getExtendedAttribute(String attributeKey) {
return null;
} | 3.68 |
hbase_RegionServerSpaceQuotaManager_copyActiveEnforcements | /**
* Returns the collection of tables which have quota violation policies enforced on this
* RegionServer.
*/
Map<TableName, SpaceViolationPolicyEnforcement> copyActiveEnforcements() {
// Allows reads to happen concurrently (or while the map is being updated)
return new HashMap<>(this.enforcedPolicies);
} | 3.68 |
hadoop_TimelineEntityReaderFactory_createSingleEntityReader | /**
* Creates a timeline entity reader instance for reading a single entity with
* the specified input.
*
* @param context Reader context which defines the scope in which query has to
* be made.
* @param dataToRetrieve Data to retrieve for each entity.
* @return An implementation of <cite>TimelineEntityReade... | 3.68 |
hadoop_RouterQuotaManager_isMountEntry | /**
* Is the path a mount entry.
*
* @param path the path.
* @return {@code true} if path is a mount entry; {@code false} otherwise.
*/
boolean isMountEntry(String path) {
readLock.lock();
try {
return this.cache.containsKey(path);
} finally {
readLock.unlock();
}
} | 3.68 |
hadoop_SaslInputStream_skip | /**
* Skips <code>n</code> bytes of input from the bytes that can be read from
* this input stream without blocking.
*
* <p>
* Fewer bytes than requested might be skipped. The actual number of bytes
* skipped is equal to <code>n</code> or the result of a call to
* {@link #available()}, whichever is smaller. If
... | 3.68 |
flink_ExceptionUtils_returnExceptionIfUnexpected | /**
* Return the given exception if it is not a {@link FlinkExpectedException}.
*
* @param e the given exception
* @return the given exception if it is not a {@link FlinkExpectedException}
*/
public static Throwable returnExceptionIfUnexpected(Throwable e) {
return e instanceof FlinkExpectedException ? null : ... | 3.68 |
hbase_HBaseCluster_getInitialClusterMetrics | /**
* Returns a ClusterStatus for this HBase cluster as observed at the starting of the HBaseCluster
*/
public ClusterMetrics getInitialClusterMetrics() throws IOException {
return initialClusterStatus;
} | 3.68 |
hadoop_EditLogInputStream_getCurrentStreamName | /**
* Returns the name of the currently active underlying stream. The default
* implementation returns the same value as getName unless overridden by the
* subclass.
*
* @return String name of the currently active underlying stream
*/
public String getCurrentStreamName() {
return getName();
} | 3.68 |
hbase_MultiByteBuff_moveBack | /**
* Jumps back the current position of this MBB by specified length.
*/
@Override
public MultiByteBuff moveBack(int length) {
checkRefCount();
while (length != 0) {
if (length > curItem.position()) {
length -= curItem.position();
this.curItem.position(0);
this.curItemIndex--;
this.cu... | 3.68 |
flink_CompletedCheckpointStats_getExternalPath | /** Returns the external pointer of this checkpoint. */
public String getExternalPath() {
return externalPointer;
} | 3.68 |
hbase_MergeTableRegionsProcedure_preMergeRegionsCommit | /**
* Post merge region action
* @param env MasterProcedureEnv
**/
private void preMergeRegionsCommit(final MasterProcedureEnv env) throws IOException {
final MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
@MetaMutationAnnotation
final List<Mutation> metaEntries = ne... | 3.68 |
hbase_ReplicationSink_decorateConf | /**
* decorate the Configuration object to make replication more receptive to delays: lessen the
* timeout and numTries.
*/
private void decorateConf() {
this.conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER,
this.conf.getInt("replication.sink.client.retries.number", 4));
this.conf.setInt(HConstants.HBASE_... | 3.68 |
flink_HeapPriorityQueueSet_add | /**
* Adds the element to the queue. In contrast to the superclass and to maintain set semantics,
* this happens only if no such element is already contained (determined by {@link
* #equals(Object)}).
*
* @return <code>true</code> if the operation changed the head element or if is it unclear if
* the head ele... | 3.68 |
hudi_BaseAvroPayload_canProduceSentinel | /**
* Defines whether this implementation of {@link HoodieRecordPayload} could produce
* {@link HoodieRecord#SENTINEL}
*/
public boolean canProduceSentinel() {
return false;
} | 3.68 |
hbase_Constraints_add | /**
* Add a {@link Constraint} to the table with the given configuration
* <p/>
* Each constraint, when added to the table, will have a specific priority, dictating the order in
* which the {@link Constraint} will be run. A {@link Constraint} added will run on the
* regionserver before those added to the {@link Ta... | 3.68 |
pulsar_AuthorizationProvider_allowNamespaceOperationAsync | /**
* Check if a given <tt>role</tt> is allowed to execute a given <tt>operation</tt> on the namespace.
*
* @param namespaceName namespace name
* @param role role name
* @param operation namespace operation
* @param authData authenticated data
* @return a completable future represents check result
*/
default Co... | 3.68 |
flink_BuiltInFunctionDefinition_internal | /**
* Specifies that this {@link BuiltInFunctionDefinition} is meant for internal purposes only
* and should not be exposed when listing functions.
*/
public Builder internal() {
this.isInternal = true;
return this;
} | 3.68 |
hbase_RSGroupInfo_setConfiguration | /**
* Setter for storing a configuration setting in {@link #configuration} map.
* @param key Config key.
* @param value String value.
*/
public void setConfiguration(String key, String value) {
configuration.put(key, Objects.requireNonNull(value));
} | 3.68 |
hbase_Bytes_add | /**
* Concatenate byte arrays.
* @param arrays all the arrays to concatenate together.
* @return New array made from the concatenation of the given arrays.
*/
public static byte[] add(final byte[][] arrays) {
int length = 0;
for (int i = 0; i < arrays.length; i++) {
length += arrays[i].length;
}
byte[] ... | 3.68 |
hudi_RocksDBDAO_close | /**
* Close the DAO object.
*/
public synchronized void close() {
if (!closed) {
closed = true;
managedHandlesMap.values().forEach(AbstractImmutableNativeReference::close);
managedHandlesMap.clear();
managedDescriptorMap.clear();
getRocksDB().close();
try {
FileIOUtils.deleteDirectory(... | 3.68 |
pulsar_ManagedLedgerConfig_setWriteQuorumSize | /**
* @param writeQuorumSize
* the writeQuorumSize to set
*/
public ManagedLedgerConfig setWriteQuorumSize(int writeQuorumSize) {
this.writeQuorumSize = writeQuorumSize;
return this;
} | 3.68 |
hadoop_XDR_verifyLength | /**
* check if the rest of data has more than len bytes.
* @param xdr XDR message
* @param len minimum remaining length
* @return specify remaining length is enough or not
*/
public static boolean verifyLength(XDR xdr, int len) {
return xdr.buf.remaining() >= len;
} | 3.68 |
framework_FilesystemContainer_getIcon | /**
* Gets the icon of this file.
*
* @return the icon of this file.
*/
public Resource getIcon() {
return FileTypeResolver.getIcon(file);
} | 3.68 |
hmily_HmilySQLUtil_getExactlyValue | /**
* Get exactly value for SQL expression.
*
* <p>remove special char for SQL expression</p>
*
* @param value SQL expression
* @return exactly SQL expression
*/
public static String getExactlyValue(final String value) {
return null == value ? null : CharMatcher.anyOf("[]`'\"").removeFrom(value);
} | 3.68 |
flink_RowTimeMiniBatchDeduplicateFunction_miniBatchDeduplicateOnRowTime | /**
* Processes element to deduplicate on keys with row time semantic, sends current element if it
* is last or first row, retracts previous element if needed.
*
* @param state state of function
* @param bufferedRows latest row received by deduplicate function
* @param out underlying collector
* @param generateU... | 3.68 |
framework_VDragAndDropWrapper_getDragImageWidget | /**
* @return the widget used as drag image. Returns <code>null</code> if no
* widget is set.
*/
public Widget getDragImageWidget() {
return dragImageWidget;
} | 3.68 |
flink_PojoSerializerSnapshot_newPojoHasDifferentSubclassRegistrationOrder | /**
* Checks whether the new {@link PojoSerializer} has a different subclass registration order
* compared to the previous one.
*/
private static boolean newPojoHasDifferentSubclassRegistrationOrder(
LinkedOptionalMap<Class<?>, TypeSerializerSnapshot<?>>
registeredSubclassSerializerSnapshots,... | 3.68 |
framework_CustomLayout_getTemplateContents | /** Get the contents of the template. */
public String getTemplateContents() {
return getState(false).templateContents;
} | 3.68 |
graphhopper_VectorTile_hasName | /**
* <code>required string name = 1;</code>
*/
public boolean hasName() {
return ((bitField0_ & 0x00000002) == 0x00000002);
} | 3.68 |
querydsl_Projections_bean | /**
* Create a Bean populating projection for the given type and bindings
*
* @param <T> type of projection
* @param type type of the projection
* @param bindings property bindings
* @return factory expression
*/
public static <T> QBean<T> bean(Class<? extends T> type, Map<String, ? extends Expression<?>> bindin... | 3.68 |
framework_AbstractSingleSelect_readItem | /**
* Reads an Item from a design and inserts it into the data source.
* Hierarchical select components should override this method to recursively
* recursively read any child items as well.
*
* @param child
* a child element representing the item
* @param selected
* A set accumulating sel... | 3.68 |
streampipes_AbstractConfigurablePipelineElementBuilder_requiredOntologyConcept | /**
* @param label A human-readable label that describes the required static property.
* @param requiredConceptUri Limits the search for matching instance
* in the knowledge base to an instance of this concept.
* @param supportedOntologyProperties... | 3.68 |
framework_FilesystemContainer_hasChildren | /*
* Tests if the specified Item has any children. Don't add a JavaDoc comment
* here, we use the default documentation from implemented interface.
*/
@Override
public boolean hasChildren(Object itemId) {
if (!(itemId instanceof File)) {
return false;
}
String[] l;
if (filter != null) {
... | 3.68 |
hbase_NettyFutureUtils_addListener | /**
* This is method is used when you just want to add a listener to the given netty future. Ignoring
* the return value of a Future is considered as a bad practice as it may suppress exceptions
* thrown from the code that completes the future, and this method will catch all the exception
* thrown from the {@code l... | 3.68 |
rocketmq-connect_LocalPositionManagementServiceImpl_replicaOffsets | /**
* send change position
*/
private void replicaOffsets() {
while (true) {
// wait for the last send to complete
if (committing.get()) {
try {
sleep(1000);
continue;
} catch (InterruptedException e) {
}
}
synchro... | 3.68 |
streampipes_SQLStatementUtils_extractEventProperties | /**
* Creates a SQL-Query with the given Properties (SQL-Injection safe). For nested properties it
* recursively extracts the information. EventPropertyList are getting converted to a string (so
* in SQL to a VARCHAR(255)). For each type it uses {@link DbDataTypeFactory#getFromUri(String, SupportedDbEngines)}
* int... | 3.68 |
pulsar_ProxyExtensionsUtils_searchForExtensions | /**
* Search and load the available extensions.
*
* @param extensionsDirectory the directory where all the extensions are stored
* @return a collection of extensions
* @throws IOException when fail to load the available extensions from the provided directory.
*/
public static ExtensionsDefinitions searchForExtens... | 3.68 |
hbase_MasterObserver_postRecommissionRegionServer | /**
* Called after recommission region server.
*/
default void postRecommissionRegionServer(ObserverContext<MasterCoprocessorEnvironment> ctx,
ServerName server, List<byte[]> encodedRegionNames) throws IOException {
} | 3.68 |
hbase_Compactor_createFileScanners | /**
* Creates file scanners for compaction.
* @param filesToCompact Files.
* @return Scanners.
*/
private List<StoreFileScanner> createFileScanners(Collection<HStoreFile> filesToCompact,
long smallestReadPoint, boolean useDropBehind) throws IOException {
return StoreFileScanner.getScannersForCompaction(filesToC... | 3.68 |
hadoop_QueuePriorityContainerCandidateSelector_canPreemptEnoughResourceForAsked | /**
* Can we preempt enough resource for given:
*
* @param requiredResource askedResource
* @param demandingQueue demandingQueue
* @param schedulerNode node
* @param lookingForNewReservationPlacement Are we trying to look for move
* reservation to the node
* @param newlySelectedContainers newly selected ... | 3.68 |
flink_FlinkRelMdCollation_snapshot | /** Helper method to determine a {@link org.apache.calcite.rel.core.Snapshot}'s collation. */
public static List<RelCollation> snapshot(RelMetadataQuery mq, RelNode input) {
return mq.collations(input);
} | 3.68 |
hadoop_ApplicationTableRW_setMetricsTTL | /**
* @param metricsTTL time to live parameter for the metrics in this table.
* @param hbaseConf configuration in which to set the metrics TTL config
* variable.
*/
public void setMetricsTTL(int metricsTTL, Configuration hbaseConf) {
hbaseConf.setInt(METRICS_TTL_CONF_NAME, metricsTTL);
} | 3.68 |
pulsar_MultipleListenerValidator_validateAndAnalysisAdvertisedListener | /**
* Validate the configuration of `advertisedListeners`, `internalListenerName`.
* 1. `advertisedListeners` consists of a comma-separated list of endpoints.
* 2. Each endpoint consists of a listener name and an associated address (`listener:scheme://host:port`).
* 3. A listener name may be repeated to define both... | 3.68 |
querydsl_Expressions_dateTimeTemplate | /**
* Create a new Template expression
*
* @param cl type of expression
* @param template template
* @param args template parameters
* @return template expression
*/
public static <T extends Comparable<?>> DateTimeTemplate<T> dateTimeTemplate(Class<? extends T> cl, Template template, List<?> args) {
return n... | 3.68 |
framework_DesignAttributeHandler_readAttribute | /**
* Reads the given attribute from a set of attributes.
*
* @param attribute
* the attribute key
* @param attributes
* the set of attributes to read from
* @param outputType
* the output type for the attribute
* @return the attribute value or null
*/
public static <T> T read... | 3.68 |
hbase_BlockType_isBloom | /** Returns whether this block category is bloom filter */
public final boolean isBloom() {
return this.getCategory() == BlockCategory.BLOOM;
} | 3.68 |
flink_StreamExecutionEnvironment_getCachedFiles | /**
* Get the list of cached files that were registered for distribution among the task managers.
*/
public List<Tuple2<String, DistributedCache.DistributedCacheEntry>> getCachedFiles() {
return cacheFile;
} | 3.68 |
morf_AbstractSqlDialectTest_testDeleteWithLimitAndSimpleWhereCriterion | /**
* Tests that a delete string with a limit and a simple where criterion is created correctly.
*/
@Test
public void testDeleteWithLimitAndSimpleWhereCriterion() {
DeleteStatement stmt = DeleteStatement
.delete(new TableReference(TEST_TABLE))
.where(eq(new FieldReference(new TableReference(TEST_TABLE), STR... | 3.68 |
framework_DesignFormatter_canConvert | /**
* Checks whether or not a value of a given type can be converted. If a
* converter for a superclass is found, this will return true.
*
* @param type
* Type to check.
* @return <b>true</b> when either a given type or its supertype has a
* converter, <b>false</b> otherwise.
*/
public boolea... | 3.68 |
flink_ModuleManager_loadModule | /**
* Load a module under a unique name. Modules will be kept in the loaded order, and new module
* will be added to the left before the unused module and turn on use by default.
*
* @param name name of the module
* @param module the module instance
* @throws ValidationException when there already exists a module... | 3.68 |
druid_SQLStatementParser_parseOpen | /**
* parse cursor open statement
*
* @return
*/
public SQLOpenStatement parseOpen() {
SQLOpenStatement stmt = new SQLOpenStatement();
accept(Token.OPEN);
final SQLName cursorName;
if (lexer.token == Token.QUES) {
lexer.nextToken();
cursorName = new SQLIdentifierExpr("?");
} els... | 3.68 |
hadoop_ServerWebApp_getAuthority | /**
* Returns the hostname:port InetSocketAddress the webserver is listening to.
*
* @return the hostname:port InetSocketAddress the webserver is listening to.
*/
public InetSocketAddress getAuthority() throws ServerException {
synchronized (this) {
if (authority == null) {
authority = resolveAuthorit... | 3.68 |
framework_VaadinService_doFindOrCreateVaadinSession | /**
* Finds or creates a Vaadin session. Assumes necessary synchronization has
* been done by the caller to ensure this is not called simultaneously by
* several threads.
*
* @param request
* @param requestCanCreateSession
* @return
* @throws SessionExpiredException
* @throws ServiceException
*/
private Vaadi... | 3.68 |
hadoop_ExcessRedundancyMap_add | /**
* Add the redundancy of the given block stored in the given datanode to the
* map.
*
* @return true if the block is added.
*/
synchronized boolean add(DatanodeDescriptor dn, BlockInfo blk) {
LightWeightHashSet<BlockInfo> set = map.get(dn.getDatanodeUuid());
if (set == null) {
set = new LightWeightHashS... | 3.68 |
rocketmq-connect_AbstractKafkaSourceConnector_originalSinkConnector | /**
* try override start and stop
*
* @return
*/
protected org.apache.kafka.connect.source.SourceConnector originalSinkConnector() {
return sourceConnector;
} | 3.68 |
zxing_Detector_getMatrixCenter | /**
* Finds a candidate center point of an Aztec code from an image
*
* @return the center point
*/
private Point getMatrixCenter() {
ResultPoint pointA;
ResultPoint pointB;
ResultPoint pointC;
ResultPoint pointD;
//Get a white rectangle that can be the border of the matrix in center bull's eye or
try... | 3.68 |
framework_VGridLayout_updateMarginStyleNames | /** For internal use only. May be removed or replaced in the future. */
public void updateMarginStyleNames(MarginInfo marginInfo) {
togglePrefixedStyleName("margin-top", marginInfo.hasTop());
togglePrefixedStyleName("margin-right", marginInfo.hasRight());
togglePrefixedStyleName("margin-bottom", marginInfo.... | 3.68 |
hbase_WALEntryStream_hasNext | /**
* Try advance the stream if there is no entry yet. See the javadoc for {@link HasNext} for more
* details about the meanings of the return values.
* <p/>
* You can call {@link #peek()} or {@link #next()} to get the actual {@link Entry} if this method
* returns {@link HasNext#YES}.
*/
public HasNext hasNext() ... | 3.68 |
querydsl_SimpleExpression_neAll | /**
* Create a {@code this != all right} expression
*
* @param right
* @return this != all right
*/
public BooleanExpression neAll(CollectionExpression<?, ? super T> right) {
return ne(ExpressionUtils.all(right));
} | 3.68 |
hmily_HmilyRepositoryStorage_updateHmilyTransactionStatus | /**
* Update hmily transaction status.
*
* @param hmilyTransaction the hmily transaction
*/
public static void updateHmilyTransactionStatus(final HmilyTransaction hmilyTransaction) {
if (Objects.nonNull(hmilyTransaction)) {
PUBLISHER.publishEvent(hmilyTransaction, EventTypeEnum.UPDATE_HMILY_TRANSACTION_... | 3.68 |
hbase_TableModel_setName | /**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
} | 3.68 |
hbase_HFileWriterImpl_writeInlineBlocks | /** Gives inline block writers an opportunity to contribute blocks. */
private void writeInlineBlocks(boolean closing) throws IOException {
for (InlineBlockWriter ibw : inlineBlockWriters) {
while (ibw.shouldWriteBlock(closing)) {
long offset = outputStream.getPos();
boolean cacheThisBlock = ibw.getCa... | 3.68 |
pulsar_MultiMessageIdImpl_compareTo | // If all messageId in map are same size, and all bigger/smaller than the other, return valid value.
@Override
public int compareTo(MessageId o) {
if (!(o instanceof MultiMessageIdImpl)) {
throw new IllegalArgumentException(
"expected MultiMessageIdImpl object. Got instance of " + o.getClass().g... | 3.68 |
flink_DataStream_setConnectionType | /**
* Internal function for setting the partitioner for the DataStream.
*
* @param partitioner Partitioner to set.
* @return The modified DataStream.
*/
protected DataStream<T> setConnectionType(StreamPartitioner<T> partitioner) {
return new DataStream<>(
this.getExecutionEnvironment(),
... | 3.68 |
framework_Compare_getValue | /**
* Returns the value to compare the property against.
*
* @return comparison reference value
*/
public Object getValue() {
return value;
} | 3.68 |
framework_VLoadingIndicator_getFirstDelay | /**
* Returns the delay (in ms) which must pass before the loading indicator
* moves into the "first" state and is shown to the user.
*
* @return The delay (in ms) until moving into the "first" state. Counted
* from when {@link #trigger()} is called.
*/
public int getFirstDelay() {
return firstDelay;
... | 3.68 |
flink_Conditions_haveLeafExceptionTypes | /**
* Tests leaf exception types of a method against the given predicate.
*
* <p>See {@link #haveLeafTypes(DescribedPredicate)} for details.
*/
public static ArchCondition<JavaMethod> haveLeafExceptionTypes(
DescribedPredicate<JavaClass> typePredicate) {
return new ArchCondition<JavaMethod>(
... | 3.68 |
framework_VScrollTable_isSignificantMove | /**
* Calculates how many pixels away the user's finger has traveled. This
* reduces the chance of small non-intentional movements from canceling
* the long press detection.
*
* @param event
* the Event for which to check the move distance
* @return true if this is considered an intentional move by th... | 3.68 |
flink_HttpHeader_getName | /**
* Returns the name of this HTTP header.
*
* @return the name of this HTTP header
*/
public String getName() {
return name;
} | 3.68 |
hmily_DefaultValueUtils_getDefaultValue | /**
* Gets default value.
*
* @param clazz the clazz
* @return the default value
* @throws IllegalAccessException the illegal access exception
* @throws InvocationTargetException the invocation target exception
* @throws InstantiationException the instantiation exception
*/
public static Object getDefault... | 3.68 |
hadoop_AbfsCountersImpl_getIOStatistics | /**
* Returning the instance of IOStatisticsStore used to collect the metrics
* in AbfsCounters.
*
* @return instance of IOStatistics.
*/
@Override
public IOStatistics getIOStatistics() {
return ioStatisticsStore;
} | 3.68 |
hadoop_ClientRegistryBinder_homePathForUser | /**
* Buld the user path -switches to the system path if the user is "".
* It also cross-converts the username to ascii via punycode
* @param username username or ""
* @return the path to the user
*/
public static String homePathForUser(String username) {
Preconditions.checkArgument(username != null, "null user"... | 3.68 |
flink_ApiExpressionUtils_isFunction | /**
* Checks if the given expression is a given builtin function.
*
* @param expression expression to check
* @param functionDefinition expected function definition
* @return true if the given expression is a given function call
*/
public static boolean isFunction(
Expression expression, BuiltInFunctionDe... | 3.68 |
hbase_NettyAsyncFSWALConfigHelper_setEventLoopConfig | /**
* Set the EventLoopGroup and channel class for {@code AsyncFSWALProvider}.
*/
public static void setEventLoopConfig(Configuration conf, EventLoopGroup group,
Class<? extends Channel> channelClass) {
Preconditions.checkNotNull(group, "group is null");
Preconditions.checkNotNull(channelClass, "channel class i... | 3.68 |
hbase_ConfigurationManager_getNumObservers | /** Returns the number of observers. */
public int getNumObservers() {
synchronized (configurationObservers) {
return configurationObservers.size();
}
} | 3.68 |
pulsar_AuthenticationKeyStoreTls_mapToString | // return strings like : "key1":"value1", "key2":"value2", ...
public static String mapToString(Map<String, String> map) {
return Joiner.on(',').withKeyValueSeparator(':').join(map);
} | 3.68 |
framework_WindowMoveListener_getTicketNumber | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
protected Integer getTicketNumber() {
return 12885;
} | 3.68 |
hbase_ByteBufferOutputStream_writeTo | /**
* Writes the complete contents of this byte buffer output stream to the specified output stream
* argument.
* @param out the output stream to which to write the data.
* @exception IOException if an I/O error occurs.
*/
public void writeTo(OutputStream out) throws IOException {
WritableByteChannel channel = C... | 3.68 |
MagicPlugin_DirectionUtils_goRight | /**
* 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 right
*/
public static org.bukkit.block.... | 3.68 |
framework_CheckBoxGroupConnector_isRequiredIndicatorVisible | // TODO remove once this extends AbstractMultiSelectConnector
@Override
public boolean isRequiredIndicatorVisible() {
return getState().required && !isReadOnly();
} | 3.68 |
querydsl_Projections_tuple | /**
* Create a Tuple typed projection for the given expressions
*
* @param exprs arguments for the projection
* @return factory expression
*/
public static QTuple tuple(Expression<?>[]... exprs) {
return new QTuple(exprs);
} | 3.68 |
hmily_RpcMediator_transmit | /**
* Transmit.
*
* @param <T> the type parameter
* @param rpcTransmit the rpc transmit
* @param context the context
*/
public <T> void transmit(final RpcTransmit rpcTransmit, final T context) {
if (Objects.nonNull(context)) {
rpcTransmit.transmit(CommonConstant.HMILY_TRANSACTION_CONTEXT, ... | 3.68 |
flink_FlinkContainers_isStarted | /** Gets the running state of the cluster. */
public boolean isStarted() {
return isStarted;
} | 3.68 |
dubbo_AbstractMetadataReport_getRetryExecutor | /**
* @deprecated only for test
*/
@Deprecated
ScheduledExecutorService getRetryExecutor() {
return retryExecutor;
} | 3.68 |
zxing_WifiConfigManager_changeNetworkWEP | // Adding a WEP network
private static void changeNetworkWEP(WifiManager wifiManager, WifiParsedResult wifiResult) {
WifiConfiguration config = changeNetworkCommon(wifiResult);
config.wepKeys[0] = quoteNonHex(wifiResult.getPassword(), 10, 26, 58);
config.wepTxKeyIndex = 0;
config.allowedAuthAlgorithms.set(WifiC... | 3.68 |
hudi_WriteProfile_reload | /**
* Reload the write profile, should do once for each checkpoint.
*
* <p>We do these things: i). reload the timeline; ii). re-construct the record profile;
* iii) clean the small files cache.
*
* <p>Note: This method should be thread safe.
*/
public synchronized void reload(long checkpointId) {
if (this.relo... | 3.68 |
pulsar_TxnBatchedPositionImpl_hashCode | /**
* It's exactly the same as {@link PositionImpl},make sure that when {@link TxnBatchedPositionImpl} used as the key
* of map same as {@link PositionImpl}. {@link #batchSize} and {@link #batchIndex} should not be involved in
* calculate, just like {@link PositionImpl#ackSet} is not involved in calculate.
* Note: ... | 3.68 |
rocketmq-connect_AbstractLocalSchemaRegistryClient_autoRegisterOrGetSchema | /**
* Get registry schema by specify policy
*
* @param subject
* @param schemaName
* @param request
* @return
*/
public SchemaResponse autoRegisterOrGetSchema(String namespace, String subject, String schemaName, RegisterSchemaRequest request, ParsedSchema schema) {
if (autoRegisterSchemas) {
return t... | 3.68 |
pulsar_JavaInstanceRunnable_interpolateSecretsIntoConfigs | /**
* Recursively interpolate configured secrets into the config map by calling
* {@link SecretsProvider#interpolateSecretForValue(String)}.
* @param secretsProvider - the secrets provider that will convert secret's values into config values.
* @param configs - the connector configuration map, which will be mutated... | 3.68 |
hbase_FastPathBalancedQueueRpcExecutor_popReadyHandler | /** Returns Pop a Handler instance if one available ready-to-go or else return null. */
private FastPathRpcHandler popReadyHandler() {
return this.fastPathHandlerStack.poll();
} | 3.68 |
flink_SelectByMinFunction_reduce | /**
* Reduce implementation, returns smaller tuple or value1 if both tuples are equal. Comparison
* highly depends on the order and amount of fields chosen as indices. All given fields (at
* construction time) are checked in the same order as defined (at construction time). If both
* tuples are equal in one index, ... | 3.68 |
hadoop_OBSCommonUtils_getBucketFsStatus | /**
* Get the fs status of the bucket.
*
* @param obs OBS client instance
* @param bucketName bucket name
* @return boolean value indicating if this bucket is a posix bucket
* @throws FileNotFoundException the bucket is absent
* @throws IOException any other problem talking to OBS
*/
static boo... | 3.68 |
hbase_KeyValue_keyToString | /**
* Use for logging.
* @param b Key portion of a KeyValue.
* @param o Offset to start of key
* @param l Length of key.
* @return Key as a String.
*/
public static String keyToString(final byte[] b, final int o, final int l) {
if (b == null) {
return "";
}
int rowlength = Bytes.toShort(b, o);
String ... | 3.68 |
morf_AbstractSqlDialectTest_testAlterColumnFromNullableToNotNullable | /**
* Test changing a nullable column to a non-nullable one.
*/
@Test
public void testAlterColumnFromNullableToNotNullable() {
testAlterTableColumn(TEST_TABLE, AlterationType.ALTER, getColumn(TEST_TABLE, DATE_FIELD), column(DATE_FIELD, DataType.DATE), expectedAlterTableAlterColumnFromNullableToNotNullableStatement(... | 3.68 |
zxing_LuminanceSource_rotateCounterClockwise45 | /**
* Returns a new object with rotated image data by 45 degrees counterclockwise.
* Only callable if {@link #isRotateSupported()} is true.
*
* @return A rotated version of this object.
*/
public LuminanceSource rotateCounterClockwise45() {
throw new UnsupportedOperationException("This luminance source does not ... | 3.68 |
flink_SingleElementIterator_set | /**
* Resets the element. After this call, the iterator has one element available, which is the
* given element.
*
* @param current The element to make available to the iterator.
*/
public void set(E current) {
this.current = current;
this.available = true;
} | 3.68 |
hudi_SafeParquetRecordReaderWrapper_createValue | /**
* We could be in concurrent fetch and read env. We need to ensure new ArrayWritable as ParquetReader implementation
* reuses same ArrayWritable for all reads which will cause corruption when buffering. So, we create a new
* ArrayWritable here with Value class from parquetReader's value and an empty array.
*/
@O... | 3.68 |
querydsl_ComparableExpression_goeAny | /**
* Create a {@code this >= any right} expression
*
* @param right rhs of the comparison
* @return this >= any right
*/
public BooleanExpression goeAny(SubQueryExpression<? extends T> right) {
return goe(ExpressionUtils.any(right));
} | 3.68 |
hbase_AsyncRegionLocationCache_findForRow | /**
* Finds the RegionLocations for the region with the greatest startKey less than or equal to the
* given row
* @param row row to find locations
*/
public RegionLocations findForRow(byte[] row, int replicaId) {
Map.Entry<byte[], RegionLocations> entry = cache.floorEntry(row);
if (entry == null) {
return n... | 3.68 |
framework_Calendar_setTimeFormat | /**
* Example: <code>setTimeFormat(TimeFormat.Format12H);</code><br>
* Set to null, if you want the format being defined by the locale.
*
* @param format
* Set 12h or 24h format. Default is defined by the locale.
*/
public void setTimeFormat(TimeFormat format) {
currentTimeFormat = format;
mark... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.