name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_ApplicationMaster_getContainerStartCommand | /**
* Return the command used to start this container.
*/
private List<String> getContainerStartCommand() throws IOException {
// Set the necessary command to execute on the allocated container
List<String> vargs = new ArrayList<>();
// Set executable command
vargs.add("./" + DynoConstants.START_SCRIPT.getRe... | 3.68 |
morf_ConcatenatedField_deepCopyInternal | /**
* @see org.alfasoftware.morf.sql.element.AliasedField#deepCopyInternal(DeepCopyTransformation)
*/
@Override
protected AliasedField deepCopyInternal(DeepCopyTransformation transformer) {
return new ConcatenatedField(getAlias(), FluentIterable.from(fields).transform(transformer::deepCopy).toList());
} | 3.68 |
hadoop_RpcProgramPortmap_dump | /**
* This procedure enumerates all entries in the port mapper's database. The
* procedure takes no parameters and returns a list of program, version,
* protocol, and port values.
*/
private XDR dump(int xid, XDR in, XDR out) {
PortmapMapping[] pmapList = map.values().toArray(new PortmapMapping[0]);
return Port... | 3.68 |
hbase_HFileOutputFormat2_createFamilyConfValueMap | /**
* Run inside the task to deserialize column family to given conf value map.
* @param conf to read the serialized values from
* @param confName conf key to read from the configuration
* @return a map of column family to the given configuration value
*/
private static Map<byte[], String> createFamilyConfValu... | 3.68 |
flink_NettyMessageClientDecoderDelegate_channelInactive | /**
* Releases resources when the channel is closed. When exceptions are thrown during processing
* received netty buffers, {@link CreditBasedPartitionRequestClientHandler} is expected to catch
* the exception and close the channel and trigger this notification.
*
* @param ctx The context of the channel close noti... | 3.68 |
flink_BinarySegmentUtils_setDouble | /**
* set double from segments.
*
* @param segments target segments.
* @param offset value offset.
*/
public static void setDouble(MemorySegment[] segments, int offset, double value) {
if (inFirstSegment(segments, offset, 8)) {
segments[0].putDouble(offset, value);
} else {
setDoubleMultiSe... | 3.68 |
shardingsphere-elasticjob_RDBJobEventRepository_getInstance | /**
* The same data source always return the same RDB job event repository instance.
*
* @param dataSource dataSource
* @return RDBJobEventStorage instance
* @throws SQLException SQLException
*/
public static RDBJobEventRepository getInstance(final DataSource dataSource) throws SQLException {
return getInstan... | 3.68 |
hadoop_HeaderProcessing_decodeBytes | /**
* Get the string value from the bytes.
* if null : return null, otherwise the UTF-8 decoded
* bytes.
* @param bytes source bytes
* @return decoded value
*/
public static String decodeBytes(byte[] bytes) {
return bytes == null
? null
: new String(bytes, StandardCharsets.UTF_8);
} | 3.68 |
framework_HierarchyMapper_setInMemorySorting | /**
* Sets the current in-memory sorting. This will cause the hierarchy to be
* constructed again.
*
* @param inMemorySorting
* the in-memory sorting
*/
public void setInMemorySorting(Comparator<T> inMemorySorting) {
this.inMemorySorting = inMemorySorting;
} | 3.68 |
hbase_Table_getRequestAttributes | /**
* Get the attributes to be submitted with requests
* @return map of request attributes
*/
default Map<String, byte[]> getRequestAttributes() {
throw new NotImplementedException("Add an implementation!");
} | 3.68 |
framework_FilesystemContainer_addItemProperty | /**
* Filesystem container does not support adding new properties.
*
* @see Item#addItemProperty(Object, Property)
*/
@Override
public boolean addItemProperty(Object id, Property property)
throws UnsupportedOperationException {
throw new UnsupportedOperationException("Filesystem container "
... | 3.68 |
hmily_Timeout_isDefault | /**
* 是否为自定义的一个timeout.
*
* @return true or false.
*/
default boolean isDefault() {
return true;
} | 3.68 |
hadoop_NvidiaGPUPluginForRuntimeV2_generateAllDeviceCombination | /**
* For every possible combination of i elements.
* We generate a map whose key is the combination, value is cost.
*/
private void generateAllDeviceCombination(
Map<Integer, List<Map.Entry<Set<Device>, Integer>>> cTable,
Device[] allDevices, int n) {
// allocated devices count range from 1 to n-1
for (... | 3.68 |
hudi_SerializableSchema_writeObjectTo | // create a public write method for unit test
public void writeObjectTo(ObjectOutputStream out) throws IOException {
// Note: writeUTF cannot support string length > 64K. So use writeObject which has small overhead (relatively).
out.writeObject(schema.toString());
} | 3.68 |
hadoop_SharedKeyCredentials_addCanonicalizedHeaders | /**
* Add x-ms- prefixed headers in a fixed order.
*
* @param conn the HttpURLConnection for the operation
* @param canonicalizedString the canonicalized string to add the canonicalized headerst to.
*/
private static void addCanonicalizedHeaders(final HttpURLConnection conn, final StringBuilder cano... | 3.68 |
hbase_UnsafeAccess_toByte | /**
* Returns the byte at the given offset of the object
* @return the byte at the given offset
*/
public static byte toByte(Object ref, long offset) {
return HBasePlatformDependent.getByte(ref, offset);
} | 3.68 |
framework_AbsoluteLayoutRelativeSizeContent_createHalfTableOnFixed | /**
* Creates an {@link AbsoluteLayout} of fixed size that contains a
* half-sized {@link Table}.
*
* @return the created layout
*/
private Component createHalfTableOnFixed() {
AbsoluteLayout absoluteLayout = new AbsoluteLayout();
absoluteLayout.setWidth(200, Unit.PIXELS);
absoluteLayout.setHeight(200,... | 3.68 |
hbase_ZKWatcher_syncOrTimeout | /**
* Forces a synchronization of this ZooKeeper client connection within a timeout. Enforcing a
* timeout lets the callers fail-fast rather than wait forever for the sync to finish.
* <p>
* Executing this method before running other methods will ensure that the subsequent operations
* are up-to-date and consisten... | 3.68 |
dubbo_Page_hasData | /**
* Returns whether the page has data at all.
*
* @return
*/
default boolean hasData() {
return getDataSize() > 0;
} | 3.68 |
morf_AliasedField_isNotNull | /**
* @return criteria for this field being not null
*/
public Criterion isNotNull() {
return Criterion.isNotNull(this);
} | 3.68 |
flink_SchedulerNG_requestJobResourceRequirements | /**
* Read current {@link JobResourceRequirements job resource requirements}.
*
* @return Current resource requirements.
*/
default JobResourceRequirements requestJobResourceRequirements() {
throw new UnsupportedOperationException(
String.format(
"The %s does not support changing... | 3.68 |
hbase_VersionInfo_getDate | /**
* The date that hbase was compiled.
* @return the compilation date in unix date format
*/
public static String getDate() {
return Version.date;
} | 3.68 |
morf_SqlDialect_getSqlForEvery | /**
* Converts the every function into SQL.
*
* @param function the function details
* @return a string representation of the SQL
*/
protected String getSqlForEvery(Function function) {
return getSqlForMin(function);
} | 3.68 |
framework_InfoSection_getThemeVersion | /**
* Finds out the version of the current theme (i.e. the version of Vaadin
* used to compile it)
*
* @since 7.1
* @return The full version as a string
*/
private String getThemeVersion() {
Element div = DOM.createDiv();
div.setClassName(THEME_VERSION_CLASSNAME);
RootPanel.get().getElement().appendCh... | 3.68 |
flink_GenericRowData_ofKind | /**
* Creates an instance of {@link GenericRowData} with given kind and field values.
*
* <p>Note: All fields of the row must be internal data structures.
*/
public static GenericRowData ofKind(RowKind kind, Object... values) {
GenericRowData row = new GenericRowData(kind, values.length);
for (int i = 0; i... | 3.68 |
hbase_HMaster_getActiveMasterInfoPort | /** Returns info port of active master or 0 if any exception occurs. */
public int getActiveMasterInfoPort() {
return activeMasterManager.getActiveMasterInfoPort();
} | 3.68 |
framework_Slot_hasCaption | /**
* Does the slot have a caption.
*
* @return {@code true} if the slot has a caption, {@code false} otherwise
*/
public boolean hasCaption() {
return caption != null;
} | 3.68 |
hadoop_IOStatisticsBinding_pairedTrackerFactory | /**
* Create a DurationTrackerFactory which aggregates the tracking
* of two other factories.
* @param first first tracker factory
* @param second second tracker factory
* @return a factory
*/
public static DurationTrackerFactory pairedTrackerFactory(
final DurationTrackerFactory first,
final DurationTrac... | 3.68 |
framework_AbstractDateField_getResolution | /**
* Gets the resolution.
*
* @return the date/time field resolution
*/
public R getResolution() {
return resolution;
} | 3.68 |
querydsl_SQLTemplates_serializeMerge | /**
* template method for MERGE serialization
*
* @param metadata
* @param entity
* @param keys
* @param columns
* @param values
* @param subQuery
* @param context
*/
public void serializeMerge(QueryMetadata metadata, RelationalPath<?> entity,
List<Path<?>> keys, List<Path<?>> columns, List<Expression... | 3.68 |
framework_BrowserWindowOpener_getWindowName | /**
* Gets the target window name.
*
* @see #setWindowName(String)
*
* @return the window target string
*/
public String getWindowName() {
return getState(false).target;
} | 3.68 |
morf_SqlDialect_createAllIndexStatements | /**
* Helper method to create all index statements defined for a table
*
* @param table the table to create indexes for
* @return a list of index statements
*/
protected List<String> createAllIndexStatements(Table table) {
List<String> indexStatements = new ArrayList<>();
for (Index index : table.indexes()) {
... | 3.68 |
hudi_BaseConsistentHashingBucketClusteringPlanStrategy_buildSplitClusteringGroups | /**
* Generate clustering groups according to split rules.
* Currently, we always split bucket into two sub-buckets.
*
* @param identifier bucket identifier
* @param fileSlices file slice candidate to be built as split clustering groups
* @param splitSlot number of new bucket allowed to produce, in order to cons... | 3.68 |
flink_BaseMappingExtractor_verifyMappingForMethod | /** Checks if the given method can be called and returns what hints declare. */
private void verifyMappingForMethod(
Method method,
Map<FunctionSignatureTemplate, FunctionResultTemplate> collectedMappingsPerMethod,
MethodVerification verification) {
collectedMappingsPerMethod.forEach(
... | 3.68 |
flink_SessionWindowAssigner_withGap | /**
* Creates a new {@code SessionWindowAssigner} {@link WindowAssigner} that assigns elements to
* sessions based on the timestamp.
*
* @param size The session timeout, i.e. the time gap between sessions
* @return The policy.
*/
public static SessionWindowAssigner withGap(Duration size) {
return new SessionW... | 3.68 |
hbase_ConnectionFactory_createConnection | /**
* Create a new Connection instance using the passed <code>conf</code> instance. Connection
* encapsulates all housekeeping for a connection to the cluster. All tables and interfaces
* created from returned connection share zookeeper connection, meta cache, and connections to
* region servers and masters. <br>
... | 3.68 |
hudi_HoodieAsyncService_fetchNextAsyncServiceInstant | /**
* Fetch next pending compaction/clustering instant if available.
*
* @return {@link HoodieInstant} corresponding to the next pending compaction/clustering.
* @throws InterruptedException
*/
HoodieInstant fetchNextAsyncServiceInstant() throws InterruptedException {
LOG.info(String.format("Waiting for next ins... | 3.68 |
hbase_RowResource_increment | /**
* Validates the input request parameters, parses columns from CellSetModel, and invokes Increment
* on HTable.
* @param model instance of CellSetModel
* @return Response 200 OK, 304 Not modified, 400 Bad request
*/
Response increment(final CellSetModel model) {
Table table = null;
Increment increment = nul... | 3.68 |
morf_SqlDialect_resultSetToRecord | /**
* Given an ordered list of columns and a {@link ResultSet}, creates a
* {@link Record} from the current row.
*
* @param resultSet The {@link ResultSet}. Must have been advanced (using
* {@link ResultSet#next()}) to the appropriate row.
* @param columns The columns, ordered according to their appearan... | 3.68 |
hudi_AbstractTableFileSystemView_fetchLatestFileSlice | /**
* Default implementation for fetching file-slice.
*
* @param partitionPath Partition path
* @param fileId File Id
* @return File Slice if present
*/
public Option<FileSlice> fetchLatestFileSlice(String partitionPath, String fileId) {
return Option
.fromJavaOptional(fetchLatestFileSlices(partitionPath)... | 3.68 |
hbase_EncryptionUtil_createCryptoAES | /**
* Helper to create an instance of CryptoAES.
* @param conf The current configuration.
* @param cryptoCipherMeta The metadata for create CryptoAES.
* @return The instance of CryptoAES.
* @throws IOException if create CryptoAES failed
*/
public static CryptoAES createCryptoAES(RPCProtos.CryptoCipher... | 3.68 |
morf_XmlDataSetProducer_next | /**
* @see java.util.Iterator#next()
*/
@Override
public Record next() {
if (hasNext()) {
// Buffer this record
RecordBuilder result = DataSetUtils.record();
for (Entry<String, String> columnNameAndUpperCase : columnNamesAndUpperCase.entrySet()) {
result.setString(columnNameAndUpperCase.getValue()... | 3.68 |
framework_ComponentSizeValidator_validateLayouts | /**
* Validates the layout and returns a collection of errors.
*
* @since 7.1
* @param ui
* The UI to validate
* @return A collection of errors. An empty collection if there are no
* errors.
*/
public static List<InvalidLayout> validateLayouts(UI ui) {
List<InvalidLayout> invalidRelativeS... | 3.68 |
hadoop_FileIoProvider_sync | /**
* Sync the given {@link FileOutputStream}.
*
* @param volume target volume. null if unavailable.
* @throws IOException
*/
public void sync(
@Nullable FsVolumeSpi volume, FileOutputStream fos) throws IOException {
final long begin = profilingEventHook.beforeFileIo(volume, SYNC, 0);
try {
faultInjec... | 3.68 |
framework_FilesystemContainer_areChildrenAllowed | /**
* Tests if the specified Item in the container may have children. Since a
* <code>FileSystemContainer</code> contains files and directories, this
* method returns <code>true</code> for directory Items only.
*
* @param itemId
* the id of the item.
* @return <code>true</code> if the specified Item i... | 3.68 |
hudi_HoodieOperation_isUpdateBefore | /**
* Returns whether the operation is UPDATE_BEFORE.
*/
public static boolean isUpdateBefore(HoodieOperation operation) {
return operation == UPDATE_BEFORE;
} | 3.68 |
hbase_CompositeImmutableSegment_isEmpty | /** Returns whether the segment has any cells */
@Override
public boolean isEmpty() {
for (ImmutableSegment s : segments) {
if (!s.isEmpty()) return false;
}
return true;
} | 3.68 |
hbase_VisibilityUtils_readUserAuthsFromZKData | /**
* Reads back User auth data written to zookeeper.
* @return User auth details
*/
public static MultiUserAuthorizations readUserAuthsFromZKData(byte[] data)
throws DeserializationException {
if (ProtobufUtil.isPBMagicPrefix(data)) {
int pblen = ProtobufUtil.lengthOfPBMagic();
try {
MultiUserAuth... | 3.68 |
hadoop_FSBuilder_must | /**
* Set mandatory long option, despite passing in a floating
* point value.
*
* @param key key.
* @param value value.
* @return generic type B.
* @see #must(String, String)
*/
@Deprecated
default B must(@Nonnull String key, double value) {
return mustLong(key, (long) value);
} | 3.68 |
hadoop_OBSCommonUtils_longBytesOption | /**
* Get a long option not smaller than the minimum allowed value, supporting
* memory prefixes K,M,G,T,P.
*
* @param conf configuration
* @param key key to look up
* @param defVal default value
* @param min minimum value
* @return the value
* @throws IllegalArgumentException if the value is below the... | 3.68 |
flink_AbstractOrcFileInputFormat_seek | /**
* The argument of {@link RecordReader#seekToRow(long)} must come from {@link
* RecordReader#getRowNumber()}. The internal implementation of ORC is very confusing. It
* has special behavior when dealing with Predicate.
*/
public void seek(CheckpointedPosition position) throws IOException {
orcReader.seekToRo... | 3.68 |
graphhopper_VectorTile_hasBoolValue | /**
* <code>optional bool bool_value = 7;</code>
*/
public boolean hasBoolValue() {
return ((bitField0_ & 0x00000040) == 0x00000040);
} | 3.68 |
hudi_HoodieTableMetadataUtil_readRecordKeysFromFileSlices | /**
* Reads the record keys from the given file slices and returns a {@link HoodieData} of {@link HoodieRecord} to be updated in the metadata table.
* If file slice does not have any base file, then iterates over the log files to get the record keys.
*/
public static HoodieData<HoodieRecord> readRecordKeysFromFileSl... | 3.68 |
pulsar_LeastLongTermMessageRate_selectBroker | /**
* Find a suitable broker to assign the given bundle to.
*
* @param candidates
* The candidates for which the bundle may be assigned.
* @param bundleToAssign
* The data for the bundle to assign.
* @param loadData
* The load data from the leader broker.
* @param conf
* ... | 3.68 |
framework_Calendar_isMonthlyMode | /**
* Is the calendar in a mode where all days of the month is shown.
*
* @return Returns true if calendar is in monthly mode and false if it is in
* weekly mode
*/
public boolean isMonthlyMode() {
CalendarState state = getState(false);
if (state.days != null) {
return state.days.size() > 7... | 3.68 |
framework_VCalendarPanel_focusNextDay | /**
* Moves the focus forward the given number of days.
*/
private void focusNextDay(int days) {
if (focusedDate == null) {
return;
}
Date focusCopy = ((Date) focusedDate.clone());
focusCopy.setDate(focusedDate.getDate() + days);
if (!isDateInsideRange(focusCopy, resolution)) {
//... | 3.68 |
hbase_SimpleRequestController_canTakeOperation | /**
* 1) check the regions is allowed. 2) check the concurrent tasks for regions. 3) check the
* total concurrent tasks. 4) check the concurrent tasks for server.
* @param loc the destination of data
* @param heapSizeOfRow the data size
* @return either Include {@link RequestController.ReturnCode} or ski... | 3.68 |
morf_SchemaBean_viewExists | /**
* @see org.alfasoftware.morf.metadata.Schema#viewExists(java.lang.String)
*/
@Override
public boolean viewExists(String name) {
return views.containsKey(name.toUpperCase());
} | 3.68 |
flink_ApiExpressionUtils_isFunctionOfKind | /**
* Checks if the expression is a function call of given type.
*
* @param expression expression to check
* @param kind expected type of function
* @return true if the expression is function call of given type, false otherwise
*/
public static boolean isFunctionOfKind(Expression expression, FunctionKind kind) {
... | 3.68 |
framework_VScrollTable_ensureCacheFilled | /**
* Ensure we have the correct set of rows on client side, e.g. if the
* content on the server side has changed, or the client scroll position
* has changed since the last request.
*/
protected void ensureCacheFilled() {
/**
* Fixes cache issue #13576 where unnecessary rows are fetched
*/
if (i... | 3.68 |
hbase_ColumnSchemaModel_getAny | /** Returns the map for holding unspecified (user) attributes */
@XmlAnyAttribute
@JsonAnyGetter
public Map<QName, Object> getAny() {
return attrs;
} | 3.68 |
hadoop_CacheStats_release | /**
* Release some bytes that we're using.
*
* @param count
* The number of bytes to release. We will round this up to the
* page size.
*
* @return The new number of usedBytes.
*/
long release(long count) {
return usedBytesCount.release(count);
} | 3.68 |
morf_AbstractSqlDialectTest_nullOrderForDirection | /**
* A database platform may need to specify the null order by direction.
*
* <p>If a null order is not required for a SQL dialect descendant classes need to implement this method.</p>
*
* @param descending the order direction
* @return the null order for an SQL dialect
*/
protected String nullOrderForDirection... | 3.68 |
hadoop_DatanodeVolumeInfo_getNumBlocks | /**
* get number of blocks.
*/
public long getNumBlocks() {
return numBlocks;
} | 3.68 |
flink_Pool_addBack | /** Internal callback to put an entry back to the pool. */
void addBack(T object) {
pool.add(object);
} | 3.68 |
framework_ComboBox_setMultiSelect | /**
* ComboBox does not support multi select mode.
*
* @deprecated As of 7.0, use {@link ListSelect}, {@link OptionGroup} or
* {@link TwinColSelect} instead
* @see com.vaadin.ui.AbstractSelect#setMultiSelect(boolean)
* @throws UnsupportedOperationException
* if trying to activate multisel... | 3.68 |
hadoop_DiskBalancerWorkItem_setBytesCopied | /**
* Sets bytes copied so far.
*
* @param bytesCopied - long
*/
public void setBytesCopied(long bytesCopied) {
this.bytesCopied = bytesCopied;
} | 3.68 |
zxing_BitMatrix_getRowSize | /**
* @return The row size of the matrix
*/
public int getRowSize() {
return rowSize;
} | 3.68 |
pulsar_MessageDeduplication_checkStatus | /**
* Check the status of deduplication. If the configuration has changed, it will enable/disable deduplication,
* returning a future to track the completion of the task
*/
public CompletableFuture<Void> checkStatus() {
boolean shouldBeEnabled = isDeduplicationEnabled();
synchronized (this) {
if (sta... | 3.68 |
flink_OptimizerNode_initId | /**
* Sets the ID of this node.
*
* @param id The id for this node.
*/
public void initId(int id) {
if (id <= 0) {
throw new IllegalArgumentException();
}
if (this.id == -1) {
this.id = id;
} else {
throw new IllegalStateException("Id has already been initialized.");
}
} | 3.68 |
hbase_HBackupFileSystem_getBackupTmpDirPath | /**
* Get backup temporary directory
* @param backupRootDir backup root
* @return backup tmp directory path
*/
public static Path getBackupTmpDirPath(String backupRootDir) {
return new Path(backupRootDir, ".tmp");
} | 3.68 |
flink_MurmurHashUtils_hashBytesByWords | /**
* Hash bytes in MemorySegment, length must be aligned to 4 bytes.
*
* @param segment segment.
* @param offset offset for MemorySegment
* @param lengthInBytes length in MemorySegment
* @return hash code
*/
public static int hashBytesByWords(MemorySegment segment, int offset, int lengthInBytes) {
return ha... | 3.68 |
flink_SchedulerFactory_create | /**
* Create a {@link ScheduledThreadPoolExecutor} using the provided corePoolSize. The following
* behaviour is configured:
*
* <ul>
* <li>rejected executions are logged if the executor is {@link
* java.util.concurrent.ThreadPoolExecutor#isShutdown shutdown}
* <li>otherwise, {@link RejectedExecutionEx... | 3.68 |
framework_DateField_notifyFormOfValidityChange | /**
* Detects if this field is used in a Form (logically) and if so, notifies
* it (by repainting it) that the validity of this field might have changed.
*/
private void notifyFormOfValidityChange() {
Component parenOfDateField = getParent();
boolean formFound = false;
while (parenOfDateField != null || ... | 3.68 |
flink_JoinOperator_projectTuple19 | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17,... | 3.68 |
framework_SerializablePredicate_isEqual | /**
* Returns a predicate that tests if two arguments are equal according to
* {@link Objects#equals(Object, Object)}.
*
* @param <T>
* the type of arguments to the predicate
* @param targetRef
* the object reference with which to compare for equality, which
* may be {@code null... | 3.68 |
hadoop_NMClient_getNodeIdOfStartedContainer | /**
* Get the NodeId of the node on which container is running. It returns
* null if the container if container is not found or if it is not running.
*
* @param containerId Container Id of the container.
* @return NodeId of the container on which it is running.
*/
public NodeId getNodeIdOfStartedContainer(Contain... | 3.68 |
hbase_SnapshotManager_removeSentinelIfFinished | /**
* Return the handler if it is currently live and has the same snapshot target name. The handler
* is removed from the sentinels map if completed.
* @param sentinels live handlers
* @param snapshot snapshot description
* @return null if doesn't match, else a live handler.
*/
private synchronized SnapshotSenti... | 3.68 |
framework_MonthEventLabel_setEventIndex | /**
* Set the (server side) index of the event.
*
* @param index
* The integer index
*/
public void setEventIndex(int index) {
eventIndex = index;
} | 3.68 |
pulsar_DefaultMetadataResolver_fromIssuerUrl | /**
* Gets a well-known metadata URL for the given OAuth issuer URL.
* @param issuerUrl The authorization server's issuer identifier
* @return a resolver
*/
public static DefaultMetadataResolver fromIssuerUrl(URL issuerUrl) {
return new DefaultMetadataResolver(getWellKnownMetadataUrl(issuerUrl));
} | 3.68 |
hadoop_LoggedLocation_setUnknownAttribute | // for input parameter ignored.
@JsonAnySetter
public void setUnknownAttribute(String attributeName, Object ignored) {
if (!alreadySeenAnySetterAttributes.contains(attributeName)) {
alreadySeenAnySetterAttributes.add(attributeName);
System.err.println("In LoggedJob, we saw the unknown attribute "
+ at... | 3.68 |
hudi_HoodieTableConfig_getTableName | /**
* Read the table name.
*/
public String getTableName() {
return getString(NAME);
} | 3.68 |
hadoop_RouterDelegationTokenSecretManager_removeStoredToken | /**
* The Router Supports Remove Token.
*
* @param identifier Delegation Token
* @throws IOException IO exception occurred.
*/
@Override
public void removeStoredToken(RMDelegationTokenIdentifier identifier) throws IOException {
try {
federationFacade.removeStoredToken(identifier);
} catch (Exception e) {
... | 3.68 |
flink_Schema_fromSchema | /** Adopts all members from the given unresolved schema. */
public Builder fromSchema(Schema unresolvedSchema) {
columns.addAll(unresolvedSchema.columns);
watermarkSpecs.addAll(unresolvedSchema.watermarkSpecs);
if (unresolvedSchema.primaryKey != null) {
primaryKeyNamed(
unresolvedSch... | 3.68 |
hbase_HFileBlockIndex_shouldWriteBlock | /**
* Whether there is an inline block ready to be written. In general, we write an leaf-level
* index block as an inline block as soon as its size as serialized in the non-root format
* reaches a certain threshold.
*/
@Override
public boolean shouldWriteBlock(boolean closing) {
if (singleLevelOnly) {
throw n... | 3.68 |
hbase_CompositeImmutableSegment_tailSet | /**
* Returns a subset of the segment cell set, which starts with the given cell
* @param firstCell a cell in the segment
* @return a subset of the segment cell set, which starts with the given cell
*/
@Override
protected SortedSet<Cell> tailSet(Cell firstCell) {
throw new IllegalStateException("Not supported by ... | 3.68 |
hbase_ClientMetaTableAccessor_getTableStartRowForMeta | /** Returns start row for scanning META according to query type */
public static byte[] getTableStartRowForMeta(TableName tableName, QueryType type) {
if (tableName == null) {
return null;
}
switch (type) {
case REGION:
case REPLICATION: {
byte[] startRow = new byte[tableName.getName().length + ... | 3.68 |
hbase_ReplicationSink_getSinkMetrics | /**
* Get replication Sink Metrics
*/
public MetricsSink getSinkMetrics() {
return this.metrics;
} | 3.68 |
hbase_MultiByteBuff_mark | /**
* Marks the current position of the MBB
* @return this object
*/
@Override
public MultiByteBuff mark() {
checkRefCount();
this.markedItemIndex = this.curItemIndex;
this.curItem.mark();
return this;
} | 3.68 |
hadoop_Server_getStatus | /**
* Returns the current server status.
*
* @return the current server status.
*/
public Status getStatus() {
return status;
} | 3.68 |
AreaShop_RegionGroup_getWorlds | /**
* Get all worlds from which regions are added automatically.
* @return A list with the names of all worlds (immutable)
*/
public Set<String> getWorlds() {
return new HashSet<>(worlds);
} | 3.68 |
framework_TabSheet_updateSelection | /**
* Checks if the current selection is valid, and updates the selection if
* the previously selected component is not visible and enabled. The first
* visible and enabled tab is selected if the current selection is empty or
* invalid.
*
* This method does not fire tab change events, but the caller should do so
... | 3.68 |
dubbo_NettyChannel_buildErrorResponse | /**
* build a bad request's response
*
* @param request the request
* @param t the throwable. In most cases, serialization fails.
* @return the response
*/
private static Response buildErrorResponse(Request request, Throwable t) {
Response response = new Response(request.getId(), request.getVersion());
... | 3.68 |
pulsar_BrokerLoadData_updateSystemResourceUsage | // Update resource usage given each individual usage.
private void updateSystemResourceUsage(final ResourceUsage cpu, final ResourceUsage memory,
final ResourceUsage directMemory, final ResourceUsage bandwidthIn,
final ResourceUsage bandwidth... | 3.68 |
framework_PushConfiguration_setTransport | /*
* (non-Javadoc)
*
* @see
* com.vaadin.ui.PushConfiguration#setTransport(com.vaadin.shared.ui.ui.
* Transport)
*/
@Override
public void setTransport(Transport transport) {
if (transport == Transport.WEBSOCKET_XHR) {
getState().alwaysUseXhrForServerRequests = true;
// Atmosphere knows only ab... | 3.68 |
zilla_WsServerFactory_assembleHeader | // @return no bytes consumed to assemble websocket header
private int assembleHeader(
DirectBuffer buffer,
int offset,
int length)
{
int remaining = Math.min(length, MAXIMUM_HEADER_SIZE - headerLength);
// may copy more than actual header length (up to max header length), but will adjust at the end
... | 3.68 |
hbase_MasterObserver_preTruncateRegionAction | /**
* Called before the region is truncated.
* @param c The environment to interact with the framework and master
* @param regionInfo The Region being truncated
*/
@SuppressWarnings("unused")
default void preTruncateRegionAction(final ObserverContext<MasterCoprocessorEnvironment> c,
final RegionInfo regi... | 3.68 |
morf_Oracle_getXADataSource | /**
* Returns an Oracle XA data source. Note that this method may fail at
* run-time if {@code OracleXADataSource} is not available on the classpath.
*
* @throws IllegalStateException If the data source cannot be created.
*
* @see org.alfasoftware.morf.jdbc.DatabaseType#getXADataSource(java.lang.String,
* j... | 3.68 |
hbase_HMaster_finishActiveMasterInitialization | /**
* Finish initialization of HMaster after becoming the primary master.
* <p/>
* The startup order is a bit complicated but very important, do not change it unless you know
* what you are doing.
* <ol>
* <li>Initialize file system based components - file system manager, wal manager, table
* descriptors, etc</l... | 3.68 |
pulsar_ClientCnxIdleState_isReleasing | /**
* @return Whether this connection is in idle and will be released soon.
*/
public boolean isReleasing() {
return getIdleStat() == State.RELEASING;
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.