name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
pulsar_PulsarClientImpl_newPartitionedProducerImpl | /**
* Factory method for creating PartitionedProducerImpl instance.
*
* Allows overriding the PartitionedProducerImpl instance in tests.
*
* @param topic topic name
* @param conf producer configuration
* @param schema topic schema
* @param interceptors producer interceptors
* @param producerCreatedFuture futur... | 3.68 |
hbase_BinaryPrefixComparator_areSerializedFieldsEqual | /**
* Returns true if and only if the fields of the comparator that are serialized are equal to the
* corresponding fields in other. Used for testing.
*/
@Override
boolean areSerializedFieldsEqual(ByteArrayComparable other) {
if (other == this) {
return true;
}
if (!(other instanceof BinaryPrefixComparator... | 3.68 |
flink_StreamCompressionDecorator_decorateWithCompression | /**
* IMPORTANT: For streams returned by this method, {@link InputStream#close()} is not propagated
* to the inner stream. The inner stream must be closed separately.
*
* @param stream the stream to decorate.
* @return an input stream that is decorated by the compression scheme.
*/
public final InputStream decora... | 3.68 |
dubbo_StringUtils_replace | /**
* <p>Replaces a String with another String inside a larger String,
* for the first {@code max} values of the search String.</p>
*
* <p>A {@code null} reference passed to this method is a no-op.</p>
*
* <pre>
* StringUtils.replace(null, *, *, *) = null
* StringUtils.replace("", *, *, *) = "... | 3.68 |
flink_CoGroupedStreams_apply | /**
* Completes the co-group operation with the user function that is executed for windowed
* groups.
*
* <p>Note: This method's return type does not support setting an operator-specific
* parallelism. Due to binary backwards compatibility, this cannot be altered. Use the
* {@link #with(CoGroupFunction, TypeInfor... | 3.68 |
hadoop_BCFile_getStartPos | /**
* Get the starting position of the block in the file.
*
* @return the starting position of the block in the file.
*/
public long getStartPos() {
return rBlkState.getBlockRegion().getOffset();
} | 3.68 |
hudi_RocksDBDAO_dropColumnFamily | /**
* Note : Does not delete from underlying DB. Just closes the handle.
*
* @param columnFamilyName Column Family Name
*/
public void dropColumnFamily(String columnFamilyName) {
ValidationUtils.checkArgument(!closed);
managedDescriptorMap.computeIfPresent(columnFamilyName, (colFamilyName, descriptor) -> {
... | 3.68 |
morf_InsertStatement_drive | /**
* @see org.alfasoftware.morf.util.ObjectTreeTraverser.Driver#drive(ObjectTreeTraverser)
*/
@Override
public void drive(ObjectTreeTraverser traverser) {
traverser
.dispatch(table)
.dispatch(fromTable)
.dispatch(selectStatement)
.dispatch(fields)
.dispatch(values)
.dispatch(fieldDefaults.v... | 3.68 |
flink_DeclarativeSlotPoolService_onClose | /**
* This method is called when the slot pool service is closed. It can be overridden by
* subclasses.
*/
protected void onClose() {} | 3.68 |
flink_NFACompiler_createLooping | /**
* Creates the given state as a looping one. Looping state is one with TAKE edge to itself
* and PROCEED edge to the sinkState. It also consists of a similar state without the
* PROCEED edge, so that for each PROCEED transition branches in computation state graph can
* be created only once.
*
* @param sinkStat... | 3.68 |
framework_ApplicationConfiguration_getVaadinDirUrl | /**
* Gets the URL of the VAADIN directory on the server.
*
* @return the URL of the VAADIN directory
*/
public String getVaadinDirUrl() {
return vaadinDirUrl;
} | 3.68 |
hbase_TableState_isEnabledOrEnabling | /** Returns True if {@link State#ENABLED} or {@link State#ENABLING} */
public boolean isEnabledOrEnabling() {
return isInStates(State.ENABLED, State.ENABLING);
} | 3.68 |
hbase_RowCountEndpoint_getKeyValueCount | /**
* Returns a count of all KeyValues in the region where this coprocessor is loaded.
*/
@Override
public void getKeyValueCount(RpcController controller, CountRequest request,
RpcCallback<CountResponse> done) {
CountResponse response = null;
InternalScanner scanner = null;
try {
scanner = env.getRegion()... | 3.68 |
hbase_FileIOEngine_isPersistent | /**
* File IO engine is always able to support persistent storage for the cache
*/
@Override
public boolean isPersistent() {
return true;
} | 3.68 |
framework_ColorUtil_getRGBPatternColor | /**
* Parses {@link Color} from matched RGB {@link Matcher}.
*
* @param matcher
* {@link Matcher} matching RGB pattern with named regex groups
* {@code red}, {@code green}, and {@code blue}
* @return {@link Color} parsed from {@link Matcher}
*/
public static Color getRGBPatternColor(Matcher... | 3.68 |
hbase_BackupManifest_store | /**
* TODO: fix it. Persist the manifest file.
* @throws BackupException if an error occurred while storing the manifest file.
*/
public void store(Configuration conf) throws BackupException {
byte[] data = backupImage.toProto().toByteArray();
// write the file, overwrite if already exist
Path manifestFilePath... | 3.68 |
hadoop_ContainerUpdates_getDemotionRequests | /**
* Returns Container Demotion Requests.
* @return Container Demotion Requests.
*/
public List<UpdateContainerRequest> getDemotionRequests() {
return demotionRequests;
} | 3.68 |
hadoop_OperationDuration_finished | /**
* Update the finished time with the current system time.
*/
public void finished() {
finished = time();
} | 3.68 |
flink_SourceReader_notifyCheckpointComplete | /**
* We have an empty default implementation here because most source readers do not have to
* implement the method.
*
* @see CheckpointListener#notifyCheckpointComplete(long)
*/
@Override
default void notifyCheckpointComplete(long checkpointId) throws Exception {} | 3.68 |
hbase_QuotaTableUtil_createPutForNamespaceSnapshotSize | /**
* Creates a {@code Put} for the namespace's total snapshot size.
*/
static Put createPutForNamespaceSnapshotSize(String namespace, long size) {
Put p = new Put(getNamespaceRowKey(namespace));
p.addColumn(QUOTA_FAMILY_USAGE, QUOTA_SNAPSHOT_SIZE_QUALIFIER,
org.apache.hadoop.hbase.shaded.protobuf.generated.Q... | 3.68 |
hibernate-validator_ResourceBundleMessageInterpolator_run | /**
* Runs the given privileged action, using a privileged block if required.
* <p>
* <b>NOTE:</b> This must never be changed into a publicly available method to avoid execution of arbitrary
* privileged actions within HV's protection domain.
*/
@IgnoreForbiddenApisErrors(reason = "SecurityManager is deprecated in... | 3.68 |
Activiti_WSOperation_getId | /**
* {@inheritDoc}
*/
public String getId() {
return this.id;
} | 3.68 |
hadoop_ContainerStatus_getExposedPorts | /**
* Get exposed ports of the container.
* @return List of exposed ports
*/
@Public
@Unstable
public String getExposedPorts() {
throw new UnsupportedOperationException(
"subclass must implement this method");
} | 3.68 |
framework_GridLayout_replaceComponent | /* Documented in superclass */
@Override
public void replaceComponent(Component oldComponent,
Component newComponent) {
// Gets the locations
ChildComponentData oldLocation = getState().childData.get(oldComponent);
ChildComponentData newLocation = getState().childData.get(newComponent);
if (ol... | 3.68 |
flink_FlinkAggregateJoinTransposeRule_toRegularAggregate | /**
* Convert aggregate with AUXILIARY_GROUP to regular aggregate. Return original aggregate and
* null project if the given aggregate does not contain AUXILIARY_GROUP, else new aggregate
* without AUXILIARY_GROUP and a project to permute output columns if needed.
*/
private Pair<Aggregate, List<RexNode>> toRegular... | 3.68 |
hadoop_AbstractPolicyManager_updateContext | /**
* This method is used to copy-on-write the context, that will be passed
* downstream to the router/amrmproxy policies.
*/
private FederationPolicyInitializationContext updateContext(
FederationPolicyInitializationContext federationPolicyContext,
String type) {
// copying configuration and context to av... | 3.68 |
querydsl_GeometryExpression_asText | /**
* Exports this geometric object to a specific Well-known Text Representation of Geometry.
*
* @return text representation
*/
public StringExpression asText() {
if (text == null) {
text = Expressions.stringOperation(SpatialOps.AS_TEXT, mixin);
}
return text;
} | 3.68 |
pulsar_BrokerMonitor_printGlobalData | // Prints out the global load data.
private void printGlobalData() {
synchronized (loadData) {
// 1 header row, 1 total row, and loadData.size() rows for brokers.
Object[][] rows = new Object[loadData.size() + 2][];
rows[0] = GLOBAL_HEADER;
int totalBundles = 0;
double totalT... | 3.68 |
framework_CalendarEventProvider_getProvider | /**
* @return the
* {@link com.vaadin.addon.calendar.event.CalendarEventProvider
* CalendarEventProvider} that has changed
*/
public CalendarEventProvider getProvider() {
return source;
} | 3.68 |
flink_TableChange_getOldColumnName | /** Returns the origin column name. */
public String getOldColumnName() {
return oldColumn.getName();
} | 3.68 |
querydsl_AbstractHibernateQuery_setCacheRegion | /**
* Set the name of the cache region.
* @param cacheRegion the name of a query cache region, or {@code null}
* for the default query cache
*/
@SuppressWarnings("unchecked")
public Q setCacheRegion(String cacheRegion) {
this.cacheRegion = cacheRegion;
return (Q) this;
} | 3.68 |
flink_ExecNodeConfig_getStateRetentionTime | /** @return The duration until state which was not updated will be retained. */
public long getStateRetentionTime() {
return get(ExecutionConfigOptions.IDLE_STATE_RETENTION).toMillis();
} | 3.68 |
morf_AbstractSqlDialectTest_testSelectHash | /**
* Test that {@link SqlDialect#convertStatementToHash(SelectStatement)} works.
*/
@Test
public void testSelectHash() {
SelectStatement stmt = new SelectStatement().from(new TableReference(TEST_TABLE));
String hash = testDialect.convertStatementToHash(stmt);
assertFalse("Valid", StringUtils.isBlank(hash));
} | 3.68 |
flink_DataOutputSerializer_getSharedBuffer | /**
* Gets a reference to the internal byte buffer. This buffer may be larger than the actual
* serialized data. Only the bytes from zero to {@link #length()} are valid. The buffer will
* also be overwritten with the next write calls.
*
* <p>This method is useful when trying to avid byte copies, but should be used... | 3.68 |
framework_VTabsheetBase_addTabKey | /**
* For internal use only. May be removed or replaced in the future.
*
* @param key
* an internal key that corresponds with a tab
* @param disabled
* {@code true} if the tab should be disabled, {@code false}
* otherwise
*/
public void addTabKey(String key, boolean disabled) {
... | 3.68 |
hmily_HmilyTacParticipantCoordinator_commitParticipant | /**
* Commit participant.
*
* @param hmilyParticipantList the hmily participant list
* @param selfParticipantId the self participant id
*/
public void commitParticipant(final List<HmilyParticipant> hmilyParticipantList, final Long selfParticipantId) {
if (CollectionUtils.isEmpty(hmilyParticipantList)) {
... | 3.68 |
hbase_RSGroupInfo_removeConfiguration | /** Remove a config setting represented by the key from the {@link #configuration} map */
public void removeConfiguration(final String key) {
configuration.remove(key);
} | 3.68 |
flink_FixedLengthRecordSorter_reset | /**
* Resets the sort buffer back to the state where it is empty. All contained data is discarded.
*/
@Override
public void reset() {
// reset all offsets
this.numRecords = 0;
this.currentSortBufferOffset = 0;
this.sortBufferBytes = 0;
// return all memory
this.freeMemory.addAll(this.sortBuff... | 3.68 |
framework_DataCommunicator_setInMemorySorting | /**
* Sets the {@link Comparator} to use with in-memory sorting.
*
* @param comparator
* comparator used to sort data
*/
public void setInMemorySorting(Comparator<T> comparator) {
setInMemorySorting(comparator, true);
} | 3.68 |
flink_Configuration_getInteger | /**
* Returns the value associated with the given config option as an integer. If no value is
* mapped under any key of the option, it returns the specified default instead of the option's
* default value.
*
* @param configOption The configuration option
* @param overrideDefault The value to return if no value wa... | 3.68 |
rocketmq-connect_AbstractLocalSchemaRegistryClient_getSchemaLatestVersion | /**
* Get schema latest version
*
* @param subject
* @return
*/
public GetSchemaResponse getSchemaLatestVersion(String namespace, String subject) {
try {
return schemaRegistryClient.getSchemaBySubject(cluster, namespace, subject);
} catch (RestClientException | IOException e) {
if (e instan... | 3.68 |
hbase_MetricsHeapMemoryManager_setCurMemStoreOnHeapSizeGauge | /**
* Set the current global memstore on-heap size gauge
* @param memStoreOnHeapSize the current memory on-heap size in memstore, in bytes.
*/
public void setCurMemStoreOnHeapSizeGauge(final long memStoreOnHeapSize) {
source.setCurMemStoreOnHeapSizeGauge(memStoreOnHeapSize);
} | 3.68 |
MagicPlugin_CastPermissionManager_getRegionCastPermission | /**
* This will perform cast permission checks for a specific location.
*
* @return false to deny cast permission, null to not care. Returning true means the cast will be allowed,
* including breaking/building blocks, even if it otherwise would not be allowed.
*/
@Nullable
default Boolean getRegionCastPermissi... | 3.68 |
querydsl_ExpressionUtils_likeToRegex | /**
* Convert the given like pattern to a regex pattern
*
* @param expr expression to be converted
* @param matchStartAndEnd if start and end should be matched as well
* @return converted expression
*/
@SuppressWarnings("unchecked")
public static Expression<String> likeToRegex(Expression<String> expr, boolean mat... | 3.68 |
framework_UIDL_getLongAttribute | /**
* Gets the named attribute as a long.
*
* @param name
* the name of the attribute to get
* @return the attribute value
*/
public long getLongAttribute(String name) {
return (long) attr().getRawNumber(name);
} | 3.68 |
framework_VMediaBase_setLoop | /**
* Enables or disables looping.
*
* @param loop
* if true, enable looping
* @since 7.7.11
*/
public void setLoop(final boolean loop) {
media.setLoop(loop);
} | 3.68 |
hbase_SnapshotManager_getCoordinator | /** Returns distributed commit coordinator for all running snapshots */
ProcedureCoordinator getCoordinator() {
return coordinator;
} | 3.68 |
morf_SqlDialect_tableHasBlobColumns | /**
* Whether this table has any BLOB columns.
*
* @param table The table.
* @return true if the table has one or more BLOB columns.
*/
protected boolean tableHasBlobColumns(Table table) {
for (Column column : table.columns()) {
if (column.getType() == DataType.BLOB) {
return true;
}
}
return f... | 3.68 |
pulsar_ResourceUnitRanking_getAllocatedLoadPercentageMemory | /**
* Percetage of memory allocated to bundle's quota.
*/
public double getAllocatedLoadPercentageMemory() {
return this.allocatedLoadPercentageMemory;
} | 3.68 |
pulsar_ProducerConfiguration_getBlockIfQueueFull | /**
*
* @return whether the producer will block {@link Producer#send} and {@link Producer#sendAsync} operations when the
* pending queue is full
*/
public boolean getBlockIfQueueFull() {
return conf.isBlockIfQueueFull();
} | 3.68 |
framework_Escalator_resetSizesFromDom | /**
* Resets all cached pixel sizes and reads new values from the DOM. This
* methods should be used e.g. when styles affecting the dimensions of
* elements in this escalator have been changed.
*/
public void resetSizesFromDom() {
header.autodetectRowHeightNow();
body.autodetectRowHeightNow();
footer.au... | 3.68 |
hadoop_RouterQuotaManager_getQuotaUsage | /**
* Get the nearest ancestor's quota usage, and meanwhile its quota was set.
* @param path The path being written.
* @return RouterQuotaUsage Quota usage.
*/
public RouterQuotaUsage getQuotaUsage(String path) {
readLock.lock();
try {
RouterQuotaUsage quotaUsage = this.cache.get(path);
if (quotaUsage !... | 3.68 |
hudi_UtilHelpers_buildSparkContext | /**
* Build Spark Context for ingestion/compaction.
*
* @return
*/
public static JavaSparkContext buildSparkContext(String appName, String sparkMaster, String sparkMemory) {
SparkConf sparkConf = buildSparkConf(appName, sparkMaster);
if (sparkMemory != null) {
sparkConf.set("spark.executor.memory", sparkMem... | 3.68 |
hadoop_TaskId_readFields | /** {@inheritDoc} */
public final void readFields(final DataInput in) throws IOException {
jobId = new JobId();
jobId.readFields(in);
this.taskId = WritableUtils.readVLong(in);
} | 3.68 |
flink_CopyOnWriteSkipListStateMap_getFirstNodeWithNamespace | /**
* Find the first node with the given namespace at level 0.
*
* @param namespaceSegment memory segment storing the namespace.
* @param namespaceOffset offset of the namespace.
* @param namespaceLen length of the namespace.
* @return the first node with the given namespace. NIL_NODE will be returned if not exis... | 3.68 |
morf_SchemaValidator_isNameConventional | /**
* <p>
* Method to establish if a name matches an allowed pattern of characters to
* follow the correct naming convention.
* </p>
* <p>
* The name must:
* </p>
* <ul>
* <li>begin with an alphabetic character [a-zA-Z]</li>
* <li>only contain alphanumeric characters or underscore [a-zA-Z0-9_]</li>
* </ul>
... | 3.68 |
hadoop_FilterFileSystem_copyToLocalFile | /**
* The src file is under FS, and the dst is on the local disk.
* Copy it from FS control to the local dst name.
* delSrc indicates if the src will be removed or not.
*/
@Override
public void copyToLocalFile(boolean delSrc, Path src, Path dst)
throws IOException {
fs.copyToLocalFile(delSrc, src, dst);
} | 3.68 |
hadoop_SpillCallBackPathsFinder_getInvalidSpillEntries | /**
* Gets the set of path:pos of the entries that were accessed incorrectly.
* @return a set of string in the format of {@literal Path[Pos]}
*/
public Set<String> getInvalidSpillEntries() {
Set<String> result = new LinkedHashSet<>();
for (Entry<Path, Set<Long>> spillMapEntry: invalidAccessMap.entrySet()) {
... | 3.68 |
hudi_RequestHandler_jsonifyResult | /**
* Serializes the result into JSON String.
*
* @param ctx Javalin context
* @param obj object to serialize
* @param metricsRegistry {@code Registry} instance for storing metrics
* @param objectMapper JSON object mapper
* @param logger {@code Logger} instance
* @return JSON... | 3.68 |
framework_VTabsheet_getSelectTabKey | /**
* Gets the key to select the focused tab when navigating using
* previous/next (left/right) keys.
*
* @return the key to select the focused tab.
*
* @see #getNextTabKey()
* @see #getPreviousTabKey()
*/
protected int getSelectTabKey() {
return KeyCodes.KEY_SPACE;
} | 3.68 |
flink_RocksDBKeyedStateBackend_getInstanceBasePath | /** Only visible for testing, DO NOT USE. */
File getInstanceBasePath() {
return instanceBasePath;
} | 3.68 |
flink_SystemProcessingTimeService_finalize | // safety net to destroy the thread pool
@Override
protected void finalize() throws Throwable {
super.finalize();
timerService.shutdownNow();
} | 3.68 |
flink_StreamOperatorFactory_isStreamSource | /** Is this factory for {@link StreamSource}. */
default boolean isStreamSource() {
return false;
} | 3.68 |
flink_ExceptionUtils_stripException | /**
* Unpacks an specified exception and returns its cause. Otherwise the given {@link Throwable}
* is returned.
*
* @param throwableToStrip to strip
* @param typeToStrip type to strip
* @return Unpacked cause or given Throwable if not packed
*/
public static Throwable stripException(
Throwable throwable... | 3.68 |
hbase_CatalogFamilyFormat_getSeqNumColumn | /**
* Returns the column qualifier for seqNum column for replicaId
* @param replicaId the replicaId of the region
* @return a byte[] for seqNum column qualifier
*/
public static byte[] getSeqNumColumn(int replicaId) {
return replicaId == 0
? HConstants.SEQNUM_QUALIFIER
: Bytes.toBytes(HConstants.SEQNUM_QU... | 3.68 |
hibernate-validator_ValueContexts_getLocalExecutionContextForExecutable | /**
* Creates a value context for validating an executable. Can be applied to both parameter and
* return value validation. Does not require a bean metadata information.
*/
public static <T, V> ValueContext<T, V> getLocalExecutionContextForExecutable(
ExecutableParameterNameProvider parameterNameProvider,
T valu... | 3.68 |
flink_StreamExecutionEnvironment_setNumberOfExecutionRetries | /**
* Sets the number of times that failed tasks are re-executed. A value of zero effectively
* disables fault tolerance. A value of {@code -1} indicates that the system default value (as
* defined in the configuration) should be used.
*
* @param numberOfExecutionRetries The number of times the system will try to ... | 3.68 |
flink_BlockInfo_getAccumulatedRecordCount | /**
* Returns the accumulated record count.
*
* @return the accumulated record count
*/
public long getAccumulatedRecordCount() {
return this.accumulatedRecordCount;
} | 3.68 |
flink_KeyGroupRangeAssignment_assignToKeyGroup | /**
* Assigns the given key to a key-group index.
*
* @param key the key to assign
* @param maxParallelism the maximum supported parallelism, aka the number of key-groups.
* @return the key-group to which the given key is assigned
*/
public static int assignToKeyGroup(Object key, int maxParallelism) {
Precond... | 3.68 |
hudi_HoodieTableMetadataUtil_getPartitionLatestFileSlices | /**
* Get the latest file slices for a Metadata Table partition. The list of file slices
* returned is sorted in the correct order of file group name.
*
* @param metaClient - Instance of {@link HoodieTableMetaClient}.
* @param fsView - Metadata table filesystem view
* @param partition - The name of the parti... | 3.68 |
flink_InPlaceMutableHashTable_readPointer | /**
* Note: this is sometimes a negated length instead of a pointer (see
* HashTableProber.updateMatch).
*/
public long readPointer() throws IOException {
return inView.readLong();
} | 3.68 |
hbase_MasterObserver_postBalance | /**
* Called after the balancing plan has been submitted.
* @param ctx the environment to interact with the framework and master
* @param request the request used to trigger the balance
* @param plans the RegionPlans which master has executed. RegionPlan serves as hint as for the
* final desti... | 3.68 |
framework_VMenuBar_setParentMenu | /**
* Set the parent menu of this menu.
*
* @param parent
*/
public void setParentMenu(VMenuBar parent) {
parentMenu = parent;
} | 3.68 |
framework_Escalator_verifyEscalatorCount | /**
* Make sure that there is a correct amount of escalator rows: Add more
* if needed, or remove any superfluous ones.
* <p>
* This method should be called when e.g. the height of the Escalator
* changes.
* <p>
* <em>Note:</em> This method will make sure that the escalator rows are
* placed in the proper place... | 3.68 |
flink_FlinkFilterJoinRule_isSmart | /** Whether to try to strengthen join-type, default false. */
@Value.Default
default boolean isSmart() {
return false;
} | 3.68 |
hibernate-validator_LuhnCheckValidator_isCheckDigitValid | /**
* Validate check digit using Luhn algorithm
*
* @param digits The digits over which to calculate the checksum
* @param checkDigit the check digit
*
* @return {@code true} if the luhn check result matches the check digit, {@code false} otherwise
*/
@Override
public boolean isCheckDigitValid(List<Integer> digi... | 3.68 |
flink_TypeExtractor_createTypeInfoFromFactory | /** Creates type information using a given factory. */
@SuppressWarnings("unchecked")
private <IN1, IN2, OUT> TypeInformation<OUT> createTypeInfoFromFactory(
Type t,
TypeInformation<IN1> in1Type,
TypeInformation<IN2> in2Type,
List<Type> factoryHierarchy,
TypeInfoFactory<? super O... | 3.68 |
hbase_RegionScannerImpl_joinedHeapMayHaveData | /** Returns true when the joined heap may have data for the current row */
private boolean joinedHeapMayHaveData(Cell currentRowCell) throws IOException {
Cell nextJoinedKv = joinedHeap.peek();
boolean matchCurrentRow =
nextJoinedKv != null && CellUtil.matchingRows(nextJoinedKv, currentRowCell);
boolean match... | 3.68 |
streampipes_ImageZipAdapter_start | /**
* First extracts the user input and then starts a thread publishing events with images in the zip file
*
* @param collector is used to pre-process and publish events on message broker
* @param extractor to extract configurations
* @param infinite Describes if the replay should be restarted when it is finished... | 3.68 |
framework_FocusableGrid_addBlurHandler | /*
* (non-Javadoc)
*
* @see
* com.google.gwt.event.dom.client.HasBlurHandlers#addBlurHandler(com.google
* .gwt.event.dom.client.BlurHandler)
*/
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
return addDomHandler(handler, BlurEvent.getType());
} | 3.68 |
hmily_SubCoordinator_addXaResource | /**
* Add a xa Resource.
*
* @param xaResource the xa resource
* @return boolean boolean
*/
public synchronized boolean addXaResource(final XAResource xaResource) {
switch (state) {
case STATUS_MARKED_ROLLBACK:
break;
case STATUS_ACTIVE:
break;
default:
... | 3.68 |
framework_CustomFieldConnector_getChildComponents | /*
* (non-Javadoc)
*
* @see com.vaadin.client.HasComponentsConnector#getChildren()
*/
@Override
public List<ComponentConnector> getChildComponents() {
if (childComponents == null) {
return Collections.emptyList();
}
return childComponents;
} | 3.68 |
flink_SqlNodeConverters_convertSqlNode | /**
* Convert the given validated SqlNode into Operation if there is a registered converter for the
* node.
*/
@SuppressWarnings({"unchecked", "rawtypes"})
public static Optional<Operation> convertSqlNode(
SqlNode validatedSqlNode, ConvertContext context) {
// match by class first
SqlNodeConverter cl... | 3.68 |
morf_InsertStatementBuilder_build | /**
* @see org.alfasoftware.morf.util.Builder#build()
*/
@Override
public InsertStatement build() {
return new InsertStatement(this);
} | 3.68 |
hbase_RegionInfoDisplay_getRegionNameForDisplay | /**
* Get the region name for display. Optionally hide the start key.
* @return region name bytes
*/
public static byte[] getRegionNameForDisplay(RegionInfo ri, Configuration conf) {
boolean displayKey = conf.getBoolean(DISPLAY_KEYS_KEY, true);
if (displayKey || ri.getTable().equals(TableName.META_TABLE_NAME)) {... | 3.68 |
morf_AbstractSqlDialectTest_testUpdateWithLiteralValues | /**
* Test whether the right update SQL statement was generated
*/
@Test
public void testUpdateWithLiteralValues() {
UpdateStatement stmt = update(tableRef(TEST_TABLE))
.set(literal("Value").as(STRING_FIELD))
.set(blobLiteral(NEW_BLOB_VALUE).as("blobFieldOne"))
.set(blobLiteral(NEW_BLOB_VALUE.getBytes(S... | 3.68 |
hudi_HoodieAppendHandle_flushToDiskIfRequired | /**
* Checks if the number of records have reached the set threshold and then flushes the records to disk.
*/
private void flushToDiskIfRequired(HoodieRecord record, boolean appendDeleteBlocks) {
if (numberOfRecords >= (int) (maxBlockSize / averageRecordSize)
|| numberOfRecords % NUMBER_OF_RECORDS_TO_ESTIMATE... | 3.68 |
pulsar_ManagedCursorImpl_filterReadEntries | /**
* Given a list of entries, filter out the entries that have already been individually deleted.
*
* @param entries
* a list of entries
* @return a list of entries not containing deleted messages
*/
List<Entry> filterReadEntries(List<Entry> entries) {
lock.readLock().lock();
try {
Ran... | 3.68 |
hadoop_ExpressionFactory_isExpression | /**
* Determines whether the given expression name represents and actual
* expression.
*
* @param expressionName
* name of the expression
* @return true if expressionName represents an expression
*/
boolean isExpression(String expressionName) {
return expressionMap.containsKey(expressionName);
} | 3.68 |
hadoop_SinglePendingCommit_getDestinationKey | /** @return destination key in the bucket. */
public String getDestinationKey() {
return destinationKey;
} | 3.68 |
hadoop_BlockDispatcher_sendRequest | /** Send a reportedBlock replace request to the output stream. */
private static void sendRequest(DataOutputStream out, ExtendedBlock eb,
Token<BlockTokenIdentifier> accessToken, DatanodeInfo source,
StorageType targetStorageType) throws IOException {
new Sender(out).replaceBlock(eb, targetStorageType, access... | 3.68 |
flink_StateTable_getState | /** Returns the internal data structure. */
@VisibleForTesting
public StateMap<K, N, S>[] getState() {
return keyGroupedStateMaps;
} | 3.68 |
flink_TriFunctionWithException_unchecked | /**
* Convert at {@link TriFunctionWithException} into a {@link TriFunction}.
*
* @param triFunctionWithException function with exception to convert into a function
* @param <A> first input type
* @param <B> second input type
* @param <C> third input type
* @param <D> output type
* @return {@link BiFunction} wh... | 3.68 |
hbase_SegmentScanner_toString | // debug method
@Override
public String toString() {
String res = "Store segment scanner of type " + this.getClass().getName() + "; ";
res += "Scanner order " + getScannerOrder() + "; ";
res += getSegment().toString();
return res;
} | 3.68 |
hmily_MongoEntityConvert_convert | /**
* 转换mongo对象.
* @param entity mongo entity.
* @return hmily entity.
*/
public HmilyLock convert(final LockMongoEntity entity) {
return new HmilyLock(entity.getTransId(), entity.getParticipantId(), entity.getResourceId(),
entity.getTargetTableName(), entity.getTargetTablePk());
} | 3.68 |
morf_DataValueLookupMetadata_getChildren | /**
* Given the following record arrangements:
*
* [A]
* [A, B]
* [A, B, C]
* [A, D, E]
* [A, D, F]
*
* We arrange our metadata in a tree:
*
* [A]
* - [+ B]
* - [+ C]
* - [+ D]
* - [+ E]
* - [+ F]
*
* This method returns the children of this record arrangement in that tree.
* It... | 3.68 |
flink_LineBreakElement_linebreak | /** Creates a line break in the description. */
public static LineBreakElement linebreak() {
return new LineBreakElement();
} | 3.68 |
framework_DefaultDeploymentConfiguration_isProductionMode | /**
* {@inheritDoc}
*
* The default is false.
*/
@Override
public boolean isProductionMode() {
return productionMode;
} | 3.68 |
hadoop_TaskPool_abortWith | /**
* Task to abort with after another task failed.
* @param task task to execute
* @return the builder
*/
public Builder<I> abortWith(Task<I, ?> task) {
this.abortTask = task;
return this;
} | 3.68 |
graphhopper_VectorTile_addAllTags | /**
* <pre>
* Tags of this feature are encoded as repeated pairs of
* integers.
* A detailed description of tags is located in sections
* 4.2 and 4.4 of the specification
* </pre>
*
* <code>repeated uint32 tags = 2 [packed = true];</code>
*/
public Builder addAllTags(
java.lang.Iterable<? extends java.lang... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.