name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_NullGroupsMapping_getGroupsSet | /**
* Get all various group memberships of a given user.
* Returns EMPTY set in case of non-existing user
*
* @param user User's name
* @return set of group memberships of user
* @throws IOException raised on errors performing I/O.
*/
@Override
public Set<String> getGroupsSet(String user) throws IOException {
... | 3.68 |
open-banking-gateway_EncryptionKeySerde_read | /**
* Read symmetric key with initialization vector from input stream.
* @param is Stream with key
* @return Read key
*/
@SneakyThrows
public SecretKeyWithIv read(InputStream is) {
SecretKeyWithIvContainer container = mapper.readValue(is, SecretKeyWithIvContainer.class);
return new SecretKeyWithIv(
... | 3.68 |
hbase_BlockIOUtils_readWithExtra | /**
* Read bytes into ByteBuffers directly, those buffers either contains the extraLen bytes or only
* contains necessaryLen bytes, which depends on how much bytes do the last time we read.
* @param buf the destination {@link ByteBuff}.
* @param dis input stream to read.
* @param necessaryLen byt... | 3.68 |
flink_SlotSharingExecutionSlotAllocator_allocateSlotsForVertices | /**
* Creates logical {@link SlotExecutionVertexAssignment}s from physical shared slots.
*
* <p>The allocation has the following steps:
*
* <ol>
* <li>Map the executions to {@link ExecutionSlotSharingGroup}s using {@link
* SlotSharingStrategy}
* <li>Check which {@link ExecutionSlotSharingGroup}s alrea... | 3.68 |
framework_TabSheet_removeSelectedTabChangeListener | /**
* Removes a tab selection listener.
*
* @param listener
* the Listener to be removed.
*
* @deprecated As of 8.0, replaced by {@link Registration#remove()} in the
* registration object returned from
* {@link #removeSelectedTabChangeListener(SelectedTabChangeListener)}
* ... | 3.68 |
hadoop_RequestFactoryImpl_withRequestPreparer | /**
* Callback to prepare requests.
*
* @param value new value
* @return the builder
*/
public RequestFactoryBuilder withRequestPreparer(
final PrepareRequest value) {
this.requestPreparer = value;
return this;
} | 3.68 |
hadoop_TimelineEntity_getRelatedEntitiesJAXB | // Required by JAXB
@Private
@XmlElement(name = "relatedentities")
public HashMap<String, Set<String>> getRelatedEntitiesJAXB() {
return relatedEntities;
} | 3.68 |
framework_VTree_deselectAll | /**
* Deselects all items in the tree.
*/
public void deselectAll() {
for (String key : selectedIds) {
TreeNode node = keyToNode.get(key);
if (node != null) {
node.setSelected(false);
}
}
selectedIds.clear();
selectionHasChanged = true;
} | 3.68 |
hbase_DynamicMetricsRegistry_getCounter | /**
* Get a MetricMutableCounterLong from the storage. If it is not there atomically put it.
* @param counterName Name of the counter to get
* @param potentialStartingValue starting value if we have to create a new counter
*/
public MutableFastCounter getCounter(String counterName, long potentialStarting... | 3.68 |
hudi_FormatUtils_getRawValueWithAltKeys | /**
* Gets the raw value for a {@link ConfigProperty} config from Flink configuration. The key and
* alternative keys are used to fetch the config.
*
* @param flinkConf Configs in Flink {@link org.apache.flink.configuration.Configuration}.
* @param configProperty {@link ConfigProperty} config to fetch.
* @re... | 3.68 |
hadoop_BlockStorageMovementNeeded_removeItemTrackInfo | /**
* Decrease the pending child count for directory once one file blocks moved
* successfully. Remove the SPS xAttr if pending child count is zero.
*/
public synchronized void removeItemTrackInfo(ItemInfo trackInfo,
boolean isSuccess) throws IOException {
if (trackInfo.isDir()) {
// If track is part of so... | 3.68 |
hmily_DataSourceMetaDataLoader_load | /**
* Load data source meta data.
*
* @param dataSource data source
* @param databaseType database type
* @return datasource metadata
* @throws SQLException SQL exception
*/
public static DataSourceMetaData load(final DataSource dataSource, final DatabaseType databaseType) throws SQLException {
DataSourceMet... | 3.68 |
framework_Panel_setTabIndex | /**
* {@inheritDoc}
*/
@Override
public void setTabIndex(int tabIndex) {
getState().tabIndex = tabIndex;
} | 3.68 |
flink_RpcInvocation_convertRpcToString | /**
* Converts a rpc call into its string representation.
*
* @param declaringClassName declaringClassName declares the specified rpc
* @param methodName methodName of the rpc
* @param parameterTypes parameterTypes of the rpc
* @return string representation of the rpc
*/
static String convertRpcToString(
... | 3.68 |
flink_PartitionedFileWriter_writeBuffers | /**
* Writes a list of {@link Buffer}s to this {@link PartitionedFile}. It guarantees that after
* the return of this method, the target buffers can be released. In a data region, all data of
* the same subpartition must be written together.
*
* <p>Note: The caller is responsible for recycling the target buffers a... | 3.68 |
framework_VAcceptCriterion_accept | /**
* Checks if current drag event has valid drop target and target accepts the
* transferable. If drop target is valid, callback is used.
*
* @param drag
* the drag event
* @param configuration
* accept criterion UIDL
* @param callback
* the callback that handles acceptance if... | 3.68 |
hadoop_StageConfig_withJobIdSource | /**
* Set the Job ID source.
* @param value new value
* @return this
*/
public StageConfig withJobIdSource(final String value) {
checkOpen();
jobIdSource = value;
return this;
} | 3.68 |
shardingsphere-elasticjob_JobRegistry_getJobInstance | /**
* Get job instance.
*
* @param jobName job name
* @return job instance
*/
public JobInstance getJobInstance(final String jobName) {
return jobInstanceMap.get(jobName);
} | 3.68 |
querydsl_JPAExpressions_max | /**
* Create a max(col) expression
*
* @param left collection
* @return max(col)
*/
public static <A extends Comparable<? super A>> ComparableExpression<A> max(CollectionExpression<?,A> left) {
return Expressions.comparableOperation((Class) left.getParameter(0), Ops.QuantOps.MAX_IN_COL, (Expression<?>) left);
... | 3.68 |
hbase_SyncTable_moveToNextBatch | /**
* If there is an open hash batch, complete it and sync if there are diffs. Start a new batch,
* and seek to read the
*/
private void moveToNextBatch(Context context) throws IOException, InterruptedException {
if (targetHasher.isBatchStarted()) {
finishBatchAndCompareHashes(context);
}
targetHasher.star... | 3.68 |
hudi_HoodieMultiTableStreamer_populateTableExecutionContextList | //commonProps are passed as parameter which contain table to config file mapping
private void populateTableExecutionContextList(TypedProperties properties, String configFolder, FileSystem fs, Config config) throws IOException {
List<String> tablesToBeIngested = getTablesToBeIngested(properties);
logger.info("tables... | 3.68 |
hadoop_AzureBlobFileSystem_getAclStatus | /**
* Gets the ACL of a file or directory.
*
* @param path Path to get
* @return AbfsAclStatus describing the ACL of the file or directory
* @throws IOException if an ACL could not be read
*/
@Override
public AclStatus getAclStatus(final Path path) throws IOException {
LOG.debug("AzureBlobFileSystem.getAclStatu... | 3.68 |
framework_Overlay_setFitInWindow | /**
* Sets whether the overlay should be moved or shrunk to fit inside the
* window.
* <p>
* When this is <code>false</code>, the default {@link PopupPanel} behavior
* is used, which tries to position the popup primarly below and to the
* right of a reference UIObject and, if there is not enough space, above or
... | 3.68 |
querydsl_GenericExporter_setGeneratedAnnotationClass | /**
* Set the Generated annotation class. Will default to java {@code @Generated}
*
* @param generatedAnnotationClass the fully qualified class name of the <em>Single-Element Annotation</em> (with {@code String} element) to be used on
* the generated sources, or {@code null} (default... | 3.68 |
framework_VFilterSelect_setSelectionRange | /**
* Overridden to avoid selecting text when text input is disabled.
*/
@Override
public void setSelectionRange(int pos, int length) {
if (textInputEnabled) {
/*
* set selection range with a backwards direction: anchor at the
* back, focus at the front. This means that items that are to... | 3.68 |
flink_WindowsGrouping_advanceWatermarkToTriggerAllWindows | /**
* Advance the watermark to trigger all the possible windows. It is designed to be idempotent.
*/
public void advanceWatermarkToTriggerAllWindows() {
skipEmptyWindow();
advanceWatermark(watermark + windowSize);
} | 3.68 |
flink_CrossOperator_with | /**
* Finalizes a Cross transformation by applying a {@link CrossFunction} to each pair of
* crossed elements.
*
* <p>Each CrossFunction call returns exactly one element.
*
* @param function The CrossFunction that is called for each pair of crossed elements.
* @return An CrossOperator that represents the crossed... | 3.68 |
hadoop_AzureNativeFileSystemStore_isPageBlobKey | /**
* Checks if the given key in Azure Storage should be stored as a page
* blob instead of block blob.
*/
public boolean isPageBlobKey(String key) {
return isKeyForDirectorySet(key, pageBlobDirs);
} | 3.68 |
hadoop_BufferedIOStatisticsOutputStream_hflush | /**
* If the inner stream is Syncable, flush the buffer and then
* invoke the inner stream's hflush() operation.
*
* Otherwise: throw an exception, unless the stream was constructed with
* {@link #downgradeSyncable} set to true, in which case the stream
* is just flushed.
* @throws IOException IO Problem
* @thr... | 3.68 |
flink_CompressedSerializedValue_getSize | /** Returns the size of the compressed serialized data. */
public int getSize() {
return getByteArray().length;
} | 3.68 |
graphhopper_Entity_endRecord | /**
* End a row.
* This is just a proxy to the writer, but could be used for hooks in the future.
*/
public void endRecord () throws IOException {
writer.endRecord();
} | 3.68 |
hbase_ByteBuffAllocator_allocate | /**
* Allocate size bytes from the ByteBufAllocator, Note to call the {@link ByteBuff#release()} if
* no need any more, otherwise the memory leak happen in NIO ByteBuffer pool.
* @param size to allocate
* @return an ByteBuff with the desired size.
*/
public ByteBuff allocate(int size) {
if (size < 0) {
throw... | 3.68 |
flink_PartitionedFileWriter_startNewRegion | /**
* Persists the region index of the current data region and starts a new region to write.
*
* <p>Note: The caller is responsible for releasing the failed {@link PartitionedFile} if any
* exception occurs.
*
* @param isBroadcastRegion Whether it's a broadcast region. See {@link #isBroadcastRegion}.
*/
public v... | 3.68 |
flink_ArrowFieldWriter_reset | /** Resets the state of the writer to write the next batch of fields. */
public void reset() {
valueVector.reset();
count = 0;
} | 3.68 |
hadoop_AMRMProxyService_processApplicationStartRequest | /**
* Callback from the ContainerManager implementation for initializing the
* application request processing pipeline.
*
* @param request - encapsulates information for starting an AM
* @throws IOException if fails
* @throws YarnException if fails
*/
public void processApplicationStartRequest(StartContainerRequ... | 3.68 |
hudi_HoodieTable_rollbackInflightClustering | /**
* Rollback inflight clustering instant to requested clustering instant
*
* @param inflightInstant Inflight clustering instant
* @param getPendingRollbackInstantFunc Function to get rollback instant
*/
public void rollbackInflightClustering(HoodieInstant inflightInstant,
... | 3.68 |
flink_CheckpointStatsCounts_incrementCompletedCheckpoints | /**
* Increments the number of successfully completed checkpoints.
*
* <p>It is expected that this follows a previous call to {@link
* #incrementInProgressCheckpoints()}.
*/
void incrementCompletedCheckpoints() {
if (canDecrementOfInProgressCheckpointsNumber()) {
numInProgressCheckpoints--;
}
n... | 3.68 |
flink_OverWindowPartitionedOrdered_preceding | /**
* Set the preceding offset (based on time or row-count intervals) for over window.
*
* @param preceding preceding offset relative to the current row.
* @return an over window with defined preceding
*/
public OverWindowPartitionedOrderedPreceding preceding(Expression preceding) {
return new OverWindowPartit... | 3.68 |
hbase_IndividualBytesFieldCell_clone | /**
* Implement Cloneable interface
*/
@Override
public Object clone() throws CloneNotSupportedException {
return super.clone(); // only a shadow copy
} | 3.68 |
hadoop_S3ClientFactory_withMinimumPartSize | /**
* Set the minimum part size for transfer parts.
* @param value new value
* @return the builder
*/
public S3ClientCreationParameters withMinimumPartSize(
final long value) {
minimumPartSize = value;
return this;
} | 3.68 |
hbase_HMaster_getMaxRegionsInTransition | /** Returns Maximum number of regions in transition */
private int getMaxRegionsInTransition() {
int numRegions = this.assignmentManager.getRegionStates().getRegionAssignments().size();
return Math.max((int) Math.floor(numRegions * this.maxRitPercent), 1);
} | 3.68 |
hbase_CellCounter_createSubmittableJob | /**
* Sets up the actual job.
* @param conf The current configuration.
* @param args The command line parameters.
* @return The newly created job.
* @throws IOException When setting up the job fails.
*/
public static Job createSubmittableJob(Configuration conf, String[] args) throws IOException {
String tableNa... | 3.68 |
hbase_Procedure_doAcquireLock | /**
* Internal method called by the ProcedureExecutor that starts the user-level code acquireLock().
*/
final LockState doAcquireLock(TEnvironment env, ProcedureStore store) {
if (waitInitialized(env)) {
return LockState.LOCK_EVENT_WAIT;
}
if (lockedWhenLoading) {
// reset it so we will not consider it ... | 3.68 |
hudi_BulkInsertWriteFunction_lastPendingInstant | /**
* Returns the last pending instant time.
*/
protected String lastPendingInstant() {
return this.ckpMetadata.lastPendingInstant();
} | 3.68 |
hbase_HFile_getWriterFactory | /**
* Returns the factory to be used to create {@link HFile} writers
*/
public static final WriterFactory getWriterFactory(Configuration conf, CacheConfig cacheConf) {
int version = getFormatVersion(conf);
switch (version) {
case 2:
throw new IllegalArgumentException("This should never happen. "
... | 3.68 |
flink_ExternalResourceUtils_externalResourceDriversFromConfig | /**
* Instantiate the {@link ExternalResourceDriver ExternalResourceDrivers} for all of enabled
* external resources. {@link ExternalResourceDriver ExternalResourceDrivers} are mapped to its
* resource name.
*/
@VisibleForTesting
static Map<String, ExternalResourceDriver> externalResourceDriversFromConfig(
... | 3.68 |
framework_GridElement_getVerticalScroller | /**
* Get the vertical scroll element.
*
* @return The element representing the vertical scrollbar
*/
public TestBenchElement getVerticalScroller() {
List<WebElement> rootElements = findElements(By.xpath("./div"));
return (TestBenchElement) rootElements.get(0);
} | 3.68 |
hadoop_NativeCrc32_isAvailable | /**
* Return true if the JNI-based native CRC extensions are available.
*/
public static boolean isAvailable() {
if (isSparc) {
return false;
} else {
return NativeCodeLoader.isNativeCodeLoaded();
}
} | 3.68 |
hmily_HmilyExecuteTemplate_beforeSetAutoCommit | /**
* Sets auto commit.
*
* @param connection the connection
*/
public void beforeSetAutoCommit(final Connection connection) {
if (check()) {
return;
}
try {
boolean autoCommit = connection.getAutoCommit();
if (autoCommit) {
connection.setAutoCommit(false);
}
... | 3.68 |
framework_MenuBar_onHide | /*
* This method is called when a menu bar is hidden, so that it can hide any
* child popups that are currently being shown.
*/
private void onHide() {
if (shownChildMenu != null) {
shownChildMenu.onHide();
popup.hide();
}
} | 3.68 |
hadoop_TFile_equals | /**
* Compare whether this and other points to the same key value.
*/
@Override
public boolean equals(Object other) {
if (this == other) return true;
if (!(other instanceof Entry)) return false;
return ((Entry) other).compareTo(keyBuffer, 0, getKeyLength()) == 0;
} | 3.68 |
hbase_EnabledTableSnapshotHandler_snapshotRegions | /**
* This method kicks off a snapshot procedure. Other than that it hangs around for various phases
* to complete.
*/
@Override
protected void snapshotRegions(List<Pair<RegionInfo, ServerName>> regions) throws IOException {
Set<String> regionServers = new HashSet<>(regions.size());
for (Pair<RegionInfo, ServerN... | 3.68 |
flink_MetricRegistryImpl_closeAsync | /**
* Shuts down this registry and the associated {@link MetricReporter}.
*
* <p>NOTE: This operation is asynchronous and returns a future which is completed once the
* shutdown operation has been completed.
*
* @return Future which is completed once the {@link MetricRegistryImpl} is shut down.
*/
@Override
publ... | 3.68 |
flink_SchedulingPipelinedRegionComputeUtil_mergeRegionsOnCycles | /**
* Merge the regions base on <a
* href="https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm">
* Tarjan's strongly connected components algorithm</a>. For more details please see <a
* href="https://issues.apache.org/jira/browse/FLINK-17330">FLINK-17330</a>.
*/
private static Set<Set<... | 3.68 |
hudi_HoodieDropPartitionsTool_readConfigFromFileSystem | /**
* Reads config from the file system.
*
* @param jsc {@link JavaSparkContext} instance.
* @param cfg {@link Config} instance.
* @return the {@link TypedProperties} instance.
*/
private TypedProperties readConfigFromFileSystem(JavaSparkContext jsc, Config cfg) {
return UtilHelpers.readConfig(jsc.hadoopConfigu... | 3.68 |
hbase_ServerManager_getOnlineServersListWithPredicator | /**
* @param keys The target server name
* @param idleServerPredicator Evaluates the server on the given load
* @return A copy of the internal list of online servers matched by the predicator
*/
public List<ServerName> getOnlineServersListWithPredicator(List<ServerName> keys,
Predicate<ServerMetri... | 3.68 |
hbase_WALSplitUtil_moveAsideBadEditsFile | /**
* Move aside a bad edits file.
* @param fs the file system used to rename bad edits file.
* @param edits Edits file to move aside.
* @return The name of the moved aside file.
*/
public static Path moveAsideBadEditsFile(final FileSystem fs, final Path edits)
throws IOException {
Path moveAsideName =
... | 3.68 |
hadoop_OBSCommonUtils_deleteObjects | /**
* Perform a bulk object delete operation. Increments the {@code
* OBJECT_DELETE_REQUESTS} and write operation statistics.
*
* @param owner the owner OBSFileSystem instance
* @param deleteRequest keys to delete on the obs-backend
* @throws IOException on any failure to delete objects
*/
static void de... | 3.68 |
framework_SystemMessagesInfo_getService | /**
* Returns the service this SystemMessages request comes from.
*
* @return The service which triggered this request or null of not triggered
* from a service.
*/
public VaadinService getService() {
return service;
} | 3.68 |
flink_ChangelogKeyedStateBackend_getKeyGroupRange | // -------------------- CheckpointableKeyedStateBackend --------------------------------
@Override
public KeyGroupRange getKeyGroupRange() {
return keyedStateBackend.getKeyGroupRange();
} | 3.68 |
hmily_CollectionUtils_isNotEmpty | /**
* Is not empty boolean.
*
* @param coll the coll
* @return the boolean
*/
public static boolean isNotEmpty(final Collection<?> coll) {
return !isEmpty(coll);
} | 3.68 |
morf_SpreadsheetDataSetConsumer_createIndex | /**
* Create the index worksheet.
*
* <p>This also creates links back to the index in each of the worksheets.</p>
*/
public void createIndex() {
WritableSheet sheet = workbook.createSheet(spreadsheetifyName("Index"), 0);
createTitle(sheet, "Index");
try {
// Create links for each worksheet, apart from th... | 3.68 |
hbase_ExploringCompactionPolicy_getTotalStoreSize | /**
* Find the total size of a list of store files.
* @param potentialMatchFiles StoreFile list.
* @return Sum of StoreFile.getReader().length();
*/
private long getTotalStoreSize(List<HStoreFile> potentialMatchFiles) {
return potentialMatchFiles.stream().mapToLong(sf -> sf.getReader().length()).sum();
} | 3.68 |
hbase_LogRollBackupSubprocedurePool_submitTask | /**
* Submit a task to the pool.
*/
public void submitTask(final Callable<Void> task) {
Future<Void> f = this.taskPool.submit(task);
futures.add(f);
} | 3.68 |
morf_SqlDialect_buildSpecificValueInsert | /**
* Creates an SQL statement to insert specific values into the columns
* specified.
*
* @param statement The insert statement to build an SQL query for.
* @param metadata the database schema. If null, the SQL statement will be
* treated "as is". If not null, the schema will be used to decorate
* ... | 3.68 |
hudi_LSMTimeline_listAllManifestFiles | /**
* List all the parquet manifest files.
*/
public static FileStatus[] listAllManifestFiles(HoodieTableMetaClient metaClient) throws IOException {
return metaClient.getFs().listStatus(new Path(metaClient.getArchivePath()), getManifestFilePathFilter());
} | 3.68 |
dubbo_AbstractDynamicConfiguration_getDefaultTimeout | /**
* @return the default timeout
* @since 2.7.8
*/
@Override
public long getDefaultTimeout() {
return getTimeout();
} | 3.68 |
hadoop_ValidateRenamedFilesStage_executeStage | /**
* Validate the task manifests.
* This is done by listing all the directories
* and verifying that every file in the source list
* has a file in the destination of the same size.
* If two tasks have both written the same file or
* a source file was changed after the task was committed,
* then a mismatch will ... | 3.68 |
shardingsphere-elasticjob_JobRegistry_registerRegistryCenter | /**
* Register registry center.
*
* @param jobName job name
* @param regCenter registry center
*/
public void registerRegistryCenter(final String jobName, final CoordinatorRegistryCenter regCenter) {
regCenterMap.put(jobName, regCenter);
regCenter.addCacheData("/" + jobName);
} | 3.68 |
pulsar_AuthorizationProvider_allowNamespacePolicyOperation | /**
* @deprecated - will be removed after 2.12. Use async variant.
*/
@Deprecated
default Boolean allowNamespacePolicyOperation(NamespaceName namespaceName,
PolicyName policy,
PolicyOperation operation,
... | 3.68 |
hbase_SimpleRegionNormalizer_skipForSplit | /**
* Determine if a region in {@link RegionState} should be considered for a split operation.
*/
private static boolean skipForSplit(final RegionState state, final RegionInfo regionInfo) {
final String name = regionInfo.getEncodedName();
return logTraceReason(() -> state == null,
"skipping split of region {}... | 3.68 |
hadoop_StartupProgressMetrics_addCounter | /**
* Adds a counter with a name built by using the specified phase's name as
* prefix and then appending the specified suffix.
*
* @param builder MetricsRecordBuilder to receive counter
* @param phase Phase to add
* @param nameSuffix String suffix of metric name
* @param descSuffix String suffix of metric desc... | 3.68 |
hbase_HbckReport_getCheckingStartTimestamp | /**
* Used for web ui to show when the HBCK checking started.
*/
public Instant getCheckingStartTimestamp() {
return checkingStartTimestamp;
} | 3.68 |
flink_JobEdge_setOperatorLevelCachingDescription | /**
* Sets the operator-level caching description for this input.
*
* @param operatorLevelCachingDescription The description of operator-level caching.
*/
public void setOperatorLevelCachingDescription(String operatorLevelCachingDescription) {
this.operatorLevelCachingDescription = operatorLevelCachingDescripti... | 3.68 |
hbase_WALSplitter_createWriter | /**
* Create a new {@link WALProvider.Writer} for writing log splits.
* @return a new Writer instance, caller should close
*/
protected WALProvider.Writer createWriter(Path logfile) throws IOException {
return walFactory.createRecoveredEditsWriter(walFS, logfile);
} | 3.68 |
hadoop_VersionMismatchException_toString | /** Returns a string representation of this object. */
@Override
public String toString(){
return "A record version mismatch occurred. Expecting v"
+ expectedVersion + ", found v" + foundVersion;
} | 3.68 |
hadoop_WorkerId_getHostname | /**
* Get hostname for Worker.
* @return hostname of worker node
*/
public final Text getHostname() {
return hostname;
} | 3.68 |
hadoop_AbfsCountersImpl_incrementCounter | /**
* {@inheritDoc}
*
* Increment a statistic with some value.
*
* @param statistic AbfsStatistic need to be incremented.
* @param value long value to be incremented by.
*/
@Override
public void incrementCounter(AbfsStatistic statistic, long value) {
ioStatisticsStore.incrementCounter(statistic.getStatName... | 3.68 |
framework_VAbsoluteLayout_updateCaptionPosition | /**
* Updates the caption position by using element offset left and top
*/
private void updateCaptionPosition() {
if (caption != null) {
Style style = caption.getElement().getStyle();
style.setProperty("position", "absolute");
style.setPropertyPx("left", getElement().getOffsetLeft());
... | 3.68 |
flink_DefaultExecutionGraph_getAccumulatorResultsStringified | /**
* Returns the a stringified version of the user-defined accumulators.
*
* @return an Array containing the StringifiedAccumulatorResult objects
*/
@Override
public StringifiedAccumulatorResult[] getAccumulatorResultsStringified() {
Map<String, OptionalFailure<Accumulator<?, ?>>> accumulatorMap =
... | 3.68 |
hbase_PrettyPrinter_valueOf | /**
* Convert a human readable string to its value.
* @see org.apache.hadoop.hbase.util.PrettyPrinter#format(String, Unit)
* @return the value corresponding to the human readable string
*/
public static String valueOf(final String pretty, final Unit unit) throws HBaseException {
StringBuilder value = new StringBu... | 3.68 |
flink_Task_loadAndInstantiateInvokable | /**
* Instantiates the given task invokable class, passing the given environment (and possibly the
* initial task state) to the task's constructor.
*
* <p>The method will first try to instantiate the task via a constructor accepting both the
* Environment and the TaskStateSnapshot. If no such constructor exists, a... | 3.68 |
flink_DefaultConfigurableOptionsFactory_setLogDir | /**
* The directory for RocksDB's logging files.
*
* @param logDir If empty, log files will be in the same directory as data files<br>
* If non-empty, this directory will be used and the data directory's absolute path will be
* used as the prefix of the log file name.
* @return this options factory
*/
pu... | 3.68 |
framework_VaadinPortletResponse_escapeHtml | /**
* Perform minimal HTML escaping similar to Guava HtmlEscapers.
*
* @param input
* string to escape
* @return minimally escaped HTML safe string
*/
private static String escapeHtml(String input) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < input.length(); i++) {
char... | 3.68 |
morf_SchemaHomology_tablesMatch | /**
* Compare two tables.
*
* @param table1 Table 1
* @param table2 Table 2
* @return Whether they match.
*/
public boolean tablesMatch(Table table1, Table table2) {
noDifferences = true;
checkTable(table1, table2);
return noDifferences;
} | 3.68 |
flink_InMemoryPartition_appendRecord | /**
* Inserts the given object into the current buffer. This method returns a pointer that can be
* used to address the written record in this partition.
*
* @param record The object to be written to the partition.
* @return A pointer to the object in the partition.
* @throws IOException Thrown when the write fai... | 3.68 |
framework_DesignAttributeHandler_resolveSupportedAttributes | /**
* Resolves the supported attributes and corresponding getters and setters
* for the class using introspection. After resolving, the information is
* cached internally by this class
*
* @param clazz
* the class to resolve the supported attributes for
*/
private static void resolveSupportedAttribute... | 3.68 |
hudi_HoodieBloomIndex_tagLocationBacktoRecords | /**
* Tag the <rowKey, filename> back to the original HoodieRecord List.
*/
protected <R> HoodieData<HoodieRecord<R>> tagLocationBacktoRecords(
HoodiePairData<HoodieKey, HoodieRecordLocation> keyFilenamePair,
HoodieData<HoodieRecord<R>> records,
HoodieTable hoodieTable) {
HoodiePairData<HoodieKey, Hoodi... | 3.68 |
flink_FunctionContext_getJobParameter | /**
* Gets the global job parameter value associated with the given key as a string.
*
* @param key key pointing to the associated value
* @param defaultValue default value which is returned in case global job parameter is null or
* there is no value associated with the given key
* @return (default) value ass... | 3.68 |
pulsar_LegacyHierarchicalLedgerRangeIterator_nextL1Node | /**
* Iterate next level1 znode.
*
* @return false if have visited all level1 nodes
* @throws InterruptedException/KeeperException if error occurs reading zookeeper children
*/
private boolean nextL1Node() throws ExecutionException, InterruptedException, TimeoutException {
l2NodesIter = null;
while (l2Node... | 3.68 |
hibernate-validator_ResourceLoaderHelper_getResettableInputStreamForPath | /**
* Returns an input stream for the given path, which supports the mark/reset
* contract.
*
* @param path The path of the requested input stream.
*
* @return An input stream for the given path or {@code null} if no such
* resource exists.
*
* @see InputStream#markSupported()
*/
static InputStream ge... | 3.68 |
flink_TumblingProcessingTimeWindows_of | /**
* Creates a new {@code TumblingProcessingTimeWindows} {@link WindowAssigner} that assigns
* elements to time windows based on the element timestamp, offset and a staggering offset,
* depending on the staggering policy.
*
* @param size The size of the generated windows.
* @param offset The offset which window ... | 3.68 |
flink_JoinOperator_projectTuple23 | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <
T0,
T1,
T2,
T3... | 3.68 |
hbase_ColumnValueFilter_areSerializedFieldsEqual | /**
* Returns true if and only if the fields of the filter that are serialized are equal to the
* corresponding fields in other. Used for testing.
*/
@Override
boolean areSerializedFieldsEqual(Filter o) {
if (o == this) {
return true;
} else if (!(o instanceof ColumnValueFilter)) {
return false;
}
Co... | 3.68 |
hbase_BaseLoadBalancer_balanceCluster | /**
* Perform the major balance operation for cluster, will invoke
* {@link #balanceTable(TableName, Map)} to do actual balance.
* <p/>
* THIs method is marked as final which means you should not override this method. See the javadoc
* for {@link #balanceTable(TableName, Map)} for more details.
* @param loadOfAll... | 3.68 |
streampipes_PrimitivePropertyBuilder_scope | /**
* Assigns a property scope to the event property.
*
* @param propertyScope The {@link org.apache.streampipes.model.schema.PropertyScope}.
* @return this
*/
public PrimitivePropertyBuilder scope(PropertyScope propertyScope) {
this.eventProperty.setPropertyScope(propertyScope.name());
return this;
} | 3.68 |
hbase_MetricsAssignmentManager_getMoveProcMetrics | /** Returns Set of common metrics for move procedure */
public ProcedureMetrics getMoveProcMetrics() {
return moveProcMetrics;
} | 3.68 |
hbase_RegionInfo_toDelimitedByteArray | /**
* Use this instead of {@link RegionInfo#toByteArray(RegionInfo)} when writing to a stream and you
* want to use the pb mergeDelimitedFrom (w/o the delimiter, pb reads to EOF which may not be what
* you want).
* @return This instance serialized as a delimied protobuf w/ a magic pb prefix.
*/
static byte[] toDel... | 3.68 |
framework_AbstractSelect_getVisibleItemIds | /**
* Gets the visible item ids. In Select, this returns list of all item ids,
* but can be overridden in subclasses if they paint only part of the items
* to the terminal or null if no items is visible.
*/
public Collection<?> getVisibleItemIds() {
return getItemIds();
} | 3.68 |
hbase_RestoreSnapshotHelper_getParentToChildrenPairMap | /**
* Returns the map of parent-children_pair.
* @return the map
*/
public Map<String, Pair<String, String>> getParentToChildrenPairMap() {
return this.parentsMap;
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.