name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_Costs_getCpuCost | /**
* Gets the cost for the CPU.
*
* @return The CPU Cost.
*/
public double getCpuCost() {
return this.cpuCost;
} | 3.68 |
flink_ArrayResultIterator_set | /**
* Sets the records to be returned by this iterator. Each record's {@link RecordAndPosition}
* will have the same offset (for {@link RecordAndPosition#getOffset()}. The first returned
* record will have a records-to-skip count of {@code skipCountOfFirst + 1}, following the
* contract that each record needs to po... | 3.68 |
shardingsphere-elasticjob_JobScheduleController_isPaused | /**
* Judge job is pause or not.
*
* @return job is pause or not
*/
public synchronized boolean isPaused() {
try {
return !scheduler.isShutdown() && Trigger.TriggerState.PAUSED == scheduler.getTriggerState(new TriggerKey(triggerIdentity));
} catch (final SchedulerException ex) {
throw new J... | 3.68 |
Activiti_BaseEntityEventListener_onInitialized | /**
* Called when an entity initialized event is received.
*/
protected void onInitialized(ActivitiEvent event) {
// Default implementation is a NO-OP
} | 3.68 |
flink_DataSink_withParameters | /**
* Pass a configuration to the OutputFormat.
*
* @param parameters Configuration parameters
*/
public DataSink<T> withParameters(Configuration parameters) {
this.parameters = parameters;
return this;
} | 3.68 |
streampipes_AssetLinkBuilder_withResourceId | /**
* Sets the resource ID for the AssetLink being built.
*
* @param resourceId The resource ID to set.
* @return The AssetLinkBuilder instance for method chaining.
*/
public AssetLinkBuilder withResourceId(String resourceId) {
this.assetLink.setResourceId(resourceId);
return this;
} | 3.68 |
flink_PartitionTempFileManager_collectPartSpecToPaths | /** Collect all partitioned paths, aggregate according to partition spec. */
public static Map<LinkedHashMap<String, String>, List<Path>> collectPartSpecToPaths(
FileSystem fs, List<Path> taskPaths, int partColSize) {
Map<LinkedHashMap<String, String>, List<Path>> specToPaths = new HashMap<>();
for (Pat... | 3.68 |
hbase_TableBackupClient_cleanupTargetDir | /**
* Clean up the uncompleted data at target directory if the ongoing backup has already entered the
* copy phase.
*/
protected static void cleanupTargetDir(BackupInfo backupInfo, Configuration conf) {
try {
// clean up the uncompleted data at target directory if the ongoing backup has already entered
// ... | 3.68 |
hadoop_NamenodeStatusReport_getNumDecomDeadDatanodes | /**
* Get the number of dead decommissioned nodes.
*
* @return The number of dead decommissioned nodes.
*/
public int getNumDecomDeadDatanodes() {
return this.deadDecomDatanodes;
} | 3.68 |
flink_JobVertex_setSlotSharingGroup | /**
* Associates this vertex with a slot sharing group for scheduling. Different vertices in the
* same slot sharing group can run one subtask each in the same slot.
*
* @param grp The slot sharing group to associate the vertex with.
*/
public void setSlotSharingGroup(SlotSharingGroup grp) {
checkNotNull(grp);... | 3.68 |
framework_Header_join | /**
* Merges column cells in the row. Original cells are hidden, and new
* merged cell is shown instead. The cell has a width of all merged
* cells together, inherits styles of the first merged cell but has
* empty caption.
*
* @param cellsToMerge
* the cells which should be merged. The cells should n... | 3.68 |
framework_FocusableFlexTable_setFocus | /**
* Sets the keyboard focus to the panel.
*
* @param focus
* Should the panel have keyboard focus. If true the keyboard
* focus will be moved to the
*/
public void setFocus(boolean focus) {
if (focus) {
FocusImpl.getFocusImplForPanel().focus(getElement());
} else {
... | 3.68 |
hbase_FilterList_toByteArray | /** Returns The filter serialized using pb */
@Override
public byte[] toByteArray() throws IOException {
FilterProtos.FilterList.Builder builder = FilterProtos.FilterList.newBuilder();
builder.setOperator(FilterProtos.FilterList.Operator.valueOf(operator.name()));
ArrayList<Filter> filters = filterListBase.getFil... | 3.68 |
morf_AbstractSqlDialectTest_testUseIndexOnMerge | /**
* Check that we don't allow the use of the use index hint with a MERGE.
*/
@Test(expected = IllegalArgumentException.class)
public void testUseIndexOnMerge() {
testDialect.convertStatementToSQL(
merge()
.into(tableRef("a"))
.from(
select()
.from(tableRef("b"))
.useIndex(tableRef("b... | 3.68 |
hbase_MemStoreFlusher_unregisterFlushRequestListener | /**
* Unregister the listener from MemstoreFlushListeners
* @return true when passed listener is unregistered successfully.
*/
@Override
public boolean unregisterFlushRequestListener(final FlushRequestListener listener) {
return this.flushRequestListeners.remove(listener);
} | 3.68 |
hbase_RegionNormalizerWorkQueue_take | /**
* Retrieves and removes the head of this queue, waiting if necessary until an element becomes
* available.
* @return the head of this queue
* @throws InterruptedException if interrupted while waiting
*/
public E take() throws InterruptedException {
E x;
// Take a write lock. If the delegate's queue is empt... | 3.68 |
hbase_AbstractFSWAL_append | /**
* Append a set of edits to the WAL.
* <p/>
* The WAL is not flushed/sync'd after this transaction completes BUT on return this edit must
* have its region edit/sequence id assigned else it messes up our unification of mvcc and
* sequenceid. On return <code>key</code> will have the region edit/sequence id fille... | 3.68 |
hudi_RunLengthDecoder_readUnsignedVarInt | /**
* Reads the next varint encoded int.
*/
private int readUnsignedVarInt() throws IOException {
int value = 0;
int shift = 0;
int b;
do {
b = in.read();
value |= (b & 0x7F) << shift;
shift += 7;
} while ((b & 0x80) != 0);
return value;
} | 3.68 |
flink_RocksDBStateBackend_getRocksDBOptions | /**
* Gets {@link org.rocksdb.Options} for the RocksDB instances.
*
* <p>The options created by the factory here are applied on top of the pre-defined options
* profile selected via {@link #setPredefinedOptions(PredefinedOptions)}. If the pre-defined
* options profile is the default ({@link PredefinedOptions#DEFAU... | 3.68 |
hbase_Bytes_toBinaryByteArrays | /**
* Create an array of byte[] given an array of String.
* @param t operands
* @return Array of binary byte arrays made from passed array of binary strings
*/
public static byte[][] toBinaryByteArrays(final String[] t) {
byte[][] result = new byte[t.length][];
for (int i = 0; i < t.length; i++) {
result[i]... | 3.68 |
hbase_ProcedureStoreTracker_resetTo | /**
* Resets internal state to same as given {@code tracker}, and change the deleted flag according
* to the modified flag if {@code resetDelete} is true. Does deep copy of the bitmap.
* <p/>
* The {@code resetDelete} will be set to true when building cleanup tracker, please see the
* comments in {@link BitSetNode... | 3.68 |
hbase_MasterProcedureScheduler_wakeMetaExclusiveLock | /**
* Wake the procedures waiting for meta.
* @see #waitMetaExclusiveLock(Procedure)
* @param procedure the procedure releasing the lock
* @deprecated only used for {@link RecoverMetaProcedure}. Should be removed along with
* {@link RecoverMetaProcedure}.
*/
@Deprecated
public void wakeMetaExclusiveLo... | 3.68 |
graphhopper_Helper_isFileMapped | /**
* Determines if the specified ByteBuffer is one which maps to a file!
*/
public static boolean isFileMapped(ByteBuffer bb) {
if (bb instanceof MappedByteBuffer) {
try {
((MappedByteBuffer) bb).isLoaded();
return true;
} catch (UnsupportedOperationException ex) {
... | 3.68 |
flink_EmbeddedRocksDBStateBackend_getNumberOfTransferThreads | /** Gets the number of threads used to transfer files while snapshotting/restoring. */
public int getNumberOfTransferThreads() {
return numberOfTransferThreads == UNDEFINED_NUMBER_OF_TRANSFER_THREADS
? CHECKPOINT_TRANSFER_THREAD_NUM.defaultValue()
: numberOfTransferThreads;
} | 3.68 |
AreaShop_GeneralRegion_getTeleportFeature | /**
* Get the teleport feature to teleport players to the region and signs.
* @return The TeleportFeature
*/
public TeleportFeature getTeleportFeature() {
return getFeature(TeleportFeature.class);
} | 3.68 |
hadoop_FilePool_getInputFiles | /**
* Gather a collection of files at least as large as minSize.
* @return The total size of files returned.
*/
public long getInputFiles(long minSize, Collection<FileStatus> files)
throws IOException {
updateLock.readLock().lock();
try {
return root.selectFiles(minSize, files);
} finally {
updateL... | 3.68 |
flink_DispatcherResourceCleanerFactory_ofLocalResource | /**
* A simple wrapper for the resources that don't have any artifacts that can outlive the {@link
* org.apache.flink.runtime.dispatcher.Dispatcher}, but we still want to clean up their local
* state when we terminate globally.
*
* @param localResource Local resource that we want to clean during a global cleanup.
... | 3.68 |
hadoop_YarnVersionInfo_getRevision | /**
* Get the subversion revision number for the root directory
* @return the revision number, eg. "451451"
*/
public static String getRevision() {
return YARN_VERSION_INFO._getRevision();
} | 3.68 |
MagicPlugin_ConfigUtils_fromLocation | /**
* Serialises a location as a relative offset to another location.
*
* <p>One of the following formats may be used, depending on the
* availability of the locations, whether or not they are in the same
* world and whether or not the pitch and the yaw are the same.
*
* <ul>
* <li>{@code ""}, the empty string,... | 3.68 |
hbase_CellUtil_copyValueTo | /**
* Copies the value to the given bytebuffer
* @param cell the cell whose value has to be copied
* @param destination the destination bytebuffer to which the value has to be copied
* @param destinationOffset the offset in the destination bytebuffer
* @return the offset of the bytebuffer after ... | 3.68 |
framework_AbstractRemoteDataSource_setTrackInvalidatedRows | /**
* Sets whether or not to track invalidated rows inside
* {@link #insertRowData(int, int)} and use them to fill cache when
* {{@link #setRowData(int, List)}} is called.
*
* @param trackInvalidatedRows
* a boolean value specifying if to track invalidated rows or
* not, default value <code... | 3.68 |
hbase_AbstractRpcClient_isTcpNoDelay | // for writing tests that want to throw exception when connecting.
protected boolean isTcpNoDelay() {
return tcpNoDelay;
} | 3.68 |
flink_SkipListUtils_removeAllValues | /**
* Free the space of the linked values, and the head value is pointed by the given pointer.
*
* @param valuePointer the pointer of the value to start removing.
* @param spaceAllocator the space allocator.
*/
static void removeAllValues(long valuePointer, Allocator spaceAllocator) {
long nextValuePointer;
... | 3.68 |
flink_ObjectIdentifier_asSummaryString | /** Returns a string that summarizes this instance for printing to a console or log. */
public String asSummaryString() {
if (catalogName == null) {
return objectName;
}
return String.join(".", catalogName, databaseName, objectName);
} | 3.68 |
pulsar_OwnershipCache_isNamespaceBundleOwned | /**
* Checked whether a particular bundle is currently owned by this broker.
*
* @param bundle
* @return
*/
public boolean isNamespaceBundleOwned(NamespaceBundle bundle) {
OwnedBundle ownedBundle = getOwnedBundle(bundle);
return ownedBundle != null && ownedBundle.isActive();
} | 3.68 |
querydsl_AbstractCollQuery_innerJoin | /**
* Define an inner join from the Map typed path to the alias
*
* @param <P> type of expression
* @param target target of the join
* @param alias alias for the join target
* @return current object
*/
public <P> Q innerJoin(MapExpression<?,P> target, Path<P> alias) {
getMetadata().addJoin(JoinType.INNERJOIN... | 3.68 |
hadoop_StoragePolicySatisfyManager_isEnabled | /**
* @return true if sps is configured as an external
* service, false otherwise.
*/
public boolean isEnabled() {
return mode == StoragePolicySatisfierMode.EXTERNAL;
} | 3.68 |
hbase_UserQuotaState_getTableLimiter | /**
* Return the limiter for the specified table associated with this quota. If the table does not
* have its own quota limiter the global one will be returned. In case there is no quota limiter
* associated with this object a noop limiter will be returned.
* @return the quota limiter for the specified table
*/
pu... | 3.68 |
flink_HsMemoryDataSpiller_spillAsync | /**
* Spilling buffers to disk asynchronously.
*
* @param bufferToSpill buffers need to be spilled, must ensure that it is sorted by
* (subpartitionId, bufferIndex).
* @return the completable future contains spilled buffers information.
*/
public CompletableFuture<List<SpilledBuffer>> spillAsync(
List... | 3.68 |
morf_SchemaModificationAdapter_initialiseTableSchema | /**
* Make sure the database is ready to receive the data. Check the table schema matches what we expect, if it doesn't drop and re-create.
*
* @param table The source table we're expecting.
*/
private void initialiseTableSchema(Table table) {
SqlScriptExecutor sqlExecutor = databaseDataSetConsumer.getSqlExecutor... | 3.68 |
hbase_Sleeper_getPeriod | /** Returns the sleep period in milliseconds */
public final int getPeriod() {
return period;
} | 3.68 |
MagicPlugin_TextUtils_toHexString | // This is mainly meant for colors, since it only uses 6 characters for RGB
public static String toHexString(int i) {
return String.format("%06X", i);
} | 3.68 |
flink_SlotSharingGroup_setExternalResource | /**
* Add the given external resource. The old value with the same resource name will be
* replaced if present.
*/
public Builder setExternalResource(String name, double value) {
this.externalResources.put(name, value);
return this;
} | 3.68 |
hbase_ExecutorService_submit | /**
* Submit the event to the queue for handling.
*/
void submit(final EventHandler event) {
// If there is a listener for this type, make sure we call the before
// and after process methods.
this.threadPoolExecutor.execute(event);
} | 3.68 |
hadoop_TypedBytesInput_readVector | /**
* Reads the vector following a <code>Type.VECTOR</code> code.
* @return the obtained vector
* @throws IOException
*/
@SuppressWarnings("unchecked")
public ArrayList readVector() throws IOException {
int length = readVectorHeader();
ArrayList result = new ArrayList(length);
for (int i = 0; i < length; i++)... | 3.68 |
hadoop_EncryptionSecretOperations_getSSECustomerKey | /***
* Gets the SSE-C client side key if present.
*
* @param secrets source of the encryption secrets.
* @return an optional key to attach to a request.
*/
public static Optional<String> getSSECustomerKey(final EncryptionSecrets secrets) {
if (secrets.hasEncryptionKey() && secrets.getEncryptionMethod() == S3AEnc... | 3.68 |
flink_RocksDBOptionsFactory_createNativeMetricsOptions | /**
* This method should enable certain RocksDB metrics to be forwarded to Flink's metrics
* reporter.
*
* <p>Enabling these monitoring options may degrade RockDB performance and should be set with
* care.
*
* @param nativeMetricOptions The options object with the pre-defined options.
* @return The options obje... | 3.68 |
flink_CsvReader_parseQuotedStrings | /**
* Enables quoted String parsing. Field delimiters in quoted Strings are ignored. A String is
* parsed as quoted if it starts and ends with a quoting character and as unquoted otherwise.
* Leading or tailing whitespaces are not allowed.
*
* @param quoteCharacter The character which is used as quoting character.... | 3.68 |
flink_LocalProperties_areFieldsUnique | /**
* Checks whether the given set of fields is unique, as specified in these local properties.
*
* @param set The set to check.
* @return True, if the given column combination is unique, false if not.
*/
public boolean areFieldsUnique(FieldSet set) {
return this.uniqueFields != null && this.uniqueFields.conta... | 3.68 |
pulsar_NarUnpacker_calculateMd5sum | /**
* Calculates an md5 sum of the specified file.
*
* @param file
* to calculate the md5sum of
* @return the md5sum bytes
* @throws IOException
* if cannot read file
*/
private static byte[] calculateMd5sum(final File file) throws IOException {
try (final FileInputStream inputStream ... | 3.68 |
hbase_VisibilityClient_clearAuths | /**
* Removes given labels from user's globally authorized list of labels.
*/
public static VisibilityLabelsResponse clearAuths(Connection connection, final String[] auths,
final String user) throws Throwable {
return setOrClearAuths(connection, auths, user, false);
} | 3.68 |
dubbo_ServiceInstancesChangedListener_doOnEvent | /**
* @param event
*/
private synchronized void doOnEvent(ServiceInstancesChangedEvent event) {
if (destroyed.get() || !accept(event) || isRetryAndExpired(event)) {
return;
}
refreshInstance(event);
if (logger.isDebugEnabled()) {
logger.debug(event.getServiceInstances().toString());
... | 3.68 |
hadoop_DockerContainerDeletionTask_getContainerId | /**
* Get the id of the container to delete.
*
* @return the id of the container to delete.
*/
public String getContainerId() {
return containerId;
} | 3.68 |
morf_InsertStatement_into | /**
* Inserts into a specific table.
*
* <blockquote><pre>insert().into(tableRef("agreement"));</pre></blockquote>
*
* @param intoTable the table to insert into.
* @return a statement with the changes applied.
*/
public InsertStatement into(TableReference intoTable) {
return copyOnWriteOrMutate(
b -> b.i... | 3.68 |
hadoop_RLESparseResourceAllocation_getLatestNonNullTime | /**
* Get the timestamp of the latest non-null resource allocation.
*
* @return the timestamp of the last resource allocation
*/
public long getLatestNonNullTime() {
readLock.lock();
try {
if (cumulativeCapacity.isEmpty()) {
return -1;
} else {
// the last entry might contain null (to termin... | 3.68 |
morf_ConnectionResourcesBean_getInstanceName | /**
* @see org.alfasoftware.morf.jdbc.AbstractConnectionResources#getInstanceName()
*/
@Override
public String getInstanceName() {
return instanceName;
} | 3.68 |
hadoop_ApplicationColumnPrefix_getColumnPrefix | /**
* @return the column name value
*/
private String getColumnPrefix() {
return columnPrefix;
} | 3.68 |
hadoop_SQLDelegationTokenSecretManager_setDelegationTokenSeqNum | /**
* Updates the value of the last reserved sequence number.
* @param seqNum Value to update the sequence number to.
*/
@Override
public void setDelegationTokenSeqNum(int seqNum) {
try {
updateSequenceNum(seqNum);
} catch (SQLException e) {
throw new RuntimeException(
"Failed to update token seq... | 3.68 |
querydsl_JTSCurveExpression_length | /**
* The length of this Curve in its associated spatial reference.
*
* @return length
*/
public NumberExpression<Double> length() {
if (length == null) {
length = Expressions.numberOperation(Double.class, SpatialOps.LENGTH, mixin);
}
return length;
} | 3.68 |
hbase_ConnectionCache_getCurrentConnection | /**
* Get the cached connection for the current user. If none or timed out, create a new one.
*/
ConnectionInfo getCurrentConnection() throws IOException {
String userName = getEffectiveUser();
ConnectionInfo connInfo = connections.get(userName);
if (connInfo == null || !connInfo.updateAccessTime()) {
Lock ... | 3.68 |
flink_CheckpointProperties_discardOnJobCancelled | /**
* Returns whether the checkpoint should be discarded when the owning job reaches the {@link
* JobStatus#CANCELED} state.
*
* @return <code>true</code> if the checkpoint should be discarded when the owning job reaches
* the {@link JobStatus#CANCELED} state; <code>false</code> otherwise.
* @see CompletedChe... | 3.68 |
dubbo_PropertySourcesUtils_getPropertyNames | /**
* Get the property names as the array from the specified {@link PropertySource} instance.
*
* @param propertySource {@link PropertySource} instance
* @return non-null
*/
public static String[] getPropertyNames(PropertySource propertySource) {
String[] propertyNames = propertySource instanceof EnumerablePro... | 3.68 |
framework_VDebugWindow_getMillisSinceReset | /**
* Gets the milliseconds since last {@link #resetTimer()} call.
*
* @return
*/
static int getMillisSinceReset() {
if (lastReset == null) {
lastReset = new Duration();
}
return lastReset.elapsedMillis();
} | 3.68 |
flink_ResourceSpec_setExtendedResource | /**
* Add the given extended resource. The old value with the same resource name will be
* replaced if present.
*/
public Builder setExtendedResource(ExternalResource extendedResource) {
this.extendedResources.put(extendedResource.getName(), extendedResource);
return this;
} | 3.68 |
hadoop_RollingFileSystemSink_initFs | /**
* Initialize the connection to HDFS and create the base directory. Also
* launch the flush thread.
*/
private boolean initFs() {
boolean success = false;
fileSystem = getFileSystem();
// This step isn't strictly necessary, but it makes debugging issues much
// easier. We try to create the base director... | 3.68 |
framework_BrowserWindowOpener_getUriFragment | /**
* Gets that URI fragment configured for opened windows.
*
* @return the URI fragment string, or <code>null</code> if no fragment is
* configured.
*
* @see #setUriFragment(String)
*/
public String getUriFragment() {
return getState(false).uriFragment;
} | 3.68 |
flink_SingleInputSemanticProperties_addForwardedField | /**
* Adds, to the existing information, a field that is forwarded directly from the source
* record(s) to the destination record(s).
*
* @param sourceField the position in the source record(s)
* @param targetField the position in the destination record(s)
*/
public void addForwardedField(int sourceField, int tar... | 3.68 |
dubbo_NacosNamingServiceUtils_getGroup | /**
* The group of {@link NamingService} to register
*
* @param connectionURL {@link URL connection url}
* @return non-null, "default" as default
* @since 2.7.5
*/
public static String getGroup(URL connectionURL) {
// Compatible with nacos grouping via group.
String group = connectionURL.getParameter(GROU... | 3.68 |
querydsl_ComparableExpressionBase_coalesce | /**
* Create a {@code coalesce(this, args...)} expression
*
* @param args additional arguments
* @return coalesce
*/
@SuppressWarnings("unchecked")
public ComparableExpressionBase<T> coalesce(T... args) {
Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin);
for (T arg : args) {
coalesce.add(ar... | 3.68 |
flink_DataSet_writeAsFormattedText | /**
* Writes a DataSet as text file(s) to the specified location.
*
* <p>For each element of the DataSet the result of {@link TextFormatter#format(Object)} is
* written.
*
* @param filePath The path pointing to the location the text file is written to.
* @param writeMode Control the behavior for existing files. ... | 3.68 |
framework_FieldGroup_commitFields | /**
* Tries to commit all bound fields one by one and gathers any validation
* exceptions in a map, which is returned to the caller
*
* @return a propertyId to validation exception map which is empty if all
* commits succeeded
*/
private Map<Field<?>, InvalidValueException> commitFields() {
Map<Field<... | 3.68 |
flink_Router_addRoute | /**
* Add route.
*
* <p>A path pattern can only point to one target. This method does nothing if the pattern has
* already been added.
*/
public Router<T> addRoute(HttpMethod method, String pathPattern, T target) {
getMethodlessRouter(method).addRoute(pathPattern, target);
return this;
} | 3.68 |
framework_VTabsheet_setClosable | /**
* Adds or removes the button for closing the corresponding tab and the
* style name for a closable tab.
*
* @param closable
* {@code true} if the tab is closable, {@code false}
* otherwise
*/
public void setClosable(boolean closable) {
this.closable = closable;
if (closable && c... | 3.68 |
flink_Savepoint_load | /**
* Loads an existing savepoint. Useful if you want to query, modify, or extend the state of an
* existing application.
*
* @param env The execution environment used to transform the savepoint.
* @param path The path to an existing savepoint on disk.
* @param stateBackend The state backend of the savepoint.
* ... | 3.68 |
framework_FieldBinder_bindFieldByIdentifier | /**
* Tries to bind the given {@link Component} instance to a member field of
* the bind target. The field is matched based on the given identifier. If a
* field is already bound (not null), {@link FieldBindingException} is
* thrown.
*
* @param identifier
* the identifier for the field.
* @param inst... | 3.68 |
pulsar_ResourceGroupService_registerNameSpace | /**
* Registers a namespace as a user of a resource group.
*
* @param resourceGroupName
* @param fqNamespaceName (i.e., in "tenant/Namespace" format)
* @throws if the RG does not exist, or if the NS already references the RG.
*/
public void registerNameSpace(String resourceGroupName, NamespaceName fqNamespaceName... | 3.68 |
framework_VAbstractCalendarPanel_getSelectKey | /**
* Returns the select key which selects the value. By default this is the
* enter key but it can be changed to whatever you like by overriding this
* method.
*
* @return the select key
*/
protected int getSelectKey() {
return KeyCodes.KEY_ENTER;
} | 3.68 |
pulsar_ByteBufPair_get | /**
* Get a new {@link ByteBufPair} from the pool and assign 2 buffers to it.
*
* <p>The buffers b1 and b2 lifecycles are now managed by the ByteBufPair:
* when the {@link ByteBufPair} is deallocated, b1 and b2 will be released as well.
*
* @param b1
* @param b2
* @return
*/
public static ByteBufPair get(ByteB... | 3.68 |
hibernate-validator_NotEmptyValidatorForArraysOfShort_isValid | /**
* Checks the array is not {@code null} and not empty.
*
* @param array the array to validate
* @param constraintValidatorContext context in which the constraint is evaluated
* @return returns {@code true} if the array is not {@code null} and the array is not empty
*/
@Override
public boolean isValid(short[] a... | 3.68 |
flink_OperationManager_getOperationResultSchema | /**
* Get the {@link ResolvedSchema} of the operation.
*
* @param operationHandle identifies the {@link Operation}.
*/
public ResolvedSchema getOperationResultSchema(OperationHandle operationHandle)
throws Exception {
return getOperation(operationHandle).getResultSchema();
} | 3.68 |
querydsl_MongodbExpressions_withinBox | /**
* Finds points within bounds of the rectangle
*
* @param blLatVal bottom left latitude
* @param blLongVal bottom left longitude
* @param urLatVal upper right latitude
* @param urLongVal upper right longitude
* @return predicate
*/
public static BooleanExpression withinBox(Expression<Double[]> expr, double b... | 3.68 |
hudi_CollectionUtils_tail | /**
* Returns last element of the array of {@code T}
*/
public static <T> T tail(T[] ts) {
checkArgument(ts.length > 0);
return ts[ts.length - 1];
} | 3.68 |
hadoop_RMWebAppUtil_createAppSubmissionContext | /**
* Create the actual ApplicationSubmissionContext to be submitted to the RM
* from the information provided by the user.
*
* @param newApp the information provided by the user
* @param conf RM configuration
* @return returns the constructed ApplicationSubmissionContext
* @throws IOException in case of Error
... | 3.68 |
hadoop_HdfsFileStatus_replication | /**
* Set the replication of this entity (default = 0).
* @param replication Number of replicas
* @return This Builder instance
*/
public Builder replication(int replication) {
this.replication = replication;
return this;
} | 3.68 |
hadoop_ActiveAuditManagerS3A_setActiveThreadSpan | /**
* Set a specific span as the active span.
* This will wrap it.
* @param span span to use.
* @return the wrapped span.
*/
private AuditSpanS3A setActiveThreadSpan(AuditSpanS3A span) {
return switchToActiveSpan(
new WrappingAuditSpan(span, span.isValidSpan()));
} | 3.68 |
hbase_MultiTableInputFormatBase_getSplits | /**
* Calculates the splits that will serve as input for the map tasks. The number of splits matches
* the number of regions in a table.
* @param context The current job context.
* @return The list of input splits.
* @throws IOException When creating the list of splits fails.
* @see InputFormat#getSplits(org.apac... | 3.68 |
flink_InputGateSpecUtils_getExclusiveBuffersPerChannel | /**
* Since at least one floating buffer is required, the number of required buffers is reduced by
* 1, and then the average number of buffers per channel is calculated. Returning the minimum
* value to ensure that the number of required buffers per gate is not more than the given
* requiredBuffersPerGate.}.
*/
pr... | 3.68 |
framework_AbstractInMemoryContainer_internalAddAt | /**
* Adds the bean to all internal data structures at the given position.
* Fails if an item with itemId is already in the container. Returns a the
* item if it was added successfully, null otherwise.
*
* <p>
* Caller should initiate filtering after calling this method.
* </p>
*
* For internal use only - subc... | 3.68 |
hbase_StoreUtils_getMaxMemStoreTSInList | /**
* Return the largest memstoreTS found across all storefiles in the given list. Store files that
* were created by a mapreduce bulk load are ignored, as they do not correspond to any specific
* put operation, and thus do not have a memstoreTS associated with them.
*/
public static OptionalLong getMaxMemStoreTSIn... | 3.68 |
morf_TableSetSchema_viewExists | /**
* @see org.alfasoftware.morf.metadata.Schema#viewExists(java.lang.String)
*/
@Override
public boolean viewExists(String name) {
return false;
} | 3.68 |
morf_SqlDialect_getDeleteLimitWhereClause | /**
* Returns the SQL that specifies the deletion limit in the WHERE clause, if any, for the dialect.
*
* @param limit The delete limit.
* @return The SQL fragment.
*/
protected Optional<String> getDeleteLimitWhereClause(@SuppressWarnings("unused") int limit) {
return Optional.empty();
} | 3.68 |
framework_AbstractComponentContainer_removeAllComponents | /**
* Removes all components from the container. This should probably be
* re-implemented in extending classes for a more powerful implementation.
*/
@Override
public void removeAllComponents() {
final LinkedList<Component> l = new LinkedList<>();
// Adds all components
for (final Iterator<Component> i ... | 3.68 |
flink_DataSet_rightOuterJoin | /**
* Initiates a Right Outer Join transformation.
*
* <p>An Outer Join transformation joins two elements of two {@link DataSet DataSets} on key
* equality and provides multiple ways to combine joining elements into one DataSet.
*
* <p>Elements of the <b>right</b> DataSet (i.e. {@code other}) that do not have a m... | 3.68 |
hadoop_Chain_write | /**
* Writes a key/value pair.
*
* @param key
* the key to write.
* @param value
* the value to write.
* @throws IOException
*/
public void write(KEYOUT key, VALUEOUT value) throws IOException,
InterruptedException {
if (outputQueue != null) {
writeToQueue(key, value);
} else {
... | 3.68 |
framework_StaticSection_setVisible | /**
* Sets the visibility of this section.
*
* @param visible
* {@code true} if visible; {@code false} if not
*
* @since 8.1.1
*/
public void setVisible(boolean visible) {
if (getState(false).visible != visible) {
getState(true).visible = visible;
}
} | 3.68 |
flink_SegmentsUtil_getLong | /**
* get long from segments.
*
* @param segments target segments.
* @param offset value offset.
*/
public static long getLong(MemorySegment[] segments, int offset) {
if (inFirstSegment(segments, offset, 8)) {
return segments[0].getLong(offset);
} else {
return getLongMultiSegments(segments... | 3.68 |
hbase_HRegion_endNonceOperation | /**
* Ends nonce operation for a mutation, if needed.
* @param success Whether the operation for this nonce has succeeded.
*/
private void endNonceOperation(boolean success) {
if (
region.rsServices != null && region.rsServices.getNonceManager() != null
&& nonce != HConstants.NO_NONCE
) {
region.rs... | 3.68 |
pulsar_ShadowReplicator_getShadowReplicatorName | /**
* Cursor name fot this shadow replicator.
* @param replicatorPrefix
* @param shadowTopic
* @return
*/
public static String getShadowReplicatorName(String replicatorPrefix, String shadowTopic) {
return replicatorPrefix + "-" + Codec.encode(shadowTopic);
} | 3.68 |
hadoop_TaskPool_waitFor | /**
* Wait for all the futures to complete; there's a small sleep between
* each iteration; enough to yield the CPU.
* @param futures futures.
* @param sleepInterval Interval in milliseconds to await completion.
*/
private static void waitFor(Collection<Future<?>> futures, int sleepInterval) {
int size = futures... | 3.68 |
flink_SavepointWriter_fromExistingSavepoint | /**
* Loads an existing savepoint. Useful if you want to modify or extend the state of an existing
* application.
*
* @param path The path to an existing savepoint on disk.
* @param stateBackend The state backend of the savepoint.
* @return A {@link SavepointWriter}.
* @see #fromExistingSavepoint(String)
*/
pub... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.