name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
framework_VAbstractCalendarPanel_updateAssistiveLabels | /**
* Updates assistive labels of the navigation elements.
*
* @since 8.4
*/
public void updateAssistiveLabels() {
if (prevMonth != null) {
Roles.getButtonRole().setAriaLabelProperty(prevMonth.getElement(),
prevMonthAssistiveLabel);
}
if (nextMonth != null) {
Roles.getBu... | 3.68 |
hbase_CompoundConfiguration_addBytesMap | /**
* Add Bytes map to config list. This map is generally created by HTableDescriptor or
* HColumnDescriptor, but can be abstractly used. The added configuration overrides the previous
* ones if there are name collisions. Bytes map
* @return this, for builder pattern
*/
public CompoundConfiguration addBytesMap(fin... | 3.68 |
hadoop_OBSDataBlocks_dataSize | /**
* Get the amount of data; if there is no buffer then the size is 0.
*
* @return the amount of data available to upload.
*/
@Override
int dataSize() {
return dataSize != null ? dataSize : bufferCapacityUsed();
} | 3.68 |
hadoop_PlacementConstraint_name | /**
* An optional name associated to this constraint.
**/
public PlacementConstraint name(String name) {
this.name = name;
return this;
} | 3.68 |
pulsar_ConcurrentOpenHashSet_forEach | /**
* Iterate over all the elements in the set and apply the provided function.
* <p>
* <b>Warning: Do Not Guarantee Thread-Safety.</b>
* @param processor the function to apply to each element
*/
public void forEach(Consumer<? super V> processor) {
for (int i = 0; i < sections.length; i++) {
sections[i... | 3.68 |
flink_MemorySegment_equalTo | /**
* Equals two memory segment regions.
*
* @param seg2 Segment to equal this segment with
* @param offset1 Offset of this segment to start equaling
* @param offset2 Offset of seg2 to start equaling
* @param length Length of the equaled memory region
* @return true if equal, false otherwise
*/
public boolean e... | 3.68 |
hbase_DataBlockEncoding_writeIdInBytes | /**
* Writes id bytes to the given array starting from offset.
* @param dest output array
* @param offset starting offset of the output array
*/
// System.arraycopy is static native. Nothing we can do this until we have minimum JDK 9.
@SuppressWarnings("UnsafeFinalization")
public void writeIdInBytes(byte[] dest,... | 3.68 |
framework_WebBrowser_getTimeZoneId | /**
* Returns the TimeZone Id (like "Europe/Helsinki") provided by the browser
* (if the browser supports this feature).
*
* @return the TimeZone Id if provided by the browser, null otherwise.
* @see <a href=
* "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/r... | 3.68 |
flink_FactoryUtil_validateExcept | /**
* Validates the options of the factory. It checks for unconsumed option keys while ignoring
* the options with given prefixes.
*
* <p>The option keys that have given prefix {@code prefixToSkip} would just be skipped for
* validation.
*
* @param prefixesToSkip Set of option key prefixes to skip validation
*/... | 3.68 |
hbase_CompactionConfiguration_getMajorCompactionJitter | /**
* @return Major the jitter fraction, the fraction within which the major compaction period is
* randomly chosen from the majorCompactionPeriod in each store.
*/
public float getMajorCompactionJitter() {
return majorCompactionJitter;
} | 3.68 |
hadoop_SendRequestIntercept_bind | /**
* Binds a new lister to the operation context so the WASB file system can
* appropriately intercept sends and allow concurrent OOB I/Os. This
* by-passes the blob immutability check when reading streams.
*
* @param opContext the operation context assocated with this request.
*/
public static void bind(Operat... | 3.68 |
dubbo_NacosDynamicConfiguration_createTargetListener | /**
* Ignores the group parameter.
*
* @param key property key the native listener will listen on
* @param group to distinguish different set of properties
* @return
*/
private NacosConfigListener createTargetListener(String key, String group) {
NacosConfigListener configListener = new NacosConfigListener()... | 3.68 |
hbase_MemStoreSnapshot_getCellsCount | /** Returns Number of Cells in this snapshot. */
public int getCellsCount() {
return cellsCount;
} | 3.68 |
flink_FlinkCompletableFutureAssert_eventuallyFailsWith | /**
* An equivalent of {@link #failsWithin(Duration)}, that doesn't rely on timeouts.
*
* @param exceptionClass type of the exception we expect the future to complete with
* @return a new assertion instance on the future's exception.
* @param <E> type of the exception we expect the future to complete with
*/
publ... | 3.68 |
hbase_TableName_getNameWithNamespaceInclAsString | /**
* Ideally, getNameAsString should contain namespace within it, but if the namespace is default,
* it just returns the name. This method takes care of this corner case.
*/
public String getNameWithNamespaceInclAsString() {
if (getNamespaceAsString().equals(NamespaceDescriptor.DEFAULT_NAMESPACE_NAME_STR)) {
... | 3.68 |
hbase_RingBufferTruck_load | /**
* Load the truck with a {@link SyncFuture}.
*/
void load(final SyncFuture syncFuture) {
this.sync = syncFuture;
this.type = Type.SYNC;
} | 3.68 |
flink_SplitEnumerator_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 |
hibernate-validator_ConstraintDescriptorImpl_validateComposingConstraintTypes | /**
* Asserts that this constraint and all its composing constraints share the
* same constraint type (generic or cross-parameter).
*/
private void validateComposingConstraintTypes() {
for ( ConstraintDescriptorImpl<?> composingConstraint : getComposingConstraintImpls() ) {
if ( composingConstraint.constraintType... | 3.68 |
framework_AbstractConnector_doInit | /**
* Called once by the framework to initialize the connector.
* <p>
* Note that the shared state is not yet available when this method is
* called.
* <p>
* Connector classes should override {@link #init()} instead of this method.
*/
@Override
public final void doInit(String connectorId,
ApplicationConn... | 3.68 |
hmily_InsertStatementAssembler_assembleHmilyInsertStatement | /**
* Assemble Hmily insert statement.
*
* @param insertStatement insert statement
* @param hmilyInsertStatement hmily insert statement
* @return hmily insert statement
*/
public static HmilyInsertStatement assembleHmilyInsertStatement(final InsertStatement insertStatement, final HmilyInsertStatement hmilyInsertS... | 3.68 |
flink_Plan_setDefaultParallelism | /**
* Sets the default parallelism for this plan. That degree is always used when an operator is
* not explicitly given a parallelism.
*
* @param defaultParallelism The default parallelism for the plan.
*/
public void setDefaultParallelism(int defaultParallelism) {
checkArgument(
defaultParallelism... | 3.68 |
hudi_BaseHoodieWriteClient_releaseResources | /**
* Called after each write, to release any resources used.
*/
protected void releaseResources(String instantTime) {
// do nothing here
} | 3.68 |
hbase_OrderedBytes_encodeBlobCopy | /**
* Encode a Blob value as a byte-for-byte copy. BlobCopy encoding in DESCENDING order is NULL
* terminated so as to preserve proper sorting of {@code []} and so it does not support
* {@code 0x00} in the value.
* @return the number of bytes written.
* @throws IllegalArgumentException when {@code ord} is DESCENDI... | 3.68 |
flink_TernaryBoolean_resolveUndefined | /**
* Gets the boolean value corresponding to this value. If this is the 'UNDEFINED' value, the
* method returns the given valueForUndefined.
*
* @param valueForUndefined The value to be returned in case this ternary value is 'undefined'.
*/
public TernaryBoolean resolveUndefined(boolean valueForUndefined) {
r... | 3.68 |
flink_PojoSerializerSnapshot_newPojoSerializerIsCompatibleAfterMigration | /** Checks if the new {@link PojoSerializer} is compatible after migration. */
private static <T> boolean newPojoSerializerIsCompatibleAfterMigration(
PojoSerializer<T> newPojoSerializer,
IntermediateCompatibilityResult<T> fieldSerializerCompatibility,
IntermediateCompatibilityResult<T> preExist... | 3.68 |
flink_FileInputSplit_getPath | /**
* Returns the path of the file containing this split's data.
*
* @return the path of the file containing this split's data.
*/
public Path getPath() {
return file;
} | 3.68 |
hadoop_StringInterner_weakIntern | /**
* Interns and returns a reference to the representative instance
* for any of a collection of string instances that are equal to each other.
* Retains weak reference to the instance,
* and so does not prevent it from being garbage-collected.
*
* @param sample string instance to be interned
* @return weak ... | 3.68 |
flink_ThriftObjectConversions_toTRowSet | /**
* Similar to {@link SerDeUtils#toThriftPayload(Object, ObjectInspector, int)} that converts the
* returned Rows to JSON string. The only difference is the current implementation also keep the
* type for primitive type.
*/
public static TRowSet toTRowSet(
TProtocolVersion version, ResolvedSchema schema, ... | 3.68 |
flink_OrInputTypeStrategy_commonMin | /** Returns the common minimum argument count or null if undefined. */
private static @Nullable Integer commonMin(List<ArgumentCount> counts) {
// min=5, min=3, min=0 -> min=0
// min=5, min=3, min=0, min=null -> min=null
int commonMin = Integer.MAX_VALUE;
for (ArgumentCount count : counts) {
... | 3.68 |
hadoop_OBSInputStream_incrementBytesRead | /**
* Increment the bytes read counter if there is a stats instance and the
* number of bytes read is more than zero.
*
* @param bytesRead number of bytes read
*/
private void incrementBytesRead(final long bytesRead) {
if (statistics != null && bytesRead > 0) {
statistics.incrementBytesRead(bytesRead);
}
} | 3.68 |
flink_CombinedWatermarkStatus_getWatermark | /**
* Returns the current watermark timestamp. This will throw {@link IllegalStateException} if
* the output is currently idle.
*/
private long getWatermark() {
checkState(!idle, "Output is idle.");
return watermark;
} | 3.68 |
hibernate-validator_MessagerAdapter_getDelegate | /**
* Returns the messager used by this adapter.
*
* @return The underlying messager.
*/
public Messager getDelegate() {
return messager;
} | 3.68 |
flink_RocksDBFullRestoreOperation_restore | /** Restores all key-groups data that is referenced by the passed state handles. */
@Override
public RocksDBRestoreResult restore()
throws IOException, StateMigrationException, RocksDBException {
rocksHandle.openDB();
try (ThrowingIterator<SavepointRestoreResult> restore =
savepointRestoreOp... | 3.68 |
hadoop_AppPlacementAllocator_getPreferredNodeIterator | /**
* Get iterator of preferred node depends on requirement and/or availability.
* @param candidateNodeSet input CandidateNodeSet
* @return iterator of preferred node
*/
public Iterator<N> getPreferredNodeIterator(
CandidateNodeSet<N> candidateNodeSet) {
// Now only handle the case that single node in the can... | 3.68 |
framework_BasicEventProvider_addEvent | /*
* (non-Javadoc)
*
* @see
* com.vaadin.addon.calendar.event.CalendarEditableEventProvider#addEvent
* (com.vaadin.addon.calendar.event.CalendarEvent)
*/
@Override
public void addEvent(CalendarEvent event) {
eventList.add(event);
if (event instanceof BasicEvent) {
((BasicEvent) event).addEventChan... | 3.68 |
hudi_HoodieIndex_requiresTagging | /**
* To indicate if an operation type requires location tagging before writing
*/
@PublicAPIMethod(maturity = ApiMaturityLevel.EVOLVING)
public boolean requiresTagging(WriteOperationType operationType) {
switch (operationType) {
case DELETE:
case DELETE_PREPPED:
case UPSERT:
return true;
defa... | 3.68 |
pulsar_LoadSimulationController_run | /**
* Create a shell for the user to send commands to clients.
*/
public void run() throws Exception {
BufferedReader inReader = new BufferedReader(new InputStreamReader(System.in));
while (true) {
// Print the very simple prompt.
System.out.println();
System.out.print("> ");
r... | 3.68 |
flink_FutureUtils_completeAll | /**
* Creates a {@link ConjunctFuture} which is only completed after all given futures have
* completed. Unlike {@link FutureUtils#waitForAll(Collection)}, the resulting future won't be
* completed directly if one of the given futures is completed exceptionally. Instead, all
* occurring exception will be collected ... | 3.68 |
flink_KvStateLocationRegistry_getKvStateLocation | /**
* Returns the {@link KvStateLocation} for the registered KvState instance or <code>null</code>
* if no location information is available.
*
* @param registrationName Name under which the KvState instance is registered.
* @return Location information or <code>null</code>.
*/
public KvStateLocation getKvStateLo... | 3.68 |
hadoop_ProbeStatus_getOriginator | /**
* Get the probe that generated this result. May be null
* @return a possibly null reference to a probe
*/
public Probe getOriginator() {
return originator;
} | 3.68 |
flink_AllocatedSlot_releasePayload | /**
* Triggers the release of the assigned payload. If the payload could be released, then it is
* removed from the slot.
*
* @param cause of the release operation
*/
public void releasePayload(Throwable cause) {
final Payload payload = payloadReference.get();
if (payload != null) {
payload.releas... | 3.68 |
pulsar_ManagedLedgerImpl_invalidateEntriesUpToSlowestReaderPosition | // slowest reader position is earliest mark delete position when cacheEvictionByMarkDeletedPosition=true
// it is the earliest read position when cacheEvictionByMarkDeletedPosition=false
private void invalidateEntriesUpToSlowestReaderPosition() {
if (entryCache.getSize() <= 0) {
return;
}
if (!activ... | 3.68 |
flink_PartitionedFileReader_readCurrentRegion | /**
* Reads a buffer from the current region of the target {@link PartitionedFile} and moves the
* read position forward.
*
* <p>Note: The caller is responsible for recycling the target buffer if any exception occurs.
*
* @param freeSegments The free {@link MemorySegment}s to read data to.
* @param recycler The ... | 3.68 |
dubbo_CollectionUtils_isNotEmptyMap | /**
* Return {@code true} if the supplied Map is {@code not null} or not empty.
* Otherwise, return {@code false}.
*
* @param map the Map to check
* @return whether the given Map is not empty
*/
public static boolean isNotEmptyMap(Map map) {
return !isEmptyMap(map);
} | 3.68 |
hbase_DisableTableProcedure_postDisable | /**
* Action after disabling table.
* @param env MasterProcedureEnv
* @param state the procedure state
*/
protected void postDisable(final MasterProcedureEnv env, final DisableTableState state)
throws IOException, InterruptedException {
runCoprocessorAction(env, state);
} | 3.68 |
morf_SchemaUtils_primaryKeysForTable | /**
* List the primary key columns for a given table.
*
* @param table The table
* @return The primary key columns
*/
public static List<Column> primaryKeysForTable(Table table) {
return table.columns().stream().filter(Column::isPrimaryKey).collect(Collectors.toList());
} | 3.68 |
flink_BaseTwoInputStreamOperatorWithStateRetention_registerProcessingCleanupTimer | /**
* If the user has specified a {@code minRetentionTime} and {@code maxRetentionTime}, this
* method registers a cleanup timer for {@code currentProcessingTime + minRetentionTime}.
*
* <p>When this timer fires, the {@link #cleanupState(long)} method is called.
*/
protected void registerProcessingCleanupTimer() t... | 3.68 |
hudi_WriteProfile_getSmallFiles | /**
* Returns a list of small files in the given partition path.
*
* <p>Note: This method should be thread safe.
*/
public synchronized List<SmallFile> getSmallFiles(String partitionPath) {
// lookup the cache first
if (smallFilesMap.containsKey(partitionPath)) {
return smallFilesMap.get(partitionPath);
}... | 3.68 |
hbase_RegionServerTracker_processAsActiveMaster | // execute the operations which are only needed for active masters, such as expire old servers,
// add new servers, etc.
private void processAsActiveMaster(Set<ServerName> newServers) {
Set<ServerName> oldServers = regionServers;
ServerManager serverManager = server.getServerManager();
// expire dead servers
fo... | 3.68 |
dubbo_AccessLogData_newLogData | /**
* Get new instance of log data.
*
* @return instance of AccessLogData
*/
public static AccessLogData newLogData() {
return new AccessLogData();
} | 3.68 |
morf_DatabaseMetaDataProvider_readTableName | /**
* Retrieves table name from a result set.
*
* @param tableResultSet Result set to be read.
* @return Name of the table.
* @throws SQLException Upon errors.
*/
protected RealName readTableName(ResultSet tableResultSet) throws SQLException {
String tableName = tableResultSet.getString(TABLE_NAME);
return cr... | 3.68 |
flink_OperatingSystemRestriction_forbid | /**
* Forbids the execution on the given set of operating systems.
*
* @param reason reason for the restriction
* @param forbiddenSystems forbidden operating systems
* @throws AssumptionViolatedException if this method is called on a forbidden operating system
*/
public static void forbid(final String reason, fin... | 3.68 |
framework_TreeTable_removeListener | /**
* @deprecated As of 7.0, replaced by
* {@link #removeCollapseListener(CollapseListener)}
*/
@Deprecated
public void removeListener(CollapseListener listener) {
removeCollapseListener(listener);
} | 3.68 |
framework_ActionsOnInvisibleComponents_getTicketNumber | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
protected Integer getTicketNumber() {
return 12743;
} | 3.68 |
hadoop_RBFMetrics_setStateStoreVersions | /**
* Populate the map with the State Store versions.
*
* @param map Map with the information.
* @param version State Store versions.
*/
private static void setStateStoreVersions(
Map<String, Object> map, StateStoreVersion version) {
long membershipVersion = version.getMembershipVersion();
String lastMemb... | 3.68 |
hudi_HoodieCombineHiveInputFormat_toString | /**
* Prints this object as a string.
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(inputSplitShim.toString());
sb.append("InputFormatClass: " + inputFormatClassName);
sb.append("\n");
return sb.toString();
} | 3.68 |
framework_LayoutManager_reportHeightAssignedToRelative | /**
* Registers the height reserved for a relatively sized component. This can
* be used as an optimization by ManagedLayouts; by informing the
* LayoutManager about what size a component will have, the layout
* propagation can continue directly without first measuring the potentially
* resized elements.
*
* @pa... | 3.68 |
hbase_NettyFutureUtils_safeWrite | /**
* Call write on the channel and eat the returned future by logging the error when the future is
* completed with error.
*/
public static void safeWrite(ChannelOutboundInvoker channel, Object msg) {
consume(channel.write(msg));
} | 3.68 |
hbase_HRegion_checkRow | /** Make sure this is a valid row for the HRegion */
void checkRow(byte[] row, String op) throws IOException {
if (!rowIsInRange(getRegionInfo(), row)) {
throw new WrongRegionException("Requested row out of range for " + op + " on HRegion " + this
+ ", startKey='" + Bytes.toStringBinary(getRegionInfo().getS... | 3.68 |
morf_XmlDataSetProducer_getAutoNumberStart | /**
* @see org.alfasoftware.morf.metadata.Column#getAutoNumberStart()
*/
@Override
public int getAutoNumberStart() {
return autonumberStart == null ? 0 : autonumberStart;
} | 3.68 |
morf_AbstractSqlDialectTest_testSelectWhereIsNull | /**
* Tests a select with a null check clause.
*/
@Test
public void testSelectWhereIsNull() {
SelectStatement stmt = new SelectStatement()
.from(new TableReference(TEST_TABLE))
.where(isNull(new FieldReference(INT_FIELD)));
String expectedSql = "SELECT * FROM " + tableName(TEST_TABLE) + " WHERE (intField IS ... | 3.68 |
flink_BufferDecompressor_decompressToOriginalBuffer | /**
* The difference between this method and {@link #decompressToIntermediateBuffer(Buffer)} is
* that this method copies the decompressed data to the input {@link Buffer} starting from
* offset 0.
*
* <p>The caller must guarantee that the input {@link Buffer} is writable and there's enough
* space left.
*/
@Vis... | 3.68 |
hbase_HBackupFileSystem_getBackupTmpDirPathForBackupId | /**
* Get backup tmp directory for backupId
* @param backupRoot backup root
* @param backupId backup id
* @return backup tmp directory path
*/
public static Path getBackupTmpDirPathForBackupId(String backupRoot, String backupId) {
return new Path(getBackupTmpDirPath(backupRoot), backupId);
} | 3.68 |
hadoop_HdfsFileStatus_storagePolicy | /**
* Set the storage policy for this entity
* (default = {@link HdfsConstants#BLOCK_STORAGE_POLICY_ID_UNSPECIFIED}).
* @param storagePolicy Storage policy
* @return This Builder instance
*/
public Builder storagePolicy(byte storagePolicy) {
this.storagePolicy = storagePolicy;
return this;
} | 3.68 |
zxing_DetectionResultRowIndicatorColumn_adjustIncompleteIndicatorColumnRowNumbers | // TODO maybe we should add missing codewords to store the correct row number to make
// finding row numbers for other columns easier
// use row height count to make detection of invalid row numbers more reliable
private void adjustIncompleteIndicatorColumnRowNumbers(BarcodeMetadata barcodeMetadata) {
BoundingBox bou... | 3.68 |
hbase_HDFSBlocksDistribution_getWeight | /**
* return the weight for a specific host, that will be the total bytes of all blocks on the host
* @param host the host name
* @return the weight of the given host
*/
public long getWeight(String host) {
long weight = 0;
if (host != null) {
HostAndWeight hostAndWeight = this.hostAndWeights.get(host);
... | 3.68 |
framework_HasItems_setItems | /**
* Sets the data items of this listing provided as a stream.
* <p>
* This is just a shorthand for {@link #setItems(Collection)}, that
* <b>collects objects in the stream to a list</b>. Thus, using this method,
* instead of its array and Collection variations, doesn't save any memory.
* If you have a large data... | 3.68 |
morf_AutoNumberRemovalHelper_removeAutonumber | /**
* Removes the row, referring to a {@linkplain Table}, from the AutoNumber table.
*
* @param dataEditor Executor of statements
* @param table The table for which autonumbering will be rmeoved
*/
public static void removeAutonumber(DataEditor dataEditor, Table table) {
dataEditor.executeStatement(delete(tableR... | 3.68 |
flink_RpcEndpoint_validateScheduledExecutorClosed | /**
* Validate whether the scheduled executor is closed.
*
* @return true if the scheduled executor is shutdown, otherwise false
*/
final boolean validateScheduledExecutorClosed() {
return mainScheduledExecutor.isShutdown();
} | 3.68 |
morf_ConnectionResourcesBean_setStatementPoolingMaxStatements | /**
* @see org.alfasoftware.morf.jdbc.AbstractConnectionResources#setStatementPoolingMaxStatements(int)
*/
@Override
public void setStatementPoolingMaxStatements(int statementPoolingMaxStatements) {
this.statementPoolingMaxStatements = statementPoolingMaxStatements;
} | 3.68 |
framework_TouchScrollDelegate_removeElement | /**
* Unregisters the given element as scrollable. Should be called when a
* previously-registered element is removed from the DOM to prevent
* memory leaks.
*/
public void removeElement(Element scrollable) {
scrollable.removeClassName(SCROLLABLE_CLASSNAME);
if (requiresDelegate()) {
delegate.scroll... | 3.68 |
querydsl_AbstractMongodbQuery_fetch | /**
* Fetch with the specific fields
*
* @param paths fields to return
* @return results
*/
public List<K> fetch(Path<?>... paths) {
queryMixin.setProjection(paths);
return fetch();
} | 3.68 |
flink_ExceptionUtils_stringifyException | /**
* Makes a string representation of the exception's stack trace, or "(null)", if the exception
* is null.
*
* <p>This method makes a best effort and never fails.
*
* @param e The exception to stringify.
* @return A string with exception name and call stack.
*/
public static String stringifyException(final Th... | 3.68 |
AreaShop_GeneralRegion_getVolume | /**
* Get the volume of the region (number of blocks inside it).
* @return Number of blocks in the region
*/
public long getVolume() {
// Cache volume, important for polygon regions
if(volume < 0) {
volume = calculateVolume();
}
return volume;
} | 3.68 |
framework_DeclarativeTestUI_getComponent | /**
* Get access to the declaratively created component. This method typecasts
* the component to the receiving type; if there's a mismatch between what
* you expect and what's written in the design, this will fail with a
* ClassCastException.
*
* @return a Vaadin component
*/
@SuppressWarnings("unchecked")
publ... | 3.68 |
hbase_ParseFilter_convertByteArrayToInt | /**
* Converts an int expressed in a byte array to an actual int
* <p>
* This doesn't use Bytes.toInt because that assumes that there will be {@link Bytes#SIZEOF_INT}
* bytes available.
* <p>
* @param numberAsByteArray the int value expressed as a byte array
* @return the int value
*/
public static int convertB... | 3.68 |
framework_DragSourceExtensionConnector_getDraggableElement | /**
* Finds the draggable element within the widget. By default, returns the
* topmost element.
* <p>
* Override this method to make some other than the root element draggable
* instead.
* <p>
* In case you need to make more than whan element draggable, override
* {@link #extend(ServerConnector)} instead.
*
*... | 3.68 |
framework_Color_setRed | /**
* Sets the red value of the color. Value must be within the range [0, 255].
*
* @param red
* new red value
*/
public void setRed(int red) {
if (withinRange(red)) {
this.red = red;
} else {
throw new IllegalArgumentException(OUTOFRANGE + red);
}
} | 3.68 |
flink_StreamProjection_projectTuple5 | /**
* Projects a {@link Tuple} {@link DataStream} to the previously selected fields.
*
* @return The projected DataStream.
* @see Tuple
* @see DataStream
*/
public <T0, T1, T2, T3, T4>
SingleOutputStreamOperator<Tuple5<T0, T1, T2, T3, T4>> projectTuple5() {
TypeInformation<?>[] fTypes = extractFieldTy... | 3.68 |
flink_EnvironmentInformation_getHadoopUser | /**
* Gets the name of the user that is running the JVM.
*
* @return The name of the user that is running the JVM.
*/
public static String getHadoopUser() {
try {
Class<?> ugiClass =
Class.forName(
"org.apache.hadoop.security.UserGroupInformation",
... | 3.68 |
hadoop_AbstractSchedulerPlanFollower_getReservationQueueName | // Schedulers have different ways of naming queues. See YARN-2773
protected String getReservationQueueName(String planQueueName,
String reservationId) {
return reservationId;
} | 3.68 |
hadoop_JsonObjectMapperParser_getNext | /**
* Get the next object from the trace.
*
* @return The next instance of the object. Or null if we reach the end of
* stream.
* @throws IOException
*/
public T getNext() throws IOException {
try {
return mapper.readValue(jsonParser, clazz);
} catch (JsonMappingException e) {
return null;
... | 3.68 |
zxing_ModulusPoly_isZero | /**
* @return true iff this polynomial is the monomial "0"
*/
boolean isZero() {
return coefficients[0] == 0;
} | 3.68 |
flink_StatsSummarySnapshot_getMinimum | /**
* Returns the minimum seen value.
*
* @return The current minimum value.
*/
public long getMinimum() {
return min;
} | 3.68 |
rocketmq-connect_ColumnDefinition_mutability | /**
* Indicates whether the designated column is mutable.
*
* @return the mutability; never null
*/
public Mutability mutability() {
return mutability;
} | 3.68 |
flink_RichSqlInsertKeyword_symbol | /**
* Creates a parse-tree node representing an occurrence of this keyword at a particular position
* in the parsed text.
*/
public SqlLiteral symbol(SqlParserPos pos) {
return SqlLiteral.createSymbol(this, pos);
} | 3.68 |
hudi_HiveSchemaUtils_createHiveColumns | /**
* Create Hive columns from Flink table schema.
*/
private static List<FieldSchema> createHiveColumns(TableSchema schema) {
final DataType dataType = schema.toPersistedRowDataType();
final RowType rowType = (RowType) dataType.getLogicalType();
final String[] fieldNames = rowType.getFieldNames().toArray(new S... | 3.68 |
hbase_PermissionStorage_getUserPermissions | /**
* Returns the currently granted permissions for a given table/namespace with associated
* permissions based on the specified column family, column qualifier and user name.
* @param conf the configuration
* @param entryName Table name or the namespace
* @param cf Column family
* @param ... | 3.68 |
framework_VaadinFinderLocatorStrategy_getBestSelector | /**
* Search different queries for the best one. Use the fact that the lowest
* possible index is with the last selector. Last selector is the full
* search path containing the complete Component hierarchy.
*
* @param selectors
* List of selectors
* @param target
* Target element
* @param... | 3.68 |
hbase_HRegion_execService | /**
* Executes a single protocol buffer coprocessor endpoint {@link Service} method using the
* registered protocol handlers. {@link Service} implementations must be registered via the
* {@link #registerService(Service)} method before they are available.
* @param controller an {@code RpcContoller} implementation to... | 3.68 |
hudi_ConsistentBucketIdentifier_initialize | /**
* Initialize necessary data structure to facilitate bucket identifying.
* Specifically, we construct:
* - An in-memory tree (ring) to speed up range mapping searching.
* - A hash table (fileIdToBucket) to allow lookup of bucket using fileId.
* <p>
* Children nodes are also considered, and will override the or... | 3.68 |
flink_IOManager_createChannel | /**
* Creates a new {@link ID} in one of the temp directories. Multiple invocations of this method
* spread the channels evenly across the different directories.
*
* @return A channel to a temporary directory.
*/
public ID createChannel() {
return fileChannelManager.createChannel();
} | 3.68 |
flink_DataSet_fillInType | /**
* Tries to fill in the type information. Type information can be filled in later when the
* program uses a type hint. This method checks whether the type information has ever been
* accessed before and does not allow modifications if the type was accessed already. This
* ensures consistency by making sure diffe... | 3.68 |
hadoop_FSDataOutputStreamBuilder_checksumOpt | /**
* Set checksum opt.
*
* @param chksumOpt check sum opt.
* @return Generics Type B.
*/
public B checksumOpt(@Nonnull final ChecksumOpt chksumOpt) {
checkNotNull(chksumOpt);
checksumOpt = chksumOpt;
return getThisBuilder();
} | 3.68 |
flink_CliFrontend_handleError | /**
* Displays an exception message.
*
* @param t The exception to display.
* @return The return code for the process.
*/
private static int handleError(Throwable t) {
LOG.error("Error while running the command.", t);
System.err.println();
System.err.println("------------------------------------------... | 3.68 |
hbase_ScannerContext_checkBatchLimit | /**
* @param checkerScope The scope that the limit is being checked from
* @return true when the limit is enforceable from the checker's scope and it has been reached
*/
boolean checkBatchLimit(LimitScope checkerScope) {
return !skippingRow && hasBatchLimit(checkerScope) && progress.getBatch() >= limits.getBatch()... | 3.68 |
flink_SortUtil_putTimestampNormalizedKey | /** Support the compact precision TimestampData. */
public static void putTimestampNormalizedKey(
TimestampData value, MemorySegment target, int offset, int numBytes) {
assert value.getNanoOfMillisecond() == 0;
putLongNormalizedKey(value.getMillisecond(), target, offset, numBytes);
} | 3.68 |
streampipes_SpServiceDefinitionBuilder_registerMigrators | /**
* Include migrations in the service definition.
* <br>
* Please refrain from providing {@link IModelMigrator}s with overlapping version definitions for one application id.
* @param migrations List of migrations to be registered
* @return {@link SpServiceDefinitionBuilder}
*/
public SpServiceDefinitionBuilder ... | 3.68 |
hadoop_ResourceSkyline_setJobId | /**
* Set jobId.
*
* @param jobIdConfig jobId.
*/
public final void setJobId(final String jobIdConfig) {
this.jobId = jobIdConfig;
} | 3.68 |
hudi_ErrorTableUtils_validate | /**
* validates for constraints on ErrorRecordColumn when ErrorTable enabled configs are set.
* @param dataset
*/
public static void validate(Dataset<Row> dataset) {
if (!isErrorTableCorruptRecordColumnPresent(dataset)) {
throw new HoodieValidationException(String.format("Invalid condition, columnName=%s "
... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.