name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_LogicalTypeMerging_findAdditionDecimalType | /** Finds the result type of a decimal addition operation. */
public static DecimalType findAdditionDecimalType(
int precision1, int scale1, int precision2, int scale2) {
final int scale = Math.max(scale1, scale2);
int precision = Math.max(precision1 - scale1, precision2 - scale2) + scale + 1;
retur... | 3.68 |
framework_EventRouter_fireEvent | /**
* Sends an event to all registered listeners. The listeners will decide if
* the activation method should be called or not.
* <p>
* If an error handler is set, the processing of other listeners will
* continue after the error handler method call unless the error handler
* itself throws an exception.
*
* @pa... | 3.68 |
framework_CustomLayout_addComponent | /**
* Adds the component into this container. The component is added without
* specifying the location (empty string is then used as location). Only one
* component can be added to the default "" location and adding more
* components into that location overwrites the old components.
*
* @param c
* the... | 3.68 |
flink_MathUtils_log2strict | /**
* Computes the logarithm of the given value to the base of 2. This method throws an error, if
* the given argument is not a power of 2.
*
* @param value The value to compute the logarithm for.
* @return The logarithm to the base of 2.
* @throws ArithmeticException Thrown, if the given value is zero.
* @throw... | 3.68 |
hadoop_XMLUtils_newSecureTransformerFactory | /**
* This method should be used if you need a {@link TransformerFactory}. Use this method
* instead of {@link TransformerFactory#newInstance()}. The factory that is returned has
* secure configuration enabled.
*
* @return a {@link TransformerFactory} with secure configuration enabled
* @throws TransformerConfigu... | 3.68 |
morf_AbstractSqlDialectTest_testInsertFromSelectStatementWithExplicitFieldsWhereJoinOnInnerSelect | /**
* Tests an insert from a select which joins inner selects using a where clause. The fields for selection are specified.
*
* <p>The use case for this is to select a subset of the fields from an inner select, where the inner select has joined across several tables</p>.
*/
@Test
public void testInsertFromSelectSta... | 3.68 |
morf_AlteredTable_isTemporary | /**
* {@inheritDoc}
*
* @see org.alfasoftware.morf.metadata.Table#isTemporary()
*/
@Override
public boolean isTemporary() {
return baseTable.isTemporary();
} | 3.68 |
hudi_HoodieRealtimeRecordReader_constructRecordReader | /**
* Construct record reader based on job configuration.
*
* @param split File Split
* @param jobConf Job Configuration
* @param realReader Parquet Record Reader
* @return Realtime Reader
*/
private static RecordReader<NullWritable, ArrayWritable> constructRecordReader(RealtimeSplit split,
JobConf jobConf, ... | 3.68 |
framework_Flash_setArchive | /**
* This attribute may be used to specify a space-separated list of URIs for
* archives containing resources relevant to the object, which may include
* the resources specified by the classid and data attributes. Preloading
* archives will generally result in reduced load times for objects.
* Archives specified ... | 3.68 |
hudi_HoodieTable_getRestoreTimeline | /**
* Get restore timeline.
*/
public HoodieTimeline getRestoreTimeline() {
return getActiveTimeline().getRestoreTimeline();
} | 3.68 |
hmily_HmilySafeNumberOperationUtils_safeIntersection | /**
* Execute range intersection method by safe mode.
*
* @param range range
* @param connectedRange connected range
* @return the intersection result of two ranges
*/
public static Range<Comparable<?>> safeIntersection(final Range<Comparable<?>> range, final Range<Comparable<?>> connectedRange) {
try {
... | 3.68 |
rocketmq-connect_JsonConverter_configure | /**
* Configure this class.
*
* @param configs configs in key/value pairs
*/
@Override
public void configure(Map<String, ?> configs) {
converterConfig = new JsonConverterConfig(configs);
fromConnectSchemaCache = new LRUCache<>(converterConfig.cacheSize());
toConnectSchemaCache = new LRUCache<>(converter... | 3.68 |
hadoop_SchedulingRequest_allocationRequestId | /**
* Set the <code>allocationRequestId</code> of the request.
*
* @see SchedulingRequest#setAllocationRequestId(long)
* @param allocationRequestId <code>allocationRequestId</code> of the
* request
* @return {@link SchedulingRequest.SchedulingRequestBuilder}
*/
@Public
@Unstable
public SchedulingRequest... | 3.68 |
hbase_HMaster_getMasterStartTime | /** Returns timestamp in millis when HMaster was started. */
public long getMasterStartTime() {
return startcode;
} | 3.68 |
dubbo_LoggerFactory_getFile | /**
* Get the current logging file
*
* @return current logging file
*/
public static File getFile() {
return loggerAdapter.getFile();
} | 3.68 |
flink_CatalogManager_getPartition | /**
* Retrieves a partition with a fully qualified table path and partition spec. If the path is
* not yet fully qualified use{@link #qualifyIdentifier(UnresolvedIdentifier)} first.
*
* @param tableIdentifier full path of the table to retrieve
* @param partitionSpec full partition spec
* @return partition in the ... | 3.68 |
framework_AbstractSelect_getValue | /**
* Gets the selected item id or in multiselect mode a set of selected ids.
*
* @see AbstractField#getValue()
*/
@Override
public Object getValue() {
final Object retValue = super.getValue();
if (isMultiSelect()) {
// If the return value is not a set
if (retValue == null) {
r... | 3.68 |
hudi_KafkaConnectUtils_getPartitionColumns | /**
* Extract partition columns directly if an instance of class {@link BaseKeyGenerator},
* else extract partition columns from the properties.
*
* @param keyGenerator key generator Instance of the keygenerator.
* @param typedProperties properties from the config.
* @return partition columns Returns the parti... | 3.68 |
hbase_HFileBlock_write | /**
* Writes the Cell to this block
*/
void write(Cell cell) throws IOException {
expectState(State.WRITING);
this.dataBlockEncoder.encode(cell, dataBlockEncodingCtx, this.userDataStream);
} | 3.68 |
flink_ProcessingTimeSessionWindows_withGap | /**
* Creates a new {@code SessionWindows} {@link WindowAssigner} that assigns elements to sessions
* based on the element timestamp.
*
* @param size The session timeout, i.e. the time gap between sessions
* @return The policy.
*/
public static ProcessingTimeSessionWindows withGap(Time size) {
return new Proc... | 3.68 |
framework_Page_getUI | /**
* Returns the {@link UI} of this {@link Page}.
*
* @return the {@link UI} of this {@link Page}.
*
* @since 8.2
*/
public UI getUI() {
return uI;
} | 3.68 |
pulsar_PulsarAuthorizationProvider_canConsumeAsync | /**
* Check if the specified role has permission to receive messages from the specified fully qualified topic
* name.
*
* @param topicName
* the fully qualified topic name associated with the topic.
* @param role
* the app id used to receive messages from the topic.
* @param subscription
... | 3.68 |
framework_Dependency_findDependencies | /**
* Finds all the URLs defined for the given classes, registers the URLs to
* the communication manager, passes the registered dependencies through any
* defined filters and returns the filtered collection of dependencies to
* load.
*
* @since 8.1
* @param connectorTypes
* the collection of connect... | 3.68 |
morf_AbstractSqlDialectTest_testRepairAutoNumberStartPositionOverRepairLimit | /**
* Tests for {@link SqlDialect#repairAutoNumberStartPosition(Table, SqlScriptExecutor, Connection)}
*/
@Test
public void testRepairAutoNumberStartPositionOverRepairLimit() {
setMaxIdOnAutonumberTable(MAX_ID_OVER_REPAIR_LIMIT);
testDialect.repairAutoNumberStartPosition(metadata.getTable(TEST_TABLE), sqlScript... | 3.68 |
hbase_PrivateCellUtil_setTimestamp | /**
* Sets the given timestamp to the cell.
* @throws IOException when the passed cell is not of type {@link ExtendedCell}
*/
public static void setTimestamp(Cell cell, byte[] ts) throws IOException {
if (cell instanceof ExtendedCell) {
((ExtendedCell) cell).setTimestamp(ts);
} else {
throw new IOExcepti... | 3.68 |
flink_BinaryStringData_indexOf | /**
* Returns the index within this string of the first occurrence of the specified substring,
* starting at the specified index.
*
* @param str the substring to search for.
* @param fromIndex the index from which to start the search.
* @return the index of the first occurrence of the specified substring, startin... | 3.68 |
flink_DriverUtils_fromProperties | /**
* Generate map from given properties.
*
* @param properties the given properties
* @return the result map
*/
public static Map<String, String> fromProperties(Properties properties) {
Map<String, String> map = new HashMap<>();
Enumeration<?> e = properties.propertyNames();
while (e.hasMoreElements(... | 3.68 |
dubbo_EdsEndpointManager_getEndpointListeners | // for test
static ConcurrentHashMap<String, Set<EdsEndpointListener>> getEndpointListeners() {
return ENDPOINT_LISTENERS;
} | 3.68 |
hbase_RegionStates_isRegionOffline | /** Returns True if region is offline (In OFFLINE or CLOSED state). */
public boolean isRegionOffline(final RegionInfo regionInfo) {
return isRegionInState(regionInfo, State.OFFLINE, State.CLOSED);
} | 3.68 |
hbase_User_runAsLoginUser | /** Executes the given action as the login user */
@SuppressWarnings({ "rawtypes", "unchecked" })
public static <T> T runAsLoginUser(PrivilegedExceptionAction<T> action) throws IOException {
try {
Class c = Class.forName("org.apache.hadoop.security.SecurityUtil");
Class[] types = new Class[] { PrivilegedExcep... | 3.68 |
flink_FileSystemCheckpointStorage_getSavepointPath | /** @return The default location where savepoints will be externalized if set. */
@Nullable
public Path getSavepointPath() {
return location.getBaseSavepointPath();
} | 3.68 |
hbase_MasterObserver_postGetTableDescriptors | /**
* Called after a getTableDescriptors request has been processed.
* @param ctx the environment to interact with the framework and master
* @param tableNamesList the list of table names, or null if querying for all
* @param descriptors the list of descriptors about to be returned
* @param regex ... | 3.68 |
pulsar_FieldParser_setEmptyValue | /**
* Sets the empty/null value if field is allowed to be set empty.
*
* @param strValue
* @param field
* @param obj
* @throws IllegalArgumentException
* @throws IllegalAccessException
*/
public static <T> void setEmptyValue(String strValue, Field field, T obj)
throws IllegalArgumentException, IllegalAc... | 3.68 |
hbase_TableName_createTableNameIfNecessary | /**
* Check that the object does not exist already. There are two reasons for creating the objects
* only once: 1) With 100K regions, the table names take ~20MB. 2) Equals becomes much faster as
* it's resolved with a reference and an int comparison.
*/
private static TableName createTableNameIfNecessary(ByteBuffer... | 3.68 |
hadoop_BlockGrouper_makeBlockGroup | /**
* Calculating and organizing BlockGroup, to be called by ECManager
* @param dataBlocks Data blocks to compute parity blocks against
* @param parityBlocks To be computed parity blocks
* @return ECBlockGroup.
*/
public ECBlockGroup makeBlockGroup(ECBlock[] dataBlocks,
ECBlock[]... | 3.68 |
hadoop_DurationTrackerFactory_trackDuration | /**
* Initiate a duration tracking operation by creating/returning
* an object whose {@code close()} call will
* update the statistics.
* The expected use is within a try-with-resources clause.
* @param key statistic key
* @return an object to close after an operation completes.
*/
default DurationTracker trackD... | 3.68 |
hadoop_LocalResolver_getDatanodesSubcluster | /**
* Get the Datanode mapping from the subclusters from the Namenodes. This
* needs to be done as a privileged action to use the user for the Router and
* not the one from the client in the RPC call.
*
* @return DN IP -> Subcluster.
*/
private Map<String, String> getDatanodesSubcluster() {
final RouterRpcServ... | 3.68 |
hbase_HttpDoAsClient_bytes | // Helper to translate strings to UTF8 bytes
private byte[] bytes(String s) {
return Bytes.toBytes(s);
} | 3.68 |
pulsar_ProducerConfiguration_setBatchingEnabled | /**
* Control whether automatic batching of messages is enabled for the producer. <i>default: false [No batching]</i>
*
* When batching is enabled, multiple calls to Producer.sendAsync can result in a single batch to be sent to the
* broker, leading to better throughput, especially when publishing small messages. I... | 3.68 |
flink_DataSet_joinWithHuge | /**
* Initiates a Join transformation.
*
* <p>A Join transformation joins the elements of two {@link DataSet DataSets} on key equality
* and provides multiple ways to combine joining elements into one DataSet.
*
* <p>This method also gives the hint to the optimizer that the second DataSet to join is much
* large... | 3.68 |
framework_GridMultiSelect_addMultiSelectionListener | /**
* Adds a selection listener that will be called when the selection is
* changed either by the user or programmatically.
*
* @param listener
* the value change listener, not {@code null}
* @return a registration for the listener
*/
public Registration addMultiSelectionListener(
MultiSelecti... | 3.68 |
open-banking-gateway_PsuEncryptionServiceProvider_forPrivateKey | /**
* Private key (read only) encryption.
* @param keyId Key ID
* @param key Private key
* @return Encryption service for reading only
*/
public EncryptionService forPrivateKey(UUID keyId, PrivateKey key) {
return oper.encryptionService(keyId.toString(), key);
} | 3.68 |
flink_DataStream_union | /**
* Creates a new {@link DataStream} by merging {@link DataStream} outputs of the same type with
* each other. The DataStreams merged using this operator will be transformed simultaneously.
*
* @param streams The DataStreams to union output with.
* @return The {@link DataStream}.
*/
@SafeVarargs
public final Da... | 3.68 |
flink_SqlLikeChainChecker_checkBegin | /** Matches the beginning of each string to a pattern. */
private static boolean checkBegin(
BinaryStringData pattern, MemorySegment[] segments, int start, int len) {
int lenSub = pattern.getSizeInBytes();
return len >= lenSub
&& SegmentsUtil.equals(pattern.getSegments(), 0, segments, start,... | 3.68 |
flink_DefaultResourceCleaner_withPrioritizedCleanup | /**
* Prioritized cleanups run before their regular counterparts. This method enables the
* caller to model dependencies between cleanup tasks. The order in which cleanable
* resources are added matters, i.e. if two cleanable resources are added as prioritized
* cleanup tasks, the resource being added first will bl... | 3.68 |
framework_Escalator_getSpacersInDom | /**
* Gets the spacers currently rendered in the DOM.
*
* @return an unmodifiable (but live) collection of the spacers
* currently in the DOM
*/
public Collection<SpacerImpl> getSpacersInDom() {
return Collections
.unmodifiableCollection(rowIndexToSpacer.values());
} | 3.68 |
querydsl_GeometryExpression_distance | /**
* Returns the shortest distance between any two Points in the two geometric objects as
* calculated in the spatial reference system of this geometric object. Because the geometries
* are closed, it is possible to find a point on each geometric object involved, such that the
* distance between these 2 points is ... | 3.68 |
flink_ThreadSafeSimpleCounter_inc | /**
* Increment the current count by the given value.
*
* @param n value to increment the current count by
*/
@Override
public void inc(long n) {
longAdder.add(n);
} | 3.68 |
hudi_HoodieFlinkWriteClient_createIndex | /**
* Complete changes performed at the given instantTime marker with specified action.
*/
@Override
protected HoodieIndex createIndex(HoodieWriteConfig writeConfig) {
return FlinkHoodieIndexFactory.createIndex((HoodieFlinkEngineContext) context, config);
} | 3.68 |
pulsar_ProducerImpl_stripChecksum | /**
* Strips checksum from {@link OpSendMsg} command if present else ignore it.
*
* @param op
*/
private void stripChecksum(OpSendMsg op) {
ByteBufPair msg = op.cmd;
if (msg != null) {
int totalMsgBufSize = msg.readableBytes();
ByteBuf headerFrame = msg.getFirst();
headerFrame.markRe... | 3.68 |
hadoop_FederationStateStoreFacade_updateApplicationHomeSubCluster | /**
* Update ApplicationHomeSubCluster to FederationStateStore.
*
* @param subClusterId homeSubClusterId
* @param applicationId applicationId.
* @param homeSubCluster homeSubCluster, homeSubCluster selected according to policy.
* @throws YarnException yarn exception.
*/
public void updateApplicationHomeSubCluste... | 3.68 |
AreaShop_AreaShop_hasPermission | /**
* Check for a permission of a (possibly offline) player.
* @param offlinePlayer OfflinePlayer to check
* @param permission Permission to check
* @return true if the player has the permission, false if the player does not have permission or, is offline and there is not Vault-compatible permission plugin
*/
publ... | 3.68 |
flink_CatalogTableImpl_removeRedundant | /** Construct catalog table properties from {@link #toProperties()}. */
public static Map<String, String> removeRedundant(
Map<String, String> properties, TableSchema schema, List<String> partitionKeys) {
Map<String, String> ret = new HashMap<>(properties);
DescriptorProperties descriptorProperties = ne... | 3.68 |
hadoop_DiskValidatorFactory_getInstance | /**
* Returns {@link DiskValidator} instance corresponding to its name.
* The diskValidator parameter can be "basic" for {@link BasicDiskValidator}
* or "read-write" for {@link ReadWriteDiskValidator}.
* @param diskValidator canonical class name, for example, "basic"
* @throws DiskErrorException if the class canno... | 3.68 |
hbase_WALEdit_getRegionEventDescriptor | /**
* @return Returns a RegionEventDescriptor made by deserializing the content of the passed in
* <code>cell</code>, IFF the <code>cell</code> is a RegionEventDescriptor type WALEdit.
*/
public static RegionEventDescriptor getRegionEventDescriptor(Cell cell) throws IOException {
return CellUtil.matchingCo... | 3.68 |
flink_ServiceType_classify | // Helper method
public static KubernetesConfigOptions.ServiceExposedType classify(Service service) {
KubernetesConfigOptions.ServiceExposedType type =
KubernetesConfigOptions.ServiceExposedType.valueOf(service.getSpec().getType());
if (type == KubernetesConfigOptions.ServiceExposedType.ClusterIP) {... | 3.68 |
dubbo_NacosMetadataReport_innerReceive | /**
* receive
*
* @param dataId data ID
* @param group group
* @param configInfo content
*/
@Override
public void innerReceive(String dataId, String group, String configInfo) {
String oldValue = cacheData.get(dataId);
ConfigChangedEvent event =
new ConfigChangedEvent(dataId, group, co... | 3.68 |
hbase_ScannerModel_buildFilter | /**
* @param s the JSON representation of the filter
* @return the filter
*/
public static Filter buildFilter(String s) throws Exception {
FilterModel model =
getJasonProvider().locateMapper(FilterModel.class, MediaType.APPLICATION_JSON_TYPE)
.readValue(s, FilterModel.class);
return model.build();
} | 3.68 |
hudi_HoodieOperation_isInsert | /**
* Returns whether the operation is INSERT.
*/
public static boolean isInsert(HoodieOperation operation) {
return operation == INSERT;
} | 3.68 |
dubbo_Parameters_getMethodExtension | /**
* @deprecated will be removed in 3.3.0
*/
@Deprecated
public <T> T getMethodExtension(Class<T> type, String method, String key, String defaultValue) {
String name = getMethodParameter(method, key, defaultValue);
return ExtensionLoader.getExtensionLoader(type).getExtension(name);
} | 3.68 |
hmily_CommonAssembler_assembleHmilyPaginationValueSegment | /**
* Assemble hmily PaginationValue segment.
* @param paginationValue pagination value segment
* @return Hmily pagination value segment
*/
public static HmilyPaginationValueSegment assembleHmilyPaginationValueSegment(final PaginationValueSegment paginationValue) {
HmilyPaginationValueSegment hmilyPaginationVa... | 3.68 |
dubbo_AdaptiveClassCodeGenerator_generateUrlNullCheck | /**
* generate method URL argument null check
*/
private String generateUrlNullCheck(int index) {
return String.format(CODE_URL_NULL_CHECK, index, URL.class.getName(), index);
} | 3.68 |
hbase_IndexBlockEncoding_writeIdInBytes | /**
* Writes id bytes to the given array starting from offset.
* @param dest output array
* @param offset starting offset of the output array
*/
public void writeIdInBytes(byte[] dest, int offset) throws IOException {
System.arraycopy(idInBytes, 0, dest, offset, ID_SIZE);
} | 3.68 |
pulsar_GrowablePriorityLongPairQueue_items | /**
* @return a new list of keys with max provided numberOfItems (makes a copy)
*/
public Set<LongPair> items(int numberOfItems) {
Set<LongPair> items = new HashSet<>(this.size);
forEach((item1, item2) -> {
if (items.size() < numberOfItems) {
items.add(new LongPair(item1, item2));
... | 3.68 |
flink_HiveDeclarativeAggregateFunction_getTypeInference | /** This method is used to infer result type when generate {@code AggregateCall} of calcite. */
public TypeInference getTypeInference(DataTypeFactory factory) {
return TypeInference.newBuilder()
.outputTypeStrategy(new HiveAggregateFunctionOutputStrategy(this))
.build();
} | 3.68 |
pulsar_SystemTopicClient_delete | /**
* Delete event in the system topic.
* @param key the key of the event
* @param t pulsar event
* @return message id
* @throws PulsarClientException exception while write event cause
*/
default MessageId delete(String key, T t) throws PulsarClientException {
throw new UnsupportedOperationException("Unsuppor... | 3.68 |
rocketmq-connect_Stat_type | /**
* type
*
* @return
*/
default String type() {
return NoneType.none.name();
} | 3.68 |
framework_CheckBox_getInputElement | /**
* Returns the {@link CheckBoxInputElement} element to manipulate the style
* name of the {@code input} element of the {@link CheckBox}.
*
* @since 8.7
* @return the current {@link CheckBoxInputElement}, not {@code null}.
*/
public CheckBoxInputElement getInputElement() {
if (checkBoxInputElement == null) ... | 3.68 |
graphhopper_IntFloatBinaryHeap_percolateDownMinHeap | /**
* Percolates element down heap from the array position given by the index.
*/
final void percolateDownMinHeap(final int index) {
final int element = elements[index];
final float key = keys[index];
int hole = index;
while (hole * 2 <= size) {
int child = hole * 2;
// if we have a ... | 3.68 |
framework_VFilterSelect_selectPrevPage | /*
* Show the prev page.
*/
private void selectPrevPage() {
if (currentPage > 0) {
filterOptions(currentPage - 1, lastFilter);
selectPopupItemWhenResponseIsReceived = Select.LAST;
}
} | 3.68 |
Activiti_AstNode_findPublicAccessibleMethod | /**
* Find accessible method. Searches the inheritance tree of the class declaring
* the method until it finds a method that can be invoked.
* @param method method
* @return accessible method or <code>null</code>
*/
private static Method findPublicAccessibleMethod(Method method) {
if (method == null || !Modifi... | 3.68 |
hbase_WALEventTrackerTableAccessor_getRowKey | /**
* Create rowKey: 1. We want RS name to be the leading part of rowkey so that we can query by RS
* name filter. WAL name contains rs name as a leading part. 2. Timestamp when the event was
* generated. 3. Add state of the wal. Combination of 1 + 2 + 3 is definitely going to create a
* unique rowkey.
* @param pa... | 3.68 |
open-banking-gateway_DatasafeMetadataStorage_delete | /**
* Deletes user profile data
* @param id Entity id
*/
@Override
@Transactional
public void delete(String id) {
throw new IllegalStateException("Not allowed");
} | 3.68 |
framework_AbstractRendererConnector_getRenderer | /**
* Returns the renderer associated with this renderer connector.
* <p>
* A subclass of AbstractRendererConnector should override this method as
* shown below. The framework uses
* {@link com.google.gwt.core.client.GWT#create(Class) GWT.create(Class)} to
* create a renderer based on the return type of the overr... | 3.68 |
hbase_ZKUtil_listChildrenBFSNoWatch | /**
* BFS Traversal of all the children under path, with the entries in the list, in the same order
* as that of the traversal. Lists all the children without setting any watches. - zk reference -
* path of node
* @return list of children znodes under the path if unexpected ZooKeeper exception
*/
private static Li... | 3.68 |
hbase_HFileBlock_getOnDiskDataSizeWithHeader | /** Returns the size of data on disk + header. Excludes checksum. */
int getOnDiskDataSizeWithHeader() {
return this.onDiskDataSizeWithHeader;
} | 3.68 |
framework_AbstractComponentConnector_onDragSourceAttached | /**
* Invoked when a {@link DragSourceExtensionConnector} has been attached to
* this component.
* <p>
* By default, does nothing. If you need to apply some changes to the
* widget, override this method.
* <p>
* This is a framework internal method, and should not be invoked manually.
*
* @since 8.1
* @see #on... | 3.68 |
pulsar_DispatchRateLimiter_createDispatchRate | /**
* createDispatchRate according to broker service config.
*
* @return
*/
private DispatchRate createDispatchRate() {
int dispatchThrottlingRateInMsg;
long dispatchThrottlingRateInByte;
ServiceConfiguration config = brokerService.pulsar().getConfiguration();
switch (type) {
case TOPIC:
... | 3.68 |
hadoop_BytesWritable_getSize | /**
* Get the current size of the buffer.
* @deprecated Use {@link #getLength()} instead.
* @return current size of the buffer.
*/
@Deprecated
public int getSize() {
return getLength();
} | 3.68 |
graphhopper_VectorTile_hasId | /**
* <code>optional uint64 id = 1 [default = 0];</code>
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
} | 3.68 |
flink_CheckpointConfig_getCheckpointStorage | /**
* @return The {@link CheckpointStorage} that has been configured for the job. Or {@code null}
* if none has been set.
* @see #setCheckpointStorage(CheckpointStorage)
*/
@Nullable
@PublicEvolving
public CheckpointStorage getCheckpointStorage() {
return this.storage;
} | 3.68 |
hadoop_TimelineDomain_setCreatedTime | /**
* Set the created time of the domain
*
* @param createdTime the created time of the domain
*/
public void setCreatedTime(Long createdTime) {
this.createdTime = createdTime;
} | 3.68 |
hbase_FavoredNodeLoadBalancer_generateFavoredNodesForDaughter | /*
* Generate Favored Nodes for daughters during region split. If the parent does not have FN,
* regenerates them for the daughters. If the parent has FN, inherit two FN from parent for each
* daughter and generate the remaining. The primary FN for both the daughters should be the same
* as parent. Inherit the seco... | 3.68 |
framework_Slot_hasRelativeHeight | /**
* Returns whether the slot's height is relative.
*
* @return {@code true} if the slot uses relative height, {@code false} if
* the slot has a static height
*/
public boolean hasRelativeHeight() {
return relativeHeight;
} | 3.68 |
flink_StringUtils_generateRandomAlphanumericString | /**
* Creates a random alphanumeric string of given length.
*
* @param rnd The random number generator to use.
* @param length The number of alphanumeric characters to append.
*/
public static String generateRandomAlphanumericString(Random rnd, int length) {
checkNotNull(rnd);
checkArgument(length >= 0);
... | 3.68 |
morf_XmlDataSetProducer_tableNames | /**
* @see org.alfasoftware.morf.metadata.Schema#tableNames()
*/
@Override
public Collection<String> tableNames() {
return xmlStreamProvider.availableStreamNames();
} | 3.68 |
pulsar_TripleLongPriorityQueue_add | /**
* Add a tuple of 3 long items to the priority queue.
*
* @param n1
* @param n2
* @param n3
*/
public void add(long n1, long n2, long n3) {
long arrayIdx = tuplesCount * ITEMS_COUNT;
if ((arrayIdx + 2) >= array.getCapacity()) {
array.increaseCapacity();
}
put(tuplesCount, n1, n2, n3);
... | 3.68 |
framework_CustomLayout_replaceComponent | /* Documented in superclass */
@Override
public void replaceComponent(Component oldComponent,
Component newComponent) {
// Gets the locations
String oldLocation = null;
String newLocation = null;
for (final String location : slots.keySet()) {
final Component component = slots.get(locati... | 3.68 |
hudi_HoodieTable_reconcileAgainstMarkers | /**
* Reconciles WriteStats and marker files to detect and safely delete duplicate data files created because of Spark
* retries.
*
* @param context HoodieEngineContext
* @param instantTs Instant Timestamp
* @param stats Hoodie Write Stat
* @param consistencyCheckEnabled Consistency Check Enabled
* @throws Hood... | 3.68 |
hadoop_BinaryPartitioner_setLeftOffset | /**
* Set the subarray to be used for partitioning to
* <code>bytes[offset:]</code> in Python syntax.
*
* @param conf configuration object
* @param offset left Python-style offset
*/
public static void setLeftOffset(Configuration conf, int offset) {
conf.setInt(LEFT_OFFSET_PROPERTY_NAME, offset);
} | 3.68 |
hmily_BrpcHmilyOrderApplication_main | /**
* main.
*
* @param args args
*/
public static void main(final String[] args) {
SpringApplication.run(BrpcHmilyOrderApplication.class, args);
} | 3.68 |
flink_HiveStatsUtil_statsChanged | /**
* Determine whether the table statistics changes.
*
* @param newTableStats new catalog table statistics.
* @param parameters original hive table statistics parameters.
* @return whether the table statistics changes
*/
public static boolean statsChanged(
CatalogTableStatistics newTableStats, Map<String... | 3.68 |
framework_AbstractInMemoryContainer_fireItemRemoved | /**
* Notify item set change listeners that an item has been removed from the
* container.
*
* @since 7.4
*
* @param position
* position of the removed item in the view prior to removal (if
* was visible)
* @param itemId
* id of the removed item, of type {@link Object} to sati... | 3.68 |
hbase_ExecutorService_delayedSubmit | // Submit the handler after the given delay. Used for retrying.
public void delayedSubmit(EventHandler eh, long delay, TimeUnit unit) {
ListenableFuture<?> future = delayedSubmitTimer.schedule(() -> submit(eh), delay, unit);
future.addListener(() -> {
try {
future.get();
} catch (Exception e) {
... | 3.68 |
flink_DataStream_addSink | /**
* Adds the given sink to this DataStream. Only streams with sinks added will be executed once
* the {@link StreamExecutionEnvironment#execute()} method is called.
*
* @param sinkFunction The object containing the sink's invoke function.
* @return The closed DataStream.
*/
public DataStreamSink<T> addSink(Sink... | 3.68 |
hadoop_MappingRuleResult_createRejectResult | /**
* Generator method for reject results.
* @return The generated MappingRuleResult
*/
public static MappingRuleResult createRejectResult() {
return RESULT_REJECT;
} | 3.68 |
hmily_HmilyXaTransactionManager_getThreadTransaction | /**
* Gets thread transaction.
*
* @return the thread transaction
*/
public Transaction getThreadTransaction() {
synchronized (tms) {
Stack<Transaction> stack = tms.get();
if (stack == null) {
return null;
}
return stack.peek();
}
} | 3.68 |
flink_FailureHandlingResultSnapshot_getTimestamp | /**
* The time the failure occurred.
*
* @return The time of the failure.
*/
public long getTimestamp() {
return timestamp;
} | 3.68 |
hbase_DeletionListener_getException | /**
* Get the last exception which has occurred when re-setting the watch. Use hasException() to
* check whether or not an exception has occurred.
* @return The last exception observed when re-setting the watch.
*/
public Throwable getException() {
return exception;
} | 3.68 |
flink_SqlFunctionUtils_log | /** Returns the logarithm of "x" with base "base". */
public static double log(double base, double x) {
return Math.log(x) / Math.log(base);
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.