name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
pulsar_NettyChannelUtil_writeAndFlushWithClosePromise | /**
* Write and flush the message to the channel and the close the channel.
*
* This method is particularly helpful when the connection is in an invalid state
* and therefore a new connection must be created to continue.
*
* @param ctx channel's context
* @param msg buffer to write in the channel
*/
public stat... | 3.68 |
hbase_WALPrettyPrinter_disableJSON | /**
* turns JSON output off, and turns on "pretty strings" for human consumption
*/
public void disableJSON() {
outputJSON = false;
} | 3.68 |
flink_BulkIterationNode_setNextPartialSolution | /**
* Sets the nextPartialSolution for this BulkIterationNode.
*
* @param nextPartialSolution The nextPartialSolution to set.
*/
public void setNextPartialSolution(
OptimizerNode nextPartialSolution, OptimizerNode terminationCriterion) {
// check if the root of the step function has the same parallelis... | 3.68 |
flink_DataSet_flatMap | /**
* Applies a FlatMap transformation on a {@link DataSet}.
*
* <p>The transformation calls a {@link
* org.apache.flink.api.common.functions.RichFlatMapFunction} for each element of the DataSet.
* Each FlatMapFunction call can return any number of elements including none.
*
* @param flatMapper The FlatMapFuncti... | 3.68 |
flink_Pool_pollEntry | /** Gets the next cached entry. This blocks until the next entry is available. */
public T pollEntry() throws InterruptedException {
return pool.take();
} | 3.68 |
hadoop_ResourceVector_decrement | /**
* Decrements the given resource by the specified value.
* @param resourceName name of the resource
* @param value value to be subtracted from the resource's current value
*/
public void decrement(String resourceName, double value) {
setValue(resourceName, getValue(resourceName) - value);
} | 3.68 |
framework_Slot_getCaptionElement | /**
* Get the slots caption element.
*
* @return the caption element or {@code null} if there is no caption
*/
@SuppressWarnings("deprecation")
public com.google.gwt.user.client.Element getCaptionElement() {
return DOM.asOld(caption);
} | 3.68 |
pulsar_ResourceUnitRanking_calculateBrokerMaxCapacity | /**
* Estimate the maximum number namespace bundles a ResourceUnit is able to handle with all resource.
*/
public static long calculateBrokerMaxCapacity(SystemResourceUsage systemResourceUsage, ResourceQuota defaultQuota) {
double bandwidthOutLimit = systemResourceUsage.bandwidthOut.limit * KBITS_TO_BYTES;
do... | 3.68 |
hadoop_Quota_getQuotaRemoteLocations | /**
* Get all quota remote locations across subclusters under given
* federation path.
* @param path Federation path.
* @return List of quota remote locations.
* @throws IOException
*/
private List<RemoteLocation> getQuotaRemoteLocations(String path)
throws IOException {
List<RemoteLocation> locations = new... | 3.68 |
framework_PointerCancelEvent_getType | /**
* Gets the event type associated with pointer cancel events.
*
* @return the handler type
*/
public static Type<PointerCancelHandler> getType() {
return TYPE;
} | 3.68 |
hbase_ExplicitColumnTracker_checkColumn | /**
* {@inheritDoc}
*/
@Override
public ScanQueryMatcher.MatchCode checkColumn(Cell cell, byte type) {
// delete markers should never be passed to an
// *Explicit*ColumnTracker
assert !PrivateCellUtil.isDelete(type);
do {
// No more columns left, we are done with this query
if (done()) {
return ... | 3.68 |
AreaShop_FileManager_removeGroup | /**
* Remove a group.
* @param group Group to remove
*/
public void removeGroup(RegionGroup group) {
groups.remove(group.getLowerCaseName());
groupsConfig.set(group.getLowerCaseName(), null);
saveGroupsIsRequired();
} | 3.68 |
hadoop_YarnVersionInfo_getVersion | /**
* Get the YARN version.
* @return the YARN version string, eg. "0.6.3-dev"
*/
public static String getVersion() {
return YARN_VERSION_INFO._getVersion();
} | 3.68 |
hudi_OptionsResolver_hasReadCommitsLimit | /**
* Returns whether the read commits limit is specified.
*/
public static boolean hasReadCommitsLimit(Configuration conf) {
return conf.contains(FlinkOptions.READ_COMMITS_LIMIT);
} | 3.68 |
framework_AbstractSingleSelect_updateSelectedItemState | /**
* This method updates the shared selection state of the
* {@code AbstractSingleSelect}.
*
* @param value
* the value that is selected; may be {@code null}
*
* @since 8.5
*/
protected void updateSelectedItemState(T value) {
// FIXME: If selecting a value that does not exist, this will leave an... | 3.68 |
framework_ErrorHandlingRunnable_processException | /**
* Process the given exception in the context of the given runnable. If the
* runnable extends {@link ErrorHandlingRunnable}, then the exception is
* passed to {@link #handleError(Exception)} and null is returned. If
* {@link #handleError(Exception)} throws an exception, that exception is
* returned. If the run... | 3.68 |
pulsar_SchemaDefinition_builder | /**
* Get a new builder instance that can used to configure and build a {@link SchemaDefinition} instance.
*
* @return the {@link SchemaDefinition}
*/
static <T> SchemaDefinitionBuilder<T> builder() {
return DefaultImplementation.getDefaultImplementation().newSchemaDefinitionBuilder();
} | 3.68 |
flink_NetUtils_ipAddressToUrlString | /**
* Encodes an IP address properly as a URL string. This method makes sure that IPv6 addresses
* have the proper formatting to be included in URLs.
*
* @param address The IP address to encode.
* @return The proper URL string encoded IP address.
*/
public static String ipAddressToUrlString(InetAddress address) {... | 3.68 |
hadoop_DBNameNodeConnector_getVolumeInfoFromStorageReports | /**
* Reads the relevant fields from each storage volume and populate the
* DiskBalancer Node.
*
* @param node - Disk Balancer Node
* @param reports - Array of StorageReport
*/
private void getVolumeInfoFromStorageReports(DiskBalancerDataNode node,
StorageReport[] r... | 3.68 |
dubbo_ModuleServiceRepository_registerService | /**
* See {@link #registerService(Class)}
* <p>
* we assume:
* 1. services with different interfaces are not allowed to have the same path.
* 2. services share the same interface but has different group/version can share the same path.
* 3. path's default value is the name of the interface.
*
* @param path
* @... | 3.68 |
shardingsphere-elasticjob_JobRegistry_addJobInstance | /**
* Add job instance.
*
* @param jobName job name
* @param jobInstance job instance
*/
public void addJobInstance(final String jobName, final JobInstance jobInstance) {
jobInstanceMap.put(jobName, jobInstance);
} | 3.68 |
morf_ExistingViewStateLoader_getViewsToDrop | /**
* @return the views which need to be dropped.
*/
public Collection<View> getViewsToDrop() {
return viewsToDrop;
} | 3.68 |
flink_FileInputFormat_getSplitLength | /**
* Gets the length or remaining length of the current split.
*
* @return The length or remaining length of the current split.
*/
public long getSplitLength() {
return splitLength;
} | 3.68 |
hbase_HBackupFileSystem_checkImageManifestExist | /**
* Check whether the backup image path and there is manifest file in the path.
* @param backupManifestMap If all the manifests are found, then they are put into this map
* @param tableArray the tables involved
* @throws IOException exception
*/
public static void checkImageManifestExist(HashMap<TableName... | 3.68 |
hbase_ExportSnapshot_doWork | /**
* Execute the export snapshot by copying the snapshot metadata, hfiles and wals.
* @return 0 on success, and != 0 upon failure.
*/
@Override
public int doWork() throws IOException {
Configuration conf = getConf();
// Check user options
if (snapshotName == null) {
System.err.println("Snapshot name not ... | 3.68 |
framework_NativeSelect_getVisibleItemCount | /**
* Gets the number of items that are visible. If only one item is visible,
* then the box will be displayed as a drop-down list.
*
* @since 8.1
* @return the visible item count
*/
public int getVisibleItemCount() {
return getState(false).visibleItemCount;
} | 3.68 |
hbase_ZKUtil_createSetData | /**
* Set data into node creating node if it doesn't yet exist. Does not set watch.
* @param zkw zk reference
* @param znode path of node
* @param data data to set for node
* @throws KeeperException if a ZooKeeper operation fails
*/
public static void createSetData(final ZKWatcher zkw, final String znode, fina... | 3.68 |
flink_WindowSavepointReader_evictor | /** Reads from a window that uses an evictor. */
public EvictingWindowSavepointReader<W> evictor() {
return new EvictingWindowSavepointReader<>(env, metadata, stateBackend, windowSerializer);
} | 3.68 |
hadoop_FifoCandidatesSelector_preemptFrom | /**
* Given a target preemption for a specific application, select containers
* to preempt (after unreserving all reservation for that app).
*/
private void preemptFrom(FiCaSchedulerApp app,
Resource clusterResource, Map<String, Resource> resToObtainByPartition,
List<RMContainer> skippedAMContainerlist, Reso... | 3.68 |
hbase_QuotaSettingsFactory_unthrottleNamespaceByThrottleType | /**
* Remove the throttling for the specified namespace by throttle type.
* @param namespace the namespace
* @param type the type of throttling
* @return the quota settings
*/
public static QuotaSettings unthrottleNamespaceByThrottleType(final String namespace,
final ThrottleType type) {
return throttle(n... | 3.68 |
hmily_StringUtils_isNoneBlank | /**
* Is none blank boolean.
*
* @param css the css
* @return the boolean
*/
public static boolean isNoneBlank(final CharSequence... css) {
return !isAnyBlank(css);
} | 3.68 |
hadoop_FsGetter_get | /**
* Gets file system instance of given uri.
*
* @param uri uri.
* @param conf configuration.
* @throws IOException raised on errors performing I/O.
* @return FileSystem.
*/
public FileSystem get(URI uri, Configuration conf) throws IOException {
return FileSystem.get(uri, conf);
} | 3.68 |
hbase_MemStoreLABImpl_getNewExternalChunk | /*
* Returning a new chunk, without replacing current chunk, meaning MSLABImpl does not make the
* returned chunk as CurChunk. The space on this chunk will be allocated externally. The interface
* is only for external callers. Chunks from pools are not allocated from here, since they have
* fixed sizes
*/
@Overrid... | 3.68 |
framework_VScrollTable_getExpandRatio | /**
* Returns the expand ratio of the cell.
*
* @return The expand ratio
*/
public float getExpandRatio() {
return expandRatio;
} | 3.68 |
querydsl_SQLExpressions_stddev | /**
* returns the sample standard deviation of expr, a set of numbers.
*
* @param expr argument
* @return stddev(expr)
*/
public static <T extends Number> WindowOver<T> stddev(Expression<T> expr) {
return new WindowOver<T>(expr.getType(), SQLOps.STDDEV, expr);
} | 3.68 |
framework_VAbstractSplitPanel_convertToPixels | /**
* Converts given split position string (in pixels or percentage) to a
* floating point pixel value.
*
* @param pos
* @return
*/
private float convertToPixels(String pos) {
float posAsFloat;
if (pos.indexOf("%") > 0) {
posAsFloat = Math.round(
Float.parseFloat(pos.substring(0, p... | 3.68 |
open-banking-gateway_AccountInformationRequestCommon_fintech_calls_list_accounts_for_max_musterman_with_expected_balances | // Note that max.musterman is typically used for EMBEDDED (real EMBEDDED that is returned by bank, and not EMBEDDED approach in table)
public SELF fintech_calls_list_accounts_for_max_musterman_with_expected_balances(Boolean withBalance) {
ExtractableResponse<Response> response = withAccountsHeaders(MAX_MUSTERMAN)
... | 3.68 |
flink_RoundRobinOperatorStateRepartitioner_repartitionSplitState | /** Repartition SPLIT_DISTRIBUTE state. */
private void repartitionSplitState(
Map<String, List<Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo>>>
nameToDistributeState,
int newParallelism,
List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList) {
int sta... | 3.68 |
hbase_DynamicMetricsRegistry_newSizeHistogram | /**
* Create a new histogram with size range counts.
* @param name The name of the histogram
* @param desc The description of the data in the histogram.
* @return A new MutableSizeHistogram
*/
public MutableSizeHistogram newSizeHistogram(String name, String desc) {
MutableSizeHistogram histo = new MutableSizeHis... | 3.68 |
flink_Tuple4_setFields | /**
* Sets new values to all fields of the tuple.
*
* @param f0 The value for field 0
* @param f1 The value for field 1
* @param f2 The value for field 2
* @param f3 The value for field 3
*/
public void setFields(T0 f0, T1 f1, T2 f2, T3 f3) {
this.f0 = f0;
this.f1 = f1;
this.f2 = f2;
this.f3 = f3... | 3.68 |
flink_Router_allAllowedMethods | /** Returns all methods that this router handles. For {@code OPTIONS *}. */
public Set<HttpMethod> allAllowedMethods() {
if (anyMethodRouter.size() > 0) {
Set<HttpMethod> ret = new HashSet<HttpMethod>(9);
ret.add(HttpMethod.CONNECT);
ret.add(HttpMethod.DELETE);
ret.add(HttpMethod.GET... | 3.68 |
framework_UIDL_getPaintableVariable | /**
* Gets the Paintable with the id found in the named variable's value.
*
* @param name
* the name of the variable
* @return the Paintable referenced by the variable, if it exists
*/
public ServerConnector getPaintableVariable(String name,
ApplicationConnection connection) {
return Connec... | 3.68 |
framework_DataCommunicator_setMaximumAllowedRows | /**
* Set the maximum allowed rows to be fetched in one query.
*
* @param maximumAllowedRows Maximum allowed rows for one query.
* @since
*/
public void setMaximumAllowedRows(int maximumAllowedRows) {
this.maximumAllowedRows = maximumAllowedRows;
} | 3.68 |
hbase_MutableRegionInfo_getTable | /**
* Get current table name of the region
*/
@Override
public TableName getTable() {
return this.tableName;
} | 3.68 |
hadoop_S3AReadOpContext_getFuturePool | /**
* Gets the {@code ExecutorServiceFuturePool} used for asynchronous prefetches.
*
* @return the {@code ExecutorServiceFuturePool} used for asynchronous prefetches.
*/
public ExecutorServiceFuturePool getFuturePool() {
return this.futurePool;
} | 3.68 |
flink_KeyedOperatorTransformation_transform | /**
* Method for passing user defined operators along with the type information that will transform
* the OperatorTransformation.
*
* <p><b>IMPORTANT:</b> Any output from this operator will be discarded.
*
* @param factory A factory returning transformation logic type of the return stream
* @return An {@link Boo... | 3.68 |
hbase_CompactionConfiguration_getThrottlePoint | /** Returns ThrottlePoint used for classifying small and large compactions */
public long getThrottlePoint() {
return throttlePoint;
} | 3.68 |
hadoop_FullCredentialsTokenBinding_loadAWSCredentials | /**
* Load the AWS credentials.
* @throws IOException failure
*/
private void loadAWSCredentials() throws IOException {
credentialOrigin = AbstractS3ATokenIdentifier.createDefaultOriginMessage();
Configuration conf = getConfig();
URI uri = getCanonicalUri();
// look for access keys to FS
S3xLoginHelper.Log... | 3.68 |
hbase_MasterObserver_postModifyTable | /**
* Called after the modifyTable operation has been requested. Called as part of modify table RPC
* call.
* @param ctx the environment to interact with the framework and master
* @param tableName the name of the table
* @param oldDescriptor descriptor of table before modify operation ha... | 3.68 |
druid_DruidDataSource_discardConnection | /**
* 抛弃连接,不进行回收,而是抛弃
*
* @param conn
* @deprecated
*/
public void discardConnection(Connection conn) {
if (conn == null) {
return;
}
try {
if (!conn.isClosed()) {
conn.close();
}
} catch (SQLRecoverableException ignored) {
discardErrorCountUpdater.incre... | 3.68 |
hbase_VersionModel_setServerVersion | /**
* @param version the servlet container version string
*/
public void setServerVersion(String version) {
this.serverVersion = version;
} | 3.68 |
hbase_ExtendedCell_getChunkId | /**
* Extracts the id of the backing bytebuffer of this cell if it was obtained from fixed sized
* chunks as in case of MemstoreLAB
* @return the chunk id if the cell is backed by fixed sized Chunks, else return
* {@link #CELL_NOT_BASED_ON_CHUNK}; i.e. -1.
*/
default int getChunkId() {
return CELL_NOT_BA... | 3.68 |
framework_VAccordion_getCaptionWidth | /**
* Returns caption width including padding.
*
* @return the width of the caption (in pixels), or zero if there is no
* caption element (not possible via the default implementation)
*/
public int getCaptionWidth() {
if (caption == null) {
return 0;
}
int captionWidth = caption.getReq... | 3.68 |
hbase_NewVersionBehaviorTracker_add | // DeleteTracker
@Override
public void add(Cell cell) {
prepare(cell);
byte type = cell.getTypeByte();
switch (Type.codeToType(type)) {
// By the order of seen. We put null cq at first.
case DeleteFamily: // Delete all versions of all columns of the specified family
delFamMap.put(cell.getSequenceId(... | 3.68 |
hibernate-validator_TypeHelper_getValidatorTypes | /**
* @param annotationType The annotation type.
* @param validators List of constraint validator classes (for a given constraint).
* @param <A> the type of the annotation
*
* @return Return a Map<Class, Class<? extends ConstraintValidator>> where the map
* key is the type the validator accept... | 3.68 |
framework_VTabsheet_scheduleDeferred | /**
* Schedule the command for a deferred execution.
*
* @since 7.4
*/
public void scheduleDeferred() {
Scheduler.get().scheduleDeferred(this);
} | 3.68 |
flink_HiveParserTypeCheckProcFactory_getNullExprProcessor | /** Factory method to get NullExprProcessor. */
public HiveParserTypeCheckProcFactory.NullExprProcessor getNullExprProcessor() {
return new HiveParserTypeCheckProcFactory.NullExprProcessor();
} | 3.68 |
flink_FlinkRelBuilder_windowAggregate | /** Build window aggregate for either aggregate or table aggregate. */
public RelBuilder windowAggregate(
LogicalWindow window,
GroupKey groupKey,
List<NamedWindowProperty> namedProperties,
Iterable<AggCall> aggCalls) {
// build logical aggregate
// Because of:
// [CALCITE-3... | 3.68 |
hadoop_AbstractReservationSystem_getDefaultReservationSystem | /**
* Get the default reservation system corresponding to the scheduler
*
* @param scheduler the scheduler for which the reservation system is required
*
* @return the {@link ReservationSystem} based on the configured scheduler
*/
public static String getDefaultReservationSystem(
ResourceScheduler scheduler)... | 3.68 |
hadoop_TypedBytesWritable_setValue | /** Set the typed bytes from a given Java object. */
public void setValue(Object obj) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
TypedBytesOutput tbo = TypedBytesOutput.get(new DataOutputStream(baos));
tbo.write(obj);
byte[] bytes = baos.toByteArray();
set(bytes, 0, bytes.le... | 3.68 |
hbase_VersionInfoUtil_versionNumberToString | /**
* Returns the passed-in <code>version</code> int as a version String (e.g. 0x0103004 is 1.3.4)
*/
public static String versionNumberToString(final int version) {
return String.format("%d.%d.%d", ((version >> 20) & 0xff), ((version >> 12) & 0xff),
(version & 0xfff));
} | 3.68 |
hadoop_Paths_path | /**
* Varags constructor of paths. Not very efficient.
* @param parent parent path
* @param child child entries. "" elements are skipped.
* @return the full child path.
*/
public static Path path(Path parent, String... child) {
Path p = parent;
for (String c : child) {
if (!c.isEmpty()) {
p = new Pat... | 3.68 |
hadoop_BlockStorageMovementAttemptedItems_add | /**
* Add item to block storage movement attempted items map which holds the
* tracking/blockCollection id versus time stamp.
*
* @param startPathId
* - start satisfier path identifier
* @param fileId
* - file identifier
* @param monotonicNow
* - time now
* @param assignedBlocks
* ... | 3.68 |
graphhopper_GraphHopper_setSortGraph | /**
* Sorts the graph which requires more RAM while import. See #12
*/
public GraphHopper setSortGraph(boolean sortGraph) {
ensureNotLoaded();
this.sortGraph = sortGraph;
return this;
} | 3.68 |
MagicPlugin_MageDataStore_save | /**
* @deprecated Replaced by
* {@link #save(MageData, MageDataCallback, boolean)}.
*/
@Deprecated
default void save(MageData mage, MageDataCallback callback) {
save(mage, callback, false);
} | 3.68 |
hbase_Result_getValue | /**
* Get the latest version of the specified column. Note: this call clones the value content of the
* hosting Cell. See {@link #getValueAsByteBuffer(byte[], byte[])}, etc., or {@link #listCells()}
* if you would avoid the cloning.
* @param family family name
* @param qualifier column qualifier
* @return valu... | 3.68 |
framework_AbstractComponentConnector_createWidget | /**
* Creates and returns the widget for this VPaintableWidget. This method
* should only be called once when initializing the paintable.
* <p>
* You should typically not override this method since the framework by
* default generates an implementation that uses {@link GWT#create(Class)}
* to create a widget of t... | 3.68 |
hadoop_TimelinePutResponse_addError | /**
* Add a single {@link TimelinePutError} instance into the existing list
*
* @param error
* a single {@link TimelinePutError} instance
*/
public void addError(TimelinePutError error) {
errors.add(error);
} | 3.68 |
hadoop_ConnectionContext_isUsable | /**
* Check if the connection can be used. It checks if the connection is used by
* another thread or already closed.
*
* @return True if the connection can be used.
*/
public synchronized boolean isUsable() {
return hasAvailableConcurrency() && !isClosed();
} | 3.68 |
graphhopper_GHSortedCollection_pollKey | /**
* @return removes the smallest entry (key and value) from this collection
*/
public int pollKey() {
size--;
if (size < 0) {
throw new IllegalStateException("collection is already empty!?");
}
Entry<Integer, GHIntHashSet> e = map.firstEntry();
GHIntHashSet set = e.getValue();
if (s... | 3.68 |
hadoop_FrameworkCounterGroup_write | /**
* FrameworkGroup ::= #counter (key value)*
*/
@Override
@SuppressWarnings("unchecked")
public void write(DataOutput out) throws IOException {
WritableUtils.writeVInt(out, size());
for (int i = 0; i < counters.length; ++i) {
Counter counter = (C) counters[i];
if (counter != null) {
WritableUtils.... | 3.68 |
hadoop_TimelineEntity_getPrimaryFiltersJAXB | // Required by JAXB
@Private
@XmlElement(name = "primaryfilters")
public HashMap<String, Set<Object>> getPrimaryFiltersJAXB() {
return primaryFilters;
} | 3.68 |
flink_FlinkSemiAntiJoinJoinTransposeRule_setJoinAdjustments | /**
* Sets an array to reflect how much each index corresponding to a field needs to be adjusted.
* The array corresponds to fields in a 3-way join between (X, Y, and Z). X remains unchanged,
* but Y and Z need to be adjusted by some fixed amount as determined by the input.
*
* @param adjustments array to be fille... | 3.68 |
hbase_MetaFixer_getRegionInfoWithLargestEndKey | /**
* @return Either <code>a</code> or <code>b</code>, whichever has the endkey that is furthest
* along in the Table.
*/
static RegionInfo getRegionInfoWithLargestEndKey(RegionInfo a, RegionInfo b) {
if (a == null) {
// b may be null.
return b;
}
if (b == null) {
// Both are null. The retu... | 3.68 |
hbase_BucketCache_startWriterThreads | /**
* Called by the constructor to start the writer threads. Used by tests that need to override
* starting the threads.
*/
protected void startWriterThreads() {
for (WriterThread thread : writerThreads) {
thread.start();
}
} | 3.68 |
framework_EventHelper_updateHandler | /**
* Updates handler registered using {@code handlerProvider}: removes it if
* connector doesn't have anymore {@code eventIdentifier} using provided
* {@code handlerRegistration} and adds it via provided
* {@code handlerProvider} if connector has event listener with
* {@code eventIdentifier}.
*
* @param connect... | 3.68 |
hbase_BloomFilterChunk_add | // Used only by tests
void add(byte[] buf, int offset, int len) {
/*
* For faster hashing, use combinatorial generation
* http://www.eecs.harvard.edu/~kirsch/pubs/bbbf/esa06.pdf
*/
HashKey<byte[]> hashKey = new ByteArrayHashKey(buf, offset, len);
int hash1 = this.hash.hash(hashKey, 0);
int hash2 = this... | 3.68 |
hadoop_FileIoProvider_createFile | /**
* Create a file.
* @param volume target volume. null if unavailable.
* @param f File to be created.
* @return true if the file does not exist and was successfully created.
* false if the file already exists.
* @throws IOException
*/
public boolean createFile(
@Nullable FsVolumeSpi volume, Fil... | 3.68 |
flink_ZooKeeperStateHandleStore_getAllAndLock | /**
* Gets all available state handles from ZooKeeper and locks the respective state nodes.
*
* <p>If there is a concurrent modification, the operation is retried until it succeeds.
*
* @return All state handles from ZooKeeper.
* @throws Exception If a ZooKeeper or state handle operation fails
*/
@Override
publi... | 3.68 |
framework_RadioButtonGroupConnector_onDataChange | /**
* A data change handler registered to the data source. Updates the data
* items and selection status when the data source notifies of new changes
* from the server side.
*
* @param range
* the new range of data items
*/
private void onDataChange(Range range) {
assert range.getStart() == 0 && r... | 3.68 |
flink_DataTypeTemplate_fromDefaults | /** Creates an instance with no parameter content. */
static DataTypeTemplate fromDefaults() {
return new DataTypeTemplate(
null, null, null, null, null, null, null, null, null, null, null);
} | 3.68 |
framework_Validator_getCauses | /**
* Returns the {@code InvalidValueExceptions} that caused this
* exception.
*
* @return An array containing the {@code InvalidValueExceptions} that
* caused this exception. Returns an empty array if this
* exception was not caused by other exceptions.
*/
public InvalidValueException[] getCause... | 3.68 |
hbase_CellComparatorImpl_compareFamilies | /**
* This method will be overridden when we compare cells inner store to bypass family comparing.
*/
protected int compareFamilies(KeyValue left, int leftFamilyPosition, int leftFamilyLength,
ByteBufferKeyValue right, int rightFamilyPosition, int rightFamilyLength) {
return ByteBufferUtils.compareTo(left.getFami... | 3.68 |
flink_CatalogTableStatistics_getRowCount | /** The number of rows. */
public long getRowCount() {
return this.rowCount;
} | 3.68 |
hadoop_MapHost_markAvailable | /**
* Called when the node is done with its penalty or done copying.
* @return the host's new state
*/
public synchronized State markAvailable() {
if (maps.isEmpty()) {
state = State.IDLE;
} else {
state = State.PENDING;
}
return state;
} | 3.68 |
hadoop_ActiveAuditManagerS3A_modifyHttpRequest | /**
* Forward to the inner span.
* {@inheritDoc}
*/
@Override
public SdkHttpRequest modifyHttpRequest(Context.ModifyHttpRequest context,
ExecutionAttributes executionAttributes) {
return span.modifyHttpRequest(context, executionAttributes);
} | 3.68 |
hadoop_DelegatingSSLSocketFactory_getDefaultFactory | /**
* Singleton instance of the SSLSocketFactory.
*
* SSLSocketFactory must be initialized with appropriate SSLChannelMode
* using initializeDefaultFactory method.
*
* @return instance of the SSLSocketFactory, instance must be initialized by
* initializeDefaultFactory.
*/
public static DelegatingSSLSocketFactor... | 3.68 |
framework_HeartbeatHandler_handleSessionExpired | /*
* (non-Javadoc)
*
* @see
* com.vaadin.server.SessionExpiredHandler#handleSessionExpired(com.vaadin
* .server.VaadinRequest, com.vaadin.server.VaadinResponse)
*/
@Override
public boolean handleSessionExpired(VaadinRequest request,
VaadinResponse response) throws IOException {
if (!ServletPortletHelp... | 3.68 |
framework_VPopupView_syncChildren | /**
* Try to sync all known active child widgets to server.
*/
public void syncChildren() {
// Notify children with focus
if ((popupComponentWidget instanceof Focusable)) {
((Focusable) popupComponentWidget).setFocus(false);
}
// Notify children that have used the keyboard
for (Element e ... | 3.68 |
framework_RangeValidator_of | /**
* Returns a {@code RangeValidator} comparing values of a {@code Comparable}
* type using their <i>natural order</i>. Passing null to either
* {@code minValue} or {@code maxValue} means there is no limit in that
* direction. Both limits may be null; this can be useful if the limits are
* resolved programmatical... | 3.68 |
framework_BootstrapResponse_getRequest | /**
* Gets the request for which the generated bootstrap HTML will be the
* response.
*
* This can be used to read request headers and other additional
* information. Please note that {@link VaadinSession#getBrowser()} will not
* be available because the bootstrap page is generated before the bootstrap
* javascr... | 3.68 |
flink_SpillChannelManager_unregisterOpenChannelToBeRemovedAtShutdown | /**
* Removes a channel reader/writer from the list of channels that are to be removed at shutdown.
*
* @param channel The channel reader/writer.
*/
synchronized void unregisterOpenChannelToBeRemovedAtShutdown(FileIOChannel channel) {
openChannels.remove(channel);
} | 3.68 |
framework_VTree_onKeyDown | /*
* (non-Javadoc)
*
* @see
* com.google.gwt.event.dom.client.KeyDownHandler#onKeyDown(com.google.gwt
* .event.dom.client.KeyDownEvent)
*/
@Override
public void onKeyDown(KeyDownEvent event) {
if (handleKeyNavigation(event.getNativeEvent().getKeyCode(),
event.isControlKeyDown() || event.isMetaKeyD... | 3.68 |
morf_AbstractSqlDialectTest_testSelectWithLiterals | /**
* Tests that selects which include field literals.
*/
@Test
public void testSelectWithLiterals() {
SelectStatement stmt = new SelectStatement(new FieldReference(STRING_FIELD),
new FieldReference(INT_FIELD),
new FieldReference(DATE_FIELD).as("aliasDate"),
new FieldLiteral("SOME_STRING"),
new Fiel... | 3.68 |
framework_SetPageFirstItemLoadsNeededRowsOnly_getTestDescription | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
protected String getTestDescription() {
return "Only cached rows and rows in viewport should be rendered after "
+ "calling table.setCurrentPageFirstItemIndex(n) - as opposed to all rows "
... | 3.68 |
flink_ListView_add | /**
* Adds the given value to the list.
*
* @throws Exception Thrown if the system cannot add data.
* @param value The element to be appended to this list view.
*/
public void add(T value) throws Exception {
list.add(value);
} | 3.68 |
hbase_StoreFileInfo_isValid | /**
* Return if the specified file is a valid store file or not.
* @param fileStatus The {@link FileStatus} of the file
* @return <tt>true</tt> if the file is valid
*/
public static boolean isValid(final FileStatus fileStatus) throws IOException {
final Path p = fileStatus.getPath();
if (fileStatus.isDirectory... | 3.68 |
framework_CalendarDateRange_getEnd | /**
* Get the end date of the date range.
*
* @return the end Date of the range
*/
public Date getEnd() {
return end;
} | 3.68 |
flink_WindowsGrouping_buildTriggerWindowElementsIterator | /** @return the iterator of the next triggerable window's elements. */
public RowIterator<BinaryRowData> buildTriggerWindowElementsIterator() {
currentWindow = nextWindow;
// It is illegal to call this method after [[hasTriggerWindow()]] has returned `false`.
Preconditions.checkState(
watermark ... | 3.68 |
flink_AbstractUdfOperator_emptyClassArray | /**
* Generic utility function that returns an empty class array.
*
* @param <U> The type of the classes.
* @return An empty array of type <tt>Class<U></tt>.
*/
protected static <U> Class<U>[] emptyClassArray() {
@SuppressWarnings("unchecked")
Class<U>[] array = new Class[0];
return array;
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.