name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hbase_KeyValue_getShortMidpointKey | /**
* This is a HFile block index key optimization.
* @param leftKey byte array for left Key
* @param rightKey byte array for right Key
* @return 0 if equal, <0 if left smaller, >0 if right smaller
* @deprecated Since 0.99.2;
*/
@Deprecated
public byte[] getShortMidpointKey(final byte[] leftKey, final byte... | 3.68 |
flink_Router_toString | /** Returns visualized routing rules. */
@Override
public String toString() {
// Step 1/2: Dump routers and anyMethodRouter in order
int numRoutes = size();
List<String> methods = new ArrayList<String>(numRoutes);
List<String> patterns = new ArrayList<String>(numRoutes);
List<String> targets = new A... | 3.68 |
flink_HeapPriorityQueueSet_remove | /**
* In contrast to the superclass and to maintain set semantics, removal here is based on
* comparing the given element via {@link #equals(Object)}.
*
* @return <code>true</code> if the operation changed the head element or if is it unclear if
* the head element changed. Only returns <code>false</code> iff t... | 3.68 |
pulsar_ProducerImpl_cnx | // wrapper for connection methods
ClientCnx cnx() {
return this.connectionHandler.cnx();
} | 3.68 |
hbase_HFileReaderImpl_getKVBufSize | // From non encoded HFiles, we always read back KeyValue or its descendant.(Note: When HFile
// block is in DBB, it will be OffheapKV). So all parts of the Cell is in a contiguous
// array/buffer. How many bytes we should wrap to make the KV is what this method returns.
private int getKVBufSize() {
int kvBufSize = KE... | 3.68 |
framework_BasicEvent_getStyleName | /*
* (non-Javadoc)
*
* @see com.vaadin.addon.calendar.event.CalendarEvent#getStyleName()
*/
@Override
public String getStyleName() {
return styleName;
} | 3.68 |
hadoop_RouterStateIdContext_getRouterFederatedStateMap | /**
* Utility function to parse routerFederatedState field in RPC headers.
*/
public static Map<String, Long> getRouterFederatedStateMap(ByteString byteString) {
if (byteString != null) {
RouterFederatedStateProto federatedState;
try {
federatedState = RouterFederatedStateProto.parseFrom(byteString);
... | 3.68 |
hbase_HFileSystem_newInstanceFileSystem | /**
* Returns a brand new instance of the FileSystem. It does not use the FileSystem.Cache. In newer
* versions of HDFS, we can directly invoke FileSystem.newInstance(Configuration).
* @param conf Configuration
* @return A new instance of the filesystem
*/
private static FileSystem newInstanceFileSystem(Configurat... | 3.68 |
hadoop_ListResultEntrySchema_withOwner | /**
* Set the owner value.
*
* @param owner the owner value to set
* @return the ListEntrySchema object itself.
*/
public ListResultEntrySchema withOwner(final String owner) {
this.owner = owner;
return this;
} | 3.68 |
hudi_BaseHoodieTableServiceClient_scheduleLogCompactionAtInstant | /**
* Schedules a new log compaction instant with passed-in instant time.
*
* @param instantTime Log Compaction Instant Time
* @param extraMetadata Extra Metadata to be stored
*/
public boolean scheduleLogCompactionAtInstant(String instantTime, Option<Map<String, String>> extraMetadata) throws HoodieIOException ... | 3.68 |
open-banking-gateway_FintechPsuAspspTuple_toDatasafePathWithoutParent | /**
* Converts current tuple to Datasafe storage path.
* @return Datasafe path corresponding to current tuple
*/
public String toDatasafePathWithoutParent() {
return this.psuId + "/" + this.aspspId;
} | 3.68 |
pulsar_BrokerMonitor_printData | // Decide whether this broker is running SimpleLoadManagerImpl or ModularLoadManagerImpl and then print the data
// accordingly.
private synchronized void printData(final String path) {
final String broker = brokerNameFromPath(path);
String jsonString;
try {
jsonString = new String(zkClient.getData(... | 3.68 |
zxing_ShareActivity_showContactAsBarcode | /**
* Takes a contact Uri and does the necessary database lookups to retrieve that person's info,
* then sends an Encode intent to render it as a QR Code.
*
* @param contactUri A Uri of the form content://contacts/people/17
*/
private void showContactAsBarcode(Uri contactUri) {
if (contactUri == null) {
retu... | 3.68 |
framework_VComboBox_reactOnInputWhenReady | /**
* Perform filtering with the user entered string and when the results
* are received, perform any action appropriate for the user input
* (select an item or create a new one).
*
* @param value
* user input
*/
public void reactOnInputWhenReady(String value) {
pendingUserInput = value;
showP... | 3.68 |
flink_PackagedProgram_deleteExtractedLibraries | /** Deletes all temporary files created for contained packaged libraries. */
private void deleteExtractedLibraries() {
deleteExtractedLibraries(this.extractedTempLibraries);
this.extractedTempLibraries.clear();
} | 3.68 |
hadoop_LoggingAuditor_getDescription | /**
* Get the span description built in the constructor.
* @return description text.
*/
protected String getDescription() {
return description;
} | 3.68 |
hadoop_ByteBufferDecodingState_checkInputBuffers | /**
* Check and ensure the buffers are of the desired length and type, direct
* buffers or not.
* @param buffers the buffers to check
*/
void checkInputBuffers(ByteBuffer[] buffers) {
int validInputs = 0;
for (ByteBuffer buffer : buffers) {
if (buffer == null) {
continue;
}
if (buffer.remain... | 3.68 |
framework_VMenuBar_itemClick | /**
* When an item is clicked.
*
* @param item
*/
public void itemClick(CustomMenuItem item) {
boolean triggered = triggerEventIfNeeded(item);
if (item.getCommand() != null || triggered) {
try {
if (item.getCommand() != null) {
item.getCommand().execute();
}
... | 3.68 |
flink_IOUtils_closeSocket | /**
* Closes the socket ignoring {@link IOException}.
*
* @param sock the socket to close
*/
public static void closeSocket(final Socket sock) {
// avoids try { close() } dance
if (sock != null) {
try {
sock.close();
} catch (IOException ignored) {
}
}
} | 3.68 |
graphhopper_Snap_getQueryDistance | /**
* @return the distance of the query to the snapped coordinates. In meter
*/
public double getQueryDistance() {
return queryDistance;
} | 3.68 |
hbase_RSAnnotationReadingPriorityFunction_getDeadline | /**
* Based on the request content, returns the deadline of the request.
* @return Deadline of this request. 0 now, otherwise msec of 'delay'
*/
@Override
public long getDeadline(RequestHeader header, Message param) {
if (param instanceof ScanRequest) {
ScanRequest request = (ScanRequest) param;
if (!reque... | 3.68 |
hbase_Procedure_releaseLock | /**
* The user should override this method, and release lock if necessary.
*/
protected void releaseLock(TEnvironment env) {
// no-op
} | 3.68 |
hadoop_FederationNamespaceInfo_getBlockPoolId | /**
* The HDFS block pool id for this namespace.
*
* @return Block pool identifier.
*/
public String getBlockPoolId() {
return this.blockPoolId;
} | 3.68 |
framework_Page_getStyles | /**
* Returns that stylesheet associated with this Page. The stylesheet
* contains additional styles injected at runtime into the HTML document.
*
* @since 7.1
*/
public Styles getStyles() {
if (styles == null) {
styles = new Styles(uI);
}
return styles;
} | 3.68 |
flink_IntegerResourceVersion_valueOf | /**
* Create a {@link IntegerResourceVersion} with given integer value.
*
* @param value resource version integer value. The value should not be negative.
* @return {@link IntegerResourceVersion} with given value.
*/
public static IntegerResourceVersion valueOf(int value) {
Preconditions.checkArgument(value >=... | 3.68 |
querydsl_DateTimeExpression_max | /**
* Get the maximum value of this expression (aggregation)
*
* @return max(this)
*/
@Override
public DateTimeExpression<T> max() {
if (max == null) {
max = Expressions.dateTimeOperation(getType(), Ops.AggOps.MAX_AGG, mixin);
}
return max;
} | 3.68 |
hadoop_AppReportFetcher_getApplicationReport | /**
* Get an application report for the specified application id from the RM and
* fall back to the Application History Server if not found in RM.
*
* @param applicationsManager what to use to get the RM reports.
* @param appId id of the application to get.
* @return the ApplicationReport for the appId.
* @throw... | 3.68 |
hadoop_Quota_orByStorageType | /**
* Invoke predicate by each storage type and bitwise inclusive OR the results.
*
* @param predicate the function test the storage type.
* @return true if bitwise OR by all storage type returns true, false otherwise.
*/
public static boolean orByStorageType(Predicate<StorageType> predicate) {
boolean res = fal... | 3.68 |
pulsar_SubscribeRateLimiter_addSubscribeLimiterIfAbsent | /**
* Update subscribe-throttling-rate. gives first priority to
* namespace-policy configured subscribe rate else applies
* default broker subscribe-throttling-rate
*/
private synchronized void addSubscribeLimiterIfAbsent(ConsumerIdentifier consumerIdentifier) {
if (subscribeRateLimiter.get(consumerIdentifier) ... | 3.68 |
AreaShop_AreaShop_info | /**
* Print an information message to the console.
* @param message The message to print
*/
public static void info(Object... message) {
AreaShop.getInstance().getLogger().info(StringUtils.join(message, " "));
} | 3.68 |
flink_DecimalData_scale | /** Returns the <i>scale</i> of this {@link DecimalData}. */
public int scale() {
return scale;
} | 3.68 |
flink_MemorySegment_putCharLittleEndian | /**
* Writes the given character (16 bit, 2 bytes) to the given position in little-endian byte
* order. This method's speed depends on the system's native byte order, and it is possibly
* slower than {@link #putChar(int, char)}. For most cases (such as transient storage in memory
* or serialization for I/O and netw... | 3.68 |
framework_BinderValidationStatus_getFieldValidationErrors | /**
* Gets the failed field level validation statuses.
* <p>
* The field level validators have been added with
* {@link BindingBuilder#withValidator(Validator)}.
*
* @return a list of failed field level validation statuses
*/
public List<BindingValidationStatus<?>> getFieldValidationErrors() {
return binding... | 3.68 |
dubbo_LfuCache_put | /**
* API to store value against a key in the calling thread scope.
* @param key Unique identifier for the object being store.
* @param value Value getting store
*/
@SuppressWarnings("unchecked")
@Override
public void put(Object key, Object value) {
store.put(key, value);
} | 3.68 |
hadoop_HttpUserGroupInformation_get | /**
* Returns the remote {@link UserGroupInformation} in context for the current
* HTTP request, taking into account proxy user requests.
*
* @return the remote {@link UserGroupInformation}, <code>NULL</code> if none.
*/
public static UserGroupInformation get() {
return DelegationTokenAuthenticationFilter.
... | 3.68 |
pulsar_ModularLoadManagerImpl_getBundleStats | // Use the Pulsar client to acquire the namespace bundle stats.
private Map<String, NamespaceBundleStats> getBundleStats() {
return pulsar.getBrokerService().getBundleStats();
} | 3.68 |
hadoop_RollingWindow_inc | /**
* Increment the bucket. It assumes that staleness check is already
* performed. We do not need to update the {@link #updateTime} because as
* long as the {@link #updateTime} belongs to the current view of the
* rolling window, the algorithm works fine.
* @param delta
*/
void inc(long delta) {
value.addAndGe... | 3.68 |
hadoop_CommitUtilsWithMR_jobName | /**
* Get a job name; returns meaningful text if there is no name.
* @param context job context
* @return a string for logs
*/
public static String jobName(JobContext context) {
String name = context.getJobName();
return (name != null && !name.isEmpty()) ? name : "(anonymous)";
} | 3.68 |
dubbo_StringUtils_parseLong | /**
* parse str to Long(if str is not number or n < 0, then return 0)
*
* @param str a number str
* @return positive long or zero
*/
public static long parseLong(String str) {
return isNumber(str) ? Long.parseLong(str) : 0;
} | 3.68 |
flink_ZooKeeperCheckpointStoreUtil_nameToCheckpointID | /**
* Converts a path to the checkpoint id.
*
* @param path in ZooKeeper
* @return Checkpoint id parsed from the path
*/
@Override
public long nameToCheckpointID(String path) {
try {
String numberString;
// check if we have a leading slash
if ('/' == path.charAt(0)) {
numbe... | 3.68 |
flink_OperationTreeBuilder_addAliasToTheCallInAggregate | /**
* Add a default name to the call in the grouping expressions, e.g., groupBy(a % 5) to groupBy(a
* % 5 as TMP_0) or make aggregate a named aggregate.
*/
private List<Expression> addAliasToTheCallInAggregate(
List<String> inputFieldNames, List<Expression> expressions) {
int attrNameCntr = 0;
Set<S... | 3.68 |
flink_ThreadSafeSimpleCounter_dec | /**
* Decrement the current count by the given value.
*
* @param n value to decrement the current count by
*/
@Override
public void dec(long n) {
longAdder.add(-n);
} | 3.68 |
flink_TaskIOMetricGroup_reuseRecordsInputCounter | // ============================================================================================
// Metric Reuse
// ============================================================================================
public void reuseRecordsInputCounter(Counter numRecordsInCounter) {
this.numRecordsIn.addCounter(numRecordsI... | 3.68 |
hadoop_ResourceRequest_allocationRequestId | /**
* Set the <code>allocationRequestId</code> of the request.
* @see ResourceRequest#setAllocationRequestId(long)
* @param allocationRequestId
* <code>allocationRequestId</code> of the request
* @return {@link ResourceRequestBuilder}
*/
@Public
@Evolving
public ResourceRequestBuilder allocationRequestId... | 3.68 |
flink_BytesMap_calcSecondHashCode | // M(the num of buckets) is the nth power of 2, so the second hash code must be odd, and always
// is
// H2(K) = 1 + 2 * ((H1(K)/M) mod (M-1))
protected int calcSecondHashCode(final int firstHashCode) {
return ((((firstHashCode >> log2NumBuckets)) & numBucketsMask2) << 1) + 1;
} | 3.68 |
framework_CurrentInstance_restoreInstances | /**
* Restores the given instances to the given values. Note that this should
* only be used internally to restore Vaadin classes.
*
* @since 7.1
*
* @param old
* A Class -> CurrentInstance map to set as current instances
*/
public static void restoreInstances(Map<Class<?>, CurrentInstance> old) {
... | 3.68 |
flink_ConfigurationUtils_getPrefixedKeyValuePairs | /**
* Extract and parse Flink configuration properties with a given name prefix and return the
* result as a Map.
*/
public static Map<String, String> getPrefixedKeyValuePairs(
String prefix, Configuration configuration) {
Map<String, String> result = new HashMap<>();
for (Map.Entry<String, String> e... | 3.68 |
framework_DropTargetExtension_setDropCriterion | /**
* Set a drop criterion to allow drop on this drop target. When data is
* dragged on top of the drop target, the given value is compared to the
* drag source's payload with the same key. The drag passes this criterion
* if the value of the payload compared to the given value using the given
* operator holds.
*... | 3.68 |
MagicPlugin_MaterialSets_wildcard | /**
* @return A material set that matches all materials.
*/
public static MaterialSet wildcard() {
return WildcardMaterialSet.INSTANCE;
} | 3.68 |
hbase_RequestConverter_buildSlowLogResponseRequest | /**
* Build RPC request payload for getLogEntries
* @param filterParams map of filter params
* @param limit limit for no of records that server returns
* @param logType type of the log records
* @return request payload {@link HBaseProtos.LogRequest}
*/
public static HBaseProtos.LogRequest buildSlowLog... | 3.68 |
open-banking-gateway_ConsentAccess_getFirstByCurrentSession | /**
* Available consent for current session execution with throwing exception
*/
default ProtocolFacingConsent getFirstByCurrentSession() {
List<ProtocolFacingConsent> consents = findByCurrentServiceSessionOrderByModifiedDesc();
if (consents.isEmpty()) {
throw new IllegalStateException("Context not fo... | 3.68 |
flink_RpcEndpoint_unregisterResource | /**
* Unregister the given closeable resource from {@link CloseableRegistry}.
*
* @param closeableResource the given closeable resource
* @return true if the given resource unregister successful, otherwise false
*/
protected boolean unregisterResource(Closeable closeableResource) {
return resourceRegistry.unre... | 3.68 |
morf_NamedParameterPreparedStatement_parseSql | /**
* Parses the SQL string containing named parameters in such a form that
* can be cached, so that prepared statements using the parsed result
* can be created rapidly.
*
* @param sql the SQL
* @param sqlDialect Dialect of the SQL.
* @return the parsed result
*/
public static ParseResult parseSql(String sql, ... | 3.68 |
framework_DropTargetExtension_setDropEffect | /**
* Sets the drop effect for the current drop target. This is set to the
* dropEffect on {@code dragenter} and {@code dragover} events.
* <p>
* <em>NOTE: If the drop effect that doesn't match the dropEffect /
* effectAllowed of the drag source, it DOES NOT prevent drop on IE and
* Safari! For FireFox and Chrome... | 3.68 |
flink_FromJarEntryClassInformationProvider_getJarFile | /**
* Returns the specified {@code jarFile}.
*
* @return The specified {@code jarFile}.
* @see #getJobClassName()
*/
@Override
public Optional<File> getJarFile() {
return Optional.of(jarFile);
} | 3.68 |
hadoop_PersistentLongFile_writeFile | /**
* Atomically write the given value to the given file, including fsyncing.
*
* @param file destination file
* @param val value to write
* @throws IOException if the file cannot be written
*/
public static void writeFile(File file, long val) throws IOException {
AtomicFileOutputStream fos = new AtomicFileOutp... | 3.68 |
morf_SelectStatementBuilder_allowParallelDml | /**
* Request that this query can contribute towards a parallel DML execution plan.
* If a select statement is used within a DML statement, some dialects require DML parallelisation to be enabled via the select statement.
* If the database implementation does not support, or is configured to disable parallel query e... | 3.68 |
hudi_UpsertPartitioner_filterSmallFilesInClustering | /**
* Exclude small file handling for clustering since update path is not supported.
* @param pendingClusteringFileGroupsId pending clustering file groups id of partition
* @param smallFiles small files of partition
* @return smallFiles not in clustering
*/
private List<SmallFile> filterSmallFilesInClustering(fin... | 3.68 |
flink_KerberosLoginProvider_doLoginAndReturnUGI | /**
* Does kerberos login and doesn't set current user, just returns a new UGI instance. Must be
* called when isLoginPossible returns true.
*/
public UserGroupInformation doLoginAndReturnUGI() throws IOException {
UserGroupInformation currentUser = UserGroupInformation.getCurrentUser();
if (principal != nu... | 3.68 |
framework_ContainerHierarchicalWrapper_removeItemRecursively | /**
* Removes the Item identified by given itemId and all its children.
*
* @see #removeItem(Object)
* @param itemId
* the identifier of the Item to be removed
* @return true if the operation succeeded
*/
public boolean removeItemRecursively(Object itemId) {
return HierarchicalContainer.removeItem... | 3.68 |
hbase_ServerRegionReplicaUtil_shouldReplayRecoveredEdits | /**
* Returns whether to replay the recovered edits to flush the results. Currently secondary region
* replicas do not replay the edits, since it would cause flushes which might affect the primary
* region. Primary regions even opened in read only mode should replay the edits.
* @param region the HRegion object
* ... | 3.68 |
morf_CaseInsensitiveString_toString | /**
* Returns the internal representation of the string value. Note that the
* case of this is unpredictable. Do not use to compare to other strings;
* instead use {@link #equalsString(String)}.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return string;
} | 3.68 |
hbase_ReplicationSourceManager_cleanOldLogs | /**
* Cleans a log file and all older logs from replication queue. Called when we are sure that a log
* file is closed and has no more entries.
* @param log Path to the log
* @param inclusive whether we should also remove the given log file
* @param source the replication source
*/
void cleanOldLogs(Stri... | 3.68 |
hadoop_StageConfig_getTaskId | /**
* ID of the task.
*/
public String getTaskId() {
return taskId;
} | 3.68 |
incubator-hugegraph-toolchain_StringEncoding_writeAsciiString | // Similar to {@link StringSerializer}
public static int writeAsciiString(byte[] array, int offset, String value) {
E.checkArgument(CharMatcher.ascii().matchesAllOf(value),
"'%s' must be ASCII string", value);
int len = value.length();
if (len == 0) {
array[offset++] = (byte) 0x8... | 3.68 |
hbase_PrivateCellUtil_estimatedSerializedSizeOfKey | /**
* Calculates the serialized key size. We always serialize in the KeyValue's serialization format.
* @param cell the cell for which the key size has to be calculated.
* @return the key size
*/
public static int estimatedSerializedSizeOfKey(final Cell cell) {
if (cell instanceof KeyValue) return ((KeyValue) cel... | 3.68 |
flink_MemorySegment_putLongLittleEndian | /**
* Writes the given long value (64bit, 8 bytes) to the given position in little endian byte
* order. This method's speed depends on the system's native byte order, and it is possibly
* slower than {@link #putLong(int, long)}. For most cases (such as transient storage in memory
* or serialization for I/O and netw... | 3.68 |
framework_VLoadingIndicator_getConnection | /**
* Returns the {@link ApplicationConnection} which uses this loading
* indicator.
*
* @return The ApplicationConnection for this loading indicator
*/
public ApplicationConnection getConnection() {
return connection;
} | 3.68 |
hbase_MemStoreCompactor_doCompaction | /**
* ---------------------------------------------------------------------- The worker thread
* performs the compaction asynchronously. The solo (per compactor) thread only reads the
* compaction pipeline. There is at most one thread per memstore instance.
*/
private void doCompaction() {
ImmutableSegment result... | 3.68 |
hbase_LruAdaptiveBlockCache_evictBlock | /**
* Evict the block, and it will be cached by the victim handler if exists && block may be
* read again later
* @param evictedByEvictionProcess true if the given block is evicted by EvictionThread
* @return the heap size of evicted block
*/
protected long evictBlock(LruCachedBlock block, boolean evictedB... | 3.68 |
hbase_MasterObserver_postGetClusterMetrics | /**
* Called after get cluster status.
*/
default void postGetClusterMetrics(ObserverContext<MasterCoprocessorEnvironment> ctx,
ClusterMetrics status) throws IOException {
} | 3.68 |
framework_VAbstractPopupCalendar_getDescriptionForAssistiveDevices | /**
* Get the description that explains the usage of the Widget for users of
* assistive devices.
*
* @return String with the description
*/
public String getDescriptionForAssistiveDevices() {
return descriptionForAssistiveDevicesElement.getInnerText();
} | 3.68 |
dubbo_ClassSourceScanner_spiClassesWithAdaptive | /**
* Filter out the spi classes with adaptive annotations
* from all the class collections that can be loaded.
* @return All spi classes with adaptive annotations
*/
public List<Class<?>> spiClassesWithAdaptive() {
Map<String, Class<?>> allClasses = getClasses();
List<Class<?>> spiClasses = new ArrayList... | 3.68 |
framework_PerformanceTestSubTreeCaching_populateContainer | /**
* Adds n Table components to given container
*
* @param testContainer2
*/
private void populateContainer(VerticalLayout container, int n) {
for (int i = 0; i < n; i++) {
// array_type array_element = [i];
final Table t = TestForTablesInitialColumnWidthLogicRendering
.getTestT... | 3.68 |
hadoop_BoundedResourcePool_close | /**
* Derived classes may implement a way to cleanup each item.
*/
@Override
protected synchronized void close(T item) {
// Do nothing in this class. Allow overriding classes to take any cleanup action.
} | 3.68 |
querydsl_GenericExporter_setSupertypeAnnotation | /**
* Set the supertype annotation
*
* @param supertypeAnnotation supertype annotation
*/
public void setSupertypeAnnotation(
Class<? extends Annotation> supertypeAnnotation) {
this.supertypeAnnotation = supertypeAnnotation;
} | 3.68 |
framework_VUpload_isImmediateMode | /**
* Returns whether this component is in immediate mode or not.
*
* @return {@code true} for immediate mode, {@code false} for not
*/
public boolean isImmediateMode() {
return immediateMode;
} | 3.68 |
hbase_Scan_getStopRow | /** Returns the stoprow */
public byte[] getStopRow() {
return this.stopRow;
} | 3.68 |
morf_NamedParameterPreparedStatement_close | /**
* @see PreparedStatement#close()
* @exception SQLException if a database access error occurs
*/
@Override
public void close() throws SQLException {
statement.close();
} | 3.68 |
hadoop_AbstractS3ACommitter_jobCompleted | /**
* Job completion outcome; this may be subclassed in tests.
* @param success did the job succeed.
*/
protected void jobCompleted(boolean success) {
getCommitOperations().jobCompleted(success);
} | 3.68 |
hbase_HFileBlockIndex_getNonRootSize | /** Returns the size of this chunk if stored in the non-root index block format */
@Override
public int getNonRootSize() {
return Bytes.SIZEOF_INT // Number of entries
+ Bytes.SIZEOF_INT * (blockKeys.size() + 1) // Secondary index
+ curTotalNonRootEntrySize; // All entries
} | 3.68 |
flink_DataSet_printOnTaskManager | /**
* Writes a DataSet to the standard output streams (stdout) of the TaskManagers that execute the
* program (or more specifically, the data sink operators). On a typical cluster setup, the data
* will appear in the TaskManagers' <i>.out</i> files.
*
* <p>To print the data to the console or stdout stream of the c... | 3.68 |
hudi_InternalSchemaBuilder_refreshNewId | /**
* Assigns new ids for all fields in a Type, based on initial id.
*
* @param type a type.
* @param nextId initial id which used to fresh ids for all fields in a type
* @return a new type with new ids
*/
public Type refreshNewId(Type type, AtomicInteger nextId) {
switch (type.typeId()) {
case RECORD:
... | 3.68 |
streampipes_PropertyRequirementsBuilder_create | /**
* Creates new requirements for a data processor or a data sink at a property level. A matching event property
* needs to provide all requirements assigned by this class.
*
* @return {@link PropertyRequirementsBuilder}
*/
public static PropertyRequirementsBuilder create(Datatypes propertyDatatype) {
return ne... | 3.68 |
framework_LayoutManager_getBorderHeight | /**
* Gets the border height (top border + bottom border) of the given element,
* provided that it has been measured. These elements are guaranteed to be
* measured:
* <ul>
* <li>ManagedLayouts and their child Connectors
* <li>Elements for which there is at least one ElementResizeListener
* <li>Elements for whic... | 3.68 |
hbase_MetricsTableRequests_updateDelete | /**
* Update the Delete time histogram
* @param t time it took
*/
public void updateDelete(long t) {
if (isEnableTableLatenciesMetrics()) {
deleteTimeHistogram.update(t);
}
} | 3.68 |
flink_TaskSlot_closeAsync | /**
* Close the task slot asynchronously.
*
* <p>Slot is moved to {@link TaskSlotState#RELEASING} state and only once. If there are active
* tasks running in the slot then they are failed. The future of all tasks terminated and slot
* cleaned up is initiated only once and always returned in case of multiple attemp... | 3.68 |
flink_MessageSerializer_deserializeResponse | /**
* De-serializes the response sent to the {@link
* org.apache.flink.queryablestate.network.Client}.
*
* <pre>
* <b>The buffer is expected to be at the response position.</b>
* </pre>
*
* @param buf The {@link ByteBuf} containing the serialized response.
* @return The response.
*/
public RESP deserializeRe... | 3.68 |
morf_MergeStatementBuilder_into | /**
* Merges into a specific table.
*
* <blockquote><pre>
* merge().into(new TableReference("agreement"));</pre></blockquote>
*
* @param intoTable the table to merge into.
* @return this, for method chaining.
*/
public MergeStatementBuilder into(TableReference intoTable) {
this.table = intoTable;
return ... | 3.68 |
morf_Oracle_getErrorCodeFromOracleXAException | /**
* Recursively try and extract the error code from any nested OracleXAException
*/
private Optional<Integer> getErrorCodeFromOracleXAException(Throwable exception) {
try {
if ("oracle.jdbc.xa.OracleXAException".equals(exception.getClass().getName())) {
return Optional.of((Integer) exception.getClass().... | 3.68 |
hbase_SnapshotReferenceUtil_visitTableStoreFiles | /**
* © Iterate over the snapshot store files
* @param conf The current {@link Configuration} instance.
* @param fs {@link FileSystem}
* @param snapshotDir {@link Path} to the Snapshot directory
* @param desc the {@link SnapshotDescription} of the snapshot to verify
* @param visitor cal... | 3.68 |
hbase_TimeoutExceptionInjector_start | /**
* Start a timer to fail a process if it takes longer than the expected time to complete.
* <p>
* Non-blocking.
* @throws IllegalStateException if the timer has already been marked done via {@link #complete()}
* or {@link #trigger()}
*/
public synchronized void start() throws Ille... | 3.68 |
hadoop_WordList_contains | /**
* Returns 'true' if the list contains the specified word.
*/
public boolean contains(String word) {
return list.containsKey(word);
} | 3.68 |
flink_ZooKeeperUtils_isZooKeeperRecoveryMode | /** Returns whether {@link HighAvailabilityMode#ZOOKEEPER} is configured. */
public static boolean isZooKeeperRecoveryMode(Configuration flinkConf) {
return HighAvailabilityMode.fromConfig(flinkConf).equals(HighAvailabilityMode.ZOOKEEPER);
} | 3.68 |
hadoop_BaseRecord_initDefaultTimes | /**
* Initialize default times. The driver may update these timestamps on insert
* and/or update. This should only be called when initializing an object that
* is not backed by a data store.
*/
private void initDefaultTimes() {
long now = Time.now();
this.setDateCreated(now);
this.setDateModified(now);
} | 3.68 |
hmily_CreateSQLUtil_getKeyValueClause | /**
* Get key value SQL clause.
*
* @param keySet key set
* @param separator separator
* @return key value SQL clause
*/
public static String getKeyValueClause(final Set<String> keySet, final String separator) {
return Joiner.on(separator).withKeyValueSeparator("=").join(Maps.asMap(keySet, input -> "?"));
} | 3.68 |
hbase_CachedEntryQueue_poll | /** Returns The next element in this queue, or {@code null} if the queue is empty. */
public Map.Entry<BlockCacheKey, BucketEntry> poll() {
return queue.poll();
} | 3.68 |
hadoop_DeviceMappingManager_defaultScheduleAction | // Default scheduling logic
private void defaultScheduleAction(Set<Device> allowed,
Map<Device, ContainerId> used, Set<Device> assigned,
ContainerId containerId, int count) {
LOG.debug("Using default scheduler. Allowed:" + allowed
+ ",Used:" + used + ", containerId:" + containerId);
for (Device device... | 3.68 |
flink_TimestampData_fromTimestamp | /**
* Creates an instance of {@link TimestampData} from an instance of {@link Timestamp}.
*
* @param timestamp an instance of {@link Timestamp}
*/
public static TimestampData fromTimestamp(Timestamp timestamp) {
return fromLocalDateTime(timestamp.toLocalDateTime());
} | 3.68 |
flink_MiniCluster_executeJobBlocking | /**
* This method runs a job in blocking mode. The method returns only after the job completed
* successfully, or after it failed terminally.
*
* @param job The Flink job to execute
* @return The result of the job execution
* @throws JobExecutionException Thrown if anything went amiss during initial job launch, o... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.